summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--all/src/main/java/com/vaadin/buildhelpers/FetchReleaseNotesAuthors.java25
-rw-r--r--all/src/main/java/com/vaadin/buildhelpers/FetchReleaseNotesTickets.java12
-rw-r--r--buildhelpers/src/main/java/com/vaadin/buildhelpers/CompileTheme.java30
-rw-r--r--buildhelpers/src/main/java/com/vaadin/buildhelpers/GeneratePackageExports.java29
-rw-r--r--buildhelpers/src/main/java/com/vaadin/buildhelpers/ManifestWriter.java36
-rw-r--r--client-compiler/src/main/java/com/vaadin/sass/linker/SassLinker.java37
-rw-r--r--client-compiler/src/main/java/com/vaadin/server/widgetsetutils/AcceptCriteriaFactoryGenerator.java29
-rw-r--r--client-compiler/src/main/java/com/vaadin/server/widgetsetutils/ConnectorBundleLoaderFactory.java82
-rw-r--r--client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ArraySerializer.java6
-rw-r--r--client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ClientRpcVisitor.java21
-rw-r--r--client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ConnectorBundle.java53
-rw-r--r--client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ConnectorInitVisitor.java6
-rw-r--r--client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/CustomSerializer.java6
-rw-r--r--client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/EnumSerializer.java6
-rw-r--r--client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/FieldProperty.java15
-rw-r--r--client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/GeneratedSerializer.java6
-rw-r--r--client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/JsonSerializer.java10
-rw-r--r--client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/MethodProperty.java34
-rw-r--r--client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/OnStateChangeVisitor.java8
-rw-r--r--client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/Property.java18
-rw-r--r--client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/RendererVisitor.java47
-rw-r--r--client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ServerRpcVisitor.java9
-rw-r--r--client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/StateInitVisitor.java10
-rw-r--r--client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/TypeVisitor.java6
-rw-r--r--client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/WidgetInitVisitor.java23
-rw-r--r--client-compiler/src/main/java/com/vaadin/tools/CvalAddonsChecker.java33
-rw-r--r--client-compiler/src/main/java/com/vaadin/tools/CvalChecker.java24
-rwxr-xr-xclient-compiler/src/main/java/com/vaadin/tools/WidgetsetCompiler.java26
-rw-r--r--client-compiler/src/test/java/com/vaadin/tools/CvalAddonsCheckerTest.java4
-rw-r--r--client-compiler/src/test/java/com/vaadin/tools/CvalAddonstCheckerUseCasesTest.java17
-rw-r--r--client-compiler/src/test/java/com/vaadin/tools/CvalCheckerTest.java88
-rw-r--r--client/src/main/java/com/vaadin/client/AnimationUtil.java20
-rw-r--r--client/src/main/java/com/vaadin/client/ApplicationConfiguration.java94
-rw-r--r--client/src/main/java/com/vaadin/client/ApplicationConnection.java218
-rw-r--r--client/src/main/java/com/vaadin/client/BrowserInfo.java52
-rw-r--r--client/src/main/java/com/vaadin/client/CSSRule.java10
-rw-r--r--client/src/main/java/com/vaadin/client/ComponentConnector.java30
-rw-r--r--client/src/main/java/com/vaadin/client/ComponentDetail.java8
-rw-r--r--client/src/main/java/com/vaadin/client/ComponentDetailMap.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ComputedStyle.java68
-rw-r--r--client/src/main/java/com/vaadin/client/ConnectorHierarchyChangeEvent.java26
-rw-r--r--client/src/main/java/com/vaadin/client/ConnectorMap.java33
-rw-r--r--client/src/main/java/com/vaadin/client/ContainerResizedListener.java12
-rw-r--r--client/src/main/java/com/vaadin/client/DateTimeService.java56
-rw-r--r--client/src/main/java/com/vaadin/client/DeferredWorker.java4
-rw-r--r--client/src/main/java/com/vaadin/client/DirectionalManagedLayout.java6
-rw-r--r--client/src/main/java/com/vaadin/client/EventHelper.java33
-rw-r--r--client/src/main/java/com/vaadin/client/FastStringMap.java6
-rw-r--r--client/src/main/java/com/vaadin/client/FastStringSet.java6
-rw-r--r--client/src/main/java/com/vaadin/client/Focusable.java8
-rw-r--r--client/src/main/java/com/vaadin/client/HasChildMeasurementHintConnector.java16
-rw-r--r--client/src/main/java/com/vaadin/client/HasComponentsConnector.java16
-rw-r--r--client/src/main/java/com/vaadin/client/JavaScriptConnectorHelper.java70
-rw-r--r--client/src/main/java/com/vaadin/client/JavaScriptExtension.java6
-rw-r--r--client/src/main/java/com/vaadin/client/JsArrayObject.java6
-rw-r--r--client/src/main/java/com/vaadin/client/LayoutManager.java363
-rw-r--r--client/src/main/java/com/vaadin/client/LayoutManagerIE8.java10
-rw-r--r--client/src/main/java/com/vaadin/client/LocaleNotLoadedException.java6
-rw-r--r--client/src/main/java/com/vaadin/client/LocaleService.java10
-rw-r--r--client/src/main/java/com/vaadin/client/MeasuredSize.java14
-rw-r--r--client/src/main/java/com/vaadin/client/MouseEventDetailsBuilder.java14
-rw-r--r--client/src/main/java/com/vaadin/client/Paintable.java8
-rw-r--r--client/src/main/java/com/vaadin/client/Profiler.java73
-rw-r--r--client/src/main/java/com/vaadin/client/RenderInformation.java20
-rw-r--r--client/src/main/java/com/vaadin/client/RenderSpace.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ResourceLoader.java48
-rw-r--r--client/src/main/java/com/vaadin/client/ServerConnector.java45
-rw-r--r--client/src/main/java/com/vaadin/client/SimpleTree.java29
-rw-r--r--client/src/main/java/com/vaadin/client/StyleConstants.java6
-rw-r--r--client/src/main/java/com/vaadin/client/SuperDevMode.java43
-rw-r--r--client/src/main/java/com/vaadin/client/TooltipInfo.java11
-rw-r--r--client/src/main/java/com/vaadin/client/UIDL.java83
-rw-r--r--client/src/main/java/com/vaadin/client/Util.java219
-rw-r--r--client/src/main/java/com/vaadin/client/VCaption.java60
-rw-r--r--client/src/main/java/com/vaadin/client/VCaptionWrapper.java8
-rw-r--r--client/src/main/java/com/vaadin/client/VConsole.java10
-rw-r--r--client/src/main/java/com/vaadin/client/VErrorMessage.java20
-rw-r--r--client/src/main/java/com/vaadin/client/VLoadingIndicator.java30
-rw-r--r--client/src/main/java/com/vaadin/client/VSchedulerImpl.java6
-rw-r--r--client/src/main/java/com/vaadin/client/VTooltip.java122
-rw-r--r--client/src/main/java/com/vaadin/client/VUIDLBrowser.java19
-rw-r--r--client/src/main/java/com/vaadin/client/ValueMap.java8
-rw-r--r--client/src/main/java/com/vaadin/client/WidgetInstantiator.java6
-rw-r--r--client/src/main/java/com/vaadin/client/WidgetLoader.java10
-rw-r--r--client/src/main/java/com/vaadin/client/WidgetMap.java16
-rw-r--r--client/src/main/java/com/vaadin/client/WidgetSet.java26
-rw-r--r--client/src/main/java/com/vaadin/client/WidgetUtil.java212
-rw-r--r--client/src/main/java/com/vaadin/client/annotations/OnStateChange.java10
-rw-r--r--client/src/main/java/com/vaadin/client/communication/AbstractServerConnectorEvent.java8
-rw-r--r--client/src/main/java/com/vaadin/client/communication/AtmospherePushConnection.java41
-rw-r--r--client/src/main/java/com/vaadin/client/communication/ConnectionStateHandler.java40
-rw-r--r--client/src/main/java/com/vaadin/client/communication/Date_Serializer.java8
-rw-r--r--client/src/main/java/com/vaadin/client/communication/DefaultConnectionStateHandler.java74
-rw-r--r--client/src/main/java/com/vaadin/client/communication/DefaultReconnectDialog.java11
-rw-r--r--client/src/main/java/com/vaadin/client/communication/DiffJSONSerializer.java8
-rw-r--r--client/src/main/java/com/vaadin/client/communication/HasJavaScriptConnectorHelper.java6
-rw-r--r--client/src/main/java/com/vaadin/client/communication/Heartbeat.java23
-rw-r--r--client/src/main/java/com/vaadin/client/communication/JSONSerializer.java14
-rw-r--r--client/src/main/java/com/vaadin/client/communication/JavaScriptMethodInvocation.java8
-rw-r--r--client/src/main/java/com/vaadin/client/communication/JsonDecoder.java38
-rw-r--r--client/src/main/java/com/vaadin/client/communication/JsonEncoder.java49
-rw-r--r--client/src/main/java/com/vaadin/client/communication/MessageHandler.java397
-rw-r--r--client/src/main/java/com/vaadin/client/communication/MessageSender.java50
-rw-r--r--client/src/main/java/com/vaadin/client/communication/PushConnection.java28
-rw-r--r--client/src/main/java/com/vaadin/client/communication/ReconnectDialog.java20
-rw-r--r--client/src/main/java/com/vaadin/client/communication/RpcManager.java39
-rw-r--r--client/src/main/java/com/vaadin/client/communication/RpcProxy.java22
-rw-r--r--client/src/main/java/com/vaadin/client/communication/ServerRpcQueue.java53
-rw-r--r--client/src/main/java/com/vaadin/client/communication/StateChangeEvent.java50
-rw-r--r--client/src/main/java/com/vaadin/client/communication/XhrConnection.java31
-rw-r--r--client/src/main/java/com/vaadin/client/communication/XhrConnectionError.java20
-rw-r--r--client/src/main/java/com/vaadin/client/componentlocator/ComponentLocator.java41
-rw-r--r--client/src/main/java/com/vaadin/client/componentlocator/LegacyLocatorStrategy.java62
-rw-r--r--client/src/main/java/com/vaadin/client/componentlocator/LocatorStrategy.java28
-rw-r--r--client/src/main/java/com/vaadin/client/componentlocator/LocatorUtil.java16
-rw-r--r--client/src/main/java/com/vaadin/client/componentlocator/SelectorPredicate.java24
-rw-r--r--client/src/main/java/com/vaadin/client/componentlocator/VaadinFinderLocatorStrategy.java79
-rw-r--r--client/src/main/java/com/vaadin/client/connectors/AbstractRendererConnector.java49
-rw-r--r--client/src/main/java/com/vaadin/client/connectors/AbstractSelectionModelConnector.java12
-rw-r--r--client/src/main/java/com/vaadin/client/connectors/ButtonRendererConnector.java11
-rw-r--r--client/src/main/java/com/vaadin/client/connectors/ClickableRendererConnector.java35
-rw-r--r--client/src/main/java/com/vaadin/client/connectors/DateRendererConnector.java8
-rw-r--r--client/src/main/java/com/vaadin/client/connectors/DetailComponentManagerConnector.java11
-rw-r--r--client/src/main/java/com/vaadin/client/connectors/GridConnector.java98
-rw-r--r--client/src/main/java/com/vaadin/client/connectors/ImageRendererConnector.java8
-rw-r--r--client/src/main/java/com/vaadin/client/connectors/JavaScriptRendererConnector.java40
-rw-r--r--client/src/main/java/com/vaadin/client/connectors/MultiSelectionModelConnector.java50
-rw-r--r--client/src/main/java/com/vaadin/client/connectors/NoSelectionModelConnector.java12
-rw-r--r--client/src/main/java/com/vaadin/client/connectors/NumberRendererConnector.java13
-rw-r--r--client/src/main/java/com/vaadin/client/connectors/ProgressBarRendererConnector.java12
-rw-r--r--client/src/main/java/com/vaadin/client/connectors/RpcDataSourceConnector.java24
-rw-r--r--client/src/main/java/com/vaadin/client/connectors/SingleSelectionModelConnector.java20
-rw-r--r--client/src/main/java/com/vaadin/client/connectors/TextRendererConnector.java8
-rw-r--r--client/src/main/java/com/vaadin/client/connectors/UnsafeHtmlRendererConnector.java12
-rw-r--r--client/src/main/java/com/vaadin/client/data/AbstractRemoteDataSource.java75
-rw-r--r--client/src/main/java/com/vaadin/client/data/CacheStrategy.java36
-rw-r--r--client/src/main/java/com/vaadin/client/data/DataChangeHandler.java18
-rw-r--r--client/src/main/java/com/vaadin/client/data/DataSource.java32
-rw-r--r--client/src/main/java/com/vaadin/client/debug/internal/AnalyzeLayoutsPanel.java37
-rw-r--r--client/src/main/java/com/vaadin/client/debug/internal/ConnectorInfoPanel.java18
-rw-r--r--client/src/main/java/com/vaadin/client/debug/internal/DebugButton.java20
-rw-r--r--client/src/main/java/com/vaadin/client/debug/internal/ErrorNotificationHandler.java12
-rw-r--r--client/src/main/java/com/vaadin/client/debug/internal/HierarchyPanel.java12
-rw-r--r--client/src/main/java/com/vaadin/client/debug/internal/HierarchySection.java32
-rw-r--r--client/src/main/java/com/vaadin/client/debug/internal/Highlight.java30
-rw-r--r--client/src/main/java/com/vaadin/client/debug/internal/Icon.java6
-rw-r--r--client/src/main/java/com/vaadin/client/debug/internal/InfoSection.java48
-rw-r--r--client/src/main/java/com/vaadin/client/debug/internal/LogSection.java27
-rw-r--r--client/src/main/java/com/vaadin/client/debug/internal/NetworkSection.java14
-rw-r--r--client/src/main/java/com/vaadin/client/debug/internal/OptimizedWidgetsetPanel.java12
-rw-r--r--client/src/main/java/com/vaadin/client/debug/internal/ProfilerSection.java26
-rw-r--r--client/src/main/java/com/vaadin/client/debug/internal/Section.java17
-rw-r--r--client/src/main/java/com/vaadin/client/debug/internal/SelectConnectorListener.java10
-rw-r--r--client/src/main/java/com/vaadin/client/debug/internal/SelectorPath.java24
-rw-r--r--client/src/main/java/com/vaadin/client/debug/internal/TestBenchSection.java38
-rw-r--r--client/src/main/java/com/vaadin/client/debug/internal/VDebugWindow.java92
-rw-r--r--client/src/main/java/com/vaadin/client/debug/internal/theme/DebugWindowStyles.java6
-rw-r--r--client/src/main/java/com/vaadin/client/event/PointerCancelEvent.java10
-rw-r--r--client/src/main/java/com/vaadin/client/event/PointerCancelHandler.java10
-rw-r--r--client/src/main/java/com/vaadin/client/event/PointerDownEvent.java10
-rw-r--r--client/src/main/java/com/vaadin/client/event/PointerDownHandler.java10
-rw-r--r--client/src/main/java/com/vaadin/client/event/PointerEvent.java32
-rw-r--r--client/src/main/java/com/vaadin/client/event/PointerEventSupport.java8
-rw-r--r--client/src/main/java/com/vaadin/client/event/PointerEventSupportImpl.java8
-rw-r--r--client/src/main/java/com/vaadin/client/event/PointerEventSupportImplIE10.java12
-rw-r--r--client/src/main/java/com/vaadin/client/event/PointerEventSupportImplModernIE.java12
-rw-r--r--client/src/main/java/com/vaadin/client/event/PointerMoveEvent.java10
-rw-r--r--client/src/main/java/com/vaadin/client/event/PointerMoveHandler.java10
-rw-r--r--client/src/main/java/com/vaadin/client/event/PointerUpEvent.java10
-rw-r--r--client/src/main/java/com/vaadin/client/event/PointerUpHandler.java10
-rw-r--r--client/src/main/java/com/vaadin/client/extensions/AbstractExtensionConnector.java8
-rw-r--r--client/src/main/java/com/vaadin/client/extensions/BrowserWindowOpenerConnector.java11
-rw-r--r--client/src/main/java/com/vaadin/client/extensions/FileDownloaderConnector.java6
-rw-r--r--client/src/main/java/com/vaadin/client/extensions/ResponsiveConnector.java30
-rw-r--r--client/src/main/java/com/vaadin/client/extensions/javascriptmanager/JavaScriptManagerConnector.java12
-rw-r--r--client/src/main/java/com/vaadin/client/metadata/AsyncBundleLoader.java6
-rw-r--r--client/src/main/java/com/vaadin/client/metadata/BundleLoadCallback.java6
-rw-r--r--client/src/main/java/com/vaadin/client/metadata/ConnectorBundleLoader.java4
-rw-r--r--client/src/main/java/com/vaadin/client/metadata/InvokationHandler.java6
-rw-r--r--client/src/main/java/com/vaadin/client/metadata/Invoker.java6
-rw-r--r--client/src/main/java/com/vaadin/client/metadata/JsniInvoker.java10
-rw-r--r--client/src/main/java/com/vaadin/client/metadata/Method.java16
-rw-r--r--client/src/main/java/com/vaadin/client/metadata/NoDataException.java6
-rw-r--r--client/src/main/java/com/vaadin/client/metadata/OnStateChangeMethod.java26
-rw-r--r--client/src/main/java/com/vaadin/client/metadata/Property.java22
-rw-r--r--client/src/main/java/com/vaadin/client/metadata/ProxyHandler.java6
-rw-r--r--client/src/main/java/com/vaadin/client/metadata/Type.java3
-rw-r--r--client/src/main/java/com/vaadin/client/metadata/TypeData.java6
-rw-r--r--client/src/main/java/com/vaadin/client/metadata/TypeDataStore.java103
-rw-r--r--client/src/main/java/com/vaadin/client/renderers/ButtonRenderer.java8
-rw-r--r--client/src/main/java/com/vaadin/client/renderers/ClickableRenderer.java39
-rw-r--r--client/src/main/java/com/vaadin/client/renderers/ComplexRenderer.java28
-rw-r--r--client/src/main/java/com/vaadin/client/renderers/DateRenderer.java28
-rw-r--r--client/src/main/java/com/vaadin/client/renderers/HtmlRenderer.java12
-rw-r--r--client/src/main/java/com/vaadin/client/renderers/ImageRenderer.java8
-rw-r--r--client/src/main/java/com/vaadin/client/renderers/NumberRenderer.java12
-rw-r--r--client/src/main/java/com/vaadin/client/renderers/ProgressBarRenderer.java8
-rw-r--r--client/src/main/java/com/vaadin/client/renderers/Renderer.java14
-rw-r--r--client/src/main/java/com/vaadin/client/renderers/TextRenderer.java8
-rw-r--r--client/src/main/java/com/vaadin/client/renderers/WidgetRenderer.java27
-rw-r--r--client/src/main/java/com/vaadin/client/ui/AbstractClickEventHandler.java26
-rw-r--r--client/src/main/java/com/vaadin/client/ui/AbstractComponentConnector.java135
-rw-r--r--client/src/main/java/com/vaadin/client/ui/AbstractComponentContainerConnector.java12
-rw-r--r--client/src/main/java/com/vaadin/client/ui/AbstractConnector.java69
-rw-r--r--client/src/main/java/com/vaadin/client/ui/AbstractFieldConnector.java13
-rw-r--r--client/src/main/java/com/vaadin/client/ui/AbstractHasComponentsConnector.java20
-rw-r--r--client/src/main/java/com/vaadin/client/ui/AbstractLayoutConnector.java10
-rw-r--r--client/src/main/java/com/vaadin/client/ui/AbstractSingleComponentContainerConnector.java16
-rw-r--r--client/src/main/java/com/vaadin/client/ui/Action.java10
-rw-r--r--client/src/main/java/com/vaadin/client/ui/ActionOwner.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/CalendarEntry.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/ClickEventHandler.java12
-rw-r--r--client/src/main/java/com/vaadin/client/ui/ConnectorFocusAndBlurHandler.java12
-rw-r--r--client/src/main/java/com/vaadin/client/ui/Field.java10
-rw-r--r--client/src/main/java/com/vaadin/client/ui/FocusElementPanel.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/FocusUtil.java32
-rw-r--r--client/src/main/java/com/vaadin/client/ui/FocusableFlexTable.java18
-rw-r--r--client/src/main/java/com/vaadin/client/ui/FocusableFlowPanel.java16
-rw-r--r--client/src/main/java/com/vaadin/client/ui/FocusableScrollPanel.java24
-rw-r--r--client/src/main/java/com/vaadin/client/ui/FontIcon.java33
-rw-r--r--client/src/main/java/com/vaadin/client/ui/Icon.java14
-rw-r--r--client/src/main/java/com/vaadin/client/ui/ImageIcon.java8
-rw-r--r--client/src/main/java/com/vaadin/client/ui/JavaScriptComponentConnector.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/JavaScriptWidget.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/JsniMousewheelHandler.java14
-rw-r--r--client/src/main/java/com/vaadin/client/ui/LayoutClickEventHandler.java9
-rw-r--r--client/src/main/java/com/vaadin/client/ui/LegacyConnector.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/ManagedLayout.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/MediaBaseConnector.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/PostLayoutListener.java8
-rw-r--r--client/src/main/java/com/vaadin/client/ui/ShortcutActionHandler.java22
-rw-r--r--client/src/main/java/com/vaadin/client/ui/SimpleFocusablePanel.java10
-rw-r--r--client/src/main/java/com/vaadin/client/ui/SimpleManagedLayout.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/SubPartAware.java12
-rw-r--r--client/src/main/java/com/vaadin/client/ui/TouchScrollDelegate.java54
-rw-r--r--client/src/main/java/com/vaadin/client/ui/TreeAction.java10
-rw-r--r--client/src/main/java/com/vaadin/client/ui/UnknownComponentConnector.java26
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VAbsoluteLayout.java57
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VAbstractSplitPanel.java61
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VAccordion.java28
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VAudio.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VBrowserFrame.java10
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VButton.java32
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VCalendar.java196
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VCalendarPanel.java222
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VCheckBox.java12
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VColorPicker.java14
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VColorPickerArea.java33
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VContextMenu.java38
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VCssLayout.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VCustomComponent.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VCustomLayout.java40
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VDateField.java12
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VDateFieldCalendar.java32
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VDragAndDropWrapper.java72
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VDragAndDropWrapperIE.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VEmbedded.java66
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VFilterSelect.java277
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VFlash.java31
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VForm.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VFormLayout.java36
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VGridLayout.java31
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VHorizontalLayout.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VImage.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VLabel.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VLazyExecutor.java8
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VLink.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VListSelect.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VMediaBase.java8
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VMenuBar.java148
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VNativeButton.java8
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VNativeSelect.java14
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VNotification.java82
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VOptionGroup.java17
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VOptionGroupBase.java14
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VOverlay.java17
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VPanel.java18
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VPasswordField.java10
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VPopupCalendar.java87
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VPopupView.java26
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VProgressBar.java10
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VProgressIndicator.java10
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VRichTextArea.java31
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VScrollTable.java861
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VSlider.java41
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VSplitPanelHorizontal.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VSplitPanelVertical.java9
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VTabsheet.java90
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VTabsheetBase.java20
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VTabsheetPanel.java20
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VTextArea.java12
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VTextField.java16
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VTextualDate.java54
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VTree.java221
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VTreeTable.java63
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VTwinColSelect.java51
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VUI.java48
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VUnknownComponent.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VUpload.java20
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VVerticalLayout.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VVideo.java10
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VWindow.java115
-rw-r--r--client/src/main/java/com/vaadin/client/ui/absolutelayout/AbsoluteLayoutConnector.java46
-rw-r--r--client/src/main/java/com/vaadin/client/ui/accordion/AccordionConnector.java24
-rw-r--r--client/src/main/java/com/vaadin/client/ui/aria/AriaHelper.java33
-rw-r--r--client/src/main/java/com/vaadin/client/ui/aria/HandlesAriaCaption.java10
-rw-r--r--client/src/main/java/com/vaadin/client/ui/aria/HandlesAriaInvalid.java8
-rw-r--r--client/src/main/java/com/vaadin/client/ui/aria/HandlesAriaRequired.java8
-rw-r--r--client/src/main/java/com/vaadin/client/ui/audio/AudioConnector.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/browserframe/BrowserFrameConnector.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/button/ButtonConnector.java14
-rw-r--r--client/src/main/java/com/vaadin/client/ui/calendar/CalendarConnector.java104
-rw-r--r--client/src/main/java/com/vaadin/client/ui/calendar/VCalendarAction.java22
-rw-r--r--client/src/main/java/com/vaadin/client/ui/calendar/schedule/CalendarDay.java8
-rw-r--r--client/src/main/java/com/vaadin/client/ui/calendar/schedule/CalendarEvent.java57
-rw-r--r--client/src/main/java/com/vaadin/client/ui/calendar/schedule/DateCell.java87
-rw-r--r--client/src/main/java/com/vaadin/client/ui/calendar/schedule/DateCellContainer.java12
-rw-r--r--client/src/main/java/com/vaadin/client/ui/calendar/schedule/DateCellDayEvent.java41
-rw-r--r--client/src/main/java/com/vaadin/client/ui/calendar/schedule/DateCellGroup.java8
-rw-r--r--client/src/main/java/com/vaadin/client/ui/calendar/schedule/DateUtil.java12
-rw-r--r--client/src/main/java/com/vaadin/client/ui/calendar/schedule/DayToolbar.java14
-rw-r--r--client/src/main/java/com/vaadin/client/ui/calendar/schedule/FocusableComplexPanel.java24
-rw-r--r--client/src/main/java/com/vaadin/client/ui/calendar/schedule/FocusableGrid.java20
-rw-r--r--client/src/main/java/com/vaadin/client/ui/calendar/schedule/FocusableHTML.java20
-rw-r--r--client/src/main/java/com/vaadin/client/ui/calendar/schedule/HasTooltipKey.java12
-rw-r--r--client/src/main/java/com/vaadin/client/ui/calendar/schedule/MonthEventLabel.java22
-rw-r--r--client/src/main/java/com/vaadin/client/ui/calendar/schedule/MonthGrid.java10
-rw-r--r--client/src/main/java/com/vaadin/client/ui/calendar/schedule/SimpleDayCell.java30
-rw-r--r--client/src/main/java/com/vaadin/client/ui/calendar/schedule/SimpleDayToolbar.java10
-rw-r--r--client/src/main/java/com/vaadin/client/ui/calendar/schedule/SimpleWeekToolbar.java14
-rw-r--r--client/src/main/java/com/vaadin/client/ui/calendar/schedule/WeekGrid.java56
-rw-r--r--client/src/main/java/com/vaadin/client/ui/calendar/schedule/WeekGridMinuteTimeRange.java10
-rw-r--r--client/src/main/java/com/vaadin/client/ui/calendar/schedule/WeekLabel.java8
-rw-r--r--client/src/main/java/com/vaadin/client/ui/calendar/schedule/WeeklyLongEvents.java18
-rw-r--r--client/src/main/java/com/vaadin/client/ui/calendar/schedule/WeeklyLongEventsDateCell.java8
-rw-r--r--client/src/main/java/com/vaadin/client/ui/calendar/schedule/dd/CalendarDropHandler.java21
-rw-r--r--client/src/main/java/com/vaadin/client/ui/calendar/schedule/dd/CalendarMonthDropHandler.java22
-rw-r--r--client/src/main/java/com/vaadin/client/ui/calendar/schedule/dd/CalendarWeekDropHandler.java25
-rw-r--r--client/src/main/java/com/vaadin/client/ui/checkbox/CheckBoxConnector.java18
-rw-r--r--client/src/main/java/com/vaadin/client/ui/colorpicker/AbstractColorPickerConnector.java25
-rw-r--r--client/src/main/java/com/vaadin/client/ui/colorpicker/ColorPickerAreaConnector.java12
-rw-r--r--client/src/main/java/com/vaadin/client/ui/colorpicker/ColorPickerConnector.java12
-rw-r--r--client/src/main/java/com/vaadin/client/ui/colorpicker/ColorPickerGradientConnector.java12
-rw-r--r--client/src/main/java/com/vaadin/client/ui/colorpicker/ColorPickerGridConnector.java12
-rw-r--r--client/src/main/java/com/vaadin/client/ui/colorpicker/VColorPickerGradient.java20
-rw-r--r--client/src/main/java/com/vaadin/client/ui/colorpicker/VColorPickerGrid.java20
-rw-r--r--client/src/main/java/com/vaadin/client/ui/combobox/ComboBoxConnector.java31
-rw-r--r--client/src/main/java/com/vaadin/client/ui/csslayout/CssLayoutConnector.java33
-rw-r--r--client/src/main/java/com/vaadin/client/ui/customcomponent/CustomComponentConnector.java9
-rw-r--r--client/src/main/java/com/vaadin/client/ui/customfield/CustomFieldConnector.java25
-rw-r--r--client/src/main/java/com/vaadin/client/ui/customlayout/CustomLayoutConnector.java35
-rw-r--r--client/src/main/java/com/vaadin/client/ui/datefield/AbstractDateFieldConnector.java25
-rw-r--r--client/src/main/java/com/vaadin/client/ui/datefield/DateFieldConnector.java61
-rw-r--r--client/src/main/java/com/vaadin/client/ui/datefield/InlineDateFieldConnector.java29
-rw-r--r--client/src/main/java/com/vaadin/client/ui/datefield/TextualDateConnector.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/DDEventHandleStrategy.java57
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/DDUtil.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/DragAndDropHandler.java31
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/DragHandle.java16
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/DragImageModifier.java10
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VAbstractDropHandler.java14
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VAcceptAll.java8
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VAcceptCallback.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VAcceptCriteria.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VAcceptCriterion.java8
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VAcceptCriterionFactory.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VAnd.java8
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VContainsDataFlavor.java8
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VDragAndDropManager.java118
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VDragEvent.java47
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VDragEventServerCallback.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VDragSourceIs.java8
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VDropHandler.java20
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VHasDropHandler.java10
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VHtml5DragEvent.java10
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VHtml5File.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VIsOverId.java8
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VItemIdIs.java8
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VLazyInitItemIdentifiers.java18
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VNot.java10
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VOr.java10
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VOverTreeNode.java12
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VServerAccept.java8
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VSourceIsTarget.java8
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VTargetDetailIs.java12
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VTargetInSubtree.java12
-rw-r--r--client/src/main/java/com/vaadin/client/ui/dd/VTransferable.java14
-rw-r--r--client/src/main/java/com/vaadin/client/ui/draganddropwrapper/DragAndDropWrapperConnector.java33
-rw-r--r--client/src/main/java/com/vaadin/client/ui/embedded/EmbeddedConnector.java28
-rw-r--r--client/src/main/java/com/vaadin/client/ui/flash/FlashConnector.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/form/FormConnector.java10
-rw-r--r--client/src/main/java/com/vaadin/client/ui/formlayout/FormLayoutConnector.java28
-rw-r--r--client/src/main/java/com/vaadin/client/ui/gridlayout/GridLayoutConnector.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/image/ImageConnector.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/label/LabelConnector.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/layout/ComponentConnectorLayoutSlot.java14
-rw-r--r--client/src/main/java/com/vaadin/client/ui/layout/ElementResizeEvent.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/layout/ElementResizeListener.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/layout/LayoutDependencyTree.java121
-rw-r--r--client/src/main/java/com/vaadin/client/ui/layout/Margins.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/layout/MayScrollChildren.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/layout/VLayoutSlot.java16
-rw-r--r--client/src/main/java/com/vaadin/client/ui/link/LinkConnector.java10
-rw-r--r--client/src/main/java/com/vaadin/client/ui/listselect/ListSelectConnector.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/loginform/LoginFormConnector.java40
-rw-r--r--client/src/main/java/com/vaadin/client/ui/loginform/VLoginForm.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/menubar/MenuBar.java67
-rw-r--r--client/src/main/java/com/vaadin/client/ui/menubar/MenuBarConnector.java30
-rw-r--r--client/src/main/java/com/vaadin/client/ui/menubar/MenuItem.java32
-rw-r--r--client/src/main/java/com/vaadin/client/ui/nativebutton/NativeButtonConnector.java10
-rw-r--r--client/src/main/java/com/vaadin/client/ui/nativeselect/NativeSelectConnector.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/optiongroup/OptionGroupBaseConnector.java22
-rw-r--r--client/src/main/java/com/vaadin/client/ui/optiongroup/OptionGroupConnector.java14
-rw-r--r--client/src/main/java/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java94
-rw-r--r--client/src/main/java/com/vaadin/client/ui/orderedlayout/CaptionPosition.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/orderedlayout/HorizontalLayoutConnector.java13
-rw-r--r--client/src/main/java/com/vaadin/client/ui/orderedlayout/Slot.java87
-rw-r--r--client/src/main/java/com/vaadin/client/ui/orderedlayout/VAbstractOrderedLayout.java127
-rw-r--r--client/src/main/java/com/vaadin/client/ui/orderedlayout/VerticalLayoutConnector.java13
-rw-r--r--client/src/main/java/com/vaadin/client/ui/panel/PanelConnector.java21
-rw-r--r--client/src/main/java/com/vaadin/client/ui/passwordfield/PasswordFieldConnector.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/popupview/PopupViewConnector.java14
-rw-r--r--client/src/main/java/com/vaadin/client/ui/popupview/VisibilityChangeEvent.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/popupview/VisibilityChangeHandler.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/progressindicator/ProgressBarConnector.java8
-rw-r--r--client/src/main/java/com/vaadin/client/ui/progressindicator/ProgressIndicatorConnector.java8
-rw-r--r--client/src/main/java/com/vaadin/client/ui/richtextarea/RichTextAreaConnector.java18
-rw-r--r--client/src/main/java/com/vaadin/client/ui/richtextarea/VRichTextToolbar.java32
-rw-r--r--client/src/main/java/com/vaadin/client/ui/slider/SliderConnector.java18
-rw-r--r--client/src/main/java/com/vaadin/client/ui/splitpanel/AbstractSplitPanelConnector.java33
-rw-r--r--client/src/main/java/com/vaadin/client/ui/splitpanel/HorizontalSplitPanelConnector.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/splitpanel/VerticalSplitPanelConnector.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/table/TableConnector.java66
-rw-r--r--client/src/main/java/com/vaadin/client/ui/tabsheet/TabsheetBaseConnector.java18
-rw-r--r--client/src/main/java/com/vaadin/client/ui/tabsheet/TabsheetConnector.java12
-rw-r--r--client/src/main/java/com/vaadin/client/ui/textarea/TextAreaConnector.java7
-rw-r--r--client/src/main/java/com/vaadin/client/ui/textfield/TextFieldConnector.java21
-rw-r--r--client/src/main/java/com/vaadin/client/ui/tree/TreeConnector.java49
-rw-r--r--client/src/main/java/com/vaadin/client/ui/treetable/TreeTableConnector.java28
-rw-r--r--client/src/main/java/com/vaadin/client/ui/twincolselect/TwinColSelectConnector.java10
-rw-r--r--client/src/main/java/com/vaadin/client/ui/ui/UIConnector.java145
-rw-r--r--client/src/main/java/com/vaadin/client/ui/upload/UploadConnector.java22
-rw-r--r--client/src/main/java/com/vaadin/client/ui/upload/UploadIFrameOnloadStrategy.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/upload/UploadIFrameOnloadStrategyIE.java8
-rw-r--r--client/src/main/java/com/vaadin/client/ui/video/VideoConnector.java6
-rw-r--r--client/src/main/java/com/vaadin/client/ui/window/WindowConnector.java62
-rw-r--r--client/src/main/java/com/vaadin/client/ui/window/WindowMoveEvent.java16
-rw-r--r--client/src/main/java/com/vaadin/client/ui/window/WindowMoveHandler.java10
-rw-r--r--client/src/main/java/com/vaadin/client/widget/escalator/Cell.java18
-rw-r--r--client/src/main/java/com/vaadin/client/widget/escalator/ColumnConfiguration.java32
-rw-r--r--client/src/main/java/com/vaadin/client/widget/escalator/EscalatorUpdater.java26
-rw-r--r--client/src/main/java/com/vaadin/client/widget/escalator/FlyweightCell.java22
-rw-r--r--client/src/main/java/com/vaadin/client/widget/escalator/FlyweightRow.java51
-rw-r--r--client/src/main/java/com/vaadin/client/widget/escalator/PositionFunction.java12
-rw-r--r--client/src/main/java/com/vaadin/client/widget/escalator/Row.java12
-rw-r--r--client/src/main/java/com/vaadin/client/widget/escalator/RowContainer.java42
-rw-r--r--client/src/main/java/com/vaadin/client/widget/escalator/RowVisibilityChangeEvent.java24
-rw-r--r--client/src/main/java/com/vaadin/client/widget/escalator/RowVisibilityChangeHandler.java10
-rw-r--r--client/src/main/java/com/vaadin/client/widget/escalator/ScrollbarBundle.java104
-rw-r--r--client/src/main/java/com/vaadin/client/widget/escalator/Spacer.java12
-rw-r--r--client/src/main/java/com/vaadin/client/widget/escalator/SpacerUpdater.java12
-rw-r--r--client/src/main/java/com/vaadin/client/widget/escalator/events/RowHeightChangedHandler.java3
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/AutoScroller.java36
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/CellReference.java28
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/CellStyleGenerator.java10
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/DataAvailableEvent.java10
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/DataAvailableHandler.java10
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/DefaultEditorEventHandler.java44
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/DetailsGenerator.java10
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/EditorHandler.java40
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/EventCellReference.java18
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/HeightAwareDetailsGenerator.java12
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/RendererCellReference.java18
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/RowReference.java20
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/RowStyleGenerator.java10
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/datasources/ListDataSource.java26
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/datasources/ListSorter.java23
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/events/AbstractGridKeyEventHandler.java20
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/events/AbstractGridMouseEventHandler.java16
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/events/BodyClickHandler.java8
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/events/BodyDoubleClickHandler.java8
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/events/BodyKeyDownHandler.java8
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/events/BodyKeyPressHandler.java8
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/events/BodyKeyUpHandler.java8
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/events/ColumnReorderEvent.java8
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/events/ColumnReorderHandler.java10
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/events/ColumnResizeEvent.java8
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/events/ColumnResizeHandler.java10
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/events/ColumnVisibilityChangeEvent.java18
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/events/ColumnVisibilityChangeHandler.java16
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/events/FooterClickHandler.java8
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/events/FooterDoubleClickHandler.java8
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/events/FooterKeyDownHandler.java8
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/events/FooterKeyPressHandler.java8
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/events/FooterKeyUpHandler.java8
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/events/GridClickEvent.java14
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/events/GridDoubleClickEvent.java21
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/events/GridKeyDownEvent.java26
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/events/GridKeyPressEvent.java22
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/events/GridKeyUpEvent.java26
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/events/HeaderClickHandler.java8
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/events/HeaderDoubleClickHandler.java8
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/events/HeaderKeyDownHandler.java8
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/events/HeaderKeyPressHandler.java8
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/events/HeaderKeyUpHandler.java8
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/events/ScrollEvent.java8
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/events/ScrollHandler.java10
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/events/SelectAllEvent.java8
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/events/SelectAllHandler.java10
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/selection/AbstractRowHandleSelectionModel.java16
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/selection/ClickSelectHandler.java12
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/selection/HasSelectionHandlers.java4
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/selection/MultiSelectionRenderer.java53
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/selection/SelectionEvent.java18
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/selection/SelectionHandler.java4
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/selection/SelectionModel.java44
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/selection/SelectionModelMulti.java2
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/selection/SelectionModelNone.java10
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/selection/SelectionModelSingle.java2
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/selection/SpaceSelectHandler.java16
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/sort/Sort.java16
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/sort/SortEvent.java17
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/sort/SortHandler.java4
-rw-r--r--client/src/main/java/com/vaadin/client/widget/grid/sort/SortOrder.java12
-rw-r--r--client/src/main/java/com/vaadin/client/widgets/Escalator.java893
-rw-r--r--client/src/main/java/com/vaadin/client/widgets/Grid.java1118
-rw-r--r--client/src/main/java/com/vaadin/client/widgets/Overlay.java161
-rw-r--r--client/src/test/java/com/vaadin/client/ApplicationConnectionURLGenerationTest.java21
-rwxr-xr-xclient/src/test/java/com/vaadin/client/DateTimeServiceTest.java11
-rw-r--r--client/src/test/java/com/vaadin/client/LocatorUtilTest.java6
-rw-r--r--client/src/test/java/com/vaadin/client/VBrowserDetailsUserAgentParserTest.java7
-rw-r--r--client/src/test/java/com/vaadin/client/communication/ServerMessageHandlerTest.java8
-rw-r--r--client/src/test/java/com/vaadin/client/ui/grid/ListDataSourceTest.java4
-rw-r--r--client/src/test/java/com/vaadin/client/ui/grid/PartitioningTest.java6
-rw-r--r--server/src/main/java/com/vaadin/annotations/AutoGenerated.java10
-rw-r--r--server/src/main/java/com/vaadin/annotations/DesignRoot.java8
-rw-r--r--server/src/main/java/com/vaadin/annotations/JavaScript.java10
-rw-r--r--server/src/main/java/com/vaadin/annotations/PreserveOnRefresh.java8
-rw-r--r--server/src/main/java/com/vaadin/annotations/Push.java14
-rw-r--r--server/src/main/java/com/vaadin/annotations/StyleSheet.java10
-rw-r--r--server/src/main/java/com/vaadin/annotations/Theme.java6
-rw-r--r--server/src/main/java/com/vaadin/annotations/Title.java8
-rw-r--r--server/src/main/java/com/vaadin/annotations/VaadinServletConfiguration.java36
-rw-r--r--server/src/main/java/com/vaadin/annotations/Viewport.java12
-rw-r--r--server/src/main/java/com/vaadin/annotations/ViewportGeneratorClass.java14
-rw-r--r--server/src/main/java/com/vaadin/annotations/Widgetset.java6
-rw-r--r--server/src/main/java/com/vaadin/data/Buffered.java38
-rw-r--r--server/src/main/java/com/vaadin/data/BufferedValidatable.java12
-rw-r--r--server/src/main/java/com/vaadin/data/Collapsible.java16
-rw-r--r--server/src/main/java/com/vaadin/data/Container.java206
-rw-r--r--server/src/main/java/com/vaadin/data/ContainerHelpers.java13
-rw-r--r--server/src/main/java/com/vaadin/data/Item.java32
-rw-r--r--server/src/main/java/com/vaadin/data/Property.java81
-rw-r--r--server/src/main/java/com/vaadin/data/Validatable.java24
-rw-r--r--server/src/main/java/com/vaadin/data/Validator.java28
-rw-r--r--server/src/main/java/com/vaadin/data/fieldgroup/BeanFieldGroup.java25
-rw-r--r--server/src/main/java/com/vaadin/data/fieldgroup/Caption.java6
-rw-r--r--server/src/main/java/com/vaadin/data/fieldgroup/DefaultFieldGroupFieldFactory.java33
-rw-r--r--server/src/main/java/com/vaadin/data/fieldgroup/FieldGroup.java186
-rw-r--r--server/src/main/java/com/vaadin/data/fieldgroup/FieldGroupFieldFactory.java10
-rw-r--r--server/src/main/java/com/vaadin/data/fieldgroup/PropertyId.java12
-rw-r--r--server/src/main/java/com/vaadin/data/sort/Sort.java16
-rw-r--r--server/src/main/java/com/vaadin/data/sort/SortOrder.java8
-rw-r--r--server/src/main/java/com/vaadin/data/util/AbstractBeanContainer.java166
-rw-r--r--server/src/main/java/com/vaadin/data/util/AbstractContainer.java48
-rw-r--r--server/src/main/java/com/vaadin/data/util/AbstractInMemoryContainer.java162
-rw-r--r--server/src/main/java/com/vaadin/data/util/AbstractProperty.java33
-rw-r--r--server/src/main/java/com/vaadin/data/util/BeanContainer.java40
-rw-r--r--server/src/main/java/com/vaadin/data/util/BeanItem.java50
-rw-r--r--server/src/main/java/com/vaadin/data/util/BeanItemContainer.java64
-rw-r--r--server/src/main/java/com/vaadin/data/util/BeanUtil.java34
-rw-r--r--server/src/main/java/com/vaadin/data/util/ContainerHierarchicalWrapper.java62
-rw-r--r--server/src/main/java/com/vaadin/data/util/ContainerOrderedWrapper.java51
-rw-r--r--server/src/main/java/com/vaadin/data/util/DefaultItemSorter.java33
-rw-r--r--server/src/main/java/com/vaadin/data/util/FilesystemContainer.java86
-rw-r--r--server/src/main/java/com/vaadin/data/util/GeneratedPropertyContainer.java71
-rw-r--r--server/src/main/java/com/vaadin/data/util/HierarchicalContainer.java65
-rw-r--r--server/src/main/java/com/vaadin/data/util/HierarchicalContainerOrderedWrapper.java12
-rw-r--r--server/src/main/java/com/vaadin/data/util/IndexedContainer.java220
-rw-r--r--server/src/main/java/com/vaadin/data/util/ItemSorter.java13
-rw-r--r--server/src/main/java/com/vaadin/data/util/LegacyPropertyHelper.java12
-rw-r--r--server/src/main/java/com/vaadin/data/util/ListSet.java12
-rw-r--r--server/src/main/java/com/vaadin/data/util/MethodProperty.java116
-rw-r--r--server/src/main/java/com/vaadin/data/util/MethodPropertyDescriptor.java23
-rw-r--r--server/src/main/java/com/vaadin/data/util/NestedMethodProperty.java45
-rw-r--r--server/src/main/java/com/vaadin/data/util/NestedPropertyDescriptor.java18
-rw-r--r--server/src/main/java/com/vaadin/data/util/ObjectProperty.java30
-rw-r--r--server/src/main/java/com/vaadin/data/util/PropertyFormatter.java40
-rw-r--r--server/src/main/java/com/vaadin/data/util/PropertyValueGenerator.java25
-rw-r--r--server/src/main/java/com/vaadin/data/util/PropertysetItem.java64
-rw-r--r--server/src/main/java/com/vaadin/data/util/TextFileProperty.java33
-rw-r--r--server/src/main/java/com/vaadin/data/util/TransactionalPropertyWrapper.java18
-rw-r--r--server/src/main/java/com/vaadin/data/util/VaadinPropertyDescriptor.java18
-rw-r--r--server/src/main/java/com/vaadin/data/util/converter/AbstractStringToNumberConverter.java20
-rw-r--r--server/src/main/java/com/vaadin/data/util/converter/Converter.java28
-rw-r--r--server/src/main/java/com/vaadin/data/util/converter/ConverterFactory.java10
-rw-r--r--server/src/main/java/com/vaadin/data/util/converter/ConverterUtil.java28
-rw-r--r--server/src/main/java/com/vaadin/data/util/converter/DateToLongConverter.java22
-rw-r--r--server/src/main/java/com/vaadin/data/util/converter/DateToSqlDateConverter.java22
-rw-r--r--server/src/main/java/com/vaadin/data/util/converter/DefaultConverterFactory.java17
-rw-r--r--server/src/main/java/com/vaadin/data/util/converter/ReverseConverter.java24
-rw-r--r--server/src/main/java/com/vaadin/data/util/converter/StringToBigDecimalConverter.java12
-rw-r--r--server/src/main/java/com/vaadin/data/util/converter/StringToBigIntegerConverter.java12
-rw-r--r--server/src/main/java/com/vaadin/data/util/converter/StringToBooleanConverter.java49
-rw-r--r--server/src/main/java/com/vaadin/data/util/converter/StringToByteConverter.java18
-rw-r--r--server/src/main/java/com/vaadin/data/util/converter/StringToCollectionConverter.java31
-rw-r--r--server/src/main/java/com/vaadin/data/util/converter/StringToDateConverter.java24
-rw-r--r--server/src/main/java/com/vaadin/data/util/converter/StringToDoubleConverter.java16
-rw-r--r--server/src/main/java/com/vaadin/data/util/converter/StringToEnumConverter.java20
-rw-r--r--server/src/main/java/com/vaadin/data/util/converter/StringToFloatConverter.java21
-rw-r--r--server/src/main/java/com/vaadin/data/util/converter/StringToIntegerConverter.java18
-rw-r--r--server/src/main/java/com/vaadin/data/util/converter/StringToLongConverter.java18
-rw-r--r--server/src/main/java/com/vaadin/data/util/converter/StringToShortConverter.java23
-rw-r--r--server/src/main/java/com/vaadin/data/util/filter/AbstractJunctionFilter.java18
-rw-r--r--server/src/main/java/com/vaadin/data/util/filter/And.java16
-rw-r--r--server/src/main/java/com/vaadin/data/util/filter/Between.java6
-rw-r--r--server/src/main/java/com/vaadin/data/util/filter/Compare.java77
-rw-r--r--server/src/main/java/com/vaadin/data/util/filter/IsNull.java21
-rw-r--r--server/src/main/java/com/vaadin/data/util/filter/Like.java15
-rw-r--r--server/src/main/java/com/vaadin/data/util/filter/Not.java16
-rw-r--r--server/src/main/java/com/vaadin/data/util/filter/Or.java18
-rw-r--r--server/src/main/java/com/vaadin/data/util/filter/SimpleStringFilter.java32
-rw-r--r--server/src/main/java/com/vaadin/data/util/filter/UnsupportedFilterException.java14
-rw-r--r--server/src/main/java/com/vaadin/data/util/sqlcontainer/CacheFlushNotifier.java17
-rw-r--r--server/src/main/java/com/vaadin/data/util/sqlcontainer/CacheMap.java6
-rw-r--r--server/src/main/java/com/vaadin/data/util/sqlcontainer/ColumnProperty.java36
-rw-r--r--server/src/main/java/com/vaadin/data/util/sqlcontainer/OptimisticLockException.java12
-rw-r--r--server/src/main/java/com/vaadin/data/util/sqlcontainer/ReadOnlyRowId.java6
-rw-r--r--server/src/main/java/com/vaadin/data/util/sqlcontainer/Reference.java6
-rw-r--r--server/src/main/java/com/vaadin/data/util/sqlcontainer/RowId.java11
-rw-r--r--server/src/main/java/com/vaadin/data/util/sqlcontainer/RowItem.java8
-rw-r--r--server/src/main/java/com/vaadin/data/util/sqlcontainer/SQLContainer.java195
-rw-r--r--server/src/main/java/com/vaadin/data/util/sqlcontainer/SQLUtil.java21
-rw-r--r--server/src/main/java/com/vaadin/data/util/sqlcontainer/TemporaryRowId.java6
-rw-r--r--server/src/main/java/com/vaadin/data/util/sqlcontainer/connection/J2EEConnectionPool.java10
-rw-r--r--server/src/main/java/com/vaadin/data/util/sqlcontainer/connection/JDBCConnectionPool.java14
-rw-r--r--server/src/main/java/com/vaadin/data/util/sqlcontainer/connection/SimpleJDBCConnectionPool.java9
-rw-r--r--server/src/main/java/com/vaadin/data/util/sqlcontainer/query/AbstractTransactionalQuery.java30
-rw-r--r--server/src/main/java/com/vaadin/data/util/sqlcontainer/query/FreeformQuery.java62
-rw-r--r--server/src/main/java/com/vaadin/data/util/sqlcontainer/query/FreeformQueryDelegate.java20
-rw-r--r--server/src/main/java/com/vaadin/data/util/sqlcontainer/query/FreeformStatementDelegate.java12
-rw-r--r--server/src/main/java/com/vaadin/data/util/sqlcontainer/query/OrderBy.java8
-rw-r--r--server/src/main/java/com/vaadin/data/util/sqlcontainer/query/QueryDelegate.java52
-rw-r--r--server/src/main/java/com/vaadin/data/util/sqlcontainer/query/TableQuery.java119
-rw-r--r--server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/DefaultSQLGenerator.java70
-rw-r--r--server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/MSSQLGenerator.java16
-rw-r--r--server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/OracleGenerator.java25
-rw-r--r--server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/SQLGenerator.java16
-rw-r--r--server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/StatementHelper.java44
-rw-r--r--server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/AndTranslator.java10
-rw-r--r--server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/BetweenTranslator.java6
-rw-r--r--server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/CompareTranslator.java6
-rw-r--r--server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/FilterTranslator.java6
-rw-r--r--server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/IsNullTranslator.java6
-rw-r--r--server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/LikeTranslator.java6
-rw-r--r--server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/NotTranslator.java6
-rw-r--r--server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/OrTranslator.java10
-rw-r--r--server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/QueryBuilder.java10
-rw-r--r--server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/SimpleStringTranslator.java6
-rw-r--r--server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/StringDecorator.java16
-rw-r--r--server/src/main/java/com/vaadin/data/validator/AbstractStringValidator.java17
-rw-r--r--server/src/main/java/com/vaadin/data/validator/AbstractValidator.java22
-rw-r--r--server/src/main/java/com/vaadin/data/validator/BeanValidator.java39
-rw-r--r--server/src/main/java/com/vaadin/data/validator/BigDecimalRangeValidator.java14
-rw-r--r--server/src/main/java/com/vaadin/data/validator/BigIntegerRangeValidator.java14
-rw-r--r--server/src/main/java/com/vaadin/data/validator/ByteRangeValidator.java17
-rw-r--r--server/src/main/java/com/vaadin/data/validator/CompositeValidator.java32
-rw-r--r--server/src/main/java/com/vaadin/data/validator/DateRangeValidator.java16
-rw-r--r--server/src/main/java/com/vaadin/data/validator/DoubleRangeValidator.java14
-rw-r--r--server/src/main/java/com/vaadin/data/validator/DoubleValidator.java10
-rw-r--r--server/src/main/java/com/vaadin/data/validator/EmailValidator.java17
-rw-r--r--server/src/main/java/com/vaadin/data/validator/FloatRangeValidator.java14
-rw-r--r--server/src/main/java/com/vaadin/data/validator/IntegerRangeValidator.java14
-rw-r--r--server/src/main/java/com/vaadin/data/validator/IntegerValidator.java10
-rw-r--r--server/src/main/java/com/vaadin/data/validator/LongRangeValidator.java17
-rw-r--r--server/src/main/java/com/vaadin/data/validator/NullValidator.java18
-rw-r--r--server/src/main/java/com/vaadin/data/validator/RangeValidator.java32
-rw-r--r--server/src/main/java/com/vaadin/data/validator/RegexpValidator.java21
-rw-r--r--server/src/main/java/com/vaadin/data/validator/ShortRangeValidator.java14
-rw-r--r--server/src/main/java/com/vaadin/data/validator/StringLengthValidator.java24
-rw-r--r--server/src/main/java/com/vaadin/event/Action.java36
-rw-r--r--server/src/main/java/com/vaadin/event/ActionManager.java20
-rw-r--r--server/src/main/java/com/vaadin/event/ConnectorActionManager.java19
-rw-r--r--server/src/main/java/com/vaadin/event/ConnectorEvent.java6
-rw-r--r--server/src/main/java/com/vaadin/event/ConnectorEventListener.java6
-rw-r--r--server/src/main/java/com/vaadin/event/ContextClickEvent.java20
-rw-r--r--server/src/main/java/com/vaadin/event/DataBoundTransferable.java22
-rw-r--r--server/src/main/java/com/vaadin/event/EventRouter.java22
-rw-r--r--server/src/main/java/com/vaadin/event/FieldEvents.java48
-rw-r--r--server/src/main/java/com/vaadin/event/ItemClickEvent.java24
-rw-r--r--server/src/main/java/com/vaadin/event/LayoutEvents.java30
-rw-r--r--server/src/main/java/com/vaadin/event/ListenerMethod.java151
-rw-r--r--server/src/main/java/com/vaadin/event/MethodEventSource.java40
-rw-r--r--server/src/main/java/com/vaadin/event/MouseEvents.java51
-rw-r--r--server/src/main/java/com/vaadin/event/SelectionEvent.java24
-rw-r--r--server/src/main/java/com/vaadin/event/ShortcutAction.java56
-rw-r--r--server/src/main/java/com/vaadin/event/ShortcutListener.java10
-rw-r--r--server/src/main/java/com/vaadin/event/SortEvent.java22
-rw-r--r--server/src/main/java/com/vaadin/event/Transferable.java12
-rw-r--r--server/src/main/java/com/vaadin/event/TransferableImpl.java8
-rw-r--r--server/src/main/java/com/vaadin/event/UIEvents.java26
-rw-r--r--server/src/main/java/com/vaadin/event/dd/DragAndDropEvent.java10
-rw-r--r--server/src/main/java/com/vaadin/event/dd/DragSource.java14
-rw-r--r--server/src/main/java/com/vaadin/event/dd/DropHandler.java14
-rw-r--r--server/src/main/java/com/vaadin/event/dd/DropTarget.java12
-rw-r--r--server/src/main/java/com/vaadin/event/dd/TargetDetails.java12
-rw-r--r--server/src/main/java/com/vaadin/event/dd/TargetDetailsImpl.java10
-rw-r--r--server/src/main/java/com/vaadin/event/dd/acceptcriteria/AcceptAll.java14
-rw-r--r--server/src/main/java/com/vaadin/event/dd/acceptcriteria/AcceptCriterion.java24
-rw-r--r--server/src/main/java/com/vaadin/event/dd/acceptcriteria/And.java16
-rw-r--r--server/src/main/java/com/vaadin/event/dd/acceptcriteria/ClientSideCriterion.java18
-rw-r--r--server/src/main/java/com/vaadin/event/dd/acceptcriteria/ContainsDataFlavor.java12
-rw-r--r--server/src/main/java/com/vaadin/event/dd/acceptcriteria/Not.java12
-rw-r--r--server/src/main/java/com/vaadin/event/dd/acceptcriteria/Or.java14
-rw-r--r--server/src/main/java/com/vaadin/event/dd/acceptcriteria/ServerSideCriterion.java14
-rw-r--r--server/src/main/java/com/vaadin/event/dd/acceptcriteria/SourceIs.java19
-rw-r--r--server/src/main/java/com/vaadin/event/dd/acceptcriteria/SourceIsTarget.java14
-rw-r--r--server/src/main/java/com/vaadin/event/dd/acceptcriteria/TargetDetailIs.java16
-rw-r--r--server/src/main/java/com/vaadin/navigator/NavigationStateManager.java12
-rw-r--r--server/src/main/java/com/vaadin/navigator/Navigator.java131
-rw-r--r--server/src/main/java/com/vaadin/navigator/View.java16
-rw-r--r--server/src/main/java/com/vaadin/navigator/ViewChangeListener.java26
-rw-r--r--server/src/main/java/com/vaadin/navigator/ViewDisplay.java14
-rw-r--r--server/src/main/java/com/vaadin/navigator/ViewProvider.java16
-rw-r--r--server/src/main/java/com/vaadin/server/AbstractClientConnector.java165
-rw-r--r--server/src/main/java/com/vaadin/server/AbstractDeploymentConfiguration.java14
-rw-r--r--server/src/main/java/com/vaadin/server/AbstractErrorMessage.java12
-rw-r--r--server/src/main/java/com/vaadin/server/AbstractExtension.java18
-rw-r--r--server/src/main/java/com/vaadin/server/AbstractJavaScriptExtension.java32
-rw-r--r--server/src/main/java/com/vaadin/server/BootstrapFragmentResponse.java14
-rw-r--r--server/src/main/java/com/vaadin/server/BootstrapHandler.java77
-rw-r--r--server/src/main/java/com/vaadin/server/BootstrapListener.java12
-rw-r--r--server/src/main/java/com/vaadin/server/BootstrapPageResponse.java22
-rw-r--r--server/src/main/java/com/vaadin/server/BootstrapResponse.java20
-rw-r--r--server/src/main/java/com/vaadin/server/BrowserWindowOpener.java69
-rw-r--r--server/src/main/java/com/vaadin/server/ClassResource.java42
-rw-r--r--server/src/main/java/com/vaadin/server/ClientConnector.java76
-rw-r--r--server/src/main/java/com/vaadin/server/ClientMethodInvocation.java16
-rw-r--r--server/src/main/java/com/vaadin/server/ComponentSizeValidator.java48
-rw-r--r--server/src/main/java/com/vaadin/server/CompositeErrorMessage.java18
-rw-r--r--server/src/main/java/com/vaadin/server/ConnectorResource.java14
-rw-r--r--server/src/main/java/com/vaadin/server/ConnectorResourceHandler.java27
-rw-r--r--server/src/main/java/com/vaadin/server/Constants.java29
-rw-r--r--server/src/main/java/com/vaadin/server/CustomizedSystemMessages.java56
-rw-r--r--server/src/main/java/com/vaadin/server/DefaultDeploymentConfiguration.java57
-rw-r--r--server/src/main/java/com/vaadin/server/DefaultErrorHandler.java21
-rw-r--r--server/src/main/java/com/vaadin/server/DefaultSystemMessagesProvider.java10
-rw-r--r--server/src/main/java/com/vaadin/server/DefaultUIProvider.java11
-rw-r--r--server/src/main/java/com/vaadin/server/DeploymentConfiguration.java54
-rw-r--r--server/src/main/java/com/vaadin/server/DownloadStream.java53
-rw-r--r--server/src/main/java/com/vaadin/server/DragAndDropService.java39
-rw-r--r--server/src/main/java/com/vaadin/server/EncodeResult.java6
-rw-r--r--server/src/main/java/com/vaadin/server/ErrorEvent.java16
-rw-r--r--server/src/main/java/com/vaadin/server/ErrorHandler.java8
-rw-r--r--server/src/main/java/com/vaadin/server/ErrorHandlingRunnable.java10
-rw-r--r--server/src/main/java/com/vaadin/server/ErrorMessage.java20
-rw-r--r--server/src/main/java/com/vaadin/server/Extension.java12
-rw-r--r--server/src/main/java/com/vaadin/server/ExternalResource.java20
-rw-r--r--server/src/main/java/com/vaadin/server/FileDownloader.java25
-rw-r--r--server/src/main/java/com/vaadin/server/FileResource.java33
-rw-r--r--server/src/main/java/com/vaadin/server/FontAwesome.java18
-rw-r--r--server/src/main/java/com/vaadin/server/FontIcon.java16
-rw-r--r--server/src/main/java/com/vaadin/server/GAEVaadinServlet.java129
-rw-r--r--server/src/main/java/com/vaadin/server/GenericFontIcon.java24
-rw-r--r--server/src/main/java/com/vaadin/server/GlobalResourceHandler.java39
-rw-r--r--server/src/main/java/com/vaadin/server/JavaScriptCallbackHelper.java19
-rw-r--r--server/src/main/java/com/vaadin/server/JsonCodec.java51
-rw-r--r--server/src/main/java/com/vaadin/server/JsonPaintTarget.java98
-rw-r--r--server/src/main/java/com/vaadin/server/KeyMapper.java18
-rw-r--r--server/src/main/java/com/vaadin/server/LegacyApplication.java38
-rw-r--r--server/src/main/java/com/vaadin/server/LegacyApplicationUIProvider.java16
-rw-r--r--server/src/main/java/com/vaadin/server/LegacyCommunicationManager.java61
-rw-r--r--server/src/main/java/com/vaadin/server/LegacyPaint.java16
-rw-r--r--server/src/main/java/com/vaadin/server/LegacyVaadinPortlet.java6
-rw-r--r--server/src/main/java/com/vaadin/server/LegacyVaadinServlet.java6
-rw-r--r--server/src/main/java/com/vaadin/server/LocaleService.java31
-rw-r--r--server/src/main/java/com/vaadin/server/NoInputStreamException.java6
-rw-r--r--server/src/main/java/com/vaadin/server/NoOutputStreamException.java6
-rw-r--r--server/src/main/java/com/vaadin/server/Page.java156
-rw-r--r--server/src/main/java/com/vaadin/server/PaintException.java14
-rw-r--r--server/src/main/java/com/vaadin/server/PaintTarget.java108
-rw-r--r--server/src/main/java/com/vaadin/server/RequestHandler.java8
-rw-r--r--server/src/main/java/com/vaadin/server/Resource.java10
-rw-r--r--server/src/main/java/com/vaadin/server/ResourceReference.java10
-rw-r--r--server/src/main/java/com/vaadin/server/Responsive.java34
-rw-r--r--server/src/main/java/com/vaadin/server/RestrictedRenderResponse.java11
-rw-r--r--server/src/main/java/com/vaadin/server/Scrollable.java26
-rw-r--r--server/src/main/java/com/vaadin/server/ServerRpcManager.java47
-rw-r--r--server/src/main/java/com/vaadin/server/ServerRpcMethodInvocation.java10
-rw-r--r--server/src/main/java/com/vaadin/server/ServiceDestroyEvent.java12
-rw-r--r--server/src/main/java/com/vaadin/server/ServiceDestroyListener.java12
-rw-r--r--server/src/main/java/com/vaadin/server/ServiceException.java6
-rw-r--r--server/src/main/java/com/vaadin/server/ServletPortletHelper.java56
-rw-r--r--server/src/main/java/com/vaadin/server/SessionDestroyEvent.java16
-rw-r--r--server/src/main/java/com/vaadin/server/SessionDestroyListener.java12
-rw-r--r--server/src/main/java/com/vaadin/server/SessionExpiredException.java6
-rw-r--r--server/src/main/java/com/vaadin/server/SessionExpiredHandler.java10
-rw-r--r--server/src/main/java/com/vaadin/server/SessionInitEvent.java18
-rw-r--r--server/src/main/java/com/vaadin/server/SessionInitListener.java12
-rw-r--r--server/src/main/java/com/vaadin/server/SizeWithUnit.java18
-rw-r--r--server/src/main/java/com/vaadin/server/Sizeable.java48
-rw-r--r--server/src/main/java/com/vaadin/server/StreamResource.java36
-rw-r--r--server/src/main/java/com/vaadin/server/StreamVariable.java14
-rw-r--r--server/src/main/java/com/vaadin/server/SynchronizedRequestHandler.java14
-rw-r--r--server/src/main/java/com/vaadin/server/SystemError.java18
-rw-r--r--server/src/main/java/com/vaadin/server/SystemMessageException.java12
-rw-r--r--server/src/main/java/com/vaadin/server/SystemMessages.java55
-rw-r--r--server/src/main/java/com/vaadin/server/SystemMessagesInfo.java12
-rw-r--r--server/src/main/java/com/vaadin/server/SystemMessagesProvider.java10
-rw-r--r--server/src/main/java/com/vaadin/server/ThemeResource.java14
-rw-r--r--server/src/main/java/com/vaadin/server/UIClassSelectionEvent.java10
-rw-r--r--server/src/main/java/com/vaadin/server/UICreateEvent.java16
-rw-r--r--server/src/main/java/com/vaadin/server/UIProvider.java17
-rw-r--r--server/src/main/java/com/vaadin/server/UIProviderEvent.java16
-rw-r--r--server/src/main/java/com/vaadin/server/UnsupportedBrowserHandler.java57
-rw-r--r--server/src/main/java/com/vaadin/server/UploadException.java6
-rw-r--r--server/src/main/java/com/vaadin/server/UserError.java12
-rw-r--r--server/src/main/java/com/vaadin/server/VaadinPortlet.java95
-rw-r--r--server/src/main/java/com/vaadin/server/VaadinPortletRequest.java28
-rw-r--r--server/src/main/java/com/vaadin/server/VaadinPortletResponse.java17
-rw-r--r--server/src/main/java/com/vaadin/server/VaadinPortletService.java51
-rw-r--r--server/src/main/java/com/vaadin/server/VaadinPortletSession.java62
-rw-r--r--server/src/main/java/com/vaadin/server/VaadinRequest.java140
-rw-r--r--server/src/main/java/com/vaadin/server/VaadinResponse.java46
-rw-r--r--server/src/main/java/com/vaadin/server/VaadinService.java106
-rw-r--r--server/src/main/java/com/vaadin/server/VaadinServiceClassLoaderUtil.java18
-rw-r--r--server/src/main/java/com/vaadin/server/VaadinServlet.java241
-rw-r--r--server/src/main/java/com/vaadin/server/VaadinServletRequest.java18
-rw-r--r--server/src/main/java/com/vaadin/server/VaadinServletResponse.java26
-rw-r--r--server/src/main/java/com/vaadin/server/VaadinServletService.java40
-rw-r--r--server/src/main/java/com/vaadin/server/VaadinSession.java50
-rw-r--r--server/src/main/java/com/vaadin/server/VariableOwner.java16
-rw-r--r--server/src/main/java/com/vaadin/server/ViewportGenerator.java14
-rw-r--r--server/src/main/java/com/vaadin/server/WebBrowser.java79
-rw-r--r--server/src/main/java/com/vaadin/server/WidgetsetInfoImpl.java4
-rw-r--r--server/src/main/java/com/vaadin/server/WrappedHttpSession.java12
-rw-r--r--server/src/main/java/com/vaadin/server/WrappedPortletSession.java34
-rw-r--r--server/src/main/java/com/vaadin/server/WrappedSession.java48
-rw-r--r--server/src/main/java/com/vaadin/server/communication/AbstractStreamingEvent.java6
-rw-r--r--server/src/main/java/com/vaadin/server/communication/AtmospherePushConnection.java50
-rw-r--r--server/src/main/java/com/vaadin/server/communication/ClientRpcWriter.java39
-rw-r--r--server/src/main/java/com/vaadin/server/communication/ConnectorHierarchyWriter.java18
-rw-r--r--server/src/main/java/com/vaadin/server/communication/ConnectorTypeWriter.java13
-rw-r--r--server/src/main/java/com/vaadin/server/communication/DateSerializer.java8
-rw-r--r--server/src/main/java/com/vaadin/server/communication/FileUploadHandler.java58
-rw-r--r--server/src/main/java/com/vaadin/server/communication/HeartbeatHandler.java17
-rw-r--r--server/src/main/java/com/vaadin/server/communication/JSONSerializer.java10
-rw-r--r--server/src/main/java/com/vaadin/server/communication/JSR356WebsocketInitializer.java36
-rw-r--r--server/src/main/java/com/vaadin/server/communication/LegacyUidlWriter.java6
-rw-r--r--server/src/main/java/com/vaadin/server/communication/MetadataWriter.java16
-rw-r--r--server/src/main/java/com/vaadin/server/communication/PortletBootstrapHandler.java9
-rw-r--r--server/src/main/java/com/vaadin/server/communication/PortletDummyRequestHandler.java12
-rw-r--r--server/src/main/java/com/vaadin/server/communication/PortletListenerNotifier.java8
-rw-r--r--server/src/main/java/com/vaadin/server/communication/PortletStateAwareRequestHandler.java10
-rw-r--r--server/src/main/java/com/vaadin/server/communication/PortletUIInitHandler.java12
-rw-r--r--server/src/main/java/com/vaadin/server/communication/PublishedFileHandler.java26
-rw-r--r--server/src/main/java/com/vaadin/server/communication/PushAtmosphereHandler.java19
-rw-r--r--server/src/main/java/com/vaadin/server/communication/PushConnection.java8
-rw-r--r--server/src/main/java/com/vaadin/server/communication/PushHandler.java107
-rw-r--r--server/src/main/java/com/vaadin/server/communication/PushRequestHandler.java40
-rw-r--r--server/src/main/java/com/vaadin/server/communication/ResourceWriter.java18
-rw-r--r--server/src/main/java/com/vaadin/server/communication/ServerRpcHandler.java66
-rw-r--r--server/src/main/java/com/vaadin/server/communication/ServletBootstrapHandler.java10
-rw-r--r--server/src/main/java/com/vaadin/server/communication/ServletUIInitHandler.java11
-rw-r--r--server/src/main/java/com/vaadin/server/communication/SessionRequestHandler.java10
-rw-r--r--server/src/main/java/com/vaadin/server/communication/SharedStateWriter.java13
-rw-r--r--server/src/main/java/com/vaadin/server/communication/StreamingEndEventImpl.java13
-rw-r--r--server/src/main/java/com/vaadin/server/communication/StreamingErrorEventImpl.java10
-rw-r--r--server/src/main/java/com/vaadin/server/communication/StreamingProgressEventImpl.java10
-rw-r--r--server/src/main/java/com/vaadin/server/communication/StreamingStartEventImpl.java10
-rw-r--r--server/src/main/java/com/vaadin/server/communication/UIInitHandler.java43
-rw-r--r--server/src/main/java/com/vaadin/server/communication/UidlRequestHandler.java26
-rw-r--r--server/src/main/java/com/vaadin/server/communication/UidlWriter.java55
-rw-r--r--server/src/main/java/com/vaadin/server/communication/data/DataGenerator.java12
-rw-r--r--server/src/main/java/com/vaadin/server/communication/data/RpcDataProviderExtension.java55
-rw-r--r--server/src/main/java/com/vaadin/server/themeutils/SASSAddonImportFileCreator.java25
-rw-r--r--server/src/main/java/com/vaadin/server/widgetsetutils/ClassPathExplorer.java88
-rw-r--r--server/src/main/java/com/vaadin/server/widgetsetutils/WidgetSetBuilder.java59
-rw-r--r--server/src/main/java/com/vaadin/ui/AbsoluteLayout.java127
-rw-r--r--server/src/main/java/com/vaadin/ui/AbstractColorPicker.java77
-rw-r--r--server/src/main/java/com/vaadin/ui/AbstractComponent.java184
-rw-r--r--server/src/main/java/com/vaadin/ui/AbstractComponentContainer.java64
-rw-r--r--server/src/main/java/com/vaadin/ui/AbstractEmbedded.java19
-rw-r--r--server/src/main/java/com/vaadin/ui/AbstractField.java257
-rw-r--r--server/src/main/java/com/vaadin/ui/AbstractFocusable.java12
-rw-r--r--server/src/main/java/com/vaadin/ui/AbstractJavaScriptComponent.java26
-rw-r--r--server/src/main/java/com/vaadin/ui/AbstractLayout.java32
-rw-r--r--server/src/main/java/com/vaadin/ui/AbstractMedia.java40
-rw-r--r--server/src/main/java/com/vaadin/ui/AbstractOrderedLayout.java72
-rw-r--r--server/src/main/java/com/vaadin/ui/AbstractSelect.java306
-rw-r--r--server/src/main/java/com/vaadin/ui/AbstractSingleComponentContainer.java61
-rw-r--r--server/src/main/java/com/vaadin/ui/AbstractSplitPanel.java108
-rw-r--r--server/src/main/java/com/vaadin/ui/AbstractTextField.java99
-rw-r--r--server/src/main/java/com/vaadin/ui/Accordion.java16
-rw-r--r--server/src/main/java/com/vaadin/ui/Alignment.java42
-rw-r--r--server/src/main/java/com/vaadin/ui/Audio.java16
-rw-r--r--server/src/main/java/com/vaadin/ui/BrowserFrame.java15
-rw-r--r--server/src/main/java/com/vaadin/ui/Button.java102
-rw-r--r--server/src/main/java/com/vaadin/ui/Calendar.java283
-rw-r--r--server/src/main/java/com/vaadin/ui/CheckBox.java34
-rw-r--r--server/src/main/java/com/vaadin/ui/ColorPicker.java16
-rw-r--r--server/src/main/java/com/vaadin/ui/ColorPickerArea.java16
-rw-r--r--server/src/main/java/com/vaadin/ui/ComboBox.java102
-rw-r--r--server/src/main/java/com/vaadin/ui/Component.java328
-rw-r--r--server/src/main/java/com/vaadin/ui/ComponentContainer.java33
-rw-r--r--server/src/main/java/com/vaadin/ui/ConnectorTracker.java104
-rw-r--r--server/src/main/java/com/vaadin/ui/CssLayout.java52
-rw-r--r--server/src/main/java/com/vaadin/ui/CustomComponent.java31
-rw-r--r--server/src/main/java/com/vaadin/ui/CustomField.java34
-rw-r--r--server/src/main/java/com/vaadin/ui/CustomLayout.java46
-rw-r--r--server/src/main/java/com/vaadin/ui/DateField.java148
-rw-r--r--server/src/main/java/com/vaadin/ui/DefaultFieldFactory.java19
-rw-r--r--server/src/main/java/com/vaadin/ui/DragAndDropWrapper.java47
-rw-r--r--server/src/main/java/com/vaadin/ui/Embedded.java68
-rw-r--r--server/src/main/java/com/vaadin/ui/Field.java10
-rw-r--r--server/src/main/java/com/vaadin/ui/Flash.java55
-rw-r--r--server/src/main/java/com/vaadin/ui/Form.java197
-rw-r--r--server/src/main/java/com/vaadin/ui/FormFieldFactory.java12
-rw-r--r--server/src/main/java/com/vaadin/ui/FormLayout.java16
-rw-r--r--server/src/main/java/com/vaadin/ui/Grid.java1049
-rw-r--r--server/src/main/java/com/vaadin/ui/GridLayout.java208
-rw-r--r--server/src/main/java/com/vaadin/ui/HasChildMeasurementHint.java12
-rw-r--r--server/src/main/java/com/vaadin/ui/HasComponents.java44
-rw-r--r--server/src/main/java/com/vaadin/ui/HorizontalLayout.java14
-rw-r--r--server/src/main/java/com/vaadin/ui/HorizontalSplitPanel.java16
-rw-r--r--server/src/main/java/com/vaadin/ui/Html5File.java8
-rw-r--r--server/src/main/java/com/vaadin/ui/Image.java21
-rw-r--r--server/src/main/java/com/vaadin/ui/InlineDateField.java13
-rw-r--r--server/src/main/java/com/vaadin/ui/JavaScript.java28
-rw-r--r--server/src/main/java/com/vaadin/ui/JavaScriptFunction.java12
-rw-r--r--server/src/main/java/com/vaadin/ui/Label.java101
-rw-r--r--server/src/main/java/com/vaadin/ui/Layout.java38
-rw-r--r--server/src/main/java/com/vaadin/ui/LegacyComponent.java20
-rw-r--r--server/src/main/java/com/vaadin/ui/LegacyWindow.java67
-rw-r--r--server/src/main/java/com/vaadin/ui/Link.java36
-rw-r--r--server/src/main/java/com/vaadin/ui/ListSelect.java12
-rw-r--r--server/src/main/java/com/vaadin/ui/LoadingIndicatorConfiguration.java36
-rw-r--r--server/src/main/java/com/vaadin/ui/LoginForm.java50
-rw-r--r--server/src/main/java/com/vaadin/ui/MenuBar.java142
-rw-r--r--server/src/main/java/com/vaadin/ui/NativeButton.java6
-rw-r--r--server/src/main/java/com/vaadin/ui/NativeSelect.java20
-rw-r--r--server/src/main/java/com/vaadin/ui/Notification.java80
-rw-r--r--server/src/main/java/com/vaadin/ui/NotificationConfiguration.java16
-rw-r--r--server/src/main/java/com/vaadin/ui/OptionGroup.java26
-rw-r--r--server/src/main/java/com/vaadin/ui/Panel.java42
-rw-r--r--server/src/main/java/com/vaadin/ui/PasswordField.java18
-rw-r--r--server/src/main/java/com/vaadin/ui/PopupDateField.java26
-rw-r--r--server/src/main/java/com/vaadin/ui/PopupView.java67
-rw-r--r--server/src/main/java/com/vaadin/ui/ProgressBar.java31
-rw-r--r--server/src/main/java/com/vaadin/ui/ProgressIndicator.java16
-rw-r--r--server/src/main/java/com/vaadin/ui/PushConfiguration.java68
-rw-r--r--server/src/main/java/com/vaadin/ui/ReconnectDialogConfiguration.java39
-rw-r--r--server/src/main/java/com/vaadin/ui/RichTextArea.java51
-rw-r--r--server/src/main/java/com/vaadin/ui/Select.java10
-rw-r--r--server/src/main/java/com/vaadin/ui/SelectiveRenderer.java12
-rw-r--r--server/src/main/java/com/vaadin/ui/SingleComponentContainer.java24
-rw-r--r--server/src/main/java/com/vaadin/ui/Slider.java60
-rw-r--r--server/src/main/java/com/vaadin/ui/TabSheet.java271
-rw-r--r--server/src/main/java/com/vaadin/ui/Table.java680
-rw-r--r--server/src/main/java/com/vaadin/ui/TableFieldFactory.java12
-rw-r--r--server/src/main/java/com/vaadin/ui/TextArea.java26
-rw-r--r--server/src/main/java/com/vaadin/ui/TextField.java28
-rw-r--r--server/src/main/java/com/vaadin/ui/TooltipConfiguration.java48
-rw-r--r--server/src/main/java/com/vaadin/ui/Tree.java201
-rw-r--r--server/src/main/java/com/vaadin/ui/TreeTable.java60
-rw-r--r--server/src/main/java/com/vaadin/ui/TwinColSelect.java24
-rw-r--r--server/src/main/java/com/vaadin/ui/UI.java258
-rw-r--r--server/src/main/java/com/vaadin/ui/UIDetachedException.java8
-rw-r--r--server/src/main/java/com/vaadin/ui/UniqueSerializable.java10
-rw-r--r--server/src/main/java/com/vaadin/ui/Upload.java17
-rw-r--r--server/src/main/java/com/vaadin/ui/VerticalLayout.java14
-rw-r--r--server/src/main/java/com/vaadin/ui/VerticalSplitPanel.java12
-rw-r--r--server/src/main/java/com/vaadin/ui/Video.java18
-rw-r--r--server/src/main/java/com/vaadin/ui/Window.java255
-rw-r--r--server/src/main/java/com/vaadin/ui/components/calendar/CalendarComponentEvent.java16
-rw-r--r--server/src/main/java/com/vaadin/ui/components/calendar/CalendarComponentEvents.java92
-rw-r--r--server/src/main/java/com/vaadin/ui/components/calendar/CalendarDateRange.java20
-rw-r--r--server/src/main/java/com/vaadin/ui/components/calendar/CalendarTargetDetails.java10
-rw-r--r--server/src/main/java/com/vaadin/ui/components/calendar/ContainerEventProvider.java119
-rw-r--r--server/src/main/java/com/vaadin/ui/components/calendar/event/BasicEvent.java46
-rw-r--r--server/src/main/java/com/vaadin/ui/components/calendar/event/BasicEventProvider.java42
-rw-r--r--server/src/main/java/com/vaadin/ui/components/calendar/event/CalendarEditableEventProvider.java12
-rw-r--r--server/src/main/java/com/vaadin/ui/components/calendar/event/CalendarEvent.java33
-rw-r--r--server/src/main/java/com/vaadin/ui/components/calendar/event/CalendarEventProvider.java18
-rw-r--r--server/src/main/java/com/vaadin/ui/components/calendar/event/EditableCalendarEvent.java24
-rw-r--r--server/src/main/java/com/vaadin/ui/components/calendar/handler/BasicBackwardHandler.java15
-rw-r--r--server/src/main/java/com/vaadin/ui/components/calendar/handler/BasicDateClickHandler.java12
-rw-r--r--server/src/main/java/com/vaadin/ui/components/calendar/handler/BasicEventMoveHandler.java16
-rw-r--r--server/src/main/java/com/vaadin/ui/components/calendar/handler/BasicEventResizeHandler.java12
-rw-r--r--server/src/main/java/com/vaadin/ui/components/calendar/handler/BasicForwardHandler.java19
-rw-r--r--server/src/main/java/com/vaadin/ui/components/calendar/handler/BasicWeekClickHandler.java12
-rw-r--r--server/src/main/java/com/vaadin/ui/components/colorpicker/ColorChangeEvent.java8
-rw-r--r--server/src/main/java/com/vaadin/ui/components/colorpicker/ColorChangeListener.java12
-rw-r--r--server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerGradient.java18
-rw-r--r--server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerGrid.java27
-rw-r--r--server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerHistory.java26
-rw-r--r--server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerPopup.java111
-rw-r--r--server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerPreview.java25
-rw-r--r--server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerSelect.java46
-rw-r--r--server/src/main/java/com/vaadin/ui/components/colorpicker/ColorSelector.java12
-rw-r--r--server/src/main/java/com/vaadin/ui/components/colorpicker/HasColorChangeListener.java10
-rw-r--r--server/src/main/java/com/vaadin/ui/declarative/Design.java142
-rw-r--r--server/src/main/java/com/vaadin/ui/declarative/DesignAttributeHandler.java106
-rw-r--r--server/src/main/java/com/vaadin/ui/declarative/DesignContext.java123
-rw-r--r--server/src/main/java/com/vaadin/ui/declarative/DesignException.java10
-rw-r--r--server/src/main/java/com/vaadin/ui/declarative/DesignFormatter.java47
-rw-r--r--server/src/main/java/com/vaadin/ui/declarative/FieldBinder.java49
-rw-r--r--server/src/main/java/com/vaadin/ui/declarative/FieldBindingException.java8
-rw-r--r--server/src/main/java/com/vaadin/ui/declarative/ShouldWriteDataDelegate.java12
-rw-r--r--server/src/main/java/com/vaadin/ui/declarative/converters/DesignDateConverter.java8
-rw-r--r--server/src/main/java/com/vaadin/ui/declarative/converters/DesignEnumConverter.java8
-rw-r--r--server/src/main/java/com/vaadin/ui/declarative/converters/DesignObjectConverter.java8
-rw-r--r--server/src/main/java/com/vaadin/ui/declarative/converters/DesignResourceConverter.java29
-rw-r--r--server/src/main/java/com/vaadin/ui/declarative/converters/DesignShortcutActionConverter.java23
-rw-r--r--server/src/main/java/com/vaadin/ui/declarative/converters/DesignTimeZoneConverter.java8
-rw-r--r--server/src/main/java/com/vaadin/ui/declarative/converters/DesignToStringConverter.java17
-rw-r--r--server/src/main/java/com/vaadin/ui/declarative/converters/ShortcutKeyMapper.java12
-rw-r--r--server/src/main/java/com/vaadin/ui/renderers/AbstractJavaScriptRenderer.java22
-rw-r--r--server/src/main/java/com/vaadin/ui/renderers/ButtonRenderer.java10
-rw-r--r--server/src/main/java/com/vaadin/ui/renderers/ClickableRenderer.java24
-rw-r--r--server/src/main/java/com/vaadin/ui/renderers/DateRenderer.java32
-rw-r--r--server/src/main/java/com/vaadin/ui/renderers/HtmlRenderer.java6
-rw-r--r--server/src/main/java/com/vaadin/ui/renderers/ImageRenderer.java13
-rw-r--r--server/src/main/java/com/vaadin/ui/renderers/NumberRenderer.java20
-rw-r--r--server/src/main/java/com/vaadin/ui/renderers/ProgressBarRenderer.java6
-rw-r--r--server/src/main/java/com/vaadin/ui/renderers/Renderer.java14
-rw-r--r--server/src/main/java/com/vaadin/ui/renderers/TextRenderer.java10
-rw-r--r--server/src/main/java/com/vaadin/ui/themes/BaseTheme.java10
-rw-r--r--server/src/main/java/com/vaadin/ui/themes/ChameleonTheme.java20
-rw-r--r--server/src/main/java/com/vaadin/ui/themes/LiferayTheme.java14
-rw-r--r--server/src/main/java/com/vaadin/ui/themes/Reindeer.java52
-rw-r--r--server/src/main/java/com/vaadin/ui/themes/Runo.java50
-rw-r--r--server/src/main/java/com/vaadin/ui/themes/ValoTheme.java160
-rw-r--r--server/src/main/java/com/vaadin/util/ConnectorHelper.java12
-rw-r--r--server/src/main/java/com/vaadin/util/CurrentInstance.java17
-rw-r--r--server/src/main/java/com/vaadin/util/FileTypeResolver.java24
-rw-r--r--server/src/main/java/com/vaadin/util/ReflectTools.java16
-rw-r--r--server/src/main/java/com/vaadin/util/SerializerHelper.java22
-rw-r--r--server/src/test/java/ClassInDefaultPackage.java10
-rw-r--r--server/src/test/java/com/vaadin/benchmarks/PerformanceTester8759.java10
-rw-r--r--server/src/test/java/com/vaadin/data/DefaultFieldGroupFieldFactoryTest.java14
-rw-r--r--server/src/test/java/com/vaadin/data/fieldgroup/FieldGroupDateTest.java6
-rw-r--r--server/src/test/java/com/vaadin/data/fieldgroup/FieldGroupExceptionTest.java6
-rw-r--r--server/src/test/java/com/vaadin/data/fieldgroup/FieldGroupTest.java9
-rw-r--r--server/src/test/java/com/vaadin/data/util/AbstractBeanContainerTestBase.java6
-rw-r--r--server/src/test/java/com/vaadin/data/util/AbstractContainerTestBase.java85
-rw-r--r--server/src/test/java/com/vaadin/data/util/AbstractHierarchicalContainerTestBase.java36
-rw-r--r--server/src/test/java/com/vaadin/data/util/AbstractInMemoryContainerTestBase.java4
-rw-r--r--server/src/test/java/com/vaadin/data/util/BeanContainerTest.java25
-rw-r--r--server/src/test/java/com/vaadin/data/util/BeanItemContainerTest.java105
-rw-r--r--server/src/test/java/com/vaadin/data/util/BeanItemTest.java42
-rw-r--r--server/src/test/java/com/vaadin/data/util/ContainerHierarchicalWrapperTest.java16
-rw-r--r--server/src/test/java/com/vaadin/data/util/ContainerOrderedWrapperTest.java11
-rw-r--r--server/src/test/java/com/vaadin/data/util/ContainerSizeAssertTest.java6
-rw-r--r--server/src/test/java/com/vaadin/data/util/ContainerSortingTest.java25
-rw-r--r--server/src/test/java/com/vaadin/data/util/FileSystemContainerTest.java4
-rw-r--r--server/src/test/java/com/vaadin/data/util/GeneratedPropertyContainerBasicTest.java25
-rw-r--r--server/src/test/java/com/vaadin/data/util/GeneratedPropertyContainerTest.java30
-rw-r--r--server/src/test/java/com/vaadin/data/util/HierarchicalContainerOrderedWrapperTest.java4
-rw-r--r--server/src/test/java/com/vaadin/data/util/HierarchicalContainerTest.java19
-rw-r--r--server/src/test/java/com/vaadin/data/util/IndexedContainerTest.java13
-rw-r--r--server/src/test/java/com/vaadin/data/util/MethodPropertyMemoryConsumptionTest.java41
-rw-r--r--server/src/test/java/com/vaadin/data/util/NestedMethodPropertyTest.java4
-rw-r--r--server/src/test/java/com/vaadin/data/util/PerformanceTestIndexedContainerTest.java4
-rw-r--r--server/src/test/java/com/vaadin/data/util/PropertyDescriptorTest.java4
-rw-r--r--server/src/test/java/com/vaadin/data/util/PropertySetItemTest.java13
-rw-r--r--server/src/test/java/com/vaadin/data/util/ReflectToolsGetSuperFieldTest.java4
-rw-r--r--server/src/test/java/com/vaadin/data/util/TransactionalPropertyWrapperTest.java18
-rw-r--r--server/src/test/java/com/vaadin/data/util/filter/AbstractFilterTestBase.java4
-rw-r--r--server/src/test/java/com/vaadin/data/util/filter/AndOrFilterTest.java44
-rw-r--r--server/src/test/java/com/vaadin/data/util/filter/CompareFilterDateTest.java71
-rw-r--r--server/src/test/java/com/vaadin/data/util/filter/CompareFilterTest.java60
-rw-r--r--server/src/test/java/com/vaadin/data/util/filter/IsNullFilterTest.java8
-rw-r--r--server/src/test/java/com/vaadin/data/util/filter/LikeFilterTest.java10
-rw-r--r--server/src/test/java/com/vaadin/data/util/filter/SimpleStringFilterTest.java8
-rw-r--r--server/src/test/java/com/vaadin/data/util/sqlcontainer/ColumnPropertyTest.java49
-rw-r--r--server/src/test/java/com/vaadin/data/util/sqlcontainer/DataGenerator.java34
-rw-r--r--server/src/test/java/com/vaadin/data/util/sqlcontainer/FreeformQueryUtil.java9
-rw-r--r--server/src/test/java/com/vaadin/data/util/sqlcontainer/RowIdTest.java4
-rw-r--r--server/src/test/java/com/vaadin/data/util/sqlcontainer/SQLContainerTableQueryTest.java200
-rw-r--r--server/src/test/java/com/vaadin/data/util/sqlcontainer/SQLContainerTest.java432
-rwxr-xr-xserver/src/test/java/com/vaadin/data/util/sqlcontainer/SQLTestsConstants.java6
-rw-r--r--server/src/test/java/com/vaadin/data/util/sqlcontainer/TicketTest.java27
-rw-r--r--server/src/test/java/com/vaadin/data/util/sqlcontainer/connection/SimpleJDBCConnectionPoolTest.java18
-rw-r--r--server/src/test/java/com/vaadin/data/util/sqlcontainer/filters/BetweenTest.java16
-rw-r--r--server/src/test/java/com/vaadin/data/util/sqlcontainer/filters/CompareTest.java6
-rw-r--r--server/src/test/java/com/vaadin/data/util/sqlcontainer/generator/SQLGeneratorsTest.java25
-rw-r--r--server/src/test/java/com/vaadin/data/util/sqlcontainer/generator/StatementHelperTest.java12
-rw-r--r--server/src/test/java/com/vaadin/data/util/sqlcontainer/query/FreeformQueryTest.java129
-rw-r--r--server/src/test/java/com/vaadin/data/util/sqlcontainer/query/QueryBuilderTest.java19
-rw-r--r--server/src/test/java/com/vaadin/data/util/sqlcontainer/query/TableQueryTest.java57
-rw-r--r--server/src/test/java/com/vaadin/data/util/sqlcontainer/query/ValidatingSimpleJDBCConnectionPool.java21
-rw-r--r--server/src/test/java/com/vaadin/server/AbstractClientConnectorProxyHandlingTest.java15
-rw-r--r--server/src/test/java/com/vaadin/server/AbstractClientConnectorTest.java15
-rw-r--r--server/src/test/java/com/vaadin/server/AbstractDeploymentConfigurationTest.java15
-rw-r--r--server/src/test/java/com/vaadin/server/BrowserWindowOpenerTest.java14
-rw-r--r--server/src/test/java/com/vaadin/server/ConnectorResourceHandlerTest.java10
-rw-r--r--server/src/test/java/com/vaadin/server/DefaultDeploymentConfigurationTest.java14
-rw-r--r--server/src/test/java/com/vaadin/server/DownloadStreamTest.java8
-rw-r--r--server/src/test/java/com/vaadin/server/DragAndDropServiceTest.java20
-rw-r--r--server/src/test/java/com/vaadin/server/JSONSerializerTest.java31
-rw-r--r--server/src/test/java/com/vaadin/server/JsonEqualsTest.java6
-rw-r--r--server/src/test/java/com/vaadin/server/MockServletContext.java12
-rw-r--r--server/src/test/java/com/vaadin/server/MockVaadinSession.java8
-rw-r--r--server/src/test/java/com/vaadin/server/PageTest.java14
-rw-r--r--server/src/test/java/com/vaadin/server/TestAbstractApplicationServletStaticFilesLocation.java19
-rw-r--r--server/src/test/java/com/vaadin/server/UIProviderTest.java23
-rw-r--r--server/src/test/java/com/vaadin/server/VaadinGateInRequestTest.java10
-rw-r--r--server/src/test/java/com/vaadin/server/VaadinHttpAndPortletRequestTestBase.java6
-rw-r--r--server/src/test/java/com/vaadin/server/VaadinLiferayRequestTest.java10
-rw-r--r--server/src/test/java/com/vaadin/server/VaadinPortletServiceTest.java30
-rw-r--r--server/src/test/java/com/vaadin/server/VaadinPortletTest.java6
-rw-r--r--server/src/test/java/com/vaadin/server/VaadinServiceTest.java19
-rw-r--r--server/src/test/java/com/vaadin/server/VaadinServletConfigurationTest.java20
-rw-r--r--server/src/test/java/com/vaadin/server/VaadinServletTest.java6
-rw-r--r--server/src/test/java/com/vaadin/server/VaadinSessionTest.java45
-rw-r--r--server/src/test/java/com/vaadin/server/VaadinWebSpherePortalRequestTest.java6
-rw-r--r--server/src/test/java/com/vaadin/server/communication/AtmospherePushConnectionTest.java6
-rw-r--r--server/src/test/java/com/vaadin/server/communication/FileUploadHandlerTest.java62
-rw-r--r--server/src/test/java/com/vaadin/server/communication/MetadataWriterTest.java18
-rw-r--r--server/src/test/java/com/vaadin/tests/CompileTransitionPropertyTest.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/VaadinClasses.java11
-rw-r--r--server/src/test/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropWrapperDeclarativeTest.java14
-rw-r--r--server/src/test/java/com/vaadin/tests/components/menubar/MenuBarDeclarativeTest.java32
-rw-r--r--server/src/test/java/com/vaadin/tests/data/bean/Country.java4
-rw-r--r--server/src/test/java/com/vaadin/tests/data/bean/Person.java4
-rw-r--r--server/src/test/java/com/vaadin/tests/data/converter/AnyEnumToStringConverterTest.java17
-rw-r--r--server/src/test/java/com/vaadin/tests/data/converter/ConverterFactoryTest.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/data/converter/DateToLongConverterTest.java3
-rw-r--r--server/src/test/java/com/vaadin/tests/data/converter/DefaultConverterFactoryTest.java36
-rw-r--r--server/src/test/java/com/vaadin/tests/data/converter/SpecificEnumToStringConverterTest.java20
-rw-r--r--server/src/test/java/com/vaadin/tests/data/converter/StringToBigDecimalConverterTest.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/data/converter/StringToBigIntegerConverterTest.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/data/converter/StringToBooleanConverterTest.java33
-rw-r--r--server/src/test/java/com/vaadin/tests/data/converter/StringToByteConverterTest.java3
-rw-r--r--server/src/test/java/com/vaadin/tests/data/converter/StringToCollectionConverterTest.java12
-rw-r--r--server/src/test/java/com/vaadin/tests/data/converter/StringToEnumConverterTest.java24
-rw-r--r--server/src/test/java/com/vaadin/tests/data/converter/StringToShortConverterTest.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/data/validator/ByteRangeValidatorTest.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/data/validator/FloatRangeValidatorTest.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/data/validator/ShortRangeValidatorTest.java3
-rw-r--r--server/src/test/java/com/vaadin/tests/data/validator/StringLengthValidatorTest.java13
-rw-r--r--server/src/test/java/com/vaadin/tests/design/AbstractComponentSetResponsiveTest.java10
-rw-r--r--server/src/test/java/com/vaadin/tests/design/ComponentFactoryTest.java17
-rw-r--r--server/src/test/java/com/vaadin/tests/design/ComponentMapperTest.java22
-rw-r--r--server/src/test/java/com/vaadin/tests/design/DeclarativeTestBase.java37
-rw-r--r--server/src/test/java/com/vaadin/tests/design/DeclarativeTestBaseBase.java20
-rw-r--r--server/src/test/java/com/vaadin/tests/design/DesignContextLocalIdTest.java8
-rw-r--r--server/src/test/java/com/vaadin/tests/design/DesignFormatterTest.java55
-rw-r--r--server/src/test/java/com/vaadin/tests/design/DesignReadInConstructor.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/design/DesignReadInConstructorTest.java10
-rw-r--r--server/src/test/java/com/vaadin/tests/design/DesignTest.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/design/EmbeddedsTest.java12
-rw-r--r--server/src/test/java/com/vaadin/tests/design/FieldNameWhichConflictsWithGettersTest.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/design/InvalidLayoutTemplate.java8
-rw-r--r--server/src/test/java/com/vaadin/tests/design/InvalidTagNamesTest.java10
-rw-r--r--server/src/test/java/com/vaadin/tests/design/LayoutTemplate.java8
-rw-r--r--server/src/test/java/com/vaadin/tests/design/LocaleTest.java17
-rw-r--r--server/src/test/java/com/vaadin/tests/design/ParseAllSupportedComponentsTest.java8
-rw-r--r--server/src/test/java/com/vaadin/tests/design/ParseLayoutTest.java8
-rw-r--r--server/src/test/java/com/vaadin/tests/design/ParseLegacyPrefixTest.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/design/ParseMixedLegacyAndNewPrefixTest.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/design/WriteLegacyDesignTest.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/design/designroot/DesignRootTest.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/design/designroot/DesignWithAnnotation.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/design/designroot/DesignWithEmptyAnnotation.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/design/designroot/ExtendedDesignWithAnnotation.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotation.java10
-rw-r--r--server/src/test/java/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotationUI.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/design/nested/MyChildDesign.java8
-rw-r--r--server/src/test/java/com/vaadin/tests/design/nested/MyChildDesignCustomComponent.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/design/nested/MyDesignRoot.java8
-rw-r--r--server/src/test/java/com/vaadin/tests/design/nested/MyExtendedChildDesign.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/design/nested/NestedCustomLayoutsTest.java8
-rw-r--r--server/src/test/java/com/vaadin/tests/design/nested/ReadNestedTemplatesTest.java8
-rw-r--r--server/src/test/java/com/vaadin/tests/design/nested/WriteNestedTemplatesTest.java14
-rw-r--r--server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomAbsoluteLayout.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomAccordion.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomCssLayout.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomFormLayout.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomGridLayout.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomHorizontalLayout.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomHorizontalSplitPanel.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomPanel.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomTabSheet.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomVerticalLayout.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomVerticalSplitPanel.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/event/EventRouterTest.java18
-rw-r--r--server/src/test/java/com/vaadin/tests/event/ShortcutActionTest.java15
-rw-r--r--server/src/test/java/com/vaadin/tests/server/AbstractBeanContainerListenersTest.java4
-rw-r--r--server/src/test/java/com/vaadin/tests/server/AbstractContainerListenersTest.java4
-rw-r--r--server/src/test/java/com/vaadin/tests/server/AbstractInMemoryContainerListenersTest.java4
-rw-r--r--server/src/test/java/com/vaadin/tests/server/AbstractPropertyListenersTest.java16
-rw-r--r--server/src/test/java/com/vaadin/tests/server/AssertionsEnabledTest.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/server/ClassesSerializableTest.java26
-rw-r--r--server/src/test/java/com/vaadin/tests/server/ClientMethodSerializationTest.java40
-rw-r--r--server/src/test/java/com/vaadin/tests/server/ContextClickListenerTest.java10
-rw-r--r--server/src/test/java/com/vaadin/tests/server/CsrfTokenMissingTest.java12
-rw-r--r--server/src/test/java/com/vaadin/tests/server/ExtensionTest.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/server/FileResourceTest.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/server/FileTypeResolverTest.java36
-rw-r--r--server/src/test/java/com/vaadin/tests/server/IndexedContainerListenersTest.java8
-rw-r--r--server/src/test/java/com/vaadin/tests/server/PropertyFormatterTest.java18
-rw-r--r--server/src/test/java/com/vaadin/tests/server/PropertysetItemListenersTest.java4
-rw-r--r--server/src/test/java/com/vaadin/tests/server/SerializationTest.java8
-rw-r--r--server/src/test/java/com/vaadin/tests/server/SimpleMultiPartInputStreamTest.java16
-rw-r--r--server/src/test/java/com/vaadin/tests/server/StreamResourceTest.java8
-rw-r--r--server/src/test/java/com/vaadin/tests/server/StreamVariableMappingTest.java8
-rw-r--r--server/src/test/java/com/vaadin/tests/server/clientconnector/AttachDetachListenersTest.java4
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/AbstractListenerMethodsTestBase.java25
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/ComponentSizeParseTest.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/DeclarativeMarginTestBase.java13
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/FieldDefaultValuesTest.java21
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/ReadEmptyDesignTest.java9
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/StateGetDoesNotMarkDirtyTest.java4
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/WriteEmptyDesignTest.java10
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/absolutelayout/AbsoluteLayoutDeclarativeTest.java12
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/absolutelayout/AbsoluteLayoutListenersTest.java4
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/absolutelayout/AddComponentsTest.java8
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/absolutelayout/ComponentPositionTest.java14
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/abstractcomponent/AbstractComponentDeclarativeTest.java24
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/abstractcomponentcontainer/AbstractComponentContainerListenersTest.java4
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/abstractcomponentcontainer/AddParentAsChildTest.java8
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbsFieldValidatorsTest.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbsFieldValueConversionErrorTest.java4
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbsFieldValueConversionsTest.java15
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbstractFieldDeclarativeTest.java12
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbstractFieldListenersTest.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbstractFieldReadOnlyTest.java12
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/abstractfield/DefaultConverterFactoryTest.java20
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetachTest.java4
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/abstractorderedlayout/AbstractOrderedLayoutDeclarativeTest.java20
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/abstractorderedlayout/AbstractOrderedLayoutListenersTest.java4
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/abstractorderedlayout/LayoutSettingsOnReplaceTest.java22
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/abstractselect/AbstractSelectDeclarativeTest.java39
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/abstractselect/AbstractSelectListenersTest.java4
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/abstractselect/AbstractSelectStateTest.java12
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/abstractselect/OptionGroupDeclarativeTest.java10
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/abstractsinglecomponentcontainer/RemoveFromParentLockingTest.java9
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/abstractsinglecomponentcontainer/SetParentAsContentTest.java10
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/abstractsplitpanel/AbstractSplitPanelDeclarativeTest.java12
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/abstractsplitpanel/AbstractSplitPanelListenersTest.java4
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/abstracttextfield/AbstractTextFieldDeclarativeTest.java12
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/abstracttextfield/AbstractTextFieldListenersTest.java4
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/audio/AudioDeclarativeTest.java12
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/audio/AudioStateTest.java8
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/audio/VideoDeclarativeTest.java10
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/browserframe/BrowserFrameDeclarativeTest.java12
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/button/ButtonDeclarativeTest.java15
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/calendar/CalendarBasicsTest.java26
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/calendar/CalendarDeclarativeTest.java9
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/calendar/ContainerDataSourceTest.java30
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/calendar/ContainerEventProviderTest.java8
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/checkbox/CheckboxDeclarativeTest.java8
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/colorpicker/AbstractColorPickerDeclarativeTest.java10
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/colorpicker/ColorConversionsTest.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/combobox/ComboBoxDeclarativeTest.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/combobox/ComboBoxStateTest.java8
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/csslayout/AddComponentsTest.java3
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/csslayout/CssLayoutDeclarativeTest.java8
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/customlayout/CustomLayoutDeclarativeTest.java12
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/customlayout/CustomLayoutTest.java15
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/datefield/DateFieldConverterTest.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/datefield/DateFieldDeclarativeTest.java22
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/datefield/InlineDateFieldDeclarativeTest.java20
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/datefield/PopupDateFieldDeclarativeTest.java12
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/fieldgroup/BeanFieldGroupTest.java4
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/fieldgroup/CaseInsensitiveBindingTest.java4
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/fieldgroup/FieldGroupTest.java17
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/fieldgroup/FieldNamedDescriptionTest.java4
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/flash/FlashDeclarativeTest.java8
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/form/FormTest.java8
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/grid/GridAddRowBuiltinContainerTest.java46
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/grid/GridChildrenTest.java10
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/grid/GridColumnAddingAndRemovingTest.java22
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/grid/GridColumnsTest.java27
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/grid/GridContainerNotSortableTest.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/grid/GridContainerTest.java23
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/grid/GridEditorTest.java21
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/grid/GridExtensionTest.java10
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/grid/GridSelectionTest.java35
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/grid/GridStateTest.java8
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/grid/GridStaticSectionTest.java10
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/grid/MultiSelectionModelTest.java14
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/grid/SingleSelectionModelTest.java23
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/grid/TestGrid.java8
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/grid/declarative/GridColumnDeclarativeTest.java9
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/grid/declarative/GridDeclarativeAttributeTest.java20
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/grid/declarative/GridDeclarativeTestBase.java9
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/grid/declarative/GridHeaderFooterDeclarativeTest.java22
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/grid/declarative/GridInlineDataDeclarativeTest.java22
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/grid/declarative/GridStructureDeclarativeTest.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/grid/sort/SortTest.java40
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/gridlayout/GridLayoutDeclarativeTest.java13
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/image/ImageDeclarativeTest.java8
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/label/LabelConvertersTest.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/label/LabelDeclarativeTest.java8
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/label/LabelListenersTest.java20
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/link/LinkDeclarativeTest.java8
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/listselect/ListSelectDeclarativeTest.java13
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/listselect/ListSelectStateTest.java12
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/nativeselect/NativeSelectDeclarativeTest.java12
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/optiongroup/OptionGroupStateTest.java8
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/panel/PanelDeclarativeTest.java8
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/passwordfield/PasswordFieldDeclarativeTest.java12
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/popupview/PopupViewDeclarativeTest.java12
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/progressbar/ProgressBarDeclarativeTest.java12
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/richtextarea/RichTextAreaDeclarativeTest.java10
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/richtextarea/RichTextAreaStateTest.java8
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/slider/SliderDeclarativeTest.java8
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/slider/SliderTest.java4
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/table/CacheUpdateExceptionCausesTest.java10
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/table/FooterTest.java4
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/table/MultipleSelectionTest.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/table/TableColumnAlignmentsTest.java18
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/table/TableContextClickTest.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/table/TableDeclarativeTest.java59
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/table/TableDeclarativeTestBase.java14
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/table/TableGeneratorTest.java4
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/table/TablePropertyValueConverterTest.java21
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/table/TableSelectableTest.java16
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/table/TableStateTest.java8
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/table/TableVisibleColumnsTest.java10
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/tabsheet/TabSheetDeclarativeTest.java12
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/tabsheet/TabSheetTest.java2
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/textarea/TextAreaDeclarativeTest.java8
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/textfield/TextFieldDeclarativeTest.java8
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/textfield/TextFieldWithValidatorTest.java4
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/tree/ListenersTest.java8
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/tree/TreeDeclarativeTest.java12
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/tree/TreeTest.java28
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/treetable/TreeTableDeclarativeTest.java8
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/treetable/TreeTableTest.java13
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/twincolselect/TwinColSelectDeclarativeTest.java12
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/twincolselect/TwinColSelectStateTest.java12
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/ui/CustomUIClassLoaderTest.java12
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/upload/UploadDeclarativeTest.java8
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/upload/UploadTest.java11
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/window/AttachDetachWindowTest.java13
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/window/WindowDeclarativeTest.java24
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/window/WindowTest.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/server/componentcontainer/AddRemoveComponentTest.java5
-rw-r--r--server/src/test/java/com/vaadin/tests/server/components/AbstractFieldValueChangeTestBase.java10
-rw-r--r--server/src/test/java/com/vaadin/tests/server/components/ComboBoxValueChangeTest.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/server/components/TextFieldValueChangeTest.java12
-rw-r--r--server/src/test/java/com/vaadin/tests/server/navigator/ClassBasedViewProviderTest.java9
-rw-r--r--server/src/test/java/com/vaadin/tests/server/navigator/NavigatorTest.java59
-rw-r--r--server/src/test/java/com/vaadin/tests/server/navigator/UriFragmentManagerTest.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/server/renderer/ImageRendererTest.java10
-rw-r--r--server/src/test/java/com/vaadin/tests/server/renderer/RendererTest.java42
-rw-r--r--server/src/test/java/com/vaadin/tests/server/validation/BeanValidationTest.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/util/GraphVizClassHierarchyCreator.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/util/MockDeploymentConfiguration.java4
-rw-r--r--server/src/test/java/com/vaadin/tests/util/MockUI.java6
-rw-r--r--server/src/test/java/com/vaadin/tests/util/TestUtil.java11
-rw-r--r--server/src/test/java/com/vaadin/tests/util/UniqueSerializableTest.java6
-rw-r--r--server/src/test/java/com/vaadin/ui/AbsSelectTest.java22
-rw-r--r--server/src/test/java/com/vaadin/ui/CheckBoxTest.java6
-rw-r--r--server/src/test/java/com/vaadin/ui/GridLayoutExpandRatioTest.java6
-rw-r--r--server/src/test/java/com/vaadin/ui/HorizontalSplitPanelTest.java6
-rw-r--r--server/src/test/java/com/vaadin/ui/NativeSelectTest.java22
-rw-r--r--server/src/test/java/com/vaadin/ui/PushConfigurationTransportTest.java12
-rw-r--r--server/src/test/java/com/vaadin/ui/RichTextAreaTest.java6
-rw-r--r--server/src/test/java/com/vaadin/ui/SplitPositionChangeListenerTest.java15
-rw-r--r--server/src/test/java/com/vaadin/ui/TableTest.java14
-rw-r--r--server/src/test/java/com/vaadin/ui/TextAreaTest.java6
-rw-r--r--server/src/test/java/com/vaadin/ui/TextFieldTest.java6
-rw-r--r--server/src/test/java/com/vaadin/ui/UIInitRefreshTest.java18
-rw-r--r--server/src/test/java/com/vaadin/ui/UIThemeEscapingTest.java6
-rw-r--r--server/src/test/java/com/vaadin/ui/VerticalSplitPanelTest.java6
-rw-r--r--server/src/test/java/com/vaadin/ui/declarative/DesignTest.java36
-rw-r--r--server/src/test/java/com/vaadin/util/CurrentInstanceTest.java14
-rw-r--r--server/src/test/java/com/vaadin/util/ReflectToolsGetFieldValueByTypeTest.java4
-rw-r--r--server/src/test/java/com/vaadin/util/ReflectToolsGetPrimitiveFieldValueTest.java4
-rw-r--r--shared/src/main/java-templates/com/vaadin/shared/Version.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/AbstractComponentState.java10
-rw-r--r--shared/src/main/java/com/vaadin/shared/AbstractFieldState.java10
-rw-r--r--shared/src/main/java/com/vaadin/shared/ApplicationConstants.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ComponentConstants.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/Connector.java12
-rw-r--r--shared/src/main/java/com/vaadin/shared/ContextClickRpc.java8
-rw-r--r--shared/src/main/java/com/vaadin/shared/EventId.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/JavaScriptConnectorState.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/JavaScriptExtensionState.java10
-rw-r--r--shared/src/main/java/com/vaadin/shared/JsonConstants.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/MouseEventDetails.java12
-rwxr-xr-xshared/src/main/java/com/vaadin/shared/Position.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/VBrowserDetails.java95
-rw-r--r--shared/src/main/java/com/vaadin/shared/VaadinUriResolver.java32
-rw-r--r--shared/src/main/java/com/vaadin/shared/annotations/Delayed.java14
-rw-r--r--shared/src/main/java/com/vaadin/shared/annotations/DelegateToWidget.java20
-rw-r--r--shared/src/main/java/com/vaadin/shared/annotations/NoLayout.java10
-rw-r--r--shared/src/main/java/com/vaadin/shared/annotations/NoLoadingIndicator.java8
-rw-r--r--shared/src/main/java/com/vaadin/shared/communication/ClientRpc.java12
-rw-r--r--shared/src/main/java/com/vaadin/shared/communication/FieldRpc.java10
-rw-r--r--shared/src/main/java/com/vaadin/shared/communication/LegacyChangeVariablesInvocation.java13
-rw-r--r--shared/src/main/java/com/vaadin/shared/communication/MethodInvocation.java10
-rw-r--r--shared/src/main/java/com/vaadin/shared/communication/PushConstants.java11
-rw-r--r--shared/src/main/java/com/vaadin/shared/communication/PushMode.java12
-rw-r--r--shared/src/main/java/com/vaadin/shared/communication/ServerRpc.java8
-rw-r--r--shared/src/main/java/com/vaadin/shared/communication/SharedState.java20
-rw-r--r--shared/src/main/java/com/vaadin/shared/communication/URLReference.java10
-rw-r--r--shared/src/main/java/com/vaadin/shared/communication/UidlValue.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/data/DataProviderRpc.java22
-rw-r--r--shared/src/main/java/com/vaadin/shared/data/DataRequestRpc.java12
-rw-r--r--shared/src/main/java/com/vaadin/shared/data/sort/SortDirection.java4
-rw-r--r--shared/src/main/java/com/vaadin/shared/extension/javascriptmanager/ExecuteJavaScriptRpc.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/extension/javascriptmanager/JavaScriptManagerState.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/AbstractEmbeddedState.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/AbstractLayoutState.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/AbstractMediaState.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/AlignmentInfo.java12
-rwxr-xr-xshared/src/main/java/com/vaadin/shared/ui/BorderStyle.java10
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/BrowserWindowOpenerState.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/ClickRpc.java8
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/ComponentStateUtil.java13
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/Connect.java12
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/JavaScriptComponentState.java10
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/LayoutClickRpc.java8
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/MarginInfo.java46
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/MediaControl.java8
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/MultiSelectMode.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/Orientation.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/ShortCutConstants.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/TabIndexState.java10
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/absolutelayout/AbsoluteLayoutServerRpc.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/absolutelayout/AbsoluteLayoutState.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/accordion/AccordionState.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/audio/AudioState.java8
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/browserframe/BrowserFrameState.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/button/ButtonServerRpc.java10
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/button/ButtonState.java10
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/button/NativeButtonState.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/calendar/CalendarClientRpc.java10
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/calendar/CalendarEventId.java8
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/calendar/CalendarServerRpc.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/calendar/CalendarState.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/calendar/DateConstants.java10
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/checkbox/CheckBoxServerRpc.java9
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/checkbox/CheckBoxState.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/colorpicker/Color.java65
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/colorpicker/ColorPickerGradientServerRpc.java12
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/colorpicker/ColorPickerGradientState.java8
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/colorpicker/ColorPickerGridServerRpc.java12
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/colorpicker/ColorPickerGridState.java8
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/colorpicker/ColorPickerServerRpc.java14
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/colorpicker/ColorPickerState.java8
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/combobox/ComboBoxConstants.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/combobox/ComboBoxState.java8
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/combobox/FilteringMode.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/csslayout/CssLayoutServerRpc.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/csslayout/CssLayoutState.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/customlayout/CustomLayoutState.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/datefield/DateFieldConstants.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/datefield/InlineDateFieldState.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/datefield/PopupDateFieldState.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/datefield/Resolution.java14
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/datefield/TextualDateFieldState.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/dd/AcceptCriterion.java10
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/dd/DragEventType.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/dd/HorizontalDropLocation.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/dd/VerticalDropLocation.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/draganddropwrapper/DragAndDropWrapperConstants.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/draganddropwrapper/DragAndDropWrapperServerRpc.java8
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/embedded/EmbeddedConstants.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/embedded/EmbeddedServerRpc.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/embedded/EmbeddedState.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/flash/FlashState.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/form/FormState.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/grid/ColumnGroupState.java8
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/grid/DetailsConnectorChange.java37
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/grid/EditorClientRpc.java16
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/grid/EditorServerRpc.java14
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/grid/GridClientRpc.java10
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/grid/GridColumnState.java8
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/grid/GridConstants.java10
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/grid/GridServerRpc.java18
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/grid/GridState.java40
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/grid/GridStaticCellType.java8
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/grid/GridStaticSectionState.java8
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/grid/HeightMode.java8
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/grid/Range.java64
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/grid/ScrollDestination.java8
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/grid/renderers/RendererClickRpc.java8
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/grid/selection/MultiSelectionModelServerRpc.java12
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/grid/selection/MultiSelectionModelState.java8
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/grid/selection/SingleSelectionModelServerRpc.java10
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/grid/selection/SingleSelectionModelState.java8
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/gridlayout/GridLayoutServerRpc.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/image/ImageServerRpc.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/image/ImageState.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/label/ContentMode.java12
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/label/LabelState.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/link/LinkConstants.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/link/LinkState.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/loginform/LoginFormConstants.java9
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/loginform/LoginFormRpc.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/loginform/LoginFormState.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/menubar/MenuBarConstants.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/menubar/MenuBarState.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/optiongroup/OptionGroupConstants.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/optiongroup/OptionGroupState.java8
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/orderedlayout/AbstractOrderedLayoutServerRpc.java10
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/orderedlayout/AbstractOrderedLayoutState.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/orderedlayout/FormLayoutState.java8
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/orderedlayout/HorizontalLayoutState.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/orderedlayout/VerticalLayoutState.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/panel/PanelServerRpc.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/panel/PanelState.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/popupview/PopupViewServerRpc.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/popupview/PopupViewState.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/progressindicator/ProgressBarState.java8
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/progressindicator/ProgressIndicatorServerRpc.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/progressindicator/ProgressIndicatorState.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/select/AbstractSelectState.java8
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/slider/SliderOrientation.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/slider/SliderServerRpc.java8
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/slider/SliderState.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/splitpanel/AbstractSplitPanelRpc.java10
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/splitpanel/AbstractSplitPanelState.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/splitpanel/HorizontalSplitPanelState.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/splitpanel/VerticalSplitPanelState.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/table/CollapseMenuContent.java4
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/table/TableConstants.java10
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/table/TableServerRpc.java8
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/table/TableState.java8
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/tabsheet/TabState.java8
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/tabsheet/TabsheetBaseConstants.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/tabsheet/TabsheetClientRpc.java10
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/tabsheet/TabsheetConstants.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/tabsheet/TabsheetServerRpc.java12
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/tabsheet/TabsheetState.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/textarea/RichTextAreaState.java10
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/textarea/TextAreaState.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/textfield/AbstractTextFieldState.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/textfield/TextFieldConstants.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/tree/TreeConstants.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/tree/TreeServerRpc.java8
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/tree/TreeState.java8
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/treetable/TreeTableConstants.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/treetable/TreeTableState.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/twincolselect/TwinColSelectConstants.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/twincolselect/TwinColSelectState.java8
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/ui/DebugWindowClientRpc.java10
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/ui/DebugWindowServerRpc.java16
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/ui/NotificationRole.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/ui/PageClientRpc.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/ui/PageState.java10
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/ui/ScrollClientRpc.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/ui/Transport.java4
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/ui/UIClientRpc.java10
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/ui/UIConstants.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/ui/UIServerRpc.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/ui/UIState.java20
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/upload/UploadClientRpc.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/upload/UploadServerRpc.java10
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/upload/UploadState.java8
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/video/VideoConstants.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/video/VideoState.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/window/WindowMode.java10
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/window/WindowRole.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/window/WindowServerRpc.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/window/WindowState.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/util/SharedUtil.java15
-rw-r--r--shared/src/test/java/com/vaadin/shared/ui/grid/RangeTest.java47
-rwxr-xr-xuitest/src/main/java/com/vaadin/data/util/sqlcontainer/SQLTestsConstants.java6
-rw-r--r--uitest/src/main/java/com/vaadin/launcher/ApplicationRunnerServlet.java76
-rw-r--r--uitest/src/main/java/com/vaadin/launcher/CustomDeploymentConfiguration.java6
-rw-r--r--uitest/src/main/java/com/vaadin/launcher/DevelopmentServerLauncher.java56
-rw-r--r--uitest/src/main/java/com/vaadin/launcher/util/BrowserLauncher.java10
-rw-r--r--uitest/src/main/java/com/vaadin/screenshotbrowser/ScreenshotBrowser.java52
-rw-r--r--uitest/src/main/java/com/vaadin/tests/Components.java19
-rw-r--r--uitest/src/main/java/com/vaadin/tests/CurrentTimeMillis.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/CustomLayoutDemo.java23
-rw-r--r--uitest/src/main/java/com/vaadin/tests/FocusingComponents.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/LayoutDemo.java27
-rw-r--r--uitest/src/main/java/com/vaadin/tests/ListenerOrder.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/ModalWindow.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/NativeWindowing.java46
-rw-r--r--uitest/src/main/java/com/vaadin/tests/OrderedLayoutSwapComponents.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/Parameters.java24
-rw-r--r--uitest/src/main/java/com/vaadin/tests/PerformanceTestBasicComponentRendering.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/PerformanceTestLabelsAndOrderedLayouts.java26
-rw-r--r--uitest/src/main/java/com/vaadin/tests/PerformanceTestSubTreeCaching.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/RandomLayoutStress.java29
-rw-r--r--uitest/src/main/java/com/vaadin/tests/StressComponentsInTable.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TableChangingDatasource.java30
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TableSelectTest.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestBench.java58
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestCaptionWrapper.java34
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestComponentAddAndRecursion.java20
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestContainerChanges.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestDateField.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestForAlignments.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestForApplicationLayoutThatUsesWholeBrosersSpace.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestForBasicApplicationLayout.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestForChildComponentRendering.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestForContainerFilterable.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestForGridLayoutChildComponentRendering.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestForMultipleStyleNames.java19
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestForNativeWindowing.java46
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestForPreconfiguredComponents.java24
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestForRichTextEditor.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestForStyledUpload.java52
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestForTabSheet.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestForTablesInitialColumnWidthLogicRendering.java31
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestForTrees.java22
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestForUpload.java55
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestForWindowOpen.java18
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestForWindowing.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestIFrames.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestSelectAndDatefieldInDeepLayouts.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestSetVisibleAndCaching.java35
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestSizeableIncomponents.java25
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestSplitPanel.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TreeFilesystem.java16
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TreeFilesystemContainer.java24
-rw-r--r--uitest/src/main/java/com/vaadin/tests/UsingCustomNewItemHandlerInSelect.java15
-rw-r--r--uitest/src/main/java/com/vaadin/tests/UsingObjectsInSelect.java15
-rw-r--r--uitest/src/main/java/com/vaadin/tests/VaadinClasses.java9
-rw-r--r--uitest/src/main/java/com/vaadin/tests/VerifyAssertionsEnabled.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/VerifyBrowserVersion.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/VerifyJreVersion.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/accessibility/WindowWaiAriaRoles.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/actions/ActionsOnInvisibleComponents.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/actions/ActionsWithoutKeyCode.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/appengine/GAESyncTest.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/application/ApplicationCloseTest.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/application/CommErrorEmulatorServlet.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/application/CommErrorEmulatorUI.java42
-rw-r--r--uitest/src/main/java/com/vaadin/tests/application/ConfirmBrowserTabClose.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/application/CriticalNotifications.java16
-rw-r--r--uitest/src/main/java/com/vaadin/tests/application/DeploymentConfiguration.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/application/DetachOldUIOnReload.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/application/MissingHierarchyDetection.java17
-rw-r--r--uitest/src/main/java/com/vaadin/tests/application/NavigateWithOngoingXHR.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/application/PreserveWithExpiredHeartbeat.java9
-rw-r--r--uitest/src/main/java/com/vaadin/tests/application/ReconnectDialogUI.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/application/RefreshStatePreserve.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/application/ResynchronizeAfterAsyncRemoval.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/application/ResynchronizeUI.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/application/TerminalErrorNotification.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/application/TimingInfoReported.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/application/VaadinSessionAttribute.java17
-rw-r--r--uitest/src/main/java/com/vaadin/tests/application/WebBrowserTimeZone.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/application/calculator/Calc.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/applicationcontext/ChangeSessionId.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/applicationcontext/CleanupBrokenUI.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/applicationcontext/CloseSession.java54
-rw-r--r--uitest/src/main/java/com/vaadin/tests/applicationcontext/CloseUI.java13
-rw-r--r--uitest/src/main/java/com/vaadin/tests/applicationservlet/CustomDeploymentConf.java11
-rw-r--r--uitest/src/main/java/com/vaadin/tests/applicationservlet/DisableSendUrlAsParameters.java9
-rw-r--r--uitest/src/main/java/com/vaadin/tests/applicationservlet/InitParamUIProvider.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/applicationservlet/SessionExpiration.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/browserfeatures/WebkitScrollbarTest.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/AbstractComponentContainerTest.java23
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/AbstractComponentTest.java92
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/AbstractComponentTestCase.java30
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/AbstractLayoutTest.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/AbstractOrderedLayoutTest.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/AbstractOrderedLayoutWithCaptions.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/AbstractTestUI.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/AbstractTestUIWithLog.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/AddRemoveSetStyleNamesTest.java5
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/ComponentTestCase.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/DeclarativeTestUI.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/DisableEnableCascade.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/DisableEnableCascadeStyles.java22
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/FileDownloaderUI.java54
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/FocusFromShortcutAction.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/LayoutAttachListenerInfo.java25
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/NoLayoutUpdateWhichNeedsLayout.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/TestBase.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/TooltipDelay.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/TooltipPosition.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/TooltipsOnScrollingWindow.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/TouchDevicesTooltip.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/TouchScrollables.java28
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/UnknownComponentConnector.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutHideComponent.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutRelativeSizeContent.java22
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutResizing.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/AllComponentTooltipTest.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/ChangeHierarchyBeforeResponse.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/ContextClickUI.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/PrimaryStyle.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/RemSizeUnitTest.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/ResponseWritingErrorHandling.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/UseStateFromHierachy.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractComponentDataBindingTest.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractFieldCommitWithInvalidValues.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractFieldTest.java23
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractTextFieldTest.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/abstractfield/DateFieldBackedByString.java5
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/abstractfield/DoubleInTextField.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/abstractfield/FieldFocusOnClick.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/abstractfield/RequiredIndicatorForFieldsWithoutCaption.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/abstractfield/ShortcutWhenBodyFocused.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/abstractfield/Vaadin6ImplicitDoubleConverter.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/accordion/AccordionAddTab.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/accordion/AccordionPrimaryStylenames.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/accordion/AccordionRemoveComponent.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/accordion/AccordionRemoveTab.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/beanitemcontainer/BeanItemContainerNullValues.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/browserframe/BrowserFrameIsVisible.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/button/ButtonClick.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/button/ButtonEnterWithWindowShortcut.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/button/ButtonHtml.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/button/ButtonIOSDragTest.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/button/ButtonKeyboardClick.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/button/ButtonTabIndex.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/button/ButtonToggleIcons.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/button/ButtonUpdateAltText.java16
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/button/Buttons.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/button/Buttons3.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/button/ShortCutListenerModification.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/calendar/BeanItemContainerTestUI.java15
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarActionEventSource.java22
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarActionsMenuTest.java17
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarActionsUI.java11
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarBackwardForward.java45
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarDragAndDrop.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarHtmlInEvents.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarMonthViewDndEvent.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarNotifications.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarReadOnly.java16
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarRescheduleEvent.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarResizeOverlappingEvents.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarShownNotCorrectlyWhenPartiallyOutOfView.java36
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarTest.java33
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarTestEvent.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarVisibleHours.java47
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarWeekSelection.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/calendar/DndCalendarTargetDetails.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/calendar/HiddenFwdBackButtons.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/calendar/NotificationTestUI.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/calendar/NullEventMoveHandler.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/calendar/SetFirstVisibleHourOfDay.java22
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/caption/IconsInCaption.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/checkbox/CheckBoxImmediate.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/checkbox/CheckBoxNullValue.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/checkbox/CheckBoxRevertValueChange.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/checkbox/CheckBoxRpcCount.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/checkbox/CheckBoxes2.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/checkbox/CheckboxCaptionWrapping.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/checkbox/CheckboxContextClick.java19
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/colorpicker/ColorPickerTestUI.java31
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/colorpicker/DefaultCaptionWidth.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxBorder.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxClickIcon.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxCursorPositionReset.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxDataSourceChange.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxInputPrompt.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxItemAddingWithFocusListener.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxLargeIcons.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxMouseSelectEnter.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxMousewheel.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxNoTextInput.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxOnSmallScreen.java5
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxPageLength.java5
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxParentDisable.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxPopupWhenBodyScrolls.java19
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxReapperingOldValue.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSQLContainerFilteredValueChange.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxScrollingToPageDisabled.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxScrollingWithArrows.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSelectingWithNewItemsAllowed.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSetNullWhenNewItemsAllowed.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSlowInFF.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionOnDetach.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPageLength.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidth.java19
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthLegacy.java16
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthPercentage.java16
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthPixels.java16
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxTextFieldEventOrder.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxUndefinedWidthAndIcon.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxValoDoubleClick.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxValueInput.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboPushTiming.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboSelectedValueBeyondTheFirstDropdownPage.java7
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboboxInPopupViewWithItems.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboboxMenuBarAutoopen.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboboxPageLengthZeroScroll.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboboxPrimaryStyleNames.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboboxStyleChangeWidth.java11
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/Comboboxes.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/FilteringTurkishLocale.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/PopUpWidth.java7
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/customcomponent/CustomComponentChildVisibility.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/customcomponent/CustomComponentHideContent.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/customcomponent/EmbeddedInCustomComponent.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/customfield/AbstractNestedFormExample.java13
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/customfield/AddressField.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/customfield/AddressFormExample.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/customfield/CustomFieldSize.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/customfield/EmbeddedForm.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/customfield/NestedPersonForm.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/customlayout/CustomLayoutUsingTemplate.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/customlayout/CustomLayoutUsingTheme.java5
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/customlayout/CustomLayoutWithMissingSlot.java18
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/customlayout/CustomLayoutWithNullTemplate.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/customlayout/CustomLayoutWithoutTemplate.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/AriaDisabled.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/CommitInvalid.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/CustomDateFormatEEE.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/CustomDateFormats.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldChangeResolution.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldClose.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldDiscardValue.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldExtendedRange.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldFastForward.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldInSubWindow.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldKeyboardInput.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldPopupClosing.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldPopupClosingOnDetach.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldPopupOffScreen.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldPopupPosition.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldPrimaryStyleNames.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldRangeValidation.java56
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldRanges.java13
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldTest.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldWhenChangingValueAndEnablingParent.java7
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/DateRangeWithSqlDate.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/DefaultDateFieldPopupPosition.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/DefaultHandleUnparsableDateField.java7
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/DisabledDateFieldPopup.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/DisabledInlineDateField.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/DisabledParentLayout.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/DynamicallyChangeDateRange.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/InlineDateFields.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/LenientMode.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/LocaleChange.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/LowResolution.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/PopupClosingWithEsc.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/PopupDateFieldInputPrompt.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/PopupDateFieldTextEnabled.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/PopupDateFieldValueChangeEvents.java16
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/PopupDateFields.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/ValoDateFieldPopupPosition.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropBatchUpload.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropFocusObtain.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropRelativeWidth.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropTextArea.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/DragStartModes.java5
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/SingleUseDragAndDropUpload.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/embedded/EmbeddedAltText.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/embedded/EmbeddedClickListenerRelativeCoordinates.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/embedded/EmbeddedImageRefresh.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/embedded/EmbeddedThemeResource.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/embedded/EmbeddedTooltip.java7
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/form/FormClearDatasourceRepaint.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/form/FormCommitWithInvalidValues.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/form/FormDescription.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/form/FormErrorVisible.java9
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/form/FormFieldCaptions.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/form/FormNotGettingSmaller.java11
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/form/FormPrimaryStyleName.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/form/FormTest.java22
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/form/FormTooltips.java7
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/form/FormWithPropertyFormatterConnected.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/formlayout/FormLayoutClickListener.java18
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/formlayout/FormLayoutErrorHover.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/formlayout/FormLayoutInVerticalLayout.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/formlayout/FormLayoutResizing.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/formlayout/FormLayouts.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/formlayout/HtmlCaptionInFormLayout.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/formlayout/StylePrefix.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/BeanRenderer.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/CustomRenderer.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridAddAndRemoveDataOnInit.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridAddRow.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridCellFocusOnResetSize.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridCheckBoxDisplay.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridClientDataChangeHandler.java9
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridColspans.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridColumnAutoExpand.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridColumnAutoWidth.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridColumnAutoWidthClient.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridColumnExpand.java9
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridColumnWidthRecalculation.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridColumnWidthsWithoutData.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridCustomSelectionModel.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridDataSourceReset.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridDefaultSelectionMode.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridDetailsDetach.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridDetailsLayoutExpand.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridDetailsLocation.java18
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridDetailsWidth.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridDragAndDrop.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridDragSelectionWhileScrolled.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridEditingWithNoScrollBars.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridEditorConverterNotFound.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridEditorCustomField.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridEditorFrozenColumnsUI.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridEditorUI.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridExtensionCommunication.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridFastAsyncUpdate.java15
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridGeneratedProperties.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridHeaderFooterComponents.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridHeaderFormatChange.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridHeaderStyleNames.java30
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridInGridLayout.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridInTabSheet.java17
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridInWindowResize.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridInitiallyHiddenColumns.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridItemSetChange.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridLayoutDetailsRow.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridMultiSelectionOnInit.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridMultiSelectionScrollBar.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridRendererChange.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridReplaceContainer.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridResizeAndScroll.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridResizeHiddenColumn.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridResizeTerror.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridRowHeightChange.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridScrollToLineWhileResizing.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridScrolling.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridSidebarPosition.java9
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridSingleColumn.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridSortIndicator.java19
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridSubPixelProblemWrapping.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridSwitchRenderers.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridThemeChange.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridThemeUI.java16
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridWidgetRendererChange.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridWidthIncrease.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridWithBrokenRenderer.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridWithLabelEditor.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridWithoutRenderer.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/InitialFrozenColumns.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/IntArrayRenderer.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/JavaScriptRenderers.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/JavaScriptStringRenderer.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/MyBeanJSRenderer.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/NullHeaders.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/NullRenderers.java62
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/PersonTestGrid.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/RowAwareRenderer.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/SelectDuringInit.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/SortableHeaderStyles.java19
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/WidgetRenderers.java41
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/EscalatorBasicClientFeatures.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/EscalatorUpdaterUi.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/GridBasicClientFeatures.java5
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/GridBasicFeatures.java218
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/GridBasicFeaturesValo.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/GridClientDataSources.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/GridDefaultTextRenderer.java9
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/GridHeightByRowOnInit.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/GridSidebarFeatures.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/GridSortingIndicators.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/server/GridClearContainer.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/declarative/GridDeclarativeBasicFeatures.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/declarative/GridDeclarativeMultiSelect.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/declarative/GridItemEditor.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/gridlayout/ComponentAlignments.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutAlignments.java19
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutCaptionAlignment.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutExtraSpacing.java15
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutFocusOrderAfterShowChild.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutFractionalSizeAndAlignment.java9
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutHideMiddleCells.java40
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutInForm.java20
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutRequiredIndicatorLocation.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutScrollPosition.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutWithNonIntegerWidth.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/gridlayout/InsertRowInMiddle.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/gridlayout/LayoutAfterHidingError.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/gridlayout/UniformGridLayoutUI.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/image/ImageAltText.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/image/ImageClicks.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/javascriptcomponent/BasicJavaScriptComponent.java16
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/javascriptcomponent/JavaScriptNoLayoutHandlingUI.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/javascriptcomponent/JavaScriptPreloading.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/javascriptcomponent/JavaScriptResizeListener.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/label/LabelModes.java15
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/label/LabelTest.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/label/Labels.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/label/MarginsInLabels.java7
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/layout/EmptySpaceOnPageAfterExpandedComponent.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/link/LinkIcon.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/link/LinkTargetSize.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/link/LinkTest.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/listselect/ListSelectAddRemoveItems.java9
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/listselect/ListSelectAllowNewItem.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/listselect/ListSelectPrimaryStylename.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/listselect/ListSelectPushSelectionChanges.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/loginform/LoginFormTest.java6
-rwxr-xr-xuitest/src/main/java/com/vaadin/tests/components/loginform/LoginFormUIInLoginHandler.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/media/AudioTest.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/media/Media.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarClickOpenedMenu.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarFocus.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarNavigation.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarRunsOutOfBrowser.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarSubmenusClosingValo.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarTest.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarTooltipsNearEdge.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarsWithNesting.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/menubar/MenuItemStyleRemoved.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/menubar/MenuTooltip.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/menubar/SpaceMenuBarNavigation.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/nativebutton/NativeButtonClick.java22
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/nativebutton/NativeButtonHtml.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/nativebutton/NativeButtonIconAndText.java31
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/notification/MiddleNotificationPosition.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/notification/NotificationDelay.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/notification/Notifications.java7
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/notification/NotificationsHtmlAllowed.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/optiongroup/DisabledOptionGroupItems.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/optiongroup/OptionGroupDisabled.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/optiongroup/OptionGroupMultipleValueChange.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/optiongroup/OptionGroupRetainFocusKeyboardValueChange.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/optiongroup/OptionGroups.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/optiongroup/ReadOnlyOptionGroup.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/orderedlayout/BoxLayoutTest.java59
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/orderedlayout/CaptionLeak.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/orderedlayout/ErrorIndicator.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/orderedlayout/ExpandChangeReattach.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/orderedlayout/HorizontalLayoutFullsizeContentWithErrorMsg.java11
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/orderedlayout/HorizontalLayoutTest.java4
-rwxr-xr-xuitest/src/main/java/com/vaadin/tests/components/orderedlayout/HorizontalRelativeSizeWithoutExpand.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/orderedlayout/LayoutClickListenerTest.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/orderedlayout/LayoutRenderTimeTest.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/orderedlayout/LayoutResizeTest.java27
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/orderedlayout/NestedLayoutCaptionHover.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/orderedlayout/OrderedLayoutCases.java84
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/orderedlayout/OrderedLayoutComponentOrdering.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/orderedlayout/OrderedLayoutInfiniteLayoutPasses.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/orderedlayout/RelativeChildrenWithoutExpand.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/orderedlayout/SpacingLeak.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/orderedlayout/TooltipOnRequiredIndicator.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VaadinTunesLayout.java21
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VerticalLayoutFocusWithDOMChanges.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VerticalLayoutTest.java4
-rwxr-xr-xuitest/src/main/java/com/vaadin/tests/components/orderedlayout/VerticalRelativeSizeWithoutExpand.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/page/PageTitle.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/panel/BasicPanelTest.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/panel/PanelChangeContents.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/panel/PanelClickListenerRelativeCoordinates.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/panel/PanelConcurrentModificationException.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/panel/PanelRemoveShortcutListener.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/panel/PanelShouldRemoveActionHandler.java13
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/panel/UndefinedSizeScrollbars.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/panel/WebkitScrollbarTest.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/popupview/DisabledPopupView.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewAndFragment.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewCaption.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewClickShortcut.java25
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewInEmbeddedApplication.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewLabelResized.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewNullValues.java36
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewResizeWhileOpen.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewShortcutActionHandler.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewWithExtension.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/popupview/ReopenPopupView.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressBarStaticReindeer.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressBarStaticRuno.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressBarTest.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressIndicatorInvisible.java16
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressIndicatorTest.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/richtextarea/RichTextAreaPreventsTextFieldAccess.java15
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/richtextarea/RichTextAreaRelativeHeightResize.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/select/AbstractSelectTestCase.java11
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/select/ComboBoxAddWhileFiltering.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/select/EnumSelect.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/select/OptionGroupBaseSelects.java38
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/select/SelectDisplaysOldValue.java18
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/select/SelectIconPlacement.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/select/SelectItemCaptionRefresh.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/select/SelectWithIntegers.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/select/StylingPopupOpener.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/slider/HiddenSliderHandle.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/slider/SliderDisable.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/slider/SliderFeedback.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/slider/SliderPrimaryStyleName.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/slider/SliderResize.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/slider/SliderUpdateFromValueChange.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/splitpanel/AbstractSplitPanelTest.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/splitpanel/HorizontalSplitPanelHeight.java20
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/splitpanel/HorizontalSplitPanels.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/splitpanel/RetainSplitterPositionWhenOutOfBounds.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelDuplicateStyleName.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelExtraScrollbars.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelMoveComponent.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelSplitterWidth.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelStyleLeak.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelWithMinimumAndMaximum.java126
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPositionChange.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/splitpanel/VerticalSplitPanels.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/AddSelectionToRemovedRange.java11
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/AsyncPushUpdates.java17
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/CellStyleGeneratorTest.java5
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/ColumnCollapsingAndColumnExpansion.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/ColumnResizeEvent.java21
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/ColumnWidthsAfterChangeTableColumnsCountOrOrder.java11
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/ContainerSizeChangeDuringTablePaint.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/ContextMenuSize.java11
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/DelayedColumnLayouting.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/DndEmptyTable.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/DndTableTargetDetails.java16
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/EditableModeChange.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/EmptyRowsWhenScrolling.java33
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/EmptyTable.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/ExpandingContainer.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/FocusOnSelectedItem.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/Footer.java15
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/FooterClick.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/HeaderClick.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/HeaderFooterClickLeftRightMiddle.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/HeaderPositionWhenSorting.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/HeaderRightClickAfterDrag.java13
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/HeaderUpdateWhenNoRows.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/HiddenColumnsExpandRatios.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/HiddenComponentCells.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/ItemClickEvents.java19
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/KeyControl.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/KeyboardNavigationWithChangingContent.java35
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/LabelEmbeddedClickThroughForTable.java22
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/LargeSelectionCausesNPE.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/LastColumnNegative.java7
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/LeftColumnAlignment.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/LongMultiselect.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/ModifyContainerProperty.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/MultiSelectWithRemovedRow.java9
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/OddEvenRowStyling.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/PopupViewInTable.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/PropertyValueChange.java9
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/RefreshRenderedCellsOnlyIfAttached.java18
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/ReloadWidgets.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/RowAdditionTest.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/RowUpdateShouldRetainContextMenu.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/SelectAllConstantViewport.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/SelectAllRows.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/SelectAllRowsShiftFirst.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/SetCurrentPageFirstItemIndex.java19
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/SetPageFirstItemLoadsNeededRowsOnly.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/ShowLastItem.java9
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/SortLabelsInTable.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/SortableHeaderStyles.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableAfterRemovingExpandRatios.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableAndBrowserContextMenu.java7
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableBlurFocus.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableChildMeasurementHint.java19
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableClickAndDragOnIconAndComponents.java16
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableClickValueChangeInteraction.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableColumnAddAndResize.java18
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableColumnWidthsAndSorting.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableContextMenu.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableContextMenuOnField.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableContextMenuTouch.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableExtraScrollbars.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableHeightWhenHidingHeaders.java5
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableItemDescriptionGeneratorUI.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableJumpUI.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableMatchesMouseDownMouseUpElement.java11
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableMoveFocusWithSelection.java17
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableMultiSelectSimple.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableNavigationPageDown.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableParentEnabledStateChange.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableReduceContainerSize.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableRemovedQuicklySendsInvalidRpcCalls.java15
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableRepairsScrollPositionOnReAddingAllRows.java9
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableRequiredIndicator.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableRowHeight.java7
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableRowHeight2.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableRowHeight3.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableRowScrolledBottom.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableScrollAfterAddRow.java26
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableScrollUpOnSelect.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableScrollingWithSQLContainer.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableSelectPagingOff.java7
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableSetUndefinedSize.java28
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableShouldNotEatValueChanges.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableSizeInTabsheet.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableSorting.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableSortingIndicator.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableSqlContainer.java24
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableToggleColumnVisibility.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableToggleColumnVisibilityWidth.java9
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableToggleVisibility.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableTooManyColumns.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableUndefinedSize.java20
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableUnregisterComponent.java9
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableWidthItemRemove.java17
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableWithBrokenGeneratorAndContainer.java27
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableWithChildComponents.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableWithContainerRequiringEqualsForItemId.java30
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableWithCustomConverterFactory.java7
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableWithNoncollapsibleColumns.java28
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableWithPolling.java11
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/Tables.java88
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TabletContextMenu.java9
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TestCurrentPageFirstItem.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/UnnecessaryScrollbarWhenZooming.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/ValueAfterClearingContainer.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleInTabsheet.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tabsheet/HtmlInTabCaption.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tabsheet/NewSelectionAfterTabRemove.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tabsheet/PreventTabChange.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabBarWidth.java13
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabGetAndReplaceComponent.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabKeyboardNavigation.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSelectionRevertedByServer.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetCaptions.java9
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetClose.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetErrorTooltip.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetFocusing.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetHotKeysWithModifiers.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetInDisabledParent.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetInSplitPanel.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetIndexOperations.java5
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetScrollOnTabClose.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetTabStyleNames.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetTabTheming.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetTest.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetWithHasComponent.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetWithTabIds.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSpaceNotScroll.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabsheetNotEnoughHorizontalSpace.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabsheetScrolling.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabsheetShouldUpdateHeight.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tabsheet/VerticalScrollbarPosition.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tabsheet/VetoTabChange.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/textarea/ScrollCursor.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/textarea/TextAreaCursorPosition.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/textarea/TextAreaSizeResetted.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/textfield/AutomaticImmediate.java24
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/textfield/BigDecimalTextField.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/textfield/EnterShortcutMaySendInputPromptAsValue.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/textfield/EnumTextField.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/textfield/InputPromptAndCursorPosition.java19
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/textfield/InputPromptGetText.java32
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/textfield/OutOfSyncIssueWithKeyboardShortcut.java5
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/textfield/RequiredTextField.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/textfield/SelectionAndCursorPosition.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/textfield/SetTabIndex.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/textfield/TextChangeEvents.java11
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/textfield/TextChangeEvents2.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/textfield/TextChangeListenerChangingNonTextProperties.java7
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldEmptyingPrompt.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldFocusAndBlurListeners.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldInLayoutInTable.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldTest.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldTruncatesUnderscoresInModalDialogs.java13
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tree/DndTreeTargetDetails.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tree/TreeConnectors.java20
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tree/TreeFiltering.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tree/TreeHtmlContentAllowed.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tree/TreeKeyboardNavigationScrolls.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tree/TreeKeyboardNavigationToNone.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tree/TreeNodeCaptionWrapping.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tree/TreeToolTips.java15
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tree/Trees.java15
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/treetable/ChangeDataSourcePageLengthZero.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/treetable/DisappearingComponents.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/treetable/DynamicallyModified.java36
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/treetable/ExpandAnimationsInChameleon.java15
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/treetable/KeepAllItemsVisible.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/treetable/MinimalWidthColumns.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/treetable/ProgrammaticCollapse.java17
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/treetable/ProgrammaticSelect.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/treetable/RemoveAllItemsRefresh.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableCacheOnPartialUpdates.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableExtraScrollbar.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableExtraScrollbarWithChildren.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableItemDescriptionGeneratorUI.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableModifyAndSetCollapsed.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableOutOfSync.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTablePartialUpdates.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTablePartialUpdatesPageLength0.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableRowGenerator.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableRowHeaderMode.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableRowIcons.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableScrollOnExpand.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableTest.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/ui/ComboboxSelectedItemText.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/ui/CurrentUiRetained.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/ui/CustomUITest.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/ui/DynamicViewport.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/ui/InvalidViewport.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/ui/LazyInitUIs.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/ui/MultiFileUploadTest.java13
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/ui/MultipleUIUploadTest.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/ui/PollListening.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/ui/StaticViewport.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/ui/TextAreaEventPropagation.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/ui/TimeoutRedirectResetsOnActivity.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/ui/UIAccess.java66
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/ui/UIAccessExceptionHandling.java55
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/ui/UIAutoGeneratedStyleName.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/ui/UIInitTest.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/ui/UIPolling.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/ui/UIRefresh.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/ui/UISerialization.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/ui/UiDependenciesInHtml.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/ui/UnnecessaryPaddingInResponsiveUI.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/ui/UriFragment.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/ui/WindowAndUIShortcuts.java15
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/uitest/BackButtonTest.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/uitest/TestSampler.java5
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/uitest/components/EmbeddedCssTest.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/uitest/components/LayoutsCssTest.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/uitest/components/SelectsCssTest.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/uitest/components/TabSheetsCssTest.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/uitest/components/TablesCssTest.java7
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/uitest/components/TextFieldsCssTest.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/uitest/components/TreeCssTest.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/uitest/components/WindowsCssTest.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/upload/TestFileUpload.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/upload/TestFileUploadSize.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/upload/TestImmediateUploadInFormLayout.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/upload/UploadImmediateButtonWidth.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/upload/UploadNoSelection.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/upload/UploadTitleWithTooltip.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/BackspaceKeyWithModalOpened.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/BottomComponentScrollsUp.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/CenteredInVisualViewport.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/CloseModalSubWindow.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/ComboboxScrollableWindow.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/DownloadAndUpdate.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/ExtraWindowShown.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/ExtraWindowShownWaiAria.java20
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/GridInWindow.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/LegacyWindowOpenTest.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/LongNotifications.java13
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/MaximizeRestoreWindowWithManagedLayout.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/MaximizedWindowOrder.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/ModalWindowFocus.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/ModalWindowInitialLocation.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/MoveToTop.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/OpenModalWindowAndFocusField.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/PageOpenTest.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/ScrollingBodyElementWithModalOpened.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/SubWindowFocus.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/SubWindowFocusAndBlurListeners.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/SubWindowWithUndefinedHeight.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/TestTooSmallSubwindowSize.java48
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/ToolTipInWindow.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/UncloseableWindowCloseShortcut.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/WindowCaption.java9
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/WindowCloseShortcuts.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/WindowInUiWithNoContent.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/WindowMaximizeRestoreTest.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/WindowMoveListener.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/WindowScrollingComponentIntoView.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/WindowShouldRemoveActionHandler.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/WindowThemes.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/containers/BeanItemContainerFilteringTest.java30
-rw-r--r--uitest/src/main/java/com/vaadin/tests/containers/BeanItemContainerTest.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/containers/IndexedContainerFilteringTest.java22
-rw-r--r--uitest/src/main/java/com/vaadin/tests/containers/TableWithFileSystemContainer.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/containers/TestItemSorter.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/containers/filesystemcontainer/FileSystemContainerInTreeTable.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/containers/sqlcontainer/CheckboxUpdateProblem.java15
-rw-r--r--uitest/src/main/java/com/vaadin/tests/containers/sqlcontainer/DatabaseHelper.java36
-rw-r--r--uitest/src/main/java/com/vaadin/tests/containers/sqlcontainer/MassInsertMemoryLeakTestApp.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/containers/sqlcontainer/TableQueryWithNonUniqueFirstPrimaryKey.java15
-rw-r--r--uitest/src/main/java/com/vaadin/tests/contextclick/AbstractContextClickUI.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/contextclick/BrowserContextMenuInSubComponent.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/contextclick/GridContextClick.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/contextclick/TableContextClick.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/contextclick/TreeContextClick.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/contextclick/TreeTableContextClick.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/converter/ConverterThatEnforcesAFormat.java9
-rw-r--r--uitest/src/main/java/com/vaadin/tests/converter/StringToDoubleConverterWithThreeFractionDigits.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/data/bean/Country.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/data/bean/Person.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/dd/AcceptAnythingWindow.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/dd/AcceptFromComponent.java9
-rw-r--r--uitest/src/main/java/com/vaadin/tests/dd/ActiveDragSourceClassName.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/dd/CustomDDImplementation.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/dd/DDInterrupt.java5
-rw-r--r--uitest/src/main/java/com/vaadin/tests/dd/DDTest1.java27
-rw-r--r--uitest/src/main/java/com/vaadin/tests/dd/DDTest2.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/dd/DDTest4.java23
-rw-r--r--uitest/src/main/java/com/vaadin/tests/dd/DDTest5.java24
-rw-r--r--uitest/src/main/java/com/vaadin/tests/dd/DDTest6.java51
-rw-r--r--uitest/src/main/java/com/vaadin/tests/dd/DDTest7.java32
-rw-r--r--uitest/src/main/java/com/vaadin/tests/dd/DDTest8.java21
-rw-r--r--uitest/src/main/java/com/vaadin/tests/dd/DragAndDropFiles.java27
-rw-r--r--uitest/src/main/java/com/vaadin/tests/dd/DragDropPane.java19
-rw-r--r--uitest/src/main/java/com/vaadin/tests/dd/HorizontalLayoutSortableWithWrappers.java16
-rw-r--r--uitest/src/main/java/com/vaadin/tests/dd/HorizontalSortableCssLayoutWithWrappers.java7
-rw-r--r--uitest/src/main/java/com/vaadin/tests/dd/MyDragSourceConnector.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/dd/MyDropTargetConnector.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/dd/NotPaintedAcceptSource.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/dd/NotPaintedAcceptSourceInTabSheet.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/dd/StartHtml5Drag.java17
-rw-r--r--uitest/src/main/java/com/vaadin/tests/dd/TreeDragStart.java17
-rw-r--r--uitest/src/main/java/com/vaadin/tests/dd/VMyDragSource.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/dd/VMyDropTarget.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/debug/HierarchyAfterAnalyzeLayouts.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/debug/PreserveCustomDebugSectionOpen.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/debug/ProfilerZeroOverhead.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/debug/PushVersionInfo.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/declarative/DeclarativeEditor.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/declarative/Potus.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/declarative/PotusCrud.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/declarative/PotusCrudUI.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/declarative/PotusForm.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/errorhandler/ErrorHandlers.java16
-rw-r--r--uitest/src/main/java/com/vaadin/tests/extensions/BasicExtension.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/extensions/BasicExtensionTest.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/extensions/BrowserPopupExtensionTest.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/extensions/HelloWorldExtension.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/extensions/HelloWorldExtensionTest.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/extensions/IframeIsOpenedInNonIOS.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/extensions/JavascriptManagerTest.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/extensions/LayoutMemoryUsageIE8Extension.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/extensions/ResponsiveUI.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/extensions/ResponsiveWithCrossDomainStyles.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/extensions/SetThemeAndResponsiveLayout.java11
-rw-r--r--uitest/src/main/java/com/vaadin/tests/extensions/SimpleJavaScriptExtensionTest.java30
-rw-r--r--uitest/src/main/java/com/vaadin/tests/fieldgroup/AbstractBasicCrud.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicCrudGrid.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicCrudGridEditorRow.java22
-rw-r--r--uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicCrudTable.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicPersonForm.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/fieldgroup/ComplexAddress.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/fieldgroup/ComplexPerson.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/fieldgroup/Country.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/fieldgroup/DateForm.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/fieldgroup/FieldBinderWithBeanValidation.java9
-rw-r--r--uitest/src/main/java/com/vaadin/tests/fieldgroup/FormBuilderWithNestedProperties.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/fieldgroup/FormWithNestedProperties.java7
-rw-r--r--uitest/src/main/java/com/vaadin/tests/fieldgroup/Gender.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/fieldgroup/MultipleValidationErrors.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/fonticon/FontIcons.java24
-rw-r--r--uitest/src/main/java/com/vaadin/tests/integration/FlagSeResource.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/integration/JSR286Portlet.java31
-rw-r--r--uitest/src/main/java/com/vaadin/tests/integration/LiferayThemeDemo.java44
-rw-r--r--uitest/src/main/java/com/vaadin/tests/integration/PortletSizeInLiferayFreeformLayoutApplication.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/integration/ProxyTest.java20
-rw-r--r--uitest/src/main/java/com/vaadin/tests/integration/ServletIntegrationDefaultPushUI.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/integration/ServletIntegrationLongPollingUI.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/integration/ServletIntegrationStreamingUI.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/integration/ServletIntegrationWebsocketUI.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layoutmanager/LayoutDuringStateUpdate.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayouts.java13
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayoutsWaiAria.java13
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/CssLayoutAbsoluteUrl.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/GridLayoutCaptions.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/GridLayoutExpandRatioModification.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/GridLayoutInsidePanel.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/GridLayoutSpanExpansion.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/HiddenHorizontalLayout.java13
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/HorizontalLayoutAndCaretPosition.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/HorizontalLayoutWithLabelAndButton.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/HtmlInCaption.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/IE8MeasuredSizeMemoryLeak.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/LayoutPerformanceTests.java25
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/MarginWithExpandRatio.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/MovingComponentsWhileOldParentInvisible.java13
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/OrderedLayoutBasics.java110
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/RelativeSizeInUndefinedCssLayout.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/TestAbsoluteLayout.java21
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/TestLayoutClickListeners.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/VerticalLayoutExpandRatioModification.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/VerticalLayoutWithRelativeSizeComponentsInitiallyHidden.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/customlayout/DefaultLocationInCustomLayout.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/gridlayout/GridLayoutMoveComponent.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/gridlayout/GridSpanEmptyColumns.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/layouttester/BaseAddReplaceMove.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/layouttester/BaseLayoutTestUI.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/layouttester/GridLayout/GridAddReplaceMove.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/broadcastingmessages/Broadcaster.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v70/CookieMonsterUI.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v70/SimpleLoginUI.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v70/SimpleLoginView.java15
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v71beta/CSSInjectWithColorpicker.java47
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7_3/ThemeChangeUI.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/ConfiguringColumnWidths.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/ConfiguringGridHeadersAndFooters.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/FormattingDataInGrid.java13
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/GridExampleBean.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/GridExampleHelper.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/ShowingInlineDataInGrid.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/UsingGridWithAContainer.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7_5/ShowingExtraDataForRows.java13
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/AutoGeneratingForm.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/BasicApplication.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/CreatingPreserveState.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/DefineUITheme.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/DifferentFeaturesForDifferentClients.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/DynamicImageUI.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/FindCurrentUI.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/FormUsingExistingLayout.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/IntegerTextFieldDataSource.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/MultiTabApplication.java16
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/StringMyTypeConverter.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/UsingBeanValidation.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/UsingUriFragments.java16
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/UsingXyzWhenInitializing.java16
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/ComponentInStateComponent.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/ComponentInStateUI.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/MyComponent.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/MyComponentUI.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/MyPickerConnector.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/ResourceInStateComponent.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/ResourceInStateUI.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/WidgetContainer.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/Analytics.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/AnalyticsUI.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/CapsLockWarning.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/CapsLockWarningUI.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/ComplexTypesBean.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/ComplexTypesComponent.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/ComplexTypesRpc.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/ComplexTypesUI.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/Flot.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/FlotHighlightRpc.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/FlotJavaScriptUI.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/JSAPIUI.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/RedButton.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/RedButtonUI.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/RefresherTestUI.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7b1/Addition.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7b1/AxessingWebPageAndBrowserInfoUI.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7b1/BootstrapListenerCode.java17
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7b1/CapsLockWarningWithRpc.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7b1/ReducingRoundTrips.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7b2/CleanupUI.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7b5/HandlingLogout.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7b5/SettingReadingSessionAttributesUI.java26
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7b6/LettingUserDownloadFile.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7b6/MyPopupUI.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7b6/OpeningUIInPopup.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7b9/LoginView.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7b9/MainView.java16
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7b9/MainViewEarlierExample.java16
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7b9/MainView__LastNavigatorExample.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/minitutorials/v7b9/NavigationtestUI.java18
-rw-r--r--uitest/src/main/java/com/vaadin/tests/navigator/NavigatorTest.java15
-rw-r--r--uitest/src/main/java/com/vaadin/tests/navigator/NavigatorViewBlocksBackButtonAction.java16
-rw-r--r--uitest/src/main/java/com/vaadin/tests/overlays/OverlayTouchScrolling.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/performance/BasicPerformanceTest.java16
-rw-r--r--uitest/src/main/java/com/vaadin/tests/push/BarInUIDL.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/push/BasicPush.java9
-rw-r--r--uitest/src/main/java/com/vaadin/tests/push/BasicPushLongPolling.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/push/BasicPushStreaming.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/push/BasicPushWebsocket.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/push/BasicPushWebsocketXhr.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/push/EnableDisablePush.java29
-rw-r--r--uitest/src/main/java/com/vaadin/tests/push/ExtremelyLongPushTime.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/push/ExtremelyLongPushTimeLongPolling.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/push/ExtremelyLongPushTimeStreaming.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/push/ExtremelyLongPushTimeWebsocket.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/push/ManualLongPollingPushUI.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/push/PushConfiguration.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/push/PushConfigurator.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/push/PushErrorHandling.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/push/PushFromInit.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/push/PushLargeData.java11
-rw-r--r--uitest/src/main/java/com/vaadin/tests/push/PushLargeDataLongPolling.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/push/PushLargeDataStreaming.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/push/PushLargeDataWebsocket.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/push/PushWithRequireJS.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/push/RefreshCloseConnection.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/push/RoundTripTest.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/push/StreamingReconnectWhilePushing.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/push/TablePushStreaming.java16
-rw-r--r--uitest/src/main/java/com/vaadin/tests/push/TogglePush.java23
-rw-r--r--uitest/src/main/java/com/vaadin/tests/push/TrackMessageSizeUI.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/requesthandlers/AppResource404.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/requesthandlers/CommunicationError.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/resources/CachingJavaScriptComponent.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/resources/DownloadLargeFileResource.java7
-rw-r--r--uitest/src/main/java/com/vaadin/tests/resources/DownloadWithPush.java1
-rw-r--r--uitest/src/main/java/com/vaadin/tests/resources/NonExistingFileResource.java5
-rw-r--r--uitest/src/main/java/com/vaadin/tests/resources/PublishedFileHandlerCaching.java18
-rw-r--r--uitest/src/main/java/com/vaadin/tests/resources/ResourceDownload.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/rpclogger/LoggingServerRpcHandler.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/rpclogger/LoggingUidlRequestHandler.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/rpclogger/RPCLoggerService.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/rpclogger/RPCLoggerServlet.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/rpclogger/RPCLoggerUI.java21
-rw-r--r--uitest/src/main/java/com/vaadin/tests/serialization/ChangeStateWhenReattaching.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/serialization/DelegateToWidgetTest.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/serialization/DelegateWithoutStateClassTest.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/serialization/EncodeResultDisplay.java9
-rw-r--r--uitest/src/main/java/com/vaadin/tests/serialization/GenericWidgetHandling.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/serialization/LegacySerializerUI.java13
-rw-r--r--uitest/src/main/java/com/vaadin/tests/serialization/NoLayout.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/serialization/SerializerNamespaceTest.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/serialization/SerializerTest.java118
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/CSSInjectTest.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/LegacyComponentThemeChange.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/ThemeChangeFavicon.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/ThemeChangeOnTheFly.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/AlignTopIconInButton.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/ButtonsAndLinks.java20
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/CalendarTest.java33
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/CheckBoxes.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/CollapsibleTableColumn.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/ColorPickers.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/ComboBoxes.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/CommonParts.java86
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/ContrastFontColor.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/DateFields.java13
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/DisabledLabel.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/Dragging.java42
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/FormLayoutInsideTable.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/Forms.java18
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/ImmediateUpload.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/Labels.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/MenuBars.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/NativeSelects.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/NotificationStyle.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/Panels.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/PopupViews.java18
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/ResponsiveStyles.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/ResponsiveStylesDesign.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/Sliders.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/SplitPanels.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/StringGenerator.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/TableWithEmptyCaption.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/Tabsheets.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/TestIcon.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/TextFieldBevel.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/TextFields.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/Trees.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/ValoDefaultCaptionWidth.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/ValoMenuLayout.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/ValoThemeUI.java60
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket1230.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket1245.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket1365.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket1397.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket1435.java11
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket1506_Panel.java5
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket1506_TestContainer.java16
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket1506_TestContainer2.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket1589.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket1598.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket1632.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket1659.java11
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket1663.java7
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket1710.java61
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket1737.java7
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket1804.java23
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket1806.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket1834PanelScrolling.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket1857.java9
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket1878.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket1900.java16
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket1921.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket1923.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket1939.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket1966.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket1969.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket1970.java18
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket1975.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket1982.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket1983.java35
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket1995.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket20.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket2009.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket2014.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket2021.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket2023.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket2024.java7
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket2038.java9
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket2048.java7
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket2053.java28
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket2061.java11
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket2061b.java11
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket2061c.java11
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket2083.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket2095.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket2103.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket2104.java42
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket2106.java5
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket2107.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket2117.java9
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket2119.java17
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket2125.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket2126.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket2179.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket2181.java9
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket2186.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket2232.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket2242.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket2244.java16
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket2292.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket2297.java16
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket2303.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket2339.java11
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket2344.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket2365.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket2411.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket2426.java7
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket2431.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket2742.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket2998.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket34.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket5952.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket6002.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket677.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket695.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket736.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tickets/Ticket846.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tooltip/AdjacentElementsWithTooltips.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tooltip/DragAndDropWrapperTooltips.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tooltip/MenuBarTooltip.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tooltip/SliderTooltip.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tooltip/TooltipConfiguration.java7
-rw-r--r--uitest/src/main/java/com/vaadin/tests/tooltip/TooltipWidthUpdating.java5
-rw-r--r--uitest/src/main/java/com/vaadin/tests/urifragments/FragmentHandlingAndAsynchUIUpdate.java13
-rw-r--r--uitest/src/main/java/com/vaadin/tests/util/LargeContainer.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/util/LogPrintWriter.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/util/Person.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/util/PersonContainer.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/util/ResizeTerrorizer.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/util/Role.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/util/SampleDirectory.java19
-rw-r--r--uitest/src/main/java/com/vaadin/tests/util/TestDataGenerator.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/util/TestUtils.java93
-rw-r--r--uitest/src/main/java/com/vaadin/tests/util/User.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/vaadincontext/BootstrapModifyUI.java9
-rw-r--r--uitest/src/main/java/com/vaadin/tests/validation/EmptyFieldErrorIndicators.java7
-rw-r--r--uitest/src/main/java/com/vaadin/tests/validation/FieldErrorIndication.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/validation/TestValidators.java20
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/TestingWidgetSet.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/AbstractSuperclassForBean.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/BasicExtensionTestConnector.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/BeanWithAbstractSuperclass.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/ClientRpcClassConnector.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/ClientRpcClassWidget.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/ComplexTestBean.java12
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/CustomUIConnector.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/CustomUIConnectorRpc.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/DelegateConnector.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/DelegateState.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/DelegateWidget.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/DelegateWithoutStateClassConnector.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/DummyLabelConnector.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/EncoderResultDisplayConnector.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/GenericWidget.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/GenericWidgetConnector.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/GenericWidgetState.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/IdTestLabelConnector.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/IntermediateReplaceConnector.java11
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/LabelState.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/LayoutDetectorConnector.java13
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/LayoutDuringStateUpdateConnector.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/LayoutMemoryUsageIE8ExtensionConnector.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/LegacySerializerConnector.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/MissingFromDefaultWidgetsetConnector.java15
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/MockApplicationConnection.java15
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/MockServerCommunicationHandler.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/MockServerMessageHandler.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/NoLayoutRpc.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/ProfilerCompilationCanary.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/ReplacedConnector.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/ReplacingConnector.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/ResizeTerrorizerControlConnector.java26
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/RoundTripTesterConnector.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/RoundTripTesterRpc.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/RunOverflowFixConnector.java28
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/ScrollableGridLayoutConnector.java9
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/SerializerTestConnector.java129
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/SerializerTestRpc.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/SerializerTestState.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/SimpleTestBean.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/TestWidgetConnector.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/TestingWidgetsetEntryPoint.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/UseStateFromHierachyChangeConnector.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/UseStateFromHierachyChangeConnectorState.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/VExtendedTextArea.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/VIdTestLabel.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/WidgetUtilTestConnector.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/WidgetUtilTestWidget.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/csrf/CsrfButtonConnector.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/dd/SpacebarPannerConnector.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/extension/BrowserContextMenuExtensionConnector.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/EscalatorBasicClientFeaturesWidget.java102
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/EscalatorProxy.java16
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridBasicClientFeaturesWidget.java218
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridCellFocusOnResetSizeWidget.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridClickExtensionConnector.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridClientColumnRendererConnector.java35
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridClientDataSourcesWidget.java28
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridColumnAutoWidthClientWidget.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridDataChangeHandlerWidget.java18
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridDefaultTextRendererWidget.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridHeightByRowOnInitWidget.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridRendererChangeWidget.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/IntArrayRendererConnector.java9
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/MySelectionModelConnector.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/PojoRendererConnector.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/PureGWTTestApplication.java32
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/RowAwareRendererConnector.java9
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/gwtrpc/GwtRpcButtonConnector.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/gwtrpc/GwtRpcServiceTestAsync.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/helloworldfeature/GreetAgainRpc.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/helloworldfeature/HelloWorldExtensionConnector.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/helloworldfeature/HelloWorldRpc.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/helloworldfeature/HelloWorldState.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7a2/ComponentInStateState.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7a2/ComponentInStateStateConnector.java11
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7a2/MyComponentConnector.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7a2/MyComponentWidget.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7a2/ResourceInStateConnector.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7a2/WidgetContainerConnector.java7
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7a3/ClientSideModule.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7b1/CapsLockWarningRpc.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7b1/CapsLockWarningWithRpcConnector.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/rebind/TestWidgetRegistryGenerator.java9
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/server/ClientRpcClass.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/server/ClientRpcClassComponent.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/server/DelegateToWidgetComponent.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/server/DelegateWithoutStateClassComponent.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/server/DummyLabel.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/server/GenericWidgetComponent.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/server/IdTestLabel.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/server/LayoutDetector.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/server/MissingFromDefaultWidgetsetComponent.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/server/ReplaceComponent.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/server/ReplaceComponentUI.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/server/RoundTripTester.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/server/ScrollableGridLayout.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/server/SerializerTestExtension.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/server/TestWidgetComponent.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/server/UseStateFromHierachyComponent.java10
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/server/WidgetUtilUI.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/server/csrf/ui/AbstractCsrfTokenUI.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/server/csrf/ui/CsrfTokenDisabled.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/server/csrf/ui/CsrfTokenEnabled.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/server/grid/GridClientColumnRenderers.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/server/gwtrpc/GwtRpcServletTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/CurrentTimeMillisTest.java22
-rw-r--r--uitest/src/test/java/com/vaadin/tests/VerifyBrowserVersionTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/VerifyJreVersionTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/accessibility/WindowWaiAriaRolesTest.java11
-rw-r--r--uitest/src/test/java/com/vaadin/tests/application/CriticalNotificationsTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/application/DeploymentConfigurationTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/application/DetachOldUIOnReloadTest.java19
-rw-r--r--uitest/src/test/java/com/vaadin/tests/application/ErrorInUnloadEventTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/application/MissingHierarchyDetectionTest.java14
-rw-r--r--uitest/src/test/java/com/vaadin/tests/application/PreserveWithExpiredHeartbeatTest.java9
-rw-r--r--uitest/src/test/java/com/vaadin/tests/application/ReconnectDialogThemeTest.java19
-rw-r--r--uitest/src/test/java/com/vaadin/tests/application/ReconnectDialogUITest.java12
-rw-r--r--uitest/src/test/java/com/vaadin/tests/application/RefreshStatePreserveTest.java3
-rw-r--r--uitest/src/test/java/com/vaadin/tests/application/ResynchronizeAfterAsyncRemovalTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/application/ResynchronizeUITest.java13
-rw-r--r--uitest/src/test/java/com/vaadin/tests/application/TimingInfoReportedTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/application/VaadinSessionAttributeTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/applicationcontext/CleanupBrokenUITest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/applicationcontext/CloseSessionTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/applicationcontext/RpcForClosedUITest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/applicationservlet/CustomDeploymentConfTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/applicationservlet/DisableSendUrlAsParametersTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/applicationservlet/MultipleServletConfigurationTest.java9
-rw-r--r--uitest/src/test/java/com/vaadin/tests/applicationservlet/NoApplicationClassTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/applicationservlet/SystemMessagesTest.java3
-rw-r--r--uitest/src/test/java/com/vaadin/tests/applicationservlet/UIProviderInitParameterTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/AbstractOrderedLayoutWithCaptionsTest.java20
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/FileDownloaderUITest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/NoLayoutUpdateWhichNeedsLayoutTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/OutOfSyncTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/SaneErrorsTest.java16
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/TooltipPositionTest.java16
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/UnknownComponentConnectorTest.java16
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutRelativeSizeContentTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/abstractcomponent/ChangeHierarchyBeforeResponseTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/abstractcomponent/ContextClickUITest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/abstractcomponent/PrimaryStyleTest.java14
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/abstractcomponent/ResponseWritingErrorHandlingTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/abstractembedded/EmbeddedWithNullSourceTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/abstractfield/AbstractComponentStyleNameTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/abstractfield/ShortcutAddAndRemoveTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/abstractfield/ShortcutWhenBodyFocusedTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/accordion/AccordionAddTabTest.java14
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/accordion/AccordionRemoveComponentTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/accordion/AccordionRemoveTabTest.java20
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/accordion/AccordionTabIdsTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/button/ButtonClickTest.java12
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/button/ButtonKeyboardClickTest.java36
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/button/ButtonUndefinedWidthTest.java14
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/calendar/BeanItemContainerLongEventTest.java14
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarActionEventSourceTest.java26
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarBackwardForwardTest.java40
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarDisabledTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarHtmlInEventsTest.java25
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarMonthViewDndEventTest.java18
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarNotificationsTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarNotificationsTestIE.java18
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarReadOnlyTest.java19
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarRescheduleEventTest.java16
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarResizeOverlappingEventsTest.java35
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarShownNotCorrectlyWhenPartiallyOutOfViewTest.java18
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarVisibleHoursTest.java14
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarWeekSelectionTest.java3
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/calendar/DndCalendarTargetDetailsTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/calendar/SetFirstVisibleHourOfDayTest.java34
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/checkbox/CheckBoxImmediateTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/checkbox/CheckBoxNullValueTest.java13
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/checkbox/CheckBoxRpcCountTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/checkbox/CheckboxContextClickTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/colorpicker/ColorPickerInputFormatsTest.java14
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/colorpicker/DefaultCaptionWidthTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxBorderTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxClickIconTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxCombinedWithEnterShortcutTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxEmptyItemsKeyboardNavigationTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxIdenticalItemsTest.java2
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxInputPromptTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxItemAddingWithFocusListenerTest.java14
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxItemStyleGeneratorTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxLargeIconsTest.java16
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxMouseSelectEnterTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxNoTextInputTest.java3
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxOnSmallScreenTest.java12
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxPopupWhenBodyScrollsTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxResetValueTest.java18
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxScrollingWithArrowsTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSelectingWithNewItemsAllowedTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSetNullWhenNewItemsAllowedTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSlowTest.java52
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPageLengthTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupCloseTest.java7
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthPercentageTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthTest.java3
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxValueInputTest.java18
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboSelectedValueBeyondTheFirstDropdownPageTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboboxMenuBarAutoopenTest.java12
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboboxPageLengthZeroScrollTest.java11
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboboxPopupScrollingTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboboxStyleChangeWidthTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/CustomComboBoxElement.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/FilteringTurkishLocaleTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/customfield/CustomFieldSizeTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/customlayout/CustomLayoutWithMissingSlotTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/customlayout/CustomLayoutWithNullTemplateTest.java13
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/customlayout/CustomLayoutWithoutTemplateTest.java13
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/customlayout/OverflowAutoFixTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/datefield/AriaDisabledTest.java11
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/datefield/CustomDateFormatEEETest.java11
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldChangeResolutionTest.java48
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldCloseTest.java18
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldDayResolutionOffsetTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldDiscardValueTest.java42
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldFastForwardTest.java15
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldIsValidTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldKeyboardInputTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldPopupClosingOnDetachTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldPopupClosingTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldPopupPositionTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldReadOnlyTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldTestTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldWhenChangingValueAndEnablingParentTest.java41
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/datefield/DateRangeWithSqlDateTest.java13
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/datefield/DefaultDateFieldPopupPositionTest.java22
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/datefield/DisabledDateFieldPopupTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/datefield/DisabledInlineDateFieldTest.java14
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/datefield/DisabledParentLayoutTest.java16
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/datefield/LocaleChangeTest.java11
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/datefield/PopupClosingWithEscTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/datefield/PopupDateFieldExtendedRangeTest.java265
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/datefield/PopupDateFieldInputPromptTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/datefield/PopupDateFieldStatesTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/datefield/PopupDateFieldValueChangeEventsTest.java18
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/datefield/ValoDateFieldPopupPositionTest.java16
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropFocusObtainTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropRelativeWidthTest.java12
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropTextAreaTest.java16
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/draganddropwrapper/DragStartModesTest.java9
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/embedded/EmbeddedAltTextTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/embedded/EmbeddedClickListenerRelativeCoordinatesTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/embedded/EmbeddedThemeResourceTest.java16
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/embedded/FlashIsVisibleTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/form/FormTooltipsTest.java16
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/formlayout/FormLayoutClickListenerTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/formlayout/FormLayoutInVerticalLayoutTest.java12
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/formlayout/FormLayoutResizingTest.java14
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/formlayout/HtmlCaptionInFormLayoutTest.java14
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/formlayout/StylePrefixTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/AbstractGridColumnAutoWidthTest.java14
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/CustomRendererTest.java14
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridAddAndRemoveDataOnInitTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridAddRowTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridCellFocusOnResetSizeTest.java18
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridCheckBoxDisplayTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridClientDataChangeHandlerTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridClientRenderers.java26
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridColspansTest.java26
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridColumnAutoExpandTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridColumnAutoWidthClientTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridColumnAutoWidthServerTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridColumnWidthRecalculationTest.java12
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridColumnWidthsWithoutDataTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridCustomSelectionModelTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridDataSourceResetTest.java18
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridDefaultSelectionModeTest.java14
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridDetailsDetachTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridDetailsLayoutExpandTest.java13
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridDetailsLocationTest.java34
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridDetailsWidthTest.java12
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridDisabledMultiselectTest.java9
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridDisabledSideBarTest.java7
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridDragSelectionWhileScrolledTest.java16
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridEditingWithNoScrollBarsTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridEditorConverterNotFoundTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridEditorCustomFieldTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridEditorFrozenColumnsUITest.java11
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridEditorMultiselectTest.java15
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridEditorUITest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridExtensionCommunicationTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridGeneratedPropertiesTest.java30
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridHeaderFooterComponentsTest.java34
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridHeaderFormatChangeTest.java43
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridHeaderStyleNamesTest.java14
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridHeightTest.java21
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridInTabSheetTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridInWindowResizeTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridInitiallyHiddenColumnsTest.java21
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridItemSetChangeTest.java14
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridLayoutDetailsRowTest.java13
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridMultiSelectionOnInitTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridMultiSelectionScrollBarTest.java9
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridRendererChangeTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridReplaceContainerTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridResizeAndScrollTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridResizeHiddenColumnTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridRowHeightChangeTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridScrollToLineWhileResizingTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridSelectAllCellTest.java9
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridSidebarPositionTest.java30
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridSingleColumnTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridSortIndicatorTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridSpacerDecoClipTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridSubPixelProblemWrappingTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridSwitchRenderersTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridThemeChangeTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridThemeUITest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridWidgetRendererChangeTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridWidthIncreaseTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridWithBrokenRendererTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridWithLabelEditorTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridWithoutRendererTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/InitialFrozenColumnsTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/JavaScriptRenderersTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/NullHeadersTest.java9
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/NullRenderersTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/ProgrammaticEditorControlTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/SelectDuringInitTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/SortableHeaderStylesTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/WidgetRenderersTest.java50
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/EscalatorBasicClientFeaturesTest.java21
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridBasicClientFeaturesTest.java21
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridBasicFeaturesTest.java73
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridClientDataSourcesTest.java31
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridClientHeightByRowOnInitTest.java5
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridColumnHidingTest.java124
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridColumnReorderTest.java52
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridDefaultTextRendererTest.java18
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridDescriptionGeneratorTest.java9
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridHeightByRowOnInitTest.java5
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridSortingIndicatorsTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/DisabledGridClientTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridCellStyleGeneratorTest.java48
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridClientColumnPropertiesTest.java29
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridClientContextMenuEventTest.java21
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridClientKeyEventsTest.java9
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridClientSelectionTest.java25
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridClientStructureTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridDetailsClientTest.java26
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridEditorClientTest.java49
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridFooterTest.java17
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridHeaderTest.java9
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridRowHandleRefreshTest.java18
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridSidebarContentTest.java18
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridStaticSectionTest.java17
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridStylingTest.java29
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/element/CustomGridElement.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorBasicsTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorColspanTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorColumnFreezingTest.java14
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorRemoveAndAddRowsTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorRowColumnTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorScrollTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorSpacerTest.java69
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorUpdaterUiTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/DisabledGridTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridCellFocusAdjustmentTest.java26
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridCellStyleGeneratorTest.java42
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridClearContainerTest.java20
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridColumnMaxWidthTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridColumnReorderTest.java43
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridColumnResizeTest.java14
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridColumnVisibilityTest.java41
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridDetailsServerTest.java42
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridEditorBufferedTest.java40
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridEditorTest.java12
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridEditorUnbufferedTest.java34
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridFocusTest.java12
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridItemClickTest.java9
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridKeyboardNavigationTest.java80
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridMultiSortingTest.java11
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridRowAddRemoveTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridScrollTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridSelectionTest.java106
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridSidebarThemeTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridSortingTest.java40
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridStaticSectionComponentTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridStructureTest.java64
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/LoadingIndicatorTest.java14
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/gridlayout/ComponentAlignmentsTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutAlignmentsTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutBaseTest.java3
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutCaptionAlignmentTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutCellSizesUITest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutExpandWithManyRowsTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutExtraSpacingTest.java13
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutFocusOrderAfterShowChildTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutFractionalSizeAndAlignmentTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutScrollPositionTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/gridlayout/MoveComponentsFromGridLayoutToInnerLayoutTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/gridlayout/UniformGridLayoutUITest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/javascriptcomponent/BasicJavaScriptComponentTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/javascriptcomponent/JavaScriptNoLayoutHandlingUITest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/javascriptcomponent/JavaScriptPreloadingTest.java14
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/javascriptcomponent/JavaScriptResizeListenerTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/label/LabelModesTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/label/LabelTooltipTest.java18
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/layout/EmptySpaceOnPageAfterExpandedComponentTest.java24
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/listselect/ListSelectAddRemoveItemsTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/listselect/ListSelectNoDomRebuildTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/listselect/ListSelectPushSelectionChangesTest.java17
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/menubar/MenuBarClickOpenedMenuTest.java11
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/menubar/MenuBarNavigationMouseTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/menubar/MenuBarSubmenusClosingValoTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/menubar/MenuBarTooltipsNearEdgeTest.java12
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/menubar/MenuBarsWithNestingTest.java16
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/menubar/MenuItemStyleRemovedTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/menubar/MenuTooltipTest.java12
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/menubar/SpaceMenuBarNavigationTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/nativebutton/NativeButtonClickTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/nativebutton/NativeButtonIconAndTextTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/nativeselect/NativeSelectsAndChromeKeyboardNavigationTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/nativeselect/NativeSelectsFocusAndBlurListenerTests.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/notification/MiddleNotificationPositionTest.java24
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/notification/NotificationDelayTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/notification/NotificationsWaiAriaTest.java39
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/optiongroup/ReadOnlyOptionGroupTest.java13
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/orderedlayout/CaptionLeakTest.java11
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/orderedlayout/ErrorIndicatorTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/orderedlayout/HorizontalLayoutFullsizeContentWithErrorMsgTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/orderedlayout/NestedLayoutCaptionHoverTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/orderedlayout/OrderedLayoutInfiniteLayoutPassesTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/orderedlayout/SpacingLeakTest.java11
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/orderedlayout/TooltipOnRequiredIndicatorTest.java14
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/orderedlayout/VerticalLayoutFocusWithDOMChangesTest.java14
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/page/PageTitleTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/panel/PanelChangeContentsTest.java25
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/panel/PanelRemoveShortcutListenerTest.java13
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/panel/UndefinedSizeScrollbarsTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/popupview/PopupViewAndFragmentTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/popupview/PopupViewCaptionTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/popupview/PopupViewResizeWhileOpenTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/popupview/PopupViewShortcutActionHandlerTest.java12
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/popupview/PopupViewWithExtensionTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/progressindicator/ProgressBarStaticReindeerTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/progressindicator/ProgressBarStaticRunoTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/richtextarea/RichTextAreaRelativeHeightResizeTest.java18
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/select/EnumSelectTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/select/SelectWithIntegersTest.java14
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/slider/HiddenSliderHandleTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/slider/SliderDisableTest.java9
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/slider/SliderFeedbackTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/slider/SliderResizeTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/splitpanel/GridLayoutWithCheckboxTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/splitpanel/HorizontalSplitPanelHeightTest.java19
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/splitpanel/SplitPanelDuplicateStyleNameTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/splitpanel/SplitPanelMoveComponentTest.java24
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/splitpanel/SplitPanelStyleLeakTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/splitpanel/SplitPanelWithMinimumAndMaximumTest.java69
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/splitpanel/SplitPositionChangeTest.java23
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/AddSelectionToRemovedRangeTest.java14
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/AsyncPushUpdatesTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/ColumnCollapsingAndColumnExpansionTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/ColumnReorderingWithManyColumnsTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/ColumnWidthsAfterChangeTableColumnsCountOrOrderTest.java17
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/ContainerSizeChangeTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/ContextMenuSizeTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/CtrlShiftMultiselectTest.java9
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/CustomTableElement.java18
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/DisabledSortingTableTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/DndEmptyTableTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/DndTableTargetDetailsTest.java12
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/EditableModeChangeTest.java22
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/EmptyTableTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/ExpandingContainerVisibleRowRaceConditionTest.java18
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/FocusOnSelectedItemTest.java14
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/FooterClickTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/FooterTest.java12
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/HeaderClickTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/HeaderFooterClickLeftRightMiddleTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/HeaderPositionWhenSortingTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/HeaderRightClickAfterDragTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/HeaderSyncOnScrollTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/HeaderUpdateWhenNoRowsTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/ItemClickEventsTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/ItemClickEventsTestWithShiftOrCtrl.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/LabelEmbeddedClickThroughForTableTest.java14
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/LeftColumnAlignmentTest.java20
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/LongMultiselectTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/MemoryLeakTableTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/OnlyCollapsibleInMenu.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/ReloadWidgetsTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/SelectAllConstantViewportTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/SelectAllRowsShiftFirstTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/SelectAllRowsTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/SetCurrentPageFirstItemIndexTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/SetPageFirstItemLoadsNeededRowsOnlyTest.java12
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/SortLabelsInTableTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/SortableHeaderStylesTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/TableAfterRemovingExpandRatiosTest.java28
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/TableBlurFocusTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/TableCacheMinimizingOnFetchRowsTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/TableChildMeasurementHintTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/TableClickAndDragOnIconAndComponentsTest.java12
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/TableColumnAddAndResizeTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/TableColumnResizeContentsWidthTest.java16
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/TableColumnWidthsAndSortingTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/TableDragColumnTest.java31
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/TableDropIndicatorValoTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/TableInIframeRowClickScrollJumpTest.java17
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/TableItemDescriptionGeneratorUITest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/TableMatchesMouseDownMouseUpElementTest.java12
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/TableMoveFocusWithSelectionTest.java20
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/TableNavigationPageDownTest.java20
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/TableParentEnabledStateChangeTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/TableRemovedQuicklySendsInvalidRpcCallsTest.java22
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/TableRepairsScrollPositionOnReAddingAllRowsTest.java12
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/TableRequiredIndicatorTest.java12
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/TableRowHeight2Test.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/TableRowScrolledBottomTest.java12
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/TableScrollAfterAddRowTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/TableScrollUpOnSelectTest.java12
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/TableScrollingWithSQLContainerTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/TableSizeInTabsheetTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/TableSortingIndicatorTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/TableToggleColumnVisibilityTest.java32
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/TableToggleColumnVisibilityWidthTest.java12
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/TableTooManyColumnsTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/TableVisibleColumnsUpdateTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/TableWidthItemRemoveTest.java20
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/TableWithContainerRequiringEqualsForItemIdTest.java16
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/TableWithPollingTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/TextFieldRelativeWidthTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/TextFieldValueGoesMissingTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/UnnecessaryScrollbarWhenZoomingTest.java19
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/table/UpdateTableWhenUnfocusedTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/tabsheet/EmptyTabSheetTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleInTabsheetTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleWhenTabsheetNotClippedTest.java32
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/tabsheet/HtmlInTabCaptionTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/tabsheet/NewSelectionAfterTabRemoveTest.java24
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/tabsheet/PreventTabChangeTest.java20
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabBarWidthTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabKeyboardNavigationTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSelectionRevertedByServerTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSheetCloseTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSheetErrorTooltipTest.java19
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSheetFocusedTabTest.java13
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSheetFocusingTest.java11
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSheetInDisabledParentTest.java16
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSheetInSplitPanelTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSheetScrollOnTabCloseTest.java22
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSpaceNotScrollTest.java12
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabsheetNotEnoughHorizontalSpaceTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabsheetScrollIntoViewTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabsheetScrollingTest.java13
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/tabsheet/VetoTabChangeTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/textarea/TextAreaSizeResettedTest.java5
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/textfield/AutomaticImmediateTest.java24
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/textfield/EnumTextFieldTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/textfield/InputPromptGetTextTest.java18
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/textfield/RequiredTextFieldTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/textfield/TextFieldEmptyingPromptTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/textfield/TextFieldTruncatesUnderscoresInModalDialogsTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/tree/DndTreeTargetDetailsTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/tree/TreeContextMenuAndIconsTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/tree/TreeHtmlContentAllowedTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/tree/TreeItemClickListeningTest.java13
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/tree/TreeItemDoubleClickTest.java13
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/tree/TreeItemSelectionWithoutImmediateTest.java19
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/tree/TreeKeyboardNavigationToNoneTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/tree/TreeScrollingOnRightClickTest.java16
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/treetable/DisappearingComponentsTest.java12
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/treetable/MinimalWidthColumnsTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTableContainerHierarchicalWrapperTest.java19
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTableItemDescriptionGeneratorUITest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTableOutOfSyncTest.java21
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTablePartialUpdatesPageLength0Test.java37
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTablePartialUpdatesTest.java86
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTableRowGeneratorTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTableRowHeaderModeTest.java11
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTableRowIconsTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTableScrollOnExpandTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/ui/ComboboxSelectedItemTextTest.java28
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/ui/ComponentIncludedInCustomWidgetsetTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/ui/ComponentMissingFromDefaultWidgetsetTest.java14
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/ui/DynamicViewportEmptyTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/ui/DynamicViewportTest.java14
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/ui/InitialFragmentEventTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/ui/InvalidViewportTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/ui/RpcInvocationHandlerToStringTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/ui/StaticViewportTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/ui/TextAreaEventPropagationModifierKeysTest.java9
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/ui/TextAreaEventPropagationTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/ui/TimeoutRedirectResetsOnActivityTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/ui/UIAccessTest.java39
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/ui/UIAutoGeneratedStyleNameTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/ui/UIInitBrowserDetailsTest.java5
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/ui/UIInitExceptionTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/ui/UIPollingTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/ui/UIRefreshTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/ui/UISerializationTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/ui/UiDependenciesInHtmlTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/ui/UnnecessaryPaddingInResponsiveUITest.java12
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/ui/VaadinFinderLocatorUISearchTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/ui/WindowAndUIShortcutsTest.java9
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/uitest/BaseThemeTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/uitest/ChameleonThemeTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/uitest/LiferayThemeTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/uitest/ReindeerThemeTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/uitest/RunoThemeTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/uitest/ThemeTest.java15
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/uitest/UIScrollingTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/upload/TestFileUploadTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/upload/UploadImmediateButtonWidthChameleonTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/upload/UploadImmediateButtonWidthReindeerTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/upload/UploadImmediateButtonWidthRunoTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/upload/UploadImmediateButtonWidthTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/upload/UploadImmediateButtonWidthValoTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/upload/UploadNoSelectionTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/upload/UploadTitleWithTooltipTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/window/BackspaceKeyWithModalOpenedTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/window/BottomComponentScrollsUpTest.java18
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/window/CloseModalSubWindowTest.java34
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/window/ComboboxScrollableWindowTest.java15
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/window/ExtraWindowShownWaiAriaTest.java21
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/window/GridInWindowTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/window/MaximizeRestoreWindowWithManagedLayoutTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/window/ModalWindowFocusTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/window/MoveToTopTest.java20
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/window/OpenModalWindowAndFocusFieldTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/window/ScrollingBodyElementWithModalOpenedTest.java12
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/window/SubWindowWithUndefinedHeightTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/window/SubWindowsTextSelectionTest.java19
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/window/TestTooSmallSubwindowSizeTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/window/ToolTipInWindowTest.java24
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/window/UncloseableWindowCloseShortcutTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/window/WindowBGColorChameleonIE8Test.java2
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/window/WindowCaptionTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/window/WindowInUiWithNoContentTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/window/WindowMaxHeightTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/window/WindowMoveListenerTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/window/WindowShadowTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/window/WindowShouldRemoveActionHandlerTest.java3
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/window/WindowZIndexTest.java18
-rw-r--r--uitest/src/test/java/com/vaadin/tests/containers/sqlcontainer/TableQueryWithNonUniqueFirstPrimaryKeyTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/contextclick/AbstractContextClickTest.java17
-rw-r--r--uitest/src/test/java/com/vaadin/tests/contextclick/GridContextClickTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/contextclick/ListenerAddAndRemoveTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/contextclick/TableContextClickTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/contextclick/TableContextClickTestBase.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/contextclick/TreeContextClickTest.java18
-rw-r--r--uitest/src/test/java/com/vaadin/tests/contextclick/TreeTableContextClickTest.java7
-rw-r--r--uitest/src/test/java/com/vaadin/tests/converter/ConverterThatEnforcesAFormatTest.java5
-rw-r--r--uitest/src/test/java/com/vaadin/tests/customelements/CustomProgressBarElement.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/dd/DDInterruptTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/debug/HierarchyAfterAnalyzeLayoutsTest.java17
-rw-r--r--uitest/src/test/java/com/vaadin/tests/debug/PreserveCustomDebugSectionOpenTest.java16
-rw-r--r--uitest/src/test/java/com/vaadin/tests/debug/ProfilerZeroOverheadTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/debug/PushVersionInfoTest.java15
-rw-r--r--uitest/src/test/java/com/vaadin/tests/extensions/IframeIsOpenedInNonIOSTest.java5
-rw-r--r--uitest/src/test/java/com/vaadin/tests/extensions/ResponsiveUITest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/extensions/ResponsiveWidthAndHeightTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/extensions/ResponsiveWithCrossDomainStylesTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/extensions/SetThemeAndResponsiveLayoutTest.java12
-rw-r--r--uitest/src/test/java/com/vaadin/tests/fieldgroup/BasicCrudGridEditorRowTest.java9
-rw-r--r--uitest/src/test/java/com/vaadin/tests/fieldgroup/BasicCrudGridTest.java14
-rw-r--r--uitest/src/test/java/com/vaadin/tests/fieldgroup/BasicCrudTableTest.java14
-rw-r--r--uitest/src/test/java/com/vaadin/tests/fieldgroup/BasicPersonFormTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/fieldgroup/CommitWithValidationOrConversionErrorTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/fieldgroup/DateFormTest.java12
-rw-r--r--uitest/src/test/java/com/vaadin/tests/fieldgroup/MultipleValidationErrorsTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/fonticon/FontIconsTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/integration/AbstractIntegrationTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/integration/AbstractServletIntegrationTest.java12
-rw-r--r--uitest/src/test/java/com/vaadin/tests/integration/JSPIntegrationTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/integration/LongPollingProxyServerTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/integration/ParameterizedTB3Runner.java36
-rw-r--r--uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationDefaultPushUITest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationJSR356WebsocketUITest.java14
-rw-r--r--uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationLongPollingUITest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationStreamingUITest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationUITest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationWebsocketUITest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/integration/WebSpherePortalIntegrationTest.java18
-rw-r--r--uitest/src/test/java/com/vaadin/tests/layoutmanager/LayoutDuringStateUpdateTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/layouts/CssLayoutAbsoluteUrlTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/layouts/HorizontalLayoutAndCaretPositionTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/layouts/IE8MeasuredSizeMemoryLeakTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/layouts/RelativeSizeInUndefinedCssLayoutTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/layouts/TestLayoutClickListenersTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/layouts/customlayout/DefaultLocationInCustomLayoutTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/layouts/gridlayout/GridLayoutWidthChangeTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/layouts/gridlayout/GridSpanEmptyColumnsTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/navigator/NavigationTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/navigator/NavigatorListenerModifiesListenersTest.java20
-rw-r--r--uitest/src/test/java/com/vaadin/tests/navigator/NavigatorViewBlocksBackButtonActionTest.java19
-rw-r--r--uitest/src/test/java/com/vaadin/tests/push/BarInUIDLTest.java19
-rw-r--r--uitest/src/test/java/com/vaadin/tests/push/BasicPushLongPollingTest.java11
-rw-r--r--uitest/src/test/java/com/vaadin/tests/push/BasicPushStreamingTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/push/BasicPushTest.java20
-rw-r--r--uitest/src/test/java/com/vaadin/tests/push/BasicPushWebsocketTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/push/BasicPushWebsocketXhrTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/push/EnableDisablePushTest.java21
-rw-r--r--uitest/src/test/java/com/vaadin/tests/push/ExtremelyLongPushTimeLongPollingTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/push/ExtremelyLongPushTimeStreamingTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/push/ExtremelyLongPushTimeTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/push/ExtremelyLongPushTimeWebsocketTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/push/IdlePushChannelLongPollingTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/push/IdlePushChannelStreamingTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/push/IdlePushChannelTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/push/IdlePushChannelWebsocketTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/push/ManualLongPollingPushUITest.java9
-rw-r--r--uitest/src/test/java/com/vaadin/tests/push/PushConfigurationLongPollingTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/push/PushConfigurationStreamingTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/push/PushConfigurationTest.java9
-rw-r--r--uitest/src/test/java/com/vaadin/tests/push/PushConfigurationWebSocketTest.java11
-rw-r--r--uitest/src/test/java/com/vaadin/tests/push/PushErrorHandlingTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/push/PushFromInitTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/push/PushLargeDataLongPollingTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/push/PushLargeDataStreamingTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/push/PushLargeDataWebsocketTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/push/PushRemoveConnectorsTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/push/PushWithRequireJSTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/push/ReconnectLongPollingTest.java6
-rwxr-xr-xuitest/src/test/java/com/vaadin/tests/push/ReconnectStreamingTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/push/ReconnectTest.java12
-rw-r--r--uitest/src/test/java/com/vaadin/tests/push/ReconnectWebsocketTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/push/RefreshCloseConnectionTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/push/SendMultibyteCharactersLongPollingTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/push/SendMultibyteCharactersStreamingTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/push/SendMultibyteCharactersWebSocketTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/push/TogglePushTest.java17
-rw-r--r--uitest/src/test/java/com/vaadin/tests/push/TrackMessageSizeUITest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/requesthandlers/AppResource404Test.java19
-rw-r--r--uitest/src/test/java/com/vaadin/tests/requesthandlers/CommunicationErrorTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/requesthandlers/UnsupportedBrowserHandlerUserAgents.java15
-rw-r--r--uitest/src/test/java/com/vaadin/tests/resources/SpecialCharsInThemeResources.java9
-rw-r--r--uitest/src/test/java/com/vaadin/tests/serialization/EncodeResultDisplayTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/serialization/GenericWidgetHandlingTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/serialization/LegacySerializerUITest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/serialization/NoLayoutTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/serialization/SerializerTestTest.java23
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tb3/AbstractTB3Test.java191
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tb3/AffectedTB3TestLocator.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tb3/AffectedTB3Tests.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tb3/AllTB3Tests.java12
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tb3/ChangedTB3TestLocator.java11
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tb3/ChangedTB3Tests.java12
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tb3/CustomTestBenchCommandExecutor.java39
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tb3/DndActionsTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tb3/ExcludeFromSuite.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tb3/IncludeIfProperty.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserTest.java12
-rwxr-xr-xuitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserTestWithProxy.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserThemeTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserThemeTestWithProxy.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tb3/ParallelScheduler.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tb3/PrivateTB3Configuration.java36
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tb3/RetryOnFail.java14
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tb3/ScreenshotTB3Test.java52
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tb3/ServletIntegrationTests.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tb3/SingleBrowserTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tb3/SingleBrowserTestPhantomJS2.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tb3/TB3Runner.java5
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tb3/TB3TestLocator.java27
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tb3/TB3TestSuite.java13
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tb3/TooltipTest.java29
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tb3/VaadinBrowserFactory.java5
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tb3/WebsocketTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tb3/newelements/CalendarElement.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tb3/newelements/ComboBoxElement.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tb3/newelements/FixedNotificationElement.java5
-rw-r--r--uitest/src/test/java/com/vaadin/tests/themes/LegacyComponentThemeChangeTest.java33
-rw-r--r--uitest/src/test/java/com/vaadin/tests/themes/ThemeChangeFaviconTest.java19
-rw-r--r--uitest/src/test/java/com/vaadin/tests/themes/ThemeChangeOnTheFlyTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/themes/base/DisabledMenuBarItemTest.java12
-rw-r--r--uitest/src/test/java/com/vaadin/tests/themes/valo/AlignTopIconInButtonTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/themes/valo/CollapsibleTableColumnTest.java15
-rw-r--r--uitest/src/test/java/com/vaadin/tests/themes/valo/ContrastFontColorTest.java11
-rw-r--r--uitest/src/test/java/com/vaadin/tests/themes/valo/DisabledLabelTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/themes/valo/FormLayoutInsideTableTest.java3
-rw-r--r--uitest/src/test/java/com/vaadin/tests/themes/valo/ImmediateUploadTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/themes/valo/ModalWindowTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/themes/valo/NotificationStyleTest.java29
-rw-r--r--uitest/src/test/java/com/vaadin/tests/themes/valo/ResponsiveStylesTest.java12
-rw-r--r--uitest/src/test/java/com/vaadin/tests/themes/valo/TableWithEmptyCaptionTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/themes/valo/TextFieldBevelTest.java16
-rw-r--r--uitest/src/test/java/com/vaadin/tests/themes/valo/ValoDefaultCaptionWidthTest.java14
-rw-r--r--uitest/src/test/java/com/vaadin/tests/themes/valo/ValoThemeUITest.java5
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tooltip/AdjacentElementsWithTooltipsTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tooltip/DragAndDropWrapperTooltipsTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tooltip/LongTooltipTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tooltip/MenuBarTooltipTest.java18
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tooltip/SliderTooltipTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tooltip/TooltipAndJavascriptTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tooltip/TooltipConfigurationTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tooltip/TooltipInWindowTest.java3
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tooltip/TooltipWidthUpdatingTest.java9
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tooltip/ValidatorCaptionTooltipTest.java2
-rw-r--r--uitest/src/test/java/com/vaadin/tests/urifragments/FragmentHandlingAndAsynchUIUpdateTest.java19
-rw-r--r--uitest/src/test/java/com/vaadin/tests/urifragments/SettingNullFragmentTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/util/WidgetUtilTest.java26
-rw-r--r--uitest/src/test/java/com/vaadin/tests/widgetset/server/ClientRpcClassTest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/widgetset/server/csrf/ui/AbstractCsrfTokenUITest.java10
-rw-r--r--uitest/src/test/java/com/vaadin/tests/widgetset/server/csrf/ui/CsrfTokenDisabledTest.java8
-rw-r--r--uitest/src/test/java/com/vaadin/tests/widgetset/server/csrf/ui/CsrfTokenEnabledTest.java11
-rw-r--r--widgets/src/main/java/com/vaadin/themes/valoutil/BodyStyleName.java6
3528 files changed, 34552 insertions, 33512 deletions
diff --git a/all/src/main/java/com/vaadin/buildhelpers/FetchReleaseNotesAuthors.java b/all/src/main/java/com/vaadin/buildhelpers/FetchReleaseNotesAuthors.java
index cd85ca6a3f..85dc87e756 100644
--- a/all/src/main/java/com/vaadin/buildhelpers/FetchReleaseNotesAuthors.java
+++ b/all/src/main/java/com/vaadin/buildhelpers/FetchReleaseNotesAuthors.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,18 +27,17 @@ import java.util.Properties;
public class FetchReleaseNotesAuthors {
private static final String template = "<li class=\"author\">@author@</li>";
- public static void main(String[] args) throws IOException,
- InterruptedException {
+ public static void main(String[] args)
+ throws IOException, InterruptedException {
Properties authorMap = new Properties();
String authorsFilename = FetchReleaseNotesAuthors.class.getPackage()
- .getName().replace(".", "/")
- + "/authormap.properties";
+ .getName().replace(".", "/") + "/authormap.properties";
InputStream s = FetchReleaseNotesAuthors.class.getClassLoader()
.getResourceAsStream(authorsFilename);
if (s == null) {
- System.err.println("Author mapping file " + authorsFilename
- + " not found!");
+ System.err.println(
+ "Author mapping file " + authorsFilename + " not found!");
}
authorMap.load(s);
@@ -53,8 +52,8 @@ public class FetchReleaseNotesAuthors {
if (p.exitValue() != 0) {
System.err.println("Exit code: " + p.exitValue());
}
- BufferedReader b = new BufferedReader(new InputStreamReader(
- p.getInputStream()));
+ BufferedReader b = new BufferedReader(
+ new InputStreamReader(p.getInputStream()));
String line = "";
List<String> authors = new ArrayList<String>();
@@ -77,8 +76,8 @@ public class FetchReleaseNotesAuthors {
private static String getPreviousVersion(String version) {
String[] versionNumbers = version.split("\\.");
if (versionNumbers.length > 4 || versionNumbers.length < 3) {
- throw new IllegalArgumentException("Cannot parse version: "
- + version);
+ throw new IllegalArgumentException(
+ "Cannot parse version: " + version);
}
int major = Integer.parseInt(versionNumbers[0]);
int minor = Integer.parseInt(versionNumbers[1]);
diff --git a/all/src/main/java/com/vaadin/buildhelpers/FetchReleaseNotesTickets.java b/all/src/main/java/com/vaadin/buildhelpers/FetchReleaseNotesTickets.java
index 0cd06890eb..a763934464 100644
--- a/all/src/main/java/com/vaadin/buildhelpers/FetchReleaseNotesTickets.java
+++ b/all/src/main/java/com/vaadin/buildhelpers/FetchReleaseNotesTickets.java
@@ -27,8 +27,7 @@ import org.apache.commons.io.IOUtils;
public class FetchReleaseNotesTickets {
private static final String queryURL = "https://dev.vaadin.com/query?status=pending-release&amp;status=released&amp;@milestone@&amp;resolution=fixed&amp;col=id&amp;col=summary&amp;col=owner&amp;col=type&amp;col=priority&amp;col=component&amp;col=version&amp;col=bfptime&col=fv&amp;format=tab&amp;order=id";
- private static final String ticketTemplate = "<tr>"
- + "@badge@" //
+ private static final String ticketTemplate = "<tr>" + "@badge@" //
+ "<td class=\"ticket\"><a href=\"https://dev.vaadin.com/ticket/@ticket@\">#@ticket@</a></td>" //
+ "<td>@description@</td>" //
+ "</tr>"; //
@@ -105,7 +104,8 @@ public class FetchReleaseNotesTickets {
String badge = "<td></td>";
if (fields.length >= 8 && !fields[7].equals("")) {
badge = "<td class=\"bfp\"><span class=\"bfp\">Priority</span></td>";
- } else if (fields.length >= 9 && fields[8].equalsIgnoreCase("true")) {
+ } else if (fields.length >= 9
+ && fields[8].equalsIgnoreCase("true")) {
badge = "<td class=\"fv\"><span class=\"fv\">Vote</span></td>";
}
@@ -163,9 +163,9 @@ public class FetchReleaseNotesTickets {
}
private static void usage() {
- System.err.println("Usage: "
- + FetchReleaseNotesTickets.class.getSimpleName()
- + " -Dvaadin.version=<version>");
+ System.err.println(
+ "Usage: " + FetchReleaseNotesTickets.class.getSimpleName()
+ + " -Dvaadin.version=<version>");
System.exit(1);
}
}
diff --git a/buildhelpers/src/main/java/com/vaadin/buildhelpers/CompileTheme.java b/buildhelpers/src/main/java/com/vaadin/buildhelpers/CompileTheme.java
index d97025bdb6..edd4fd9b88 100644
--- a/buildhelpers/src/main/java/com/vaadin/buildhelpers/CompileTheme.java
+++ b/buildhelpers/src/main/java/com/vaadin/buildhelpers/CompileTheme.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -64,11 +64,11 @@ public class CompileTheme {
// Regular theme
try {
processSassTheme(themeFolder, themeName, "styles", version);
- System.out.println("Compiling theme " + themeName
- + " styles successful");
+ System.out.println(
+ "Compiling theme " + themeName + " styles successful");
} catch (Exception e) {
- System.err.println("Compiling theme " + themeName
- + " styles failed");
+ System.err
+ .println("Compiling theme " + themeName + " styles failed");
e.printStackTrace();
}
// Legacy theme w/o .themename{} wrapping
@@ -82,8 +82,8 @@ public class CompileTheme {
+ " legacy-styles successful");
}
} catch (Exception e) {
- System.err.println("Compiling theme " + themeName
- + " legacy-styles failed");
+ System.err.println(
+ "Compiling theme " + themeName + " legacy-styles failed");
e.printStackTrace();
}
}
@@ -103,8 +103,8 @@ public class CompileTheme {
ScssStylesheet scss = ScssStylesheet.get(sassFile);
if (scss == null) {
- throw new IllegalArgumentException("SASS file: " + sassFile
- + " not found");
+ throw new IllegalArgumentException(
+ "SASS file: " + sassFile + " not found");
}
scss.compile();
String filteredScss = scss.printState().replace("@version@", version);
@@ -128,8 +128,8 @@ public class CompileTheme {
boolean ok = newCss.renameTo(oldCss);
if (!ok) {
- throw new RuntimeException("Rename " + newCss + " -> " + oldCss
- + " failed");
+ throw new RuntimeException(
+ "Rename " + newCss + " -> " + oldCss + " failed");
}
}
@@ -142,8 +142,8 @@ public class CompileTheme {
// hiding other classpath issues
Class<?> smartSpritesClass = org.carrot2.labs.smartsprites.SmartSprites.class;
} catch (NoClassDefFoundError e) {
- System.err
- .println("Could not find smartsprites. No sprites were generated. The theme should still work.");
+ System.err.println(
+ "Could not find smartsprites. No sprites were generated. The theme should still work.");
return;
}
diff --git a/buildhelpers/src/main/java/com/vaadin/buildhelpers/GeneratePackageExports.java b/buildhelpers/src/main/java/com/vaadin/buildhelpers/GeneratePackageExports.java
index d4ad3f838c..a27bed1dba 100644
--- a/buildhelpers/src/main/java/com/vaadin/buildhelpers/GeneratePackageExports.java
+++ b/buildhelpers/src/main/java/com/vaadin/buildhelpers/GeneratePackageExports.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -35,7 +35,7 @@ import java.util.regex.Pattern;
* Export-Package attribute, and appends it to the jar's MANIFEST.MF.
* <p>
* See #3521 for details.
- *
+ *
* @author magi
*/
public class GeneratePackageExports {
@@ -44,11 +44,10 @@ public class GeneratePackageExports {
public static void main(String[] args) {
if (args.length < 2) {
- System.err
- .println("Invalid number of parameters\n"
- + "Usage: java -cp .. GenerateManifest <package.jar> <accepted package prefixes>\n"
- + "Use -Dvaadin.version to specify the version to be used for the packages\n"
- + "Use -DincludeNumberPackages=1 to include package names which start with a number (not 100% OSGi compatible)");
+ System.err.println("Invalid number of parameters\n"
+ + "Usage: java -cp .. GenerateManifest <package.jar> <accepted package prefixes>\n"
+ + "Use -Dvaadin.version to specify the version to be used for the packages\n"
+ + "Use -DincludeNumberPackages=1 to include package names which start with a number (not 100% OSGi compatible)");
System.exit(1);
}
@@ -149,7 +148,7 @@ public class GeneratePackageExports {
* version.<java package>. Searches for the packge and then its parents
* recursively. Falls back to the "vaadin.version" system property if no
* other properties are found.
- *
+ *
* @param javaPackage
* The package to determine a version for
* @return A version or null if no version has been defined
@@ -178,7 +177,8 @@ public class GeneratePackageExports {
}
private static HashSet<String> getPackages(JarFile jar,
- List<String> acceptedPackagePrefixes, boolean includeNumberPackages) {
+ List<String> acceptedPackagePrefixes,
+ boolean includeNumberPackages) {
HashSet<String> packages = new HashSet<String>();
Pattern startsWithNumber = Pattern.compile("\\.\\d");
@@ -198,10 +198,11 @@ public class GeneratePackageExports {
}
int lastSlash = entry.getName().lastIndexOf('/');
- String pkg = entry.getName().substring(0, lastSlash)
- .replace('/', '.');
+ String pkg = entry.getName().substring(0, lastSlash).replace('/',
+ '.');
- if (!includeNumberPackages && startsWithNumber.matcher(pkg).find()) {
+ if (!includeNumberPackages
+ && startsWithNumber.matcher(pkg).find()) {
continue;
}
diff --git a/buildhelpers/src/main/java/com/vaadin/buildhelpers/ManifestWriter.java b/buildhelpers/src/main/java/com/vaadin/buildhelpers/ManifestWriter.java
index 9e9b29c4a1..bb8cb27e38 100644
--- a/buildhelpers/src/main/java/com/vaadin/buildhelpers/ManifestWriter.java
+++ b/buildhelpers/src/main/java/com/vaadin/buildhelpers/ManifestWriter.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -33,7 +33,7 @@ public class ManifestWriter {
/**
* Writes a manifest attribute to a temporary buffer.
- *
+ *
* @param name
* Attribute name
* @param value
@@ -56,10 +56,10 @@ public class ManifestWriter {
/**
* Writes the manifest to given JAR file.
- *
+ *
* The manifest must be created with {@code #writeAttribute(String, String)}
* before calling this write.
- *
+ *
* @param jarFilename
* File name of the JAR in which the manifest is written
* @return 0 on success, nonzero value on error
@@ -85,9 +85,9 @@ public class ManifestWriter {
fos.write(getBytes());
fos.close();
} catch (IOException e) {
- System.err.println("Writing to file '"
- + newMfFile.getAbsolutePath() + "' failed because: "
- + e.getMessage());
+ System.err.println(
+ "Writing to file '" + newMfFile.getAbsolutePath()
+ + "' failed because: " + e.getMessage());
status = 1;
}
}
@@ -100,9 +100,9 @@ public class ManifestWriter {
is = new FileInputStream(newMfFile);
checkMf.read(is);
} catch (IOException e) {
- System.err.println("Reading from file '"
- + newMfFile.getAbsolutePath() + "' failed because: "
- + e.getMessage());
+ System.err.println(
+ "Reading from file '" + newMfFile.getAbsolutePath()
+ + "' failed because: " + e.getMessage());
status = 1;
}
}
@@ -112,8 +112,8 @@ public class ManifestWriter {
System.out.println("Updating manifest in JAR " + jarFilename);
try {
// The "mf" order must correspond with manifest-jarfile order
- Process process = Runtime.getRuntime().exec(
- new String[] { "jar", "umf",
+ Process process = Runtime.getRuntime()
+ .exec(new String[] { "jar", "umf",
newMfFile.getAbsolutePath(), jarFilename });
int exitValue = process.waitFor();
if (exitValue != 0) {
@@ -123,14 +123,14 @@ public class ManifestWriter {
while (reader.ready()) {
System.err.println("jar: " + reader.readLine());
}
- System.err
- .println("The 'jar' command returned with exit value "
+ System.err.println(
+ "The 'jar' command returned with exit value "
+ exitValue);
status = 1;
}
} catch (IOException e) {
- System.err.println("Failed to execute 'jar' command. "
- + e.getMessage());
+ System.err.println(
+ "Failed to execute 'jar' command. " + e.getMessage());
status = 1;
} catch (InterruptedException e) {
System.err
diff --git a/client-compiler/src/main/java/com/vaadin/sass/linker/SassLinker.java b/client-compiler/src/main/java/com/vaadin/sass/linker/SassLinker.java
index dda6733384..aaea3b60c1 100644
--- a/client-compiler/src/main/java/com/vaadin/sass/linker/SassLinker.java
+++ b/client-compiler/src/main/java/com/vaadin/sass/linker/SassLinker.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -42,7 +42,7 @@ import com.vaadin.sass.internal.ScssStylesheet;
* Pre-linker that checks for the existence of SASS files in public folders,
* compiles them to CSS files with the SassCompiler from Vaadin and adds the CSS
* back into the artifact.
- *
+ *
*/
@LinkerOrder(Order.PRE)
@Shardable
@@ -109,30 +109,31 @@ public class SassLinker extends AbstractLinker {
// Store the file info for the compilation
scssFiles.add(new FileInfo(tempfile, partialPath));
} else {
- logger.log(TreeLogger.WARN, "Duplicate file "
- + tempfile.getPath());
+ logger.log(TreeLogger.WARN,
+ "Duplicate file " + tempfile.getPath());
}
} catch (IOException e) {
logger.log(TreeLogger.ERROR,
- "Could not write temporary file " + fileName, e);
+ "Could not write temporary file " + fileName,
+ e);
}
}
}
// Compile the files and store them in the artifact
- logger.log(TreeLogger.INFO, "Processing " + scssFiles.size()
- + " Sass file(s)");
+ logger.log(TreeLogger.INFO,
+ "Processing " + scssFiles.size() + " Sass file(s)");
for (FileInfo fileInfo : scssFiles) {
logger.log(TreeLogger.INFO, " " + fileInfo.originalScssPath
+ " -> " + fileInfo.getOriginalCssPath());
try {
- ScssStylesheet scss = ScssStylesheet.get(fileInfo
- .getAbsolutePath());
+ ScssStylesheet scss = ScssStylesheet
+ .get(fileInfo.getAbsolutePath());
if (!fileInfo.isMixin()) {
scss.compile();
- InputStream is = new ByteArrayInputStream(scss
- .printState().getBytes());
+ InputStream is = new ByteArrayInputStream(
+ scss.printState().getBytes());
toReturn.add(this.emitInputStream(logger, is,
fileInfo.getOriginalCssPath()));
@@ -143,10 +144,8 @@ public class SassLinker extends AbstractLinker {
logger.log(TreeLogger.ERROR, "SCSS compilation failed for "
+ fileInfo.getOriginalCssPath(), e);
} catch (IOException e) {
- logger.log(
- TreeLogger.ERROR,
- "Could not write CSS file for "
- + fileInfo.getOriginalCssPath(), e);
+ logger.log(TreeLogger.ERROR, "Could not write CSS file for "
+ + fileInfo.getOriginalCssPath(), e);
} catch (Exception e) {
logger.log(TreeLogger.ERROR, "SCSS compilation failed for "
+ fileInfo.getOriginalCssPath(), e);
@@ -161,7 +160,7 @@ public class SassLinker extends AbstractLinker {
/**
* Writes the contents of an InputStream out to a file.
- *
+ *
* @param contents
* @param tempfile
* @throws IOException
@@ -185,7 +184,7 @@ public class SassLinker extends AbstractLinker {
/**
* Create folder in temporary space on disk.
- *
+ *
* @param partialPath
* @return
*/
diff --git a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/AcceptCriteriaFactoryGenerator.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/AcceptCriteriaFactoryGenerator.java
index 2d08329e9a..813f182b75 100644
--- a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/AcceptCriteriaFactoryGenerator.java
+++ b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/AcceptCriteriaFactoryGenerator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -37,7 +37,7 @@ import com.vaadin.shared.ui.dd.AcceptCriterion;
* GWT generator to build {@link VAcceptCriterionFactory} implementation
* dynamically based on {@link AcceptCriterion} annotations available in
* classpath.
- *
+ *
*/
public class AcceptCriteriaFactoryGenerator extends Generator {
@@ -67,7 +67,7 @@ public class AcceptCriteriaFactoryGenerator extends Generator {
/**
* Generate source code for WidgetMapImpl
- *
+ *
* @param logger
* Logger object
* @param context
@@ -89,7 +89,8 @@ public class AcceptCriteriaFactoryGenerator extends Generator {
ClassSourceFileComposerFactory composer = null;
composer = new ClassSourceFileComposerFactory(packageName, className);
composer.addImport("com.google.gwt.core.client.GWT");
- composer.setSuperclass("com.vaadin.client.ui.dd.VAcceptCriterionFactory");
+ composer.setSuperclass(
+ "com.vaadin.client.ui.dd.VAcceptCriterionFactory");
SourceWriter sourceWriter = composer.createSourceWriter(context,
printWriter);
@@ -100,9 +101,8 @@ public class AcceptCriteriaFactoryGenerator extends Generator {
sourceWriter.println("}");
// commit generated class
context.commit(logger, printWriter);
- logger.log(Type.INFO,
- "Done. (" + (new Date().getTime() - date.getTime()) / 1000
- + "seconds)");
+ logger.log(Type.INFO, "Done. ("
+ + (new Date().getTime() - date.getTime()) / 1000 + "seconds)");
}
@@ -114,8 +114,8 @@ public class AcceptCriteriaFactoryGenerator extends Generator {
sourceWriter.println("name = name.intern();");
- JClassType criteriaType = context.getTypeOracle().findType(
- VAcceptCriterion.class.getName());
+ JClassType criteriaType = context.getTypeOracle()
+ .findType(VAcceptCriterion.class.getName());
JClassType[] subtypes = criteriaType.getSubtypes();
Arrays.sort(subtypes, ConnectorBundle.jClassComparator);
for (JClassType clientClass : subtypes) {
@@ -123,10 +123,11 @@ public class AcceptCriteriaFactoryGenerator extends Generator {
.getAnnotation(AcceptCriterion.class);
if (annotation != null) {
String clientClassName = clientClass.getQualifiedSourceName();
- Class<?> serverClass = clientClass.getAnnotation(
- AcceptCriterion.class).value();
+ Class<?> serverClass = clientClass
+ .getAnnotation(AcceptCriterion.class).value();
String serverClassName = serverClass.getCanonicalName();
- logger.log(Type.INFO, "creating mapping for " + serverClassName);
+ logger.log(Type.INFO,
+ "creating mapping for " + serverClassName);
sourceWriter.print("if (\"");
sourceWriter.print(serverClassName);
sourceWriter.print("\" == name) return GWT.create(");
diff --git a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/ConnectorBundleLoaderFactory.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/ConnectorBundleLoaderFactory.java
index 2b8ccc87d0..510401e739 100644
--- a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/ConnectorBundleLoaderFactory.java
+++ b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/ConnectorBundleLoaderFactory.java
@@ -440,9 +440,10 @@ public class ConnectorBundleLoaderFactory extends Generator {
throw new UnableToCompleteException();
}
if (!property.hasAccessorMethods()) {
- logger.log(Type.ERROR, beanType.getQualifiedSourceName()
- + " has the property '" + name
- + "' without getter defined.");
+ logger.log(Type.ERROR,
+ beanType.getQualifiedSourceName()
+ + " has the property '" + name
+ + "' without getter defined.");
throw new UnableToCompleteException();
}
}
@@ -480,8 +481,9 @@ public class ConnectorBundleLoaderFactory extends Generator {
writer.print(
"store.@%s::setPropertyData(Ljava/lang/Class;Ljava/lang/String;Lcom/google/gwt/core/client/JavaScriptObject;)",
TypeDataStore.class.getName());
- writer.println("(@%s::class, '%s', data);", property.getBeanType()
- .getQualifiedSourceName(), property.getName());
+ writer.println("(@%s::class, '%s', data);",
+ property.getBeanType().getQualifiedSourceName(),
+ property.getName());
writer.println();
writer.splitIfNeeded(true,
String.format("%s store", TypeDataStore.class.getName()));
@@ -525,8 +527,7 @@ public class ConnectorBundleLoaderFactory extends Generator {
.entrySet()) {
JClassType connector = entry.getKey();
- TreeLogger typeLogger = logger.branch(
- Type.DEBUG,
+ TreeLogger typeLogger = logger.branch(Type.DEBUG,
"Generating @OnStateChange support for "
+ connector.getName());
@@ -544,9 +545,8 @@ public class ConnectorBundleLoaderFactory extends Generator {
"Processing method " + method.getName());
if (method.isPublic() || method.isProtected()) {
- methodLogger
- .log(Type.ERROR,
- "@OnStateChange is only supported for methods with private or default visibility.");
+ methodLogger.log(Type.ERROR,
+ "@OnStateChange is only supported for methods with private or default visibility.");
throw new UnableToCompleteException();
}
@@ -654,9 +654,8 @@ public class ConnectorBundleLoaderFactory extends Generator {
.entrySet()) {
JClassType beanType = entry.getKey();
for (Property property : entry.getValue()) {
- w.println(
- "store.setDelegateToWidget(%s, \"%s\", \"%s\");",
- getClassLiteralString(beanType),// property.getBeanType()),
+ w.println("store.setDelegateToWidget(%s, \"%s\", \"%s\");",
+ getClassLiteralString(beanType), // property.getBeanType()),
property.getName(),
property.getAnnotation(DelegateToWidget.class).value());
}
@@ -820,10 +819,12 @@ public class ConnectorBundleLoaderFactory extends Generator {
}
}
- private void writeParamTypes(SplittingSourceWriter w, ConnectorBundle bundle) {
+ private void writeParamTypes(SplittingSourceWriter w,
+ ConnectorBundle bundle) {
Map<JClassType, Set<JMethod>> needsParamTypes = bundle
.getNeedsParamTypes();
- for (Entry<JClassType, Set<JMethod>> entry : needsParamTypes.entrySet()) {
+ for (Entry<JClassType, Set<JMethod>> entry : needsParamTypes
+ .entrySet()) {
JClassType type = entry.getKey();
Set<JMethod> methods = entry.getValue();
@@ -864,8 +865,8 @@ public class ConnectorBundleLoaderFactory extends Generator {
w.print("\",");
if (method.isPublic()) {
- typeLogger.log(Type.DEBUG, "Invoking " + method.getName()
- + " using java");
+ typeLogger.log(Type.DEBUG,
+ "Invoking " + method.getName() + " using java");
writeJavaInvoker(w, type, method);
} else {
@@ -893,8 +894,8 @@ public class ConnectorBundleLoaderFactory extends Generator {
w.indent();
JType returnType = method.getReturnType();
- boolean hasReturnType = !"void".equals(returnType
- .getQualifiedSourceName());
+ boolean hasReturnType = !"void"
+ .equals(returnType.getQualifiedSourceName());
// Note that void is also a primitive type
boolean hasPrimitiveReturnType = hasReturnType
@@ -905,9 +906,9 @@ public class ConnectorBundleLoaderFactory extends Generator {
if (hasPrimitiveReturnType) {
// Integer.valueOf(expression);
- w.print("@%s::valueOf(%s)(", returnType.isPrimitive()
- .getQualifiedBoxedSourceName(), returnType
- .getJNISignature());
+ w.print("@%s::valueOf(%s)(",
+ returnType.isPrimitive().getQualifiedBoxedSourceName(),
+ returnType.getJNISignature());
// Implementation tested briefly, but I don't dare leave it
// enabled since we are not using it in the framework and we
@@ -923,8 +924,8 @@ public class ConnectorBundleLoaderFactory extends Generator {
JType[] parameterTypes = method.getParameterTypes();
- w.print("target.@%s::" + method.getName() + "(*)(", method
- .getEnclosingType().getQualifiedSourceName());
+ w.print("target.@%s::" + method.getName() + "(*)(",
+ method.getEnclosingType().getQualifiedSourceName());
for (int i = 0; i < parameterTypes.length; i++) {
if (i != 0) {
w.print(", ");
@@ -968,8 +969,8 @@ public class ConnectorBundleLoaderFactory extends Generator {
w.indent();
JType returnType = method.getReturnType();
- boolean hasReturnType = !"void".equals(returnType
- .getQualifiedSourceName());
+ boolean hasReturnType = !"void"
+ .equals(returnType.getQualifiedSourceName());
if (hasReturnType) {
w.print("return ");
}
@@ -989,8 +990,8 @@ public class ConnectorBundleLoaderFactory extends Generator {
// Need to pass through native method to allow casting Object to
// JSO if the value is a string
w.print("%s.<%s>obj2jso(params[%d])",
- JsonDecoder.class.getCanonicalName(),
- parameterTypeName, i);
+ JsonDecoder.class.getCanonicalName(), parameterTypeName,
+ i);
} else {
w.print("(" + parameterTypeName + ") params[" + i + "]");
}
@@ -1088,8 +1089,8 @@ public class ConnectorBundleLoaderFactory extends Generator {
}
private List<ConnectorBundle> buildBundles(TreeLogger logger,
- TypeOracle typeOracle) throws NotFoundException,
- UnableToCompleteException {
+ TypeOracle typeOracle)
+ throws NotFoundException, UnableToCompleteException {
Map<LoadStyle, Collection<JClassType>> connectorsByLoadStyle = new HashMap<LoadStyle, Collection<JClassType>>();
for (LoadStyle loadStyle : LoadStyle.values()) {
@@ -1097,8 +1098,8 @@ public class ConnectorBundleLoaderFactory extends Generator {
}
// Find all types with a valid mapping
- Collection<JClassType> selectedTypes = getConnectorsForWidgetset(
- logger, typeOracle);
+ Collection<JClassType> selectedTypes = getConnectorsForWidgetset(logger,
+ typeOracle);
// Group by load style
for (JClassType connectorSubtype : selectedTypes) {
@@ -1142,8 +1143,8 @@ public class ConnectorBundleLoaderFactory extends Generator {
for (JClassType type : lazy) {
ConnectorBundle bundle = new ConnectorBundle(type.getName(),
eagerBundle);
- TreeLogger subLogger = logger.branch(Type.TRACE, "Populating "
- + type.getName() + " bundle");
+ TreeLogger subLogger = logger.branch(Type.TRACE,
+ "Populating " + type.getName() + " bundle");
bundle.processType(subLogger, type);
bundles.add(bundle);
@@ -1176,8 +1177,8 @@ public class ConnectorBundleLoaderFactory extends Generator {
throws UnableToCompleteException {
JClassType serverConnectorType;
try {
- serverConnectorType = typeOracle.getType(ServerConnector.class
- .getName());
+ serverConnectorType = typeOracle
+ .getType(ServerConnector.class.getName());
} catch (NotFoundException e) {
logger.log(Type.ERROR,
"Can't find " + ServerConnector.class.getName());
@@ -1213,13 +1214,10 @@ public class ConnectorBundleLoaderFactory extends Generator {
superclass = type;
} else {
// Neither inherits from the other - this is a conflict
- logger.log(
- Type.ERROR,
+ logger.log(Type.ERROR,
"Conflicting @Connect mappings detected for "
- + identifier
- + ": "
- + type.getQualifiedSourceName()
- + " and "
+ + identifier + ": "
+ + type.getQualifiedSourceName() + " and "
+ previousMapping.getQualifiedSourceName()
+ ". There can only be multiple @Connect mappings for the same server-side type if one is the subclass of the other.");
throw new UnableToCompleteException();
diff --git a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ArraySerializer.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ArraySerializer.java
index 0049ae9b50..b2a30a02c4 100644
--- a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ArraySerializer.java
+++ b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ArraySerializer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ClientRpcVisitor.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ClientRpcVisitor.java
index 992a012005..688d1fb0cc 100644
--- a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ClientRpcVisitor.java
+++ b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ClientRpcVisitor.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -68,16 +68,11 @@ public class ClientRpcVisitor extends TypeVisitor {
public static void checkReturnType(TreeLogger logger, JMethod method)
throws UnableToCompleteException {
if (!method.getReturnType().getQualifiedSourceName().equals("void")) {
- logger.log(
- Type.ERROR,
- "The method "
- + method.getEnclosingType()
- .getQualifiedSourceName()
- + "."
- + method.getName()
- + " returns "
- + method.getReturnType().getQualifiedSourceName()
- + " but only void is supported for methods in RPC interfaces.");
+ logger.log(Type.ERROR, "The method "
+ + method.getEnclosingType().getQualifiedSourceName() + "."
+ + method.getName() + " returns "
+ + method.getReturnType().getQualifiedSourceName()
+ + " but only void is supported for methods in RPC interfaces.");
throw new UnableToCompleteException();
}
}
diff --git a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ConnectorBundle.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ConnectorBundle.java
index b4531eb08e..d390ee0338 100644
--- a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ConnectorBundle.java
+++ b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ConnectorBundle.java
@@ -60,16 +60,16 @@ public class ConnectorBundle {
public static final Comparator<JClassType> jClassComparator = new Comparator<JClassType>() {
@Override
public int compare(JClassType o1, JClassType o2) {
- return o1.getQualifiedSourceName().compareTo(
- o2.getQualifiedSourceName());
+ return o1.getQualifiedSourceName()
+ .compareTo(o2.getQualifiedSourceName());
}
};
public static final Comparator<JMethod> jMethodComparator = new Comparator<JMethod>() {
@Override
public int compare(JMethod o1, JMethod o2) {
- return o1.getReadableDeclaration().compareTo(
- o2.getReadableDeclaration());
+ return o1.getReadableDeclaration()
+ .compareTo(o2.getReadableDeclaration());
}
};
@@ -140,10 +140,11 @@ public class ConnectorBundle {
TypeOracle oracle) throws NotFoundException {
Map<JType, JClassType> serializers = new HashMap<JType, JClassType>();
- JClassType serializerInterface = oracle.findType(JSONSerializer.class
- .getName());
+ JClassType serializerInterface = oracle
+ .findType(JSONSerializer.class.getName());
JType[] deserializeParamTypes = new JType[] {
- oracle.findType(com.vaadin.client.metadata.Type.class.getName()),
+ oracle.findType(
+ com.vaadin.client.metadata.Type.class.getName()),
oracle.findType(JsonValue.class.getName()),
oracle.findType(ApplicationConnection.class.getName()) };
String deserializeMethodName = "deserialize";
@@ -152,8 +153,8 @@ public class ConnectorBundle {
deserializeParamTypes);
for (JClassType serializer : serializerInterface.getSubtypes()) {
- JMethod deserializeMethod = serializer.findMethod(
- deserializeMethodName, deserializeParamTypes);
+ JMethod deserializeMethod = serializer
+ .findMethod(deserializeMethodName, deserializeParamTypes);
if (deserializeMethod == null) {
continue;
}
@@ -309,21 +310,18 @@ public class ConnectorBundle {
private void checkSerializable(TreeLogger logger, JClassType type)
throws UnableToCompleteException {
- JClassType javaSerializable = type.getOracle().findType(
- Serializable.class.getName());
+ JClassType javaSerializable = type.getOracle()
+ .findType(Serializable.class.getName());
boolean serializable = type.isAssignableTo(javaSerializable);
if (!serializable) {
- boolean abortCompile = "true".equals(System
- .getProperty(FAIL_IF_NOT_SERIALIZABLE));
- logger.log(
- abortCompile ? Type.ERROR : Type.WARN,
- type
- + " is used in RPC or shared state but does not implement "
- + Serializable.class.getName()
- + ". Communication will work but the Application on server side cannot be serialized if it refers to objects of this type. "
- + "If the system property "
- + FAIL_IF_NOT_SERIALIZABLE
- + " is set to \"true\", this causes the compilation to fail instead of just emitting a warning.");
+ boolean abortCompile = "true"
+ .equals(System.getProperty(FAIL_IF_NOT_SERIALIZABLE));
+ logger.log(abortCompile ? Type.ERROR : Type.WARN, type
+ + " is used in RPC or shared state but does not implement "
+ + Serializable.class.getName()
+ + ". Communication will work but the Application on server side cannot be serialized if it refers to objects of this type. "
+ + "If the system property " + FAIL_IF_NOT_SERIALIZABLE
+ + " is set to \"true\", this causes the compilation to fail instead of just emitting a warning.");
if (abortCompile) {
throw new UnableToCompleteException();
}
@@ -509,7 +507,8 @@ public class ConnectorBundle {
set.add(value);
}
- private <K> void addMapping(Map<K, Set<JMethod>> map, K key, JMethod value) {
+ private <K> void addMapping(Map<K, Set<JMethod>> map, K key,
+ JMethod value) {
Set<JMethod> set = map.get(key);
if (set == null) {
set = new TreeSet<JMethod>(jMethodComparator);
@@ -609,9 +608,8 @@ public class ConnectorBundle {
if (typeData != null && hasMapping(typeData, method, methodAttribute)) {
return true;
} else {
- return previousBundle != null
- && previousBundle.hasMethodAttribute(type, method,
- methodAttribute);
+ return previousBundle != null && previousBundle
+ .hasMethodAttribute(type, method, methodAttribute);
}
}
@@ -699,7 +697,8 @@ public class ConnectorBundle {
}
}
- private boolean isNeedsOnStateChangeHandler(JClassType type, JMethod method) {
+ private boolean isNeedsOnStateChangeHandler(JClassType type,
+ JMethod method) {
if (hasMapping(needsOnStateChange, type, method)) {
return true;
} else {
diff --git a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ConnectorInitVisitor.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ConnectorInitVisitor.java
index ea3b097fa2..33766cfd72 100644
--- a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ConnectorInitVisitor.java
+++ b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ConnectorInitVisitor.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/CustomSerializer.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/CustomSerializer.java
index bb3dd4f61d..a93e5bd4a1 100644
--- a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/CustomSerializer.java
+++ b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/CustomSerializer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/EnumSerializer.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/EnumSerializer.java
index 9876baf946..f6581f20bc 100644
--- a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/EnumSerializer.java
+++ b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/EnumSerializer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/FieldProperty.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/FieldProperty.java
index a31dafe05c..0d5d831495 100644
--- a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/FieldProperty.java
+++ b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/FieldProperty.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -45,15 +45,16 @@ public class FieldProperty extends Property {
@Override
public void writeSetterBody(TreeLogger logger, SourceWriter w,
String beanVariable, String valueVariable) {
- w.println("%s.@%s::%s = %s;", beanVariable, getBeanType()
- .getQualifiedSourceName(), getName(), unboxValue(valueVariable));
+ w.println("%s.@%s::%s = %s;", beanVariable,
+ getBeanType().getQualifiedSourceName(), getName(),
+ unboxValue(valueVariable));
}
@Override
public void writeGetterBody(TreeLogger logger, SourceWriter w,
String beanVariable) {
- String value = String.format("%s.@%s::%s", beanVariable, getBeanType()
- .getQualifiedSourceName(), getName());
+ String value = String.format("%s.@%s::%s", beanVariable,
+ getBeanType().getQualifiedSourceName(), getName());
w.print("return ");
w.print(boxValue(value));
w.println(";");
diff --git a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/GeneratedSerializer.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/GeneratedSerializer.java
index 6afb172ea2..623b320793 100644
--- a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/GeneratedSerializer.java
+++ b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/GeneratedSerializer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/JsonSerializer.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/JsonSerializer.java
index a7a6c568da..bdd5074ce1 100644
--- a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/JsonSerializer.java
+++ b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/JsonSerializer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -56,8 +56,8 @@ public abstract class JsonSerializer implements GeneratedSerializer {
+ ApplicationConnection.class.getName() + " connection) {");
w.indent();
// MouseEventDetails castedValue = (MouseEventDetails) value;
- w.println(qualifiedSourceName + " castedValue = ("
- + qualifiedSourceName + ") value;");
+ w.println(qualifiedSourceName + " castedValue = (" + qualifiedSourceName
+ + ") value;");
printSerializerBody(logger, w, "castedValue", "connection");
diff --git a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/MethodProperty.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/MethodProperty.java
index 32aad92774..4773fd908e 100644
--- a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/MethodProperty.java
+++ b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/MethodProperty.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -36,8 +36,8 @@ public class MethodProperty extends Property {
private final String getter;
private MethodProperty(JClassType beanType, JMethod setter, String getter) {
- super(getTransportFieldName(setter), beanType, setter
- .getParameterTypes()[0]);
+ super(getTransportFieldName(setter), beanType,
+ setter.getParameterTypes()[0]);
this.setter = setter;
this.getter = getter;
}
@@ -54,8 +54,8 @@ public class MethodProperty extends Property {
List<JMethod> setters = getSetters(type, getters);
for (JMethod setter : setters) {
String getter = findGetter(type, setter);
- properties.add(new MethodProperty(setter.getEnclosingType(),
- setter, getters.contains(getter) ? getter : null));
+ properties.add(new MethodProperty(setter.getEnclosingType(), setter,
+ getters.contains(getter) ? getter : null));
}
return properties;
@@ -63,7 +63,7 @@ public class MethodProperty extends Property {
/**
* Returns a list of all setters found in the beanType or its parent class
- *
+ *
* @param beanType
* The type to check
* @param getters
@@ -74,9 +74,8 @@ public class MethodProperty extends Property {
Set<String> getters) {
List<JMethod> setterMethods = new ArrayList<JMethod>();
- while (beanType != null
- && !beanType.getQualifiedSourceName().equals(
- Object.class.getName())) {
+ while (beanType != null && !beanType.getQualifiedSourceName()
+ .equals(Object.class.getName())) {
for (JMethod method : beanType.getMethods()) {
// Process all setters that have corresponding fields
if (!method.isPublic() || method.isStatic()) {
@@ -112,18 +111,19 @@ public class MethodProperty extends Property {
@Override
public void writeSetterBody(TreeLogger logger, SourceWriter w,
String beanVariable, String valueVariable) {
- w.println("%s.@%s::%s(%s)(%s);", beanVariable, getBeanType()
- .getQualifiedSourceName(), setter.getName(), setter
- .getParameterTypes()[0].getJNISignature(),
+ w.println("%s.@%s::%s(%s)(%s);", beanVariable,
+ getBeanType().getQualifiedSourceName(), setter.getName(),
+ setter.getParameterTypes()[0].getJNISignature(),
unboxValue(valueVariable));
}
- private static String findGetter(JClassType beanType, JMethod setterMethod) {
+ private static String findGetter(JClassType beanType,
+ JMethod setterMethod) {
JType setterParameterType = setterMethod.getParameterTypes()[0];
String fieldName = setterMethod.getName().substring(3);
- if (setterParameterType.getQualifiedSourceName().equals(
- boolean.class.getName())) {
+ if (setterParameterType.getQualifiedSourceName()
+ .equals(boolean.class.getName())) {
return "is" + fieldName;
} else {
return "get" + fieldName;
diff --git a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/OnStateChangeVisitor.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/OnStateChangeVisitor.java
index 1c0da9d9e8..e86dbe4858 100644
--- a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/OnStateChangeVisitor.java
+++ b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/OnStateChangeVisitor.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.shared.ui.Connect;
/**
* Visits Connector classes and check for methods with @OnStateChange
* annotations.
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
diff --git a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/Property.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/Property.java
index 0c849bead5..552543a880 100644
--- a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/Property.java
+++ b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/Property.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -103,20 +103,20 @@ public abstract class Property implements Comparable<Property> {
@Override
public int hashCode() {
- return getClass().hashCode() * 31 ^ 2 + getBeanType().hashCode() * 31
- + getName().hashCode();
+ return getClass().hashCode() * 31
+ ^ 2 + getBeanType().hashCode() * 31 + getName().hashCode();
}
@Override
public int compareTo(Property o) {
int comp = getName().compareTo(o.getName());
if (comp == 0) {
- comp = getBeanType().getQualifiedSourceName().compareTo(
- o.getBeanType().getQualifiedSourceName());
+ comp = getBeanType().getQualifiedSourceName()
+ .compareTo(o.getBeanType().getQualifiedSourceName());
}
if (comp == 0) {
- comp = getClass().getCanonicalName().compareTo(
- o.getClass().getCanonicalName());
+ comp = getClass().getCanonicalName()
+ .compareTo(o.getClass().getCanonicalName());
}
return comp;
}
diff --git a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/RendererVisitor.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/RendererVisitor.java
index 8b645aa492..6131674ee3 100644
--- a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/RendererVisitor.java
+++ b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/RendererVisitor.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -37,9 +37,9 @@ import elemental.json.JsonValue;
* {@link AbstractRendererConnector#decode(elemental.json.JsonValue) decode}
* method to work without having to implement a "getPresentationType" method.
* </ul>
- *
+ *
* @see WidgetInitVisitor
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -57,17 +57,17 @@ public class RendererVisitor extends TypeVisitor {
private static void doRendererType(TreeLogger logger, JClassType type,
ConnectorBundle bundle) throws UnableToCompleteException {
// The class in which createRenderer is implemented
- JClassType createRendererClass = ConnectorBundle.findInheritedMethod(
- type, "createRenderer").getEnclosingType();
+ JClassType createRendererClass = ConnectorBundle
+ .findInheritedMethod(type, "createRenderer").getEnclosingType();
// Needs GWT constructor if createRenderer is not overridden
- if (createRendererClass.getQualifiedSourceName().equals(
- AbstractRendererConnector.class.getCanonicalName())) {
+ if (createRendererClass.getQualifiedSourceName()
+ .equals(AbstractRendererConnector.class.getCanonicalName())) {
JMethod getRenderer = ConnectorBundle.findInheritedMethod(type,
"getRenderer");
- if (getRenderer.getEnclosingType().getQualifiedSourceName()
- .equals(AbstractRendererConnector.class.getCanonicalName())) {
+ if (getRenderer.getEnclosingType().getQualifiedSourceName().equals(
+ AbstractRendererConnector.class.getCanonicalName())) {
logger.log(Type.ERROR, type.getQualifiedSourceName()
+ " must override either createRenderer or getRenderer");
throw new UnableToCompleteException();
@@ -79,8 +79,8 @@ public class RendererVisitor extends TypeVisitor {
// Also needs renderer type to find the right GWT constructor
bundle.setNeedsReturnType(type, getRenderer);
- logger.log(Type.DEBUG, "Renderer type of " + type + " is "
- + rendererType);
+ logger.log(Type.DEBUG,
+ "Renderer type of " + type + " is " + rendererType);
}
}
@@ -93,8 +93,8 @@ public class RendererVisitor extends TypeVisitor {
bundle.setNeedsSerialize(presentationType);
}
- logger.log(Type.DEBUG, "Presentation type of " + type + " is "
- + presentationType);
+ logger.log(Type.DEBUG,
+ "Presentation type of " + type + " is " + presentationType);
}
private static boolean hasCustomDecodeMethod(JClassType type,
@@ -110,8 +110,8 @@ public class RendererVisitor extends TypeVisitor {
return !decodeMethod.getEnclosingType().getQualifiedSourceName()
.equals(AbstractRendererConnector.class.getName());
} catch (NotFoundException e) {
- logger.log(Type.ERROR, "Can't find decode method for renderer "
- + type, e);
+ logger.log(Type.ERROR,
+ "Can't find decode method for renderer " + type, e);
throw new UnableToCompleteException();
}
}
@@ -120,16 +120,13 @@ public class RendererVisitor extends TypeVisitor {
throws UnableToCompleteException {
JClassType originalType = type;
while (type != null) {
- if (type.getQualifiedBinaryName().equals(
- AbstractRendererConnector.class.getName())) {
+ if (type.getQualifiedBinaryName()
+ .equals(AbstractRendererConnector.class.getName())) {
JParameterizedType parameterized = type.isParameterized();
if (parameterized == null) {
- logger.log(
- Type.ERROR,
- type.getQualifiedSourceName()
- + " must define the generic parameter of the inherited "
- + AbstractRendererConnector.class
- .getSimpleName());
+ logger.log(Type.ERROR, type.getQualifiedSourceName()
+ + " must define the generic parameter of the inherited "
+ + AbstractRendererConnector.class.getSimpleName());
throw new UnableToCompleteException();
}
return parameterized.getTypeArgs()[0];
diff --git a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ServerRpcVisitor.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ServerRpcVisitor.java
index 86ece28041..58bb8dd902 100644
--- a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ServerRpcVisitor.java
+++ b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ServerRpcVisitor.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -52,7 +52,8 @@ public class ServerRpcVisitor extends TypeVisitor {
}
}
- if (method.getAnnotation(NoLoadingIndicator.class) != null) {
+ if (method
+ .getAnnotation(NoLoadingIndicator.class) != null) {
bundle.setMethodAttribute(type, method,
MethodAttribute.NO_LOADING_INDICATOR);
}
diff --git a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/StateInitVisitor.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/StateInitVisitor.java
index 046c5c4611..f726dcdf55 100644
--- a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/StateInitVisitor.java
+++ b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/StateInitVisitor.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,8 +24,8 @@ public class StateInitVisitor extends TypeVisitor {
@Override
public void visitConnector(TreeLogger logger, JClassType type,
ConnectorBundle bundle) {
- JMethod getState = ConnectorBundle
- .findInheritedMethod(type, "getState");
+ JMethod getState = ConnectorBundle.findInheritedMethod(type,
+ "getState");
bundle.setNeedsReturnType(type, getState);
bundle.setNeedsSerialize(getState.getReturnType());
diff --git a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/TypeVisitor.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/TypeVisitor.java
index 028e4cc44d..441da12e38 100644
--- a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/TypeVisitor.java
+++ b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/TypeVisitor.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/WidgetInitVisitor.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/WidgetInitVisitor.java
index 9a9cac18ba..378ecca361 100644
--- a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/WidgetInitVisitor.java
+++ b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/WidgetInitVisitor.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,8 +32,9 @@ public class WidgetInitVisitor extends TypeVisitor {
ConnectorBundle bundle) throws UnableToCompleteException {
if (ConnectorBundle.isConnectedComponentConnector(type)) {
// The class in which createWidget is implemented
- JClassType createWidgetClass = ConnectorBundle.findInheritedMethod(
- type, "createWidget").getEnclosingType();
+ JClassType createWidgetClass = ConnectorBundle
+ .findInheritedMethod(type, "createWidget")
+ .getEnclosingType();
JMethod getWidget = ConnectorBundle.findInheritedMethod(type,
"getWidget");
@@ -42,9 +43,7 @@ public class WidgetInitVisitor extends TypeVisitor {
// Needs GWT constructor if createWidget is not overridden
if (createWidgetClass.getQualifiedSourceName().equals(
AbstractComponentConnector.class.getCanonicalName())) {
- if (getWidget
- .getEnclosingType()
- .getQualifiedSourceName()
+ if (getWidget.getEnclosingType().getQualifiedSourceName()
.equals(AbstractComponentConnector.class
.getCanonicalName())) {
logger.log(Type.ERROR, type.getQualifiedSourceName()
@@ -79,12 +78,8 @@ public class WidgetInitVisitor extends TypeVisitor {
.findInheritedMethod(widgetType, methodName,
property.getPropertyType());
if (delegatedSetter == null) {
- logger.log(
- Type.ERROR,
- widgetType.getName()
- + "."
- + methodName
- + "("
+ logger.log(Type.ERROR,
+ widgetType.getName() + "." + methodName + "("
+ property.getPropertyType()
.getSimpleSourceName()
+ ") required by @DelegateToWidget for "
diff --git a/client-compiler/src/main/java/com/vaadin/tools/CvalAddonsChecker.java b/client-compiler/src/main/java/com/vaadin/tools/CvalAddonsChecker.java
index aab7231258..6dab674870 100644
--- a/client-compiler/src/main/java/com/vaadin/tools/CvalAddonsChecker.java
+++ b/client-compiler/src/main/java/com/vaadin/tools/CvalAddonsChecker.java
@@ -79,7 +79,7 @@ public final class CvalAddonsChecker {
/**
* Visit all MANIFEST.MF files in the classpath validating licenses.
- *
+ *
* Return a list of Cval licensed products in order to have enough info to
* generate nag messages in the UI.
*/
@@ -108,14 +108,14 @@ public final class CvalAddonsChecker {
Attributes attribs = manifest.getMainAttributes();
String license = attribs.getValue(VAADIN_ADDON_LICENSE);
String name = attribs.getValue(VAADIN_ADDON_NAME);
- String vers = attribs.getValue(VAADIN_ADDON_VERSION) == null ? ""
- : attribs.getValue(VAADIN_ADDON_VERSION);
- String title = attribs.getValue(VAADIN_ADDON_TITLE) == null ? name
- : attribs.getValue(VAADIN_ADDON_TITLE);
+ String vers = attribs.getValue(VAADIN_ADDON_VERSION) == null
+ ? "" : attribs.getValue(VAADIN_ADDON_VERSION);
+ String title = attribs.getValue(VAADIN_ADDON_TITLE) == null
+ ? name : attribs.getValue(VAADIN_ADDON_TITLE);
String widgetsets = attribs
.getValue(VAADIN_ADDON_WIDGETSET) == null ? name
- : attribs.getValue(VAADIN_ADDON_WIDGETSET);
+ : attribs.getValue(VAADIN_ADDON_WIDGETSET);
if (name == null || license == null) {
continue;
@@ -131,14 +131,14 @@ public final class CvalAddonsChecker {
title);
printValidLicense(info, title, vers);
} catch (UnreachableCvalServerException e) {
- info = CvalChecker.parseJson("{'product':{'name':'"
- + name + "'}}");
+ info = CvalChecker.parseJson(
+ "{'product':{'name':'" + name + "'}}");
printServerUnreachable(title, vers);
}
for (String w : widgetsets.split("[, ]+")) {
- ret.add(new CValUiInfo(title, String
- .valueOf(computeMajorVersion(vers)), w,
- info.getType()));
+ ret.add(new CValUiInfo(title,
+ String.valueOf(computeMajorVersion(vers)),
+ w, info.getType()));
}
}
} catch (IOException ignored) {
@@ -151,7 +151,7 @@ public final class CvalAddonsChecker {
/**
* Set the filter regexp of .jar names which we have to consider.
- *
+ *
* default is '.*touchkit.*'
*/
public CvalAddonsChecker setFilter(String regexp) {
@@ -174,13 +174,12 @@ public final class CvalAddonsChecker {
}
private void printServerUnreachable(String name, String version) {
- System.out.println(LINE
- + "\n"
- + getErrorMessage("unreachable", name,
- computeMajorVersion(version)) + "\n" + LINE);
+ System.out.println(LINE + "\n" + getErrorMessage("unreachable", name,
+ computeMajorVersion(version)) + "\n" + LINE);
}
- private void printValidLicense(CvalInfo info, String title, String version) {
+ private void printValidLicense(CvalInfo info, String title,
+ String version) {
String msg = info.getMessage();
if (msg == null) {
String key = "evaluation".equals(info.getType()) ? "evaluation"
diff --git a/client-compiler/src/main/java/com/vaadin/tools/CvalChecker.java b/client-compiler/src/main/java/com/vaadin/tools/CvalChecker.java
index 9217781695..d8c04d9d23 100644
--- a/client-compiler/src/main/java/com/vaadin/tools/CvalChecker.java
+++ b/client-compiler/src/main/java/com/vaadin/tools/CvalChecker.java
@@ -52,10 +52,10 @@ public final class CvalChecker {
/*
* Class used for binding the JSON gotten from server.
- *
+ *
* It is not in a separate f le, so as it is easier to copy into any product
* which does not depend on vaadin core.
- *
+ *
* We are using elemental.json in order not to use additional dependency
* like auto-beans, gson, etc.
*/
@@ -153,8 +153,8 @@ public final class CvalChecker {
public boolean isLicenseExpired() {
return (getExpired() != null && getExpired())
- || (getExpiredEpoch() != null && getExpiredEpoch().before(
- new Date()));
+ || (getExpiredEpoch() != null
+ && getExpiredEpoch().before(new Date()));
}
public boolean isValidVersion(int majorVersion) {
@@ -248,8 +248,8 @@ public final class CvalChecker {
} else if (info != null && info.getMessage() != null) {
msg = info.getMessage().replace("\\n", "\n");
} else if (info != null && info.isLicenseExpired()) {
- String type = "evaluation".equals(info.getType()) ? "Evaluation license"
- : "License";
+ String type = "evaluation".equals(info.getType())
+ ? "Evaluation license" : "License";
msg = getErrorMessage("expired", title, majorVers, type);
} else if (key == null) {
msg = getErrorMessage("none", title, majorVers);
@@ -359,8 +359,8 @@ public final class CvalChecker {
* when we have license key but server is unreachable
*/
public CvalInfo validateProduct(String productName, String productVersion,
- String productTitle) throws InvalidCvalException,
- UnreachableCvalServerException {
+ String productTitle)
+ throws InvalidCvalException, UnreachableCvalServerException {
String key = getDeveloperLicenseKey(productName, productVersion,
productTitle);
@@ -416,8 +416,8 @@ public final class CvalChecker {
int timeout = validCache ? 2000 : 10000;
try {
- CvalInfo srvinfo = parseJson(provider.askServer(productName + "-"
- + productVersion, productKey, timeout));
+ CvalInfo srvinfo = parseJson(provider.askServer(
+ productName + "-" + productVersion, productKey, timeout));
if (srvinfo != null && srvinfo.isValidInfo(productName, productKey)
&& srvinfo.isValidVersion(majorVersion)) {
// We always cache the info if it is valid although it is
@@ -502,8 +502,8 @@ public final class CvalChecker {
static String getErrorMessage(String key, Object... pars) {
Locale loc = Locale.getDefault();
- ResourceBundle res = ResourceBundle.getBundle(
- CvalChecker.class.getName(), loc);
+ ResourceBundle res = ResourceBundle
+ .getBundle(CvalChecker.class.getName(), loc);
String msg = res.getString(key);
return new MessageFormat(msg, loc).format(pars);
}
diff --git a/client-compiler/src/main/java/com/vaadin/tools/WidgetsetCompiler.java b/client-compiler/src/main/java/com/vaadin/tools/WidgetsetCompiler.java
index 7c06e9d7af..f66e00d383 100755
--- a/client-compiler/src/main/java/com/vaadin/tools/WidgetsetCompiler.java
+++ b/client-compiler/src/main/java/com/vaadin/tools/WidgetsetCompiler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,24 +23,24 @@ import com.vaadin.server.widgetsetutils.WidgetSetBuilder;
/**
* A wrapper for the GWT compiler that runs the compiler in a new thread after
* updating the widgetset file.
- *
+ *
* This class originally existed to allow circumventing a J2SE 5.0 bug (6316197)
* that prevents setting the stack size for the main thread.
- *
+ *
* This class takes the same command line arguments as the
* com.google.gwt.dev.Compiler class.
- *
+ *
* A typical invocation would use e.g. the following arguments
- *
+ *
* "-war WebContent/VAADIN/widgetsets com.vaadin.DefaultWidgetSet"
- *
+ *
* In addition, larger memory usage settings for the VM should be used, e.g.
- *
+ *
* "-Xms256M -Xmx512M -Xss8M"
- *
+ *
* The source directory containing widgetset and related classes must be
* included in the classpath, as well as other relevant JARs.
- *
+ *
* @deprecated with Java 6, can use com.google.gwt.dev.Compiler directly (also
* in Eclipse plug-in etc.)
*/
@@ -71,8 +71,8 @@ public class WidgetsetCompiler {
// TODO expecting this is launched via eclipse WTP
// project
- System.out
- .println("Updating GWT module description file...");
+ System.out.println(
+ "Updating GWT module description file...");
WidgetSetBuilder.updateWidgetSet(wsname);
System.out.println("Done.");
diff --git a/client-compiler/src/test/java/com/vaadin/tools/CvalAddonsCheckerTest.java b/client-compiler/src/test/java/com/vaadin/tools/CvalAddonsCheckerTest.java
index c6200bc7e0..c706f0b9e0 100644
--- a/client-compiler/src/test/java/com/vaadin/tools/CvalAddonsCheckerTest.java
+++ b/client-compiler/src/test/java/com/vaadin/tools/CvalAddonsCheckerTest.java
@@ -54,8 +54,8 @@ public class CvalAddonsCheckerTest {
@Before
public void setup() {
- addonChecker = new CvalAddonsChecker().setLicenseProvider(
- validLicenseProvider).setFilter(".*test.*");
+ addonChecker = new CvalAddonsChecker()
+ .setLicenseProvider(validLicenseProvider).setFilter(".*test.*");
licenseName = computeLicenseName(productNameCval);
deleteCache(productNameCval);
diff --git a/client-compiler/src/test/java/com/vaadin/tools/CvalAddonstCheckerUseCasesTest.java b/client-compiler/src/test/java/com/vaadin/tools/CvalAddonstCheckerUseCasesTest.java
index 01cfe2087e..82962663f2 100644
--- a/client-compiler/src/test/java/com/vaadin/tools/CvalAddonstCheckerUseCasesTest.java
+++ b/client-compiler/src/test/java/com/vaadin/tools/CvalAddonstCheckerUseCasesTest.java
@@ -76,7 +76,7 @@ public class CvalAddonstCheckerUseCasesTest {
enum Message {
AGPL("AGPL"), VALID(">.* valid"), INVALID("not valid"), NO_LICENSE(
"not found"), NO_VALIDATED("has not been validated"), EXPIRED(
- "has expired"), EVALUATION("evaluation");
+ "has expired"), EVALUATION("evaluation");
String msg;
@@ -93,7 +93,7 @@ public class CvalAddonstCheckerUseCasesTest {
}
/* TODO: Use more descriptive test names */
-
+
@Test
public void testUseCase1() throws Exception {
useCase(1, License.NONE, Version.AGPL, Validated.NO, Network.OFF,
@@ -219,8 +219,8 @@ public class CvalAddonstCheckerUseCasesTest {
if (val == Validated.NO) {
deleteCache(productNameCval);
} else {
- String type = lic == License.EVAL || lic == License.EVAL_EXPIRED ? "evaluation"
- : null;
+ String type = lic == License.EVAL || lic == License.EVAL_EXPIRED
+ ? "evaluation" : null;
Boolean expired = lic == License.EVAL_EXPIRED
|| lic == License.REAL_EXPIRED ? true : null;
String key = val == Validated.OLD_KEY ? "oldkey" : null;
@@ -253,17 +253,16 @@ public class CvalAddonstCheckerUseCasesTest {
restoreSystemOut();
message = e.getMessage();
if (res == Compile.YES) {
- Assert.fail(testNumber + "Unexpected Exception: "
- + e.getMessage());
+ Assert.fail(
+ testNumber + "Unexpected Exception: " + e.getMessage());
}
}
// System.err.println("\n> " + testNumber + " " + lic + " " + ver + " "
// + val + " " + net + " " + res + " " + cached + "\n" + message);
- Assert.assertTrue(testNumber + "Fail:\n" + message
- + "\nDoes not match:" + msg.msg,
- message.matches("(?s).*" + msg.msg + ".*"));
+ Assert.assertTrue(testNumber + "Fail:\n" + message + "\nDoes not match:"
+ + msg.msg, message.matches("(?s).*" + msg.msg + ".*"));
String c = cachedPreferences(productNameCval);
Assert.assertTrue(testNumber + "Fail: cacheExists != "
diff --git a/client-compiler/src/test/java/com/vaadin/tools/CvalCheckerTest.java b/client-compiler/src/test/java/com/vaadin/tools/CvalCheckerTest.java
index 6e1a8e57ed..8333449a78 100644
--- a/client-compiler/src/test/java/com/vaadin/tools/CvalCheckerTest.java
+++ b/client-compiler/src/test/java/com/vaadin/tools/CvalCheckerTest.java
@@ -96,9 +96,8 @@ public class CvalCheckerTest {
static final CvalServer expiredLicenseProviderWithMessage = new CvalServer() {
@Override
String askServer(String productName, String productKey, int timeout) {
- return responseJson
- .replace("'expired",
- "'message':'Custom\\\\nServer\\\\nMessage','expired':true,'expired");
+ return responseJson.replace("'expired",
+ "'message':'Custom\\\\nServer\\\\nMessage','expired':true,'expired");
}
};
// A provider returning an expired license with a server message
@@ -205,15 +204,15 @@ public class CvalCheckerTest {
// Success if license key and version are valid
System.setProperty(licenseName, VALID_KEY);
- licenseChecker
- .validateProduct(productNameCval, "2.1", productTitleCval);
+ licenseChecker.validateProduct(productNameCval, "2.1",
+ productTitleCval);
Assert.assertTrue(cacheExists(productNameCval));
// Success if license and cache file are valid, although the license
// server is offline
licenseChecker.setLicenseProvider(unreachableLicenseProvider);
- licenseChecker
- .validateProduct(productNameCval, "2.1", productTitleCval);
+ licenseChecker.validateProduct(productNameCval, "2.1",
+ productTitleCval);
Assert.assertTrue(cacheExists(productNameCval));
// Fail if license key changes although cache file were validated
@@ -262,8 +261,8 @@ public class CvalCheckerTest {
// Check an unlimited license
deleteCache(productNameCval);
licenseChecker.setLicenseProvider(unlimitedLicenseProvider);
- licenseChecker
- .validateProduct(productNameCval, "2.1", productTitleCval);
+ licenseChecker.validateProduct(productNameCval, "2.1",
+ productTitleCval);
Assert.assertTrue(cacheExists(productNameCval));
// Fail if expired flag does not come, but expired epoch is in the past
@@ -281,8 +280,8 @@ public class CvalCheckerTest {
deleteCache(productNameCval);
licenseChecker.setLicenseProvider(nullVersionLicenseProvider);
- licenseChecker
- .validateProduct(productNameCval, "2.1", productTitleCval);
+ licenseChecker.validateProduct(productNameCval, "2.1",
+ productTitleCval);
Assert.assertTrue(cacheExists(productNameCval));
}
@@ -290,8 +289,8 @@ public class CvalCheckerTest {
* Creates a new .jar file with a MANIFEST.MF with all vaadin license info
* attributes set, and add the .jar to the classpath
*/
- static void addLicensedJarToClasspath(String productName, String licenseType)
- throws Exception {
+ static void addLicensedJarToClasspath(String productName,
+ String licenseType) throws Exception {
// Create a manifest with Vaadin CVAL license
Manifest testManifest = new Manifest();
testManifest.getMainAttributes().putValue("Manifest-Version", "1.0");
@@ -306,8 +305,8 @@ public class CvalCheckerTest {
// Create a temporary Jar
File testJarFile = File.createTempFile("vaadin." + productName, ".jar");
testJarFile.deleteOnExit();
- JarOutputStream target = new JarOutputStream(new FileOutputStream(
- testJarFile), testManifest);
+ JarOutputStream target = new JarOutputStream(
+ new FileOutputStream(testJarFile), testManifest);
target.close();
// Add the new jar to our classpath (use reflection)
@@ -362,7 +361,8 @@ public class CvalCheckerTest {
}
static void restoreSystemOut() {
- System.setOut(new PrintStream(new FileOutputStream(FileDescriptor.out)));
+ System.setOut(
+ new PrintStream(new FileOutputStream(FileDescriptor.out)));
}
@Test(expected = FileNotFoundException.class)
@@ -374,8 +374,8 @@ public class CvalCheckerTest {
public void testReadKeyFromFile_LicenseFileEmpty() throws Exception {
File tmpLicenseFile = File.createTempFile("license", "lic");
- assertNull(licenseChecker.readKeyFromFile(tmpLicenseFile.toURI()
- .toURL(), 4));
+ assertNull(licenseChecker
+ .readKeyFromFile(tmpLicenseFile.toURI().toURL(), 4));
tmpLicenseFile.delete();
}
@@ -388,8 +388,8 @@ public class CvalCheckerTest {
out.println("this-is-a-license");
out.close();
- assertEquals("this-is-a-license", licenseChecker.readKeyFromFile(
- tmpLicenseFile.toURI().toURL(), 4));
+ assertEquals("this-is-a-license", licenseChecker
+ .readKeyFromFile(tmpLicenseFile.toURI().toURL(), 4));
tmpLicenseFile.delete();
}
@@ -402,8 +402,8 @@ public class CvalCheckerTest {
out.println("4=this-is-a-license");
out.close();
- assertEquals("this-is-a-license", licenseChecker.readKeyFromFile(
- tmpLicenseFile.toURI().toURL(), 4));
+ assertEquals("this-is-a-license", licenseChecker
+ .readKeyFromFile(tmpLicenseFile.toURI().toURL(), 4));
tmpLicenseFile.delete();
}
@@ -417,10 +417,10 @@ public class CvalCheckerTest {
out.println("5=this-is-another-license");
out.close();
- assertEquals("this-is-a-license", licenseChecker.readKeyFromFile(
- tmpLicenseFile.toURI().toURL(), 4));
- assertEquals("this-is-another-license", licenseChecker.readKeyFromFile(
- tmpLicenseFile.toURI().toURL(), 5));
+ assertEquals("this-is-a-license", licenseChecker
+ .readKeyFromFile(tmpLicenseFile.toURI().toURL(), 4));
+ assertEquals("this-is-another-license", licenseChecker
+ .readKeyFromFile(tmpLicenseFile.toURI().toURL(), 5));
tmpLicenseFile.delete();
}
@@ -434,10 +434,10 @@ public class CvalCheckerTest {
out.println("5 = this-is-another-license");
out.close();
- assertEquals("this-is-a-license", licenseChecker.readKeyFromFile(
- tmpLicenseFile.toURI().toURL(), 4));
- assertEquals("this-is-another-license", licenseChecker.readKeyFromFile(
- tmpLicenseFile.toURI().toURL(), 5));
+ assertEquals("this-is-a-license", licenseChecker
+ .readKeyFromFile(tmpLicenseFile.toURI().toURL(), 4));
+ assertEquals("this-is-another-license", licenseChecker
+ .readKeyFromFile(tmpLicenseFile.toURI().toURL(), 5));
tmpLicenseFile.delete();
}
@@ -450,8 +450,8 @@ public class CvalCheckerTest {
out.println("5 = this-is-another-license");
out.close();
- assertNull(licenseChecker.readKeyFromFile(tmpLicenseFile.toURI()
- .toURL(), 3));
+ assertNull(licenseChecker
+ .readKeyFromFile(tmpLicenseFile.toURI().toURL(), 3));
tmpLicenseFile.delete();
}
@@ -464,12 +464,12 @@ public class CvalCheckerTest {
out.println("5 = this-is-another-license");
out.close();
- assertEquals("this-is-a-license", licenseChecker.readKeyFromFile(
- tmpLicenseFile.toURI().toURL(), 3));
- assertEquals("this-is-a-license", licenseChecker.readKeyFromFile(
- tmpLicenseFile.toURI().toURL(), 4));
- assertEquals("this-is-another-license", licenseChecker.readKeyFromFile(
- tmpLicenseFile.toURI().toURL(), 5));
+ assertEquals("this-is-a-license", licenseChecker
+ .readKeyFromFile(tmpLicenseFile.toURI().toURL(), 3));
+ assertEquals("this-is-a-license", licenseChecker
+ .readKeyFromFile(tmpLicenseFile.toURI().toURL(), 4));
+ assertEquals("this-is-another-license", licenseChecker
+ .readKeyFromFile(tmpLicenseFile.toURI().toURL(), 5));
tmpLicenseFile.delete();
}
@@ -483,12 +483,12 @@ public class CvalCheckerTest {
out.println("this-is-a-license");
out.close();
- assertEquals("this-is-a-license", licenseChecker.readKeyFromFile(
- tmpLicenseFile.toURI().toURL(), 3));
- assertEquals("this-is-a-license", licenseChecker.readKeyFromFile(
- tmpLicenseFile.toURI().toURL(), 4));
- assertEquals("this-is-another-license", licenseChecker.readKeyFromFile(
- tmpLicenseFile.toURI().toURL(), 5));
+ assertEquals("this-is-a-license", licenseChecker
+ .readKeyFromFile(tmpLicenseFile.toURI().toURL(), 3));
+ assertEquals("this-is-a-license", licenseChecker
+ .readKeyFromFile(tmpLicenseFile.toURI().toURL(), 4));
+ assertEquals("this-is-another-license", licenseChecker
+ .readKeyFromFile(tmpLicenseFile.toURI().toURL(), 5));
tmpLicenseFile.delete();
}
diff --git a/client/src/main/java/com/vaadin/client/AnimationUtil.java b/client/src/main/java/com/vaadin/client/AnimationUtil.java
index 780d2039e1..ee39b42ee3 100644
--- a/client/src/main/java/com/vaadin/client/AnimationUtil.java
+++ b/client/src/main/java/com/vaadin/client/AnimationUtil.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.client.AnimationUtil.AnimationEndListener;
/**
* Utility methods for working with CSS transitions and animations.
- *
+ *
* @author Vaadin Ltd
* @since 7.3
*/
@@ -31,9 +31,9 @@ public class AnimationUtil {
/**
* For internal use only. May be removed or replaced in the future.
- *
+ *
* Set the animation-duration CSS property.
- *
+ *
* @param elem
* the element whose animation-duration to set
* @param duration
@@ -46,9 +46,9 @@ public class AnimationUtil {
/**
* For internal use only. May be removed or replaced in the future.
- *
+ *
* Set the animation-delay CSS property.
- *
+ *
* @param elem
* the element whose animation-delay to set
* @param delay
@@ -69,13 +69,13 @@ public class AnimationUtil {
callbackFunc.listener = listener;
elem.addEventListener(@com.vaadin.client.AnimationUtil::ANIMATION_END_EVENT_NAME, callbackFunc, false);
-
+
// Store function reference for later removal
if(!elem._vaadin_animationend_callbacks) {
elem._vaadin_animationend_callbacks = [];
}
elem._vaadin_animationend_callbacks.push(callbackFunc);
-
+
return callbackFunc;
}-*/;
diff --git a/client/src/main/java/com/vaadin/client/ApplicationConfiguration.java b/client/src/main/java/com/vaadin/client/ApplicationConfiguration.java
index a9fd9803c3..6adb5968e7 100644
--- a/client/src/main/java/com/vaadin/client/ApplicationConfiguration.java
+++ b/client/src/main/java/com/vaadin/client/ApplicationConfiguration.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -62,7 +62,7 @@ public class ApplicationConfiguration implements EntryPoint {
/**
* Helper class for reading configuration options from the bootstap
* javascript
- *
+ *
* @since 7.0
*/
private static class JsoConfiguration extends JavaScriptObject {
@@ -74,7 +74,7 @@ public class ApplicationConfiguration implements EntryPoint {
* Reads a configuration parameter as a string. Please note that the
* javascript value of the parameter should also be a string, or else an
* undefined exception may be thrown.
- *
+ *
* @param name
* name of the configuration parameter
* @return value of the configuration parameter, or <code>null</code> if
@@ -94,7 +94,7 @@ public class ApplicationConfiguration implements EntryPoint {
* Reads a configuration parameter as a boolean object. Please note that
* the javascript value of the parameter should also be a boolean, or
* else an undefined exception may be thrown.
- *
+ *
* @param name
* name of the configuration parameter
* @return boolean value of the configuration paramter, or
@@ -115,7 +115,7 @@ public class ApplicationConfiguration implements EntryPoint {
* Reads a configuration parameter as an integer object. Please note
* that the javascript value of the parameter should also be an integer,
* or else an undefined exception may be thrown.
- *
+ *
* @param name
* name of the configuration parameter
* @return integer value of the configuration paramter, or
@@ -138,7 +138,7 @@ public class ApplicationConfiguration implements EntryPoint {
* an object with appropriate fields, or else an undefined exception may
* be thrown when calling this method or when calling methods on the
* returned object.
- *
+ *
* @param name
* name of the configuration parameter
* @return error message with the given name, or <code>null</code> if no
@@ -152,7 +152,7 @@ public class ApplicationConfiguration implements EntryPoint {
/**
* Returns a native javascript object containing version information
* from the server.
- *
+ *
* @return a javascript object with the version information
*/
private native JavaScriptObject getVersionInfoJSObject()
@@ -162,9 +162,9 @@ public class ApplicationConfiguration implements EntryPoint {
/**
* Gets the version of the Vaadin framework used on the server.
- *
+ *
* @return a string with the version
- *
+ *
* @see com.vaadin.server.VaadinServlet#VERSION
*/
private native String getVaadinVersion()
@@ -174,9 +174,9 @@ public class ApplicationConfiguration implements EntryPoint {
/**
* Gets the version of the Atmosphere framework.
- *
+ *
* @return a string with the version
- *
+ *
* @see org.atmosphere.util#getRawVersion()
*/
private native String getAtmosphereVersion()
@@ -186,7 +186,7 @@ public class ApplicationConfiguration implements EntryPoint {
/**
* Gets the JS version used in the Atmosphere framework.
- *
+ *
* @return a string with the version
*/
private native String getAtmosphereJSVersion()
@@ -206,7 +206,7 @@ public class ApplicationConfiguration implements EntryPoint {
/**
* Wraps a native javascript object containing fields for an error message
- *
+ *
* @since 7.0
*/
public static final class ErrorMessage extends JavaScriptObject {
@@ -268,9 +268,9 @@ public class ApplicationConfiguration implements EntryPoint {
* Checks whether path info in requests to the server-side service should be
* in a request parameter (named <code>v-resourcePath</code>) or appended to
* the end of the service URL.
- *
+ *
* @see #getServiceUrl()
- *
+ *
* @return <code>true</code> if path info should be a request parameter;
* <code>false</code> if the path info goes after the service URL
*/
@@ -282,7 +282,7 @@ public class ApplicationConfiguration implements EntryPoint {
* Return the name of the parameter used to to send data to the service url.
* This method should only be called if {@link #useServiceUrlPathParam()} is
* true.
- *
+ *
* @since 7.1.6
* @return The parameter name, by default <code>v-resourcePath</code>
*/
@@ -300,9 +300,9 @@ public class ApplicationConfiguration implements EntryPoint {
* {@link #useServiceUrlPathParam()} return <code>true</code>, the requested
* path info should be in the <code>v-resourcePath</code> query parameter;
* else the path info should be appended to the end of the URL.
- *
+ *
* @see #useServiceUrlPathParam()
- *
+ *
* @return the URL to the server-side service as a string
*/
public String getServiceUrl() {
@@ -321,7 +321,7 @@ public class ApplicationConfiguration implements EntryPoint {
/**
* Gets the URL of the VAADIN directory on the server.
- *
+ *
* @return the URL of the VAADIN directory
*/
public String getVaadinDirUrl() {
@@ -335,7 +335,7 @@ public class ApplicationConfiguration implements EntryPoint {
/**
* Gets the initial UIDL from the DOM, if it was provided during the init
* process.
- *
+ *
* @return
*/
public String getUIDL() {
@@ -355,7 +355,7 @@ public class ApplicationConfiguration implements EntryPoint {
* instance. The UI id should be included in every request originating from
* this instance in order to associate the request with the right UI
* instance on the server.
- *
+ *
* @return the UI id
*/
public int getUIId() {
@@ -418,7 +418,8 @@ public class ApplicationConfiguration implements EntryPoint {
.intValue();
// null -> false
- standalone = jsoConfiguration.getConfigBoolean("standalone") == Boolean.TRUE;
+ standalone = jsoConfiguration
+ .getConfigBoolean("standalone") == Boolean.TRUE;
heartbeatInterval = jsoConfiguration
.getConfigInteger("heartbeatInterval");
@@ -431,7 +432,7 @@ public class ApplicationConfiguration implements EntryPoint {
/**
* Starts the application with a given id by reading the configuration
* options stored by the bootstrap javascript.
- *
+ *
* @param applicationId
* id of the application to load, this is also the id of the html
* element into which the application should be rendered.
@@ -442,7 +443,8 @@ public class ApplicationConfiguration implements EntryPoint {
@Override
public void execute() {
Profiler.enter("ApplicationConfiguration.startApplication");
- ApplicationConfiguration appConf = getConfigFromDOM(applicationId);
+ ApplicationConfiguration appConf = getConfigFromDOM(
+ applicationId);
ApplicationConnection a = GWT
.create(ApplicationConnection.class);
a.init(widgetSet, appConf);
@@ -461,7 +463,7 @@ public class ApplicationConfiguration implements EntryPoint {
/**
* Gets the configuration object for a specific application from the
* bootstrap javascript.
- *
+ *
* @param appId
* the id of the application to get configuration data for
* @return a native javascript object containing the configuration data
@@ -484,9 +486,9 @@ public class ApplicationConfiguration implements EntryPoint {
/**
* Return Atmosphere version.
- *
+ *
* @since 7.4
- *
+ *
* @return Atmosphere version.
*/
public String getAtmosphereVersion() {
@@ -495,9 +497,9 @@ public class ApplicationConfiguration implements EntryPoint {
/**
* Return Atmosphere JS version.
- *
+ *
* @since 7.4
- *
+ *
* @return Atmosphere JS version.
*/
public String getAtmosphereJSVersion() {
@@ -511,7 +513,8 @@ public class ApplicationConfiguration implements EntryPoint {
// Initialize if not already loaded
Integer currentTag = Integer.valueOf(tag);
while (type == null && currentTag != null) {
- String serverSideClassNameForTag = getServerSideClassNameForTag(currentTag);
+ String serverSideClassNameForTag = getServerSideClassNameForTag(
+ currentTag);
if (TypeData.hasIdentifier(serverSideClassNameForTag)) {
try {
type = (Class<? extends ServerConnector>) TypeData
@@ -562,7 +565,7 @@ public class ApplicationConfiguration implements EntryPoint {
* Returns all tags for given class. Tags are used in
* {@link ApplicationConfiguration} to keep track of different classes and
* their hierarchy
- *
+ *
* @since 7.2
* @param classname
* name of class which tags we want
@@ -624,9 +627,8 @@ public class ApplicationConfiguration implements EntryPoint {
cmd.execute();
}
callbacks.clear();
- } else if (dependenciesLoading == 0
- && !ConnectorBundleLoader.get().isBundleLoaded(
- ConnectorBundleLoader.DEFERRED_BUNDLE_NAME)) {
+ } else if (dependenciesLoading == 0 && !ConnectorBundleLoader.get()
+ .isBundleLoaded(ConnectorBundleLoader.DEFERRED_BUNDLE_NAME)) {
ConnectorBundleLoader.get().loadBundle(
ConnectorBundleLoader.DEFERRED_BUNDLE_NAME,
new BundleLoadCallback() {
@@ -655,9 +657,8 @@ public class ApplicationConfiguration implements EntryPoint {
// Don't run twice if the module has been inherited several times,
// and don't continue if vaadinBootstrap was not executed.
if (moduleLoaded || !vaadinBootstrapLoaded()) {
- getLogger()
- .log(Level.WARNING,
- "vaadinBootstrap.js was not loaded, skipping vaadin application configuration.");
+ getLogger().log(Level.WARNING,
+ "vaadinBootstrap.js was not loaded, skipping vaadin application configuration.");
return;
}
moduleLoaded = true;
@@ -714,7 +715,8 @@ public class ApplicationConfiguration implements EntryPoint {
@Override
public void onFailure(Throwable reason) {
- Window.alert("Failed to load Vaadin debug window styles");
+ Window.alert(
+ "Failed to load Vaadin debug window styles");
}
});
@@ -794,7 +796,7 @@ public class ApplicationConfiguration implements EntryPoint {
* Registers that callback that the bootstrap javascript uses to start
* applications once the widgetset is loaded and all required information is
* available
- *
+ *
* @param widgetsetName
* the name of this widgetset
*/
@@ -809,9 +811,9 @@ public class ApplicationConfiguration implements EntryPoint {
* adding ?debug parameter to URI. Please note that debug mode is always
* disabled if production mode is enabled, but disabling production mode
* does not automatically enable debug mode.
- *
+ *
* @see #isProductionMode()
- *
+ *
* @return true if client side is currently been debugged
*/
public static boolean isDebugMode() {
@@ -823,7 +825,7 @@ public class ApplicationConfiguration implements EntryPoint {
* Checks if production mode is enabled. When production mode is enabled,
* client-side logging is disabled. There may also be other performance
* optimizations.
- *
+ *
* @since 7.1.2
* @return <code>true</code> if production mode is enabled; otherwise
* <code>false</code>.
@@ -843,7 +845,7 @@ public class ApplicationConfiguration implements EntryPoint {
/**
* Checks whether debug logging should be quiet
- *
+ *
* @return <code>true</code> if debug logging should be quiet
*/
public static boolean isQuietDebugMode() {
@@ -855,7 +857,7 @@ public class ApplicationConfiguration implements EntryPoint {
/**
* Checks whether the widget set version has been sent to the server. It is
* sent in the first UIDL request.
- *
+ *
* @return <code>true</code> if browser information has already been sent
*/
public boolean isWidgetsetVersionSent() {
diff --git a/client/src/main/java/com/vaadin/client/ApplicationConnection.java b/client/src/main/java/com/vaadin/client/ApplicationConnection.java
index 97ddd14764..bdf34d229c 100644
--- a/client/src/main/java/com/vaadin/client/ApplicationConnection.java
+++ b/client/src/main/java/com/vaadin/client/ApplicationConnection.java
@@ -69,14 +69,14 @@ import com.vaadin.shared.util.SharedUtil;
* This is the client side communication "engine", managing client-server
* communication with its server side counterpart
* com.vaadin.server.VaadinService.
- *
+ *
* Client-side connectors receive updates from the corresponding server-side
* connector (typically component) as state updates or RPC calls. The connector
* has the possibility to communicate back with its server side counter part
* through RPC calls.
- *
+ *
* TODO document better
- *
+ *
* Entry point classes (widgetsets) define <code>onModuleLoad()</code>.
*/
public class ApplicationConnection implements HasHandlers {
@@ -100,18 +100,17 @@ public class ApplicationConnection implements HasHandlers {
* A string that, if found in a non-JSON response to a UIDL request, will
* cause the browser to refresh the page. If followed by a colon, optional
* whitespace, and a URI, causes the browser to synchronously load the URI.
- *
+ *
* <p>
* This allows, for instance, a servlet filter to redirect the application
* to a custom login page when the session expires. For example:
* </p>
- *
+ *
* <pre>
* if (sessionExpired) {
* response.setHeader(&quot;Content-Type&quot;, &quot;text/html&quot;);
- * response.getWriter().write(
- * myLoginPageHtml + &quot;&lt;!-- Vaadin-Refresh: &quot;
- * + request.getContextPath() + &quot; --&gt;&quot;);
+ * response.getWriter().write(myLoginPageHtml + &quot;&lt;!-- Vaadin-Refresh: &quot;
+ * + request.getContextPath() + &quot; --&gt;&quot;);
* }
* </pre>
*/
@@ -156,7 +155,8 @@ public class ApplicationConnection implements HasHandlers {
void onResponseHandlingEnded(ResponseHandlingEndedEvent e);
}
- public static class RequestStartingEvent extends ApplicationConnectionEvent {
+ public static class RequestStartingEvent
+ extends ApplicationConnectionEvent {
public static Type<CommunicationHandler> TYPE = new Type<CommunicationHandler>();
@@ -175,8 +175,8 @@ public class ApplicationConnection implements HasHandlers {
}
}
- public static class ResponseHandlingEndedEvent extends
- ApplicationConnectionEvent {
+ public static class ResponseHandlingEndedEvent
+ extends ApplicationConnectionEvent {
public static Type<CommunicationHandler> TYPE = new Type<CommunicationHandler>();
@@ -195,8 +195,8 @@ public class ApplicationConnection implements HasHandlers {
}
}
- public static abstract class ApplicationConnectionEvent extends
- GwtEvent<CommunicationHandler> {
+ public static abstract class ApplicationConnectionEvent
+ extends GwtEvent<CommunicationHandler> {
private ApplicationConnection connection;
@@ -210,8 +210,8 @@ public class ApplicationConnection implements HasHandlers {
}
- public static class ResponseHandlingStartedEvent extends
- ApplicationConnectionEvent {
+ public static class ResponseHandlingStartedEvent
+ extends ApplicationConnectionEvent {
public ResponseHandlingStartedEvent(ApplicationConnection connection) {
super(connection);
@@ -233,17 +233,17 @@ public class ApplicationConnection implements HasHandlers {
/**
* Event triggered when a application is stopped by calling
* {@link ApplicationConnection#setApplicationRunning(false)}.
- *
+ *
* To listen for the event add a {@link ApplicationStoppedHandler} by
* invoking
* {@link ApplicationConnection#addHandler(ApplicationConnection.ApplicationStoppedEvent.Type, ApplicationStoppedHandler)}
* to the {@link ApplicationConnection}
- *
+ *
* @since 7.1.8
* @author Vaadin Ltd
*/
- public static class ApplicationStoppedEvent extends
- GwtEvent<ApplicationStoppedHandler> {
+ public static class ApplicationStoppedEvent
+ extends GwtEvent<ApplicationStoppedHandler> {
public static Type<ApplicationStoppedHandler> TYPE = new Type<ApplicationStoppedHandler>();
@@ -265,7 +265,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Called when a communication error has occurred. Returning
* <code>true</code> from this method suppresses error handling.
- *
+ *
* @param details
* A string describing the error.
* @param statusCode
@@ -280,7 +280,7 @@ public class ApplicationConnection implements HasHandlers {
* A listener for listening to application stopped events. The listener can
* be added to a {@link ApplicationConnection} by invoking
* {@link ApplicationConnection#addHandler(ApplicationStoppedEvent.Type, ApplicationStoppedHandler)}
- *
+ *
* @since 7.1.8
* @author Vaadin Ltd
*/
@@ -290,7 +290,7 @@ public class ApplicationConnection implements HasHandlers {
* Triggered when the {@link ApplicationConnection} marks a previously
* running application as stopped by invoking
* {@link ApplicationConnection#setApplicationRunning(false)}
- *
+ *
* @param event
* the event triggered by the {@link ApplicationConnection}
*/
@@ -351,8 +351,8 @@ public class ApplicationConnection implements HasHandlers {
public ApplicationConnection() {
// Assuming UI data is eagerly loaded
- ConnectorBundleLoader.get().loadBundle(
- ConnectorBundleLoader.EAGER_BUNDLE_NAME, null);
+ ConnectorBundleLoader.get()
+ .loadBundle(ConnectorBundleLoader.EAGER_BUNDLE_NAME, null);
uIConnector = GWT.create(UIConnector.class);
rpcManager = GWT.create(RpcManager.class);
layoutManager = GWT.create(LayoutManager.class);
@@ -368,9 +368,8 @@ public class ApplicationConnection implements HasHandlers {
getLogger().info("Starting application " + cnf.getRootPanelId());
getLogger().info("Using theme: " + cnf.getThemeName());
- getLogger().info(
- "Vaadin application servlet version: "
- + cnf.getServletVersion());
+ getLogger().info("Vaadin application servlet version: "
+ + cnf.getServletVersion());
if (!cnf.getServletVersion().equals(Version.getFullVersion())) {
getLogger()
@@ -428,7 +427,7 @@ public class ApplicationConnection implements HasHandlers {
* called once this application has started (first response received) or
* failed to start. This ensures that the applications are started in order,
* to avoid session-id problems.
- *
+ *
*/
public void start() {
String jsonText = configuration.getUIDL();
@@ -440,8 +439,8 @@ public class ApplicationConnection implements HasHandlers {
// Hack to avoid logging an error in endRequest()
getMessageSender().startRequest();
- getMessageHandler().handleMessage(
- MessageHandler.parseJson(jsonText));
+ getMessageHandler()
+ .handleMessage(MessageHandler.parseJson(jsonText));
}
// Tooltip can't be created earlier because the
@@ -460,7 +459,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Checks if there is some work to be done on the client side
- *
+ *
* @return true if the client has some work to be done, false otherwise
*/
private boolean isActive() {
@@ -535,7 +534,7 @@ public class ApplicationConnection implements HasHandlers {
* <li><code>vaadin.postRequestHooks</code> is a map of functions which gets
* called after each XHR made by vaadin application. Note, that it is
* attaching js functions responsibility to create the variable like this:
- *
+ *
* <code><pre>
* if(!vaadin.postRequestHooks) {vaadin.postRequestHooks = new Object();}
* postRequestHooks.myHook = function(appId) {
@@ -546,7 +545,7 @@ public class ApplicationConnection implements HasHandlers {
* </pre></code> First parameter passed to these functions is the identifier
* of Vaadin application that made the request.
* </ul>
- *
+ *
* TODO make this multi-app aware
*/
private native void initializeClientHooks()
@@ -577,7 +576,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Requests an analyze of layouts, to find inconsistencies. Exclusively used
* for debugging during development.
- *
+ *
* @deprecated as of 7.1. Replaced by {@link UIConnector#analyzeLayouts()}
*/
@Deprecated
@@ -589,7 +588,7 @@ public class ApplicationConnection implements HasHandlers {
* Sends a request to the server to print details to console that will help
* the developer to locate the corresponding server-side connector in the
* source code.
- *
+ *
* @param serverConnector
* @deprecated as of 7.1. Replaced by
* {@link UIConnector#showServerDebugInfo(ServerConnector)}
@@ -619,10 +618,9 @@ public class ApplicationConnection implements HasHandlers {
// Show this message just once
if (cssWaits++ == 0) {
- getLogger().warning(
- "Assuming CSS loading is not complete, "
- + "postponing render phase. "
- + "(.v-loading-indicator height == 0)");
+ getLogger().warning("Assuming CSS loading is not complete, "
+ + "postponing render phase. "
+ + "(.v-loading-indicator height == 0)");
}
} else {
cssLoaded = true;
@@ -637,7 +635,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Checks whether or not the CSS is loaded. By default checks the size of
* the loading indicator element.
- *
+ *
* @return
*/
protected boolean isCSSLoaded() {
@@ -647,12 +645,12 @@ public class ApplicationConnection implements HasHandlers {
/**
* Shows the communication error notification.
- *
+ *
* @param details
* Optional details.
* @param statusCode
* The status code returned for the request
- *
+ *
*/
public void showCommunicationError(String details, int statusCode) {
getLogger().severe("Communication error: " + details);
@@ -661,7 +659,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Shows the authentication error notification.
- *
+ *
* @param details
* Optional details.
*/
@@ -672,7 +670,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Shows the session expiration notification.
- *
+ *
* @param details
* Optional details.
*/
@@ -683,7 +681,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Shows an error notification.
- *
+ *
* @param details
* Optional details.
* @param message
@@ -731,7 +729,7 @@ public class ApplicationConnection implements HasHandlers {
* <p>
* Used by the native "client.isActive" function.
* </p>
- *
+ *
* @return true if deferred commands are (potentially) being executed, false
* otherwise
*/
@@ -746,7 +744,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Returns the loading indicator used by this ApplicationConnection
- *
+ *
* @return The loading indicator for this ApplicationConnection
*/
public VLoadingIndicator getLoadingIndicator() {
@@ -755,7 +753,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Determines whether or not the loading indicator is showing.
- *
+ *
* @return true if the loading indicator is visible
* @deprecated As of 7.1. Use {@link #getLoadingIndicator()} and
* {@link VLoadingIndicator#isVisible()}.isVisible() instead.
@@ -775,9 +773,8 @@ public class ApplicationConnection implements HasHandlers {
@Override
public void onError(ResourceLoadEvent event) {
- getLogger()
- .severe(event.getResourceUrl()
- + " could not be loaded, or the load detection failed because the stylesheet is empty.");
+ getLogger().severe(event.getResourceUrl()
+ + " could not be loaded, or the load detection failed because the stylesheet is empty.");
// The show must go on
onLoad(event);
}
@@ -865,7 +862,7 @@ public class ApplicationConnection implements HasHandlers {
* is true, the update is sent as soon as possible. If immediate is false,
* the update will be sent along with the next immediate update.
* </p>
- *
+ *
* @param paintableId
* the id of the paintable that owns the variable
* @param variableName
@@ -887,7 +884,7 @@ public class ApplicationConnection implements HasHandlers {
* is true, the update is sent as soon as possible. If immediate is false,
* the update will be sent along with the next immediate update.
* </p>
- *
+ *
* @param paintableId
* the id of the paintable that owns the variable
* @param variableName
@@ -910,7 +907,7 @@ public class ApplicationConnection implements HasHandlers {
* is true, the update is sent as soon as possible. If immediate is false,
* the update will be sent along with the next immediate update.
* </p>
- *
+ *
* @param paintableId
* the id of the paintable that owns the variable
* @param variableName
@@ -933,7 +930,7 @@ public class ApplicationConnection implements HasHandlers {
* is true, the update is sent as soon as possible. If immediate is false,
* the update will be sent along with the next immediate update.
* </p>
- *
+ *
* @param paintableId
* the id of the paintable that owns the variable
* @param variableName
@@ -956,7 +953,7 @@ public class ApplicationConnection implements HasHandlers {
* is true, the update is sent as soon as possible. If immediate is false,
* the update will be sent along with the next immediate update.
* </p>
- *
+ *
* @param paintableId
* the id of the paintable that owns the variable
* @param variableName
@@ -979,7 +976,7 @@ public class ApplicationConnection implements HasHandlers {
* is true, the update is sent as soon as possible. If immediate is false,
* the update will be sent along with the next immediate update.
* </p>
- *
+ *
* @param paintableId
* the id of the paintable that owns the variable
* @param variableName
@@ -1002,7 +999,7 @@ public class ApplicationConnection implements HasHandlers {
* is true, the update is sent as soon as possible. If immediate is false,
* the update will be sent along with the next immediate update.
* </p>
- *
+ *
* @param paintableId
* the id of the paintable that owns the variable
* @param variableName
@@ -1025,7 +1022,7 @@ public class ApplicationConnection implements HasHandlers {
* is true, the update is sent as soon as possible. If immediate is false,
* the update will be sent along with the next immediate update.
* </p>
- *
+ *
* @param paintableId
* the id of the paintable that owns the variable
* @param variableName
@@ -1048,7 +1045,7 @@ public class ApplicationConnection implements HasHandlers {
* the update will be sent along with the next immediate update.
* <p>
* A null array is sent as an empty array.
- *
+ *
* @param paintableId
* the id of the paintable that owns the variable
* @param variableName
@@ -1071,7 +1068,7 @@ public class ApplicationConnection implements HasHandlers {
* the update will be sent along with the next immediate update.
* <p>
* A null array is sent as an empty array.
- *
+ *
* @param paintableId
* the id of the paintable that owns the variable
* @param variableName
@@ -1088,7 +1085,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Does absolutely nothing. Replaced by {@link LayoutManager}.
- *
+ *
* @param container
* @deprecated As of 7.0, serves no purpose
*/
@@ -1110,7 +1107,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Returns false
- *
+ *
* @param paintable
* @return false, always
* @deprecated As of 7.0, serves no purpose
@@ -1122,7 +1119,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Returns false
- *
+ *
* @param paintable
* @return false, always
* @deprecated As of 7.0, serves no purpose
@@ -1143,16 +1140,16 @@ public class ApplicationConnection implements HasHandlers {
/**
* Get either an existing ComponentConnector or create a new
* ComponentConnector with the given type and id.
- *
+ *
* If a ComponentConnector with the given id already exists, returns it.
* Otherwise creates and registers a new ComponentConnector of the given
* type.
- *
+ *
* @param connectorId
* Id of the paintable
* @param connectorType
* Type of the connector, as passed from the server side
- *
+ *
* @return Either an existing ComponentConnector or a new ComponentConnector
* of the given type
*/
@@ -1165,15 +1162,15 @@ public class ApplicationConnection implements HasHandlers {
/**
* Creates a new ServerConnector with the given type and id.
- *
+ *
* Creates and registers a new ServerConnector of the given type. Should
* never be called with the connector id of an existing connector.
- *
+ *
* @param connectorId
* Id of the new connector
* @param connectorType
* Type of the connector, as passed from the server side
- *
+ *
* @return A new ServerConnector of the given type
*/
private ServerConnector createAndRegisterConnector(String connectorId,
@@ -1193,7 +1190,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Gets a resource that has been pre-loaded via UIDL, such as custom
* layouts.
- *
+ *
* @param name
* identifier of the resource to get
* @return the resource
@@ -1205,7 +1202,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Sets a resource that has been pre-loaded via UIDL, such as custom
* layouts.
- *
+ *
* @since 7.6
* @param name
* identifier of the resource to Set
@@ -1218,7 +1215,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Singleton method to get instance of app's context menu.
- *
+ *
* @return VContextMenu object
*/
public VContextMenu getContextMenu() {
@@ -1233,7 +1230,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Gets an {@link Icon} instance corresponding to a URI.
- *
+ *
* @since 7.2
* @param uri
* @return Icon object
@@ -1255,7 +1252,7 @@ public class ApplicationConnection implements HasHandlers {
* Translates custom protocols in UIDL URI's to be recognizable by browser.
* All uri's from UIDL should be routed via this method before giving them
* to browser due URI's in UIDL may contain custom protocols like theme://.
- *
+ *
* @param uidlUri
* Vaadin URI from uidl
* @return translated URI ready for browser
@@ -1267,7 +1264,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Gets the URI for the current theme. Can be used to reference theme
* resources.
- *
+ *
* @return URI to the current theme
*/
public String getThemeUri() {
@@ -1284,7 +1281,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Use to notify that the given component's caption has changed; layouts may
* have to be recalculated.
- *
+ *
* @param component
* the Paintable whose caption has changed
* @deprecated As of 7.0.2, has not had any effect for a long time
@@ -1296,7 +1293,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Gets the main view
- *
+ *
* @return the main view
*/
public UIConnector getUIConnector() {
@@ -1305,7 +1302,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Gets the {@link ApplicationConfiguration} for the current application.
- *
+ *
* @see ApplicationConfiguration
* @return the configuration for this application
*/
@@ -1318,7 +1315,7 @@ public class ApplicationConnection implements HasHandlers {
* list of events which has server side listeners is updated automatically
* before the component is updated so the value is correct if called from
* updatedFromUIDL.
- *
+ *
* @param connector
* The connector to register event listeners for
* @param eventIdentifier
@@ -1337,7 +1334,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Adds the get parameters to the uri and returns the new uri that contains
* the parameters.
- *
+ *
* @param uri
* The uri to which the parameters should be added.
* @param extraParams
@@ -1361,14 +1358,13 @@ public class ApplicationConnection implements HasHandlers {
*/
@Deprecated
public void unregisterPaintable(ServerConnector p) {
- getLogger().info(
- "unregisterPaintable (unnecessarily) called for "
- + Util.getConnectorString(p));
+ getLogger().info("unregisterPaintable (unnecessarily) called for "
+ + Util.getConnectorString(p));
}
/**
* Get VTooltip instance related to application connection
- *
+ *
* @return VTooltip instance
*/
public VTooltip getVTooltip() {
@@ -1380,7 +1376,7 @@ public class ApplicationConnection implements HasHandlers {
* this method is now handled by the state change event handler in
* AbstractComponentConnector. The only function this method has is to
* return true if the UIDL is a "cached" update.
- *
+ *
* @param component
* @param uidl
* @param manageCaption
@@ -1397,10 +1393,8 @@ public class ApplicationConnection implements HasHandlers {
}
if (!manageCaption) {
- getLogger()
- .warning(
- Util.getConnectorString(connector)
- + " called updateComponent with manageCaption=false. The parameter was ignored - override delegateCaption() to return false instead. It is however not recommended to use caption this way at all.");
+ getLogger().warning(Util.getConnectorString(connector)
+ + " called updateComponent with manageCaption=false. The parameter was ignored - override delegateCaption() to return false instead. It is however not recommended to use caption this way at all.");
}
return false;
}
@@ -1433,7 +1427,7 @@ public class ApplicationConnection implements HasHandlers {
* Schedules a heartbeat request to occur after the configured heartbeat
* interval elapses if the interval is a positive number. Otherwise, does
* nothing.
- *
+ *
* @deprecated as of 7.2, use {@link Heartbeat#schedule()} instead
*/
@Deprecated
@@ -1447,7 +1441,7 @@ public class ApplicationConnection implements HasHandlers {
* Heartbeat requests are used to inform the server that the client-side is
* still alive. If the client page is closed or the connection lost, the
* server will eventually close the inactive UI.
- *
+ *
* @deprecated as of 7.2, use {@link Heartbeat#send()} instead
*/
@Deprecated
@@ -1470,41 +1464,39 @@ public class ApplicationConnection implements HasHandlers {
/**
* Sets the delegate that is called whenever a communication error occurrs.
- *
+ *
* @param delegate
* the delegate.
*/
- public void setCommunicationErrorDelegate(CommunicationErrorHandler delegate) {
+ public void setCommunicationErrorDelegate(
+ CommunicationErrorHandler delegate) {
communicationErrorDelegate = delegate;
}
public void setApplicationRunning(boolean applicationRunning) {
if (getApplicationState() == ApplicationState.TERMINATED) {
if (applicationRunning) {
- getLogger()
- .severe("Tried to restart a terminated application. This is not supported");
+ getLogger().severe(
+ "Tried to restart a terminated application. This is not supported");
} else {
- getLogger()
- .warning(
- "Tried to stop a terminated application. This should not be done");
+ getLogger().warning(
+ "Tried to stop a terminated application. This should not be done");
}
return;
} else if (getApplicationState() == ApplicationState.INITIALIZING) {
if (applicationRunning) {
applicationState = ApplicationState.RUNNING;
} else {
- getLogger()
- .warning(
- "Tried to stop the application before it has started. This should not be done");
+ getLogger().warning(
+ "Tried to stop the application before it has started. This should not be done");
}
} else if (getApplicationState() == ApplicationState.RUNNING) {
if (!applicationRunning) {
applicationState = ApplicationState.TERMINATED;
eventBus.fireEvent(new ApplicationStoppedEvent());
} else {
- getLogger()
- .warning(
- "Tried to start an already running application. This should not be done");
+ getLogger().warning(
+ "Tried to start an already running application. This should not be done");
}
}
}
@@ -1512,7 +1504,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Checks if the application is in the {@link ApplicationState#RUNNING}
* state.
- *
+ *
* @since 7.6
* @return true if the application is in the running state, false otherwise
*/
@@ -1544,7 +1536,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Gets the active connector for focused element in browser.
- *
+ *
* @return Connector for focused element or null.
*/
private ComponentConnector getActiveConnector() {
@@ -1572,7 +1564,7 @@ public class ApplicationConnection implements HasHandlers {
* "initializing" to "running" to "stopped". There is no way for an
* application to go back to a previous state, i.e. a stopped application
* can never be re-started
- *
+ *
* @since 7.6
* @return the current state of this application
*/
@@ -1582,7 +1574,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Gets the server RPC queue for this application
- *
+ *
* @since 7.6
* @return the server RPC queue
*/
@@ -1592,7 +1584,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Gets the communication error handler for this application
- *
+ *
* @since 7.6
* @return the server RPC queue
*/
@@ -1602,7 +1594,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Gets the (server to client) message handler for this application
- *
+ *
* @since 7.6
* @return the message handler
*/
@@ -1612,7 +1604,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Gets the server rpc manager for this application
- *
+ *
* @since 7.6
* @return the server rpc manager
*/
@@ -1622,7 +1614,7 @@ public class ApplicationConnection implements HasHandlers {
/**
* Gets the (client to server) message sender for this application
- *
+ *
* @since 7.6
* @return the message sender
*/
diff --git a/client/src/main/java/com/vaadin/client/BrowserInfo.java b/client/src/main/java/com/vaadin/client/BrowserInfo.java
index d1592c95f4..f037fba175 100644
--- a/client/src/main/java/com/vaadin/client/BrowserInfo.java
+++ b/client/src/main/java/com/vaadin/client/BrowserInfo.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,10 +21,10 @@ import com.vaadin.shared.VBrowserDetails;
/**
* Class used to query information about web browser.
- *
+ *
* Browser details are detected only once and those are stored in this singleton
* class.
- *
+ *
*/
public class BrowserInfo {
@@ -60,7 +60,7 @@ public class BrowserInfo {
/**
* Singleton method to get BrowserInfo object.
- *
+ *
* @return instance of BrowserInfo object
*/
public static BrowserInfo get() {
@@ -122,19 +122,19 @@ public class BrowserInfo {
* Returns a string representing the browser in use, for use in CSS
* classnames. The classnames will be space separated abbreviations,
* optionally with a version appended.
- *
+ *
* Abbreviations: Firefox: ff Internet Explorer: ie Safari: sa Opera: op
- *
+ *
* Browsers that CSS-wise behave like each other will get the same
* abbreviation (this usually depends on the rendering engine).
- *
+ *
* This is quite simple at the moment, more heuristics will be added when
* needed.
- *
+ *
* Examples: Internet Explorer 6: ".v-ie .v-ie6 .v-ie60", Firefox 3.0.4:
* ".v-ff .v-ff3 .v-ff30", Opera 9.60: ".v-op .v-op9 .v-op960", Opera 10.10:
* ".v-op .v-op10 .v-op1010"
- *
+ *
* @return
*/
public String getCSSClass() {
@@ -284,7 +284,7 @@ public class BrowserInfo {
/**
* Returns the Gecko version if the browser is Gecko based. The Gecko
* version for Firefox 2 is 1.8 and 1.9 for Firefox 3.
- *
+ *
* @return The Gecko version or -1 if the browser is not Gecko based
*/
public float getGeckoVersion() {
@@ -298,7 +298,7 @@ public class BrowserInfo {
/**
* Returns the WebKit version if the browser is WebKit based. The WebKit
* version returned is the major version e.g., 523.
- *
+ *
* @return The WebKit version or -1 if the browser is not WebKit based
*/
public float getWebkitVersion() {
@@ -362,7 +362,7 @@ public class BrowserInfo {
/**
* Indicates whether the browser might require juggling to properly update
* sizes inside elements with overflow: auto.
- *
+ *
* @return <code>true</code> if the browser requires the workaround,
* otherwise <code>false</code>
*/
@@ -379,7 +379,7 @@ public class BrowserInfo {
* <p>
* See https://bugs.webkit.org/show_bug.cgi?id=123958 and
* http://code.google.com/p/chromium/issues/detail?id=316549
- *
+ *
* @since 7.1.8
* @return <code>true</code> if the browser requires the workaround,
* otherwise <code>false</code>
@@ -391,7 +391,7 @@ public class BrowserInfo {
/**
* Checks if the browser is run on iOS
- *
+ *
* @return true if the browser is run on iOS, false otherwise
*/
public boolean isIOS() {
@@ -400,7 +400,7 @@ public class BrowserInfo {
/**
* Checks if the browser is run on iOS 6.
- *
+ *
* @since 7.1.1
* @return true if the browser is run on iOS 6, false otherwise
*/
@@ -410,7 +410,7 @@ public class BrowserInfo {
/**
* Checks if the browser is run on Android
- *
+ *
* @return true if the browser is run on Android, false otherwise
*/
public boolean isAndroid() {
@@ -420,7 +420,7 @@ public class BrowserInfo {
/**
* Checks if the browser is capable of handling scrolling natively or if a
* touch scroll helper is needed for scrolling.
- *
+ *
* @return true if browser needs a touch scroll helper, false if the browser
* can handle scrolling natively
*/
@@ -448,13 +448,13 @@ public class BrowserInfo {
/**
* Tests if this is an Android devices with a broken scrollTop
* implementation
- *
+ *
* @return true if scrollTop cannot be trusted on this device, false
* otherwise
*/
public boolean isAndroidWithBrokenScrollTop() {
- return isAndroid()
- && (getOperatingSystemMajorVersion() == 3 || getOperatingSystemMajorVersion() == 4);
+ return isAndroid() && (getOperatingSystemMajorVersion() == 3
+ || getOperatingSystemMajorVersion() == 4);
}
public boolean isAndroid23() {
@@ -477,7 +477,7 @@ public class BrowserInfo {
* Note that Internet Explorer 8 and newer will return the document mode so
* IE8 rendering as IE7 will return 7.
* </p>
- *
+ *
* @return The major version of the browser.
*/
public int getBrowserMajorVersion() {
@@ -486,9 +486,9 @@ public class BrowserInfo {
/**
* Returns the browser minor version e.g., 5 for Firefox 3.5.
- *
+ *
* @see #getBrowserMajorVersion()
- *
+ *
* @return The minor version of the browser, or -1 if not known/parsed.
*/
public int getBrowserMinorVersion() {
@@ -498,7 +498,7 @@ public class BrowserInfo {
/**
* Checks if the browser version is newer or equal to the given major+minor
* version.
- *
+ *
* @param majorVersion
* The major version to check for
* @param minorVersion
diff --git a/client/src/main/java/com/vaadin/client/CSSRule.java b/client/src/main/java/com/vaadin/client/CSSRule.java
index a1ddce6d0a..2e75b6a58e 100644
--- a/client/src/main/java/com/vaadin/client/CSSRule.java
+++ b/client/src/main/java/com/vaadin/client/CSSRule.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ public class CSSRule {
private JavaScriptObject rules = null;
/**
- *
+ *
* @param selector
* the CSS selector to search for in the stylesheets
* @param deep
@@ -108,7 +108,7 @@ public class CSSRule {
/**
* Returns a specific property value from this CSS rule.
- *
+ *
* @param propertyName
* camelCase CSS property name
* @return the value of the property as a String
diff --git a/client/src/main/java/com/vaadin/client/ComponentConnector.java b/client/src/main/java/com/vaadin/client/ComponentConnector.java
index d0c943d553..f70f3cfc62 100644
--- a/client/src/main/java/com/vaadin/client/ComponentConnector.java
+++ b/client/src/main/java/com/vaadin/client/ComponentConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.shared.AbstractComponentState;
* An interface used by client-side widgets or paintable parts to receive
* updates from the corresponding server-side components in the form of
* {@link UIDL}.
- *
+ *
* Updates can be sent back to the server using the
* {@link ApplicationConnection#updateVariable()} methods.
*/
@@ -32,7 +32,7 @@ public interface ComponentConnector extends ServerConnector {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.VPaintable#getState()
*/
@Override
@@ -49,7 +49,7 @@ public interface ComponentConnector extends ServerConnector {
* Returns <code>true</code> if the width of this paintable is currently
* undefined. If the width is undefined, the actual width of the paintable
* is defined by its contents.
- *
+ *
* @return <code>true</code> if the width is undefined, else
* <code>false</code>
*/
@@ -59,7 +59,7 @@ public interface ComponentConnector extends ServerConnector {
* Returns <code>true</code> if the height of this paintable is currently
* undefined. If the height is undefined, the actual height of the paintable
* is defined by its contents.
- *
+ *
* @return <code>true</code> if the height is undefined, else
* <code>false</code>
*/
@@ -69,7 +69,7 @@ public interface ComponentConnector extends ServerConnector {
* Returns <code>true</code> if the width of this paintable is currently
* relative. If the width is relative, the actual width of the paintable is
* a percentage of the size allocated to it by its parent.
- *
+ *
* @return <code>true</code> if the width is undefined, else
* <code>false</code>
*/
@@ -79,7 +79,7 @@ public interface ComponentConnector extends ServerConnector {
* Returns <code>true</code> if the height of this paintable is currently
* relative. If the height is relative, the actual height of the paintable
* is a percentage of the size allocated to it by its parent.
- *
+ *
* @return <code>true</code> if the width is undefined, else
* <code>false</code>
*/
@@ -87,7 +87,7 @@ public interface ComponentConnector extends ServerConnector {
/**
* Checks if the connector is read only.
- *
+ *
* @deprecated This belongs in AbstractFieldConnector, see #8514
* @return true
*/
@@ -97,13 +97,13 @@ public interface ComponentConnector extends ServerConnector {
/**
* Return true if parent handles caption, false if the paintable handles the
* caption itself.
- *
+ *
* <p>
* This should always return true and all components should let the parent
* handle the caption and use other attributes for internal texts in the
* component
* </p>
- *
+ *
* @return true if caption handling is delegated to the parent, false if
* parent should not be allowed to render caption
*/
@@ -111,7 +111,7 @@ public interface ComponentConnector extends ServerConnector {
/**
* Sets the enabled state of the widget associated to this connector.
- *
+ *
* @param widgetEnabled
* true if the widget should be enabled, false otherwise
*/
@@ -124,7 +124,7 @@ public interface ComponentConnector extends ServerConnector {
* overridden to return <code>true</code> in all situations where this
* method might return a non-empty result.
* </p>
- *
+ *
* @param element
* The element to lookup a tooltip for
* @return The tooltip for the element or null if no tooltip is defined for
@@ -140,7 +140,7 @@ public interface ComponentConnector extends ServerConnector {
* This is only done to optimize performance, so in cases where the status
* is not known, it's safer to return <code>true</code> so that there will
* be a tooltip handler even though it might not be needed in all cases.
- *
+ *
* @return <code>true</code> if some part of the component might have a
* tooltip, otherwise <code>false</code>
*/
diff --git a/client/src/main/java/com/vaadin/client/ComponentDetail.java b/client/src/main/java/com/vaadin/client/ComponentDetail.java
index 9e5e2a82a8..a6a1878407 100644
--- a/client/src/main/java/com/vaadin/client/ComponentDetail.java
+++ b/client/src/main/java/com/vaadin/client/ComponentDetail.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,7 +30,7 @@ class ComponentDetail {
/**
* Returns a TooltipInfo assosiated with Component. If element is given,
* returns an additional TooltipInfo.
- *
+ *
* @param key
* @return the tooltipInfo
*/
diff --git a/client/src/main/java/com/vaadin/client/ComponentDetailMap.java b/client/src/main/java/com/vaadin/client/ComponentDetailMap.java
index c99ebd2738..498e28c28b 100644
--- a/client/src/main/java/com/vaadin/client/ComponentDetailMap.java
+++ b/client/src/main/java/com/vaadin/client/ComponentDetailMap.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ComputedStyle.java b/client/src/main/java/com/vaadin/client/ComputedStyle.java
index 65a6e69019..f887dbb7d1 100644
--- a/client/src/main/java/com/vaadin/client/ComputedStyle.java
+++ b/client/src/main/java/com/vaadin/client/ComputedStyle.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ public class ComputedStyle {
* <p>
* Note that this method is expensive. Wherever possible, reuse the returned
* object.
- *
+ *
* @param elem
* the element
* @return the computed style
@@ -44,18 +44,18 @@ public class ComputedStyle {
if(elem.nodeType != 1) {
return {};
}
-
+
if($wnd.document.defaultView && $wnd.document.defaultView.getComputedStyle) {
return $wnd.document.defaultView.getComputedStyle(elem, null);
}
-
+
if(elem.currentStyle) {
return elem.currentStyle;
}
}-*/;
/**
- *
+ *
* @param name
* name of the CSS property in camelCase
* @return the value of the property, normalized for across browsers (each
@@ -65,7 +65,7 @@ public class ComputedStyle {
/*-{
var cs = this.@com.vaadin.client.ComputedStyle::computedStyle;
var elem = this.@com.vaadin.client.ComputedStyle::elem;
-
+
// Border values need to be checked separately. The width might have a
// meaningful value even if the border style is "none". In that case the
// value should be 0.
@@ -80,13 +80,13 @@ public class ComputedStyle {
}
if(cs.getPropertyValue) {
-
+
// Convert name to dashed format
name = name.replace(/([A-Z])/g, "-$1").toLowerCase();
var ret = cs.getPropertyValue(name);
-
+
} else {
-
+
var ret = cs[name];
var style = elem.style;
@@ -98,25 +98,25 @@ public class ComputedStyle {
if ( !/^\d+(px)?$/i.test( ret ) && /^\d/.test( ret ) ) {
// Remember the original values
var left = style.left, rsLeft = elem.runtimeStyle.left;
-
+
// Put in the new values to get a computed value out
elem.runtimeStyle.left = cs.left;
style.left = ret || 0;
ret = style.pixelLeft + "px";
-
+
// Revert the changed values
style.left = left;
elem.runtimeStyle.left = rsLeft;
}
-
+
}
-
+
// Normalize margin values. This is not totally valid, but in most cases
// it is what the user wants to know.
if(name.indexOf("margin") > -1 && ret == "auto") {
return "0px";
}
-
+
// Some browsers return undefined width and height values as "auto", so
// we need to retrieve those ourselves.
if (name == "width" && ret == "auto") {
@@ -126,14 +126,14 @@ public class ComputedStyle {
}
return ret;
-
+
}-*/;
/**
* Retrieves the given computed property as an integer
- *
+ *
* Returns 0 if the property cannot be converted to an integer
- *
+ *
* @param name
* the property to retrieve
* @return the integer value of the property or 0
@@ -148,9 +148,9 @@ public class ComputedStyle {
/**
* Retrieves the given computed property as a double
- *
+ *
* Returns NaN if the property cannot be converted to a double
- *
+ *
* @since 7.5.1
* @param name
* the property to retrieve
@@ -205,7 +205,7 @@ public class ComputedStyle {
/**
* Returns the current width from the DOM.
- *
+ *
* @since 7.5.1
* @return the computed width
*/
@@ -215,7 +215,7 @@ public class ComputedStyle {
/**
* Returns the current height from the DOM.
- *
+ *
* @since 7.5.1
* @return the computed height
*/
@@ -225,13 +225,13 @@ public class ComputedStyle {
/**
* Takes a String value e.g. "12px" and parses that to Integer 12.
- *
+ *
* @param String
* a value starting with a number
* @return Integer the value from the string before any non-numeric
* characters. If the value cannot be parsed to a number, returns
* <code>null</code>.
- *
+ *
* @deprecated Since 7.1.4, the method {@link #parseIntNative(String)} is
* used internally and this method does not belong in the public
* API of {@link ComputedStyle}. {@link #parseInt(String)} might
@@ -250,10 +250,10 @@ public class ComputedStyle {
/**
* Takes a String value e.g. "12px" and parses that to int 12.
- *
+ *
* <p>
* This method returns 0 for <code>NaN</code>.
- *
+ *
* @param String
* a value starting with a number
* @return int the value from the string before any non-numeric characters.
@@ -270,7 +270,7 @@ public class ComputedStyle {
/**
* Takes a String value e.g. "12.3px" and parses that to a double, 12.3.
- *
+ *
* @param String
* a value starting with a number
* @return the value from the string before any non-numeric characters or
@@ -283,7 +283,7 @@ public class ComputedStyle {
/**
* Returns the sum of the top and bottom border width
- *
+ *
* @since 7.5.3
* @return the sum of the top and bottom border
*/
@@ -296,7 +296,7 @@ public class ComputedStyle {
/**
* Returns the sum of the left and right border width
- *
+ *
* @since 7.5.3
* @return the sum of the left and right border
*/
@@ -309,7 +309,7 @@ public class ComputedStyle {
/**
* Returns the sum of the top and bottom padding
- *
+ *
* @since 7.5.3
* @return the sum of the top and bottom padding
*/
@@ -322,7 +322,7 @@ public class ComputedStyle {
/**
* Returns the sum of the top and bottom padding
- *
+ *
* @since 7.5.3
* @return the sum of the left and right padding
*/
@@ -335,7 +335,7 @@ public class ComputedStyle {
/**
* Returns the sum of the top and bottom margin
- *
+ *
* @since 7.5.6
* @return the sum of the top and bottom margin
*/
@@ -348,7 +348,7 @@ public class ComputedStyle {
/**
* Returns the sum of the top and bottom margin
- *
+ *
* @since 7.5.6
* @return the sum of the left and right margin
*/
diff --git a/client/src/main/java/com/vaadin/client/ConnectorHierarchyChangeEvent.java b/client/src/main/java/com/vaadin/client/ConnectorHierarchyChangeEvent.java
index 419f052324..a46b191aa1 100644
--- a/client/src/main/java/com/vaadin/client/ConnectorHierarchyChangeEvent.java
+++ b/client/src/main/java/com/vaadin/client/ConnectorHierarchyChangeEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,13 +29,13 @@ import com.vaadin.client.ui.AbstractHasComponentsConnector;
* hierarchy. A {@link ConnectorHierarchyChangedEvent} is fired when an update
* from the server has been fully processed and all hierarchy updates have been
* completed.
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
- *
+ *
*/
-public class ConnectorHierarchyChangeEvent extends
- AbstractServerConnectorEvent<ConnectorHierarchyChangeHandler> {
+public class ConnectorHierarchyChangeEvent
+ extends AbstractServerConnectorEvent<ConnectorHierarchyChangeHandler> {
/**
* Type of this event, used by the event bus.
*/
@@ -49,7 +49,7 @@ public class ConnectorHierarchyChangeEvent extends
/**
* Returns a collection of the old children for the connector. This was the
* state before the update was received from the server.
- *
+ *
* @return A collection of old child connectors. Never returns null.
*/
public List<ComponentConnector> getOldChildren() {
@@ -58,7 +58,7 @@ public class ConnectorHierarchyChangeEvent extends
/**
* Sets the collection of the old children for the connector.
- *
+ *
* @param oldChildren
* The old child connectors. Must not be null.
*/
@@ -68,7 +68,7 @@ public class ConnectorHierarchyChangeEvent extends
/**
* Returns the {@link HasComponentsConnector} for which this event occurred.
- *
+ *
* @return The {@link HasComponentsConnector} whose child collection has
* changed. Never returns null.
*/
@@ -90,8 +90,8 @@ public class ConnectorHierarchyChangeEvent extends
* implement this interface, but instead make your connector class extend
* {@link AbstractHasComponentsConnector} or an appropriate subclass.
*/
- public interface ConnectorHierarchyChangeHandler extends Serializable,
- EventHandler {
+ public interface ConnectorHierarchyChangeHandler
+ extends Serializable, EventHandler {
/**
* Called by the framework when the list of child components of the
* connector implementing this interface has changed. The implementation
@@ -112,7 +112,7 @@ public class ConnectorHierarchyChangeEvent extends
* parent connector might not yet have detached a child widget and that
* the widget of a removed child might already have been attached by its
* new parent.
- *
+ *
* @param connectorHierarchyChangeEvent
* the event with information about the hierarchy change
*/
diff --git a/client/src/main/java/com/vaadin/client/ConnectorMap.java b/client/src/main/java/com/vaadin/client/ConnectorMap.java
index 3200dd6ab4..d6506db673 100644
--- a/client/src/main/java/com/vaadin/client/ConnectorMap.java
+++ b/client/src/main/java/com/vaadin/client/ConnectorMap.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,8 @@ import com.google.gwt.user.client.ui.Widget;
public class ConnectorMap {
- public static ConnectorMap get(ApplicationConnection applicationConnection) {
+ public static ConnectorMap get(
+ ApplicationConnection applicationConnection) {
return applicationConnection.getConnectorMap();
}
@@ -36,7 +37,7 @@ public class ConnectorMap {
/**
* Returns a {@link ServerConnector} by its id
- *
+ *
* @param id
* The connector id
* @return A connector or null if a connector with the given id has not been
@@ -53,7 +54,7 @@ public class ConnectorMap {
/**
* Returns a {@link ComponentConnector} element by its root element.
- *
+ *
* @param element
* Root element of the {@link ComponentConnector}
* @return A connector or null if a connector with the given id has not been
@@ -81,7 +82,7 @@ public class ConnectorMap {
/**
* FIXME: What does this even do and why?
- *
+ *
* @param pid
* @return
*/
@@ -91,7 +92,7 @@ public class ConnectorMap {
/**
* Checks if a connector with the given id has been registered.
- *
+ *
* @param connectorId
* The id to check for
* @return true if a connector has been registered with the given id, false
@@ -110,7 +111,7 @@ public class ConnectorMap {
/**
* Retrieves the connector whose widget matches the parameter.
- *
+ *
* @param widget
* The widget
* @return A connector with {@literal widget} as its root widget or null if
@@ -144,7 +145,7 @@ public class ConnectorMap {
* Gets the connector id using a DOM element - the element should be the
* root element for a connector, otherwise no id will be found. Use
* {@link #getConnectorId(ServerConnector)} instead whenever possible.
- *
+ *
* @see #getConnectorId(ServerConnector)
* @param el
* element of the connector whose id is desired
@@ -158,7 +159,7 @@ public class ConnectorMap {
/**
* Gets the main element for the connector with the given id. The reverse of
* {@link #getConnectorId(Element)}.
- *
+ *
* @param connectorId
* the id of the widget whose element is desired
* @return the element for the connector corresponding to the id
@@ -177,7 +178,7 @@ public class ConnectorMap {
* This method does not remove the connector from the DOM, but marks the
* connector so that ApplicationConnection may clean up its references to
* it. Removing the widget from DOM is component containers responsibility.
- *
+ *
* @param connector
* the connector to remove
*/
@@ -208,9 +209,9 @@ public class ConnectorMap {
/**
* Gets all registered {@link ComponentConnector} instances
- *
+ *
* @return An array of all registered {@link ComponentConnector} instances
- *
+ *
* @deprecated As of 7.0.1, use {@link #getComponentConnectorsAsJsArray()}
* for better performance.
*/
@@ -259,7 +260,7 @@ public class ConnectorMap {
/**
* @return
- *
+ *
* @deprecated As of 7.0.1, use {@link #getConnectorsAsJsArray()} for
* improved performance.
*/
@@ -290,7 +291,7 @@ public class ConnectorMap {
/**
* Tests if the widget is the root widget of a {@link ComponentConnector}.
- *
+ *
* @param widget
* The widget to test
* @return true if the widget is the root widget of a
diff --git a/client/src/main/java/com/vaadin/client/ContainerResizedListener.java b/client/src/main/java/com/vaadin/client/ContainerResizedListener.java
index 702542f0ac..2cacc78b38 100644
--- a/client/src/main/java/com/vaadin/client/ContainerResizedListener.java
+++ b/client/src/main/java/com/vaadin/client/ContainerResizedListener.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ package com.vaadin.client;
/**
* ContainerResizedListener interface is useful for Widgets that support
* relative sizes and who need some additional sizing logic.
- *
+ *
* @deprecated As of 7.0, serves no purpose. Use {@link LayoutManager} and its
* methods instead.
*/
@@ -31,9 +31,9 @@ public interface ContainerResizedListener {
* function on its ancestors that implement NeedsLayout in case their
* container has resized. runAnchestorsLayout(HasWidgets parent) function
* from Util class may be a good helper for this.
- *
+ *
* @deprecated As of 7.0, this method is never called by the framework.
- *
+ *
*/
@Deprecated
public void iLayout();
diff --git a/client/src/main/java/com/vaadin/client/DateTimeService.java b/client/src/main/java/com/vaadin/client/DateTimeService.java
index 04006d85fb..af7e861edb 100644
--- a/client/src/main/java/com/vaadin/client/DateTimeService.java
+++ b/client/src/main/java/com/vaadin/client/DateTimeService.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,9 +27,9 @@ import com.vaadin.shared.ui.datefield.Resolution;
/**
* This class provides date/time parsing services to all components on the
* client side.
- *
+ *
* @author Vaadin Ltd.
- *
+ *
*/
@SuppressWarnings("deprecation")
public class DateTimeService {
@@ -48,7 +48,7 @@ public class DateTimeService {
/**
* Creates a new date time service with a given locale.
- *
+ *
* @param locale
* e.g. fi, en etc.
* @throws LocaleNotLoadedException
@@ -152,8 +152,8 @@ public class DateTimeService {
try {
firstDay = LocaleService.getFirstDayOfWeek(currentLocale);
} catch (final LocaleNotLoadedException e) {
- getLogger().log(Level.SEVERE,
- "Locale not loaded, using fallback 0", e);
+ getLogger().log(Level.SEVERE, "Locale not loaded, using fallback 0",
+ e);
firstDay = 0;
}
int start = dateForFirstOfThisMonth.getDay() - firstDay;
@@ -261,7 +261,7 @@ public class DateTimeService {
/**
* Returns the ISO-8601 week number of the given date.
- *
+ *
* @param date
* The date for which the week number should be resolved
* @return The ISO-8601 week number for {@literal date}
@@ -278,16 +278,16 @@ public class DateTimeService {
// Find nearest thursday (defines the week in ISO 8601). The week number
// for the nearest thursday is the same as for the target date.
int nearestThursdayDiff = 4 - dayOfWeek; // 4 is thursday
- Date nearestThursday = new Date(date.getTime() + nearestThursdayDiff
- * MILLISECONDS_PER_DAY);
+ Date nearestThursday = new Date(
+ date.getTime() + nearestThursdayDiff * MILLISECONDS_PER_DAY);
Date firstOfJanuary = new Date(nearestThursday.getYear(), 0, 1);
long timeDiff = nearestThursday.getTime() - firstOfJanuary.getTime();
// Rounding the result, as the division doesn't result in an integer
// when the given date is inside daylight saving time period.
- int daysSinceFirstOfJanuary = (int) Math.round((double) timeDiff
- / MILLISECONDS_PER_DAY);
+ int daysSinceFirstOfJanuary = (int) Math
+ .round((double) timeDiff / MILLISECONDS_PER_DAY);
int weekNumber = (daysSinceFirstOfJanuary) / 7 + 1;
@@ -299,11 +299,11 @@ public class DateTimeService {
* it to the month name since DateTimeFormat.format always uses the current
* locale and will replace the month name wrong if current locale is
* different from the locale set for the DateField.
- *
+ *
* MMMM is converted into long month name, MMM is converted into short month
* name. '' are added around the name to avoid that DateTimeFormat parses
* the month name as a pattern.
- *
+ *
* @param date
* The date to convert
* @param formatStr
@@ -343,8 +343,8 @@ public class DateTimeService {
formatStr = formatStr.replaceAll("'([E]{4,})'", dayName);
formatStr = formatStr.replaceAll("([E]{4,})'", "'" + dayName);
formatStr = formatStr.replaceAll("'([E]{4,})", dayName + "'");
- formatStr = formatStr
- .replaceAll("[E]{4,}", "'" + dayName + "'");
+ formatStr = formatStr.replaceAll("[E]{4,}",
+ "'" + dayName + "'");
}
}
@@ -363,8 +363,8 @@ public class DateTimeService {
formatStr = formatStr.replaceAll("'([E]{3,})'", dayName);
formatStr = formatStr.replaceAll("([E]{3,})'", "'" + dayName);
formatStr = formatStr.replaceAll("'([E]{3,})", dayName + "'");
- formatStr = formatStr
- .replaceAll("[E]{3,}", "'" + dayName + "'");
+ formatStr = formatStr.replaceAll("[E]{3,}",
+ "'" + dayName + "'");
}
}
@@ -386,8 +386,8 @@ public class DateTimeService {
formatStr = formatStr.replaceAll("'([M]{4,})'", monthName);
formatStr = formatStr.replaceAll("([M]{4,})'", "'" + monthName);
formatStr = formatStr.replaceAll("'([M]{4,})", monthName + "'");
- formatStr = formatStr.replaceAll("[M]{4,}", "'" + monthName
- + "'");
+ formatStr = formatStr.replaceAll("[M]{4,}",
+ "'" + monthName + "'");
}
}
@@ -406,8 +406,8 @@ public class DateTimeService {
formatStr = formatStr.replaceAll("'([M]{3,})'", monthName);
formatStr = formatStr.replaceAll("([M]{3,})'", "'" + monthName);
formatStr = formatStr.replaceAll("'([M]{3,})", monthName + "'");
- formatStr = formatStr.replaceAll("[M]{3,}", "'" + monthName
- + "'");
+ formatStr = formatStr.replaceAll("[M]{3,}",
+ "'" + monthName + "'");
}
}
@@ -417,7 +417,7 @@ public class DateTimeService {
/**
* Replaces month names in the entered date with the name in the current
* browser locale.
- *
+ *
* @param enteredDate
* Date string e.g. "5 May 2010"
* @param formatString
@@ -457,7 +457,7 @@ public class DateTimeService {
/**
* Parses the given date string using the given format string and the locale
* set in this DateTimeService instance.
- *
+ *
* @param dateString
* Date string e.g. "1 February 2010"
* @param formatString
@@ -467,7 +467,7 @@ public class DateTimeService {
* @return A Date object representing the dateString. Never returns null.
* @throws IllegalArgumentException
* if the parsing fails
- *
+ *
*/
public Date parseDate(String dateString, String formatString,
boolean lenient) throws IllegalArgumentException {
@@ -490,8 +490,8 @@ public class DateTimeService {
// Some version of Firefox sets the timestamp to 0 if parsing fails.
if (date != null && date.getTime() == 0) {
- throw new IllegalArgumentException("Parsing of '" + dateString
- + "' failed");
+ throw new IllegalArgumentException(
+ "Parsing of '" + dateString + "' failed");
}
return date;
diff --git a/client/src/main/java/com/vaadin/client/DeferredWorker.java b/client/src/main/java/com/vaadin/client/DeferredWorker.java
index cc22cda2a2..c0dd1a8dec 100644
--- a/client/src/main/java/com/vaadin/client/DeferredWorker.java
+++ b/client/src/main/java/com/vaadin/client/DeferredWorker.java
@@ -20,7 +20,7 @@ package com.vaadin.client;
* there is work scheduled to be executed in the near future and that the
* framework should wait for this work to complete before assuming the UI has
* reached a steady state.
- *
+ *
* @since 7.3
* @author Vaadin Ltd
*/
@@ -28,7 +28,7 @@ public interface DeferredWorker {
/**
* Checks whether there are operations pending for this widget or connector
* that must be executed before reaching a steady state.
- *
+ *
* @returns <code>true</code> iff there are operations pending which must be
* executed before reaching a steady state
*/
diff --git a/client/src/main/java/com/vaadin/client/DirectionalManagedLayout.java b/client/src/main/java/com/vaadin/client/DirectionalManagedLayout.java
index eab9811082..803410f5e0 100644
--- a/client/src/main/java/com/vaadin/client/DirectionalManagedLayout.java
+++ b/client/src/main/java/com/vaadin/client/DirectionalManagedLayout.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/EventHelper.java b/client/src/main/java/com/vaadin/client/EventHelper.java
index 1ee252af0f..978e6d5769 100644
--- a/client/src/main/java/com/vaadin/client/EventHelper.java
+++ b/client/src/main/java/com/vaadin/client/EventHelper.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -37,9 +37,9 @@ import com.google.gwt.user.client.ui.Widget;
* registration (possibly the same as given, should be store for next update.
* <p>
* Pseudocode what helpers do:
- *
+ *
* <pre>
- *
+ *
* if paintable has event listener in UIDL
* if registration is null
* register paintable as as handler for event
@@ -48,8 +48,8 @@ import com.google.gwt.user.client.ui.Widget;
* if registration is not null
* remove the handler from paintable
* return null
- *
- *
+ *
+ *
* </pre>
*/
public class EventHelper {
@@ -57,7 +57,7 @@ public class EventHelper {
/**
* Adds or removes a focus handler depending on if the connector has focus
* listeners on the server side or not.
- *
+ *
* @param connector
* The connector to update. Must implement focusHandler.
* @param handlerRegistration
@@ -75,7 +75,7 @@ public class EventHelper {
/**
* Adds or removes a focus handler depending on if the connector has focus
* listeners on the server side or not.
- *
+ *
* @param connector
* The connector to update. Must implement focusHandler.
* @param handlerRegistration
@@ -87,7 +87,8 @@ public class EventHelper {
* handler later
*/
public static <T extends ComponentConnector & FocusHandler> HandlerRegistration updateFocusHandler(
- T connector, HandlerRegistration handlerRegistration, Widget widget) {
+ T connector, HandlerRegistration handlerRegistration,
+ Widget widget) {
return updateHandler(connector, connector, FOCUS, handlerRegistration,
FocusEvent.getType(), widget);
}
@@ -95,7 +96,7 @@ public class EventHelper {
/**
* Adds or removes a blur handler depending on if the connector has blur
* listeners on the server side or not.
- *
+ *
* @param connector
* The connector to update. Must implement BlurHandler.
* @param handlerRegistration
@@ -113,7 +114,7 @@ public class EventHelper {
/**
* Adds or removes a blur handler depending on if the connector has blur
* listeners on the server side or not.
- *
+ *
* @param connector
* The connector to update. Must implement BlurHandler.
* @param handlerRegistration
@@ -121,19 +122,21 @@ public class EventHelper {
* registered previously
* @param widget
* The widget which emits blur events
- *
+ *
* @return a new registration handler that can be used to unregister the
* handler later
*/
public static <T extends ComponentConnector & BlurHandler> HandlerRegistration updateBlurHandler(
- T connector, HandlerRegistration handlerRegistration, Widget widget) {
+ T connector, HandlerRegistration handlerRegistration,
+ Widget widget) {
return updateHandler(connector, connector, BLUR, handlerRegistration,
BlurEvent.getType(), widget);
}
public static <H extends EventHandler> HandlerRegistration updateHandler(
ComponentConnector connector, H handler, String eventIdentifier,
- HandlerRegistration handlerRegistration, Type<H> type, Widget widget) {
+ HandlerRegistration handlerRegistration, Type<H> type,
+ Widget widget) {
if (connector.hasEventListener(eventIdentifier)) {
if (handlerRegistration == null) {
handlerRegistration = widget.addDomHandler(handler, type);
diff --git a/client/src/main/java/com/vaadin/client/FastStringMap.java b/client/src/main/java/com/vaadin/client/FastStringMap.java
index ba3d07025b..c0a6dceb32 100644
--- a/client/src/main/java/com/vaadin/client/FastStringMap.java
+++ b/client/src/main/java/com/vaadin/client/FastStringMap.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/FastStringSet.java b/client/src/main/java/com/vaadin/client/FastStringSet.java
index 756bd374dc..ee659cf14f 100644
--- a/client/src/main/java/com/vaadin/client/FastStringSet.java
+++ b/client/src/main/java/com/vaadin/client/FastStringSet.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/Focusable.java b/client/src/main/java/com/vaadin/client/Focusable.java
index 05b32a7b05..129289ccd0 100644
--- a/client/src/main/java/com/vaadin/client/Focusable.java
+++ b/client/src/main/java/com/vaadin/client/Focusable.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ package com.vaadin.client;
* GWT's HasFocus is way too overkill for just receiving focus in simple
* components. Vaadin uses this interface in addition to GWT's HasFocus to pass
* focus requests from server to actual ui widgets in browsers.
- *
+ *
* So in to make your server side focusable component receive focus on client
* side it must either implement this or HasFocus interface.
*/
diff --git a/client/src/main/java/com/vaadin/client/HasChildMeasurementHintConnector.java b/client/src/main/java/com/vaadin/client/HasChildMeasurementHintConnector.java
index bb76377cd1..2e8a2fd5cd 100644
--- a/client/src/main/java/com/vaadin/client/HasChildMeasurementHintConnector.java
+++ b/client/src/main/java/com/vaadin/client/HasChildMeasurementHintConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,12 +21,12 @@ import com.vaadin.client.ui.layout.ElementResizeListener;
/**
* Connector with layout measuring hint. Used to improve granularity of control
* over child component measurements.
- *
+ *
* @since 7.6
* @author Vaadin Ltd
*/
-public interface HasChildMeasurementHintConnector extends
- HasComponentsConnector {
+public interface HasChildMeasurementHintConnector
+ extends HasComponentsConnector {
/**
* Specifies how you would like child components measurements to be handled.
@@ -56,7 +56,7 @@ public interface HasChildMeasurementHintConnector extends
/**
* Sets the child measurement hint for this component.
- *
+ *
* @param hint
* the value to set
*/
@@ -64,7 +64,7 @@ public interface HasChildMeasurementHintConnector extends
/**
* Returns the current child measurement hint value.
- *
+ *
* @return a ChildLayoutMeasureMode value
*/
ChildMeasurementHint getChildMeasurementHint();
diff --git a/client/src/main/java/com/vaadin/client/HasComponentsConnector.java b/client/src/main/java/com/vaadin/client/HasComponentsConnector.java
index 19b93edd61..f44ccf5431 100644
--- a/client/src/main/java/com/vaadin/client/HasComponentsConnector.java
+++ b/client/src/main/java/com/vaadin/client/HasComponentsConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,14 +31,14 @@ public interface HasComponentsConnector extends ServerConnector {
/**
* Update child components caption, description and error message.
- *
+ *
* <p>
* Each component is responsible for maintaining its caption, description
* and error message. In most cases components doesn't want to do that and
* those elements reside outside of the component. Because of this layouts
* must provide service for it's childen to show those elements for them.
* </p>
- *
+ *
* @param connector
* Child component for which service is requested.
*/
@@ -53,7 +53,7 @@ public interface HasComponentsConnector extends ServerConnector {
* Note that the method {@link ServerConnector#getChildren()} can return a
* larger list of children including both the child components and any
* extensions registered for the connector.
- *
+ *
* @return A collection of child components for this connector. An empty
* collection if there are no children. Never returns null.
*/
@@ -73,7 +73,7 @@ public interface HasComponentsConnector extends ServerConnector {
* {@link ServerConnector#setChildren(List)} and contains only child
* components. Both methods are called separately by the framework if the
* connector implements {@link HasComponentsConnector}.
- *
+ *
* @param children
* The new child connectors (components only)
*/
@@ -82,7 +82,7 @@ public interface HasComponentsConnector extends ServerConnector {
/**
* Adds a handler that is called whenever the child hierarchy of this
* connector has been updated by the server.
- *
+ *
* @param handler
* The handler that should be added.
* @return A handler registration reference that can be used to unregister
diff --git a/client/src/main/java/com/vaadin/client/JavaScriptConnectorHelper.java b/client/src/main/java/com/vaadin/client/JavaScriptConnectorHelper.java
index 1833b370e5..b37557cb05 100644
--- a/client/src/main/java/com/vaadin/client/JavaScriptConnectorHelper.java
+++ b/client/src/main/java/com/vaadin/client/JavaScriptConnectorHelper.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -64,8 +64,8 @@ public class JavaScriptConnectorHelper {
/**
* The id of the previous response for which state changes have been
* processed. If this is the same as the
- * {@link ApplicationConnection#getLastSeenServerSyncId()}, it means that the
- * state change has already been handled and should not be done again.
+ * {@link ApplicationConnection#getLastSeenServerSyncId()}, it means that
+ * the state change has already been handled and should not be done again.
*/
private int processedResponseId = -1;
@@ -83,7 +83,7 @@ public class JavaScriptConnectorHelper {
* javascript is usually initalized the first time a state change event is
* received, but it might in some cases be necessary to make this happen
* earlier.
- *
+ *
* @since 7.4.0
*/
public void ensureJavascriptInited() {
@@ -93,7 +93,8 @@ public class JavaScriptConnectorHelper {
}
private void processStateChanges() {
- int lastResponseId = connector.getConnection().getLastSeenServerSyncId();
+ int lastResponseId = connector.getConnection()
+ .getLastSeenServerSyncId();
if (processedResponseId == lastResponseId) {
return;
}
@@ -140,7 +141,8 @@ public class JavaScriptConnectorHelper {
return rpcName.replace('$', '.');
}
- protected JavaScriptObject createRpcObject(String iface, Set<String> methods) {
+ protected JavaScriptObject createRpcObject(String iface,
+ Set<String> methods) {
JavaScriptObject object = JavaScriptObject.createObject();
for (String method : methods) {
@@ -157,19 +159,16 @@ public class JavaScriptConnectorHelper {
Integer tag = Integer.valueOf(this.tag);
while (tag != null) {
String serverSideClassName = conf.getServerSideClassNameForTag(tag);
- String initFunctionName = serverSideClassName
- .replaceAll("\\.", "_");
+ String initFunctionName = serverSideClassName.replaceAll("\\.",
+ "_");
if (tryInitJs(initFunctionName, getConnectorWrapper())) {
- getLogger().info(
- "JavaScript connector initialized using "
- + initFunctionName);
+ getLogger().info("JavaScript connector initialized using "
+ + initFunctionName);
this.initFunctionName = initFunctionName;
return true;
} else {
- getLogger()
- .warning(
- "No JavaScript function " + initFunctionName
- + " found");
+ getLogger().warning("No JavaScript function " + initFunctionName
+ + " found");
attemptedNames.add(initFunctionName);
tag = conf.getParentTag(tag.intValue());
}
@@ -267,8 +266,8 @@ public class JavaScriptConnectorHelper {
ElementResizeListener listener = elementListeners.get(callbackFunction);
if (listener == null) {
- LayoutManager layoutManager = LayoutManager.get(connector
- .getConnection());
+ LayoutManager layoutManager = LayoutManager
+ .get(connector.getConnection());
listener = new ElementResizeListener() {
@Override
public void onElementResize(ElementResizeEvent e) {
@@ -343,8 +342,8 @@ public class JavaScriptConnectorHelper {
return connector;
}
- return ConnectorMap.get(connector.getConnection()).getConnector(
- connectorId);
+ return ConnectorMap.get(connector.getConnection())
+ .getConnector(connectorId);
}
private void fireRpc(String iface, String method,
@@ -378,16 +377,15 @@ public class JavaScriptConnectorHelper {
interfaceList += getJsInterfaceName(iface);
}
- throw new IllegalStateException(
- "Can not call method "
- + method
- + " for wildcard rpc proxy because the function is defined for multiple rpc interfaces: "
- + interfaceList
- + ". Retrieve a rpc proxy for a specific interface using getRpcProxy(interfaceName) to use the function.");
+ throw new IllegalStateException("Can not call method " + method
+ + " for wildcard rpc proxy because the function is defined for multiple rpc interfaces: "
+ + interfaceList
+ + ". Retrieve a rpc proxy for a specific interface using getRpcProxy(interfaceName) to use the function.");
}
}
- private void fireCallback(String name, JsArray<JavaScriptObject> arguments) {
+ private void fireCallback(String name,
+ JsArray<JavaScriptObject> arguments) {
MethodInvocation invocation = new JavaScriptMethodInvocation(
connector.getConnectorId(),
"com.vaadin.ui.JavaScript$JavaScriptCallbackRpc", "call",
@@ -410,7 +408,7 @@ public class JavaScriptConnectorHelper {
delete state[key];
}
}
-
+
for(var key in input) {
if (input.hasOwnProperty(key)) {
state[key] = input[key];
@@ -450,7 +448,8 @@ public class JavaScriptConnectorHelper {
}-*/;
private static native void invokeJsRpc(JavaScriptObject rpcMap,
- String interfaceName, String methodName, JavaScriptObject parameters)
+ String interfaceName, String methodName,
+ JavaScriptObject parameters)
/*-{
var targets = rpcMap[interfaceName];
if (!targets) {
@@ -479,14 +478,15 @@ public class JavaScriptConnectorHelper {
invokeIfPresent(connectorWrapper, "onUnregister");
if (!resizeListeners.isEmpty()) {
- LayoutManager layoutManager = LayoutManager.get(connector
- .getConnection());
+ LayoutManager layoutManager = LayoutManager
+ .get(connector.getConnection());
for (Entry<Element, Map<JavaScriptObject, ElementResizeListener>> entry : resizeListeners
.entrySet()) {
Element element = entry.getKey();
- for (ElementResizeListener listener : entry.getValue().values()) {
- layoutManager
- .removeElementResizeListener(element, listener);
+ for (ElementResizeListener listener : entry.getValue()
+ .values()) {
+ layoutManager.removeElementResizeListener(element,
+ listener);
}
}
resizeListeners.clear();
diff --git a/client/src/main/java/com/vaadin/client/JavaScriptExtension.java b/client/src/main/java/com/vaadin/client/JavaScriptExtension.java
index 9c60d38a5a..c74715eb18 100644
--- a/client/src/main/java/com/vaadin/client/JavaScriptExtension.java
+++ b/client/src/main/java/com/vaadin/client/JavaScriptExtension.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/JsArrayObject.java b/client/src/main/java/com/vaadin/client/JsArrayObject.java
index b6dcf3789d..acbc43ac6b 100644
--- a/client/src/main/java/com/vaadin/client/JsArrayObject.java
+++ b/client/src/main/java/com/vaadin/client/JsArrayObject.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/LayoutManager.java b/client/src/main/java/com/vaadin/client/LayoutManager.java
index 371ea46d3d..306cea5ced 100644
--- a/client/src/main/java/com/vaadin/client/LayoutManager.java
+++ b/client/src/main/java/com/vaadin/client/LayoutManager.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -87,7 +87,7 @@ public class LayoutManager {
/**
* Returns the application connection for this layout manager.
- *
+ *
* @return connection
*/
protected ApplicationConnection getConnection() {
@@ -97,7 +97,7 @@ public class LayoutManager {
/**
* Gets the layout manager associated with the given
* {@link ApplicationConnection}.
- *
+ *
* @param connection
* the application connection to get a layout manager for
* @return the layout manager associated with the provided application
@@ -112,7 +112,7 @@ public class LayoutManager {
* This causes this layout manager to measure the element in the beginning
* of every layout phase and call the appropriate layout method of the
* managed layout if the size of the element has changed.
- *
+ *
* @param owner
* the ManagedLayout that depends on an element
* @param element
@@ -164,7 +164,7 @@ public class LayoutManager {
/**
* Assigns a measured size to an element. Method defined as protected to
* allow separate implementation for IE8.
- *
+ *
* @param element
* the dom element to attach the measured size to
* @param measuredSize
@@ -184,7 +184,7 @@ public class LayoutManager {
/**
* Gets the measured size for an element. Method defined as protected to
* allow separate implementation for IE8.
- *
+ *
* @param element
* The element to get measured size for
* @param defaultSize
@@ -209,9 +209,9 @@ public class LayoutManager {
/**
* Registers that a ManagedLayout is no longer depending on the size of an
* Element.
- *
+ *
* @see #registerDependency(ManagedLayout, Element)
- *
+ *
* @param owner
* the ManagedLayout no longer depends on an element
* @param element
@@ -240,9 +240,8 @@ public class LayoutManager {
}
layoutCounts.put(layout.getConnectorId(), count);
if (count.intValue() > 2) {
- getLogger().severe(
- Util.getConnectorString(layout) + " has been layouted "
- + count.intValue() + " times");
+ getLogger().severe(Util.getConnectorString(layout)
+ + " has been layouted " + count.intValue() + " times");
}
}
@@ -321,8 +320,8 @@ public class LayoutManager {
for (int i = 0; i < dumpLength; i++) {
ServerConnector connector = connectorMap.getConnector(dump.get(i));
if (connector != null) {
- currentDependencyTree.setNeedsMeasure(
- (ComponentConnector) connector, true);
+ currentDependencyTree
+ .setNeedsMeasure((ComponentConnector) connector, true);
}
}
needsMeasure = FastStringSet.create();
@@ -357,23 +356,27 @@ public class LayoutManager {
Collection<ElementResizeListener> listeners = elementResizeListeners
.get(element);
if (listeners != null) {
- Profiler.enter("Layout fire resize events - listeners not null");
- Profiler.enter("ElementResizeListener.onElementResize copy list");
- ElementResizeListener[] array = listeners
- .toArray(new ElementResizeListener[listeners
- .size()]);
- Profiler.leave("ElementResizeListener.onElementResize copy list");
+ Profiler.enter(
+ "Layout fire resize events - listeners not null");
+ Profiler.enter(
+ "ElementResizeListener.onElementResize copy list");
+ ElementResizeListener[] array = listeners.toArray(
+ new ElementResizeListener[listeners.size()]);
+ Profiler.leave(
+ "ElementResizeListener.onElementResize copy list");
ElementResizeEvent event = new ElementResizeEvent(this,
element);
for (ElementResizeListener listener : array) {
try {
String key = null;
if (Profiler.isEnabled()) {
- Profiler.enter("ElementResizeListener.onElementResize construct profiler key");
+ Profiler.enter(
+ "ElementResizeListener.onElementResize construct profiler key");
key = "ElementResizeListener.onElementResize for "
+ listener.getClass()
.getSimpleName();
- Profiler.leave("ElementResizeListener.onElementResize construct profiler key");
+ Profiler.leave(
+ "ElementResizeListener.onElementResize construct profiler key");
Profiler.enter(key);
}
@@ -386,7 +389,8 @@ public class LayoutManager {
"Error in resize listener", e);
}
}
- Profiler.leave("Layout fire resize events - listeners not null");
+ Profiler.leave(
+ "Layout fire resize events - listeners not null");
}
}
listenersToFire.clear();
@@ -451,10 +455,9 @@ public class LayoutManager {
Profiler.leave(key);
}
} catch (RuntimeException e) {
- getLogger()
- .log(Level.SEVERE,
- "Error in SimpleManagedLayout (horizontal) handling",
- e);
+ getLogger().log(Level.SEVERE,
+ "Error in SimpleManagedLayout (horizontal) handling",
+ e);
}
countLayout(layoutCounts, rr);
@@ -488,10 +491,9 @@ public class LayoutManager {
Profiler.leave(key);
}
} catch (RuntimeException e) {
- getLogger()
- .log(Level.SEVERE,
- "Error in DirectionalManagedLayout handling",
- e);
+ getLogger().log(Level.SEVERE,
+ "Error in DirectionalManagedLayout handling",
+ e);
}
countLayout(layoutCounts, cl);
} else {
@@ -514,10 +516,9 @@ public class LayoutManager {
Profiler.leave(key);
}
} catch (RuntimeException e) {
- getLogger()
- .log(Level.SEVERE,
- "Error in SimpleManagedLayout (vertical) handling",
- e);
+ getLogger().log(Level.SEVERE,
+ "Error in SimpleManagedLayout (vertical) handling",
+ e);
}
countLayout(layoutCounts, rr);
}
@@ -544,8 +545,9 @@ public class LayoutManager {
}
String connectorString = changedCids.get(i);
if (changedCids.length() < 10) {
- ServerConnector connector = ConnectorMap.get(
- connection).getConnector(connectorString);
+ ServerConnector connector = ConnectorMap
+ .get(connection)
+ .getConnector(connectorString);
connectorString = Util
.getConnectorString(connector);
}
@@ -557,18 +559,17 @@ public class LayoutManager {
Profiler.leave("Layout pass");
- getLogger()
- .info("Pass " + passes + " measured "
- + measuredConnectorCount + " elements, fired "
- + firedListeners + " listeners and did "
- + layoutCount + " layouts.");
+ getLogger().info("Pass " + passes + " measured "
+ + measuredConnectorCount + " elements, fired "
+ + firedListeners + " listeners and did " + layoutCount
+ + " layouts.");
if (passes > 100) {
getLogger().severe(LOOP_ABORT_MESSAGE);
if (ApplicationConfiguration.isDebugMode()) {
- VNotification.createNotification(
- VNotification.DELAY_FOREVER,
- connection.getUIConnector().getWidget())
+ VNotification
+ .createNotification(VNotification.DELAY_FOREVER,
+ connection.getUIConnector().getWidget())
.show(LOOP_ABORT_MESSAGE, VNotification.CENTERED,
"error");
}
@@ -608,15 +609,14 @@ public class LayoutManager {
pendingOverflowFixes = FastStringSet.create();
}
- getLogger().info(
- "Total layout phase time: " + totalDuration.elapsedMillis()
- + "ms");
+ getLogger().info("Total layout phase time: "
+ + totalDuration.elapsedMillis() + "ms");
}
private void logConnectorStatus(int connectorId) {
- currentDependencyTree
- .logDependencyStatus((ComponentConnector) ConnectorMap.get(
- connection).getConnector(Integer.toString(connectorId)));
+ currentDependencyTree.logDependencyStatus(
+ (ComponentConnector) ConnectorMap.get(connection)
+ .getConnector(Integer.toString(connectorId)));
}
private int measureConnectors(LayoutDependencyTree layoutDependencyTree,
@@ -644,12 +644,10 @@ public class LayoutManager {
}
if (debugLogging) {
- getLogger()
- .info("Doing overflow fix for "
- + Util.getConnectorString(componentConnector)
- + " in "
- + Util.getConnectorString(componentConnector
- .getParent()));
+ getLogger().info("Doing overflow fix for "
+ + Util.getConnectorString(componentConnector)
+ + " in " + Util.getConnectorString(
+ componentConnector.getParent()));
}
Profiler.enter("Overflow fix apply");
@@ -767,9 +765,8 @@ public class LayoutManager {
return true;
}
ServerConnector parent = componentConnector.getParent();
- if (parent instanceof ComponentConnector
- && !currentDependencyTree
- .noMoreChangesExpected((ComponentConnector) parent)) {
+ if (parent instanceof ComponentConnector && !currentDependencyTree
+ .noMoreChangesExpected((ComponentConnector) parent)) {
return true;
}
@@ -826,9 +823,8 @@ public class LayoutManager {
measuredAndUpdate(element, getMeasuredSize(element, null));
}
Profiler.leave("LayoutManager.measureNonConenctors");
- getLogger().info(
- "Measured " + measuredNonConnectorElements.size()
- + " non connector elements");
+ getLogger().info("Measured " + measuredNonConnectorElements.size()
+ + " non connector elements");
}
private MeasureResult measuredAndUpdate(Element element,
@@ -895,7 +891,7 @@ public class LayoutManager {
* 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
*/
@@ -917,15 +913,14 @@ public class LayoutManager {
* 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.");
+ getLogger().warning(
+ "setNeedsHorizontalLayout should not be run while a layout phase is in progress.");
}
needsHorizontalLayout.add(layout.getConnectorId());
}
@@ -943,15 +938,14 @@ public class LayoutManager {
* 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.");
+ getLogger().warning(
+ "setNeedsVerticalLayout should not be run while a layout phase is in progress.");
}
needsVerticalLayout.add(layout.getConnectorId());
}
@@ -966,22 +960,23 @@ public class LayoutManager {
* <li>Elements for which at least one ManagedLayout has registered a
* dependency
* </ul>
- *
+ *
* -1 is returned if the element has not been measured. If 0 is returned, it
* might indicate that the element is not attached to the DOM.
* <p>
* The value returned by this method is always rounded up. To get the exact
* outer width, use {@link #getOuterHeightDouble(Element)}
- *
+ *
* @param element
* the element to get the measured size for
* @return the measured outer height (including margins, paddings and
* borders) of the element in pixels.
*/
public final int getOuterHeight(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
- return (int) Math.ceil(getMeasuredSize(element, nullSize)
- .getOuterHeight());
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
+ return (int) Math
+ .ceil(getMeasuredSize(element, nullSize).getOuterHeight());
}
/**
@@ -994,10 +989,10 @@ public class LayoutManager {
* <li>Elements for which at least one ManagedLayout has registered a
* dependency
* </ul>
- *
+ *
* -1 is returned if the element has not been measured. If 0 is returned, it
* might indicate that the element is not attached to the DOM.
- *
+ *
* @since 7.5.1
* @param element
* the element to get the measured size for
@@ -1005,7 +1000,8 @@ public class LayoutManager {
* borders) of the element in pixels.
*/
public final double getOuterHeightDouble(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
return getMeasuredSize(element, nullSize).getOuterHeight();
}
@@ -1019,13 +1015,13 @@ public class LayoutManager {
* <li>Elements for which at least one ManagedLayout has registered a
* dependency
* </ul>
- *
+ *
* -1 is returned if the element has not been measured. If 0 is returned, it
* might indicate that the element is not attached to the DOM.
* <p>
* The value returned by this method is always rounded up. To get the exact
* outer width, use {@link #getOuterWidthDouble(Element)}
- *
+ *
* @since 7.5.1
* @param element
* the element to get the measured size for
@@ -1033,9 +1029,10 @@ public class LayoutManager {
* borders) of the element in pixels.
*/
public final int getOuterWidth(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
- return (int) Math.ceil(getMeasuredSize(element, nullSize)
- .getOuterWidth());
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
+ return (int) Math
+ .ceil(getMeasuredSize(element, nullSize).getOuterWidth());
}
/**
@@ -1048,17 +1045,18 @@ public class LayoutManager {
* <li>Elements for which at least one ManagedLayout has registered a
* dependency
* </ul>
- *
+ *
* -1 is returned if the element has not been measured. If 0 is returned, it
* might indicate that the element is not attached to the DOM.
- *
+ *
* @param element
* the element to get the measured size for
* @return the measured outer width (including margins, paddings and
* borders) of the element in pixels.
*/
public final double getOuterWidthDouble(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
return getMeasuredSize(element, nullSize).getOuterWidth();
}
@@ -1072,22 +1070,23 @@ public class LayoutManager {
* <li>Elements for which at least one ManagedLayout has registered a
* dependency
* </ul>
- *
+ *
* -1 is returned if the element has not been measured. If 0 is returned, it
* might indicate that the element is not attached to the DOM.
* <p>
* The value returned by this method is always rounded up. To get the exact
* outer width, use {@link #getInnerHeightDouble(Element)}
- *
+ *
* @param element
* the element to get the measured size for
* @return the measured inner height (excluding margins, paddings and
* borders) of the element in pixels.
*/
public final int getInnerHeight(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
- return (int) Math.ceil(getMeasuredSize(element, nullSize)
- .getInnerHeight());
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
+ return (int) Math
+ .ceil(getMeasuredSize(element, nullSize).getInnerHeight());
}
/**
@@ -1100,10 +1099,10 @@ public class LayoutManager {
* <li>Elements for which at least one ManagedLayout has registered a
* dependency
* </ul>
- *
+ *
* -1 is returned if the element has not been measured. If 0 is returned, it
* might indicate that the element is not attached to the DOM.
- *
+ *
* @since 7.5.1
* @param element
* the element to get the measured size for
@@ -1111,7 +1110,8 @@ public class LayoutManager {
* borders) of the element in pixels.
*/
public final double getInnerHeightDouble(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
return getMeasuredSize(element, nullSize).getInnerHeight();
}
@@ -1125,22 +1125,23 @@ public class LayoutManager {
* <li>Elements for which at least one ManagedLayout has registered a
* dependency
* </ul>
- *
+ *
* -1 is returned if the element has not been measured. If 0 is returned, it
* might indicate that the element is not attached to the DOM.
* <p>
* The value returned by this method is always rounded up. To get the exact
* outer width, use {@link #getOuterHeightDouble(Element)}
- *
+ *
* @param element
* the element to get the measured size for
* @return the measured inner width (excluding margins, paddings and
* borders) of the element in pixels.
*/
public final int getInnerWidth(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
- return (int) Math.ceil(getMeasuredSize(element, nullSize)
- .getInnerWidth());
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
+ return (int) Math
+ .ceil(getMeasuredSize(element, nullSize).getInnerWidth());
}
/**
@@ -1153,10 +1154,10 @@ public class LayoutManager {
* <li>Elements for which at least one ManagedLayout has registered a
* dependency
* </ul>
- *
+ *
* -1 is returned if the element has not been measured. If 0 is returned, it
* might indicate that the element is not attached to the DOM.
- *
+ *
* @since 7.5.1
* @param element
* the element to get the measured size for
@@ -1164,7 +1165,8 @@ public class LayoutManager {
* borders) of the element in pixels.
*/
public final double getInnerWidthDouble(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
return getMeasuredSize(element, nullSize).getInnerWidth();
}
@@ -1178,18 +1180,19 @@ public class LayoutManager {
* <li>Elements for which at least one ManagedLayout has registered a
* dependency
* </ul>
- *
+ *
* A negative number is returned if the element has not been measured. If 0
* is returned, it might indicate that the element is not attached to the
* DOM.
- *
+ *
* @param element
* the element to get the measured size for
* @return the measured border height (top border + bottom border) of the
* element in pixels.
*/
public final int getBorderHeight(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
return getMeasuredSize(element, nullSize).getBorderHeight();
}
@@ -1203,18 +1206,19 @@ public class LayoutManager {
* <li>Elements for which at least one ManagedLayout has registered a
* dependency
* </ul>
- *
+ *
* A negative number is returned if the element has not been measured. If 0
* is returned, it might indicate that the element is not attached to the
* DOM.
- *
+ *
* @param element
* the element to get the measured size for
* @return the measured padding height (top padding + bottom padding) of the
* element in pixels.
*/
public int getPaddingHeight(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
return getMeasuredSize(element, nullSize).getPaddingHeight();
}
@@ -1228,18 +1232,19 @@ public class LayoutManager {
* <li>Elements for which at least one ManagedLayout has registered a
* dependency
* </ul>
- *
+ *
* A negative number is returned if the element has not been measured. If 0
* is returned, it might indicate that the element is not attached to the
* DOM.
- *
+ *
* @param element
* the element to get the measured size for
* @return the measured border width (left border + right border) of the
* element in pixels.
*/
public int getBorderWidth(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
return getMeasuredSize(element, nullSize).getBorderWidth();
}
@@ -1252,17 +1257,18 @@ public class LayoutManager {
* <li>Elements for which at least one ManagedLayout has registered a
* dependency
* </ul>
- *
+ *
* A negative number is returned if the element has not been measured. If 0
* is returned, it might indicate that the element is not attached to the
* DOM.
- *
+ *
* @param element
* the element to get the measured size for
* @return the measured top border of the element in pixels.
*/
public int getBorderTop(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
return getMeasuredSize(element, nullSize).getBorderTop();
}
@@ -1275,17 +1281,18 @@ public class LayoutManager {
* <li>Elements for which at least one ManagedLayout has registered a
* dependency
* </ul>
- *
+ *
* A negative number is returned if the element has not been measured. If 0
* is returned, it might indicate that the element is not attached to the
* DOM.
- *
+ *
* @param element
* the element to get the measured size for
* @return the measured left border of the element in pixels.
*/
public int getBorderLeft(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
return getMeasuredSize(element, nullSize).getBorderLeft();
}
@@ -1298,17 +1305,18 @@ public class LayoutManager {
* <li>Elements for which at least one ManagedLayout has registered a
* dependency
* </ul>
- *
+ *
* A negative number is returned if the element has not been measured. If 0
* is returned, it might indicate that the element is not attached to the
* DOM.
- *
+ *
* @param element
* the element to get the measured size for
* @return the measured bottom border of the element in pixels.
*/
public int getBorderBottom(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
return getMeasuredSize(element, nullSize).getBorderBottom();
}
@@ -1321,17 +1329,18 @@ public class LayoutManager {
* <li>Elements for which at least one ManagedLayout has registered a
* dependency
* </ul>
- *
+ *
* A negative number is returned if the element has not been measured. If 0
* is returned, it might indicate that the element is not attached to the
* DOM.
- *
+ *
* @param element
* the element to get the measured size for
* @return the measured right border of the element in pixels.
*/
public int getBorderRight(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
return getMeasuredSize(element, nullSize).getBorderRight();
}
@@ -1345,18 +1354,19 @@ public class LayoutManager {
* <li>Elements for which at least one ManagedLayout has registered a
* dependency
* </ul>
- *
+ *
* A negative number is returned if the element has not been measured. If 0
* is returned, it might indicate that the element is not attached to the
* DOM.
- *
+ *
* @param element
* the element to get the measured size for
* @return the measured padding width (left padding + right padding) of the
* element in pixels.
*/
public int getPaddingWidth(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
return getMeasuredSize(element, nullSize).getPaddingWidth();
}
@@ -1369,17 +1379,18 @@ public class LayoutManager {
* <li>Elements for which at least one ManagedLayout has registered a
* dependency
* </ul>
- *
+ *
* A negative number is returned if the element has not been measured. If 0
* is returned, it might indicate that the element is not attached to the
* DOM.
- *
+ *
* @param element
* the element to get the measured size for
* @return the measured top padding of the element in pixels.
*/
public int getPaddingTop(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
return getMeasuredSize(element, nullSize).getPaddingTop();
}
@@ -1392,17 +1403,18 @@ public class LayoutManager {
* <li>Elements for which at least one ManagedLayout has registered a
* dependency
* </ul>
- *
+ *
* A negative number is returned if the element has not been measured. If 0
* is returned, it might indicate that the element is not attached to the
* DOM.
- *
+ *
* @param element
* the element to get the measured size for
* @return the measured left padding of the element in pixels.
*/
public int getPaddingLeft(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
return getMeasuredSize(element, nullSize).getPaddingLeft();
}
@@ -1415,17 +1427,18 @@ public class LayoutManager {
* <li>Elements for which at least one ManagedLayout has registered a
* dependency
* </ul>
- *
+ *
* A negative number is returned if the element has not been measured. If 0
* is returned, it might indicate that the element is not attached to the
* DOM.
- *
+ *
* @param element
* the element to get the measured size for
* @return the measured bottom padding of the element in pixels.
*/
public int getPaddingBottom(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
return getMeasuredSize(element, nullSize).getPaddingBottom();
}
@@ -1438,17 +1451,18 @@ public class LayoutManager {
* <li>Elements for which at least one ManagedLayout has registered a
* dependency
* </ul>
- *
+ *
* A negative number is returned if the element has not been measured. If 0
* is returned, it might indicate that the element is not attached to the
* DOM.
- *
+ *
* @param element
* the element to get the measured size for
* @return the measured right padding of the element in pixels.
*/
public int getPaddingRight(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
return getMeasuredSize(element, nullSize).getPaddingRight();
}
@@ -1461,17 +1475,18 @@ public class LayoutManager {
* <li>Elements for which at least one ManagedLayout has registered a
* dependency
* </ul>
- *
+ *
* A negative number is returned if the element has not been measured. If 0
* is returned, it might indicate that the element is not attached to the
* DOM.
- *
+ *
* @param element
* the element to get the measured size for
* @return the measured top margin of the element in pixels.
*/
public int getMarginTop(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
return getMeasuredSize(element, nullSize).getMarginTop();
}
@@ -1484,17 +1499,18 @@ public class LayoutManager {
* <li>Elements for which at least one ManagedLayout has registered a
* dependency
* </ul>
- *
+ *
* A negative number is returned if the element has not been measured. If 0
* is returned, it might indicate that the element is not attached to the
* DOM.
- *
+ *
* @param element
* the element to get the measured size for
* @return the measured right margin of the element in pixels.
*/
public int getMarginRight(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
return getMeasuredSize(element, nullSize).getMarginRight();
}
@@ -1507,17 +1523,18 @@ public class LayoutManager {
* <li>Elements for which at least one ManagedLayout has registered a
* dependency
* </ul>
- *
+ *
* A negative number is returned if the element has not been measured. If 0
* is returned, it might indicate that the element is not attached to the
* DOM.
- *
+ *
* @param element
* the element to get the measured size for
* @return the measured bottom margin of the element in pixels.
*/
public int getMarginBottom(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
return getMeasuredSize(element, nullSize).getMarginBottom();
}
@@ -1530,17 +1547,18 @@ public class LayoutManager {
* <li>Elements for which at least one ManagedLayout has registered a
* dependency
* </ul>
- *
+ *
* A negative number is returned if the element has not been measured. If 0
* is returned, it might indicate that the element is not attached to the
* DOM.
- *
+ *
* @param element
* the element to get the measured size for
* @return the measured left margin of the element in pixels.
*/
public int getMarginLeft(Element element) {
- assert needsMeasure(element) : "Getting measurement for element that is not measured";
+ assert needsMeasure(
+ element) : "Getting measurement for element that is not measured";
return getMeasuredSize(element, nullSize).getMarginLeft();
}
@@ -1553,11 +1571,11 @@ public class LayoutManager {
* <li>Elements for which at least one ManagedLayout has registered a
* dependency
* </ul>
- *
+ *
* A negative number is returned if the element has not been measured. If 0
* is returned, it might indicate that the element is not attached to the
* DOM.
- *
+ *
* @param element
* the element to get the measured margin for
* @return the measured top+bottom margin of the element in pixels.
@@ -1575,11 +1593,11 @@ public class LayoutManager {
* <li>Elements for which at least one ManagedLayout has registered a
* dependency
* </ul>
- *
+ *
* A negative number is returned if the element has not been measured. If 0
* is returned, it might indicate that the element is not attached to the
* DOM.
- *
+ *
* @param element
* the element to get the measured margin for
* @return the measured left+right margin of the element in pixels.
@@ -1594,14 +1612,15 @@ public class LayoutManager {
* informing the LayoutManager about what size a component will have, the
* layout propagation can continue directly without first measuring the
* potentially resized elements.
- *
+ *
* @param component
* the component for which the size is reported
* @param outerHeight
* the new outer height (including margins, borders and paddings)
* of the component in pixels
*/
- public void reportOuterHeight(ComponentConnector component, int outerHeight) {
+ public void reportOuterHeight(ComponentConnector component,
+ int outerHeight) {
Element element = component.getWidget().getElement();
MeasuredSize measuredSize = getMeasuredSize(element);
if (isLayoutRunning()) {
@@ -1623,7 +1642,7 @@ public class LayoutManager {
* LayoutManager about what size a component will have, the layout
* propagation can continue directly without first measuring the potentially
* resized elements.
- *
+ *
* @param component
* the relatively sized component for which the size is reported
* @param assignedHeight
@@ -1634,8 +1653,8 @@ public class LayoutManager {
int assignedHeight) {
assert component.isRelativeHeight();
- float percentSize = parsePercent(component.getState().height == null ? ""
- : component.getState().height);
+ float percentSize = parsePercent(component.getState().height == null
+ ? "" : component.getState().height);
int effectiveHeight = Math.round(assignedHeight * (percentSize / 100));
reportOuterHeight(component, effectiveHeight);
@@ -1647,7 +1666,7 @@ public class LayoutManager {
* LayoutManager about what size a component will have, the layout
* propagation can continue directly without first measuring the potentially
* resized elements.
- *
+ *
* @param component
* the relatively sized component for which the size is reported
* @param assignedWidth
@@ -1675,7 +1694,7 @@ public class LayoutManager {
* informing the LayoutManager about what size a component will have, the
* layout propagation can continue directly without first measuring the
* potentially resized elements.
- *
+ *
* @param component
* the component for which the size is reported
* @param outerWidth
@@ -1703,7 +1722,7 @@ public class LayoutManager {
* element changes. Adding a listener to an element also ensures that all
* sizes for that element will be available starting from the next layout
* phase.
- *
+ *
* @param element
* the element that should be checked for size changes
* @param listener
@@ -1726,7 +1745,7 @@ public class LayoutManager {
* Removes an element resize listener from the provided element. This might
* cause this LayoutManager to stop tracking the size of the element if no
* other sources are interested in the size.
- *
+ *
* @param element
* the element to which the element resize listener was
* previously added
@@ -1765,7 +1784,7 @@ public class LayoutManager {
* {@link #setNeedsMeasureRecursively(ComponentConnector)} instead.
* <p>
* If there is no upcoming layout phase, a new layout phase is scheduled.
- *
+ *
* @param component
* the component whose size might have changed.
*/
@@ -1788,7 +1807,7 @@ public class LayoutManager {
* {@link #setNeedsMeasure(ComponentConnector)} instead.
* <p>
* If there is no upcoming layout phase, a new layout phase is scheduled.
- *
+ *
* @since 7.2
* @param component
* the component at the root of the component hierarchy to
@@ -1799,7 +1818,8 @@ public class LayoutManager {
if (component instanceof HasComponentsConnector) {
HasComponentsConnector hasComponents = (HasComponentsConnector) component;
- for (ComponentConnector child : hasComponents.getChildComponents()) {
+ for (ComponentConnector child : hasComponents
+ .getChildComponents()) {
setNeedsMeasureRecursively(child);
}
}
@@ -1821,13 +1841,14 @@ public class LayoutManager {
/**
* Checks if there is something waiting for a layout to take place.
- *
+ *
* @since 7.5.6
* @return true if there are connectors waiting for measurement or layout,
* false otherwise
*/
public boolean isLayoutNeeded() {
- if (!needsHorizontalLayout.isEmpty() || !needsVerticalLayout.isEmpty()) {
+ if (!needsHorizontalLayout.isEmpty()
+ || !needsVerticalLayout.isEmpty()) {
return true;
}
if (!needsMeasure.isEmpty()) {
diff --git a/client/src/main/java/com/vaadin/client/LayoutManagerIE8.java b/client/src/main/java/com/vaadin/client/LayoutManagerIE8.java
index 479155d0e6..603ac03337 100644
--- a/client/src/main/java/com/vaadin/client/LayoutManagerIE8.java
+++ b/client/src/main/java/com/vaadin/client/LayoutManagerIE8.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,10 +29,10 @@ import com.google.gwt.user.client.ui.RootPanel;
* element in IE8 seems to make the browser think the element has changed in a
* way that requires a reflow. To work around that, the MeasureData is instead
* stored in Map for IE8.
- *
+ *
* This implementation is injected for IE8 by a replace-with definition in the
* GWT module.
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
diff --git a/client/src/main/java/com/vaadin/client/LocaleNotLoadedException.java b/client/src/main/java/com/vaadin/client/LocaleNotLoadedException.java
index 6f59e786e4..6d2cbf28ae 100644
--- a/client/src/main/java/com/vaadin/client/LocaleNotLoadedException.java
+++ b/client/src/main/java/com/vaadin/client/LocaleNotLoadedException.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/LocaleService.java b/client/src/main/java/com/vaadin/client/LocaleService.java
index dcd1c9ea4e..490101285b 100644
--- a/client/src/main/java/com/vaadin/client/LocaleService.java
+++ b/client/src/main/java/com/vaadin/client/LocaleService.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,9 +27,9 @@ import com.vaadin.shared.ui.ui.UIState.LocaleData;
/**
* Date / time etc. localisation service for all widgets. Caches all loaded
* locales as JSONObjects.
- *
+ *
* @author Vaadin Ltd.
- *
+ *
*/
public class LocaleService {
diff --git a/client/src/main/java/com/vaadin/client/MeasuredSize.java b/client/src/main/java/com/vaadin/client/MeasuredSize.java
index 2099008350..7f95d1826a 100644
--- a/client/src/main/java/com/vaadin/client/MeasuredSize.java
+++ b/client/src/main/java/com/vaadin/client/MeasuredSize.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -205,7 +205,8 @@ public class MeasuredSize {
heightChanged = true;
}
if (!widthChanged && hasWidthChanged(this.paddings, paddings)) {
- debugSizeChange(element, "Width (padding)", this.paddings, paddings);
+ debugSizeChange(element, "Width (padding)", this.paddings,
+ paddings);
widthChanged = true;
}
this.paddings = paddings;
@@ -278,9 +279,8 @@ public class MeasuredSize {
private void debugSizeChange(Element element, String sizeChangeType,
String changedFrom, String changedTo) {
if (debugSizeChanges) {
- getLogger()
- .info(sizeChangeType + " has changed from " + changedFrom
- + " to " + changedTo + " for " + element.toString());
+ getLogger().info(sizeChangeType + " has changed from " + changedFrom
+ + " to " + changedTo + " for " + element.toString());
}
}
diff --git a/client/src/main/java/com/vaadin/client/MouseEventDetailsBuilder.java b/client/src/main/java/com/vaadin/client/MouseEventDetailsBuilder.java
index 11ebe3925c..62b96ee712 100644
--- a/client/src/main/java/com/vaadin/client/MouseEventDetailsBuilder.java
+++ b/client/src/main/java/com/vaadin/client/MouseEventDetailsBuilder.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,16 +24,16 @@ import com.vaadin.shared.MouseEventDetails.MouseButton;
/**
* Helper class for constructing a MouseEventDetails object from a
* {@link NativeEvent}.
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
- *
+ *
*/
public class MouseEventDetailsBuilder {
/**
* Construct a {@link MouseEventDetails} object from the given event
- *
+ *
* @param evt
* The event to use as a source for the details
* @return a MouseEventDetails containing information from the event
@@ -44,7 +44,7 @@ public class MouseEventDetailsBuilder {
/**
* Construct a {@link MouseEventDetails} object from the given event
- *
+ *
* @param evt
* The event to use as a source for the details
* @param relativeToElement
diff --git a/client/src/main/java/com/vaadin/client/Paintable.java b/client/src/main/java/com/vaadin/client/Paintable.java
index 34f2d0714f..1e3ca24dca 100644
--- a/client/src/main/java/com/vaadin/client/Paintable.java
+++ b/client/src/main/java/com/vaadin/client/Paintable.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ package com.vaadin.client;
* An interface used by client-side widgets or paintable parts to receive
* updates from the corresponding server-side components in the form of
* {@link UIDL}.
- *
+ *
* Updates can be sent back to the server using the
* {@link ApplicationConnection#updateVariable()} methods.
*/
diff --git a/client/src/main/java/com/vaadin/client/Profiler.java b/client/src/main/java/com/vaadin/client/Profiler.java
index 3923b66218..b5123bbaa7 100644
--- a/client/src/main/java/com/vaadin/client/Profiler.java
+++ b/client/src/main/java/com/vaadin/client/Profiler.java
@@ -69,7 +69,7 @@ public class Profiler {
* Interface for getting data from the {@link Profiler}.
* <p>
* <b>Warning!</b> This interface is most likely to change in the future
- *
+ *
* @since 7.1
* @author Vaadin Ltd
*/
@@ -98,7 +98,7 @@ public class Profiler {
/**
* Create a new node with the given name.
- *
+ *
* @param name
*/
public Node(String name) {
@@ -107,7 +107,7 @@ public class Profiler {
/**
* Gets the name of the node
- *
+ *
* @return the name of the node
*/
public String getName() {
@@ -117,7 +117,7 @@ public class Profiler {
/**
* Creates a new child node or retrieves and existing child and updates
* its total time and hit count.
- *
+ *
* @param name
* the name of the child
* @param timestamp
@@ -138,7 +138,7 @@ public class Profiler {
/**
* Gets the total time spent in this node, including time spent in sub
* nodes
- *
+ *
* @return the total time spent, in milliseconds
*/
public double getTimeSpent() {
@@ -148,7 +148,7 @@ public class Profiler {
/**
* Gets the minimum time spent for one invocation of this node,
* including time spent in sub nodes
- *
+ *
* @return the time spent for the fastest invocation, in milliseconds
*/
public double getMinTimeSpent() {
@@ -158,7 +158,7 @@ public class Profiler {
/**
* Gets the maximum time spent for one invocation of this node,
* including time spent in sub nodes
- *
+ *
* @return the time spent for the slowest invocation, in milliseconds
*/
public double getMaxTimeSpent() {
@@ -167,7 +167,7 @@ public class Profiler {
/**
* Gets the number of times this node has been entered
- *
+ *
* @return the number of times the node has been entered
*/
public int getCount() {
@@ -177,7 +177,7 @@ public class Profiler {
/**
* Gets the total time spent in this node, excluding time spent in sub
* nodes
- *
+ *
* @return the total time spent, in milliseconds
*/
public double getOwnTime() {
@@ -190,14 +190,15 @@ public class Profiler {
/**
* Gets the child nodes of this node
- *
+ *
* @return a collection of child nodes
*/
public Collection<Node> getChildren() {
return Collections.unmodifiableCollection(children.values());
}
- private void buildRecursiveString(StringBuilder builder, String prefix) {
+ private void buildRecursiveString(StringBuilder builder,
+ String prefix) {
if (getName() != null) {
String msg = getStringRepresentation(prefix);
builder.append(msg + '\n');
@@ -220,9 +221,7 @@ public class Profiler {
String msg = prefix + " " + getName() + " in "
+ roundToSignificantFigures(getTimeSpent()) + " ms.";
if (getCount() > 1) {
- msg += " Invoked "
- + getCount()
- + " times ("
+ msg += " Invoked " + getCount() + " times ("
+ roundToSignificantFigures(getTimeSpent() / getCount())
+ " ms per time, min "
+ roundToSignificantFigures(getMinTimeSpent())
@@ -270,10 +269,10 @@ public class Profiler {
totalNode.time += getOwnTime();
totalNode.count += getCount();
- totalNode.minTime = roundToSignificantFigures(Math.min(
- totalNode.minTime, getMinTimeSpent()));
- totalNode.maxTime = roundToSignificantFigures(Math.max(
- totalNode.maxTime, getMaxTimeSpent()));
+ totalNode.minTime = roundToSignificantFigures(
+ Math.min(totalNode.minTime, getMinTimeSpent()));
+ totalNode.maxTime = roundToSignificantFigures(
+ Math.max(totalNode.maxTime, getMaxTimeSpent()));
}
for (Node node : children.values()) {
node.sumUpTotals(totals);
@@ -390,7 +389,7 @@ public class Profiler {
* Returns time relative to the particular page load time. The value should
* not be used directly but rather difference between two values returned by
* this method should be used to compare measurements.
- *
+ *
* @since 7.6
*/
public static double getRelativeTimeMillis() {
@@ -468,9 +467,8 @@ public class Profiler {
stack.add(rootNode);
JsArray<GwtStatsEvent> gwtStatsEvents = getGwtStatsEvents();
if (gwtStatsEvents.length() == 0) {
- getLogger()
- .warning(
- "No profiling events recorded, this might happen if another __gwtStatsEvent handler is installed.");
+ getLogger().warning(
+ "No profiling events recorded, this might happen if another __gwtStatsEvent handler is installed.");
return;
}
@@ -503,10 +501,8 @@ public class Profiler {
if (type.equals("end")) {
if (!inEvent) {
- getLogger().severe(
- "Got end event for " + eventName
- + " but is currently in "
- + stackTop.getName());
+ getLogger().severe("Got end event for " + eventName
+ + " but is currently in " + stackTop.getName());
return;
}
Node previousStackTop = stack.removeLast();
@@ -516,8 +512,9 @@ public class Profiler {
previousStackTop.leave(gwtStatsEvent.getMillis());
}
} else {
- double millis = isExtendedEvent ? gwtStatsEvent
- .getRelativeMillis() : gwtStatsEvent.getMillis();
+ double millis = isExtendedEvent
+ ? gwtStatsEvent.getRelativeMillis()
+ : gwtStatsEvent.getMillis();
if (!inEvent) {
stackTop = stackTop.enterChild(eventName, millis);
stack.add(stackTop);
@@ -538,9 +535,8 @@ public class Profiler {
}
if (stack.size() != 1) {
- getLogger().warning(
- "Not all nodes are left, the last node is "
- + stack.getLast().getName());
+ getLogger().warning("Not all nodes are left, the last node is "
+ + stack.getLast().getName());
return;
}
@@ -600,8 +596,8 @@ public class Profiler {
}
if (timings.isEmpty()) {
- getLogger()
- .info("Bootstrap timings not supported, please ensure your browser supports performance.timing");
+ getLogger().info(
+ "Bootstrap timings not supported, please ensure your browser supports performance.timing");
return;
}
@@ -675,7 +671,8 @@ public class Profiler {
public static void setProfilerResultConsumer(
ProfilerResultConsumer profilerResultConsumer) {
if (consumer != null) {
- throw new IllegalStateException("The consumer has already been set");
+ throw new IllegalStateException(
+ "The consumer has already been set");
}
consumer = profilerResultConsumer;
}
@@ -697,8 +694,8 @@ public class Profiler {
double getRelativeTime();
}
- private static class DefaultRelativeTimeSupplier implements
- RelativeTimeSupplier {
+ private static class DefaultRelativeTimeSupplier
+ implements RelativeTimeSupplier {
@Override
public native double getRelativeTime()
@@ -707,8 +704,8 @@ public class Profiler {
}-*/;
}
- private static class HighResolutionTimeSupplier implements
- RelativeTimeSupplier {
+ private static class HighResolutionTimeSupplier
+ implements RelativeTimeSupplier {
@Override
public native double getRelativeTime()
diff --git a/client/src/main/java/com/vaadin/client/RenderInformation.java b/client/src/main/java/com/vaadin/client/RenderInformation.java
index 8fd3fc7e0b..dbc08dc8d2 100644
--- a/client/src/main/java/com/vaadin/client/RenderInformation.java
+++ b/client/src/main/java/com/vaadin/client/RenderInformation.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,9 +20,9 @@ import com.google.gwt.user.client.DOM;
/**
* Contains size information about a rendered container and its content area.
- *
+ *
* @author Artur Signell
- *
+ *
*/
public class RenderInformation {
@@ -48,9 +48,9 @@ public class RenderInformation {
/**
* Update the size of the widget.
- *
+ *
* @param widget
- *
+ *
* @return true if the size has changed since last update
* @deprecated As of 7.2, call and override {@link #updateSize(Element)}
* instead
@@ -69,11 +69,11 @@ public class RenderInformation {
/**
* Update the size of the widget.
- *
+ *
* @param widget
- *
+ *
* @return true if the size has changed since last update
- *
+ *
* @since 7.2
*/
public boolean updateSize(Element element) {
diff --git a/client/src/main/java/com/vaadin/client/RenderSpace.java b/client/src/main/java/com/vaadin/client/RenderSpace.java
index dff774aa6f..cceb9102ab 100644
--- a/client/src/main/java/com/vaadin/client/RenderSpace.java
+++ b/client/src/main/java/com/vaadin/client/RenderSpace.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ResourceLoader.java b/client/src/main/java/com/vaadin/client/ResourceLoader.java
index 559768d09c..6bf0e7a4e8 100644
--- a/client/src/main/java/com/vaadin/client/ResourceLoader.java
+++ b/client/src/main/java/com/vaadin/client/ResourceLoader.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -37,11 +37,11 @@ import com.google.gwt.user.client.Timer;
/**
* ResourceLoader lets you dynamically include external scripts and styles on
* the page and lets you know when the resource has been loaded.
- *
+ *
* You can also preload resources, allowing them to get cached by the browser
* without being evaluated. This enables downloading multiple resources at once
* while still controlling in which order e.g. scripts are executed.
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
@@ -56,7 +56,7 @@ public class ResourceLoader {
/**
* Creates a new event.
- *
+ *
* @param loader
* the resource loader that has loaded the resource
* @param resourceUrl
@@ -74,7 +74,7 @@ public class ResourceLoader {
/**
* Gets the resource loader that has fired this event
- *
+ *
* @return the resource loader
*/
public ResourceLoader getResourceLoader() {
@@ -83,7 +83,7 @@ public class ResourceLoader {
/**
* Gets the absolute url of the loaded resource.
- *
+ *
* @return the absolute url of the loaded resource
*/
public String getResourceUrl() {
@@ -93,9 +93,9 @@ public class ResourceLoader {
/**
* Returns true if the resource has been preloaded, false if it's fully
* loaded
- *
+ *
* @see ResourceLoader#preloadResource(String, ResourceLoadListener)
- *
+ *
* @return true if the resource has been preloaded, false if it's fully
* loaded
*/
@@ -112,9 +112,9 @@ public class ResourceLoader {
* Notifies this ResourceLoadListener that a resource has been loaded.
* Some browsers do not support any way of detecting load errors. In
* these cases, onLoad will be called regardless of the status.
- *
+ *
* @see ResourceLoadEvent
- *
+ *
* @param event
* a resource load event with information about the loaded
* resource
@@ -127,9 +127,9 @@ public class ResourceLoader {
* server did not respond. Some browsers do not support any way of
* detecting load errors. In these cases, onLoad will be called
* regardless of the status.
- *
+ *
* @see ResourceLoadEvent
- *
+ *
* @param event
* a resource load event with information about the resource
* that could not be loaded.
@@ -183,7 +183,7 @@ public class ResourceLoader {
/**
* Returns the default ResourceLoader
- *
+ *
* @return the default ResourceLoader
*/
public static ResourceLoader get() {
@@ -195,8 +195,8 @@ public class ResourceLoader {
* this method when the script is currently loading or already loaded
* doesn't cause the script to be loaded again, but the listener will still
* be notified when appropriate.
- *
- *
+ *
+ *
* @param scriptUrl
* the url of the script to load
* @param resourceLoadListener
@@ -213,8 +213,8 @@ public class ResourceLoader {
* this method when the script is currently loading or already loaded
* doesn't cause the script to be loaded again, but the listener will still
* be notified when appropriate.
- *
- *
+ *
+ *
* @param scriptUrl
* url of script to load
* @param resourceLoadListener
@@ -278,7 +278,7 @@ public class ResourceLoader {
/**
* The current browser supports script.async='false' for maintaining
* execution order for dynamically-added scripts.
- *
+ *
* @return Browser supports script.async='false'
* @since 7.2.4
*/
@@ -292,12 +292,12 @@ public class ResourceLoader {
* preloaded, it will be present in the browser's cache (provided the HTTP
* headers allow caching), making a subsequent load operation complete
* without having to wait for the resource to be downloaded again.
- *
+ *
* Calling this method when the resource is currently loading, currently
* preloading, already preloaded or already loaded doesn't cause the
* resource to be preloaded again, but the listener will still be notified
* when appropriate.
- *
+ *
* @param url
* the url of the resource to preload
* @param resourceLoadListener
@@ -378,7 +378,7 @@ public class ResourceLoader {
* Adds an onload listener to the given element, which should be a link or a
* script tag. The listener is called whenever loading is complete or an
* error occurred.
- *
+ *
* @since 7.3
* @param element
* the element to attach a listener to
@@ -414,7 +414,7 @@ public class ResourceLoader {
* Calling this method when the stylesheet is currently loading or already
* loaded doesn't cause the stylesheet to be loaded again, but the listener
* will still be notified when appropriate.
- *
+ *
* @param stylesheetUrl
* the url of the stylesheet to load
* @param resourceLoadListener
diff --git a/client/src/main/java/com/vaadin/client/ServerConnector.java b/client/src/main/java/com/vaadin/client/ServerConnector.java
index 0bc2ac9995..29994961d5 100644
--- a/client/src/main/java/com/vaadin/client/ServerConnector.java
+++ b/client/src/main/java/com/vaadin/client/ServerConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ import com.vaadin.shared.communication.SharedState;
* Interface implemented by all client side classes that can be communicate with
* the server. Classes implementing this interface are initialized by the
* framework when needed and have the ability to communicate with the server.
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
@@ -37,7 +37,7 @@ public interface ServerConnector extends Connector {
/**
* Gets ApplicationConnection instance that created this connector.
- *
+ *
* @return The ApplicationConnection as set by
* {@link #doInit(String, ApplicationConnection)}
*/
@@ -47,13 +47,13 @@ public interface ServerConnector extends Connector {
* Tests whether the connector is enabled or not. This method checks that
* the connector is enabled in context, i.e. if the parent connector is
* disabled, this method must return false.
- *
+ *
* @return true if the connector is enabled, false otherwise
*/
public boolean isEnabled();
/**
- *
+ *
* Called once by the framework to initialize the connector.
* <p>
* Note that the shared state is not yet available at this point nor any
@@ -64,9 +64,9 @@ public interface ServerConnector extends Connector {
/**
* For internal use by the framework: returns the registered RPC
* implementations for an RPC interface identifier.
- *
+ *
* TODO interface identifier type or format may change
- *
+ *
* @param rpcInterfaceId
* RPC interface identifier: fully qualified interface type name
* @return RPC interface implementations registered for an RPC interface,
@@ -78,18 +78,19 @@ public interface ServerConnector extends Connector {
/**
* Adds a handler that is called whenever any part of the state has been
* updated by the server.
- *
+ *
* @param handler
* The handler that should be added.
* @return A handler registration reference that can be used to unregister
* the handler
*/
- public HandlerRegistration addStateChangeHandler(StateChangeHandler handler);
+ public HandlerRegistration addStateChangeHandler(
+ StateChangeHandler handler);
/**
* Removes a handler that is called whenever any part of the state has been
* updated by the server.
- *
+ *
* @param handler
* The handler that should be removed.
*/
@@ -98,7 +99,7 @@ public interface ServerConnector extends Connector {
/**
* Adds a handler that is called whenever the given part of the state has
* been updated by the server.
- *
+ *
* @param propertyName
* the name of the property for which the handler should be
* called
@@ -113,7 +114,7 @@ public interface ServerConnector extends Connector {
/**
* Removes a handler that is called whenever any part of the state has been
* updated by the server.
- *
+ *
* @param propertyName
* the name of the property for which the handler should be
* called
@@ -125,7 +126,7 @@ public interface ServerConnector extends Connector {
/**
* Sends the given event to all registered handlers.
- *
+ *
* @param event
* The event to send.
*/
@@ -139,7 +140,7 @@ public interface ServerConnector extends Connector {
/**
* Returns the parent of this connector. Can be null for only the root
* connector.
- *
+ *
* @return The parent of this connector, as set by
* {@link #setParent(ServerConnector)}.
*/
@@ -154,7 +155,7 @@ public interface ServerConnector extends Connector {
* Note that calling this method does not fire a
* {@link ConnectorHierarchyChangeEvent}. The event is fired only when the
* whole hierarchy has been updated.
- *
+ *
* @param parent
* The new parent of the connector
*/
@@ -171,7 +172,7 @@ public interface ServerConnector extends Connector {
* {@link HasComponentsConnector#setChildComponents(List)} and takes both
* extensions and child components. Both methods are called separately by
* the framework if the connector can have child components.
- *
+ *
* @param children
* The new child connectors (extensions and/or components)
*/
@@ -184,7 +185,7 @@ public interface ServerConnector extends Connector {
* Note that the method {@link HasComponentsConnector#getChildComponents()}
* can be used to obtain the subset of child connectors that correspond to
* components and not extensions.
- *
+ *
* @return A collection of child connectors (components or extensions) for
* this connector. An empty collection if there are no children.
* Never returns null.
@@ -193,12 +194,12 @@ public interface ServerConnector extends Connector {
/**
* Gets the current shared state of the connector.
- *
+ *
* Note that state is considered an internal part of the connector. You
* should not rely on the state object outside of the connector who owns it.
* If you depend on the state of other connectors you should use their
* public API instead of their state object directly.
- *
+ *
* @since 7.0.
* @return state The shared state object. Can be any sub type of
* {@link SharedState}. Never null.
@@ -208,7 +209,7 @@ public interface ServerConnector extends Connector {
/**
* Checks if an event listener has been registered on the server side for
* the given event identifier.
- *
+ *
* @param eventIdentifier
* The identifier for the event
* @return true if a listener has been registered on the server side, false
diff --git a/client/src/main/java/com/vaadin/client/SimpleTree.java b/client/src/main/java/com/vaadin/client/SimpleTree.java
index 3c63f54d5f..76d8cc6cdb 100644
--- a/client/src/main/java/com/vaadin/client/SimpleTree.java
+++ b/client/src/main/java/com/vaadin/client/SimpleTree.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -38,7 +38,7 @@ import com.google.gwt.user.client.ui.Widget;
/**
* @author Vaadin Ltd
- *
+ *
* @deprecated as of 7.1. This class was mainly used by the old debug console
* but is retained for now for backwards compatibility.
*/
@@ -81,14 +81,15 @@ public class SimpleTree extends ComplexPanel implements HasDoubleClickHandlers {
@Override
public void onClick(ClickEvent event) {
if (event.getNativeEvent().getEventTarget().cast() == handle) {
- if (children.getStyle().getDisplay().intern() == Display.NONE
- .getCssName()) {
+ if (children.getStyle().getDisplay()
+ .intern() == Display.NONE.getCssName()) {
open(event.getNativeEvent().getAltKey());
} else {
close();
}
- } else if (event.getNativeEvent().getEventTarget().cast() == text) {
+ } else if (event.getNativeEvent().getEventTarget()
+ .cast() == text) {
select(event);
}
}
@@ -146,7 +147,7 @@ public class SimpleTree extends ComplexPanel implements HasDoubleClickHandlers {
/**
* {@inheritDoc}
- *
+ *
* @deprecated As of 7.2, call and override {@link #add(Widget, Element)}
* instead.
*/
@@ -161,7 +162,7 @@ public class SimpleTree extends ComplexPanel implements HasDoubleClickHandlers {
/**
* {@inheritDoc}
- *
+ *
* @since 7.2
*/
@Override
@@ -173,20 +174,22 @@ public class SimpleTree extends ComplexPanel implements HasDoubleClickHandlers {
* {@inheritDoc} Events are not fired when double clicking child widgets.
*/
@Override
- public HandlerRegistration addDoubleClickHandler(DoubleClickHandler handler) {
+ public HandlerRegistration addDoubleClickHandler(
+ DoubleClickHandler handler) {
if (textDoubleClickHandlerManager == null) {
textDoubleClickHandlerManager = new HandlerManager(this);
addDomHandler(new DoubleClickHandler() {
@Override
public void onDoubleClick(DoubleClickEvent event) {
- if (event.getNativeEvent().getEventTarget().cast() == text) {
+ if (event.getNativeEvent().getEventTarget()
+ .cast() == text) {
textDoubleClickHandlerManager.fireEvent(event);
}
}
}, DoubleClickEvent.getType());
}
- return textDoubleClickHandlerManager.addHandler(
- DoubleClickEvent.getType(), handler);
+ return textDoubleClickHandlerManager
+ .addHandler(DoubleClickEvent.getType(), handler);
}
}
diff --git a/client/src/main/java/com/vaadin/client/StyleConstants.java b/client/src/main/java/com/vaadin/client/StyleConstants.java
index fad88f1359..fe04fc7c46 100644
--- a/client/src/main/java/com/vaadin/client/StyleConstants.java
+++ b/client/src/main/java/com/vaadin/client/StyleConstants.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/SuperDevMode.java b/client/src/main/java/com/vaadin/client/SuperDevMode.java
index f664244715..e6f9295c3c 100644
--- a/client/src/main/java/com/vaadin/client/SuperDevMode.java
+++ b/client/src/main/java/com/vaadin/client/SuperDevMode.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,10 +30,10 @@ import com.vaadin.client.ui.VNotification.HideEvent;
/**
* Class that enables SuperDevMode using a ?superdevmode parameter in the url.
- *
+ *
* @author Vaadin Ltd
* @since 7.0
- *
+ *
*/
public class SuperDevMode {
@@ -53,9 +53,8 @@ public class SuperDevMode {
private static void recompileWidgetsetAndStartInDevMode(
final String serverUrl) {
- getLogger().info(
- "Recompiling widgetset using<br/>" + serverUrl
- + "<br/>and then reloading in super dev mode");
+ getLogger().info("Recompiling widgetset using<br/>" + serverUrl
+ + "<br/>and then reloading in super dev mode");
VNotification n = new VNotification();
n.show("<b>Recompiling widgetset, please wait</b>",
VNotification.CENTERED, VNotification.STYLE_SYSTEM);
@@ -63,8 +62,9 @@ public class SuperDevMode {
JsonpRequestBuilder b = new JsonpRequestBuilder();
b.setCallbackParam("_callback");
b.setTimeout(COMPILE_TIMEOUT_IN_SECONDS * 1000);
- b.requestObject(serverUrl + "recompile/" + GWT.getModuleName() + "?"
- + getRecompileParameters(GWT.getModuleName()),
+ b.requestObject(
+ serverUrl + "recompile/" + GWT.getModuleName() + "?"
+ + getRecompileParameters(GWT.getModuleName()),
new AsyncCallback<RecompileResult>() {
@Override
@@ -77,8 +77,7 @@ public class SuperDevMode {
return;
}
- setSession(
- getSuperDevModeHookKey(),
+ setSession(getSuperDevModeHookKey(),
getSuperDevWidgetSetUrl(GWT.getModuleName(),
serverUrl));
setSession(SKIP_RECOMPILE, "1");
@@ -92,9 +91,8 @@ public class SuperDevMode {
getLogger().severe("JSONP compile call failed");
// Don't log exception as they are shown as
// notifications
- getLogger().severe(
- caught.getClass().getSimpleName() + ": "
- + caught.getMessage());
+ getLogger().severe(caught.getClass().getSimpleName()
+ + ": " + caught.getMessage());
failed();
}
@@ -127,13 +125,13 @@ public class SuperDevMode {
private native static String getRecompileParameters(String moduleName)
/*-{
var prop_map = $wnd.__gwt_activeModules[moduleName].bindings();
-
+
// convert map to URL parameter string
var props = [];
for (var key in prop_map) {
props.push(encodeURIComponent(key) + '=' + encodeURIComponent(prop_map[key]))
}
-
+
return props.join('&') + '&';
}-*/;
@@ -179,7 +177,7 @@ public class SuperDevMode {
/**
* The URL of the code server. The default URL (http://localhost:9876/) will
* be used if this is empty or null.
- *
+ *
* @param serverUrl
* The url of the code server or null to use the default
* @return true if recompile started, false if we are running in
@@ -243,7 +241,7 @@ public class SuperDevMode {
* method returns true. The application will be restarted once compilation
* is done and then this method will return false.
* </p>
- *
+ *
* @return true if a recompile operation has started and the page will be
* reloaded once it is done, false if no recompilation will be done.
*/
@@ -254,9 +252,10 @@ public class SuperDevMode {
// in super dev mode, as a result of the recompile, the enabled
// check will fail...
if (!isSuperDevModeEnabledInModule()) {
- showError("SuperDevMode is disabled for this module/widgetset.<br/>"
- + "Ensure that your module definition (.gwt.xml) does not contain <br/>"
- + "&lt;set-configuration-property name=&quot;devModeRedirectEnabled&quot; value=&quot;false&quot; /&gt;<br/>");
+ showError(
+ "SuperDevMode is disabled for this module/widgetset.<br/>"
+ + "Ensure that your module definition (.gwt.xml) does not contain <br/>"
+ + "&lt;set-configuration-property name=&quot;devModeRedirectEnabled&quot; value=&quot;false&quot; /&gt;<br/>");
return false;
}
return SuperDevMode.recompileIfNeeded(superDevModeParameter);
diff --git a/client/src/main/java/com/vaadin/client/TooltipInfo.java b/client/src/main/java/com/vaadin/client/TooltipInfo.java
index c1dd5037eb..6e3e063be2 100644
--- a/client/src/main/java/com/vaadin/client/TooltipInfo.java
+++ b/client/src/main/java/com/vaadin/client/TooltipInfo.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -71,7 +71,7 @@ public class TooltipInfo {
/**
* Checks is a message has been defined for the tooltip.
- *
+ *
* @return true if title or error message is present, false if both are
* empty
*/
@@ -82,6 +82,7 @@ public class TooltipInfo {
public boolean equals(TooltipInfo other) {
return (other != null && SharedUtil.equals(other.title, title)
- && SharedUtil.equals(other.errorMessageHtml, errorMessageHtml) && other.identifier == identifier);
+ && SharedUtil.equals(other.errorMessageHtml, errorMessageHtml)
+ && other.identifier == identifier);
}
}
diff --git a/client/src/main/java/com/vaadin/client/UIDL.java b/client/src/main/java/com/vaadin/client/UIDL.java
index 2c2a5de308..4b1bd3c401 100644
--- a/client/src/main/java/com/vaadin/client/UIDL.java
+++ b/client/src/main/java/com/vaadin/client/UIDL.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -52,7 +52,7 @@ public final class UIDL extends JavaScriptObject {
* Shorthand for getting the attribute named "id", which for Paintables is
* the essential paintableId which binds the server side component to the
* client side widget.
- *
+ *
* @return the value of the id attribute, if available
*/
public String getId() {
@@ -69,7 +69,7 @@ public final class UIDL extends JavaScriptObject {
* internally and is not needed within
* {@link ComponentConnector#updateFromUIDL(UIDL, ApplicationConnection)
* updateFromUIDL()}.
- *
+ *
* @return the name for this section
*/
public native String getTag()
@@ -94,7 +94,7 @@ public final class UIDL extends JavaScriptObject {
/**
* Gets the named attribute as a String.
- *
+ *
* @param name
* the name of the attribute to get
* @return the attribute value
@@ -105,7 +105,7 @@ public final class UIDL extends JavaScriptObject {
/**
* Gets the names of the attributes available.
- *
+ *
* @return the names of available attributes
*/
public Set<String> getAttributeNames() {
@@ -116,7 +116,7 @@ public final class UIDL extends JavaScriptObject {
/**
* Gets the names of variables available.
- *
+ *
* @return the names of available variables
*/
public Set<String> getVariableNames() {
@@ -130,7 +130,7 @@ public final class UIDL extends JavaScriptObject {
/**
* Gets the named attribute as an int.
- *
+ *
* @param name
* the name of the attribute to get
* @return the attribute value
@@ -141,7 +141,7 @@ public final class UIDL extends JavaScriptObject {
/**
* Gets the named attribute as a long.
- *
+ *
* @param name
* the name of the attribute to get
* @return the attribute value
@@ -152,7 +152,7 @@ public final class UIDL extends JavaScriptObject {
/**
* Gets the named attribute as a float.
- *
+ *
* @param name
* the name of the attribute to get
* @return the attribute value
@@ -163,7 +163,7 @@ public final class UIDL extends JavaScriptObject {
/**
* Gets the named attribute as a double.
- *
+ *
* @param name
* the name of the attribute to get
* @return the attribute value
@@ -174,7 +174,7 @@ public final class UIDL extends JavaScriptObject {
/**
* Gets the named attribute as a boolean.
- *
+ *
* @param name
* the name of the attribute to get
* @return the attribute value
@@ -185,7 +185,7 @@ public final class UIDL extends JavaScriptObject {
/**
* Gets the named attribute as a Map of named values (key/value pairs).
- *
+ *
* @param name
* the name of the attribute to get
* @return the attribute Map
@@ -196,7 +196,7 @@ public final class UIDL extends JavaScriptObject {
/**
* Gets the named attribute as an array of Strings.
- *
+ *
* @param name
* the name of the attribute to get
* @return the attribute value
@@ -207,7 +207,7 @@ public final class UIDL extends JavaScriptObject {
/**
* Gets the named attribute as an int array.
- *
+ *
* @param name
* the name of the attribute to get
* @return the attribute value
@@ -218,7 +218,7 @@ public final class UIDL extends JavaScriptObject {
/**
* Get attributes value as string whatever the type is
- *
+ *
* @param name
* @return string presentation of attribute
*/
@@ -234,7 +234,7 @@ public final class UIDL extends JavaScriptObject {
/**
* Indicates whether or not the named attribute is available.
- *
+ *
* @param name
* the name of the attribute to check
* @return true if the attribute is available, false otherwise
@@ -245,7 +245,7 @@ public final class UIDL extends JavaScriptObject {
/**
* Gets the UIDL for the child at the given index.
- *
+ *
* @param i
* the index of the child to get
* @return the UIDL of the child if it exists
@@ -257,7 +257,7 @@ public final class UIDL extends JavaScriptObject {
/**
* Gets the child at the given index as a String.
- *
+ *
* @param i
* the index of the child to get
* @return the String representation of the child if it exists
@@ -286,7 +286,7 @@ public final class UIDL extends JavaScriptObject {
* if <code>getTag()</code> returns "color", one would update the widgets
* color to reflect the value of the "color" section.
* </p>
- *
+ *
* @return an iterator for iterating over UIDL children
*/
public Iterator<Object> getChildIterator() {
@@ -314,9 +314,8 @@ public final class UIDL extends JavaScriptObject {
case CHILD_TYPE_XML:
return getChildXML(index);
default:
- throw new IllegalStateException(
- "Illegal child in tag " + getTag()
- + " at index " + index);
+ throw new IllegalStateException("Illegal child in tag "
+ + getTag() + " at index " + index);
}
}
return null;
@@ -360,7 +359,7 @@ public final class UIDL extends JavaScriptObject {
/**
* Checks if the named variable is available.
- *
+ *
* @param name
* the name of the variable desired
* @return true if the variable exists, false otherwise
@@ -371,7 +370,7 @@ public final class UIDL extends JavaScriptObject {
/**
* Gets the value of the named variable.
- *
+ *
* @param name
* the name of the variable
* @return the value of the variable
@@ -382,7 +381,7 @@ public final class UIDL extends JavaScriptObject {
/**
* Gets the value of the named variable.
- *
+ *
* @param name
* the name of the variable
* @return the value of the variable
@@ -393,7 +392,7 @@ public final class UIDL extends JavaScriptObject {
/**
* Gets the value of the named variable.
- *
+ *
* @param name
* the name of the variable
* @return the value of the variable
@@ -404,7 +403,7 @@ public final class UIDL extends JavaScriptObject {
/**
* Gets the value of the named variable.
- *
+ *
* @param name
* the name of the variable
* @return the value of the variable
@@ -415,7 +414,7 @@ public final class UIDL extends JavaScriptObject {
/**
* Gets the value of the named variable.
- *
+ *
* @param name
* the name of the variable
* @return the value of the variable
@@ -426,7 +425,7 @@ public final class UIDL extends JavaScriptObject {
/**
* Gets the value of the named variable.
- *
+ *
* @param name
* the name of the variable
* @return the value of the variable
@@ -437,7 +436,7 @@ public final class UIDL extends JavaScriptObject {
/**
* Gets the value of the named variable.
- *
+ *
* @param name
* the name of the variable
* @return the value of the variable
@@ -448,7 +447,7 @@ public final class UIDL extends JavaScriptObject {
/**
* Gets the value of the named String[] variable as a Set of Strings.
- *
+ *
* @param name
* the name of the variable
* @return the value of the variable
@@ -464,7 +463,7 @@ public final class UIDL extends JavaScriptObject {
/**
* Gets the value of the named variable.
- *
+ *
* @param name
* the name of the variable
* @return the value of the variable
@@ -500,7 +499,7 @@ public final class UIDL extends JavaScriptObject {
/**
* Returns the number of children.
- *
+ *
* @return the number of children
*/
public native int getChildCount()
@@ -515,34 +514,34 @@ public final class UIDL extends JavaScriptObject {
/**
* Gets the Paintable with the id found in the named attributes's value.
- *
+ *
* @param name
* the name of the attribute
* @return the Paintable referenced by the attribute, if it exists
*/
public ServerConnector getPaintableAttribute(String name,
ApplicationConnection connection) {
- return ConnectorMap.get(connection).getConnector(
- getStringAttribute(name));
+ return ConnectorMap.get(connection)
+ .getConnector(getStringAttribute(name));
}
/**
* Gets the Paintable with the id found in the named variable's value.
- *
+ *
* @param name
* the name of the variable
* @return the Paintable referenced by the variable, if it exists
*/
public ServerConnector getPaintableVariable(String name,
ApplicationConnection connection) {
- return ConnectorMap.get(connection).getConnector(
- getStringVariable(name));
+ return ConnectorMap.get(connection)
+ .getConnector(getStringVariable(name));
}
/**
* Returns the child UIDL by its name. If several child nodes exist with the
* given name, the first child UIDL will be returned.
- *
+ *
* @param tagName
* @return the child UIDL or null if child wit given name was not found
*/
diff --git a/client/src/main/java/com/vaadin/client/Util.java b/client/src/main/java/com/vaadin/client/Util.java
index 8b5caa6051..6eb529f6d8 100644
--- a/client/src/main/java/com/vaadin/client/Util.java
+++ b/client/src/main/java/com/vaadin/client/Util.java
@@ -52,9 +52,9 @@ public class Util {
/**
* Helper method for debugging purposes.
- *
+ *
* Stops execution on firefox browsers on a breakpoint.
- *
+ *
* @deprecated As of 7.4.0, use {@link WidgetUtil#browserDebugger()}
* instead.
*/
@@ -67,10 +67,10 @@ public class Util {
* Helper method for a bug fix #14041. For mozilla getKeyCode return 0 for
* space bar (because space is considered as char). If return 0 use
* getCharCode.
- *
+ *
* @deprecated As of 7.4.0, use {@link WidgetUtil#getKeyCode(KeyEvent)}
* instead.
- *
+ *
* @param event
* @return return key code
* @since 7.2.4
@@ -81,15 +81,15 @@ public class Util {
}
/**
- *
+ *
* Returns the topmost element of from given coordinates.
- *
+ *
* TODO fix crossplat issues clientX vs pageX. See quircksmode. Not critical
* for vaadin as we scroll div istead of page.
- *
+ *
* @deprecated As of 7.4.0, use
* {@link WidgetUtil#getElementFromPoint(int, int)} instead.
- *
+ *
* @param x
* @param y
* @return the element at given coordinates
@@ -104,18 +104,18 @@ public class Util {
* This helper method can be called if components size have been changed
* outside rendering phase. It notifies components parent about the size
* change so it can react.
- *
+ *
* When using this method, developer should consider if size changes could
* be notified lazily. If lazy flag is true, method will save widget and
* wait for a moment until it notifies parents in chunks. This may vastly
* optimize layout in various situation. Example: if component have a lot of
* images their onload events may fire "layout phase" many times in a short
* period.
- *
+ *
* @param widget
* @param lazy
* run componentSizeUpdated lazyly
- *
+ *
* @deprecated As of 7.0, use
* {@link LayoutManager#setNeedsMeasure(ComponentConnector)}
* instead
@@ -159,10 +159,10 @@ public class Util {
/**
* Converts html entities to text.
- *
+ *
* @deprecated As of 7.4.0, use {@link WidgetUtil#escapeHTML(String)}
* instead.
- *
+ *
* @param html
* @return escaped string presentation of given html
*/
@@ -173,10 +173,10 @@ public class Util {
/**
* Escapes the string so it is safe to write inside an HTML attribute.
- *
+ *
* @deprecated As of 7.4.0, use {@link WidgetUtil#escapeAttribute(String)}
* instead.
- *
+ *
* @param attribute
* The string to escape
* @return An escaped version of <literal>attribute</literal>.
@@ -188,12 +188,12 @@ public class Util {
/**
* Clones given element as in JavaScript.
- *
+ *
* Deprecate this if there appears similar method into GWT someday.
- *
+ *
* @deprecated As of 7.4.0, use
* {@link WidgetUtil#cloneNode(Element, boolean)} instead.
- *
+ *
* @param element
* @param deep
* clone child tree also
@@ -225,8 +225,8 @@ public class Util {
@Deprecated
public static int measureVerticalPaddingAndBorder(Element element,
int paddingGuess) {
- return WidgetUtil
- .measureVerticalPaddingAndBorder(element, paddingGuess);
+ return WidgetUtil.measureVerticalPaddingAndBorder(element,
+ paddingGuess);
}
/**
@@ -341,11 +341,11 @@ public class Util {
/**
* Defers the execution of {@link #runWebkitOverflowAutoFix(Element)}
- *
+ *
* @deprecated As of 7.4.0, use
* {@link WidgetUtil#runWebkitOverflowAutoFixDeferred(Element)}
* instead.
- *
+ *
* @since 7.2.6
* @param elem
* with overflow auto
@@ -357,12 +357,12 @@ public class Util {
/**
* Run workaround for webkits overflow auto issue.
- *
+ *
* See: our bug #2138 and https://bugs.webkit.org/show_bug.cgi?id=21462
- *
+ *
* @deprecated As of 7.4.0, use
* {@link WidgetUtil#runWebkitOverflowAutoFix(Element)} instead.
- *
+ *
* @param elem
* with overflow auto
*/
@@ -376,7 +376,7 @@ public class Util {
* dimension is not specified as relative it will return -1. If the shared
* state does not contain width or height specifications this will return
* null.
- *
+ *
* @param state
* @return
*/
@@ -411,7 +411,7 @@ public class Util {
* Checks if a and b are equals using {@link #equals(Object)}. Handles null
* values as well. Does not ensure that objects are of the same type.
* Assumes that the first object's equals method handle equals properly.
- *
+ *
* @param a
* The first value to compare
* @param b
@@ -432,26 +432,27 @@ public class Util {
/**
* Gets the border-box width for the given element, i.e. element width +
* border + padding. Always rounds up to nearest integer.
- *
+ *
* @deprecated As of 7.4.0, use {@link WidgetUtil#getRequiredWidth(Element)}
* instead.
- *
+ *
* @param element
* The element to check
* @return The border-box width for the element
*/
@Deprecated
- public static int getRequiredWidth(com.google.gwt.dom.client.Element element) {
+ public static int getRequiredWidth(
+ com.google.gwt.dom.client.Element element) {
return WidgetUtil.getRequiredWidth(element);
}
/**
* Gets the border-box height for the given element, i.e. element height +
* border + padding. Always rounds up to nearest integer.
- *
+ *
* @deprecated As of 7.4.0, use
* {@link WidgetUtil#getRequiredHeight(Element)} instead.
- *
+ *
* @param element
* The element to check
* @return The border-box height for the element
@@ -526,16 +527,17 @@ public class Util {
/**
* Detects what is currently the overflow style attribute in given element.
- *
+ *
* @deprecated As of 7.4.0, use
* {@link WidgetUtil#mayHaveScrollBars(Element)} instead.
- *
+ *
* @param pe
* the element to detect
* @return true if auto or scroll
*/
@Deprecated
- public static boolean mayHaveScrollBars(com.google.gwt.dom.client.Element pe) {
+ public static boolean mayHaveScrollBars(
+ com.google.gwt.dom.client.Element pe) {
return WidgetUtil.mayHaveScrollBars(pe);
}
@@ -545,9 +547,9 @@ public class Util {
* also returned if "element" is part of its caption. If
* <literal>element</literal> is not part of any child component, null is
* returned.
- *
+ *
* This method returns the deepest nested VPaintableWidget.
- *
+ *
* @param client
* A reference to ApplicationConnection
* @param parent
@@ -596,8 +598,9 @@ public class Util {
VOverlay overlay = findWidget(element, VOverlay.class);
if (overlay != null && overlay.getOwner() != null) {
- return getConnectorForElement(client, client.getUIConnector()
- .getWidget(), overlay.getOwner().getElement());
+ return getConnectorForElement(client,
+ client.getUIConnector().getWidget(),
+ overlay.getOwner().getElement());
} else {
return null;
}
@@ -605,9 +608,9 @@ public class Util {
/**
* Will (attempt) to focus the given DOM Element.
- *
+ *
* @deprecated As of 7.4.0, use {@link WidgetUtil#focus(Element)} instead.
- *
+ *
* @param el
* the element to focus
*/
@@ -619,12 +622,12 @@ public class Util {
/**
* Helper method to find the nearest parent paintable instance by traversing
* the DOM upwards from given element.
- *
+ *
* @param element
* the element to start from
*/
- public static ComponentConnector findPaintable(
- ApplicationConnection client, Element element) {
+ public static ComponentConnector findPaintable(ApplicationConnection client,
+ Element element) {
Widget widget = Util.findWidget(element, null);
ConnectorMap vPaintableMap = ConnectorMap.get(client);
while (widget != null && !vPaintableMap.isConnector(widget)) {
@@ -637,10 +640,10 @@ public class Util {
/**
* Helper method to find first instance of given Widget type found by
* traversing DOM upwards from given element.
- *
+ *
* @deprecated As of 7.4.0, use
* {@link WidgetUtil#findWidget(Element, Class)} instead.
- *
+ *
* @param element
* the element where to start seeking of Widget
* @param class1
@@ -654,10 +657,10 @@ public class Util {
/**
* Force webkit to redraw an element
- *
+ *
* @deprecated As of 7.4.0, use
* {@link WidgetUtil#forceWebkitRedraw(Element)} instead.
- *
+ *
* @param element
* The element that should be redrawn
*/
@@ -670,10 +673,10 @@ public class Util {
* Performs a hack to trigger a re-layout in the IE8. This is usually
* necessary in cases where IE8 "forgets" to update child elements when they
* resize.
- *
+ *
* @deprecated As of 7.4.0, use {@link WidgetUtil#forceIE8Redraw(Element)}
* instead.
- *
+ *
* @param e
* The element to perform the hack on
*/
@@ -686,10 +689,10 @@ public class Util {
* Performs a hack to trigger a re-layout in the IE browser. This is usually
* necessary in cases where IE "forgets" to update child elements when they
* resize.
- *
+ *
* @deprecated As of 7.4.0, use {@link WidgetUtil#forceIERedraw(Element)}
* instead.
- *
+ *
* @since 7.3
* @param e
* The element to perform the hack on
@@ -702,12 +705,12 @@ public class Util {
/**
* Detaches and re-attaches the element from its parent. The element is
* reattached at the same position in the DOM as it was before.
- *
+ *
* Does nothing if the element is not attached to the DOM.
- *
+ *
* @deprecated As of 7.4.0, use {@link WidgetUtil#detachAttach(Element)}
* instead.
- *
+ *
* @param element
* The element to detach and re-attach
*/
@@ -727,10 +730,10 @@ public class Util {
/**
* Returns the index of the childElement within its parent.
- *
+ *
* @deprecated As of 7.4.0, use
* {@link WidgetUtil#getChildElementIndex(Element)} instead.
- *
+ *
* @param subElement
* @return
*/
@@ -746,9 +749,8 @@ public class Util {
if (connector != null) {
getLogger().info("\t" + id + " (" + connector.getClass() + ") :");
} else {
- getLogger().warning(
- "\t" + id + ": Warning: no corresponding connector for id "
- + id);
+ getLogger().warning("\t" + id
+ + ": Warning: no corresponding connector for id " + id);
}
for (MethodInvocation invocation : invocations) {
getLogger().info("\t\t" + getInvocationDebugString(invocation));
@@ -758,27 +760,29 @@ public class Util {
/**
* Produces a string representation of a method invocation, suitable for
* debug output
- *
+ *
* @since 7.5
* @param invocation
* @return
*/
- private static String getInvocationDebugString(MethodInvocation invocation) {
+ private static String getInvocationDebugString(
+ MethodInvocation invocation) {
Object[] parameters = invocation.getParameters();
String formattedParams = null;
- if (ApplicationConstants.UPDATE_VARIABLE_METHOD.equals(invocation
- .getMethodName()) && parameters.length == 2) {
+ if (ApplicationConstants.UPDATE_VARIABLE_METHOD
+ .equals(invocation.getMethodName()) && parameters.length == 2) {
// name, value
Object value = parameters[1];
// TODO paintables inside lists/maps get rendered as
// components in the debug console
- String formattedValue = value instanceof ServerConnector ? ((ServerConnector) value)
- .getConnectorId() : String.valueOf(value);
+ String formattedValue = value instanceof ServerConnector
+ ? ((ServerConnector) value).getConnectorId()
+ : String.valueOf(value);
formattedParams = parameters[0] + " : " + formattedValue;
}
if (null == formattedParams) {
- formattedParams = (null != parameters) ? Arrays
- .toString(parameters) : null;
+ formattedParams = (null != parameters) ? Arrays.toString(parameters)
+ : null;
}
return invocation.getInterfaceName() + "." + invocation.getMethodName()
+ "(" + formattedParams + ")";
@@ -806,8 +810,8 @@ public class Util {
printConnectorInvocations(invocations, curId, c);
}
} catch (Exception e) {
- getLogger()
- .log(Level.SEVERE, "Error logging method invocations", e);
+ getLogger().log(Level.SEVERE, "Error logging method invocations",
+ e);
}
}
@@ -815,11 +819,11 @@ public class Util {
* Temporarily sets the {@code styleProperty} to {@code tempValue} and then
* resets it to its current value. Used mainly to work around rendering
* issues in IE (and possibly in other browsers)
- *
+ *
* @deprecated As of 7.4.0, use
* {@link WidgetUtil#setStyleTemporarily(Element, String, String)}
* instead.
- *
+ *
* @param element
* The target element
* @param styleProperty
@@ -837,10 +841,10 @@ public class Util {
* A helper method to return the client position from an event. Returns
* position from either first changed touch (if touch event) or from the
* event itself.
- *
+ *
* @deprecated As of 7.4.0, use
* {@link WidgetUtil#getTouchOrMouseClientX(Event)} instead.
- *
+ *
* @param event
* @return
*/
@@ -853,10 +857,10 @@ public class Util {
* Find the element corresponding to the coordinates in the passed mouse
* event. Please note that this is not always the same as the target of the
* event e.g. if event capture is used.
- *
+ *
* @deprecated As of 7.4.0, use
* {@link WidgetUtil#getElementUnderMouse(NativeEvent)} instead.
- *
+ *
* @param event
* the mouse event to get coordinates from
* @return the element at the coordinates of the event
@@ -871,10 +875,10 @@ public class Util {
* A helper method to return the client position from an event. Returns
* position from either first changed touch (if touch event) or from the
* event itself.
- *
+ *
* @deprecated As of 7.4.0, use
* {@link WidgetUtil#getTouchOrMouseClientY(Event)} instead.
- *
+ *
* @param event
* @return
*/
@@ -887,7 +891,7 @@ public class Util {
* @deprecated As of 7.4.0, use
* {@link WidgetUtil#getTouchOrMouseClientY(NativeEvent)}
* instead.
- *
+ *
* @see #getTouchOrMouseClientY(Event)
* @param currentGwtEvent
* @return
@@ -901,9 +905,9 @@ public class Util {
* @deprecated As of 7.4.0, use
* {@link WidgetUtil#getTouchOrMouseClientX(NativeEvent)}
* instead.
- *
+ *
* @see #getTouchOrMouseClientX(Event)
- *
+ *
* @param event
* @return
*/
@@ -943,10 +947,10 @@ public class Util {
/**
* Gets the currently focused element.
- *
+ *
* @deprecated As of 7.4.0, use {@link WidgetUtil#getFocusedElement()}
* instead.
- *
+ *
* @return The active element or null if no active element could be found.
*/
@Deprecated
@@ -956,7 +960,7 @@ public class Util {
/**
* Gets the currently focused element for Internet Explorer.
- *
+ *
* @return The currently focused element
* @deprecated Use #getFocusedElement instead
*/
@@ -967,12 +971,12 @@ public class Util {
/**
* Gets currently focused element and checks if it's editable
- *
+ *
* @deprecated As of 7.4.0, use
* {@link WidgetUtil#isFocusedElementEditable()} instead.
- *
+ *
* @since 7.4
- *
+ *
* @return true if focused element is editable
*/
@Deprecated
@@ -985,10 +989,10 @@ public class Util {
* this method checks that this widget nor any of its parents is hidden. Can
* be e.g used to check whether component should react to some events or
* not.
- *
+ *
* @deprecated As of 7.4.0, use
* {@link WidgetUtil#isAttachedAndDisplayed(Widget)} instead.
- *
+ *
* @param widget
* @return true if attached and displayed
*/
@@ -1000,10 +1004,10 @@ public class Util {
/**
* Scrolls an element into view vertically only. Modified version of
* Element.scrollIntoView.
- *
+ *
* @deprecated As of 7.4.0, use
* {@link WidgetUtil#scrollIntoViewVertically(Element)} instead.
- *
+ *
* @param elem
* The element to scroll into view
*/
@@ -1015,11 +1019,11 @@ public class Util {
/**
* Checks if the given event is either a touch event or caused by the left
* mouse button
- *
+ *
* @deprecated As of 7.4.0, use
* {@link WidgetUtil#isTouchEventOrLeftMouseButton(Event)}
* instead.
- *
+ *
* @param event
* @return true if the event is a touch event or caused by the left mouse
* button, false otherwise
@@ -1031,7 +1035,7 @@ public class Util {
/**
* Performs a shallow comparison of the collections.
- *
+ *
* @param collection1
* The first collection
* @param collection2
@@ -1076,10 +1080,10 @@ public class Util {
/**
* Resolve a relative URL to an absolute URL based on the current document's
* location.
- *
+ *
* @deprecated As of 7.4.0, use {@link WidgetUtil#getAbsoluteUrl(String)}
* instead.
- *
+ *
* @param url
* a string with the relative URL to resolve
* @return the corresponding absolute URL as a string
@@ -1091,16 +1095,16 @@ public class Util {
/**
* Sets the selection range of an input element.
- *
+ *
* We need this JSNI function to set selection range so that we can use the
* optional direction attribute to set the anchor to the end and the focus
* to the start. This makes Firefox work the same way as other browsers
* (#13477)
- *
+ *
* @deprecated As of 7.4.0, use
* {@link WidgetUtil#setSelectionRange(Element, int, int, String)}
* instead.
- *
+ *
* @param elem
* the html input element.
* @param pos
@@ -1111,7 +1115,7 @@ public class Util {
* a string indicating the direction in which the selection was
* performed. This may be "forward" or "backward", or "none" if
* the direction is unknown or irrelevant.
- *
+ *
* @since 7.3
*/
@Deprecated
@@ -1124,7 +1128,7 @@ public class Util {
* Converts a native {@link JavaScriptObject} into a {@link JsonValue}. This
* is a no-op in GWT code compiled to javascript, but needs some special
* handling to work when run in JVM.
- *
+ *
* @param jso
* the java script object to represent as json
* @return the json representation
@@ -1141,7 +1145,7 @@ public class Util {
* Converts a {@link JsonValue} into a native {@link JavaScriptObject}. This
* is a no-op in GWT code compiled to javascript, but needs some special
* handling to work when run in JVM.
- *
+ *
* @param jsonValue
* the json value
* @return a native javascript object representation of the json value
@@ -1156,7 +1160,7 @@ public class Util {
/**
* Convert a {@link JavaScriptObject} into a string representation.
- *
+ *
* @param json
* a JavaScript object to be converted to a string
* @return JSON in string representation
@@ -1168,7 +1172,7 @@ public class Util {
/**
* Parse a string containing JSON into a {@link JavaScriptObject}.
- *
+ *
* @param <T>
* the overlay type to expect from the parse
* @param jsonAsString
@@ -1182,7 +1186,7 @@ public class Util {
/**
* Round {@code num} up to {@code exp} decimal positions.
- *
+ *
* @since 7.6
*/
public static native double round(double num, int exp)
@@ -1222,7 +1226,7 @@ public class Util {
* appropriate mode set.
*
* This version of the method tries to recursively locate such a parent.
- *
+ *
* For internal use only. May be removed or replaced in the future.
*/
public static boolean shouldSkipMeasurementOfConnector(
@@ -1230,7 +1234,8 @@ public class Util {
Profiler.enter("skipMeasureDueLayoutHint");
boolean skip = false;
- HasChildMeasurementHintConnector parent = getPossibleChildMeasurementHintParentConnector(candidate);
+ HasChildMeasurementHintConnector parent = getPossibleChildMeasurementHintParentConnector(
+ candidate);
if (parent != null) {
ChildMeasurementHint measureMode = parent.getChildMeasurementHint();
diff --git a/client/src/main/java/com/vaadin/client/VCaption.java b/client/src/main/java/com/vaadin/client/VCaption.java
index ace4fd7184..1d79bd57cc 100644
--- a/client/src/main/java/com/vaadin/client/VCaption.java
+++ b/client/src/main/java/com/vaadin/client/VCaption.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -67,9 +67,9 @@ public class VCaption extends HTML {
/**
* Creates a caption that is not linked to a {@link ComponentConnector}.
- *
+ *
* When using this constructor, {@link #getOwner()} returns null.
- *
+ *
* @param client
* ApplicationConnection
* @deprecated all captions should be associated with a paintable widget and
@@ -88,13 +88,14 @@ public class VCaption extends HTML {
/**
* Creates a caption for a {@link ComponentConnector}.
- *
+ *
* @param component
* owner of caption, not null
* @param client
* ApplicationConnection
*/
- public VCaption(ComponentConnector component, ApplicationConnection client) {
+ public VCaption(ComponentConnector component,
+ ApplicationConnection client) {
super();
this.client = client;
owner = component;
@@ -129,10 +130,10 @@ public class VCaption extends HTML {
/**
* Updates the caption from UIDL.
- *
+ *
* This method may only be called when the caption has an owner - otherwise,
* use {@link #updateCaptionWithoutOwner(UIDL, String, boolean, boolean)}.
- *
+ *
* @return true if the position where the caption should be placed has
* changed
*/
@@ -172,8 +173,8 @@ public class VCaption extends HTML {
icon = null;
}
if (hasIcon) {
- String uri = owner.getState().resources.get(
- ComponentConstants.ICON_RESOURCE).getURL();
+ String uri = owner.getState().resources
+ .get(ComponentConstants.ICON_RESOURCE).getURL();
icon = client.getIcon(uri);
@@ -247,8 +248,8 @@ public class VCaption extends HTML {
getInsertPosition(InsertPosition.REQUIRED));
// Hide the required indicator from assistive device
- Roles.getTextboxRole().setAriaHiddenState(
- requiredFieldIndicator, true);
+ Roles.getTextboxRole()
+ .setAriaHiddenState(requiredFieldIndicator, true);
}
} else if (requiredFieldIndicator != null) {
// Remove existing
@@ -269,8 +270,8 @@ public class VCaption extends HTML {
getInsertPosition(InsertPosition.ERROR));
// Hide error indicator from assistive devices
- Roles.getTextboxRole().setAriaHiddenState(
- errorIndicatorElement, true);
+ Roles.getTextboxRole().setAriaHiddenState(errorIndicatorElement,
+ true);
}
} else if (errorIndicatorElement != null) {
// Remove existing
@@ -447,9 +448,8 @@ public class VCaption extends HTML {
if (owner != null) {
Util.notifyParentOfSizeChange(owner.getWidget(), true);
} else {
- getLogger()
- .warning(
- "Warning: Icon load event was not propagated because VCaption owner is unknown.");
+ getLogger().warning(
+ "Warning: Icon load event was not propagated because VCaption owner is unknown.");
}
}
}
@@ -477,7 +477,7 @@ public class VCaption extends HTML {
/**
* Checks whether anything in a given state change might cause the caption
* to change.
- *
+ *
* @param event
* the state change event to check
* @return <code>true</code> if the caption might have changed; otherwise
@@ -499,7 +499,7 @@ public class VCaption extends HTML {
/**
* Returns Paintable for which this Caption belongs to.
- *
+ *
* @return owner Widget
*/
public ComponentConnector getOwner() {
@@ -637,13 +637,13 @@ public class VCaption extends HTML {
}
if (icon != null) {
- int iconRequiredWidth = WidgetUtil.getRequiredWidth(icon
- .getElement());
+ int iconRequiredWidth = WidgetUtil
+ .getRequiredWidth(icon.getElement());
if (availableWidth > iconRequiredWidth) {
availableWidth -= iconRequiredWidth;
} else {
- icon.getElement().getStyle()
- .setWidth(availableWidth, Unit.PX);
+ icon.getElement().getStyle().setWidth(availableWidth,
+ Unit.PX);
availableWidth = 0;
}
}
@@ -664,7 +664,7 @@ public class VCaption extends HTML {
/**
* Sets the tooltip that should be shown for the caption
- *
+ *
* @param tooltipInfo
* The tooltip that should be shown or null if no tooltip should
* be shown
@@ -675,7 +675,7 @@ public class VCaption extends HTML {
/**
* Returns the tooltip that should be shown for the caption
- *
+ *
* @return The tooltip to show or null if no tooltip should be shown
*/
public TooltipInfo getTooltipInfo() {
@@ -704,7 +704,7 @@ public class VCaption extends HTML {
* Sets whether the caption is rendered as HTML.
* <p>
* Default is false
- *
+ *
* @param captionAsHtml
* true if the captions are rendered as HTML, false if rendered
* as plain text
@@ -717,7 +717,7 @@ public class VCaption extends HTML {
* Checks whether captions are rendered as HTML.
* <p>
* Default is false
- *
+ *
* @return true if the captions are rendered as HTML, false if rendered as
* plain text
*/
@@ -731,7 +731,7 @@ public class VCaption extends HTML {
* <p>
* Uses {@link AbstractComponentState#captionAsHtml} to determine whether to
* set the caption as html or plain text
- *
+ *
* @since 7.4
* @param captionElement
* the target element
@@ -753,7 +753,7 @@ public class VCaption extends HTML {
* <p>
* Uses {@link AbstractComponentState#captionAsHtml} to determine whether to
* set the caption as html or plain text
- *
+ *
* @since 7.4
* @param widget
* the target widget
diff --git a/client/src/main/java/com/vaadin/client/VCaptionWrapper.java b/client/src/main/java/com/vaadin/client/VCaptionWrapper.java
index 382126f409..b9d2edc538 100644
--- a/client/src/main/java/com/vaadin/client/VCaptionWrapper.java
+++ b/client/src/main/java/com/vaadin/client/VCaptionWrapper.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ public class VCaptionWrapper extends FlowPanel {
/**
* Creates a new caption wrapper panel.
- *
+ *
* @param toBeWrapped
* paintable that the caption is associated with, not null
* @param client
diff --git a/client/src/main/java/com/vaadin/client/VConsole.java b/client/src/main/java/com/vaadin/client/VConsole.java
index c01711c5b3..ababfc2121 100644
--- a/client/src/main/java/com/vaadin/client/VConsole.java
+++ b/client/src/main/java/com/vaadin/client/VConsole.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.client.debug.internal.VDebugWindow;
/**
* A helper class to do some client side logging.
- *
+ *
* @deprecated as of 7.1, use {@link Logger} from java.util.logging instead.
*/
@Deprecated
@@ -32,7 +32,7 @@ public class VConsole {
/**
* Used by ApplicationConfiguration to initialize VConsole.
- *
+ *
* @param console
*/
static void setImplementation(VDebugWindow console) {
diff --git a/client/src/main/java/com/vaadin/client/VErrorMessage.java b/client/src/main/java/com/vaadin/client/VErrorMessage.java
index 271c7b1be8..fa7fe1a51a 100644
--- a/client/src/main/java/com/vaadin/client/VErrorMessage.java
+++ b/client/src/main/java/com/vaadin/client/VErrorMessage.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -38,7 +38,7 @@ public class VErrorMessage extends FlowPanel {
* The owner must be set if the {@link VErrorMessage} is created
* 'stand-alone' (not within a {@link VOverlay}), or theming might not work
* properly.
- *
+ *
* @see VOverlay#setOwner(Widget)
* @param owner
* the owner (creator Widget)
@@ -59,7 +59,7 @@ public class VErrorMessage extends FlowPanel {
/**
* Shows this error message next to given element.
- *
+ *
* @param indicatorElement
* @deprecated As of 7.2, call and override {@link #showAt(Element)} instead
*/
@@ -73,12 +73,10 @@ public class VErrorMessage extends FlowPanel {
}
errorContainer.setPopupPosition(
DOM.getAbsoluteLeft(indicatorElement)
- + 2
- * DOM.getElementPropertyInt(indicatorElement,
+ + 2 * DOM.getElementPropertyInt(indicatorElement,
"offsetHeight"),
DOM.getAbsoluteTop(indicatorElement)
- + 2
- * DOM.getElementPropertyInt(indicatorElement,
+ + 2 * DOM.getElementPropertyInt(indicatorElement,
"offsetHeight"));
errorContainer.show();
@@ -86,9 +84,9 @@ public class VErrorMessage extends FlowPanel {
/**
* Shows this error message next to given element.
- *
+ *
* @param indicatorElement
- *
+ *
* @since 7.2
*/
public void showAt(Element indicatorElement) {
diff --git a/client/src/main/java/com/vaadin/client/VLoadingIndicator.java b/client/src/main/java/com/vaadin/client/VLoadingIndicator.java
index 7c7edeb04f..0ba0edd984 100644
--- a/client/src/main/java/com/vaadin/client/VLoadingIndicator.java
+++ b/client/src/main/java/com/vaadin/client/VLoadingIndicator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import com.google.gwt.user.client.Timer;
* {@link #trigger()} is called the indicator moves to its "triggered" state and
* then transitions from one state to the next when the timeouts specified using
* the set*StateDelay methods occur.
- *
+ *
* @author Vaadin Ltd
* @since 7.1
*/
@@ -72,7 +72,7 @@ public class VLoadingIndicator {
/**
* Returns the delay (in ms) which must pass before the loading indicator
* moves into the "first" state and is shown to the user
- *
+ *
* @return The delay (in ms) until moving into the "first" state. Counted
* from when {@link #trigger()} is called.
*/
@@ -83,7 +83,7 @@ public class VLoadingIndicator {
/**
* Sets the delay (in ms) which must pass before the loading indicator moves
* into the "first" state and is shown to the user
- *
+ *
* @param firstDelay
* The delay (in ms) until moving into the "first" state. Counted
* from when {@link #trigger()} is called.
@@ -95,7 +95,7 @@ public class VLoadingIndicator {
/**
* Returns the delay (in ms) which must pass before the loading indicator
* moves to its "second" state.
- *
+ *
* @return The delay (in ms) until the loading indicator moves into its
* "second" state. Counted from when {@link #trigger()} is called.
*/
@@ -106,7 +106,7 @@ public class VLoadingIndicator {
/**
* Sets the delay (in ms) which must pass before the loading indicator moves
* to its "second" state.
- *
+ *
* @param secondDelay
* The delay (in ms) until the loading indicator moves into its
* "second" state. Counted from when {@link #trigger()} is
@@ -119,7 +119,7 @@ public class VLoadingIndicator {
/**
* Returns the delay (in ms) which must pass before the loading indicator
* moves to its "third" state.
- *
+ *
* @return The delay (in ms) until the loading indicator moves into its
* "third" state. Counted from when {@link #trigger()} is called.
*/
@@ -130,7 +130,7 @@ public class VLoadingIndicator {
/**
* Sets the delay (in ms) which must pass before the loading indicator moves
* to its "third" state.
- *
+ *
* @param thirdDelay
* The delay (in ms) from the event until changing the loading
* indicator into its "third" state. Counted from when
@@ -156,7 +156,7 @@ public class VLoadingIndicator {
/**
* Triggers displaying of this loading indicator unless it's already visible
* or scheduled to be shown after a delay.
- *
+ *
* @since 7.4
*/
public void ensureTriggered() {
@@ -191,7 +191,7 @@ public class VLoadingIndicator {
/**
* Returns the {@link ApplicationConnection} which uses this loading
* indicator
- *
+ *
* @return The ApplicationConnection for this loading indicator
*/
public ApplicationConnection getConnection() {
@@ -201,7 +201,7 @@ public class VLoadingIndicator {
/**
* Sets the {@link ApplicationConnection} which uses this loading indicator.
* Only used internally.
- *
+ *
* @param connection
* The ApplicationConnection for this loading indicator
*/
@@ -223,7 +223,7 @@ public class VLoadingIndicator {
/**
* Returns whether or not the loading indicator is showing.
- *
+ *
* @return true if the loading indicator is visible, false otherwise
*/
public boolean isVisible() {
@@ -237,7 +237,7 @@ public class VLoadingIndicator {
/**
* Returns the root element of the loading indicator
- *
+ *
* @return The loading indicator DOM element
*/
public com.google.gwt.user.client.Element getElement() {
diff --git a/client/src/main/java/com/vaadin/client/VSchedulerImpl.java b/client/src/main/java/com/vaadin/client/VSchedulerImpl.java
index 2c0657eb59..68078b4de7 100644
--- a/client/src/main/java/com/vaadin/client/VSchedulerImpl.java
+++ b/client/src/main/java/com/vaadin/client/VSchedulerImpl.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/VTooltip.java b/client/src/main/java/com/vaadin/client/VTooltip.java
index 39d0682821..09d3ab5d65 100644
--- a/client/src/main/java/com/vaadin/client/VTooltip.java
+++ b/client/src/main/java/com/vaadin/client/VTooltip.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -48,9 +48,8 @@ import com.vaadin.client.ui.VOverlay;
public class VTooltip extends VOverlay {
private static final String CLASSNAME = "v-tooltip";
private static final int MARGIN = 4;
- public static final int TOOLTIP_EVENTS = Event.ONKEYDOWN
- | Event.ONMOUSEOVER | Event.ONMOUSEOUT | Event.ONMOUSEMOVE
- | Event.ONCLICK;
+ public static final int TOOLTIP_EVENTS = Event.ONKEYDOWN | Event.ONMOUSEOVER
+ | Event.ONMOUSEOUT | Event.ONMOUSEMOVE | Event.ONCLICK;
VErrorMessage em = new VErrorMessage();
Element description = DOM.createDiv();
@@ -80,7 +79,7 @@ public class VTooltip extends VOverlay {
* Used to show tooltips; usually used via the singleton in
* {@link ApplicationConnection}. NOTE that #setOwner(Widget)} should be
* called after instantiating.
- *
+ *
* @see ApplicationConnection#getVTooltip()
*/
public VTooltip() {
@@ -108,7 +107,7 @@ public class VTooltip extends VOverlay {
/**
* Show the tooltip with the provided info for assistive devices.
- *
+ *
* @param info
* with the content of the tooltip
*/
@@ -120,7 +119,7 @@ public class VTooltip extends VOverlay {
/**
* Initialize the tooltip overlay for assistive devices.
- *
+ *
* @param info
* with the content of the tooltip
* @since 7.2.4
@@ -134,7 +133,8 @@ public class VTooltip extends VOverlay {
}
private void setTooltipText(TooltipInfo info) {
- if (info.getErrorMessage() != null && !info.getErrorMessage().isEmpty()) {
+ if (info.getErrorMessage() != null
+ && !info.getErrorMessage().isEmpty()) {
em.setVisible(true);
em.updateMessage(info.getErrorMessage());
} else {
@@ -147,12 +147,12 @@ public class VTooltip extends VOverlay {
* element we need to clear style width of its parent DIV from old
* value (in some strange cases this width=[tooltip MAX_WIDTH] after
* tooltip text has been already updated to new shortly value:
- *
+ *
* <div class="popupContent"> <div style="width:500px;"> <div
* class="v-errormessage" aria-hidden="true" style="display: none;">
* <div class="gwt-HTML"> </div> </div> <div
* class="v-tooltip-text">This is a short tooltip</div> </div>
- *
+ *
* and it leads to error during calculation offsetWidth (it is
* native GWT method getSubPixelOffsetWidth()) of description
* element")
@@ -168,7 +168,7 @@ public class VTooltip extends VOverlay {
/**
* Show a popup containing the currentTooltipInfo
- *
+ *
*/
private void showTooltip() {
if (currentTooltipInfo.hasMessage()) {
@@ -212,7 +212,7 @@ public class VTooltip extends VOverlay {
* Return the final X-coordinate of the tooltip based on cursor
* position, size of the tooltip, size of the page and necessary
* margins.
- *
+ *
* @param offsetWidth
* @return The final X-coordinate
*/
@@ -227,8 +227,9 @@ public class VTooltip extends VOverlay {
x = tooltipEventMouseX + Window.getScrollLeft() - 10
- offsetWidth;
}
- if (x + offsetWidth + MARGIN - Window.getScrollLeft() > Window
- .getClientWidth()) {
+ if (x + offsetWidth + MARGIN
+ - Window.getScrollLeft() > Window
+ .getClientWidth()) {
x = Window.getClientWidth() - offsetWidth - MARGIN
+ Window.getScrollLeft();
}
@@ -254,8 +255,9 @@ public class VTooltip extends VOverlay {
private int getFinalTouchX(int offsetWidth) {
int x = 0;
int widthNeeded = 10 + offsetWidth;
- int roomLeft = currentElement != null ? currentElement
- .getAbsoluteLeft() : EVENT_XY_POSITION_OUTSIDE;
+ int roomLeft = currentElement != null
+ ? currentElement.getAbsoluteLeft()
+ : EVENT_XY_POSITION_OUTSIDE;
int viewPortWidth = Window.getClientWidth();
int roomRight = viewPortWidth - roomLeft;
if (roomRight > widthNeeded) {
@@ -263,7 +265,8 @@ public class VTooltip extends VOverlay {
} else {
x = roomLeft - offsetWidth;
}
- if (x + offsetWidth - Window.getScrollLeft() > viewPortWidth) {
+ if (x + offsetWidth
+ - Window.getScrollLeft() > viewPortWidth) {
x = viewPortWidth - offsetWidth
+ Window.getScrollLeft();
}
@@ -282,10 +285,10 @@ public class VTooltip extends VOverlay {
* Return the final Y-coordinate of the tooltip based on cursor
* position, size of the tooltip, size of the page and necessary
* margins.
- *
+ *
* @param offsetHeight
* @return The final y-coordinate
- *
+ *
*/
private int getFinalY(int offsetHeight) {
int y = 0;
@@ -300,8 +303,9 @@ public class VTooltip extends VOverlay {
- offsetHeight;
}
- if (y + offsetHeight + MARGIN - Window.getScrollTop() > Window
- .getClientHeight()) {
+ if (y + offsetHeight + MARGIN
+ - Window.getScrollTop() > Window
+ .getClientHeight()) {
y = tooltipEventMouseY - 5 - offsetHeight
+ Window.getScrollTop();
if (y - Window.getScrollTop() < 0) {
@@ -333,19 +337,17 @@ public class VTooltip extends VOverlay {
private int getFinalTouchY(int offsetHeight) {
int y = 0;
int heightNeeded = 10 + offsetHeight;
- int roomAbove = currentElement != null ? currentElement
- .getAbsoluteTop()
- + currentElement.getOffsetHeight()
+ int roomAbove = currentElement != null
+ ? currentElement.getAbsoluteTop()
+ + currentElement.getOffsetHeight()
: EVENT_XY_POSITION_OUTSIDE;
int roomBelow = Window.getClientHeight() - roomAbove;
if (roomBelow > heightNeeded) {
y = roomAbove;
} else {
- y = roomAbove
- - offsetHeight
- - (currentElement != null ? currentElement
- .getOffsetHeight() : 0);
+ y = roomAbove - offsetHeight - (currentElement != null
+ ? currentElement.getOffsetHeight() : 0);
}
if (y + offsetHeight - Window.getScrollTop() > Window
@@ -379,7 +381,7 @@ public class VTooltip extends VOverlay {
* and attached to the DOM well in advance. For this reason both isShowing
* and isVisible return false positives. We can't override either of them as
* external code may depend on this behavior.
- *
+ *
* @return boolean
*/
public boolean isTooltipOpen() {
@@ -454,13 +456,13 @@ public class VTooltip extends VOverlay {
}
private int getEventX(Event event, boolean isFocused) {
- return isFocused ? EVENT_XY_POSITION_OUTSIDE : DOM
- .eventGetClientX(event);
+ return isFocused ? EVENT_XY_POSITION_OUTSIDE
+ : DOM.eventGetClientX(event);
}
private int getEventY(Event event, boolean isFocused) {
- return isFocused ? EVENT_XY_POSITION_OUTSIDE : DOM
- .eventGetClientY(event);
+ return isFocused ? EVENT_XY_POSITION_OUTSIDE
+ : DOM.eventGetClientY(event);
}
@Override
@@ -494,9 +496,9 @@ public class VTooltip extends VOverlay {
opening = false;
}
- private class TooltipEventHandler implements MouseMoveHandler,
- KeyDownHandler, FocusHandler, BlurHandler, MouseDownHandler,
- MouseOutHandler {
+ private class TooltipEventHandler
+ implements MouseMoveHandler, KeyDownHandler, FocusHandler,
+ BlurHandler, MouseDownHandler, MouseOutHandler {
/**
* Marker for handling of tooltip through focus
@@ -505,7 +507,7 @@ public class VTooltip extends VOverlay {
/**
* Locate the tooltip for given element
- *
+ *
* @param element
* Element used in search
* @return TooltipInfo if connector and tooltip found, null if not
@@ -545,7 +547,7 @@ public class VTooltip extends VOverlay {
/**
* Handle hide event
- *
+ *
*/
private void handleHideEvent() {
hideTooltip();
@@ -568,7 +570,7 @@ public class VTooltip extends VOverlay {
/**
* Displays Tooltip when page is navigated with the keyboard.
- *
+ *
* Tooltip is not visible. This makes it possible for assistive devices
* to recognize the tooltip.
*/
@@ -579,7 +581,7 @@ public class VTooltip extends VOverlay {
/**
* Hides Tooltip when the page is navigated with the keyboard.
- *
+ *
* Removes the Tooltip from page to make sure assistive devices don't
* recognize it by accident.
*/
@@ -647,8 +649,8 @@ public class VTooltip extends VOverlay {
@Override
public void onMouseOut(MouseOutEvent moe) {
- Element element = WidgetUtil.getElementUnderMouse(moe
- .getNativeEvent());
+ Element element = WidgetUtil
+ .getElementUnderMouse(moe.getNativeEvent());
handleOnMouseOut(element);
}
@@ -668,12 +670,12 @@ public class VTooltip extends VOverlay {
}
private boolean hasCommonOwner(Widget owner, Element element) {
- ComponentConnector connector = Util.findPaintable(
- getApplicationConnection(), element);
+ ComponentConnector connector = Util
+ .findPaintable(getApplicationConnection(), element);
if (connector != null && connector.getConnection() != null
&& connector.getConnection().getUIConnector() != null) {
- return owner.equals(connector.getConnection().getUIConnector()
- .getWidget());
+ return owner.equals(
+ connector.getConnection().getUIConnector().getWidget());
}
return false;
}
@@ -683,7 +685,7 @@ public class VTooltip extends VOverlay {
/**
* Connects DOM handlers to widget that are needed for tooltip presentation.
- *
+ *
* @param widget
* Widget which DOM handlers are connected
*/
@@ -700,7 +702,7 @@ public class VTooltip extends VOverlay {
/**
* Returns the unique id of the tooltip element.
- *
+ *
* @return String containing the unique id of the tooltip, which always has
* a value
*/
@@ -721,7 +723,7 @@ public class VTooltip extends VOverlay {
* Returns the time (in ms) the tooltip should be displayed after an event
* that will cause it to be closed (e.g. mouse click outside the component,
* key down).
- *
+ *
* @return The close timeout (in ms)
*/
public int getCloseTimeout() {
@@ -732,7 +734,7 @@ public class VTooltip extends VOverlay {
* Sets the time (in ms) the tooltip should be displayed after an event that
* will cause it to be closed (e.g. mouse click outside the component, key
* down).
- *
+ *
* @param closeTimeout
* The close timeout (in ms)
*/
@@ -745,7 +747,7 @@ public class VTooltip extends VOverlay {
* be used instead of {@link #getOpenDelay()}. The quick open delay is used
* when the tooltip has very recently been shown, is currently hidden but
* about to be shown again.
- *
+ *
* @return The quick open timeout (in ms)
*/
public int getQuickOpenTimeout() {
@@ -757,7 +759,7 @@ public class VTooltip extends VOverlay {
* should be used instead of {@link #getOpenDelay()}. The quick open delay
* is used when the tooltip has very recently been shown, is currently
* hidden but about to be shown again.
- *
+ *
* @param quickOpenTimeout
* The quick open timeout (in ms)
*/
@@ -769,7 +771,7 @@ public class VTooltip extends VOverlay {
* Returns the time (in ms) that should elapse before a tooltip will be
* shown, in the situation when a tooltip has very recently been shown
* (within {@link #getQuickOpenDelay()} ms).
- *
+ *
* @return The quick open delay (in ms)
*/
public int getQuickOpenDelay() {
@@ -780,7 +782,7 @@ public class VTooltip extends VOverlay {
* Sets the time (in ms) that should elapse before a tooltip will be shown,
* in the situation when a tooltip has very recently been shown (within
* {@link #getQuickOpenDelay()} ms).
- *
+ *
* @param quickOpenDelay
* The quick open delay (in ms)
*/
@@ -793,7 +795,7 @@ public class VTooltip extends VOverlay {
* tooltip showing has occurred (e.g. mouse over) before the tooltip is
* shown. If a tooltip has recently been shown, then
* {@link #getQuickOpenDelay()} is used instead of this.
- *
+ *
* @return The open delay (in ms)
*/
public int getOpenDelay() {
@@ -805,7 +807,7 @@ public class VTooltip extends VOverlay {
* tooltip showing has occurred (e.g. mouse over) before the tooltip is
* shown. If a tooltip has recently been shown, then
* {@link #getQuickOpenDelay()} is used instead of this.
- *
+ *
* @param openDelay
* The open delay (in ms)
*/
@@ -815,7 +817,7 @@ public class VTooltip extends VOverlay {
/**
* Sets the maximum width of the tooltip popup.
- *
+ *
* @param maxWidth
* The maximum width the tooltip popup (in pixels)
*/
@@ -825,7 +827,7 @@ public class VTooltip extends VOverlay {
/**
* Returns the maximum width of the tooltip popup.
- *
+ *
* @return The maximum width the tooltip popup (in pixels)
*/
public int getMaxWidth() {
diff --git a/client/src/main/java/com/vaadin/client/VUIDLBrowser.java b/client/src/main/java/com/vaadin/client/VUIDLBrowser.java
index 08f4c653a5..c0b313dcb7 100644
--- a/client/src/main/java/com/vaadin/client/VUIDLBrowser.java
+++ b/client/src/main/java/com/vaadin/client/VUIDLBrowser.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -14,7 +14,7 @@
* the License.
*/
/**
- *
+ *
*/
package com.vaadin.client;
@@ -45,7 +45,7 @@ import elemental.json.JsonValue;
/**
* @author Vaadin Ltd
- *
+ *
* @deprecated as of 7.1. This class was mainly used by the old debug console
* but is retained for now for backwards compatibility.
*/
@@ -74,8 +74,8 @@ public class VUIDLBrowser extends SimpleTree {
SimpleTree stateChanges = new SimpleTree("shared state");
for (String connectorId : stateJson.getKeySet()) {
- stateChanges.add(new SharedStateItem(connectorId, stateJson
- .getValueMap(connectorId)));
+ stateChanges.add(new SharedStateItem(connectorId,
+ stateJson.getValueMap(connectorId)));
}
add(stateChanges);
@@ -239,9 +239,8 @@ public class VUIDLBrowser extends SimpleTree {
@Override
public void open(boolean recursive) {
- if (getWidgetCount() == 1
- && getWidget(0).getElement().getInnerText()
- .equals("LOADING")) {
+ if (getWidgetCount() == 1 && getWidget(0).getElement()
+ .getInnerText().equals("LOADING")) {
dir();
}
super.open(recursive);
diff --git a/client/src/main/java/com/vaadin/client/ValueMap.java b/client/src/main/java/com/vaadin/client/ValueMap.java
index 460b6491d0..5df021e948 100644
--- a/client/src/main/java/com/vaadin/client/ValueMap.java
+++ b/client/src/main/java/com/vaadin/client/ValueMap.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -14,7 +14,7 @@
* the License.
*/
/**
- *
+ *
*/
package com.vaadin.client;
diff --git a/client/src/main/java/com/vaadin/client/WidgetInstantiator.java b/client/src/main/java/com/vaadin/client/WidgetInstantiator.java
index 727db967ef..a6de051577 100644
--- a/client/src/main/java/com/vaadin/client/WidgetInstantiator.java
+++ b/client/src/main/java/com/vaadin/client/WidgetInstantiator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/WidgetLoader.java b/client/src/main/java/com/vaadin/client/WidgetLoader.java
index 4cc1cd1d5f..5b049c9ea6 100644
--- a/client/src/main/java/com/vaadin/client/WidgetLoader.java
+++ b/client/src/main/java/com/vaadin/client/WidgetLoader.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -17,7 +17,9 @@ package com.vaadin.client;
import com.google.gwt.core.client.RunAsyncCallback;
-/** A helper class used by WidgetMap implementation. Used by the generated code. */
+/**
+ * A helper class used by WidgetMap implementation. Used by the generated code.
+ */
abstract class WidgetLoader implements RunAsyncCallback {
@Override
diff --git a/client/src/main/java/com/vaadin/client/WidgetMap.java b/client/src/main/java/com/vaadin/client/WidgetMap.java
index ec053eb511..714561e5f7 100644
--- a/client/src/main/java/com/vaadin/client/WidgetMap.java
+++ b/client/src/main/java/com/vaadin/client/WidgetMap.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import java.util.HashMap;
/**
* Abstract class mapping between {@link ComponentConnector} instances and their
* instances.
- *
+ *
* A concrete implementation of this class is generated by WidgetMapGenerator or
* one of its subclasses during widgetset compilation.
*/
@@ -30,7 +30,7 @@ abstract class WidgetMap {
/**
* Create a new instance of a connector based on its type.
- *
+ *
* @param classType
* {@link ComponentConnector} class to instantiate
* @return new instance of the connector
@@ -43,7 +43,7 @@ abstract class WidgetMap {
/**
* Return the connector class to use for a fully qualified server side
* component class name.
- *
+ *
* @param fullyqualifiedName
* fully qualified name of the server side component class
* @return component connector class to use
@@ -54,7 +54,7 @@ abstract class WidgetMap {
/**
* Return the connector classes to load after the initial widgetset load and
* start.
- *
+ *
* @return component connector class to load after the initial widgetset
* loading
*/
@@ -64,7 +64,7 @@ abstract class WidgetMap {
* Make sure the code for a (deferred or lazy) component connector type has
* been loaded, triggering the load and waiting for its completion if
* necessary.
- *
+ *
* @param classType
* component connector class
*/
diff --git a/client/src/main/java/com/vaadin/client/WidgetSet.java b/client/src/main/java/com/vaadin/client/WidgetSet.java
index e85eac388f..aa35a83822 100644
--- a/client/src/main/java/com/vaadin/client/WidgetSet.java
+++ b/client/src/main/java/com/vaadin/client/WidgetSet.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,13 +31,13 @@ public class WidgetSet {
/**
* Create an uninitialized connector that best matches given UIDL. The
* connector must implement {@link ServerConnector}.
- *
+ *
* @param tag
* connector type tag for the connector to create
* @param conf
* the application configuration to use when creating the
* connector
- *
+ *
* @return New uninitialized and unregistered connector that can paint given
* UIDL.
*/
@@ -67,8 +67,8 @@ public class WidgetSet {
* let the auto generated code instantiate this type
*/
try {
- ServerConnector connector = (ServerConnector) TypeData.getType(
- classType).createInstance();
+ ServerConnector connector = (ServerConnector) TypeData
+ .getType(classType).createInstance();
if (connector instanceof HasJavaScriptConnectorHelper) {
((HasJavaScriptConnectorHelper) connector)
.getJavascriptConnectorHelper().setTag(tag);
@@ -78,8 +78,7 @@ public class WidgetSet {
} catch (NoDataException e) {
Profiler.leave("WidgetSet.createConnector");
throw new IllegalStateException(
- "There is no information about "
- + classType
+ "There is no information about " + classType
+ ". Did you remember to compile the right widgetset?",
e);
}
@@ -109,7 +108,7 @@ public class WidgetSet {
* Due its nature, GWT does not support dynamic classloading. To bypass this
* limitation, widgetset must have function that returns Class by its fully
* qualified name.
- *
+ *
* @param tag
* @param applicationConfiguration
* @return
@@ -127,10 +126,9 @@ public class WidgetSet {
} while (bundleName == null && t != null);
if (bundleName != null && !loader.isBundleLoaded(bundleName)) {
- getLogger().info(
- "Loading bundle " + bundleName
- + " to be able to render server side class "
- + serverSideClassName);
+ getLogger().info("Loading bundle " + bundleName
+ + " to be able to render server side class "
+ + serverSideClassName);
ApplicationConfiguration.startDependencyLoading();
loader.loadBundle(bundleName, new BundleLoadCallback() {
@Override
diff --git a/client/src/main/java/com/vaadin/client/WidgetUtil.java b/client/src/main/java/com/vaadin/client/WidgetUtil.java
index 8161ceff19..d6d36c1cb1 100644
--- a/client/src/main/java/com/vaadin/client/WidgetUtil.java
+++ b/client/src/main/java/com/vaadin/client/WidgetUtil.java
@@ -54,9 +54,9 @@ public class WidgetUtil {
/**
* Helper method for debugging purposes.
- *
+ *
* Stops execution on firefox browsers on a breakpoint.
- *
+ *
*/
public static native void browserDebugger()
/*-{
@@ -67,7 +67,7 @@ public class WidgetUtil {
/**
* Redirects the browser to the given url or refreshes the page if url is
* null
- *
+ *
* @since 7.6
* @param url
* The url to redirect to or null to refresh
@@ -85,7 +85,7 @@ public class WidgetUtil {
* Helper method for a bug fix #14041. For mozilla getKeyCode return 0 for
* space bar (because space is considered as char). If return 0 use
* getCharCode.
- *
+ *
* @param event
* @return return key code
* @since 7.2.4
@@ -99,12 +99,12 @@ public class WidgetUtil {
}
/**
- *
+ *
* Returns the topmost element of from given coordinates.
- *
+ *
* TODO fix crossplat issues clientX vs pageX. See quircksmode. Not critical
* for vaadin as we scroll div istead of page.
- *
+ *
* @param x
* @param y
* @return the element at given coordinates
@@ -137,7 +137,7 @@ public class WidgetUtil {
/**
* Converts html entities to text.
- *
+ *
* @param html
* @return escaped string presentation of given html
*/
@@ -155,7 +155,7 @@ public class WidgetUtil {
/**
* Escapes the string so it is safe to write inside an HTML attribute.
- *
+ *
* @param attribute
* The string to escape
* @return An escaped version of <literal>attribute</literal>.
@@ -174,9 +174,9 @@ public class WidgetUtil {
/**
* Clones given element as in JavaScript.
- *
+ *
* Deprecate this if there appears similar method into GWT someday.
- *
+ *
* @param element
* @param deep
* clone child tree also
@@ -293,8 +293,8 @@ public class WidgetUtil {
setHeight(widget, "");
return paddingBorderGuess;
} else if (height.endsWith("px")) {
- int pixelHeight = Integer.parseInt(height.substring(0,
- height.length() - 2));
+ int pixelHeight = Integer
+ .parseInt(height.substring(0, height.length() - 2));
return setHeightExcludingPaddingAndBorder(widget.getElement(),
pixelHeight, paddingBorderGuess, false);
} else {
@@ -320,8 +320,8 @@ public class WidgetUtil {
setWidth(widget, "");
return paddingBorderGuess;
} else if (width.endsWith("px")) {
- int pixelWidth = Integer.parseInt(width.substring(0,
- width.length() - 2));
+ int pixelWidth = Integer
+ .parseInt(width.substring(0, width.length() - 2));
return setWidthExcludingPaddingAndBorder(widget.getElement(),
pixelWidth, paddingBorderGuess, false);
} else {
@@ -427,7 +427,7 @@ public class WidgetUtil {
/**
* Defers the execution of {@link #runWebkitOverflowAutoFix(Element)}
- *
+ *
* @since 7.2.6
* @param elem
* with overflow auto
@@ -445,9 +445,9 @@ public class WidgetUtil {
/**
* Run workaround for webkits overflow auto issue.
- *
+ *
* See: our bug #2138 and https://bugs.webkit.org/show_bug.cgi?id=21462
- *
+ *
* @param elem
* with overflow auto
*/
@@ -455,12 +455,12 @@ public class WidgetUtil {
// Add max version if fix lands sometime to Webkit
// Starting from Opera 11.00, also a problem in Opera
if (BrowserInfo.get().requiresOverflowAutoFix()) {
- final String originalOverflow = elem.getStyle().getProperty(
- "overflow");
- final String originalOverflowX = elem.getStyle().getProperty(
- "overflowX");
- final String originalOverflowY = elem.getStyle().getProperty(
- "overflowY");
+ final String originalOverflow = elem.getStyle()
+ .getProperty("overflow");
+ final String originalOverflowX = elem.getStyle()
+ .getProperty("overflowX");
+ final String originalOverflowY = elem.getStyle()
+ .getProperty("overflowY");
if ("hidden".equals(originalOverflow)
|| "hidden".equals(originalOverflowX)
|| "hidden".equals(originalOverflowY)) {
@@ -505,7 +505,8 @@ public class WidgetUtil {
// updated when collapsing/expanding columns
// Also appeared in Safari 5.1 with webkit 534 (#7667)
if ((BrowserInfo.get().isChrome() || (BrowserInfo.get()
- .isSafari() && BrowserInfo.get().getWebkitVersion() >= 534))
+ .isSafari()
+ && BrowserInfo.get().getWebkitVersion() >= 534))
&& (scrollleft > 0 || elem.getScrollLeft() > 0)) {
int scrollvalue = scrollleft;
@@ -536,12 +537,13 @@ public class WidgetUtil {
/**
* Gets the border-box width for the given element, i.e. element width +
* border + padding. Always rounds up to nearest integer.
- *
+ *
* @param element
* The element to check
* @return The border-box width for the element
*/
- public static int getRequiredWidth(com.google.gwt.dom.client.Element element) {
+ public static int getRequiredWidth(
+ com.google.gwt.dom.client.Element element) {
int reqWidth = getRequiredWidthBoundingClientRect(element);
if (BrowserInfo.get().isIE() && !BrowserInfo.get().isIE8()) {
int csSize = getRequiredWidthComputedStyle(element);
@@ -561,7 +563,7 @@ public class WidgetUtil {
/**
* Gets the border-box width for the given element, i.e. element width +
* border + padding.
- *
+ *
* @since 7.5.1
* @param element
* The element to check
@@ -586,7 +588,7 @@ public class WidgetUtil {
/**
* Gets the border-box height for the given element, i.e. element height +
* border + padding. Always rounds up to nearest integer.
- *
+ *
* @param element
* The element to check
* @return The border-box height for the element
@@ -612,7 +614,7 @@ public class WidgetUtil {
/**
* Gets the border-box height for the given element, i.e. element height +
* border + padding.
- *
+ *
* @since 7.5.1
* @param element
* The element to check
@@ -642,7 +644,7 @@ public class WidgetUtil {
* <p>
* In case the browser doesn't support bounding rectangles, the returned
* value is the offset width.
- *
+ *
* @param element
* the element of which to calculate the width
* @return the width of the element
@@ -659,7 +661,7 @@ public class WidgetUtil {
* <p>
* In case the browser doesn't support bounding rectangles, the returned
* value is the offset width.
- *
+ *
* @param element
* the element of which to calculate the width
* @return the subpixel-accurate width of the element
@@ -721,7 +723,7 @@ public class WidgetUtil {
* <p>
* In case the browser doesn't support bounding rectangles, the returned
* value is the offset height.
- *
+ *
* @param element
* the element of which to calculate the height
* @return the height of the element
@@ -738,7 +740,7 @@ public class WidgetUtil {
* <p>
* In case the browser doesn't support bounding rectangles, the returned
* value is the offset height.
- *
+ *
* @param element
* the element of which to calculate the height
* @return the subpixel-accurate height of the element
@@ -767,12 +769,13 @@ public class WidgetUtil {
/**
* Detects what is currently the overflow style attribute in given element.
- *
+ *
* @param pe
* the element to detect
* @return true if auto or scroll
*/
- public static boolean mayHaveScrollBars(com.google.gwt.dom.client.Element pe) {
+ public static boolean mayHaveScrollBars(
+ com.google.gwt.dom.client.Element pe) {
String overflow = getComputedStyle(pe, "overflow");
if (overflow != null) {
if (overflow.equals("auto") || overflow.equals("scroll")) {
@@ -789,7 +792,7 @@ public class WidgetUtil {
* A simple helper method to detect "computed style" (aka style sheets +
* element styles). Values returned differ a lot depending on browsers.
* Always be very careful when using this.
- *
+ *
* @param el
* the element from which the style property is detected
* @param p
@@ -820,7 +823,7 @@ public class WidgetUtil {
/**
* Will (attempt) to focus the given DOM Element.
- *
+ *
* @param el
* the element to focus
*/
@@ -843,7 +846,7 @@ public class WidgetUtil {
* {@code C} or null, depending on whether the class parameter matches. This
* may also be the case with other Composite-like classes that hijack the
* event handling of their child widget(s).
- *
+ *
* @param element
* the element where to start seeking of Widget
* @param class1
@@ -880,7 +883,7 @@ public class WidgetUtil {
/**
* Force webkit to redraw an element
- *
+ *
* @param element
* The element that should be redrawn
*/
@@ -898,7 +901,7 @@ public class WidgetUtil {
* Performs a hack to trigger a re-layout in the IE8. This is usually
* necessary in cases where IE8 "forgets" to update child elements when they
* resize.
- *
+ *
* @param e
* The element to perform the hack on
*/
@@ -912,7 +915,7 @@ public class WidgetUtil {
* Performs a hack to trigger a re-layout in the IE browser. This is usually
* necessary in cases where IE "forgets" to update child elements when they
* resize.
- *
+ *
* @since 7.3
* @param e
* The element to perform the hack on
@@ -926,9 +929,9 @@ public class WidgetUtil {
/**
* Detaches and re-attaches the element from its parent. The element is
* reattached at the same position in the DOM as it was before.
- *
+ *
* Does nothing if the element is not attached to the DOM.
- *
+ *
* @param element
* The element to detach and re-attach
*/
@@ -963,7 +966,7 @@ public class WidgetUtil {
/**
* Returns the index of the childElement within its parent.
- *
+ *
* @param subElement
* @return
*/
@@ -981,7 +984,7 @@ public class WidgetUtil {
* Temporarily sets the {@code styleProperty} to {@code tempValue} and then
* resets it to its current value. Used mainly to work around rendering
* issues in IE (and possibly in other browsers)
- *
+ *
* @param element
* The target element
* @param styleProperty
@@ -1007,7 +1010,7 @@ public class WidgetUtil {
* A helper method to return the client position from an event. Returns
* position from either first changed touch (if touch event) or from the
* event itself.
- *
+ *
* @param event
* @return
*/
@@ -1023,7 +1026,7 @@ public class WidgetUtil {
* Find the element corresponding to the coordinates in the passed mouse
* event. Please note that this is not always the same as the target of the
* event e.g. if event capture is used.
- *
+ *
* @param event
* the mouse event to get coordinates from
* @return the element at the coordinates of the event
@@ -1039,7 +1042,7 @@ public class WidgetUtil {
* A helper method to return the client position from an event. Returns
* position from either first changed touch (if touch event) or from the
* event itself.
- *
+ *
* @param event
* @return
*/
@@ -1052,7 +1055,7 @@ public class WidgetUtil {
}
/**
- *
+ *
* @see #getTouchOrMouseClientY(Event)
* @param currentGwtEvent
* @return
@@ -1063,7 +1066,7 @@ public class WidgetUtil {
/**
* @see #getTouchOrMouseClientX(Event)
- *
+ *
* @param event
* @return
*/
@@ -1087,10 +1090,9 @@ public class WidgetUtil {
touch.getClientX(), touch.getClientY(), false, false,
false, false, NativeEvent.BUTTON_LEFT);
final NativeEvent createMouseDownEvent = Document.get()
- .createMouseDownEvent(0, touch.getScreenX(),
- touch.getScreenY(), touch.getClientX(),
- touch.getClientY(), false, false, false, false,
- NativeEvent.BUTTON_LEFT);
+ .createMouseDownEvent(0, touch.getScreenX(), touch.getScreenY(),
+ touch.getClientX(), touch.getClientY(), false, false,
+ false, false, NativeEvent.BUTTON_LEFT);
final NativeEvent createMouseClickEvent = Document.get()
.createClickEvent(0, touch.getScreenX(), touch.getScreenY(),
touch.getClientX(), touch.getClientY(), false, false,
@@ -1132,7 +1134,7 @@ public class WidgetUtil {
/**
* Gets the currently focused element.
- *
+ *
* @return The active element or null if no active element could be found.
*/
public native static Element getFocusedElement()
@@ -1146,9 +1148,9 @@ public class WidgetUtil {
/**
* Gets currently focused element and checks if it's editable
- *
+ *
* @since 7.4
- *
+ *
* @return true if focused element is editable
*/
public static boolean isFocusedElementEditable() {
@@ -1170,7 +1172,7 @@ public class WidgetUtil {
* this method checks that this widget nor any of its parents is hidden. Can
* be e.g used to check whether component should react to some events or
* not.
- *
+ *
* @param widget
* @return true if attached and displayed
*/
@@ -1203,7 +1205,7 @@ public class WidgetUtil {
/**
* Scrolls an element into view vertically only. Modified version of
* Element.scrollIntoView.
- *
+ *
* @param elem
* The element to scroll into view
*/
@@ -1238,7 +1240,7 @@ public class WidgetUtil {
/**
* Checks if the given event is either a touch event or caused by the left
* mouse button
- *
+ *
* @param event
* @return true if the event is a touch event or caused by the left mouse
* button, false otherwise
@@ -1251,7 +1253,7 @@ public class WidgetUtil {
/**
* Resolve a relative URL to an absolute URL based on the current document's
* location.
- *
+ *
* @param url
* a string with the relative URL to resolve
* @return the corresponding absolute URL as a string
@@ -1263,8 +1265,8 @@ public class WidgetUtil {
divElement.getStyle().setDisplay(Display.NONE);
RootPanel.getBodyElement().appendChild(divElement);
- divElement.setInnerHTML("<a href='" + escapeAttribute(url)
- + "' ></a>");
+ divElement.setInnerHTML(
+ "<a href='" + escapeAttribute(url) + "' ></a>");
AnchorElement a = divElement.getChild(0).cast();
String href = a.getHref();
@@ -1280,12 +1282,12 @@ public class WidgetUtil {
/**
* Sets the selection range of an input element.
- *
+ *
* We need this JSNI function to set selection range so that we can use the
* optional direction attribute to set the anchor to the end and the focus
* to the start. This makes Firefox work the same way as other browsers
* (#13477)
- *
+ *
* @param elem
* the html input element.
* @param pos
@@ -1296,7 +1298,7 @@ public class WidgetUtil {
* a string indicating the direction in which the selection was
* performed. This may be "forward" or "backward", or "none" if
* the direction is unknown or irrelevant.
- *
+ *
* @since 7.3
*/
public native static void setSelectionRange(Element elem, int pos,
@@ -1311,7 +1313,7 @@ public class WidgetUtil {
/**
* JavaScript hack to prevent text selection in various browsers.
- *
+ *
* @since 7.6
* @param e
* element for enabling or disabling text selection
@@ -1334,7 +1336,7 @@ public class WidgetUtil {
/**
* JavaScript hack to clear text selection in various browsers.
- *
+ *
* @since 7.6
*/
public native static void clearTextSelection()
@@ -1356,16 +1358,17 @@ public class WidgetUtil {
/**
* Compares two double values with the error margin of
* {@link #PIXEL_EPSILON} (i.e. {@value #PIXEL_EPSILON})
- *
+ *
* @param num1
* the first value for which to compare equality
* @param num2
* the second value for which to compare equality
* @since 7.4
- *
+ *
* @return true if the values are considered equals; false otherwise
*/
- public static boolean pixelValuesEqual(final double num1, final double num2) {
+ public static boolean pixelValuesEqual(final double num1,
+ final double num2) {
return Math.abs(num1 - num2) <= PIXEL_EPSILON;
}
@@ -1413,7 +1416,7 @@ public class WidgetUtil {
* Wrap a css size value and its unit and translate back and forth to the
* string representation.<br/>
* Eg. 50%, 123px, ...
- *
+ *
* @since 7.2.6
* @author Vaadin Ltd
*/
@@ -1432,7 +1435,7 @@ public class WidgetUtil {
/**
* Gets the unit value by its type.
- *
+ *
* @param type
* the type of the unit as found in the style.
* @return the unit value.
@@ -1449,7 +1452,7 @@ public class WidgetUtil {
/**
* Parse the size from string format to {@link CssSize}.
- *
+ *
* @param s
* the size as string.
* @return a {@link CssSize} object.
@@ -1480,16 +1483,16 @@ public class WidgetUtil {
unit = unitByType(symbol);
}
} else {
- throw new IllegalArgumentException("Invalid size argument: \""
- + s + "\" (should match " + sizePattern.getSource()
- + ")");
+ throw new IllegalArgumentException(
+ "Invalid size argument: \"" + s + "\" (should match "
+ + sizePattern.getSource() + ")");
}
return new CssSize(size, unit);
}
/**
* Creates a {@link CssSize} using a value and its measurement unit.
- *
+ *
* @param value
* the value.
* @param unit
@@ -1517,7 +1520,7 @@ public class WidgetUtil {
/**
* Gets the value for this css size.
- *
+ *
* @return the value.
*/
public float getValue() {
@@ -1526,7 +1529,7 @@ public class WidgetUtil {
/**
* Gets the measurement unit for this css size.
- *
+ *
* @return the unit.
*/
public Unit getUnit() {
@@ -1550,7 +1553,7 @@ public class WidgetUtil {
/**
* Check whether the two sizes are equals.
- *
+ *
* @param cssSize1
* the first size to compare.
* @param cssSize2
@@ -1558,8 +1561,8 @@ public class WidgetUtil {
* @return true if the two sizes are equals, otherwise false.
*/
public static boolean equals(String cssSize1, String cssSize2) {
- return CssSize.fromString(cssSize1).equals(
- CssSize.fromString(cssSize2));
+ return CssSize.fromString(cssSize1)
+ .equals(CssSize.fromString(cssSize2));
}
}
@@ -1573,7 +1576,7 @@ public class WidgetUtil {
* <p>
* The value is determined using computed style when available and
* calculated otherwise.
- *
+ *
* @since 7.5.0
* @param element
* the element to measure
@@ -1588,14 +1591,15 @@ public class WidgetUtil {
* <p>
* The value is determined using computed style when available and
* calculated otherwise.
- *
+ *
* @since 7.5.0
* @param element
* the element to measure
* @return the bottom border thickness
*/
public static double getBorderBottomThickness(Element element) {
- return getBorderThickness(element, new String[] { "borderBottomWidth" });
+ return getBorderThickness(element,
+ new String[] { "borderBottomWidth" });
}
/**
@@ -1604,15 +1608,15 @@ public class WidgetUtil {
* <p>
* The value is determined using computed style when available and
* calculated otherwise.
- *
+ *
* @since 7.5.0
* @param element
* the element to measure
* @return the top and bottom border thickness
*/
public static double getBorderTopAndBottomThickness(Element element) {
- return getBorderThickness(element, new String[] { "borderTopWidth",
- "borderBottomWidth" });
+ return getBorderThickness(element,
+ new String[] { "borderTopWidth", "borderBottomWidth" });
}
/**
@@ -1620,7 +1624,7 @@ public class WidgetUtil {
* <p>
* The value is determined using computed style when available and
* calculated otherwise.
- *
+ *
* @since 7.5.0
* @param element
* the element to measure
@@ -1635,7 +1639,7 @@ public class WidgetUtil {
* <p>
* The value is determined using computed style when available and
* calculated otherwise.
- *
+ *
* @since 7.5.0
* @param element
* the element to measure
@@ -1650,15 +1654,15 @@ public class WidgetUtil {
* <p>
* The value is determined using computed style when available and
* calculated otherwise.
- *
+ *
* @since 7.5.0
* @param element
* the element to measure
* @return the top border thickness
*/
public static double getBorderLeftAndRightThickness(Element element) {
- return getBorderThickness(element, new String[] { "borderLeftWidth",
- "borderRightWidth" });
+ return getBorderThickness(element,
+ new String[] { "borderLeftWidth", "borderRightWidth" });
}
private static native double getBorderThickness(
@@ -1684,20 +1688,20 @@ public class WidgetUtil {
}
var heightWithoutBorder = cloneElement.offsetHeight;
parentElement.removeChild(cloneElement);
-
+
return heightWithBorder - heightWithoutBorder;
}
}-*/;
/**
* Rounds the given size up to a value which the browser will accept.
- *
+ *
* Safari/WebKit uses 1/64th of a pixel to enable using integer math
* (http://trac.webkit.org/wiki/LayoutUnit).
- *
+ *
* Firefox uses 1/60th of a pixel because it is divisible by three
* (https://bugzilla.mozilla.org/show_bug.cgi?id=1070940)
- *
+ *
* @since 7.5.1
* @param size
* the value to round
@@ -1709,15 +1713,15 @@ public class WidgetUtil {
/**
* Rounds the given size down to a value which the browser will accept.
- *
+ *
* Safari/WebKit uses 1/64th of a pixel to enable using integer math
* (http://trac.webkit.org/wiki/LayoutUnit).
- *
+ *
* Firefox uses 1/60th of a pixel because it is divisible by three
* (https://bugzilla.mozilla.org/show_bug.cgi?id=1070940)
- *
+ *
* IE9+ uses 1/100th of a pixel
- *
+ *
* @since 7.5.1
* @param size
* the value to round
@@ -1750,7 +1754,7 @@ public class WidgetUtil {
/**
* Returns the factor used by browsers to round subpixel values
- *
+ *
* @since 7.5.1
* @return the factor N used by the browser when storing subpixels as X+Y/N
*/
diff --git a/client/src/main/java/com/vaadin/client/annotations/OnStateChange.java b/client/src/main/java/com/vaadin/client/annotations/OnStateChange.java
index d15e32f493..c3d0424373 100644
--- a/client/src/main/java/com/vaadin/client/annotations/OnStateChange.java
+++ b/client/src/main/java/com/vaadin/client/annotations/OnStateChange.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -33,7 +33,7 @@ import com.vaadin.client.communication.StateChangeEvent;
* <p>
* If there is no state variable with the provided name, the widgetset
* compilation will fail.
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
@@ -43,7 +43,7 @@ import com.vaadin.client.communication.StateChangeEvent;
public @interface OnStateChange {
/**
* Defines a list of property names to listen for.
- *
+ *
* @return an array of property names, should contain at least one item
*/
public String[] value();
diff --git a/client/src/main/java/com/vaadin/client/communication/AbstractServerConnectorEvent.java b/client/src/main/java/com/vaadin/client/communication/AbstractServerConnectorEvent.java
index 9f99a451e1..3d8dc58e96 100644
--- a/client/src/main/java/com/vaadin/client/communication/AbstractServerConnectorEvent.java
+++ b/client/src/main/java/com/vaadin/client/communication/AbstractServerConnectorEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -36,7 +36,7 @@ public abstract class AbstractServerConnectorEvent<H extends EventHandler>
/**
* Sends this event to the given handler.
- *
+ *
* @param handler
* The handler to dispatch.
*/
diff --git a/client/src/main/java/com/vaadin/client/communication/AtmospherePushConnection.java b/client/src/main/java/com/vaadin/client/communication/AtmospherePushConnection.java
index f439d27107..34e1c5ff30 100644
--- a/client/src/main/java/com/vaadin/client/communication/AtmospherePushConnection.java
+++ b/client/src/main/java/com/vaadin/client/communication/AtmospherePushConnection.java
@@ -42,7 +42,7 @@ import elemental.json.JsonObject;
/**
* The default {@link PushConnection} implementation that uses Atmosphere for
* handling the communication channel.
- *
+ *
* @author Vaadin Ltd
* @since 7.1
*/
@@ -140,7 +140,7 @@ public class AtmospherePushConnection implements PushConnection {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.client.communication.PushConnection#init(ApplicationConnection
* , Map<String, String>, CommunicationErrorHandler)
@@ -209,8 +209,8 @@ public class AtmospherePushConnection implements PushConnection {
String csrfToken = connection.getMessageHandler().getCsrfToken();
if (!csrfToken.equals(ApplicationConstants.CSRF_TOKEN_DEFAULT_VALUE)) {
- extraParams += "&" + ApplicationConstants.CSRF_TOKEN_PARAMETER
- + "=" + csrfToken;
+ extraParams += "&" + ApplicationConstants.CSRF_TOKEN_PARAMETER + "="
+ + csrfToken;
}
// uri is needed to identify the right connection when closing
@@ -266,9 +266,8 @@ public class AtmospherePushConnection implements PushConnection {
"This server to client push connection should not be used to send client to server messages");
}
if (state == State.CONNECTED) {
- getLogger().info(
- "Sending push (" + transport + ") message to server: "
- + message.toJson());
+ getLogger().info("Sending push (" + transport
+ + ") message to server: " + message.toJson());
if (transport.equals("websocket")) {
FragmentedMessage fragmented = new FragmentedMessage(
@@ -295,9 +294,8 @@ public class AtmospherePushConnection implements PushConnection {
}
protected void onReopen(AtmosphereResponse response) {
- getLogger().info(
- "Push connection re-established using "
- + response.getTransport());
+ getLogger().info("Push connection re-established using "
+ + response.getTransport());
onConnect(response);
}
@@ -310,9 +308,9 @@ public class AtmospherePushConnection implements PushConnection {
/**
* Called whenever a server push connection is established (or
* re-established).
- *
+ *
* @param response
- *
+ *
* @since 7.2
*/
protected void onConnect(AtmosphereResponse response) {
@@ -340,7 +338,7 @@ public class AtmospherePushConnection implements PushConnection {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.communication.PushConenction#disconnect()
*/
@Override
@@ -362,7 +360,8 @@ public class AtmospherePushConnection implements PushConnection {
break;
case DISCONNECT_PENDING:
case DISCONNECTED:
- throw new IllegalStateException("Can not disconnect more than once");
+ throw new IllegalStateException(
+ "Can not disconnect more than once");
}
}
@@ -374,9 +373,8 @@ public class AtmospherePushConnection implements PushConnection {
getConnectionStateHandler().pushInvalidContent(this, message);
return;
} else {
- getLogger().info(
- "Received push (" + getTransportType() + ") message: "
- + message);
+ getLogger().info("Received push (" + getTransportType()
+ + ") message: " + message);
connection.getMessageHandler().handleMessage(json);
}
}
@@ -386,16 +384,15 @@ public class AtmospherePushConnection implements PushConnection {
* tried
*/
protected void onTransportFailure() {
- getLogger().warning(
- "Push connection using primary method ("
- + getConfig().getTransport() + ") failed. Trying with "
- + getConfig().getFallbackTransport());
+ getLogger().warning("Push connection using primary method ("
+ + getConfig().getTransport() + ") failed. Trying with "
+ + getConfig().getFallbackTransport());
}
/**
* Called if the push connection fails. Atmosphere will automatically retry
* the connection until successful.
- *
+ *
*/
protected void onError(AtmosphereResponse response) {
state = State.DISCONNECTED;
diff --git a/client/src/main/java/com/vaadin/client/communication/ConnectionStateHandler.java b/client/src/main/java/com/vaadin/client/communication/ConnectionStateHandler.java
index cc33dd0086..13c1e47ae7 100644
--- a/client/src/main/java/com/vaadin/client/communication/ConnectionStateHandler.java
+++ b/client/src/main/java/com/vaadin/client/communication/ConnectionStateHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,11 +25,11 @@ import elemental.json.JsonObject;
/**
* Interface for handling problems and other events which occur during
* communication with the server.
- *
+ *
* The handler is responsible for handling any problem in XHR, heartbeat and
* push connections in a way it sees fit. The default implementation is
* {@link DefaultConnectionStateHandler}.
- *
+ *
* @since 7.6
* @author Vaadin Ltd
*/
@@ -46,7 +46,7 @@ public interface ConnectionStateHandler {
/**
* Called when an exception occurs during a {@link Heartbeat} request
- *
+ *
* @param request
* The heartbeat request
* @param exception
@@ -56,7 +56,7 @@ public interface ConnectionStateHandler {
/**
* Called when a heartbeat request returns a status code other than OK (200)
- *
+ *
* @param request
* The heartbeat request
* @param response
@@ -74,7 +74,7 @@ public interface ConnectionStateHandler {
* result in the push connection trying a fallback connection method, trying
* to reconnect to the server or might just be an indication that the
* connection was intentionally closed ("unsubscribe"),
- *
+ *
* @param pushConnection
* The push connection which was closed
* @param response
@@ -86,10 +86,10 @@ public interface ConnectionStateHandler {
/**
* Called when a client side timeout occurs before a push connection to the
* server completes.
- *
+ *
* The client side timeout causes a disconnection of the push connection and
* no reconnect will be attempted after this method is called,
- *
+ *
* @param pushConnection
* The push connection which timed out
* @param response
@@ -100,13 +100,13 @@ public interface ConnectionStateHandler {
/**
* Called when a fatal error fatal error occurs in the push connection.
- *
+ *
* The push connection will not try to recover from this situation itself
* and typically the problem handler should not try to do automatic recovery
* either. The cause can be e.g. maximum number of reconnection attempts
* have been reached, neither the selected transport nor the fallback
* transport can be used or similar.
- *
+ *
* @param pushConnection
* The push connection where the error occurred
* @param response
@@ -117,7 +117,7 @@ public interface ConnectionStateHandler {
/**
* Called when the push connection has lost the connection to the server and
* will proceed to try to re-establish the connection
- *
+ *
* @param pushConnection
* The push connection which will be reconnected
*/
@@ -125,7 +125,7 @@ public interface ConnectionStateHandler {
/**
* Called when the push connection to the server has been established.
- *
+ *
* @param pushConnection
* The push connection which was established
*/
@@ -133,7 +133,7 @@ public interface ConnectionStateHandler {
/**
* Called when the required push script could not be loaded
- *
+ *
* @param resourceUrl
* The URL which was used for loading the script
*/
@@ -142,7 +142,7 @@ public interface ConnectionStateHandler {
/**
* Called when an exception occurs during an XmlHttpRequest request to the
* server.
- *
+ *
* @param xhrConnectionError
* An event containing what was being sent to the server and what
* exception occurred
@@ -152,7 +152,7 @@ public interface ConnectionStateHandler {
/**
* Called when invalid content (not JSON) was returned from the server as
* the result of an XmlHttpRequest request
- *
+ *
* @param communicationProblemEvent
* An event containing what was being sent to the server and what
* was returned
@@ -162,7 +162,7 @@ public interface ConnectionStateHandler {
/**
* Called when invalid status code (not 200) was returned by the server as
* the result of an XmlHttpRequest.
- *
+ *
* @param communicationProblemEvent
* An event containing what was being sent to the server and what
* was returned
@@ -177,7 +177,7 @@ public interface ConnectionStateHandler {
/**
* Called when a message is to be sent to the server through the push
* channel but the push channel is not connected
- *
+ *
* @param payload
* The payload to send to the server
*/
@@ -186,7 +186,7 @@ public interface ConnectionStateHandler {
/**
* Called when invalid content (not JSON) was pushed from the server through
* the push connection
- *
+ *
* @param communicationProblemEvent
* An event containing what was being sent to the server and what
* was returned
diff --git a/client/src/main/java/com/vaadin/client/communication/Date_Serializer.java b/client/src/main/java/com/vaadin/client/communication/Date_Serializer.java
index 14eb6e4e3d..cec1799188 100644
--- a/client/src/main/java/com/vaadin/client/communication/Date_Serializer.java
+++ b/client/src/main/java/com/vaadin/client/communication/Date_Serializer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import elemental.json.JsonValue;
/**
* Client side serializer/deserializer for java.util.Date
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
diff --git a/client/src/main/java/com/vaadin/client/communication/DefaultConnectionStateHandler.java b/client/src/main/java/com/vaadin/client/communication/DefaultConnectionStateHandler.java
index f32bd5c5ea..9a8348f29b 100644
--- a/client/src/main/java/com/vaadin/client/communication/DefaultConnectionStateHandler.java
+++ b/client/src/main/java/com/vaadin/client/communication/DefaultConnectionStateHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -42,7 +42,7 @@ import elemental.json.JsonObject;
* <p>
* Handles permanent errors by showing a critical system notification to the
* user
- *
+ *
* @since 7.6
* @author Vaadin Ltd
*/
@@ -78,7 +78,7 @@ public class DefaultConnectionStateHandler implements ConnectionStateHandler {
/**
* Checks if this type is of higher priority than the given type
- *
+ *
* @param type
* the type to compare to
* @return true if this type has higher priority than the given type,
@@ -116,7 +116,7 @@ public class DefaultConnectionStateHandler implements ConnectionStateHandler {
/**
* Checks if we are currently trying to reconnect
- *
+ *
* @return true if we have noted a problem and are trying to re-establish
* server connection, false otherwise
*/
@@ -130,7 +130,7 @@ public class DefaultConnectionStateHandler implements ConnectionStateHandler {
/**
* Returns the connection this handler is connected to
- *
+ *
* @return the connection for this handler
*/
protected ApplicationConnection getConnection() {
@@ -185,7 +185,7 @@ public class DefaultConnectionStateHandler implements ConnectionStateHandler {
* Called whenever an error occurs in communication which should be handled
* by showing the reconnect dialog and retrying communication until
* successful again
- *
+ *
* @param type
* The type of failure detected
* @param payload
@@ -229,8 +229,8 @@ public class DefaultConnectionStateHandler implements ConnectionStateHandler {
}
reconnectAttempt++;
- getLogger().info(
- "Reconnect attempt " + reconnectAttempt + " for " + type);
+ getLogger()
+ .info("Reconnect attempt " + reconnectAttempt + " for " + type);
if (reconnectAttempt >= getConfiguration().reconnectAttempts) {
// Max attempts reached, stop trying
@@ -243,10 +243,10 @@ public class DefaultConnectionStateHandler implements ConnectionStateHandler {
/**
* Called after a problem occurred.
- *
+ *
* This method is responsible for re-sending the payload to the server (if
* not null) or re-send a heartbeat request at some point
- *
+ *
* @param payload
* the payload that did not reach the server, null if the problem
* was detected by a heartbeat
@@ -274,7 +274,7 @@ public class DefaultConnectionStateHandler implements ConnectionStateHandler {
/**
* Re-sends the payload to the server (if not null) or re-sends a heartbeat
* request immediately
- *
+ *
* @param payload
* the payload that did not reach the server, null if the problem
* was detected by a heartbeat
@@ -283,9 +283,8 @@ public class DefaultConnectionStateHandler implements ConnectionStateHandler {
if (!connection.isApplicationRunning()) {
// This should not happen as nobody should call this if the
// application has been stopped
- getLogger()
- .warning(
- "Trying to reconnect after application has been stopped. Giving up");
+ getLogger().warning(
+ "Trying to reconnect after application has been stopped. Giving up");
return;
}
if (payload != null) {
@@ -309,7 +308,7 @@ public class DefaultConnectionStateHandler implements ConnectionStateHandler {
/**
* Called when we should give up trying to reconnect and let the user decide
* how to continue
- *
+ *
*/
protected void giveUp() {
reconnectionCause = null;
@@ -340,7 +339,7 @@ public class DefaultConnectionStateHandler implements ConnectionStateHandler {
/**
* Checks if the reconnect dialog is visible to the user
- *
+ *
* @return true if the user can see the dialog, false otherwise
*/
protected boolean isDialogVisible() {
@@ -372,7 +371,7 @@ public class DefaultConnectionStateHandler implements ConnectionStateHandler {
/**
* Gets the text to show in the reconnect dialog after giving up (reconnect
* limit reached)
- *
+ *
* @param reconnectAttempt
* The number of the current reconnection attempt
* @return The text to show in the reconnect dialog after giving up
@@ -384,14 +383,14 @@ public class DefaultConnectionStateHandler implements ConnectionStateHandler {
/**
* Gets the text to show in the reconnect dialog
- *
+ *
* @param reconnectAttempt
* The number of the current reconnection attempt
* @return The text to show in the reconnect dialog
*/
protected String getDialogText(int reconnectAttempt) {
- return getConfiguration().dialogText.replace("{0}", reconnectAttempt
- + "");
+ return getConfiguration().dialogText.replace("{0}",
+ reconnectAttempt + "");
}
@Override
@@ -401,7 +400,8 @@ public class DefaultConnectionStateHandler implements ConnectionStateHandler {
}
private ReconnectDialogConfigurationState getConfiguration() {
- return connection.getUIConnector().getState().reconnectDialogConfiguration;
+ return connection.getUIConnector()
+ .getState().reconnectDialogConfiguration;
}
@Override
@@ -416,9 +416,10 @@ public class DefaultConnectionStateHandler implements ConnectionStateHandler {
* has expired.) If the response contains a magic substring, do a
* synchronous refresh. See #8241.
*/
- MatchResult refreshToken = RegExp.compile(
- ApplicationConnection.UIDL_REFRESH_TOKEN
- + "(:\\s*(.*?))?(\\s|$)").exec(responseText);
+ MatchResult refreshToken = RegExp
+ .compile(ApplicationConnection.UIDL_REFRESH_TOKEN
+ + "(:\\s*(.*?))?(\\s|$)")
+ .exec(responseText);
if (refreshToken != null) {
WidgetUtil.redirect(refreshToken.getGroup(2));
} else {
@@ -430,7 +431,8 @@ public class DefaultConnectionStateHandler implements ConnectionStateHandler {
}
@Override
- public void pushInvalidContent(PushConnection pushConnection, String message) {
+ public void pushInvalidContent(PushConnection pushConnection,
+ String message) {
debug("pushInvalidContent");
if (pushConnection.isBidirectional()) {
// We can't be sure that what was pushed was actually a response but
@@ -441,8 +443,8 @@ public class DefaultConnectionStateHandler implements ConnectionStateHandler {
// Do nothing special for now. Should likely do the same as
// xhrInvalidContent
- handleUnrecoverableCommunicationError("Invalid JSON from server: "
- + message, null);
+ handleUnrecoverableCommunicationError(
+ "Invalid JSON from server: " + message, null);
}
@@ -538,8 +540,8 @@ public class DefaultConnectionStateHandler implements ConnectionStateHandler {
@Override
public void pushScriptLoadError(String resourceUrl) {
- connection.handleCommunicationError(resourceUrl
- + " could not be loaded. Push will not work.", 0);
+ connection.handleCommunicationError(
+ resourceUrl + " could not be loaded. Push will not work.", 0);
}
@Override
@@ -550,7 +552,8 @@ public class DefaultConnectionStateHandler implements ConnectionStateHandler {
@Override
public void pushReconnectPending(PushConnection pushConnection) {
- debug("pushReconnectPending(" + pushConnection.getTransportType() + ")");
+ debug("pushReconnectPending(" + pushConnection.getTransportType()
+ + ")");
getLogger().info("Reopening push connection");
if (pushConnection.isBidirectional()) {
// Lost connection for a connection which will tell us when the
@@ -579,10 +582,9 @@ public class DefaultConnectionStateHandler implements ConnectionStateHandler {
debug("pushClientTimeout()");
// TODO Reconnect, allowing client timeout to be set
// https://dev.vaadin.com/ticket/18429
- connection
- .handleCommunicationError(
- "Client unexpectedly disconnected. Ensure client timeout is disabled.",
- -1);
+ connection.handleCommunicationError(
+ "Client unexpectedly disconnected. Ensure client timeout is disabled.",
+ -1);
}
@Override
diff --git a/client/src/main/java/com/vaadin/client/communication/DefaultReconnectDialog.java b/client/src/main/java/com/vaadin/client/communication/DefaultReconnectDialog.java
index 05b4e109ff..68a6814aef 100644
--- a/client/src/main/java/com/vaadin/client/communication/DefaultReconnectDialog.java
+++ b/client/src/main/java/com/vaadin/client/communication/DefaultReconnectDialog.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -33,11 +33,12 @@ import com.vaadin.client.ui.VOverlay;
/**
* The default implementation of the reconnect dialog
- *
+ *
* @since 7.6
* @author Vaadin Ltd
*/
-public class DefaultReconnectDialog extends VOverlay implements ReconnectDialog {
+public class DefaultReconnectDialog extends VOverlay
+ implements ReconnectDialog {
private static final String STYLE_RECONNECTING = "active";
private static final String STYLE_BODY_RECONNECTING = "v-reconnecting";
diff --git a/client/src/main/java/com/vaadin/client/communication/DiffJSONSerializer.java b/client/src/main/java/com/vaadin/client/communication/DiffJSONSerializer.java
index d433a8964c..64e296ab94 100644
--- a/client/src/main/java/com/vaadin/client/communication/DiffJSONSerializer.java
+++ b/client/src/main/java/com/vaadin/client/communication/DiffJSONSerializer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ import elemental.json.JsonValue;
public interface DiffJSONSerializer<T> extends JSONSerializer<T> {
/**
* Update the target object in place based on the passed JSON data.
- *
+ *
* @param target
* @param jsonValue
* @param connection
diff --git a/client/src/main/java/com/vaadin/client/communication/HasJavaScriptConnectorHelper.java b/client/src/main/java/com/vaadin/client/communication/HasJavaScriptConnectorHelper.java
index deb5900b89..b7b21014d0 100644
--- a/client/src/main/java/com/vaadin/client/communication/HasJavaScriptConnectorHelper.java
+++ b/client/src/main/java/com/vaadin/client/communication/HasJavaScriptConnectorHelper.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/communication/Heartbeat.java b/client/src/main/java/com/vaadin/client/communication/Heartbeat.java
index f38fbca5c8..3ec39804bb 100644
--- a/client/src/main/java/com/vaadin/client/communication/Heartbeat.java
+++ b/client/src/main/java/com/vaadin/client/communication/Heartbeat.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,7 +31,7 @@ import com.vaadin.shared.util.SharedUtil;
/**
* Handles sending of heartbeats to the server and reacting to the response
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
@@ -54,7 +54,7 @@ public class Heartbeat {
/**
* Initializes the heartbeat for the given application connection
- *
+ *
* @param connection
* the connection
*/
@@ -63,9 +63,10 @@ public class Heartbeat {
setInterval(connection.getConfiguration().getHeartbeatInterval());
- uri = SharedUtil.addGetParameters(connection
- .translateVaadinUri(ApplicationConstants.APP_PROTOCOL_PREFIX
- + ApplicationConstants.HEARTBEAT_PATH + '/'),
+ uri = SharedUtil.addGetParameters(
+ connection.translateVaadinUri(
+ ApplicationConstants.APP_PROTOCOL_PREFIX
+ + ApplicationConstants.HEARTBEAT_PATH + '/'),
UIConstants.UI_ID_PARAMETER + "="
+ connection.getConfiguration().getUIId());
@@ -111,8 +112,8 @@ public class Heartbeat {
public void onError(Request request, Throwable exception) {
// Handler should stop the application if heartbeat should no
// longer be sent
- connection.getConnectionStateHandler().heartbeatException(
- request, exception);
+ connection.getConnectionStateHandler()
+ .heartbeatException(request, exception);
schedule();
}
};
@@ -160,7 +161,7 @@ public class Heartbeat {
/**
* Changes the heartbeatInterval in runtime and applies it.
- *
+ *
* @param heartbeatInterval
* new interval in seconds.
*/
diff --git a/client/src/main/java/com/vaadin/client/communication/JSONSerializer.java b/client/src/main/java/com/vaadin/client/communication/JSONSerializer.java
index 59e0329ae1..922f2f90fe 100644
--- a/client/src/main/java/com/vaadin/client/communication/JSONSerializer.java
+++ b/client/src/main/java/com/vaadin/client/communication/JSONSerializer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -34,7 +34,7 @@ import elemental.json.JsonValue;
* <p>
* This is the client side interface, see
* com.vaadin.server.communication.JSONSerializer for the server side interface.
- *
+ *
* @since 7.0
*/
public interface JSONSerializer<T> {
@@ -43,14 +43,14 @@ public interface JSONSerializer<T> {
* Creates and deserializes an object received from the server. Must be
* compatible with {@link #serialize(Object, ApplicationConnection)} and
* also with the server side JsonCodec.encode method.
- *
+ *
* @param type
* the type to deserialize
* @param jsonValue
* JSON map from property name to property value
* @param connection
* the application connection providing the context
- *
+ *
* @return A deserialized object
*/
T deserialize(Type type, JsonValue jsonValue,
@@ -60,7 +60,7 @@ public interface JSONSerializer<T> {
* Serialize the given object into JSON. Must be compatible with
* {@link #deserialize(Type, JsonValue, ApplicationConnection)} and also
* with the server side JsonCodec.decodeCustomType method.
- *
+ *
* @param value
* The object to serialize
* @param connection
diff --git a/client/src/main/java/com/vaadin/client/communication/JavaScriptMethodInvocation.java b/client/src/main/java/com/vaadin/client/communication/JavaScriptMethodInvocation.java
index 43366902e2..af1d43bce4 100644
--- a/client/src/main/java/com/vaadin/client/communication/JavaScriptMethodInvocation.java
+++ b/client/src/main/java/com/vaadin/client/communication/JavaScriptMethodInvocation.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ import com.vaadin.shared.communication.MethodInvocation;
/**
* A {@link MethodInvocation} that originates from JavaScript. This means that
* there might not be any type information available on the client.
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
diff --git a/client/src/main/java/com/vaadin/client/communication/JsonDecoder.java b/client/src/main/java/com/vaadin/client/communication/JsonDecoder.java
index 0ce89c873e..f18d7dc2f8 100644
--- a/client/src/main/java/com/vaadin/client/communication/JsonDecoder.java
+++ b/client/src/main/java/com/vaadin/client/communication/JsonDecoder.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -119,8 +119,8 @@ public class JsonDecoder {
} else if (Character.class.getName().equals(baseTypeName)) {
return Character.valueOf(jsonValue.asString().charAt(0));
} else if (Connector.class.getName().equals(baseTypeName)) {
- return ConnectorMap.get(connection).getConnector(
- jsonValue.asString());
+ return ConnectorMap.get(connection)
+ .getConnector(jsonValue.asString());
} else {
return decodeObject(type, jsonValue, target, connection);
}
@@ -169,12 +169,15 @@ public class JsonDecoder {
propertyReference = null;
}
- Profiler.leave("JsonDecoder.decodeObject meta data processing");
- JsonValue encodedPropertyValue = jsonObject.get(property
- .getName());
+ Profiler.leave(
+ "JsonDecoder.decodeObject meta data processing");
+ JsonValue encodedPropertyValue = jsonObject
+ .get(property.getName());
Object decodedValue = decodeValue(propertyType,
- encodedPropertyValue, propertyReference, connection);
- Profiler.enter("JsonDecoder.decodeObject meta data processing");
+ encodedPropertyValue, propertyReference,
+ connection);
+ Profiler.enter(
+ "JsonDecoder.decodeObject meta data processing");
property.setValue(target, decodedValue);
}
Profiler.leave("JsonDecoder.decodeObject meta data processing");
@@ -183,8 +186,8 @@ public class JsonDecoder {
} catch (NoDataException e) {
Profiler.leave("JsonDecoder.decodeObject meta data processing");
Profiler.leave("JsonDecoder.decodeObject");
- throw new RuntimeException("Can not deserialize "
- + type.getSignature(), e);
+ throw new RuntimeException(
+ "Can not deserialize " + type.getSignature(), e);
}
}
}
@@ -210,7 +213,8 @@ public class JsonDecoder {
if (keyType.getBaseTypeName().equals(String.class.getName())) {
assert jsonMap.getType() == JsonType.OBJECT;
return decodeStringMap(valueType, (JsonObject) jsonMap, connection);
- } else if (keyType.getBaseTypeName().equals(Connector.class.getName())) {
+ } else if (keyType.getBaseTypeName()
+ .equals(Connector.class.getName())) {
assert jsonMap.getType() == JsonType.OBJECT;
return decodeConnectorMap(valueType, (JsonObject) jsonMap,
connection);
@@ -274,16 +278,16 @@ public class JsonDecoder {
private static List<Object> decodeList(Type type, JsonArray jsonArray,
ApplicationConnection connection) {
List<Object> tokens = new ArrayList<Object>();
- decodeIntoCollection(type.getParameterTypes()[0], jsonArray,
- connection, tokens);
+ decodeIntoCollection(type.getParameterTypes()[0], jsonArray, connection,
+ tokens);
return tokens;
}
private static Set<Object> decodeSet(Type type, JsonArray jsonArray,
ApplicationConnection connection) {
Set<Object> tokens = new HashSet<Object>();
- decodeIntoCollection(type.getParameterTypes()[0], jsonArray,
- connection, tokens);
+ decodeIntoCollection(type.getParameterTypes()[0], jsonArray, connection,
+ tokens);
return tokens;
}
diff --git a/client/src/main/java/com/vaadin/client/communication/JsonEncoder.java b/client/src/main/java/com/vaadin/client/communication/JsonEncoder.java
index 8d2a447ac5..9316c5f6f7 100644
--- a/client/src/main/java/com/vaadin/client/communication/JsonEncoder.java
+++ b/client/src/main/java/com/vaadin/client/communication/JsonEncoder.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -39,12 +39,12 @@ import elemental.json.JsonValue;
/**
* Encoder for converting RPC parameters and other values to JSON for transfer
* between the client and the server.
- *
+ *
* Currently, basic data types as well as Map, String[] and Object[] are
* supported, where maps and Object[] can contain other supported data types.
- *
+ *
* TODO extensible type support
- *
+ *
* @since 7.0
*/
public class JsonEncoder {
@@ -52,7 +52,7 @@ public class JsonEncoder {
/**
* Encode a value to a JSON representation for transport from the client to
* the server.
- *
+ *
* @param value
* value to convert
* @param connection
@@ -122,14 +122,14 @@ public class JsonEncoder {
Type propertyType = property.getType();
JsonValue encodedPropertyValue = encode(propertyValue,
propertyType, connection);
- jsonObject
- .put(property.getName(), encodedPropertyValue);
+ jsonObject.put(property.getName(),
+ encodedPropertyValue);
}
return jsonObject;
} catch (NoDataException e) {
- throw new RuntimeException("Can not encode "
- + type.getSignature(), e);
+ throw new RuntimeException(
+ "Can not encode " + type.getSignature(), e);
}
} else {
@@ -154,8 +154,8 @@ public class JsonEncoder {
if (value != null) {
valueType = value.getClass().getName();
}
- throw new IllegalArgumentException("Cannot encode object of type "
- + valueType);
+ throw new IllegalArgumentException(
+ "Cannot encode object of type " + valueType);
}
jsonArray.set(0, Json.create(transportType));
jsonArray.set(1, encode(value, null, connection));
@@ -188,22 +188,23 @@ public class JsonEncoder {
}
}
- private static JsonValue encodeChildValue(Object value,
- Type collectionType, int typeIndex, ApplicationConnection connection) {
+ private static JsonValue encodeChildValue(Object value, Type collectionType,
+ int typeIndex, ApplicationConnection connection) {
if (collectionType == null) {
return encode(new UidlValue(value), null, connection);
} else {
assert collectionType.getParameterTypes() != null
&& collectionType.getParameterTypes().length > typeIndex
- && collectionType.getParameterTypes()[typeIndex] != null : "Proper generics required for encoding child value, assertion failed for "
- + collectionType;
+ && collectionType
+ .getParameterTypes()[typeIndex] != null : "Proper generics required for encoding child value, assertion failed for "
+ + collectionType;
Type childType = collectionType.getParameterTypes()[typeIndex];
return encode(value, childType, connection);
}
}
- private static JsonArray encodeObjectMap(Map<Object, Object> map,
- Type type, ApplicationConnection connection) {
+ private static JsonArray encodeObjectMap(Map<Object, Object> map, Type type,
+ ApplicationConnection connection) {
JsonArray keys = Json.createArray();
JsonArray values = Json.createArray();
@@ -230,8 +231,8 @@ public class JsonEncoder {
for (Entry<?, ?> entry : map.entrySet()) {
Connector connector = (Connector) entry.getKey();
- JsonValue encodedValue = encodeChildValue(entry.getValue(), type,
- 1, connection);
+ JsonValue encodedValue = encodeChildValue(entry.getValue(), type, 1,
+ connection);
jsonMap.put(connector.getConnectorId(), encodedValue);
}
@@ -239,8 +240,8 @@ public class JsonEncoder {
return jsonMap;
}
- private static JsonValue encodeStringMap(Map<Object, Object> map,
- Type type, ApplicationConnection connection) {
+ private static JsonValue encodeStringMap(Map<Object, Object> map, Type type,
+ ApplicationConnection connection) {
JsonObject jsonMap = Json.createObject();
for (Entry<?, ?> entry : map.entrySet()) {
@@ -291,7 +292,7 @@ public class JsonEncoder {
/**
* Returns the transport type for the given value. Only returns a transport
* type for internally handled values.
- *
+ *
* @param value
* The value that should be transported
* @return One of the JsonEncode.VTYPE_ constants or null if the value
diff --git a/client/src/main/java/com/vaadin/client/communication/MessageHandler.java b/client/src/main/java/com/vaadin/client/communication/MessageHandler.java
index 15e94ca8d9..714af23683 100644
--- a/client/src/main/java/com/vaadin/client/communication/MessageHandler.java
+++ b/client/src/main/java/com/vaadin/client/communication/MessageHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -79,7 +79,7 @@ import elemental.json.JsonObject;
* A MessageHandler is responsible for handling all incoming messages (JSON)
* from the server (state changes, RPCs and other updates) and ensuring that the
* connectors are updated accordingly.
- *
+ *
* @since 7.6
* @author Vaadin Ltd
*/
@@ -125,7 +125,9 @@ public class MessageHandler {
*/
private Set<Object> responseHandlingLocks = new HashSet<Object>();
- /** Contains all UIDL messages received while response handling is suspended */
+ /**
+ * Contains all UIDL messages received while response handling is suspended
+ */
private List<PendingUIDLMessage> pendingUIDLMessages = new ArrayList<PendingUIDLMessage>();
// will hold the CSRF token once received
@@ -154,7 +156,7 @@ public class MessageHandler {
* has not yet been rendered (or that your browser is very fast). -1 means
* that the browser does not support the performance.timing feature used to
* get this measurement.
- *
+ *
* Note: also used for tracking whether the first UIDL has been handled
*/
private int bootstrapTime = 0;
@@ -207,7 +209,7 @@ public class MessageHandler {
/**
* Sets the application connection this instance is connected to. Called
* internally by the framework.
- *
+ *
* @param connection
* the application connection this instance is connected to
*/
@@ -222,7 +224,7 @@ public class MessageHandler {
/**
* Handles a received UIDL JSON text, parsing it, and passing it on to the
* appropriate handlers, while logging timing information.
- *
+ *
* @param jsonText
* The JSON to handle
*/
@@ -232,14 +234,14 @@ public class MessageHandler {
"The json to handle cannot be null");
}
if (getServerId(json) == -1) {
- getLogger()
- .severe("Response didn't contain a server id. "
- + "Please verify that the server is up-to-date and that the response data has not been modified in transmission.");
+ getLogger().severe("Response didn't contain a server id. "
+ + "Please verify that the server is up-to-date and that the response data has not been modified in transmission.");
}
if (connection.getApplicationState() == ApplicationState.RUNNING) {
handleJSON(json);
- } else if (connection.getApplicationState() == ApplicationState.INITIALIZING) {
+ } else if (connection
+ .getApplicationState() == ApplicationState.INITIALIZING) {
// Application is starting up for the first time
connection.setApplicationRunning(true);
connection.executeWhenCSSLoaded(new Command() {
@@ -249,9 +251,8 @@ public class MessageHandler {
}
});
} else {
- getLogger()
- .warning(
- "Ignored received message because application has already been stopped");
+ getLogger().warning(
+ "Ignored received message because application has already been stopped");
return;
}
}
@@ -264,9 +265,8 @@ public class MessageHandler {
// messages and ensure this is handled next. Otherwise we
// would keep waiting for an older message forever (if this
// is triggered by forceHandleMessage)
- getLogger().info(
- "Received resync message with id " + serverId
- + " while waiting for " + getExpectedServerId());
+ getLogger().info("Received resync message with id " + serverId
+ + " while waiting for " + getExpectedServerId());
lastSeenServerSyncId = serverId - 1;
removeOldPendingMessages();
}
@@ -286,21 +286,17 @@ public class MessageHandler {
// Unexpected server id
if (serverId <= lastSeenServerSyncId) {
// Why is the server re-sending an old package? Ignore it
- getLogger().warning(
- "Received message with server id " + serverId
- + " but have already seen "
- + lastSeenServerSyncId + ". Ignoring it");
+ getLogger().warning("Received message with server id "
+ + serverId + " but have already seen "
+ + lastSeenServerSyncId + ". Ignoring it");
endRequestIfResponse(json);
return;
}
// We are waiting for an earlier message...
- getLogger()
- .info("Received message with server id "
- + serverId
- + " but expected "
- + getExpectedServerId()
- + ". Postponing handling until the missing message(s) have been received");
+ getLogger().info("Received message with server id " + serverId
+ + " but expected " + getExpectedServerId()
+ + ". Postponing handling until the missing message(s) have been received");
}
pendingUIDLMessages.add(new PendingUIDLMessage(json));
if (!forceHandleMessage.isRunning()) {
@@ -364,8 +360,8 @@ public class MessageHandler {
connection.setResource(key, resources.getAsString(key));
}
}
- handleUIDLDuration.logDuration(
- " * Handling resources from server completed", 10);
+ handleUIDLDuration
+ .logDuration(" * Handling resources from server completed", 10);
getLogger().info(" * Handling type inheritance map from server");
@@ -379,20 +375,20 @@ public class MessageHandler {
getLogger().info("Handling type mappings from server");
if (json.containsKey("typeMappings")) {
- connection.getConfiguration()
- .addComponentMappings(json.getValueMap("typeMappings"),
- connection.getWidgetSet());
+ connection.getConfiguration().addComponentMappings(
+ json.getValueMap("typeMappings"),
+ connection.getWidgetSet());
}
getLogger().info("Handling resource dependencies");
if (json.containsKey("scriptDependencies")) {
- connection.loadScriptDependencies(json
- .getJSStringArray("scriptDependencies"));
+ connection.loadScriptDependencies(
+ json.getJSStringArray("scriptDependencies"));
}
if (json.containsKey("styleDependencies")) {
- connection.loadStyleDependencies(json
- .getJSStringArray("styleDependencies"));
+ connection.loadStyleDependencies(
+ json.getJSStringArray("styleDependencies"));
}
handleUIDLDuration.logDuration(
@@ -431,8 +427,8 @@ public class MessageHandler {
redirectTimer = new Timer() {
@Override
public void run() {
- WidgetUtil.redirect(timedRedirect
- .getString("url"));
+ WidgetUtil.redirect(
+ timedRedirect.getString("url"));
}
};
sessionExpirationInterval = timedRedirect
@@ -450,7 +446,8 @@ public class MessageHandler {
double processUidlStart = Duration.currentTimeMillis();
// Ensure that all connectors that we are about to update exist
- JsArrayString createdConnectorIds = createConnectorsIfNeeded(json);
+ JsArrayString createdConnectorIds = createConnectorsIfNeeded(
+ json);
// Update states, do not fire events
JsArrayObject<StateChangeEvent> pendingStateChangeEvents = updateConnectorState(
@@ -463,15 +460,17 @@ public class MessageHandler {
Profiler.enter("Handling locales");
getLogger().info(" * Handling locales");
// Store locale data
- LocaleService
- .addLocales(getUIConnector().getState().localeServiceState.localeData);
+ LocaleService.addLocales(getUIConnector()
+ .getState().localeServiceState.localeData);
Profiler.leave("Handling locales");
// Update hierarchy, do not fire events
- ConnectorHierarchyUpdateResult connectorHierarchyUpdateResult = updateConnectorHierarchy(json);
+ ConnectorHierarchyUpdateResult connectorHierarchyUpdateResult = updateConnectorHierarchy(
+ json);
// Fire hierarchy change events
- sendHierarchyChangeEvents(connectorHierarchyUpdateResult.events);
+ sendHierarchyChangeEvents(
+ connectorHierarchyUpdateResult.events);
updateCaptions(pendingStateChangeEvents,
connectorHierarchyUpdateResult.parentChangedIds);
@@ -489,20 +488,20 @@ public class MessageHandler {
if (json.containsKey("dd")) {
// response contains data for drag and drop service
- VDragAndDropManager.get().handleServerResponse(
- json.getValueMap("dd"));
+ VDragAndDropManager.get()
+ .handleServerResponse(json.getValueMap("dd"));
}
- int removed = unregisterRemovedConnectors(connectorHierarchyUpdateResult.detachedConnectorIds);
+ int removed = unregisterRemovedConnectors(
+ connectorHierarchyUpdateResult.detachedConnectorIds);
if (removed > 0 && !isResponse(json)) {
// Must acknowledge the removal using an XHR or server
// memory usage will keep growing
getUIConnector().sendAck();
}
- getLogger()
- .info("handleUIDLMessage: "
- + (Duration.currentTimeMillis() - processUidlStart)
- + " ms");
+ getLogger().info("handleUIDLMessage: "
+ + (Duration.currentTimeMillis() - processUidlStart)
+ + " ms");
updatingState = false;
@@ -516,8 +515,8 @@ public class MessageHandler {
layoutManager.layoutNow();
}
} catch (final Throwable e) {
- getLogger()
- .log(Level.SEVERE, "Error processing layouts", e);
+ getLogger().log(Level.SEVERE, "Error processing layouts",
+ e);
}
Profiler.leave("Layout processing");
@@ -546,18 +545,17 @@ public class MessageHandler {
// TODO build profiling for widget impl loading time
- lastProcessingTime = (int) ((new Date().getTime()) - start
- .getTime());
+ lastProcessingTime = (int) ((new Date().getTime())
+ - start.getTime());
totalProcessingTime += lastProcessingTime;
if (bootstrapTime == 0) {
double fetchStart = getFetchStartTime();
if (fetchStart != 0) {
- int time = (int) (Duration.currentTimeMillis() - fetchStart);
- getLogger().log(
- Level.INFO,
- "First response processed " + time
- + " ms after fetchStart");
+ int time = (int) (Duration.currentTimeMillis()
+ - fetchStart);
+ getLogger().log(Level.INFO, "First response processed "
+ + time + " ms after fetchStart");
}
bootstrapTime = calculateBootstrapTime();
@@ -566,9 +564,8 @@ public class MessageHandler {
}
}
- getLogger().info(
- " Processing time was "
- + String.valueOf(lastProcessingTime) + "ms");
+ getLogger().info(" Processing time was "
+ + String.valueOf(lastProcessingTime) + "ms");
getLogger().info(
"Referenced paintables: " + getConnectorMap().size());
@@ -607,13 +604,16 @@ public class MessageHandler {
.cast();
// Update hierarchy based on the fake response
- ConnectorHierarchyUpdateResult connectorHierarchyUpdateResult = updateConnectorHierarchy(fakeValueMap);
+ ConnectorHierarchyUpdateResult connectorHierarchyUpdateResult = updateConnectorHierarchy(
+ fakeValueMap);
// Send hierarchy events based on the fake update
- sendHierarchyChangeEvents(connectorHierarchyUpdateResult.events);
+ sendHierarchyChangeEvents(
+ connectorHierarchyUpdateResult.events);
// Unregister all the old connectors that have now been removed
- unregisterRemovedConnectors(connectorHierarchyUpdateResult.detachedConnectorIds);
+ unregisterRemovedConnectors(
+ connectorHierarchyUpdateResult.detachedConnectorIds);
getLayoutManager().cleanMeasuredSizes();
}
@@ -654,10 +654,12 @@ public class MessageHandler {
.delegateCaptionHandling()) {
ServerConnector parent = child.getParent();
if (parent instanceof HasComponentsConnector) {
- Profiler.enter("HasComponentsConnector.updateCaption");
+ Profiler.enter(
+ "HasComponentsConnector.updateCaption");
((HasComponentsConnector) parent)
.updateCaption((ComponentConnector) child);
- Profiler.leave("HasComponentsConnector.updateCaption");
+ Profiler.leave(
+ "HasComponentsConnector.updateCaption");
}
}
}
@@ -725,28 +727,29 @@ public class MessageHandler {
.getReturnType();
Widget widget = component.getWidget();
- Object propertyValue = property.getValue(component
- .getState());
+ Object propertyValue = property
+ .getValue(component.getState());
widgetType.getMethod(methodName).invoke(widget,
propertyValue);
} catch (NoDataException e) {
throw new RuntimeException(
"Missing data needed to invoke @DelegateToWidget for "
- + component.getClass().getSimpleName(), e);
+ + component.getClass().getSimpleName(),
+ e);
}
}
/**
* Sends the state change events created while updating the state
* information.
- *
+ *
* This must be called after hierarchy change listeners have been
* called. At least caption updates for the parent are strange if
* fired from state change listeners and thus calls the parent
* BEFORE the parent is aware of the child (through a
* ConnectorHierarchyChangedEvent)
- *
+ *
* @param pendingStateChangeEvents
* The events to send
*/
@@ -770,7 +773,8 @@ public class MessageHandler {
}
private void verifyConnectorHierarchy() {
- Profiler.enter("verifyConnectorHierarchy - this is only performed in debug mode");
+ Profiler.enter(
+ "verifyConnectorHierarchy - this is only performed in debug mode");
JsArrayObject<ServerConnector> currentConnectors = getConnectorMap()
.getConnectorsAsJsArray();
@@ -779,31 +783,29 @@ public class MessageHandler {
ServerConnector c = currentConnectors.get(i);
if (c.getParent() != null) {
if (!c.getParent().getChildren().contains(c)) {
- getLogger()
- .severe("ERROR: Connector "
- + c.getConnectorId()
- + " is connected to a parent but the parent ("
- + c.getParent().getConnectorId()
- + ") does not contain the connector");
+ getLogger().severe("ERROR: Connector "
+ + c.getConnectorId()
+ + " is connected to a parent but the parent ("
+ + c.getParent().getConnectorId()
+ + ") does not contain the connector");
}
} else if (c == getUIConnector()) {
// UIConnector for this connection, ignore
- } else if (c instanceof WindowConnector
- && getUIConnector().hasSubWindow(
- (WindowConnector) c)) {
+ } else if (c instanceof WindowConnector && getUIConnector()
+ .hasSubWindow((WindowConnector) c)) {
// Sub window attached to this UIConnector, ignore
} else {
// The connector has been detached from the
// hierarchy but was not unregistered.
- getLogger()
- .severe("ERROR: Connector "
- + c.getConnectorId()
- + " is not attached to a parent but has not been unregistered");
+ getLogger().severe("ERROR: Connector "
+ + c.getConnectorId()
+ + " is not attached to a parent but has not been unregistered");
}
}
- Profiler.leave("verifyConnectorHierarchy - this is only performed in debug mode");
+ Profiler.leave(
+ "verifyConnectorHierarchy - this is only performed in debug mode");
}
private int unregisterRemovedConnectors(
@@ -813,12 +815,14 @@ public class MessageHandler {
JsArrayString detachedArray = detachedConnectors.dump();
int nrDetached = detachedArray.length();
for (int i = 0; i < nrDetached; i++) {
- ServerConnector connector = getConnectorMap().getConnector(
- detachedArray.get(i));
+ ServerConnector connector = getConnectorMap()
+ .getConnector(detachedArray.get(i));
- Profiler.enter("unregisterRemovedConnectors unregisterConnector");
+ Profiler.enter(
+ "unregisterRemovedConnectors unregisterConnector");
getConnectorMap().unregisterConnector(connector);
- Profiler.leave("unregisterRemovedConnectors unregisterConnector");
+ Profiler.leave(
+ "unregisterRemovedConnectors unregisterConnector");
}
if (ApplicationConfiguration.isDebugMode()) {
@@ -836,8 +840,8 @@ public class MessageHandler {
private JsArrayString createConnectorsIfNeeded(ValueMap json) {
getLogger().info(" * Creating connectors (if needed)");
- JsArrayString createdConnectors = JavaScriptObject
- .createArray().cast();
+ JsArrayString createdConnectors = JavaScriptObject.createArray()
+ .cast();
if (!json.containsKey("types")) {
return createdConnectors;
}
@@ -859,8 +863,8 @@ public class MessageHandler {
// connector
onlyNoLayoutUpdates = false;
- int connectorType = Integer.parseInt(types
- .getString(connectorId));
+ int connectorType = Integer
+ .parseInt(types.getString(connectorId));
Class<? extends ServerConnector> connectorClass = connection
.getConfiguration()
@@ -869,10 +873,12 @@ public class MessageHandler {
// Connector does not exist so we must create it
if (connectorClass != getUIConnector().getClass()) {
// create, initialize and register the paintable
- Profiler.enter("ApplicationConnection.getConnector");
+ Profiler.enter(
+ "ApplicationConnection.getConnector");
connector = connection.getConnector(connectorId,
connectorType);
- Profiler.leave("ApplicationConnection.getConnector");
+ Profiler.leave(
+ "ApplicationConnection.getConnector");
createdConnectors.push(connectorId);
} else {
@@ -921,9 +927,8 @@ public class MessageHandler {
if (legacyConnector instanceof Paintable) {
String key = null;
if (Profiler.isEnabled()) {
- key = "updateFromUIDL for "
- + legacyConnector.getClass()
- .getSimpleName();
+ key = "updateFromUIDL for " + legacyConnector
+ .getClass().getSimpleName();
Profiler.enter(key);
}
@@ -934,15 +939,15 @@ public class MessageHandler {
Profiler.leave(key);
}
} else if (legacyConnector == null) {
- getLogger()
- .severe("Received update for "
- + uidl.getTag()
+ getLogger().severe(
+ "Received update for " + uidl.getTag()
+ ", but there is no such paintable ("
+ connectorId + ") rendered.");
} else {
getLogger()
.severe("Server sent Vaadin 6 style updates for "
- + Util.getConnectorString(legacyConnector)
+ + Util.getConnectorString(
+ legacyConnector)
+ " but this is not a Vaadin 6 Paintable");
}
@@ -977,15 +982,15 @@ public class MessageHandler {
Profiler.leave("sendHierarchyChangeEvents");
}
- private void logHierarchyChange(ConnectorHierarchyChangeEvent event) {
+ private void logHierarchyChange(
+ ConnectorHierarchyChangeEvent event) {
if (true) {
// Always disabled for now. Can be enabled manually
return;
}
- getLogger()
- .info("Hierarchy changed for "
- + Util.getConnectorString(event.getConnector()));
+ getLogger().info("Hierarchy changed for "
+ + Util.getConnectorString(event.getConnector()));
String oldChildren = "* Old children: ";
for (ComponentConnector child : event.getOldChildren()) {
oldChildren += Util.getConnectorString(child) + " ";
@@ -1041,11 +1046,12 @@ public class MessageHandler {
}
SharedState state = connector.getState();
- Type stateType = new Type(state.getClass()
- .getName(), null);
+ Type stateType = new Type(
+ state.getClass().getName(), null);
if (onlyNoLayoutUpdates) {
- Profiler.enter("updateConnectorState @NoLayout handling");
+ Profiler.enter(
+ "updateConnectorState @NoLayout handling");
for (String propertyName : stateJson.keys()) {
Property property = stateType
.getProperty(propertyName);
@@ -1054,12 +1060,13 @@ public class MessageHandler {
break;
}
}
- Profiler.leave("updateConnectorState @NoLayout handling");
+ Profiler.leave(
+ "updateConnectorState @NoLayout handling");
}
Profiler.enter("updateConnectorState decodeValue");
- JsonDecoder.decodeValue(stateType, stateJson,
- state, connection);
+ JsonDecoder.decodeValue(stateType, stateJson, state,
+ connection);
Profiler.leave("updateConnectorState decodeValue");
if (Profiler.isEnabled()) {
@@ -1095,8 +1102,8 @@ public class MessageHandler {
int length = dump.length();
for (int i = 0; i < length; i++) {
String connectorId = dump.get(i);
- ServerConnector connector = getConnectorMap().getConnector(
- connectorId);
+ ServerConnector connector = getConnectorMap()
+ .getConnector(connectorId);
StateChangeEvent event = new StateChangeEvent(connector,
Json.createObject(), true);
@@ -1115,7 +1122,7 @@ public class MessageHandler {
* Updates the connector hierarchy and returns a list of events that
* should be fired after update of the hierarchy and the state is
* done.
- *
+ *
* @param json
* The JSON containing the hierarchy information
* @return A collection of events that should be fired when update
@@ -1143,8 +1150,8 @@ public class MessageHandler {
.getJSStringArray(connectorId);
hasHierarchy.add(connectorId);
- updateConnectorHierarchy(connectorId,
- childConnectorIds, maybeDetached, result);
+ updateConnectorHierarchy(connectorId, childConnectorIds,
+ maybeDetached, result);
}
}
@@ -1166,7 +1173,8 @@ public class MessageHandler {
}
}
- Profiler.enter("updateConnectorHierarchy detach removed connectors");
+ Profiler.enter(
+ "updateConnectorHierarchy detach removed connectors");
/*
* Connector is in maybeDetached at this point if it has been
@@ -1174,13 +1182,14 @@ public class MessageHandler {
*/
JsArrayString maybeDetachedArray = maybeDetached.dump();
for (int i = 0; i < maybeDetachedArray.length(); i++) {
- ServerConnector removed = getConnectorMap().getConnector(
- maybeDetachedArray.get(i));
+ ServerConnector removed = getConnectorMap()
+ .getConnector(maybeDetachedArray.get(i));
recursivelyDetach(removed, result.events,
result.detachedConnectorIds);
}
- Profiler.leave("updateConnectorHierarchy detach removed connectors");
+ Profiler.leave(
+ "updateConnectorHierarchy detach removed connectors");
if (result.events.size() != 0) {
onlyNoLayoutUpdates = false;
@@ -1194,7 +1203,7 @@ public class MessageHandler {
/**
* Updates the hierarchy for a connector
- *
+ *
* @param connectorId
* the id of the connector to update
* @param childConnectorIds
@@ -1217,7 +1226,8 @@ public class MessageHandler {
.getConnector(connectorId);
int childConnectorSize = childConnectorIds.length();
- Profiler.enter("updateConnectorHierarchy find new connectors");
+ Profiler.enter(
+ "updateConnectorHierarchy find new connectors");
List<ServerConnector> newChildren = new ArrayList<ServerConnector>();
List<ComponentConnector> newComponents = new ArrayList<ComponentConnector>();
@@ -1227,18 +1237,14 @@ public class MessageHandler {
ServerConnector childConnector = connectorMap
.getConnector(childConnectorId);
if (childConnector == null) {
- getLogger()
- .severe("Hierarchy claims that "
- + childConnectorId
- + " is a child for "
- + connectorId
- + " ("
- + parentConnector.getClass()
- .getName()
- + ") but no connector with id "
- + childConnectorId
- + " has been registered. "
- + "More information might be available in the server-side log if assertions are enabled");
+ getLogger().severe("Hierarchy claims that "
+ + childConnectorId + " is a child for "
+ + connectorId + " ("
+ + parentConnector.getClass().getName()
+ + ") but no connector with id "
+ + childConnectorId
+ + " has been registered. "
+ + "More information might be available in the server-side log if assertions are enabled");
continue;
}
newChildren.add(childConnector);
@@ -1246,9 +1252,9 @@ public class MessageHandler {
newComponents
.add((ComponentConnector) childConnector);
} else if (!(childConnector instanceof AbstractExtensionConnector)) {
- throw new IllegalStateException(
- Util.getConnectorString(childConnector)
- + " is not a ComponentConnector nor an AbstractExtensionConnector");
+ throw new IllegalStateException(Util
+ .getConnectorString(childConnector)
+ + " is not a ComponentConnector nor an AbstractExtensionConnector");
}
if (childConnector.getParent() != parentConnector) {
childConnector.setParent(parentConnector);
@@ -1259,21 +1265,23 @@ public class MessageHandler {
}
}
- Profiler.leave("updateConnectorHierarchy find new connectors");
+ Profiler.leave(
+ "updateConnectorHierarchy find new connectors");
// TODO This check should be done on the server side in
// the future so the hierarchy update is only sent when
// something actually has changed
List<ServerConnector> oldChildren = parentConnector
.getChildren();
- boolean actuallyChanged = !Util.collectionsEquals(
- oldChildren, newChildren);
+ boolean actuallyChanged = !Util
+ .collectionsEquals(oldChildren, newChildren);
if (!actuallyChanged) {
return;
}
- Profiler.enter("updateConnectorHierarchy handle HasComponentsConnector");
+ Profiler.enter(
+ "updateConnectorHierarchy handle HasComponentsConnector");
if (parentConnector instanceof HasComponentsConnector) {
HasComponentsConnector ccc = (HasComponentsConnector) parentConnector;
@@ -1283,27 +1291,28 @@ public class MessageHandler {
newComponents)) {
// Fire change event if the hierarchy has
// changed
- ConnectorHierarchyChangeEvent event = GWT
- .create(ConnectorHierarchyChangeEvent.class);
+ ConnectorHierarchyChangeEvent event = GWT.create(
+ ConnectorHierarchyChangeEvent.class);
event.setOldChildren(oldComponents);
event.setConnector(parentConnector);
ccc.setChildComponents(newComponents);
result.events.add(event);
}
} else if (!newComponents.isEmpty()) {
- getLogger()
- .severe("Hierachy claims "
- + Util.getConnectorString(parentConnector)
- + " has component children even though it isn't a HasComponentsConnector");
+ getLogger().severe("Hierachy claims "
+ + Util.getConnectorString(parentConnector)
+ + " has component children even though it isn't a HasComponentsConnector");
}
- Profiler.leave("updateConnectorHierarchy handle HasComponentsConnector");
+ Profiler.leave(
+ "updateConnectorHierarchy handle HasComponentsConnector");
Profiler.enter("updateConnectorHierarchy setChildren");
parentConnector.setChildren(newChildren);
Profiler.leave("updateConnectorHierarchy setChildren");
- Profiler.enter("updateConnectorHierarchy find removed children");
+ Profiler.enter(
+ "updateConnectorHierarchy find removed children");
/*
* Find children removed from this parent and mark for
@@ -1325,7 +1334,8 @@ public class MessageHandler {
}
}
- Profiler.leave("updateConnectorHierarchy find removed children");
+ Profiler.leave(
+ "updateConnectorHierarchy find removed children");
} catch (final Throwable e) {
getLogger().log(Level.SEVERE,
"Error updating connector hierarchy", e);
@@ -1412,20 +1422,20 @@ public class MessageHandler {
/*
* Clear child list and parent
*/
- Profiler.enter(prefix
- + "recursivelyDetach clear children and parent");
+ Profiler.enter(
+ prefix + "recursivelyDetach clear children and parent");
connector
.setChildren(Collections.<ServerConnector> emptyList());
connector.setParent(null);
- Profiler.leave(prefix
- + "recursivelyDetach clear children and parent");
+ Profiler.leave(
+ prefix + "recursivelyDetach clear children and parent");
/*
* Create an artificial hierarchy event for containers to give
* it a chance to clean up after its children if it has any
*/
- Profiler.enter(prefix
- + "recursivelyDetach create hierarchy event");
+ Profiler.enter(
+ prefix + "recursivelyDetach create hierarchy event");
if (connector instanceof HasComponentsConnector) {
HasComponentsConnector ccc = (HasComponentsConnector) connector;
List<ComponentConnector> oldChildren = ccc
@@ -1435,8 +1445,8 @@ public class MessageHandler {
* HasComponentsConnector has a separate child component
* list that should also be cleared
*/
- ccc.setChildComponents(Collections
- .<ComponentConnector> emptyList());
+ ccc.setChildComponents(
+ Collections.<ComponentConnector> emptyList());
// Create event and add it to the list of pending events
ConnectorHierarchyChangeEvent event = GWT
@@ -1446,8 +1456,8 @@ public class MessageHandler {
events.add(event);
}
}
- Profiler.leave(prefix
- + "recursivelyDetach create hierarchy event");
+ Profiler.leave(
+ prefix + "recursivelyDetach create hierarchy event");
}
private native void replaceState(AbstractConnector connector,
@@ -1463,8 +1473,8 @@ public class MessageHandler {
getLogger()
.info(" * Performing server to client RPC calls");
- JsonArray rpcCalls = Util.jso2json(json
- .getJavaScriptObject("rpc"));
+ JsonArray rpcCalls = Util
+ .jso2json(json.getJavaScriptObject("rpc"));
int rpcLength = rpcCalls.length();
for (int i = 0; i < rpcLength; i++) {
@@ -1474,17 +1484,15 @@ public class MessageHandler {
.parseAndApplyInvocation(rpcCall,
connection);
- if (onlyNoLayoutUpdates
- && !RpcManager.getMethod(invocation)
- .isNoLayout()) {
+ if (onlyNoLayoutUpdates && !RpcManager
+ .getMethod(invocation).isNoLayout()) {
onlyNoLayoutUpdates = false;
}
} catch (final Throwable e) {
- getLogger()
- .log(Level.SEVERE,
- "Error performing server to client RPC calls",
- e);
+ getLogger().log(Level.SEVERE,
+ "Error performing server to client RPC calls",
+ e);
}
}
@@ -1557,18 +1565,16 @@ public class MessageHandler {
if (!responseHandlingLocks.isEmpty()) {
// Lock which was never release -> bug in locker or things just
// too slow
- getLogger()
- .warning(
- "WARNING: reponse handling was never resumed, forcibly removing locks...");
+ getLogger().warning(
+ "WARNING: reponse handling was never resumed, forcibly removing locks...");
responseHandlingLocks.clear();
} else {
// Waited for out-of-order message which never arrived
// Do one final check and resynchronize if the message is not
// there. The final check is only a precaution as this timer
// should have been cancelled if the message has arrived
- getLogger().warning(
- "Gave up waiting for message " + getExpectedServerId()
- + " from the server");
+ getLogger().warning("Gave up waiting for message "
+ + getExpectedServerId() + " from the server");
}
if (!handlePendingMessages() && !pendingUIDLMessages.isEmpty()) {
@@ -1584,7 +1590,7 @@ public class MessageHandler {
/**
* This method can be used to postpone rendering of a response for a short
* period of time (e.g. to avoid the rendering process during animation).
- *
+ *
* @param lock
*/
public void suspendReponseHandling(Object lock) {
@@ -1593,7 +1599,7 @@ public class MessageHandler {
/**
* Resumes the rendering process once all locks have been removed.
- *
+ *
* @param lock
*/
public void resumeResponseHandling(Object lock) {
@@ -1603,8 +1609,8 @@ public class MessageHandler {
forceHandleMessage.cancel();
if (!pendingUIDLMessages.isEmpty()) {
- getLogger()
- .info("No more response handling locks, handling pending requests.");
+ getLogger().info(
+ "No more response handling locks, handling pending requests.");
handlePendingMessages();
}
}
@@ -1623,7 +1629,7 @@ public class MessageHandler {
/**
* Finds the next pending UIDL message and handles it (next pending is
* decided based on the server id)
- *
+ *
* @return true if a message was handled, false otherwise
*/
private boolean handlePendingMessages() {
@@ -1676,7 +1682,7 @@ public class MessageHandler {
* server is received.
* <p>
* The initial id when no request has yet been processed is -1.
- *
+ *
* @return an id identifying the response
*/
public int getLastSeenServerSyncId() {
@@ -1686,7 +1692,7 @@ public class MessageHandler {
/**
* Gets the token (aka double submit cookie) that the server uses to protect
* against Cross Site Request Forgery attacks.
- *
+ *
* @return the CSRF token string
*/
public String getCsrfToken() {
@@ -1698,7 +1704,7 @@ public class MessageHandler {
* operations are not allowed when the internal state of the application
* might be in an inconsistent state because some state changes have been
* applied but others not. This includes running layotus.
- *
+ *
* @return <code>true</code> if the internal state might be inconsistent
* because changes are being processed; <code>false</code> if the
* state should be consistent
@@ -1709,7 +1715,7 @@ public class MessageHandler {
/**
* Checks if the first UIDL has been handled
- *
+ *
* @return true if the initial UIDL has already been processed, false
* otherwise
*/
@@ -1739,9 +1745,9 @@ public class MessageHandler {
/**
* Strips the JSON wrapping from the given json string with wrapping.
- *
+ *
* If the given string is not wrapped as expected, returns null
- *
+ *
* @since 7.6
* @param jsonWithWrapping
* the JSON received from the server
@@ -1763,7 +1769,7 @@ public class MessageHandler {
/**
* Unwraps and parses the given JSON, originating from the server
- *
+ *
* @param jsonText
* the json from the server
* @return A parsed ValueMap or null if the input could not be parsed (or
@@ -1776,10 +1782,9 @@ public class MessageHandler {
final double start = Profiler.getRelativeTimeMillis();
try {
ValueMap json = parseJSONResponse(jsonText);
- getLogger().info(
- "JSON parsing took "
- + Util.round(Profiler.getRelativeTimeMillis()
- - start, 3) + "ms");
+ getLogger().info("JSON parsing took "
+ + Util.round(Profiler.getRelativeTimeMillis() - start, 3)
+ + "ms");
return json;
} catch (final Exception e) {
getLogger().severe("Unable to parse JSON: " + jsonText);
@@ -1798,7 +1803,7 @@ public class MessageHandler {
/**
* Parse the given wrapped JSON, received from the server, to a ValueMap
- *
+ *
* @param wrappedJsonText
* the json, wrapped as done by the server
* @return a ValueMap, or null if the wrapping was incorrect or json could
diff --git a/client/src/main/java/com/vaadin/client/communication/MessageSender.java b/client/src/main/java/com/vaadin/client/communication/MessageSender.java
index 5862809b0c..22e3e8d420 100644
--- a/client/src/main/java/com/vaadin/client/communication/MessageSender.java
+++ b/client/src/main/java/com/vaadin/client/communication/MessageSender.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -40,7 +40,7 @@ import elemental.json.JsonValue;
* <p>
* Internally uses {@link XhrConnection} and/or {@link PushConnection} for
* delivering messages, depending on the application configuration.
- *
+ *
* @since 7.6
* @author Vaadin Ltd
*/
@@ -78,9 +78,8 @@ public class MessageSender {
public void sendInvocationsToServer() {
if (!connection.isApplicationRunning()) {
- getLogger()
- .warning(
- "Trying to send RPC from not yet started or stopped application");
+ getLogger().warning(
+ "Trying to send RPC from not yet started or stopped application");
return;
}
@@ -95,7 +94,7 @@ public class MessageSender {
/**
* Sends all pending method invocations (server RPC and legacy variable
* changes) to the server.
- *
+ *
*/
private void doSendInvocationsToServer() {
@@ -115,9 +114,8 @@ public class MessageSender {
if (reqJson.length() == 0) {
// Nothing to send, all invocations were filtered out (for
// non-existing connectors)
- getLogger()
- .warning(
- "All RPCs filtered out, not sending anything to the server");
+ getLogger().warning(
+ "All RPCs filtered out, not sending anything to the server");
return;
}
@@ -139,7 +137,7 @@ public class MessageSender {
/**
* Makes an UIDL request to the server.
- *
+ *
* @param reqInvocations
* Data containing RPC invocations and all related information.
* @param extraParams
@@ -155,8 +153,8 @@ public class MessageSender {
payload.put(ApplicationConstants.CSRF_TOKEN, csrfToken);
}
payload.put(ApplicationConstants.RPC_INVOCATIONS, reqInvocations);
- payload.put(ApplicationConstants.SERVER_SYNC_ID, getMessageHandler()
- .getLastSeenServerSyncId());
+ payload.put(ApplicationConstants.SERVER_SYNC_ID,
+ getMessageHandler().getLastSeenServerSyncId());
payload.put(ApplicationConstants.CLIENT_TO_SERVER_ID,
clientToServerMessageId++);
@@ -174,7 +172,7 @@ public class MessageSender {
/**
* Sends an asynchronous or synchronous UIDL request to the server using the
* given URI.
- *
+ *
* @param uri
* The URI to use for the request. May includes GET parameters
* @param payload
@@ -190,7 +188,7 @@ public class MessageSender {
/**
* Sets the status for the push connection.
- *
+ *
* @param enabled
* <code>true</code> to enable the push connection;
* <code>false</code> to disable the push connection.
@@ -257,9 +255,8 @@ public class MessageSender {
Scheduler.get().scheduleDeferred(new Command() {
@Override
public void execute() {
- if (!connection.isApplicationRunning()
- || !(hasActiveRequest() || getServerRpcQueue()
- .isFlushPending())) {
+ if (!connection.isApplicationRunning() || !(hasActiveRequest()
+ || getServerRpcQueue().isFlushPending())) {
getLoadingIndicator().hide();
// If on Liferay and session expiration management is in
@@ -278,7 +275,7 @@ public class MessageSender {
/**
* Runs possibly registered client side post request hooks. This is expected
* to be run after each uidl request made by Vaadin application.
- *
+ *
* @param appId
*/
public static native void runPostRequestHooks(String appId)
@@ -298,7 +295,7 @@ public class MessageSender {
/**
* If on Liferay and logged in, ask the client side session management
* JavaScript to extend the session duration.
- *
+ *
* Otherwise, Liferay client side JavaScript will explicitly expire the
* session even though the server side considers the session to be active.
* See ticket #8305 for more information.
@@ -317,7 +314,7 @@ public class MessageSender {
/**
* Indicates whether or not there are currently active UIDL requests. Used
* internally to sequence requests properly, seldom needed in Widgets.
- *
+ *
* @return true if there are active requests
*/
public boolean hasActiveRequest() {
@@ -327,7 +324,7 @@ public class MessageSender {
/**
* Returns a human readable string representation of the method used to
* communicate with the server.
- *
+ *
* @return A string representation of the current transport type
*/
public String getCommunicationMethodName() {
@@ -369,7 +366,7 @@ public class MessageSender {
/**
* Used internally to update what the server expects
- *
+ *
* @param clientToServerMessageId
* the new client id to set
* @param force
@@ -392,9 +389,8 @@ public class MessageSender {
// We have never sent a message to the server, so likely the
// server knows better (typical case is that we refreshed a
// @PreserveOnRefresh UI)
- getLogger().info(
- "Updating client-to-server id to " + nextExpectedId
- + " based on server");
+ getLogger().info("Updating client-to-server id to "
+ + nextExpectedId + " based on server");
} else {
getLogger().warning(
"Server expects next client-to-server id to be "
diff --git a/client/src/main/java/com/vaadin/client/communication/PushConnection.java b/client/src/main/java/com/vaadin/client/communication/PushConnection.java
index 489d2c39a4..ae3e698dbc 100644
--- a/client/src/main/java/com/vaadin/client/communication/PushConnection.java
+++ b/client/src/main/java/com/vaadin/client/communication/PushConnection.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import elemental.json.JsonObject;
* receive UIDL messages from the server (either asynchronously or as a response
* to a UIDL request.) Delegates the UIDL handling to the
* {@link ApplicationConnection}.
- *
+ *
* @author Vaadin Ltd
* @since 7.1
*/
@@ -36,7 +36,7 @@ public interface PushConnection {
/**
* Two-phase construction to allow using GWT.create().
- *
+ *
* @param connection
* The ApplicationConnection
*/
@@ -49,17 +49,17 @@ public interface PushConnection {
* <p>
* Implementation detail: If the push connection is not connected and the
* message can thus not be sent, the implementation must call
- * {@link ConnectionStateHandler#pushNotConnected(JsonObject)}, which
- * will retry the send later.
+ * {@link ConnectionStateHandler#pushNotConnected(JsonObject)}, which will
+ * retry the send later.
* <p>
* This method must not be called if the push connection is not
* bidirectional (if {@link #isBidirectional()} returns false)
- *
+ *
* @param payload
* the payload to push
* @throws IllegalStateException
* if this connection is not active
- *
+ *
* @see #isActive()
*/
public void push(JsonObject payload);
@@ -68,7 +68,7 @@ public interface PushConnection {
* Checks whether this push connection is in a state where it can push
* messages to the server. A connection is active until
* {@link #disconnect(Command)} has been called.
- *
+ *
* @return <code>true</code> if this connection can accept new messages;
* <code>false</code> if this connection is disconnected or
* disconnecting.
@@ -85,7 +85,7 @@ public interface PushConnection {
* After this method has been called, {@link #isActive()} returns
* <code>false</code>. Calling this method for a connection that is no
* longer active will throw an exception.
- *
+ *
* @param command
* callback command invoked when the connection has been properly
* disconnected
@@ -97,7 +97,7 @@ public interface PushConnection {
/**
* Returns a human readable string representation of the transport type used
* to communicate with the server.
- *
+ *
* @since 7.1
* @return A human readable string representation of the transport type
*/
@@ -107,10 +107,10 @@ public interface PushConnection {
* Checks whether this push connection should be used for communication in
* both directions or if an XHR should be used for client to server
* communication.
- *
+ *
* A bidirectional push connection must be able to reliably inform about its
* connection state.
- *
+ *
* @since 7.6
* @return true if the push connection should be used for messages in both
* directions, false if it should only be used for server to client
diff --git a/client/src/main/java/com/vaadin/client/communication/ReconnectDialog.java b/client/src/main/java/com/vaadin/client/communication/ReconnectDialog.java
index 1e77eb63b8..146d6de39b 100644
--- a/client/src/main/java/com/vaadin/client/communication/ReconnectDialog.java
+++ b/client/src/main/java/com/vaadin/client/communication/ReconnectDialog.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import com.vaadin.client.ApplicationConnection;
/**
* Interface which must be implemented by the reconnect dialog
- *
+ *
* @since 7.6
* @author Vaadin Ltd
*/
@@ -27,7 +27,7 @@ public interface ReconnectDialog {
/**
* Sets the main text shown in the dialog
- *
+ *
* @param text
* the text to show
*/
@@ -36,7 +36,7 @@ public interface ReconnectDialog {
/**
* Sets the reconnecting state, which is true if we are trying to
* re-establish a connection with the server.
- *
+ *
* @param reconnecting
* true if we are trying to re-establish the server connection,
* false if we have given up
@@ -45,14 +45,14 @@ public interface ReconnectDialog {
/**
* Checks if the reconnect dialog is visible to the user
- *
+ *
* @return true if the user can see the dialog, false otherwise
*/
boolean isVisible();
/**
* Shows the dialog to the user
- *
+ *
* @param connection
* the application connection this is related to
*/
@@ -69,7 +69,7 @@ public interface ReconnectDialog {
* not modal, the user can continue to use the application as normally and
* all server events will be queued until connection has been
* re-established.
- *
+ *
* @param modal
* true to make the dialog modal, false to allow usage while
* dialog is shown
@@ -78,7 +78,7 @@ public interface ReconnectDialog {
/**
* Checks the modality of the dialog.
- *
+ *
* @see #setModal(boolean)
* @return true if the dialog is modal, false otherwise
*/
diff --git a/client/src/main/java/com/vaadin/client/communication/RpcManager.java b/client/src/main/java/com/vaadin/client/communication/RpcManager.java
index dfcfb47f46..7252823355 100644
--- a/client/src/main/java/com/vaadin/client/communication/RpcManager.java
+++ b/client/src/main/java/com/vaadin/client/communication/RpcManager.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -33,17 +33,17 @@ import elemental.json.JsonArray;
/**
* Client side RPC manager that can invoke methods based on RPC calls received
* from the server.
- *
+ *
* A GWT generator is used to create an implementation of this class at
* run-time.
- *
+ *
* @since 7.0
*/
public class RpcManager {
/**
* Perform server to client RPC invocation.
- *
+ *
* @param invocation
* method to invoke
*/
@@ -58,18 +58,19 @@ public class RpcManager {
method.invoke(clientRpc, invocation.getParameters());
}
} catch (NoDataException e) {
- throw new IllegalStateException("There is no information about "
- + method.getSignature()
- + ". Did you remember to compile the right widgetset?", e);
+ throw new IllegalStateException(
+ "There is no information about " + method.getSignature()
+ + ". Did you remember to compile the right widgetset?",
+ e);
}
}
/**
* Gets the method that an invocation targets.
- *
+ *
* @param invocation
* the method invocation to get the method for
- *
+ *
* @since 7.4
* @return the method targeted by this invocation
*/
@@ -91,9 +92,10 @@ public class RpcManager {
Type[] parameterTypes = method.getParameterTypes();
return parameterTypes;
} catch (NoDataException e) {
- throw new IllegalStateException("There is no information about "
- + method.getSignature()
- + ". Did you remember to compile the right widgetset?", e);
+ throw new IllegalStateException(
+ "There is no information about " + method.getSignature()
+ + ". Did you remember to compile the right widgetset?",
+ e);
}
}
@@ -112,13 +114,12 @@ public class RpcManager {
interfaceName, methodName);
if (connector instanceof HasJavaScriptConnectorHelper) {
((HasJavaScriptConnectorHelper) connector)
- .getJavascriptConnectorHelper().invokeJsRpc(invocation,
- parametersJson);
+ .getJavascriptConnectorHelper()
+ .invokeJsRpc(invocation, parametersJson);
} else {
if (connector == null) {
- throw new IllegalStateException("Target connector ("
- + connector + ") not found for RCC to "
- + getSignature(invocation));
+ throw new IllegalStateException("Target connector (" + connector
+ + ") not found for RCC to " + getSignature(invocation));
}
parseMethodParameters(invocation, parametersJson, connection);
diff --git a/client/src/main/java/com/vaadin/client/communication/RpcProxy.java b/client/src/main/java/com/vaadin/client/communication/RpcProxy.java
index b757590f77..8808a8a6ef 100644
--- a/client/src/main/java/com/vaadin/client/communication/RpcProxy.java
+++ b/client/src/main/java/com/vaadin/client/communication/RpcProxy.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.shared.communication.ServerRpc;
/**
* Class for creating proxy instances for Client to Server RPC.
- *
+ *
* @since 7.0
*/
public class RpcProxy {
@@ -36,14 +36,14 @@ public class RpcProxy {
return (T) TypeData.getType(rpcInterface).createProxy(
new RpcInvokationHandler(rpcInterface, connector));
} catch (NoDataException e) {
- throw new IllegalStateException("There is no information about "
- + rpcInterface
- + ". Did you forget to compile the widgetset?");
+ throw new IllegalStateException(
+ "There is no information about " + rpcInterface
+ + ". Did you forget to compile the widgetset?");
}
}
- private static final class RpcInvokationHandler implements
- InvokationHandler {
+ private static final class RpcInvokationHandler
+ implements InvokationHandler {
private final Class<?> rpcInterface;
private final ServerConnector connector;
@@ -58,8 +58,8 @@ public class RpcProxy {
MethodInvocation invocation = new MethodInvocation(
connector.getConnectorId(), rpcInterface.getName(),
method.getName(), params);
- ServerRpcQueue serverRpcQueue = ServerRpcQueue.get(connector
- .getConnection());
+ ServerRpcQueue serverRpcQueue = ServerRpcQueue
+ .get(connector.getConnection());
serverRpcQueue.add(invocation, method.isLastOnly());
if (!method.isDelayed()) {
serverRpcQueue.flush();
diff --git a/client/src/main/java/com/vaadin/client/communication/ServerRpcQueue.java b/client/src/main/java/com/vaadin/client/communication/ServerRpcQueue.java
index f6d2097e98..157d23e7b6 100644
--- a/client/src/main/java/com/vaadin/client/communication/ServerRpcQueue.java
+++ b/client/src/main/java/com/vaadin/client/communication/ServerRpcQueue.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -38,7 +38,7 @@ import elemental.json.JsonValue;
/**
* Manages the queue of server invocations (RPC) which are waiting to be sent to
* the server.
- *
+ *
* @since 7.6
* @author Vaadin Ltd
*/
@@ -83,7 +83,7 @@ public class ServerRpcQueue {
/**
* Removes any pending invocation of the given method from the queue
- *
+ *
* @param invocation
* The invocation to remove
*/
@@ -100,7 +100,7 @@ public class ServerRpcQueue {
/**
* Adds an explicit RPC method invocation to the send queue.
- *
+ *
* @param invocation
* RPC method invocation
* @param delayed
@@ -118,15 +118,15 @@ public class ServerRpcQueue {
*/
public void add(MethodInvocation invocation, boolean lastOnly) {
if (!connection.isApplicationRunning()) {
- getLogger()
- .warning(
- "Trying to invoke method on not yet started or stopped application");
+ getLogger().warning(
+ "Trying to invoke method on not yet started or stopped application");
return;
}
String tag;
if (lastOnly) {
tag = invocation.getLastOnlyTag();
- assert !tag.matches("\\d+") : "getLastOnlyTag value must have at least one non-digit character";
+ assert !tag.matches(
+ "\\d+") : "getLastOnlyTag value must have at least one non-digit character";
pendingInvocations.remove(tag);
} else {
tag = Integer.toString(lastInvocationTag++);
@@ -138,7 +138,7 @@ public class ServerRpcQueue {
* Returns a collection of all queued method invocations
* <p>
* The returned collection must not be modified in any way
- *
+ *
* @return a collection of all queued method invocations
*/
public Collection<MethodInvocation> getAll() {
@@ -157,7 +157,7 @@ public class ServerRpcQueue {
/**
* Returns the current size of the queue
- *
+ *
* @return the number of invocations in the queue
*/
public int size() {
@@ -166,7 +166,7 @@ public class ServerRpcQueue {
/**
* Returns the server RPC queue for the given application
- *
+ *
* @param connection
* the application connection which owns the queue
* @return the server rpc queue for the given application
@@ -177,7 +177,7 @@ public class ServerRpcQueue {
/**
* Checks if the queue is empty
- *
+ *
* @return true if the queue is empty, false otherwise
*/
public boolean isEmpty() {
@@ -211,7 +211,7 @@ public class ServerRpcQueue {
/**
* Checks if a flush operation is pending
- *
+ *
* @return true if a flush is pending, false otherwise
*/
public boolean isFlushPending() {
@@ -221,7 +221,7 @@ public class ServerRpcQueue {
/**
* Checks if a loading indicator should be shown when the RPCs have been
* sent to the server and we are waiting for a response
- *
+ *
* @return true if a loading indicator should be shown, false otherwise
*/
public boolean showLoadingIndicator() {
@@ -244,7 +244,7 @@ public class ServerRpcQueue {
/**
* Returns the current invocations as JSON
- *
+ *
* @return the current invocations in a JSON format ready to be sent to the
* server
*/
@@ -257,9 +257,8 @@ public class ServerRpcQueue {
for (MethodInvocation invocation : getAll()) {
String connectorId = invocation.getConnectorId();
if (!connectorExists(connectorId)) {
- getLogger().info(
- "Ignoring RPC for removed connector: " + connectorId
- + ": " + invocation.toString());
+ getLogger().info("Ignoring RPC for removed connector: "
+ + connectorId + ": " + invocation.toString());
continue;
}
@@ -277,8 +276,8 @@ public class ServerRpcQueue {
Method method = type.getMethod(invocation.getMethodName());
parameterTypes = method.getParameterTypes();
} catch (NoDataException e) {
- throw new RuntimeException("No type data for "
- + invocation.toString(), e);
+ throw new RuntimeException(
+ "No type data for " + invocation.toString(), e);
}
}
@@ -303,7 +302,7 @@ public class ServerRpcQueue {
/**
* Checks if the connector with the given id is still ok to use (has not
* been removed)
- *
+ *
* @param connectorId
* the connector id to check
* @return true if the connector exists, false otherwise
@@ -316,7 +315,7 @@ public class ServerRpcQueue {
/**
* Checks if the given method invocation originates from Javascript
- *
+ *
* @param invocation
* the invocation to check
* @return true if the method invocation originates from javascript, false
@@ -329,15 +328,15 @@ public class ServerRpcQueue {
/**
* Checks if the given method invocation represents a Vaadin 6 variable
* change
- *
+ *
* @param invocation
* the invocation to check
* @return true if the method invocation is a legacy variable change, false
* otherwise
*/
public static boolean isLegacyVariableChange(MethodInvocation invocation) {
- return ApplicationConstants.UPDATE_VARIABLE_METHOD.equals(invocation
- .getInterfaceName())
+ return ApplicationConstants.UPDATE_VARIABLE_METHOD
+ .equals(invocation.getInterfaceName())
&& ApplicationConstants.UPDATE_VARIABLE_METHOD
.equals(invocation.getMethodName());
}
diff --git a/client/src/main/java/com/vaadin/client/communication/StateChangeEvent.java b/client/src/main/java/com/vaadin/client/communication/StateChangeEvent.java
index c2c1ceaea9..136e285a86 100644
--- a/client/src/main/java/com/vaadin/client/communication/StateChangeEvent.java
+++ b/client/src/main/java/com/vaadin/client/communication/StateChangeEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -33,8 +33,8 @@ import com.vaadin.client.ui.AbstractConnector;
import elemental.json.JsonObject;
-public class StateChangeEvent extends
- AbstractServerConnectorEvent<StateChangeHandler> {
+public class StateChangeEvent
+ extends AbstractServerConnectorEvent<StateChangeHandler> {
/**
* Type of this event, used by the event bus.
*/
@@ -65,7 +65,7 @@ public class StateChangeEvent extends
/**
* Creates a new state change event.
- *
+ *
* @param connector
* the event whose state has changed
* @param changedPropertiesSet
@@ -89,7 +89,7 @@ public class StateChangeEvent extends
/**
* Creates a new state change event.
- *
+ *
* @param connector
* the event whose state has changed
* @param changedProperties
@@ -107,7 +107,7 @@ public class StateChangeEvent extends
/**
* /** Creates a new state change event.
- *
+ *
* @param connector
* the event whose state has changed
* @param stateJson
@@ -131,7 +131,7 @@ public class StateChangeEvent extends
/**
* Event handler that gets notified whenever any part of the state has been
* updated by the server.
- *
+ *
* @author Vaadin Ltd
* @version @VERSION@
* @since 7.0.0
@@ -139,7 +139,7 @@ public class StateChangeEvent extends
public interface StateChangeHandler extends Serializable, EventHandler {
/**
* Notifies the event handler that the state has changed.
- *
+ *
* @param stateChangeEvent
* the state change event with details about the change
*/
@@ -148,9 +148,9 @@ public class StateChangeEvent extends
/**
* Gets the properties that have changed.
- *
+ *
* @return a set of names of the changed properties
- *
+ *
* @deprecated As of 7.0.1, use {@link #hasPropertyChanged(String)} instead
* for improved performance.
*/
@@ -167,16 +167,17 @@ public class StateChangeEvent extends
/**
* Gets the properties that have changed.
- *
+ *
* @return a set of names of the changed properties
- *
+ *
* @deprecated As of 7.0.1, use {@link #hasPropertyChanged(String)} instead
* for improved performance.
*/
@Deprecated
public FastStringSet getChangedPropertiesFastSet() {
if (changedProperties == null) {
- Profiler.enter("StateChangeEvent.getChangedPropertiesFastSet populate");
+ Profiler.enter(
+ "StateChangeEvent.getChangedPropertiesFastSet populate");
changedProperties = FastStringSet.create();
addJsonFields(stateJson, changedProperties, "");
@@ -186,14 +187,15 @@ public class StateChangeEvent extends
changedProperties, "");
}
- Profiler.leave("StateChangeEvent.getChangedPropertiesFastSet populate");
+ Profiler.leave(
+ "StateChangeEvent.getChangedPropertiesFastSet populate");
}
return changedProperties;
}
/**
* Checks whether the give property has changed.
- *
+ *
* @param property
* the name of the property to check
* @return <code>true</code> if the property has changed, else
@@ -224,7 +226,7 @@ public class StateChangeEvent extends
/**
* Checks whether the given property name (which might contains dots) is
* defined in some JavaScript object.
- *
+ *
* @param property
* the name of the property, might include dots to reference
* inner objects
@@ -255,7 +257,7 @@ public class StateChangeEvent extends
/**
* Recursively adds the names of all properties in the provided state type.
- *
+ *
* @param type
* the type to process
* @param changedProperties
@@ -282,15 +284,17 @@ public class StateChangeEvent extends
}
}
} catch (NoDataException e) {
- throw new IllegalStateException("No property info for " + type
- + ". Did you remember to compile the right widgetset?", e);
+ throw new IllegalStateException(
+ "No property info for " + type
+ + ". Did you remember to compile the right widgetset?",
+ e);
}
}
/**
* Recursively adds the names of all fields in all objects in the provided
* json object.
- *
+ *
* @param json
* the json object to process
* @param changedProperties
@@ -315,7 +319,7 @@ public class StateChangeEvent extends
/**
* Checks if the state change event is the first one for the given
* connector.
- *
+ *
* @since 7.1
* @return true if this is the first state change event for the connector,
* false otherwise
diff --git a/client/src/main/java/com/vaadin/client/communication/XhrConnection.java b/client/src/main/java/com/vaadin/client/communication/XhrConnection.java
index 11e3cf3cb7..69c9be8b21 100644
--- a/client/src/main/java/com/vaadin/client/communication/XhrConnection.java
+++ b/client/src/main/java/com/vaadin/client/communication/XhrConnection.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -45,7 +45,7 @@ import elemental.json.JsonObject;
/**
* Provides a connection to the /UIDL url on the server and knows how to send
* messages to that end point
- *
+ *
* @since 7.6
* @author Vaadin Ltd
*/
@@ -119,7 +119,7 @@ public class XhrConnection {
/**
* Sets the payload which was sent to the server
- *
+ *
* @param payload
* the payload which was sent to the server
*/
@@ -146,10 +146,9 @@ public class XhrConnection {
return;
}
- getLogger().info(
- "Server visit took "
- + Util.round(Profiler.getRelativeTimeMillis()
- - requestStartTime, 3) + "ms");
+ getLogger().info("Server visit took " + Util.round(
+ Profiler.getRelativeTimeMillis() - requestStartTime, 3)
+ + "ms");
// for(;;);["+ realJson +"]"
String responseText = response.getText();
@@ -170,7 +169,7 @@ public class XhrConnection {
/**
* Sets the relative time (see {@link Profiler#getRelativeTimeMillis()})
* when the request was sent.
- *
+ *
* @param requestStartTime
* the relative time when the request was sent
*/
@@ -182,7 +181,7 @@ public class XhrConnection {
/**
* Sends an asynchronous UIDL request to the server using the given URI.
- *
+ *
* @param payload
* The URI to use for the request. May includes GET parameters
* @throws RequestException
@@ -221,14 +220,14 @@ public class XhrConnection {
}.schedule(retryTimeout);
}
} catch (RequestException e) {
- getConnectionStateHandler().xhrException(
- new XhrConnectionError(null, payload, e));
+ getConnectionStateHandler()
+ .xhrException(new XhrConnectionError(null, payload, e));
}
}
/**
* Retrieves the URI to use when sending RPCs to the server
- *
+ *
* @return The URI to use for server messages.
*/
protected String getUri() {
@@ -236,8 +235,8 @@ public class XhrConnection {
.translateVaadinUri(ApplicationConstants.APP_PROTOCOL_PREFIX
+ ApplicationConstants.UIDL_PATH + '/');
- uri = SharedUtil.addGetParameters(uri, UIConstants.UI_ID_PARAMETER
- + "=" + connection.getConfiguration().getUIId());
+ uri = SharedUtil.addGetParameters(uri, UIConstants.UI_ID_PARAMETER + "="
+ + connection.getConfiguration().getUIId());
return uri;
diff --git a/client/src/main/java/com/vaadin/client/communication/XhrConnectionError.java b/client/src/main/java/com/vaadin/client/communication/XhrConnectionError.java
index 025f1d70e7..ff39e47f11 100644
--- a/client/src/main/java/com/vaadin/client/communication/XhrConnectionError.java
+++ b/client/src/main/java/com/vaadin/client/communication/XhrConnectionError.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import elemental.json.JsonObject;
/**
* XhrConnectionError provides detail about an error which occured during an XHR
* request to the server
- *
+ *
* @since 7.6
* @author Vaadin Ltd
*/
@@ -36,7 +36,7 @@ public class XhrConnectionError {
/**
* Constructs an event from the given request, payload and exception
- *
+ *
* @param request
* the request which failed
* @param payload
@@ -53,7 +53,7 @@ public class XhrConnectionError {
/**
* Constructs an event from the given request, response and payload
- *
+ *
* @param request
* the request which failed
* @param payload
@@ -70,7 +70,7 @@ public class XhrConnectionError {
/**
* Returns the exception which caused the problem, if available
- *
+ *
* @return the exception which caused the problem, or null if not available
*/
public Throwable getException() {
@@ -79,7 +79,7 @@ public class XhrConnectionError {
/**
* Returns the request for which the problem occurred
- *
+ *
* @return the request where the problem occurred
*/
public Request getRequest() {
@@ -88,7 +88,7 @@ public class XhrConnectionError {
/**
* Returns the received response, if available
- *
+ *
* @return the received response, or null if not available
*/
public Response getResponse() {
@@ -97,7 +97,7 @@ public class XhrConnectionError {
/**
* Returns the payload which was sent to the server
- *
+ *
* @return the payload which was sent, never null
*/
public JsonObject getPayload() {
diff --git a/client/src/main/java/com/vaadin/client/componentlocator/ComponentLocator.java b/client/src/main/java/com/vaadin/client/componentlocator/ComponentLocator.java
index 0dfaf99cc1..f7c821d0a2 100644
--- a/client/src/main/java/com/vaadin/client/componentlocator/ComponentLocator.java
+++ b/client/src/main/java/com/vaadin/client/componentlocator/ComponentLocator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,7 +30,7 @@ import com.vaadin.client.ApplicationConnection;
* <p>
* The main use for this class is locating components for automated testing
* purposes.
- *
+ *
* @since 7.2, moved from {@link com.vaadin.client.ComponentLocator}
*/
public class ComponentLocator {
@@ -45,14 +45,15 @@ public class ComponentLocator {
/**
* Construct a ComponentLocator for the given ApplicationConnection.
- *
+ *
* @param client
* ApplicationConnection instance for the application.
*/
public ComponentLocator(ApplicationConnection client) {
this.client = client;
- locatorStrategies = Arrays.asList(new VaadinFinderLocatorStrategy(
- client), new LegacyLocatorStrategy(client));
+ locatorStrategies = Arrays.asList(
+ new VaadinFinderLocatorStrategy(client),
+ new LegacyLocatorStrategy(client));
}
/**
@@ -66,7 +67,7 @@ public class ComponentLocator {
* element if the widget determines an action on the other element will give
* the same result as the action on the target element.
* </p>
- *
+ *
* @since 5.4
* @param targetElement
* The element to generate a path for.
@@ -98,7 +99,7 @@ public class ComponentLocator {
* element if the widget determines an action on the other element will give
* the same result as the action on the target element.
* </p>
- *
+ *
* @since 7.2
* @param targetElement
* The element to generate a path for.
@@ -117,7 +118,7 @@ public class ComponentLocator {
* element. The {@link #getPathForElement(Element)} method can be used for
* the inverse operation, i.e. generating a string expression for a DOM
* element.
- *
+ *
* @since 5.4
* @param path
* The String locator which identifies the target element.
@@ -139,7 +140,7 @@ public class ComponentLocator {
/**
* Locates elements using a String locator (path) which identifies DOM
* elements.
- *
+ *
* @since 7.2
* @param path
* The String locator which identifies target elements.
@@ -165,9 +166,9 @@ public class ComponentLocator {
/**
* Locates elements using a String locator (path) which identifies DOM
* elements. The path starts from the specified root element.
- *
+ *
* @see #getElementByPath(String)
- *
+ *
* @since 7.2
* @param path
* The path of elements to be found
@@ -181,8 +182,8 @@ public class ComponentLocator {
JsArray<Element> jsElements = JavaScriptObject.createArray().cast();
for (LocatorStrategy strategy : locatorStrategies) {
if (strategy.validatePath(path)) {
- List<Element> elements = strategy.getElementsByPathStartingAt(
- path, root);
+ List<Element> elements = strategy
+ .getElementsByPathStartingAt(path, root);
if (elements.size() > 0) {
for (Element e : elements) {
jsElements.push(e);
@@ -197,11 +198,11 @@ public class ComponentLocator {
/**
* Locates an element using a String locator (path) which identifies a DOM
* element. The path starts from the specified root element.
- *
+ *
* @see #getElementByPath(String)
- *
+ *
* @since 7.2
- *
+ *
* @param path
* The path of the element to be found
* @param root
@@ -227,7 +228,7 @@ public class ComponentLocator {
* Returns the {@link ApplicationConnection} used by this locator.
* <p>
* This method is primarily for internal use by the framework.
- *
+ *
* @return the application connection
*/
public ApplicationConnection getClient() {
@@ -236,7 +237,7 @@ public class ComponentLocator {
/**
* Check if a given selector is valid for LegacyLocatorStrategy.
- *
+ *
* @param path
* Vaadin selector path
* @return true if passes path validation with LegacyLocatorStrategy
diff --git a/client/src/main/java/com/vaadin/client/componentlocator/LegacyLocatorStrategy.java b/client/src/main/java/com/vaadin/client/componentlocator/LegacyLocatorStrategy.java
index 517d979c8e..9e36e18162 100644
--- a/client/src/main/java/com/vaadin/client/componentlocator/LegacyLocatorStrategy.java
+++ b/client/src/main/java/com/vaadin/client/componentlocator/LegacyLocatorStrategy.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -51,7 +51,7 @@ import com.vaadin.shared.communication.SharedState;
* The LegacyLocatorStrategy class handles the legacy locator syntax that was
* introduced in version 5.4 of the framework. The legacy locator strategy is
* always used if no other strategy claims responsibility for a locator string.
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
@@ -75,8 +75,8 @@ public class LegacyLocatorStrategy implements LocatorStrategy {
private final ApplicationConnection client;
- private static final RegExp validSyntax = RegExp
- .compile("^((\\w+::)?((PID_S)?\\w[-$_a-zA-Z0-9.' ]*)?)?(/[-$_a-zA-Z0-9]+\\[\\d+\\])*/?(#.*)?$");
+ private static final RegExp validSyntax = RegExp.compile(
+ "^((\\w+::)?((PID_S)?\\w[-$_a-zA-Z0-9.' ]*)?)?(/[-$_a-zA-Z0-9]+\\[\\d+\\])*/?(#.*)?$");
public LegacyLocatorStrategy(ApplicationConnection clientConnection) {
client = clientConnection;
@@ -89,8 +89,8 @@ public class LegacyLocatorStrategy implements LocatorStrategy {
@Override
public String getPathForElement(Element targetElement) {
- ComponentConnector connector = Util
- .findPaintable(client, targetElement);
+ ComponentConnector connector = Util.findPaintable(client,
+ targetElement);
Widget w = null;
if (connector != null) {
@@ -169,8 +169,8 @@ public class LegacyLocatorStrategy implements LocatorStrategy {
* If the widget can provide an identifier for the targetElement we
* let it do that
*/
- String elementLocator = ((SubPartAware) w).getSubPartName(DOM
- .asOld(targetElement));
+ String elementLocator = ((SubPartAware) w)
+ .getSubPartName(DOM.asOld(targetElement));
if (elementLocator != null) {
return path + LegacyLocatorStrategy.SUBPART_SEPARATOR
+ elementLocator;
@@ -200,7 +200,8 @@ public class LegacyLocatorStrategy implements LocatorStrategy {
* {@inheritDoc}
*/
@Override
- public Element getElementByPathStartingAt(String path, Element baseElement) {
+ public Element getElementByPathStartingAt(String path,
+ Element baseElement) {
/*
* Path is of type "targetWidgetPath#componentPart" or
* "targetWidgetPath".
@@ -253,7 +254,8 @@ public class LegacyLocatorStrategy implements LocatorStrategy {
* {@inheritDoc}
*/
@Override
- public List<Element> getElementsByPathStartingAt(String path, Element root) {
+ public List<Element> getElementsByPathStartingAt(String path,
+ Element root) {
// This type of search is not supported in LegacyLocator
List<Element> array = new ArrayList<Element>();
Element e = getElementByPathStartingAt(path, root);
@@ -267,7 +269,7 @@ public class LegacyLocatorStrategy implements LocatorStrategy {
* Finds the first widget in the hierarchy (moving upwards) that implements
* SubPartAware. Returns the SubPartAware implementor or null if none is
* found.
- *
+ *
* @param w
* The widget to start from. This is returned if it implements
* SubPartAware.
@@ -289,13 +291,14 @@ public class LegacyLocatorStrategy implements LocatorStrategy {
* Returns the first widget found when going from {@code targetElement}
* upwards in the DOM hierarchy, assuming that {@code ancestorWidget} is a
* parent of {@code targetElement}.
- *
+ *
* @param targetElement
* @param ancestorWidget
* @return The widget whose root element is a parent of
* {@code targetElement}.
*/
- private Widget findParentWidget(Element targetElement, Widget ancestorWidget) {
+ private Widget findParentWidget(Element targetElement,
+ Widget ancestorWidget) {
/*
* As we cannot resolve Widgets from the element we start from the
* widget and move downwards to the correct child widget, as long as we
@@ -315,7 +318,7 @@ public class LegacyLocatorStrategy implements LocatorStrategy {
/**
* Locates an element based on a DOM path and a base element.
- *
+ *
* @param baseElement
* The base element which the path is relative to
* @param path
@@ -334,13 +337,13 @@ public class LegacyLocatorStrategy implements LocatorStrategy {
String childIndexString = part.substring("domChild[".length(),
part.length() - 1);
- if (WidgetUtil.findWidget(baseElement, null) instanceof VAbstractOrderedLayout) {
+ if (WidgetUtil.findWidget(baseElement,
+ null) instanceof VAbstractOrderedLayout) {
if (element.hasChildNodes()) {
Element e = element.getFirstChildElement().cast();
String cn = e.getClassName();
- if (cn != null
- && (cn.equals("v-expand") || cn
- .contains("v-has-caption"))) {
+ if (cn != null && (cn.equals("v-expand")
+ || cn.contains("v-has-caption"))) {
element = e;
}
}
@@ -374,7 +377,7 @@ public class LegacyLocatorStrategy implements LocatorStrategy {
/**
* Generates a String locator using domChild[x] parts for the element
* relative to the baseElement.
- *
+ *
* @param element
* The target element
* @param baseElement
@@ -421,7 +424,7 @@ public class LegacyLocatorStrategy implements LocatorStrategy {
* <p/>
* Returns null if no path can be determined for the widget or if the widget
* is null.
- *
+ *
* @param w
* The target widget
* @return A String locator for the widget
@@ -472,8 +475,8 @@ public class LegacyLocatorStrategy implements LocatorStrategy {
while (i.hasNext()) {
Object child = i.next();
if (child == w) {
- return basePath + PARENTCHILD_SEPARATOR + simpleName + "["
- + pos + "]";
+ return basePath + PARENTCHILD_SEPARATOR + simpleName + "[" + pos
+ + "]";
}
String simpleName2 = Util.getSimpleName(child);
if (simpleName.equals(simpleName2)) {
@@ -486,7 +489,7 @@ public class LegacyLocatorStrategy implements LocatorStrategy {
/**
* Locates the widget based on a String locator.
- *
+ *
* @param path
* The String locator that identifies the widget.
* @param baseWidget
@@ -568,8 +571,9 @@ public class LegacyLocatorStrategy implements LocatorStrategy {
// ChildComponentContainer and VOrderedLayout$Slot have been
// replaced with Slot
if (w instanceof VAbstractOrderedLayout
- && ("ChildComponentContainer".equals(widgetClassName) || "VOrderedLayout$Slot"
- .equals(widgetClassName))) {
+ && ("ChildComponentContainer".equals(widgetClassName)
+ || "VOrderedLayout$Slot"
+ .equals(widgetClassName))) {
widgetClassName = "Slot";
}
@@ -606,8 +610,8 @@ public class LegacyLocatorStrategy implements LocatorStrategy {
// the same type before it
int nextIndex = 0;
for (Widget child : layout) {
- boolean matchingType = nextWidgetClassName.equals(Util
- .getSimpleName(child));
+ boolean matchingType = nextWidgetClassName
+ .equals(Util.getSimpleName(child));
if (matchingType && widgetPosition == 0) {
// This is the n:th child that we looked for
break;
diff --git a/client/src/main/java/com/vaadin/client/componentlocator/LocatorStrategy.java b/client/src/main/java/com/vaadin/client/componentlocator/LocatorStrategy.java
index 15a156a815..8aafdbaf0a 100644
--- a/client/src/main/java/com/vaadin/client/componentlocator/LocatorStrategy.java
+++ b/client/src/main/java/com/vaadin/client/componentlocator/LocatorStrategy.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.google.gwt.dom.client.Element;
* an element in the DOM. A strategy can implement its own syntax for the
* locator string, which may be completely different from any other strategy's
* syntax.
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
@@ -34,7 +34,7 @@ public interface LocatorStrategy {
/**
* Test the given input path for formatting errors. If a given path can not
* be validated, the locator strategy will not be attempted.
- *
+ *
* @param path
* a locator path expression
* @return true, if the implementing class can process the given path,
@@ -53,7 +53,7 @@ public interface LocatorStrategy {
* element if the widget determines an action on the other element will give
* the same result as the action on the target element.
* </p>
- *
+ *
* @param targetElement
* The element to generate a path for.
* @return A String locator that identifies the target element or null if a
@@ -66,7 +66,7 @@ public interface LocatorStrategy {
* element. The {@link #getPathForElement(Element)} method can be used for
* the inverse operation, i.e. generating a string expression for a DOM
* element.
- *
+ *
* @param path
* The String locator which identifies the target element.
* @return The DOM element identified by {@code path} or null if the element
@@ -77,9 +77,9 @@ public interface LocatorStrategy {
/**
* Locates an element using a String locator (path) which identifies a DOM
* element. The path starts from the specified root element.
- *
+ *
* @see #getElementByPath(String)
- *
+ *
* @param path
* The String locator which identifies the target element.
* @param root
@@ -92,9 +92,9 @@ public interface LocatorStrategy {
/**
* Locates all elements that match a String locator (path) which identifies
* DOM elements.
- *
+ *
* This functionality is limited in {@link LegacyLocatorStrategy}.
- *
+ *
* @param path
* The String locator which identifies target elements.
* @return List that contains all matched elements. Empty list if none
@@ -105,11 +105,11 @@ public interface LocatorStrategy {
/**
* Locates all elements that match a String locator (path) which identifies
* DOM elements. The path starts from the specified root element.
- *
+ *
* This functionality is limited in {@link LegacyLocatorStrategy}.
- *
+ *
* @see #getElementsByPath(String)
- *
+ *
* @param path
* The String locator which identifies target elements.
* @param root
diff --git a/client/src/main/java/com/vaadin/client/componentlocator/LocatorUtil.java b/client/src/main/java/com/vaadin/client/componentlocator/LocatorUtil.java
index 7de0de3855..5a1203f664 100644
--- a/client/src/main/java/com/vaadin/client/componentlocator/LocatorUtil.java
+++ b/client/src/main/java/com/vaadin/client/componentlocator/LocatorUtil.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import com.google.gwt.regexp.shared.RegExp;
/**
* Common String manipulator utilities used in VaadinFinderLocatorStrategy and
* SelectorPredicates.
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
@@ -29,7 +29,7 @@ public class LocatorUtil {
/**
* Find first occurrence of character that's not inside quotes starting from
* specified index.
- *
+ *
* @param str
* Full string for searching
* @param find
@@ -65,7 +65,7 @@ public class LocatorUtil {
/**
* Find first occurrence of character that's not inside quotes starting from
* the beginning of string.
- *
+ *
* @param str
* Full string for searching
* @param find
@@ -78,7 +78,7 @@ public class LocatorUtil {
/**
* Checks if path refers to vaadin UI element com.vaadin.ui.UI.
- *
+ *
* @param path
* to vaadin element
* @return true if path refers to UI element, false otherwise
@@ -92,7 +92,7 @@ public class LocatorUtil {
/**
* Checks if path refers to vaadin Notification element
* com.vaadin.ui.Notification.
- *
+ *
* @param path
* to vaadin element
* @return true if path refers to Notification element, false otherwise
diff --git a/client/src/main/java/com/vaadin/client/componentlocator/SelectorPredicate.java b/client/src/main/java/com/vaadin/client/componentlocator/SelectorPredicate.java
index 31f6cc9b05..7143bbf62b 100644
--- a/client/src/main/java/com/vaadin/client/componentlocator/SelectorPredicate.java
+++ b/client/src/main/java/com/vaadin/client/componentlocator/SelectorPredicate.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import java.util.List;
* that VaadinFinderLocatorStrategy is finding. SelectorPredicates also provide
* useful information of said components to debug window by giving means to
* provide better variable naming.
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
@@ -43,7 +43,7 @@ public class SelectorPredicate {
/**
* Generate a list of predicates from a single predicate string
- *
+ *
* @param str
* a comma separated string of predicates
* @return a List of Predicate objects
@@ -108,7 +108,7 @@ public class SelectorPredicate {
/**
* Splits the predicate string to list of predicate strings.
- *
+ *
* @param predicateStr
* Comma separated predicate strings
* @return List of predicate strings
@@ -134,18 +134,18 @@ public class SelectorPredicate {
* VTextField[0] => 0
* VTextField[caption='foo'] => caption='foo'
* </code>
- *
+ *
* @param pathFragment
* The path fragment from which to extract the predicate string.
* @return The predicate string for the path fragment or empty string if not
* found.
*/
private static String extractPredicateString(String pathFragment) {
- int ixOpenBracket = LocatorUtil
- .indexOfIgnoringQuoted(pathFragment, '[');
+ int ixOpenBracket = LocatorUtil.indexOfIgnoringQuoted(pathFragment,
+ '[');
if (ixOpenBracket >= 0) {
- int ixCloseBracket = LocatorUtil.indexOfIgnoringQuoted(
- pathFragment, ']', ixOpenBracket);
+ int ixCloseBracket = LocatorUtil.indexOfIgnoringQuoted(pathFragment,
+ ']', ixOpenBracket);
return pathFragment.substring(ixOpenBracket + 1, ixCloseBracket);
}
return "";
@@ -153,7 +153,7 @@ public class SelectorPredicate {
/**
* Removes the surrounding quotes from a string if it is quoted.
- *
+ *
* @param str
* the possibly quoted string
* @return an unquoted version of str
diff --git a/client/src/main/java/com/vaadin/client/componentlocator/VaadinFinderLocatorStrategy.java b/client/src/main/java/com/vaadin/client/componentlocator/VaadinFinderLocatorStrategy.java
index 44bdeddff3..9356d5e34a 100644
--- a/client/src/main/java/com/vaadin/client/componentlocator/VaadinFinderLocatorStrategy.java
+++ b/client/src/main/java/com/vaadin/client/componentlocator/VaadinFinderLocatorStrategy.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -40,7 +40,7 @@ import com.vaadin.client.ui.ui.UIConnector;
* The VaadinFinder locator strategy implements an XPath-like syntax for
* locating elements in Vaadin applications. This is used in the new
* VaadinFinder API in TestBench 4.
- *
+ *
* Examples of the supported syntax:
* <ul>
* <li>Find the third text field in the DOM: {@code //VTextField[2]}</li>
@@ -49,7 +49,7 @@ import com.vaadin.client.ui.ui.UIConnector;
* <li>Find the first column on the third row of the "Accounts" table:
* {@code //VScrollTable[caption="Accounts"]#row[2]/col[0]}</li>
* </ul>
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
@@ -86,8 +86,8 @@ public class VaadinFinderLocatorStrategy implements LocatorStrategy {
boolean hasSubParts = targetWidget instanceof SubPartAware;
if (oldTarget != targetElement) {
if (hasSubParts) {
- subPart = ((SubPartAware) targetWidget).getSubPartName(DOM
- .asOld(oldTarget));
+ subPart = ((SubPartAware) targetWidget)
+ .getSubPartName(DOM.asOld(oldTarget));
}
if (!hasSubParts || subPart == null) {
@@ -96,7 +96,8 @@ public class VaadinFinderLocatorStrategy implements LocatorStrategy {
}
}
- List<ConnectorPath> hierarchy = getConnectorHierarchyForElement(targetElement);
+ List<ConnectorPath> hierarchy = getConnectorHierarchyForElement(
+ targetElement);
List<String> path = new ArrayList<String>();
// Assemble longname path components back-to-forth with useful
@@ -129,7 +130,7 @@ public class VaadinFinderLocatorStrategy implements LocatorStrategy {
* Search different queries for the best one. Use the fact that the lowest
* possible index is with the last selector. Last selector is the full
* search path containing the complete Component hierarchy.
- *
+ *
* @param selectors
* List of selectors
* @param target
@@ -151,12 +152,13 @@ public class VaadinFinderLocatorStrategy implements LocatorStrategy {
// See if we get minimum from second last. If not then we already
// have the best one.. Second last one contains almost full
// component hierarchy.
- if (getElementsByPath(selectors.get(selectors.size() - 2)).indexOf(
- target) == min) {
+ if (getElementsByPath(selectors.get(selectors.size() - 2))
+ .indexOf(target) == min) {
for (int i = 1; i < selectors.size() - 2; ++i) {
// Loop through the remaining selectors and look for one
// with the same index
- if (getElementsByPath(selectors.get(i)).indexOf(target) == min) {
+ if (getElementsByPath(selectors.get(i))
+ .indexOf(target) == min) {
bestSelector = selectors.get(i);
break;
}
@@ -173,7 +175,7 @@ public class VaadinFinderLocatorStrategy implements LocatorStrategy {
* Function to generate all possible search paths for given component list.
* Function strips out all the com.vaadin.ui. prefixes from elements as this
* functionality makes generating a query later on easier.
- *
+ *
* @param components
* List of components
* @return List of Vaadin selectors
@@ -208,7 +210,7 @@ public class VaadinFinderLocatorStrategy implements LocatorStrategy {
/**
* Helper method to get the string-form value of a named property of a
* component connector
- *
+ *
* @since 7.2
* @param c
* any ComponentConnector instance
@@ -218,8 +220,8 @@ public class VaadinFinderLocatorStrategy implements LocatorStrategy {
* not exist on the object (or some other error is encountered).
*/
private String getPropertyValue(ComponentConnector c, String propertyName) {
- Property prop = AbstractConnector.getStateType(c).getProperty(
- propertyName);
+ Property prop = AbstractConnector.getStateType(c)
+ .getProperty(propertyName);
try {
return prop.getValue(c.getState()).toString();
} catch (Exception e) {
@@ -231,7 +233,7 @@ public class VaadinFinderLocatorStrategy implements LocatorStrategy {
* Generate a list representing the top-to-bottom connector hierarchy for
* any given element. ConnectorPath element provides long- and short names,
* as well as connector and widget root element references.
- *
+ *
* @since 7.2
* @param elem
* any Element that is part of a widget hierarchy
@@ -289,8 +291,9 @@ public class VaadinFinderLocatorStrategy implements LocatorStrategy {
} else {
final UIConnector uiConnector = client.getUIConnector();
- elements.addAll(eliminateDuplicates(getElementsByPathStartingAtConnector(
- path, uiConnector, Document.get().getBody())));
+ elements.addAll(
+ eliminateDuplicates(getElementsByPathStartingAtConnector(
+ path, uiConnector, Document.get().getBody())));
}
for (SelectorPredicate p : postFilters) {
@@ -340,7 +343,8 @@ public class VaadinFinderLocatorStrategy implements LocatorStrategy {
* {@inheritDoc}
*/
@Override
- public List<Element> getElementsByPathStartingAt(String path, Element root) {
+ public List<Element> getElementsByPathStartingAt(String path,
+ Element root) {
List<SelectorPredicate> postFilters = SelectorPredicate
.extractPostFilterPredicates(path);
if (postFilters.size() > 0) {
@@ -372,7 +376,7 @@ public class VaadinFinderLocatorStrategy implements LocatorStrategy {
/**
* Special case for finding notifications as they have no connectors and are
* directly attached to {@link RootPanel}.
- *
+ *
* @param path
* The path of the notification, should be
* {@code "//VNotification"} optionally followed by an index in
@@ -408,7 +412,7 @@ public class VaadinFinderLocatorStrategy implements LocatorStrategy {
/**
* Finds a list of elements by the specified path, starting traversal of the
* connector hierarchy from the specified root.
- *
+ *
* @param path
* the locator path
* @param root
@@ -454,7 +458,7 @@ public class VaadinFinderLocatorStrategy implements LocatorStrategy {
* Recursively finds connectors for the elements identified by the provided
* path by traversing the connector hierarchy starting from {@code parents}
* connectors.
- *
+ *
* @param path
* The path identifying elements.
* @param parents
@@ -474,8 +478,8 @@ public class VaadinFinderLocatorStrategy implements LocatorStrategy {
for (ComponentConnector parent : parents) {
connectors.addAll(filterMatches(
collectPotentialMatches(parent, fragments[0],
- findRecursively), SelectorPredicate
- .extractPredicates(fragments[0])));
+ findRecursively),
+ SelectorPredicate.extractPredicates(fragments[0])));
}
if (!connectors.isEmpty() && fragments.length > 1) {
@@ -488,7 +492,7 @@ public class VaadinFinderLocatorStrategy implements LocatorStrategy {
* Go through a list of potentially matching components, modifying that list
* until all elements that remain in that list match the complete list of
* predicates.
- *
+ *
* @param potentialMatches
* a list of component connectors. Will be changed.
* @param predicates
@@ -518,8 +522,8 @@ public class VaadinFinderLocatorStrategy implements LocatorStrategy {
String propData = getPropertyValue(potentialMatches.get(i),
p.getName());
- if ((p.isWildcard() && propData == null)
- || (!p.isWildcard() && !p.getValue().equals(propData))) {
+ if ((p.isWildcard() && propData == null) || (!p.isWildcard()
+ && !p.getValue().equals(propData))) {
potentialMatches.remove(i);
--l;
--i;
@@ -535,10 +539,10 @@ public class VaadinFinderLocatorStrategy implements LocatorStrategy {
* Collects all connectors that match the widget class name of the path
* fragment. If the {@code collectRecursively} parameter is true, a
* depth-first search of the connector hierarchy is performed.
- *
+ *
* Searching depth-first ensure that we can return the matches in correct
* order for selecting based on index predicates.
- *
+ *
* @param parent
* The {@link ComponentConnector} to start the search from.
* @param pathFragment
@@ -592,7 +596,7 @@ public class VaadinFinderLocatorStrategy implements LocatorStrategy {
* Determines whether a connector matches a path fragment. This is done by
* comparing the path fragment to the name of the widget type of the
* connector.
- *
+ *
* @param connector
* The connector to compare.
* @param widgetName
@@ -637,7 +641,8 @@ public class VaadinFinderLocatorStrategy implements LocatorStrategy {
if (widgetName.equals(fullName + ".class")
|| widgetName.equals(fullName)
|| widgetName.equals(simpleName + ".class")
- || widgetName.equals(simpleName) || widgetName.equals(name)) {
+ || widgetName.equals(simpleName)
+ || widgetName.equals(name)) {
return true;
}
}
@@ -652,7 +657,7 @@ public class VaadinFinderLocatorStrategy implements LocatorStrategy {
/**
* Extracts the name of the widget class from a path fragment
- *
+ *
* @param pathFragment
* the path fragment
* @return the name of the widget class.
@@ -671,7 +676,7 @@ public class VaadinFinderLocatorStrategy implements LocatorStrategy {
* two elements, where the first element is the first path fragment and the
* second element is the rest of the path (all remaining path fragments
* untouched).
- *
+ *
* @param path
* The path to split.
* @return An array of two elements: The first path fragment and the rest of
@@ -703,7 +708,7 @@ public class VaadinFinderLocatorStrategy implements LocatorStrategy {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.client.componentlocator.LocatorStrategy#validatePath(java.
* lang.String)
@@ -720,9 +725,9 @@ public class VaadinFinderLocatorStrategy implements LocatorStrategy {
* Go through a list, removing all duplicate elements from it. This method
* is used to avoid accumulation of duplicate entries in result lists
* resulting from low-context recursion.
- *
+ *
* Preserves first entry in list, removes others. Preserves list order.
- *
+ *
* @return list passed as parameter, after modification
*/
private final <T> List<T> eliminateDuplicates(List<T> list) {
diff --git a/client/src/main/java/com/vaadin/client/connectors/AbstractRendererConnector.java b/client/src/main/java/com/vaadin/client/connectors/AbstractRendererConnector.java
index f7e3c15ac8..6d522ace5b 100644
--- a/client/src/main/java/com/vaadin/client/connectors/AbstractRendererConnector.java
+++ b/client/src/main/java/com/vaadin/client/connectors/AbstractRendererConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -34,18 +34,17 @@ import elemental.json.JsonValue;
* {@link com.vaadin.ui.components.grid.Renderer Renderer}. As a connector, it
* can use the regular Vaadin RPC and shared state mechanism to pass additional
* state and information between the client and the server. This base class
- * itself only uses the basic
- * {@link com.vaadin.shared.communication.SharedState SharedState} and no RPC
- * interfaces.
- *
+ * itself only uses the basic {@link com.vaadin.shared.communication.SharedState
+ * SharedState} and no RPC interfaces.
+ *
* @param <T>
* the presentation type of the renderer
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
-public abstract class AbstractRendererConnector<T> extends
- AbstractExtensionConnector {
+public abstract class AbstractRendererConnector<T>
+ extends AbstractExtensionConnector {
private Renderer<T> renderer = null;
@@ -54,10 +53,9 @@ public abstract class AbstractRendererConnector<T> extends
protected AbstractRendererConnector() {
if (presentationType == null) {
- throw new IllegalStateException(
- "No presentation type found for "
- + getClass().getSimpleName()
- + ". This may be caused by some unspecified problem in widgetset compilation.");
+ throw new IllegalStateException("No presentation type found for "
+ + getClass().getSimpleName()
+ + ". This may be caused by some unspecified problem in widgetset compilation.");
}
}
@@ -69,13 +67,13 @@ public abstract class AbstractRendererConnector<T> extends
* {@link com.google.gwt.core.client.GWT#create(Class) GWT.create(Class)} to
* create a renderer based on the return type of the overridden method, but
* only if {@link #createRenderer()} is not overridden as well:
- *
+ *
* <pre>
* public MyRenderer getRenderer() {
* return (MyRenderer) super.getRenderer();
* }
* </pre>
- *
+ *
* @return the renderer bound to this connector
*/
public Renderer<T> getRenderer() {
@@ -95,7 +93,7 @@ public abstract class AbstractRendererConnector<T> extends
* {@link #getRenderer()}. If you do override the method, you can't call
* <code>super.createRenderer()</code> since the metadata needed for that
* implementation is not generated if there's an override of the method.
- *
+ *
* @return a new renderer to be used with this connector
*/
protected Renderer<T> createRenderer() {
@@ -112,14 +110,15 @@ public abstract class AbstractRendererConnector<T> extends
+ getClass().getSimpleName()
+ ". This might be caused by explicitely using "
+ "super.createRenderer() or some unspecified "
- + "problem with the widgetset compilation.", e);
+ + "problem with the widgetset compilation.",
+ e);
}
}
/**
* Decodes the given JSON value into a value of type T so it can be passed
* to the {@link #getRenderer() renderer}.
- *
+ *
* @param value
* the value to decode
* @return the decoded value of {@code value}
@@ -143,7 +142,7 @@ public abstract class AbstractRendererConnector<T> extends
* In case this renderer wants be able to identify a row in such a way that
* the server also understands it, the row key is used for that. Rows are
* identified by unified keys between the client and the server.
- *
+ *
* @param row
* the row object
* @return the row key for the given row
@@ -153,8 +152,8 @@ public abstract class AbstractRendererConnector<T> extends
if (parent instanceof GridConnector) {
return ((GridConnector) parent).getRowKey(row);
} else {
- throw new IllegalStateException("Renderers can only be used "
- + "with a Grid.");
+ throw new IllegalStateException(
+ "Renderers can only be used " + "with a Grid.");
}
}
@@ -164,7 +163,7 @@ public abstract class AbstractRendererConnector<T> extends
* In case this renderer wants be able to identify a column in such a way
* that the server also understands it, the column id is used for that.
* Columns are identified by unified ids between the client and the server.
- *
+ *
* @param column
* the column object
* @return the column id for the given column
@@ -174,8 +173,8 @@ public abstract class AbstractRendererConnector<T> extends
if (parent instanceof GridConnector) {
return ((GridConnector) parent).getColumnId(column);
} else {
- throw new IllegalStateException("Renderers can only be used "
- + "with a Grid.");
+ throw new IllegalStateException(
+ "Renderers can only be used " + "with a Grid.");
}
}
diff --git a/client/src/main/java/com/vaadin/client/connectors/AbstractSelectionModelConnector.java b/client/src/main/java/com/vaadin/client/connectors/AbstractSelectionModelConnector.java
index 3a96f0f03b..1fb98224bd 100644
--- a/client/src/main/java/com/vaadin/client/connectors/AbstractSelectionModelConnector.java
+++ b/client/src/main/java/com/vaadin/client/connectors/AbstractSelectionModelConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,7 +27,7 @@ import elemental.json.JsonObject;
/**
* Base class for all selection model connectors.
- *
+ *
* @since 7.6
* @author Vaadin Ltd
*/
@@ -53,8 +53,8 @@ public abstract class AbstractSelectionModelConnector<T extends SelectionModel<J
protected abstract T createSelectionModel();
- public abstract static class AbstractSelectionModel implements
- SelectionModel<JsonObject> {
+ public abstract static class AbstractSelectionModel
+ implements SelectionModel<JsonObject> {
@Override
public boolean isSelected(JsonObject row) {
diff --git a/client/src/main/java/com/vaadin/client/connectors/ButtonRendererConnector.java b/client/src/main/java/com/vaadin/client/connectors/ButtonRendererConnector.java
index 094ca24b5a..b2c8a5f70d 100644
--- a/client/src/main/java/com/vaadin/client/connectors/ButtonRendererConnector.java
+++ b/client/src/main/java/com/vaadin/client/connectors/ButtonRendererConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,12 +24,13 @@ import elemental.json.JsonObject;
/**
* A connector for {@link ButtonRenderer}.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@Connect(com.vaadin.ui.renderers.ButtonRenderer.class)
-public class ButtonRendererConnector extends ClickableRendererConnector<String> {
+public class ButtonRendererConnector
+ extends ClickableRendererConnector<String> {
@Override
public ButtonRenderer getRenderer() {
diff --git a/client/src/main/java/com/vaadin/client/connectors/ClickableRendererConnector.java b/client/src/main/java/com/vaadin/client/connectors/ClickableRendererConnector.java
index 9d16a57a17..ec4333be81 100644
--- a/client/src/main/java/com/vaadin/client/connectors/ClickableRendererConnector.java
+++ b/client/src/main/java/com/vaadin/client/connectors/ClickableRendererConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,30 +26,31 @@ import elemental.json.JsonObject;
/**
* An abstract base class for {@link ClickableRenderer} connectors.
- *
+ *
* @param <T>
* the presentation type of the renderer
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
-public abstract class ClickableRendererConnector<T> extends
- AbstractRendererConnector<T> {
+public abstract class ClickableRendererConnector<T>
+ extends AbstractRendererConnector<T> {
HandlerRegistration clickRegistration;
@Override
protected void init() {
- clickRegistration = addClickHandler(new RendererClickHandler<JsonObject>() {
- @Override
- public void onClick(RendererClickEvent<JsonObject> event) {
- getRpcProxy(RendererClickRpc.class).click(
- getRowKey(event.getCell().getRow()),
- getColumnId(event.getCell().getColumn()),
- MouseEventDetailsBuilder.buildMouseEventDetails(event
- .getNativeEvent()));
- }
- });
+ clickRegistration = addClickHandler(
+ new RendererClickHandler<JsonObject>() {
+ @Override
+ public void onClick(RendererClickEvent<JsonObject> event) {
+ getRpcProxy(RendererClickRpc.class).click(
+ getRowKey(event.getCell().getRow()),
+ getColumnId(event.getCell().getColumn()),
+ MouseEventDetailsBuilder.buildMouseEventDetails(
+ event.getNativeEvent()));
+ }
+ });
}
@Override
diff --git a/client/src/main/java/com/vaadin/client/connectors/DateRendererConnector.java b/client/src/main/java/com/vaadin/client/connectors/DateRendererConnector.java
index c861df6369..4de1cca075 100644
--- a/client/src/main/java/com/vaadin/client/connectors/DateRendererConnector.java
+++ b/client/src/main/java/com/vaadin/client/connectors/DateRendererConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.shared.ui.Connect;
* The server-side Renderer operates on dates, but the data is serialized as a
* string, and displayed as-is on the client side. This is to be able to support
* the server's locale.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
diff --git a/client/src/main/java/com/vaadin/client/connectors/DetailComponentManagerConnector.java b/client/src/main/java/com/vaadin/client/connectors/DetailComponentManagerConnector.java
index 6830d27ef0..63822ca9b3 100644
--- a/client/src/main/java/com/vaadin/client/connectors/DetailComponentManagerConnector.java
+++ b/client/src/main/java/com/vaadin/client/connectors/DetailComponentManagerConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,11 +22,12 @@ import com.vaadin.ui.Grid.DetailComponentManager;
/**
* Client-side connector for the DetailComponentManager of Grid.
- *
+ *
* @since 7.6.1
*/
@Connect(DetailComponentManager.class)
-public class DetailComponentManagerConnector extends AbstractExtensionConnector {
+public class DetailComponentManagerConnector
+ extends AbstractExtensionConnector {
@Override
protected void extend(ServerConnector target) {
diff --git a/client/src/main/java/com/vaadin/client/connectors/GridConnector.java b/client/src/main/java/com/vaadin/client/connectors/GridConnector.java
index 550cf1517c..ddde546da9 100644
--- a/client/src/main/java/com/vaadin/client/connectors/GridConnector.java
+++ b/client/src/main/java/com/vaadin/client/connectors/GridConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -106,13 +106,13 @@ import elemental.json.JsonValue;
* The Grid is typed to JSONObject. The structure of the JSONObject is described
* at {@link com.vaadin.shared.data.DataProviderRpc#setRowData(int, List)
* DataProviderRpc.setRowData(int, List)}.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@Connect(com.vaadin.ui.Grid.class)
-public class GridConnector extends AbstractHasComponentsConnector implements
- SimpleManagedLayout, DeferredWorker {
+public class GridConnector extends AbstractHasComponentsConnector
+ implements SimpleManagedLayout, DeferredWorker {
private static final class CustomStyleGenerator implements
CellStyleGenerator<JsonObject>, RowStyleGenerator<JsonObject> {
@@ -175,7 +175,7 @@ public class GridConnector extends AbstractHasComponentsConnector implements
/**
* Sets a new renderer for this column object
- *
+ *
* @param rendererConnector
* a renderer connector object
*/
@@ -223,7 +223,8 @@ public class GridConnector extends AbstractHasComponentsConnector implements
public void onStateChanged(
StateChangeEvent stateChangeEvent) {
- String error = editorConnector.getState().errorMessage;
+ String error = editorConnector
+ .getState().errorMessage;
if (error == null) {
columnToErrorMessage
@@ -233,7 +234,8 @@ public class GridConnector extends AbstractHasComponentsConnector implements
// therefore, we use this hack to make the
// string human-readable.
Element e = DOM.createElement("div");
- e.setInnerHTML(editorConnector.getState().errorMessage);
+ e.setInnerHTML(editorConnector
+ .getState().errorMessage);
error = getHeaderCaption() + ": "
+ e.getInnerText();
@@ -242,8 +244,8 @@ public class GridConnector extends AbstractHasComponentsConnector implements
}
// Handle Editor RPC before updating error status
- Scheduler.get().scheduleFinally(
- new ScheduledCommand() {
+ Scheduler.get()
+ .scheduleFinally(new ScheduledCommand() {
@Override
public void execute() {
@@ -348,7 +350,7 @@ public class GridConnector extends AbstractHasComponentsConnector implements
* Used to handle the case where the editor calls us because it was
* invoked by the server via RPC and not by the client. In that case,
* the request can be simply synchronously completed.
- *
+ *
* @param request
* the request object
* @return true if the request was originally triggered by the server,
@@ -400,8 +402,8 @@ public class GridConnector extends AbstractHasComponentsConnector implements
}
}
- private class ItemClickHandler implements BodyClickHandler,
- BodyDoubleClickHandler {
+ private class ItemClickHandler
+ implements BodyClickHandler, BodyDoubleClickHandler {
@Override
public void onClick(GridClickEvent event) {
@@ -417,15 +419,13 @@ public class GridConnector extends AbstractHasComponentsConnector implements
}
}
- private void fireItemClick(CellReference<?> cell, NativeEvent mouseEvent) {
+ private void fireItemClick(CellReference<?> cell,
+ NativeEvent mouseEvent) {
String rowKey = getRowKey((JsonObject) cell.getRow());
String columnId = getColumnId(cell.getColumn());
- getRpcProxy(GridServerRpc.class)
- .itemClick(
- rowKey,
- columnId,
- MouseEventDetailsBuilder
- .buildMouseEventDetails(mouseEvent));
+ getRpcProxy(GridServerRpc.class).itemClick(rowKey, columnId,
+ MouseEventDetailsBuilder
+ .buildMouseEventDetails(mouseEvent));
}
}
@@ -441,8 +441,8 @@ public class GridConnector extends AbstractHasComponentsConnector implements
newColumnOrder.add(((CustomGridColumn) column).id);
} // the other case would be the multi selection column
}
- getRpcProxy(GridServerRpc.class).columnsReordered(
- newColumnOrder, columnOrder);
+ getRpcProxy(GridServerRpc.class)
+ .columnsReordered(newColumnOrder, columnOrder);
columnOrder = newColumnOrder;
getState().columnOrder = newColumnOrder;
}
@@ -491,7 +491,8 @@ public class GridConnector extends AbstractHasComponentsConnector implements
}
};
- private class CustomDetailsGenerator implements HeightAwareDetailsGenerator {
+ private class CustomDetailsGenerator
+ implements HeightAwareDetailsGenerator {
private final Map<String, ComponentConnector> idToDetailsMap = new HashMap<String, ComponentConnector>();
private final Map<String, Integer> idToRowIndex = new HashMap<String, Integer>();
@@ -525,7 +526,7 @@ public class GridConnector extends AbstractHasComponentsConnector implements
/**
* Fetches id from the row object that corresponds with the given
* rowIndex.
- *
+ *
* @since 7.6.1
* @param rowIndex
* the index of the row for which to fetch the id
@@ -534,9 +535,8 @@ public class GridConnector extends AbstractHasComponentsConnector implements
private String getId(int rowIndex) {
JsonObject row = getWidget().getDataSource().getRow(rowIndex);
- if (!row.hasKey(GridState.JSONKEY_DETAILS_VISIBLE)
- || row.getString(GridState.JSONKEY_DETAILS_VISIBLE)
- .isEmpty()) {
+ if (!row.hasKey(GridState.JSONKEY_DETAILS_VISIBLE) || row
+ .getString(GridState.JSONKEY_DETAILS_VISIBLE).isEmpty()) {
return null;
}
@@ -576,7 +576,7 @@ public class GridConnector extends AbstractHasComponentsConnector implements
/**
* Class for handling scrolling issues with open details.
- *
+ *
* @since 7.5.2
*/
private class LazyDetailsScroller implements DeferredWorker {
@@ -606,7 +606,7 @@ public class GridConnector extends AbstractHasComponentsConnector implements
/**
* Inform LazyDetailsScroller that a details row has opened on a row.
- *
+ *
* @param rowIndex
* index of row with details now open
*/
@@ -782,8 +782,8 @@ public class GridConnector extends AbstractHasComponentsConnector implements
if (!Arrays.equals(columnIds, getState().sortColumns)
|| !Arrays.equals(directions, getState().sortDirs)) {
// Report back to server if changed
- getRpcProxy(GridServerRpc.class).sort(columnIds,
- directions, event.isUserOriginated());
+ getRpcProxy(GridServerRpc.class).sort(columnIds, directions,
+ event.isUserOriginated());
}
}
});
@@ -939,7 +939,8 @@ public class GridConnector extends AbstractHasComponentsConnector implements
}
}
- private void updateHeaderCellFromState(HeaderCell cell, CellState cellState) {
+ private void updateHeaderCellFromState(HeaderCell cell,
+ CellState cellState) {
switch (cellState.type) {
case TEXT:
cell.setText(cellState.text);
@@ -958,8 +959,8 @@ public class GridConnector extends AbstractHasComponentsConnector implements
}
break;
default:
- throw new IllegalStateException("unexpected cell type: "
- + cellState.type);
+ throw new IllegalStateException(
+ "unexpected cell type: " + cellState.type);
}
cell.setStyleName(cellState.styleName);
}
@@ -999,7 +1000,8 @@ public class GridConnector extends AbstractHasComponentsConnector implements
}
}
- private void updateFooterCellFromState(FooterCell cell, CellState cellState) {
+ private void updateFooterCellFromState(FooterCell cell,
+ CellState cellState) {
switch (cellState.type) {
case TEXT:
cell.setText(cellState.text);
@@ -1018,15 +1020,15 @@ public class GridConnector extends AbstractHasComponentsConnector implements
}
break;
default:
- throw new IllegalStateException("unexpected cell type: "
- + cellState.type);
+ throw new IllegalStateException(
+ "unexpected cell type: " + cellState.type);
}
cell.setStyleName(cellState.styleName);
}
/**
* Updates a column from a state change event.
- *
+ *
* @param columnIndex
* The index of the column to update
*/
@@ -1040,7 +1042,7 @@ public class GridConnector extends AbstractHasComponentsConnector implements
/**
* Adds a new column to the grid widget from a state change event
- *
+ *
* @param columnIndex
* The index of the column, according to how it
*/
@@ -1059,7 +1061,7 @@ public class GridConnector extends AbstractHasComponentsConnector implements
/**
* Updates the column values from a state
- *
+ *
* @param column
* The column to update
* @param state
@@ -1074,7 +1076,8 @@ public class GridConnector extends AbstractHasComponentsConnector implements
column.setExpandRatio(state.expandRatio);
assert state.rendererConnector instanceof AbstractRendererConnector : "GridColumnState.rendererConnector is invalid (not subclass of AbstractRendererConnector)";
- column.setRenderer((AbstractRendererConnector<Object>) state.rendererConnector);
+ column.setRenderer(
+ (AbstractRendererConnector<Object>) state.rendererConnector);
column.setSortable(state.sortable);
@@ -1087,7 +1090,8 @@ public class GridConnector extends AbstractHasComponentsConnector implements
column.setHidingToggleCaption(state.hidingToggleCaption);
column.setEditable(state.editable);
- column.setEditorConnector((AbstractComponentConnector) state.editorConnector);
+ column.setEditorConnector(
+ (AbstractComponentConnector) state.editorConnector);
}
/**
@@ -1141,7 +1145,7 @@ public class GridConnector extends AbstractHasComponentsConnector implements
/**
* Gets the row key for a row object.
- *
+ *
* @param row
* the row object
* @return the key for the given row
@@ -1155,7 +1159,7 @@ public class GridConnector extends AbstractHasComponentsConnector implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.client.HasComponentsConnector#updateCaption(com.vaadin.client
* .ComponentConnector)
@@ -1191,7 +1195,7 @@ public class GridConnector extends AbstractHasComponentsConnector implements
/**
* Gets the listener used by this connector for tracking when row detail
* visibility changes.
- *
+ *
* @since 7.5.0
* @return the used details listener
*/
@@ -1274,7 +1278,7 @@ public class GridConnector extends AbstractHasComponentsConnector implements
/**
* Creates a concatenation of all columns errors for Editor.
- *
+ *
* @since 7.6
* @return displayed error string
*/
diff --git a/client/src/main/java/com/vaadin/client/connectors/ImageRendererConnector.java b/client/src/main/java/com/vaadin/client/connectors/ImageRendererConnector.java
index f7690cb6fe..4961a52a3f 100644
--- a/client/src/main/java/com/vaadin/client/connectors/ImageRendererConnector.java
+++ b/client/src/main/java/com/vaadin/client/connectors/ImageRendererConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import elemental.json.JsonValue;
/**
* A connector for {@link ImageRenderer}.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
diff --git a/client/src/main/java/com/vaadin/client/connectors/JavaScriptRendererConnector.java b/client/src/main/java/com/vaadin/client/connectors/JavaScriptRendererConnector.java
index 1229922a9c..503884b566 100644
--- a/client/src/main/java/com/vaadin/client/connectors/JavaScriptRendererConnector.java
+++ b/client/src/main/java/com/vaadin/client/connectors/JavaScriptRendererConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -38,21 +38,21 @@ import elemental.json.JsonValue;
/**
* Connector for server-side renderer implemented using JavaScript.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
// This is really typed to <JsonValue>, but because of the way native strings
// are not always instanceof JsonValue, we need to accept Object
@Connect(AbstractJavaScriptRenderer.class)
-public class JavaScriptRendererConnector extends
- AbstractRendererConnector<Object> implements
- HasJavaScriptConnectorHelper {
+public class JavaScriptRendererConnector
+ extends AbstractRendererConnector<Object>
+ implements HasJavaScriptConnectorHelper {
private final JavaScriptConnectorHelper helper = new JavaScriptConnectorHelper(
this);
- private final JavaScriptObject cellReferenceWrapper = createCellReferenceWrapper(BrowserInfo
- .get().isIE8());
+ private final JavaScriptObject cellReferenceWrapper = createCellReferenceWrapper(
+ BrowserInfo.get().isIE8());
@Override
protected void init() {
@@ -70,7 +70,7 @@ public class JavaScriptRendererConnector extends
// IE8 only supports defineProperty for DOM objects
reference = $doc.createElement('div');
}
-
+
var setProperty = function(name, getter, setter) {
var descriptor = {
get: getter
@@ -80,25 +80,25 @@ public class JavaScriptRendererConnector extends
}
Object.defineProperty(reference, name, descriptor);
};
-
+
setProperty("element", function() {
return reference.target.@CellReference::getElement()();
}, null);
-
+
setProperty("rowIndex", function() {
return reference.target.@CellReference::getRowIndex()();
}, null);
-
+
setProperty("columnIndex", function() {
return reference.target.@CellReference::getColumnIndex()();
}, null);
-
+
setProperty("colSpan", function() {
return reference.target.@RendererCellReference::getColSpan()();
}, function(colSpan) {
reference.target.@RendererCellReference::setColSpan(*)(colSpan);
});
-
+
return reference;
}-*/;
@@ -137,9 +137,9 @@ public class JavaScriptRendererConnector extends
helper.ensureJavascriptInited();
if (!hasFunction("render")) {
- throw new RuntimeException("JavaScriptRenderer "
- + helper.getInitFunctionName()
- + " must have a function named 'render'");
+ throw new RuntimeException(
+ "JavaScriptRenderer " + helper.getInitFunctionName()
+ + " must have a function named 'render'");
}
final boolean hasInit = hasFunction("init");
@@ -221,8 +221,8 @@ public class JavaScriptRendererConnector extends
@Override
public Collection<String> getConsumedEvents() {
if (hasGetConsumedEvents) {
- JsArrayString events = getConsumedEvents(helper
- .getConnectorWrapper());
+ JsArrayString events = getConsumedEvents(
+ helper.getConnectorWrapper());
ArrayList<String> list = new ArrayList<String>(
events.length());
diff --git a/client/src/main/java/com/vaadin/client/connectors/MultiSelectionModelConnector.java b/client/src/main/java/com/vaadin/client/connectors/MultiSelectionModelConnector.java
index 5d00619995..748e9b1acf 100644
--- a/client/src/main/java/com/vaadin/client/connectors/MultiSelectionModelConnector.java
+++ b/client/src/main/java/com/vaadin/client/connectors/MultiSelectionModelConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -52,7 +52,7 @@ import elemental.json.JsonObject;
/**
* Connector for server-side {@link MultiSelectionModel}.
- *
+ *
* @since 7.6
* @author Vaadin Ltd
*/
@@ -87,8 +87,8 @@ public class MultiSelectionModelConnector extends
@OnStateChange("allSelected")
void updateSelectAllCheckbox() {
if (selectionModel.getSelectionColumnRenderer() != null) {
- HeaderCell cell = getGrid().getDefaultHeaderRow().getCell(
- getGrid().getColumn(0));
+ HeaderCell cell = getGrid().getDefaultHeaderRow()
+ .getCell(getGrid().getColumn(0));
CheckBox widget = (CheckBox) cell.getWidget();
widget.setValue(getState().allSelected, false);
}
@@ -119,11 +119,12 @@ public class MultiSelectionModelConnector extends
selectAll();
}
});
- dataAvailable = getGrid().addDataAvailableHandler(
- new DataAvailableHandler() {
+ dataAvailable = getGrid()
+ .addDataAvailableHandler(new DataAvailableHandler() {
@Override
- public void onDataAvailable(DataAvailableEvent event) {
+ public void onDataAvailable(
+ DataAvailableEvent event) {
availableRows = event.getAvailableRows();
}
});
@@ -138,7 +139,7 @@ public class MultiSelectionModelConnector extends
* Creates a selection column renderer. This method can be overridden to
* use a custom renderer or use {@code null} to disable the selection
* column.
- *
+ *
* @param grid
* the grid for this selection model
* @return selection column renderer or {@code null} if not needed
@@ -156,7 +157,8 @@ public class MultiSelectionModelConnector extends
assert !isBeingBatchSelected() : "Can't select all in middle of a batch selection.";
DataSource<JsonObject> dataSource = getGrid().getDataSource();
- for (int i = availableRows.getStart(); i < availableRows.getEnd(); ++i) {
+ for (int i = availableRows.getStart(); i < availableRows
+ .getEnd(); ++i) {
final JsonObject row = dataSource.getRow(i);
if (row != null) {
RowHandle<JsonObject> handle = dataSource.getHandle(row);
@@ -174,7 +176,7 @@ public class MultiSelectionModelConnector extends
/**
* {@inheritDoc}
- *
+ *
* @return {@code false} if rows is empty, else {@code true}
*/
@Override
@@ -184,7 +186,7 @@ public class MultiSelectionModelConnector extends
/**
* {@inheritDoc}
- *
+ *
* @return {@code false} if rows is empty, else {@code true}
*/
@Override
@@ -194,7 +196,7 @@ public class MultiSelectionModelConnector extends
/**
* {@inheritDoc}
- *
+ *
* @return always {@code true}
*/
@Override
@@ -202,7 +204,8 @@ public class MultiSelectionModelConnector extends
assert !isBeingBatchSelected() : "Can't select all in middle of a batch selection.";
DataSource<JsonObject> dataSource = getGrid().getDataSource();
- for (int i = availableRows.getStart(); i < availableRows.getEnd(); ++i) {
+ for (int i = availableRows.getStart(); i < availableRows
+ .getEnd(); ++i) {
final JsonObject row = dataSource.getRow(i);
if (row != null) {
RowHandle<JsonObject> handle = dataSource.getHandle(row);
@@ -217,7 +220,7 @@ public class MultiSelectionModelConnector extends
/**
* {@inheritDoc}
- *
+ *
* @return {@code false} if rows is empty, else {@code true}
*/
@Override
@@ -245,7 +248,7 @@ public class MultiSelectionModelConnector extends
* <p>
* Note: If selection model is in batch select state, the row will be
* pinned on select.
- *
+ *
* @param row
* row handle
* @param selected
@@ -273,7 +276,7 @@ public class MultiSelectionModelConnector extends
/**
* {@inheritDoc}
- *
+ *
* @return {@code false} if rows is empty, else {@code true}
*/
@Override
@@ -300,8 +303,8 @@ public class MultiSelectionModelConnector extends
* rows. Unpins any pinned rows.
*/
private void sendDeselected() {
- getRpcProxy(MultiSelectionModelServerRpc.class).deselect(
- getRowKeys(deselected));
+ getRpcProxy(MultiSelectionModelServerRpc.class)
+ .deselect(getRowKeys(deselected));
if (isBeingBatchSelected()) {
for (RowHandle<JsonObject> row : deselected) {
@@ -317,8 +320,8 @@ public class MultiSelectionModelConnector extends
* Unpins any pinned rows.
*/
private void sendSelected() {
- getRpcProxy(MultiSelectionModelServerRpc.class).select(
- getRowKeys(selected));
+ getRpcProxy(MultiSelectionModelServerRpc.class)
+ .select(getRowKeys(selected));
if (isBeingBatchSelected()) {
for (RowHandle<JsonObject> row : selected) {
@@ -347,7 +350,8 @@ public class MultiSelectionModelConnector extends
@Override
public void startBatchSelect() {
- assert selected.isEmpty() && deselected.isEmpty() : "Row caches were not clear.";
+ assert selected.isEmpty()
+ && deselected.isEmpty() : "Row caches were not clear.";
batchSelect = true;
}
diff --git a/client/src/main/java/com/vaadin/client/connectors/NoSelectionModelConnector.java b/client/src/main/java/com/vaadin/client/connectors/NoSelectionModelConnector.java
index b9f2d626c2..b0d6e364b5 100644
--- a/client/src/main/java/com/vaadin/client/connectors/NoSelectionModelConnector.java
+++ b/client/src/main/java/com/vaadin/client/connectors/NoSelectionModelConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,13 +25,13 @@ import elemental.json.JsonObject;
/**
* Connector for server-side {@link NoSelectionModel}.
- *
+ *
* @since 7.6
* @author Vaadin Ltd
*/
@Connect(NoSelectionModel.class)
-public class NoSelectionModelConnector extends
- AbstractSelectionModelConnector<SelectionModel<JsonObject>> {
+public class NoSelectionModelConnector
+ extends AbstractSelectionModelConnector<SelectionModel<JsonObject>> {
@Override
protected void extend(ServerConnector target) {
diff --git a/client/src/main/java/com/vaadin/client/connectors/NumberRendererConnector.java b/client/src/main/java/com/vaadin/client/connectors/NumberRendererConnector.java
index c044e0d6f1..9b94b82e4c 100644
--- a/client/src/main/java/com/vaadin/client/connectors/NumberRendererConnector.java
+++ b/client/src/main/java/com/vaadin/client/connectors/NumberRendererConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -18,14 +18,13 @@ package com.vaadin.client.connectors;
import com.vaadin.shared.ui.Connect;
/**
- * A connector for
- * {@link com.vaadin.ui.components.grid.renderers.NumberRenderer NumberRenderer}
- * .
+ * A connector for {@link com.vaadin.ui.components.grid.renderers.NumberRenderer
+ * NumberRenderer} .
* <p>
* The server-side Renderer operates on numbers, but the data is serialized as a
* string, and displayed as-is on the client side. This is to be able to support
* the server's locale.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
diff --git a/client/src/main/java/com/vaadin/client/connectors/ProgressBarRendererConnector.java b/client/src/main/java/com/vaadin/client/connectors/ProgressBarRendererConnector.java
index 9b5e8a9677..7ab9923b57 100644
--- a/client/src/main/java/com/vaadin/client/connectors/ProgressBarRendererConnector.java
+++ b/client/src/main/java/com/vaadin/client/connectors/ProgressBarRendererConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,13 +20,13 @@ import com.vaadin.shared.ui.Connect;
/**
* A connector for {@link ProgressBarRenderer}.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@Connect(com.vaadin.ui.renderers.ProgressBarRenderer.class)
-public class ProgressBarRendererConnector extends
- AbstractRendererConnector<Double> {
+public class ProgressBarRendererConnector
+ extends AbstractRendererConnector<Double> {
@Override
public ProgressBarRenderer getRenderer() {
diff --git a/client/src/main/java/com/vaadin/client/connectors/RpcDataSourceConnector.java b/client/src/main/java/com/vaadin/client/connectors/RpcDataSourceConnector.java
index d744bbc1c7..a9837fa06b 100644
--- a/client/src/main/java/com/vaadin/client/connectors/RpcDataSourceConnector.java
+++ b/client/src/main/java/com/vaadin/client/connectors/RpcDataSourceConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -38,7 +38,7 @@ import elemental.json.JsonObject;
* currently implemented as an Extension hardcoded to support a specific
* connector type. This will be changed once framework support for something
* more flexible has been implemented.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -48,7 +48,7 @@ public class RpcDataSourceConnector extends AbstractExtensionConnector {
/**
* A callback interface to let {@link GridConnector} know that detail
* visibilities might have changed.
- *
+ *
* @since 7.5.0
* @author Vaadin Ltd
*/
@@ -57,7 +57,7 @@ public class RpcDataSourceConnector extends AbstractExtensionConnector {
/**
* A request to verify (and correct) the visibility for a row, given
* updated metadata.
- *
+ *
* @param rowIndex
* the index of the row that should be checked
* @param row
@@ -122,7 +122,7 @@ public class RpcDataSourceConnector extends AbstractExtensionConnector {
/*
* If you're looking at this code because you want to learn how to
* use AbstactRemoteDataSource, please look somewhere else instead.
- *
+ *
* We're not doing things in the conventional way with the callback
* here since Vaadin doesn't directly support RPC with return
* values. We're instead asking the server to push us some data, and
@@ -133,15 +133,15 @@ public class RpcDataSourceConnector extends AbstractExtensionConnector {
Range cached = getCachedRange();
- rpcProxy.requestRows(firstRowIndex, numberOfRows,
- cached.getStart(), cached.length());
+ rpcProxy.requestRows(firstRowIndex, numberOfRows, cached.getStart(),
+ cached.length());
/*
* Show the progress indicator if there is a pending data request
* and some of the visible rows are being requested. The RPC in
* itself will not trigger the indicator since it might just fetch
* some rows in the background to fill the cache.
- *
+ *
* The indicator will be hidden by the framework when the response
* is received (unless another request is already on its way at that
* point).
@@ -160,7 +160,7 @@ public class RpcDataSourceConnector extends AbstractExtensionConnector {
* We trigger the indicator already at this point since the actual
* RPC will not be sent right away when waiting for the response to
* a previous request.
- *
+ *
* Only triggering here would not be enough since the check that
* sets isWaitingForData is deferred. We don't want to trigger the
* loading indicator here if we don't know that there is actually a
@@ -222,7 +222,7 @@ public class RpcDataSourceConnector extends AbstractExtensionConnector {
/**
* Updates row data based on row key.
- *
+ *
* @since 7.6
* @param row
* new row object
diff --git a/client/src/main/java/com/vaadin/client/connectors/SingleSelectionModelConnector.java b/client/src/main/java/com/vaadin/client/connectors/SingleSelectionModelConnector.java
index fddf3865a2..ea0d6171af 100644
--- a/client/src/main/java/com/vaadin/client/connectors/SingleSelectionModelConnector.java
+++ b/client/src/main/java/com/vaadin/client/connectors/SingleSelectionModelConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -33,7 +33,7 @@ import elemental.json.JsonObject;
/**
* Connector for server-side {@link SingleSelectionModel}.
- *
+ *
* @since 7.6
* @author Vaadin Ltd
*/
@@ -78,8 +78,8 @@ public class SingleSelectionModelConnector extends
/**
* SingleSelectionModel without a selection column renderer.
*/
- public class SingleSelectionModel extends AbstractSelectionModel implements
- SelectionModel.Single<JsonObject> {
+ public class SingleSelectionModel extends AbstractSelectionModel
+ implements SelectionModel.Single<JsonObject> {
private RowHandle<JsonObject> selectedRow;
private boolean deselectAllowed;
@@ -110,8 +110,8 @@ public class SingleSelectionModelConnector extends
// Check if currently re-selected row was deselected from
// the server.
if (row != null && getRowHandle(row).equals(selectedRow)) {
- if (selectedRow.getRow().hasKey(
- GridState.JSONKEY_SELECTED)) {
+ if (selectedRow.getRow()
+ .hasKey(GridState.JSONKEY_SELECTED)) {
// Everything is OK, no need to do anything.
return false;
}
@@ -130,8 +130,8 @@ public class SingleSelectionModelConnector extends
}
if (changed) {
- getRpcProxy(SingleSelectionModelServerRpc.class).select(
- getRowKey(row));
+ getRpcProxy(SingleSelectionModelServerRpc.class)
+ .select(getRowKey(row));
}
return changed;
diff --git a/client/src/main/java/com/vaadin/client/connectors/TextRendererConnector.java b/client/src/main/java/com/vaadin/client/connectors/TextRendererConnector.java
index baf317510d..b5ad8fd67d 100644
--- a/client/src/main/java/com/vaadin/client/connectors/TextRendererConnector.java
+++ b/client/src/main/java/com/vaadin/client/connectors/TextRendererConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import com.vaadin.shared.ui.Connect;
/**
* A connector for {@link TextRenderer}.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
diff --git a/client/src/main/java/com/vaadin/client/connectors/UnsafeHtmlRendererConnector.java b/client/src/main/java/com/vaadin/client/connectors/UnsafeHtmlRendererConnector.java
index 72d8db3c4a..726e823fba 100644
--- a/client/src/main/java/com/vaadin/client/connectors/UnsafeHtmlRendererConnector.java
+++ b/client/src/main/java/com/vaadin/client/connectors/UnsafeHtmlRendererConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,13 +21,13 @@ import com.vaadin.shared.ui.Connect;
/**
* A connector for {@link UnsafeHtmlRenderer}
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@Connect(com.vaadin.ui.renderers.HtmlRenderer.class)
-public class UnsafeHtmlRendererConnector extends
- AbstractRendererConnector<String> {
+public class UnsafeHtmlRendererConnector
+ extends AbstractRendererConnector<String> {
public static class UnsafeHtmlRenderer implements Renderer<String> {
@Override
diff --git a/client/src/main/java/com/vaadin/client/data/AbstractRemoteDataSource.java b/client/src/main/java/com/vaadin/client/data/AbstractRemoteDataSource.java
index 05ac7182c5..34342ebce9 100644
--- a/client/src/main/java/com/vaadin/client/data/AbstractRemoteDataSource.java
+++ b/client/src/main/java/com/vaadin/client/data/AbstractRemoteDataSource.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,7 +32,7 @@ import com.vaadin.shared.ui.grid.Range;
* user. An implementation of this class should override
* {@link #requestRows(int, int, RequestRowsCallback)} to trigger asynchronously
* loading of data and then pass the loaded data into the provided callback.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
* @param <T>
@@ -52,7 +52,7 @@ public abstract class AbstractRemoteDataSource<T> implements DataSource<T> {
/**
* Creates a new callback
- *
+ *
* @param source
* the data source for which the request is made
* @param requestedRange
@@ -70,7 +70,7 @@ public abstract class AbstractRemoteDataSource<T> implements DataSource<T> {
* Called by the
* {@link AbstractRemoteDataSource#requestRows(int, int, RequestRowsCallback)}
* implementation when data has been received.
- *
+ *
* @param rowData
* a list of row objects starting at the requested offset
* @param totalSize
@@ -85,7 +85,7 @@ public abstract class AbstractRemoteDataSource<T> implements DataSource<T> {
/**
* Gets the range of rows that was requested.
- *
+ *
* @return the requsted row range
*/
public Range getRequestedRange() {
@@ -105,7 +105,7 @@ public abstract class AbstractRemoteDataSource<T> implements DataSource<T> {
/**
* A method for the data source to update the row data.
- *
+ *
* @param row
* the updated row object
*/
@@ -204,7 +204,7 @@ public abstract class AbstractRemoteDataSource<T> implements DataSource<T> {
/**
* Pins a row with given handle. This function can be overridden to do
* specific logic related to pinning rows.
- *
+ *
* @param handle
* row handle to pin
*/
@@ -221,10 +221,10 @@ public abstract class AbstractRemoteDataSource<T> implements DataSource<T> {
/**
* Unpins a previously pinned row with given handle. This function can be
* overridden to do specific logic related to unpinning rows.
- *
+ *
* @param handle
* row handle to unpin
- *
+ *
* @throws IllegalStateException
* if given row handle has not been pinned before
*/
@@ -257,7 +257,7 @@ public abstract class AbstractRemoteDataSource<T> implements DataSource<T> {
/**
* Gets the row index range that was requested by the previous call to
* {@link #ensureAvailability(int, int)}.
- *
+ *
* @return the requested availability range
*/
public Range getRequestedAvailability() {
@@ -304,7 +304,7 @@ public abstract class AbstractRemoteDataSource<T> implements DataSource<T> {
/**
* Checks whether this data source is currently waiting for more rows to
* become available.
- *
+ *
* @return <code>true</code> if waiting for data; otherwise
* <code>false</code>
*/
@@ -338,7 +338,7 @@ public abstract class AbstractRemoteDataSource<T> implements DataSource<T> {
* <p>
* NOTE: This method has been replaced. Override
* {@link #onDropFromCache(int, Object)} instead of this method.
- *
+ *
* @since 7.5.0
* @param rowIndex
* the index of the dropped row
@@ -353,7 +353,7 @@ public abstract class AbstractRemoteDataSource<T> implements DataSource<T> {
* A hook that can be overridden to do something whenever a row has been
* dropped from the cache. DataSource no longer has anything in the given
* index.
- *
+ *
* @since 7.6
* @param rowIndex
* the index of the dropped row
@@ -376,7 +376,7 @@ public abstract class AbstractRemoteDataSource<T> implements DataSource<T> {
/**
* Triggers fetching rows from the remote data source. The provided callback
* should be informed when the requested rows have been received.
- *
+ *
* @param firstRowIndex
* the index of the first row to fetch
* @param numberOfRows
@@ -397,7 +397,7 @@ public abstract class AbstractRemoteDataSource<T> implements DataSource<T> {
* <p>
* <em>Note:</em> This method does not verify that the given row object
* exists at all in this DataSource.
- *
+ *
* @param row
* the row object
* @return index of the row; or <code>-1</code> if row is not available
@@ -423,7 +423,7 @@ public abstract class AbstractRemoteDataSource<T> implements DataSource<T> {
/**
* Informs this data source that updated data has been sent from the server.
- *
+ *
* @param firstRowIndex
* the index of the first received row
* @param rowData
@@ -437,8 +437,10 @@ public abstract class AbstractRemoteDataSource<T> implements DataSource<T> {
Range received = Range.withLength(firstRowIndex, rowData.size());
if (isWaitingForData()) {
- cacheStrategy.onDataArrive(Duration.currentTimeMillis()
- - currentRequestCallback.requestStart, received.length());
+ cacheStrategy.onDataArrive(
+ Duration.currentTimeMillis()
+ - currentRequestCallback.requestStart,
+ received.length());
currentRequestCallback = null;
}
@@ -450,17 +452,20 @@ public abstract class AbstractRemoteDataSource<T> implements DataSource<T> {
Range newUsefulData = partition[1];
if (!newUsefulData.isEmpty()) {
// Update the parts that are actually inside
- for (int i = newUsefulData.getStart(); i < newUsefulData.getEnd(); i++) {
+ for (int i = newUsefulData.getStart(); i < newUsefulData
+ .getEnd(); i++) {
final T row = rowData.get(i - firstRowIndex);
indexToRowMap.put(Integer.valueOf(i), row);
keyToIndexMap.put(getRowKey(row), Integer.valueOf(i));
}
if (dataChangeHandler != null) {
- Profiler.enter("AbstractRemoteDataSource.setRowData notify dataChangeHandler");
+ Profiler.enter(
+ "AbstractRemoteDataSource.setRowData notify dataChangeHandler");
dataChangeHandler.dataUpdated(newUsefulData.getStart(),
newUsefulData.length());
- Profiler.leave("AbstractRemoteDataSource.setRowData notify dataChangeHandler");
+ Profiler.leave(
+ "AbstractRemoteDataSource.setRowData notify dataChangeHandler");
}
// Potentially extend the range
@@ -490,7 +495,7 @@ public abstract class AbstractRemoteDataSource<T> implements DataSource<T> {
if (!partition[0].isEmpty() || !partition[2].isEmpty()) {
/*
* FIXME
- *
+ *
* Got data that we might need in a moment if the container is
* updated before the widget settings. Support for this will be
* implemented later on.
@@ -524,7 +529,7 @@ public abstract class AbstractRemoteDataSource<T> implements DataSource<T> {
/**
* Informs this data source that the server has removed data.
- *
+ *
* @param firstRowIndex
* the index of the first removed row
* @param count
@@ -552,8 +557,8 @@ public abstract class AbstractRemoteDataSource<T> implements DataSource<T> {
// Removal and cache share some indices. fix accordingly.
Range[] partitions = cached.partitionWith(removedRange);
Range remainsBefore = partitions[0];
- Range transposedRemainsAfter = partitions[2].offsetBy(-removedRange
- .length());
+ Range transposedRemainsAfter = partitions[2]
+ .offsetBy(-removedRange.length());
cached = remainsBefore.combineWith(transposedRemainsAfter);
} else if (removedRange.getEnd() <= cached.getStart()) {
// Removal was before the cache. offset the cache.
@@ -570,7 +575,7 @@ public abstract class AbstractRemoteDataSource<T> implements DataSource<T> {
/**
* Informs this data source that new data has been inserted from the server.
- *
+ *
* @param firstRowIndex
* the destination index of the new row data
* @param count
@@ -596,7 +601,7 @@ public abstract class AbstractRemoteDataSource<T> implements DataSource<T> {
* We need to invalidate the cache from the inserted row onwards,
* since the cache wants to be a contiguous range. It doesn't
* support holes.
- *
+ *
* If holes were supported, we could shift the higher part of
* "cached" and leave a hole the size of "count" in the middle.
*/
@@ -633,7 +638,7 @@ public abstract class AbstractRemoteDataSource<T> implements DataSource<T> {
/**
* Gets the current range of cached rows
- *
+ *
* @return the range of currently cached rows
*/
public Range getCachedRange() {
@@ -646,7 +651,7 @@ public abstract class AbstractRemoteDataSource<T> implements DataSource<T> {
* <p>
* The new strategy is immediately used to evaluate whether currently cached
* rows should be discarded or new rows should be fetched.
- *
+ *
* @param cacheStrategy
* a cache strategy implementation, not <code>null</code>
*/
@@ -696,8 +701,8 @@ public abstract class AbstractRemoteDataSource<T> implements DataSource<T> {
Object key = getRowKey(row);
if (key == null) {
- throw new NullPointerException("key may not be null (row: " + row
- + ")");
+ throw new NullPointerException(
+ "key may not be null (row: " + row + ")");
}
if (pinnedRows.containsKey(key)) {
@@ -725,7 +730,7 @@ public abstract class AbstractRemoteDataSource<T> implements DataSource<T> {
* <p>
* A very usual and simple example what this could be, is an unique ID for
* this object that would also be stored in a database.
- *
+ *
* @param row
* the row object for which to get the key
* @return a non-null object that uniquely and consistently represents the
@@ -747,7 +752,7 @@ public abstract class AbstractRemoteDataSource<T> implements DataSource<T> {
* If you have information about the structure of the change, use
* {@link #insertRowData(int, int)} or {@link #removeRowData(int, int)} to
* indicate where the inserted or removed rows are located.
- *
+ *
* @param newSize
* the new size of the container
*/
diff --git a/client/src/main/java/com/vaadin/client/data/CacheStrategy.java b/client/src/main/java/com/vaadin/client/data/CacheStrategy.java
index 79ce537314..6a0f4452d2 100644
--- a/client/src/main/java/com/vaadin/client/data/CacheStrategy.java
+++ b/client/src/main/java/com/vaadin/client/data/CacheStrategy.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ import com.vaadin.shared.ui.grid.Range;
/**
* Determines what data an {@link AbstractRemoteDataSource} should fetch and
* keep cached.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -46,8 +46,8 @@ public interface CacheStrategy {
Range estimatedAvailableRange) {
int cacheSize = getMinimumCacheSize(displayedRange.length());
- return displayedRange.expand(cacheSize, cacheSize).restrictTo(
- estimatedAvailableRange);
+ return displayedRange.expand(cacheSize, cacheSize)
+ .restrictTo(estimatedAvailableRange);
}
@Override
@@ -55,13 +55,13 @@ public interface CacheStrategy {
Range estimatedAvailableRange) {
int cacheSize = getMaximumCacheSize(displayedRange.length());
- return displayedRange.expand(cacheSize, cacheSize).restrictTo(
- estimatedAvailableRange);
+ return displayedRange.expand(cacheSize, cacheSize)
+ .restrictTo(estimatedAvailableRange);
}
/**
* Gets the maximum number of extra items to cache in one direction.
- *
+ *
* @param pageSize
* the current number of items used at once
* @return maximum of items to cache
@@ -70,7 +70,7 @@ public interface CacheStrategy {
/**
* Gets the the minimum number of extra items to cache in one direction.
- *
+ *
* @param pageSize
* the current number of items used at once
* @return minimum number of items to cache
@@ -86,8 +86,8 @@ public interface CacheStrategy {
* the cache and items are discarded if there's yet another page size worth
* of items cached in either direction.
*/
- public static class DefaultCacheStrategy extends
- AbstractBasicSymmetricalCacheStrategy {
+ public static class DefaultCacheStrategy
+ extends AbstractBasicSymmetricalCacheStrategy {
private final int minimumRatio;
private final int maximumRatio;
@@ -103,7 +103,7 @@ public interface CacheStrategy {
* Creates a DefaultCacheStrategy with custom ratios for how much data
* to cache. The ratios denote how many multiples of the currently used
* page size are kept in the cache in each direction.
- *
+ *
* @param minimumRatio
* the minimum number of pages to keep in the cache in each
* direction
@@ -135,7 +135,7 @@ public interface CacheStrategy {
* A cache strategy implementation cannot use this information to keep track
* of which items are in the cache since the data source might discard items
* without notifying the cache strategy.
- *
+ *
* @param roundTripTime
* the total number of milliseconds elapsed from requesting the
* data until the response was passed to the data source
@@ -148,14 +148,14 @@ public interface CacheStrategy {
* Gets the minimum row range that should be cached. The data source will
* fetch new data if the currently cached range does not fill the entire
* minimum cache range.
- *
+ *
* @param displayedRange
* the range of currently displayed rows
* @param cachedRange
* the range of currently cached rows
* @param estimatedAvailableRange
* the estimated range of rows available for the data source
- *
+ *
* @return the minimum range of rows that should be cached, should at least
* include the displayed range and should not exceed the total
* estimated available range
@@ -166,14 +166,14 @@ public interface CacheStrategy {
/**
* Gets the maximum row range that should be cached. The data source will
* discard cached rows that are outside the maximum range.
- *
+ *
* @param displayedRange
* the range of currently displayed rows
* @param cachedRange
* the range of currently cached rows
* @param estimatedAvailableRange
* the estimated range of rows available for the data source
- *
+ *
* @return the maximum range of rows that should be cached, should at least
* include the displayed range and should not exceed the total
* estimated available range
diff --git a/client/src/main/java/com/vaadin/client/data/DataChangeHandler.java b/client/src/main/java/com/vaadin/client/data/DataChangeHandler.java
index 35f1eafea9..7e34cf9386 100644
--- a/client/src/main/java/com/vaadin/client/data/DataChangeHandler.java
+++ b/client/src/main/java/com/vaadin/client/data/DataChangeHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ package com.vaadin.client.data;
/**
* Callback interface used by {@link DataSource} to inform its user about
* updates to the data.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -29,7 +29,7 @@ public interface DataChangeHandler {
* rows has changed or if rows have been moved around,
* {@link #dataAdded(int, int)} or {@link #dataRemoved(int, int)} should
* ideally be used instead.
- *
+ *
* @param firstRowIndex
* the index of the first changed row
* @param numberOfRows
@@ -39,7 +39,7 @@ public interface DataChangeHandler {
/**
* Called when rows have been removed from the data source.
- *
+ *
* @param firstRowIndex
* the index that the first removed row had prior to removal
* @param numberOfRows
@@ -49,7 +49,7 @@ public interface DataChangeHandler {
/**
* Called when the new rows have been added to the container.
- *
+ *
* @param firstRowIndex
* the index of the first added row
* @param numberOfRows
@@ -60,7 +60,7 @@ public interface DataChangeHandler {
/**
* Called when rows requested with
* {@link DataSource#ensureAvailability(int, int)} rows are available.
- *
+ *
* @param firstRowIndex
* the index of the first available row
* @param numberOfRows
@@ -74,7 +74,7 @@ public interface DataChangeHandler {
* This should be used in the cases where the data has changed in some
* unverifiable way. I.e. "something happened". This will lead to a
* re-rendering of the current Grid viewport
- *
+ *
* @param estimatedNewDataSize
* the estimated size of the new data set
*/
diff --git a/client/src/main/java/com/vaadin/client/data/DataSource.java b/client/src/main/java/com/vaadin/client/data/DataSource.java
index f3711c3c68..5e4cbc1b40 100644
--- a/client/src/main/java/com/vaadin/client/data/DataSource.java
+++ b/client/src/main/java/com/vaadin/client/data/DataSource.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ package com.vaadin.client.data;
* Source of data for widgets showing lazily loaded data based on indexable
* items (e.g. rows) of a specified type. The data source is a lazy view into a
* larger data set.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
* @param <T>
@@ -32,7 +32,7 @@ public interface DataSource<T> {
* A handle that contains information on whether a row should be
* {@link #pin() pinned} or {@link #unpin() unpinned}, and also always the
* most recent representation for that particular row.
- *
+ *
* @param <T>
* the row type
*/
@@ -40,7 +40,7 @@ public interface DataSource<T> {
/**
* Gets the most recent representation for the row this handle
* represents.
- *
+ *
* @return the most recent representation for the row this handle
* represents
* @throws IllegalStateException
@@ -60,7 +60,7 @@ public interface DataSource<T> {
* source is able to. Since the DataSource might create a new instance
* of an object, object references aren't necessarily kept up-to-date.
* This is a technical work-around for that.
- *
+ *
* @see #unpin()
*/
public abstract void pin();
@@ -76,7 +76,7 @@ public interface DataSource<T> {
* source is able to. Since the DataSource might create a new instance
* of an object, object references aren't necessarily kept up-to-date.
* This is a technical work-around for that.
- *
+ *
* @throws IllegalStateException
* if this row handle has not been pinned before
* @see #pin()
@@ -87,7 +87,7 @@ public interface DataSource<T> {
* Informs the DataSource that the row data represented by this
* RowHandle has been updated. DataChangeHandler for the DataSource
* should be informed that parts of data have been updated.
- *
+ *
* @see DataChangeHandler#dataUpdated(int, int)
*/
public abstract void updateRow();
@@ -101,7 +101,7 @@ public interface DataSource<T> {
* RowHandle to function. Because Java has no mechanism to force an
* override of an existing method, we're defining a new method for that
* instead.
- *
+ *
* @param rowHandle
* the reference object with which to compare
* @return {@code true} if this object is the same as the obj argument;
@@ -118,7 +118,7 @@ public interface DataSource<T> {
* RowHandle to function. Because Java has no mechanism to force an
* override of an existing method, we're defining a new method for that
* instead.
- *
+ *
* @return a hash code value for this object
*/
protected abstract int hashCodeExplicit();
@@ -145,7 +145,7 @@ public interface DataSource<T> {
* <p>
* After any possible lazy loading and updates are done, the change handler
* is informed that new data is available.
- *
+ *
* @param firstRowIndex
* the index of the first needed row
* @param numberOfRows
@@ -160,7 +160,7 @@ public interface DataSource<T> {
* This method does not trigger loading of unavailable data.
* {@link #ensureAvailability(int, int)} should be used to signal what data
* will be needed.
- *
+ *
* @param rowIndex
* the index of the row to retrieve data for
* @return data for the row; or <code>null</code> if no data is available
@@ -169,7 +169,7 @@ public interface DataSource<T> {
/**
* Returns the number of rows in the data source.
- *
+ *
* @return the current size of the data source
*/
public int size();
@@ -177,7 +177,7 @@ public interface DataSource<T> {
/**
* Sets a data change handler to inform when data is updated, added or
* removed.
- *
+ *
* @param dataChangeHandler
* the data change handler
*/
@@ -185,7 +185,7 @@ public interface DataSource<T> {
/**
* Gets a {@link RowHandle} of a row object in the cache.
- *
+ *
* @param row
* the row object for which to retrieve a row handle
* @return a non-<code>null</code> row handle of the given row object
diff --git a/client/src/main/java/com/vaadin/client/debug/internal/AnalyzeLayoutsPanel.java b/client/src/main/java/com/vaadin/client/debug/internal/AnalyzeLayoutsPanel.java
index fc9f3856b5..55c2ce5d75 100644
--- a/client/src/main/java/com/vaadin/client/debug/internal/AnalyzeLayoutsPanel.java
+++ b/client/src/main/java/com/vaadin/client/debug/internal/AnalyzeLayoutsPanel.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -44,7 +44,7 @@ import com.vaadin.client.ValueMap;
/**
* Analyze layouts view panel of the debug window.
- *
+ *
* @since 7.1.4
*/
public class AnalyzeLayoutsPanel extends FlowPanel {
@@ -68,8 +68,8 @@ public class AnalyzeLayoutsPanel extends FlowPanel {
int size = valueMapArray.length();
if (size > 0) {
- SimpleTree root = new SimpleTree("Layouts analyzed, " + size
- + " top level problems");
+ SimpleTree root = new SimpleTree(
+ "Layouts analyzed, " + size + " top level problems");
for (int i = 0; i < size; i++) {
printLayoutError(ac, valueMapArray.get(i), root);
}
@@ -94,7 +94,8 @@ public class AnalyzeLayoutsPanel extends FlowPanel {
printClientSideDetectedIssues(zeroHeightComponents, ac);
}
if (zeroWidthComponents.size() > 0) {
- add(new HTML("<p><strong>Horizontally zero size:</strong></p>"));
+ add(new HTML(
+ "<p><strong>Horizontally zero size:</strong></p>"));
printClientSideDetectedIssues(zeroWidthComponents, ac);
}
}
@@ -111,12 +112,10 @@ public class AnalyzeLayoutsPanel extends FlowPanel {
final ServerConnector parent = connector.getParent();
final String parentId = parent.getConnectorId();
- final Label errorDetails = new Label(connector.getClass()
- .getSimpleName()
- + "["
- + connector.getConnectorId()
- + "]"
- + " inside " + parent.getClass().getSimpleName());
+ final Label errorDetails = new Label(
+ connector.getClass().getSimpleName() + "["
+ + connector.getConnectorId() + "]" + " inside "
+ + parent.getClass().getSimpleName());
if (parent instanceof ComponentConnector) {
final ComponentConnector parentConnector = (ComponentConnector) parent;
@@ -173,8 +172,8 @@ public class AnalyzeLayoutsPanel extends FlowPanel {
Highlight.show(connector);
- final SimpleTree errorNode = new SimpleTree(connector.getClass()
- .getSimpleName() + " id: " + pid);
+ final SimpleTree errorNode = new SimpleTree(
+ connector.getClass().getSimpleName() + " id: " + pid);
errorNode.addDomHandler(new MouseOverHandler() {
@Override
public void onMouseOver(MouseOverEvent event) {
@@ -205,12 +204,12 @@ public class AnalyzeLayoutsPanel extends FlowPanel {
VerticalPanel errorDetails = new VerticalPanel();
if (valueMap.containsKey("heightMsg")) {
- errorDetails.add(new Label("Height problem: "
- + valueMap.getString("heightMsg")));
+ errorDetails.add(new Label(
+ "Height problem: " + valueMap.getString("heightMsg")));
}
if (valueMap.containsKey("widthMsg")) {
- errorDetails.add(new Label("Width problem: "
- + valueMap.getString("widthMsg")));
+ errorDetails.add(new Label(
+ "Width problem: " + valueMap.getString("widthMsg")));
}
if (errorDetails.getWidgetCount() > 0) {
errorNode.add(errorDetails);
diff --git a/client/src/main/java/com/vaadin/client/debug/internal/ConnectorInfoPanel.java b/client/src/main/java/com/vaadin/client/debug/internal/ConnectorInfoPanel.java
index 5269d82bd6..f41c99decf 100644
--- a/client/src/main/java/com/vaadin/client/debug/internal/ConnectorInfoPanel.java
+++ b/client/src/main/java/com/vaadin/client/debug/internal/ConnectorInfoPanel.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -35,14 +35,14 @@ import com.vaadin.shared.communication.SharedState;
/**
* Connector information view panel of the debug window.
- *
+ *
* @since 7.1.4
*/
public class ConnectorInfoPanel extends FlowPanel {
/**
* Update the panel to show information about a connector.
- *
+ *
* @param connector
*/
public void update(ServerConnector connector) {
@@ -57,13 +57,13 @@ public class ConnectorInfoPanel extends FlowPanel {
if (connector instanceof ComponentConnector) {
ComponentConnector component = (ComponentConnector) connector;
- ignoreProperties.addAll(Arrays.asList("caption", "description",
- "width", "height"));
+ ignoreProperties.addAll(
+ Arrays.asList("caption", "description", "width", "height"));
AbstractComponentState componentState = component.getState();
- html += getRowHTML("Widget", component.getWidget().getClass()
- .getSimpleName());
+ html += getRowHTML("Widget",
+ component.getWidget().getClass().getSimpleName());
html += getRowHTML("Caption", componentState.caption);
html += getRowHTML("Description", componentState.description);
html += getRowHTML("Width", componentState.width + " (actual: "
diff --git a/client/src/main/java/com/vaadin/client/debug/internal/DebugButton.java b/client/src/main/java/com/vaadin/client/debug/internal/DebugButton.java
index f797197afb..8a2bc96d24 100644
--- a/client/src/main/java/com/vaadin/client/debug/internal/DebugButton.java
+++ b/client/src/main/java/com/vaadin/client/debug/internal/DebugButton.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ import com.google.gwt.user.client.ui.Button;
* Simple extension of {@link Button} that is preconfigured with for use in
* {@link VDebugWindow}. Uses icon-font for icons, and allows title to be
* specified in the constructor.
- *
+ *
* @since 7.1
* @author Vaadin Ltd
*/
@@ -32,7 +32,7 @@ public class DebugButton extends Button {
/**
* Creates a {@link Button} with the given icon-font icon. The icon id will
* be used in the <i>data-icon</i> attribute of an <i>&lt;i&gt;</i> -tag.
- *
+ *
* @param icon
* Identifier for the desired icon in an icon-font
*/
@@ -54,12 +54,12 @@ public class DebugButton extends Button {
* Creates a {@link Button} with the given icon-font icon and title
* (tooltip). The icon id will be used in the <i>data-icon</i> attribute of
* an <i>&lt;i&gt;</i> -tag.
- *
+ *
* @param icon
* Identifier for the desired icon in an icon-font
* @param title
* Button title (tooltip)
- *
+ *
*/
public DebugButton(Icon icon, String title) {
this(icon, title, null);
@@ -69,7 +69,7 @@ public class DebugButton extends Button {
* Creates a {@link Button} with the given icon-font icon, title (tooltip),
* and caption. The icon id will be used in the <i>data-icon</i> attribute
* of an <i>&lt;i&gt;</i> -tag.
- *
+ *
* @param icon
* Identifier for the desired icon in an icon-font
* @param title
@@ -89,7 +89,7 @@ public class DebugButton extends Button {
/**
* Adds or removes a stylename, indicating whether or not the button is in
* it's active state.
- *
+ *
* @param active
*/
public void setActive(boolean active) {
@@ -99,7 +99,7 @@ public class DebugButton extends Button {
/**
* Indicates wheter the Button is currently in its active state or not
- *
+ *
* @return true if the Button is active, false otherwise
*/
public boolean isActive() {
diff --git a/client/src/main/java/com/vaadin/client/debug/internal/ErrorNotificationHandler.java b/client/src/main/java/com/vaadin/client/debug/internal/ErrorNotificationHandler.java
index 5d128cbdcc..958985b397 100644
--- a/client/src/main/java/com/vaadin/client/debug/internal/ErrorNotificationHandler.java
+++ b/client/src/main/java/com/vaadin/client/debug/internal/ErrorNotificationHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,7 +30,7 @@ import com.vaadin.client.ui.VNotification;
/**
* Log message handler that shows big red notification for {@link Level#SEVERE}
* messages that have a throwable.
- *
+ *
* @since 7.1
* @author Vaadin Ltd
*/
@@ -66,8 +66,8 @@ public class ErrorNotificationHandler extends Handler {
.getRunningApplications().get(0);
owner = connection.getUIConnector().getWidget();
}
- VNotification n = VNotification.createNotification(
- VNotification.DELAY_FOREVER, owner);
+ VNotification n = VNotification
+ .createNotification(VNotification.DELAY_FOREVER, owner);
n.getElement().getStyle().setTextAlign(TextAlign.LEFT);
n.show("<h1>Uncaught client side exception</h1><br />"
+ exceptionText.replace("\n", "<br/>\n"),
diff --git a/client/src/main/java/com/vaadin/client/debug/internal/HierarchyPanel.java b/client/src/main/java/com/vaadin/client/debug/internal/HierarchyPanel.java
index c5c134fc31..2b033f0f88 100644
--- a/client/src/main/java/com/vaadin/client/debug/internal/HierarchyPanel.java
+++ b/client/src/main/java/com/vaadin/client/debug/internal/HierarchyPanel.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -39,7 +39,7 @@ import com.vaadin.client.Util;
/**
* Hierarchy view panel of the debug window. This class can be used in various
* debug window sections to show the current connector hierarchy.
- *
+ *
* @since 7.1.4
*/
public class HierarchyPanel extends FlowPanel {
@@ -73,7 +73,7 @@ public class HierarchyPanel extends FlowPanel {
/**
* Adds the captions of all open (non-leaf) nodes in the hierarchy tree
* recursively.
- *
+ *
* @param widget
* the widget in which to search for open nodes (if SimpleTree)
* @param openNodes
@@ -163,7 +163,7 @@ public class HierarchyPanel extends FlowPanel {
/**
* Outputs debug information on the server - usually in the console of an
* IDE, with a clickable reference to the relevant code location.
- *
+ *
* @since 7.1
* @param connector
* show debug info for this connector
diff --git a/client/src/main/java/com/vaadin/client/debug/internal/HierarchySection.java b/client/src/main/java/com/vaadin/client/debug/internal/HierarchySection.java
index ffb4042e69..cc3a6be4d5 100644
--- a/client/src/main/java/com/vaadin/client/debug/internal/HierarchySection.java
+++ b/client/src/main/java/com/vaadin/client/debug/internal/HierarchySection.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -39,7 +39,7 @@ import com.vaadin.client.WidgetUtil;
/**
* Provides functionality for examining the UI component hierarchy.
- *
+ *
* @since 7.1
* @author Vaadin Ltd
*/
@@ -77,14 +77,14 @@ public class HierarchySection implements Section {
* Called when the user hovers over a connector, which is highlighted.
* Also called when hovering outside the tree, e.g. over the debug
* console, but in this case the connector is null
- *
+ *
* @param connector
*/
void onHover(ComponentConnector connector);
/**
* Called when the user clicks on a highlighted connector.
- *
+ *
* @param connector
*/
void onSelected(ComponentConnector connector);
@@ -121,8 +121,8 @@ public class HierarchySection implements Section {
stopFind();
connector.getConnection().getUIConnector()
.showServerDesign(connector);
- content.setWidget(new HTML(
- "Design file for component sent to server log"));
+ content.setWidget(
+ new HTML("Design file for component sent to server log"));
}
};
@@ -334,17 +334,17 @@ public class HierarchySection implements Section {
@Override
public void onPreviewNativeEvent(NativePreviewEvent event) {
- if (event.getTypeInt() == Event.ONKEYDOWN
- && event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ESCAPE) {
+ if (event.getTypeInt() == Event.ONKEYDOWN && event.getNativeEvent()
+ .getKeyCode() == KeyCodes.KEY_ESCAPE) {
stopFind();
Highlight.hideAll();
return;
}
if (event.getTypeInt() == Event.ONMOUSEMOVE) {
Highlight.hideAll();
- Element eventTarget = WidgetUtil.getElementFromPoint(event
- .getNativeEvent().getClientX(), event.getNativeEvent()
- .getClientY());
+ Element eventTarget = WidgetUtil.getElementFromPoint(
+ event.getNativeEvent().getClientX(),
+ event.getNativeEvent().getClientY());
if (VDebugWindow.get().getElement().isOrHasChild(eventTarget)) {
// Do not prevent using debug window controls
@@ -376,9 +376,9 @@ public class HierarchySection implements Section {
event.cancel();
event.consume();
event.getNativeEvent().stopPropagation();
- Element eventTarget = WidgetUtil.getElementFromPoint(event
- .getNativeEvent().getClientX(), event.getNativeEvent()
- .getClientY());
+ Element eventTarget = WidgetUtil.getElementFromPoint(
+ event.getNativeEvent().getClientX(),
+ event.getNativeEvent().getClientY());
for (ApplicationConnection a : ApplicationConfiguration
.getRunningApplications()) {
ComponentConnector connector = Util.getConnectorForElement(
diff --git a/client/src/main/java/com/vaadin/client/debug/internal/Highlight.java b/client/src/main/java/com/vaadin/client/debug/internal/Highlight.java
index e91f4abcbb..b24e19e05e 100644
--- a/client/src/main/java/com/vaadin/client/debug/internal/Highlight.java
+++ b/client/src/main/java/com/vaadin/client/debug/internal/Highlight.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -40,7 +40,7 @@ import com.vaadin.client.ui.VWindow;
* disappear with the highlighted widget, and it is also fairly likely that
* someone else calls {@link #hideAll()} eventually.
* </p>
- *
+ *
* @since 7.1
* @author Vaadin Ltd
*/
@@ -59,7 +59,7 @@ public class Highlight {
* Pass the returned {@link Element} to {@link #hide(Element)} to remove
* this particular highlight.
* </p>
- *
+ *
* @param connector
* ComponentConnector
* @return Highlight element
@@ -75,9 +75,9 @@ public class Highlight {
* Pass the returned {@link Element} to {@link #hide(Element)} to remove
* this particular highlight.
* </p>
- *
+ *
* @since 7.1
- *
+ *
* @param connector
* the server connector to highlight
* @return Highlight element, or <code>null</code> if the connector isn't a
@@ -99,7 +99,7 @@ public class Highlight {
* Pass the returned {@link Element} to {@link #hide(Element)} to remove
* this particular highlight.
* </p>
- *
+ *
* @param connector
* ComponentConnector
* @param color
@@ -120,7 +120,7 @@ public class Highlight {
* Pass the returned {@link Element} to {@link #hide(Element)} to remove
* this particular highlight.
* </p>
- *
+ *
* @param widget
* Widget to highlight
* @return Highlight element
@@ -135,7 +135,7 @@ public class Highlight {
* Pass the returned {@link Element} to {@link #hide(Element)} to remove
* this particular highlight.
* </p>
- *
+ *
* @param widget
* Widget to highlight
* @param color
@@ -155,7 +155,7 @@ public class Highlight {
* Pass the returned {@link Element} to {@link #hide(Element)} to remove
* this particular highlight.
* </p>
- *
+ *
* @param element
* Element to highlight
* @return Highlight element
@@ -170,7 +170,7 @@ public class Highlight {
* Pass the returned highlight {@link Element} to {@link #hide(Element)} to
* remove this particular highlight.
* </p>
- *
+ *
* @param element
* Element to highlight
* @param color
@@ -204,8 +204,8 @@ public class Highlight {
style.setBackgroundColor(color);
style.setOpacity(DEFAULT_OPACITY);
if (BrowserInfo.get().isIE()) {
- style.setProperty("filter", "alpha(opacity="
- + (DEFAULT_OPACITY * 100) + ")");
+ style.setProperty("filter",
+ "alpha(opacity=" + (DEFAULT_OPACITY * 100) + ")");
}
highlights.add(highlight);
@@ -217,7 +217,7 @@ public class Highlight {
/**
* Hides the given highlight.
- *
+ *
* @param highlight
* Highlight to hide
*/
diff --git a/client/src/main/java/com/vaadin/client/debug/internal/Icon.java b/client/src/main/java/com/vaadin/client/debug/internal/Icon.java
index a30dc05fcb..8e56525c3a 100644
--- a/client/src/main/java/com/vaadin/client/debug/internal/Icon.java
+++ b/client/src/main/java/com/vaadin/client/debug/internal/Icon.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/debug/internal/InfoSection.java b/client/src/main/java/com/vaadin/client/debug/internal/InfoSection.java
index 39ff345cb1..d3b882e342 100644
--- a/client/src/main/java/com/vaadin/client/debug/internal/InfoSection.java
+++ b/client/src/main/java/com/vaadin/client/debug/internal/InfoSection.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -34,7 +34,7 @@ import com.vaadin.shared.util.SharedUtil;
/**
* Information section of the debug window
- *
+ *
* @since 7.1
* @author Vaadin Ltd
*/
@@ -57,7 +57,7 @@ public class InfoSection implements Section {
};
/**
- *
+ *
*/
public InfoSection() {
createContent();
@@ -95,7 +95,7 @@ public class InfoSection implements Section {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.debug.internal.Section#getTabButton()
*/
@Override
@@ -105,7 +105,7 @@ public class InfoSection implements Section {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.debug.internal.Section#getControls()
*/
@Override
@@ -115,7 +115,7 @@ public class InfoSection implements Section {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.debug.internal.Section#getContent()
*/
@Override
@@ -125,7 +125,7 @@ public class InfoSection implements Section {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.debug.internal.Section#show()
*/
@Override
@@ -135,7 +135,7 @@ public class InfoSection implements Section {
/**
* Updates the information for all running applications
- *
+ *
* @since 7.1
*/
private void refresh() {
@@ -154,7 +154,7 @@ public class InfoSection implements Section {
/**
* Updates the information for a single running application
- *
+ *
* @since 7.1
*/
private void refresh(ApplicationConnection connection) {
@@ -165,8 +165,8 @@ public class InfoSection implements Section {
addRow("Widget set", GWT.getModuleName());
addRow("Theme", connection.getUIConnector().getActiveTheme());
- String communicationMethodInfo = connection
- .getMessageSender().getCommunicationMethodName();
+ String communicationMethodInfo = connection.getMessageSender()
+ .getCommunicationMethodName();
int pollInterval = connection.getUIConnector().getState().pollInterval;
if (pollInterval > 0) {
communicationMethodInfo += " (poll interval " + pollInterval
@@ -185,7 +185,7 @@ public class InfoSection implements Section {
/**
* Logs version information for client/server/theme.
- *
+ *
* @param applicationConfiguration
* @since 7.1
*/
@@ -211,10 +211,10 @@ public class InfoSection implements Section {
themeVersion);
boolean servletOk = equalsEither(servletVersion, clientVersion,
themeVersion);
- addRow("Client engine version", clientVersion, clientOk ? null
- : ERROR_STYLE);
- addRow("Server engine version", servletVersion, servletOk ? null
- : ERROR_STYLE);
+ addRow("Client engine version", clientVersion,
+ clientOk ? null : ERROR_STYLE);
+ addRow("Server engine version", servletVersion,
+ servletOk ? null : ERROR_STYLE);
addRow("Theme version", themeVersion, themeOk ? null : ERROR_STYLE);
if (jsVersion != null) {
addRow("Push server version", atmosphereVersion);
@@ -225,7 +225,7 @@ public class InfoSection implements Section {
/**
* Checks if the target value equals one of the reference values
- *
+ *
* @param target
* The value to compare
* @param reference1
@@ -249,7 +249,7 @@ public class InfoSection implements Section {
/**
* Finds out the version of the current theme (i.e. the version of Vaadin
* used to compile it)
- *
+ *
* @since 7.1
* @return The full version as a string
*/
@@ -279,7 +279,7 @@ public class InfoSection implements Section {
/**
* Removes all content
- *
+ *
* @since 7.1
*/
private void clear() {
@@ -288,7 +288,7 @@ public class InfoSection implements Section {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.debug.internal.Section#hide()
*/
@Override
@@ -298,7 +298,7 @@ public class InfoSection implements Section {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.debug.internal.Section#meta(com.vaadin.client.
* ApplicationConnection, com.vaadin.client.ValueMap)
*/
@@ -309,7 +309,7 @@ public class InfoSection implements Section {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.debug.internal.Section#uidl(com.vaadin.client.
* ApplicationConnection, com.vaadin.client.ValueMap)
*/
diff --git a/client/src/main/java/com/vaadin/client/debug/internal/LogSection.java b/client/src/main/java/com/vaadin/client/debug/internal/LogSection.java
index 30abb4fff9..f4881efb95 100644
--- a/client/src/main/java/com/vaadin/client/debug/internal/LogSection.java
+++ b/client/src/main/java/com/vaadin/client/debug/internal/LogSection.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -40,7 +40,7 @@ import com.vaadin.client.ValueMap;
* <p>
* Scroll lock state is persisted.
* </p>
- *
+ *
* @since 7.1
* @author Vaadin Ltd
*/
@@ -61,7 +61,8 @@ public class LogSection implements Section {
}
@Override
- protected String getRecordInfo(LogRecord event, String newline) {
+ protected String getRecordInfo(LogRecord event,
+ String newline) {
return "";
}
});
@@ -157,8 +158,8 @@ public class LogSection implements Section {
public void onClick(ClickEvent event) {
Element el = Element
.as(event.getNativeEvent().getEventTarget());
- while (!el.getClassName().contains(
- VDebugWindow.STYLENAME + "-message")) {
+ while (!el.getClassName()
+ .contains(VDebugWindow.STYLENAME + "-message")) {
if (el == contentElement) {
// clicked something else
return;
@@ -188,7 +189,7 @@ public class LogSection implements Section {
/**
* Activates or deactivates scroll lock
- *
+ *
* @param locked
*/
void setScrollLock(boolean locked) {
@@ -242,7 +243,7 @@ public class LogSection implements Section {
/**
* Sets the log row limit.
- *
+ *
* @param limit
*/
public void setLimit(int limit) {
@@ -254,7 +255,7 @@ public class LogSection implements Section {
/**
* Gets the current log row limit.
- *
+ *
* @return
*/
public int getLimit() {
@@ -319,7 +320,7 @@ public class LogSection implements Section {
/**
* Adds a row to the log, applies the log row limit by removing old rows if
* needed, and scrolls new row into view if scroll lock is not active.
- *
+ *
* @param level
* @param msg
* @return
@@ -336,8 +337,8 @@ public class LogSection implements Section {
+ "'></span><span class='" + VDebugWindow.STYLENAME
+ "-time' title='"
+ VDebugWindow.getTimingTooltip(sinceStart, sinceReset) + "'>"
- + sinceReset + "ms</span><span class='"
- + VDebugWindow.STYLENAME + "-message'>" + msg + "</span>";
+ + sinceReset + "ms</span><span class='" + VDebugWindow.STYLENAME
+ + "-message'>" + msg + "</span>";
row.setInnerHTML(inner);
contentElement.appendChild(row);
diff --git a/client/src/main/java/com/vaadin/client/debug/internal/NetworkSection.java b/client/src/main/java/com/vaadin/client/debug/internal/NetworkSection.java
index 5b0579238f..23d7883c05 100644
--- a/client/src/main/java/com/vaadin/client/debug/internal/NetworkSection.java
+++ b/client/src/main/java/com/vaadin/client/debug/internal/NetworkSection.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,9 +24,9 @@ import com.vaadin.client.ValueMap;
/**
* Displays network activity; requests and responses.
- *
+ *
* Currently only displays responses in a simple manner.
- *
+ *
* @since 7.1
* @author Vaadin Ltd
*/
@@ -84,8 +84,8 @@ public class NetworkSection implements Section {
VUIDLBrowser vuidlBrowser = new VUIDLBrowser(uidl, ac);
vuidlBrowser.addStyleName(VDebugWindow.STYLENAME + "-row");
vuidlBrowser.setText("Response @ " + sinceReset + "ms");
- vuidlBrowser.setTitle(VDebugWindow.getTimingTooltip(sinceStart,
- sinceReset));
+ vuidlBrowser.setTitle(
+ VDebugWindow.getTimingTooltip(sinceStart, sinceReset));
vuidlBrowser.close();
content.add(vuidlBrowser);
diff --git a/client/src/main/java/com/vaadin/client/debug/internal/OptimizedWidgetsetPanel.java b/client/src/main/java/com/vaadin/client/debug/internal/OptimizedWidgetsetPanel.java
index d9aad9e61b..4654421361 100644
--- a/client/src/main/java/com/vaadin/client/debug/internal/OptimizedWidgetsetPanel.java
+++ b/client/src/main/java/com/vaadin/client/debug/internal/OptimizedWidgetsetPanel.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ import com.vaadin.client.ui.UnknownComponentConnector;
/**
* Optimized widgetset view panel of the debug window.
- *
+ *
* @since 7.1.4
*/
public class OptimizedWidgetsetPanel extends FlowPanel {
@@ -95,8 +95,8 @@ public class OptimizedWidgetsetPanel extends FlowPanel {
tag++;
if (tag > 10000) {
// Sanity check
- getLogger()
- .severe("Search for used connector classes was forcefully terminated");
+ getLogger().severe(
+ "Search for used connector classes was forcefully terminated");
break;
}
}
diff --git a/client/src/main/java/com/vaadin/client/debug/internal/ProfilerSection.java b/client/src/main/java/com/vaadin/client/debug/internal/ProfilerSection.java
index 2851563884..3c542dbe69 100644
--- a/client/src/main/java/com/vaadin/client/debug/internal/ProfilerSection.java
+++ b/client/src/main/java/com/vaadin/client/debug/internal/ProfilerSection.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -36,10 +36,10 @@ import com.vaadin.client.ValueMap;
/**
* Debug window section for investigating {@link Profiler} data. This section is
* only visible if the profiler is enabled ({@link Profiler#isEnabled()}).
- *
+ *
* @since 7.1
* @author Vaadin Ltd
- *
+ *
* @see Profiler
*/
public class ProfilerSection implements Section {
@@ -69,13 +69,13 @@ public class ProfilerSection implements Section {
SimpleTree offendersTree = new SimpleTree("Longest events");
for (int i = 0; i < totals.size() && i < 20; i++) {
Node node = totals.get(i);
- offendersTree.add(new Label(node
- .getStringRepresentation("")));
+ offendersTree
+ .add(new Label(node.getStringRepresentation("")));
}
- SimpleTree root = new SimpleTree(eventCount
- + " profiler events using " + Util.round(totalTime, 3)
- + " ms");
+ SimpleTree root = new SimpleTree(
+ eventCount + " profiler events using "
+ + Util.round(totalTime, 3) + " ms");
root.add(drillDownTree);
root.add(offendersTree);
root.open(false);
@@ -85,12 +85,14 @@ public class ProfilerSection implements Section {
}
@Override
- public void addBootstrapData(LinkedHashMap<String, Double> timings) {
+ public void addBootstrapData(
+ LinkedHashMap<String, Double> timings) {
SimpleTree tree = new SimpleTree(
"Time since window.performance.timing events");
Set<Entry<String, Double>> entrySet = timings.entrySet();
for (Entry<String, Double> entry : entrySet) {
- tree.add(new Label(entry.getValue() + " " + entry.getKey()));
+ tree.add(
+ new Label(entry.getValue() + " " + entry.getKey()));
}
tree.open(false);
diff --git a/client/src/main/java/com/vaadin/client/debug/internal/Section.java b/client/src/main/java/com/vaadin/client/debug/internal/Section.java
index 876b9bbc27..e9e0fbf08f 100644
--- a/client/src/main/java/com/vaadin/client/debug/internal/Section.java
+++ b/client/src/main/java/com/vaadin/client/debug/internal/Section.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ import com.vaadin.client.ValueMap;
/**
* A Section is displayed as a tab in the {@link VDebugWindow}.
- *
+ *
* @since 7.1
* @author Vaadin Ltd
*/
@@ -31,13 +31,14 @@ public interface Section {
* Returns a button that will be used to activate this section, displayed as
* a tab in {@link VDebugWindow}.
* <p>
- * <em>The same instance <b>must</b> be returned each time this method is called.</em>
+ * <em>The same instance <b>must</b> be returned each time this method is
+ * called.</em>
* </p>
* <p>
* The button should preferably only have an icon (no caption), and should
* have a longer description as title (tooltip).
* </p>
- *
+ *
* @return section id
*/
public DebugButton getTabButton();
@@ -45,7 +46,7 @@ public interface Section {
/**
* Returns a widget that is placed on top of the Section content when the
* Section (tab) is active in the {@link VDebugWindow}.
- *
+ *
* @return section controls
*/
public Widget getControls();
@@ -53,7 +54,7 @@ public interface Section {
/**
* Returns a widget that is the main content of the section, displayed when
* the section is active in the {@link VDebugWindow}.
- *
+ *
* @return
*/
public Widget getContent();
diff --git a/client/src/main/java/com/vaadin/client/debug/internal/SelectConnectorListener.java b/client/src/main/java/com/vaadin/client/debug/internal/SelectConnectorListener.java
index 46c8070b30..91d88a3874 100644
--- a/client/src/main/java/com/vaadin/client/debug/internal/SelectConnectorListener.java
+++ b/client/src/main/java/com/vaadin/client/debug/internal/SelectConnectorListener.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,14 +20,14 @@ import com.vaadin.client.ServerConnector;
/**
* Listener for the selection of a connector in the debug window.
- *
+ *
* @since 7.1.4
*/
public interface SelectConnectorListener {
/**
* Listener method called when a connector has been selected. If a specific
* element of the connector was selected, it is also given.
- *
+ *
* @param connector
* selected connector
* @param element
diff --git a/client/src/main/java/com/vaadin/client/debug/internal/SelectorPath.java b/client/src/main/java/com/vaadin/client/debug/internal/SelectorPath.java
index 3f21e46a96..68002abc85 100644
--- a/client/src/main/java/com/vaadin/client/debug/internal/SelectorPath.java
+++ b/client/src/main/java/com/vaadin/client/debug/internal/SelectorPath.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,7 +31,7 @@ import com.vaadin.client.componentlocator.SelectorPredicate;
* This class should be considered internal to the framework and may change at
* any time.
* <p>
- *
+ *
* @since 7.1.x
*/
public class SelectorPath {
@@ -67,7 +67,7 @@ public class SelectorPath {
/**
* Generate ElementQuery code for Java. Fallback to By.vaadin(path) if
* dealing with LegacyLocator
- *
+ *
* @return String containing Java code for finding the element described by
* path
*/
@@ -131,7 +131,7 @@ public class SelectorPath {
/**
* Finds out if the given query fragment has a defined id
- *
+ *
* @param fragment
* Query fragment
* @return true if has id
@@ -148,7 +148,7 @@ public class SelectorPath {
/**
* Generates a recursive ElementQuery for given path fragment
- *
+ *
* @param fragment
* Query fragment
* @return ElementQuery java code as a String
@@ -169,7 +169,7 @@ public class SelectorPath {
/**
* Returns the name of the component described by given query fragment
- *
+ *
* @param fragment
* Query fragment
* @return Class part of fragment
@@ -180,7 +180,7 @@ public class SelectorPath {
/**
* Generates a legacy locator for SelectorPath.
- *
+ *
* @return String containing Java code for element search and assignment
*/
private String getLegacyLocatorQuery() {
@@ -206,7 +206,7 @@ public class SelectorPath {
/**
* Get variable name with counter for given component name.
- *
+ *
* @param name
* Component name
* @return name followed by count
@@ -222,7 +222,7 @@ public class SelectorPath {
/**
* Generate Java variable assignment from given selector fragment
- *
+ *
* @param pathFragment
* Selector fragment
* @return piece of java code
@@ -248,7 +248,7 @@ public class SelectorPath {
/**
* Get variable name based on predicates. Fallback to elementType
- *
+ *
* @param predicates
* Predicates related to element
* @param elementType
diff --git a/client/src/main/java/com/vaadin/client/debug/internal/TestBenchSection.java b/client/src/main/java/com/vaadin/client/debug/internal/TestBenchSection.java
index d0b6b10722..665c44325f 100644
--- a/client/src/main/java/com/vaadin/client/debug/internal/TestBenchSection.java
+++ b/client/src/main/java/com/vaadin/client/debug/internal/TestBenchSection.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -45,7 +45,7 @@ import com.vaadin.client.WidgetUtil;
/**
* Provides functionality for picking selectors for Vaadin TestBench.
- *
+ *
* @since 7.1.x
* @author Vaadin Ltd
*/
@@ -54,8 +54,8 @@ public class TestBenchSection implements Section {
/**
* Selector widget showing a selector in a program-usable form.
*/
- private static class SelectorWidget extends HTML implements
- MouseOverHandler, MouseOutHandler {
+ private static class SelectorWidget extends HTML
+ implements MouseOverHandler, MouseOutHandler {
private final SelectorPath path;
public SelectorWidget(final SelectorPath path) {
@@ -197,9 +197,9 @@ public class TestBenchSection implements Section {
private void pickSelector(ServerConnector connector, Element element) {
- SelectorPath p = new SelectorPath(connector, Util
- .findPaintable(connector.getConnection(), element).getWidget()
- .getElement());
+ SelectorPath p = new SelectorPath(connector,
+ Util.findPaintable(connector.getConnection(), element)
+ .getWidget().getElement());
SelectorWidget w = new SelectorWidget(p);
content.add(w);
@@ -210,17 +210,17 @@ public class TestBenchSection implements Section {
@Override
public void onPreviewNativeEvent(NativePreviewEvent event) {
- if (event.getTypeInt() == Event.ONKEYDOWN
- && event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ESCAPE) {
+ if (event.getTypeInt() == Event.ONKEYDOWN && event.getNativeEvent()
+ .getKeyCode() == KeyCodes.KEY_ESCAPE) {
stopFind();
Highlight.hideAll();
return;
}
if (event.getTypeInt() == Event.ONMOUSEMOVE
|| event.getTypeInt() == Event.ONCLICK) {
- Element eventTarget = WidgetUtil.getElementFromPoint(event
- .getNativeEvent().getClientX(), event.getNativeEvent()
- .getClientY());
+ Element eventTarget = WidgetUtil.getElementFromPoint(
+ event.getNativeEvent().getClientX(),
+ event.getNativeEvent().getClientY());
if (VDebugWindow.get().getElement().isOrHasChild(eventTarget)) {
if (isFindMode() && event.getTypeInt() == Event.ONCLICK) {
stopFind();
@@ -232,9 +232,9 @@ public class TestBenchSection implements Section {
// make sure that not finding the highlight element only
Highlight.hideAll();
- eventTarget = WidgetUtil.getElementFromPoint(event
- .getNativeEvent().getClientX(), event.getNativeEvent()
- .getClientY());
+ eventTarget = WidgetUtil.getElementFromPoint(
+ event.getNativeEvent().getClientX(),
+ event.getNativeEvent().getClientY());
ComponentConnector connector = findConnector(eventTarget);
if (event.getTypeInt() == Event.ONMOUSEMOVE) {
@@ -264,8 +264,8 @@ public class TestBenchSection implements Section {
private ComponentConnector findConnector(Element element) {
for (ApplicationConnection a : ApplicationConfiguration
.getRunningApplications()) {
- ComponentConnector connector = Util.getConnectorForElement(a, a
- .getUIConnector().getWidget(), element);
+ ComponentConnector connector = Util.getConnectorForElement(a,
+ a.getUIConnector().getWidget(), element);
if (connector == null) {
connector = Util.getConnectorForElement(a, RootPanel.get(),
element);
diff --git a/client/src/main/java/com/vaadin/client/debug/internal/VDebugWindow.java b/client/src/main/java/com/vaadin/client/debug/internal/VDebugWindow.java
index fbc838f861..800e64f9f7 100644
--- a/client/src/main/java/com/vaadin/client/debug/internal/VDebugWindow.java
+++ b/client/src/main/java/com/vaadin/client/debug/internal/VDebugWindow.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -58,7 +58,7 @@ import com.vaadin.client.ui.VOverlay;
/**
* Debug window implementation.
- *
+ *
* @since 7.1
* @author Vaadin Ltd
*/
@@ -235,7 +235,7 @@ public final class VDebugWindow extends VOverlay {
/**
* Adds dummy handle elements to the bottom corners that might have
* scrollbars that interfere with resizing on some platforms.
- *
+ *
* @since 7.1
*/
private void addHandles() {
@@ -252,7 +252,7 @@ public final class VDebugWindow extends VOverlay {
/**
* Gets the {@link #VDebugWindow()} singleton instance.
- *
+ *
* @return
*/
public static VDebugWindow get() {
@@ -337,7 +337,7 @@ public final class VDebugWindow extends VOverlay {
/**
* Writes the given value to the given {@link Storage} using the given key
* (automatically prefixed with {@value #STORAGE_PREFIX}).
- *
+ *
* @param storage
* @param key
* @param value
@@ -351,7 +351,7 @@ public final class VDebugWindow extends VOverlay {
* {@value #STORAGE_PREFIX}) as an int from the given {@link Storage},
* returning the given default value instead if not successful (e.g missing
* item).
- *
+ *
* @param storage
* @param key
* @param def
@@ -370,7 +370,7 @@ public final class VDebugWindow extends VOverlay {
* {@value #STORAGE_PREFIX}) as a boolean from the given {@link Storage},
* returning the given default value instead if not successful (e.g missing
* item).
- *
+ *
* @param storage
* @param key
* @param def
@@ -389,7 +389,7 @@ public final class VDebugWindow extends VOverlay {
* {@value #STORAGE_PREFIX}) as a String from the given {@link Storage},
* returning the given default value instead if not successful (e.g missing
* item).
- *
+ *
* @param storage
* @param key
* @param def
@@ -422,7 +422,7 @@ public final class VDebugWindow extends VOverlay {
/**
* Removes the item with the given key (automatically prefixed with
* {@value #STORAGE_PREFIX}) from the given {@link Storage}.
- *
+ *
* @param storage
* @param key
*/
@@ -433,10 +433,10 @@ public final class VDebugWindow extends VOverlay {
/**
* Applies the appropriate instance variables for width, height, x, y
* depending on if the window is minimized or not.
- *
+ *
* If the value is negative, the window is positioned that amount of pixels
* from the right/bottom instead of left/top.
- *
+ *
* Finally, the position is bounds-checked so that the window is not moved
* off-screen (the adjusted values are not saved).
*/
@@ -528,7 +528,7 @@ public final class VDebugWindow extends VOverlay {
* Adds the given {@link Section} as a tab in the {@link VDebugWindow} UI.
* {@link Section#getTabButton()} is called to obtain a button which is used
* tab.
- *
+ *
* @param section
*/
public void addSection(final Section section) {
@@ -551,7 +551,7 @@ public final class VDebugWindow extends VOverlay {
/**
* Activates the given {@link Section}
- *
+ *
* @param section
*/
void activateSection(Section section) {
@@ -597,7 +597,7 @@ public final class VDebugWindow extends VOverlay {
/**
* Sets whether or not the window is minimized.
- *
+ *
* @param minimized
*/
private void setMinimized(boolean minimized) {
@@ -613,7 +613,7 @@ public final class VDebugWindow extends VOverlay {
/**
* Sets the font size in use.
- *
+ *
* @param size
*/
private void setFontSize(int size) {
@@ -624,7 +624,7 @@ public final class VDebugWindow extends VOverlay {
/**
* Gets the font size currently in use.
- *
+ *
* @return
*/
private int getFontSize() {
@@ -633,7 +633,7 @@ public final class VDebugWindow extends VOverlay {
/**
* Gets the milliseconds since application start.
- *
+ *
* @return
*/
static int getMillisSinceStart() {
@@ -642,7 +642,7 @@ public final class VDebugWindow extends VOverlay {
/**
* Gets the milliseconds since last {@link #resetTimer()} call.
- *
+ *
* @return
*/
static int getMillisSinceReset() {
@@ -651,7 +651,7 @@ public final class VDebugWindow extends VOverlay {
/**
* Resets the timer.
- *
+ *
* @return Milliseconds elapsed since the timer was last reset.
*/
static int resetTimer() {
@@ -663,7 +663,7 @@ public final class VDebugWindow extends VOverlay {
/**
* Gets a nicely formatted string with timing information suitable for
* display in tooltips.
- *
+ *
* @param sinceStart
* @param sinceReset
* @return
@@ -679,7 +679,7 @@ public final class VDebugWindow extends VOverlay {
/**
* Formats the given milliseconds as hours, minutes, seconds and
* milliseconds.
- *
+ *
* @param ms
* @return
*/
@@ -710,29 +710,30 @@ public final class VDebugWindow extends VOverlay {
public void execute() {
readStoredState();
- Window.addResizeHandler(new com.google.gwt.event.logical.shared.ResizeHandler() {
-
- Timer t = new Timer() {
- @Override
- public void run() {
- applyPositionAndSize();
- }
- };
-
- @Override
- public void onResize(ResizeEvent event) {
- t.cancel();
- // TODO less
- t.schedule(1000);
- }
- });
+ Window.addResizeHandler(
+ new com.google.gwt.event.logical.shared.ResizeHandler() {
+
+ Timer t = new Timer() {
+ @Override
+ public void run() {
+ applyPositionAndSize();
+ }
+ };
+
+ @Override
+ public void onResize(ResizeEvent event) {
+ t.cancel();
+ // TODO less
+ t.schedule(1000);
+ }
+ });
}
});
}
/**
* Called when the result from analyzeLayouts is received.
- *
+ *
* @param ac
* @param meta
*/
@@ -747,7 +748,7 @@ public final class VDebugWindow extends VOverlay {
/**
* Called when a response is received
- *
+ *
* @param ac
* @param uidl
*/
@@ -764,7 +765,7 @@ public final class VDebugWindow extends VOverlay {
* Gets the container element for this window. The debug window is always
* global to the document and not related to any
* {@link ApplicationConnection} in particular.
- *
+ *
* @return The global overlay container element.
*/
@Override
@@ -778,7 +779,7 @@ public final class VDebugWindow extends VOverlay {
/**
* Popup menu for {@link VDebugWindow}.
- *
+ *
* @since 7.1
* @author Vaadin Ltd
*/
@@ -793,7 +794,8 @@ public final class VDebugWindow extends VOverlay {
DebugButton[] modes = new DebugButton[] {
new DebugButton(Icon.DEVMODE_OFF,
"Debug only (causes page reload)"),
- new DebugButton(Icon.DEVMODE_ON, "DevMode (causes page reload)"),
+ new DebugButton(Icon.DEVMODE_ON,
+ "DevMode (causes page reload)"),
new DebugButton(Icon.DEVMODE_SUPER,
"SuperDevMode (causes page reload)") };
@@ -907,7 +909,7 @@ public final class VDebugWindow extends VOverlay {
/**
* Handler for resizing and moving window, also updates cursor on mousemove.
- *
+ *
* @since 7.1
* @author Vaadin Ltd
*/
diff --git a/client/src/main/java/com/vaadin/client/debug/internal/theme/DebugWindowStyles.java b/client/src/main/java/com/vaadin/client/debug/internal/theme/DebugWindowStyles.java
index 249b24a938..61c35a8f4f 100644
--- a/client/src/main/java/com/vaadin/client/debug/internal/theme/DebugWindowStyles.java
+++ b/client/src/main/java/com/vaadin/client/debug/internal/theme/DebugWindowStyles.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/event/PointerCancelEvent.java b/client/src/main/java/com/vaadin/client/event/PointerCancelEvent.java
index 906a07b120..d8e44b7f00 100644
--- a/client/src/main/java/com/vaadin/client/event/PointerCancelEvent.java
+++ b/client/src/main/java/com/vaadin/client/event/PointerCancelEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import com.google.gwt.event.dom.client.DomEvent;
/**
* Represents a native PointerCancelEvent.
- *
+ *
* @since 7.2
*/
public class PointerCancelEvent extends PointerEvent<PointerCancelHandler> {
@@ -34,7 +34,7 @@ public class PointerCancelEvent extends PointerEvent<PointerCancelHandler> {
/**
* Gets the event type associated with pointer cancel events.
- *
+ *
* @return the handler type
*/
public static Type<PointerCancelHandler> getType() {
diff --git a/client/src/main/java/com/vaadin/client/event/PointerCancelHandler.java b/client/src/main/java/com/vaadin/client/event/PointerCancelHandler.java
index fa2210b73c..334a99a7f2 100644
--- a/client/src/main/java/com/vaadin/client/event/PointerCancelHandler.java
+++ b/client/src/main/java/com/vaadin/client/event/PointerCancelHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,14 +19,14 @@ 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
*/
diff --git a/client/src/main/java/com/vaadin/client/event/PointerDownEvent.java b/client/src/main/java/com/vaadin/client/event/PointerDownEvent.java
index eeae9891f2..37809e6a39 100644
--- a/client/src/main/java/com/vaadin/client/event/PointerDownEvent.java
+++ b/client/src/main/java/com/vaadin/client/event/PointerDownEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import com.google.gwt.event.dom.client.DomEvent;
/**
* Represents a native PointerDownEvent.
- *
+ *
* @since 7.2
*/
public class PointerDownEvent extends PointerEvent<PointerDownHandler> {
@@ -33,7 +33,7 @@ public class PointerDownEvent extends PointerEvent<PointerDownHandler> {
/**
* Gets the event type associated with PointerDownEvent events.
- *
+ *
* @return the handler type
*/
public static Type<PointerDownHandler> getType() {
diff --git a/client/src/main/java/com/vaadin/client/event/PointerDownHandler.java b/client/src/main/java/com/vaadin/client/event/PointerDownHandler.java
index dfd9a358eb..e9ab0ff3e6 100644
--- a/client/src/main/java/com/vaadin/client/event/PointerDownHandler.java
+++ b/client/src/main/java/com/vaadin/client/event/PointerDownHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,14 +19,14 @@ 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
*/
diff --git a/client/src/main/java/com/vaadin/client/event/PointerEvent.java b/client/src/main/java/com/vaadin/client/event/PointerEvent.java
index 71e73f945c..d91168ff53 100644
--- a/client/src/main/java/com/vaadin/client/event/PointerEvent.java
+++ b/client/src/main/java/com/vaadin/client/event/PointerEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,14 +21,14 @@ 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> {
+public abstract class PointerEvent<H extends EventHandler>
+ extends MouseEvent<H> {
enum EventType {
PointerDown, PointerMove, PointerOut, PointerOver, PointerUp, PointerCancel;
@@ -46,7 +46,7 @@ public abstract class PointerEvent<H extends EventHandler> extends
/**
* 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() {
@@ -55,7 +55,7 @@ public abstract class PointerEvent<H extends EventHandler> extends
/**
* Gets the width of the contact geometry of the pointer in CSS pixels.
- *
+ *
* @return width in CSS pixels
*/
public final int getWidth() {
@@ -64,7 +64,7 @@ public abstract class PointerEvent<H extends EventHandler> extends
/**
* Gets the height of the contact geometry of the pointer in CSS pixels.
- *
+ *
* @return height in CSS pixels.
*/
public final int getHeight() {
@@ -74,7 +74,7 @@ public abstract class PointerEvent<H extends EventHandler> extends
/**
* 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() {
@@ -84,7 +84,7 @@ public abstract class PointerEvent<H extends EventHandler> extends
/**
* 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
*/
@@ -95,7 +95,7 @@ public abstract class PointerEvent<H extends EventHandler> extends
/**
* 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
*/
@@ -105,12 +105,12 @@ public abstract class PointerEvent<H extends EventHandler> extends
/**
* 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() {
@@ -119,7 +119,7 @@ public abstract class PointerEvent<H extends EventHandler> extends
/**
* 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() {
diff --git a/client/src/main/java/com/vaadin/client/event/PointerEventSupport.java b/client/src/main/java/com/vaadin/client/event/PointerEventSupport.java
index 99d73745c5..70f13c80fa 100644
--- a/client/src/main/java/com/vaadin/client/event/PointerEventSupport.java
+++ b/client/src/main/java/com/vaadin/client/event/PointerEventSupport.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ 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
*/
diff --git a/client/src/main/java/com/vaadin/client/event/PointerEventSupportImpl.java b/client/src/main/java/com/vaadin/client/event/PointerEventSupportImpl.java
index 7605104ade..1dcd65a159 100644
--- a/client/src/main/java/com/vaadin/client/event/PointerEventSupportImpl.java
+++ b/client/src/main/java/com/vaadin/client/event/PointerEventSupportImpl.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ 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
*/
diff --git a/client/src/main/java/com/vaadin/client/event/PointerEventSupportImplIE10.java b/client/src/main/java/com/vaadin/client/event/PointerEventSupportImplIE10.java
index 1de2f9722f..bb824c6b6c 100644
--- a/client/src/main/java/com/vaadin/client/event/PointerEventSupportImplIE10.java
+++ b/client/src/main/java/com/vaadin/client/event/PointerEventSupportImplIE10.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,12 +19,12 @@ 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 {
+public class PointerEventSupportImplIE10
+ extends PointerEventSupportImplModernIE {
@Override
public String getNativeEventName(EventType eventName) {
diff --git a/client/src/main/java/com/vaadin/client/event/PointerEventSupportImplModernIE.java b/client/src/main/java/com/vaadin/client/event/PointerEventSupportImplModernIE.java
index 851c600bcb..554a5ee2a8 100644
--- a/client/src/main/java/com/vaadin/client/event/PointerEventSupportImplModernIE.java
+++ b/client/src/main/java/com/vaadin/client/event/PointerEventSupportImplModernIE.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ import com.vaadin.client.event.PointerEvent.EventType;
/**
* Pointer event support class for IE 11+ (unprefixed pointer events)
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
@@ -50,8 +50,8 @@ public class PointerEventSupportImplModernIE extends PointerEventSupportImpl {
}
DOMImplStandard
.addBitlessEventDispatchers(eventDispatcherMapExtensions);
- DOMImplStandard
- .addCaptureEventDispatchers(captureEventDispatcherMapExtensions);
+ DOMImplStandard.addCaptureEventDispatchers(
+ captureEventDispatcherMapExtensions);
inited = true;
}
diff --git a/client/src/main/java/com/vaadin/client/event/PointerMoveEvent.java b/client/src/main/java/com/vaadin/client/event/PointerMoveEvent.java
index 6a4a81e17d..e109f02fc0 100644
--- a/client/src/main/java/com/vaadin/client/event/PointerMoveEvent.java
+++ b/client/src/main/java/com/vaadin/client/event/PointerMoveEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import com.google.gwt.event.dom.client.DomEvent;
/**
* Represents a native PointerMoveEvent event.
- *
+ *
* @since 7.2
*/
public class PointerMoveEvent extends PointerEvent<PointerMoveHandler> {
@@ -33,7 +33,7 @@ public class PointerMoveEvent extends PointerEvent<PointerMoveHandler> {
/**
* Gets the event type associated with PointerMoveEvent.
- *
+ *
* @return the handler type
*/
public static Type<PointerMoveHandler> getType() {
diff --git a/client/src/main/java/com/vaadin/client/event/PointerMoveHandler.java b/client/src/main/java/com/vaadin/client/event/PointerMoveHandler.java
index ad6a93da8d..4d966a0f27 100644
--- a/client/src/main/java/com/vaadin/client/event/PointerMoveHandler.java
+++ b/client/src/main/java/com/vaadin/client/event/PointerMoveHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,14 +19,14 @@ 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
*/
diff --git a/client/src/main/java/com/vaadin/client/event/PointerUpEvent.java b/client/src/main/java/com/vaadin/client/event/PointerUpEvent.java
index 005902d7f7..5b848bbb6c 100644
--- a/client/src/main/java/com/vaadin/client/event/PointerUpEvent.java
+++ b/client/src/main/java/com/vaadin/client/event/PointerUpEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import com.google.gwt.event.dom.client.DomEvent;
/**
* Represents a native PointerUpEvent.
- *
+ *
* @since 7.2
*/
public class PointerUpEvent extends PointerEvent<PointerUpHandler> {
@@ -33,7 +33,7 @@ public class PointerUpEvent extends PointerEvent<PointerUpHandler> {
/**
* Gets the event type associated with PointerUpEvent.
- *
+ *
* @return the handler type
*/
public static Type<PointerUpHandler> getType() {
diff --git a/client/src/main/java/com/vaadin/client/event/PointerUpHandler.java b/client/src/main/java/com/vaadin/client/event/PointerUpHandler.java
index 587b249634..01db75cdb5 100644
--- a/client/src/main/java/com/vaadin/client/event/PointerUpHandler.java
+++ b/client/src/main/java/com/vaadin/client/event/PointerUpHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,14 +19,14 @@ 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
*/
diff --git a/client/src/main/java/com/vaadin/client/extensions/AbstractExtensionConnector.java b/client/src/main/java/com/vaadin/client/extensions/AbstractExtensionConnector.java
index 79eaa2f8b9..6bd91d932a 100644
--- a/client/src/main/java/com/vaadin/client/extensions/AbstractExtensionConnector.java
+++ b/client/src/main/java/com/vaadin/client/extensions/AbstractExtensionConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -45,7 +45,7 @@ public abstract class AbstractExtensionConnector extends AbstractConnector {
/**
* Called when the extension is attached to its parent. This method is only
* called once as an extension cannot be moved from one parent to another.
- *
+ *
* @param target
* The connector this extension extends
*/
diff --git a/client/src/main/java/com/vaadin/client/extensions/BrowserWindowOpenerConnector.java b/client/src/main/java/com/vaadin/client/extensions/BrowserWindowOpenerConnector.java
index 11e3e80a14..364718bcc6 100644
--- a/client/src/main/java/com/vaadin/client/extensions/BrowserWindowOpenerConnector.java
+++ b/client/src/main/java/com/vaadin/client/extensions/BrowserWindowOpenerConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,7 +32,7 @@ import com.vaadin.shared.util.SharedUtil;
/**
* Client-side code for {@link BrowserWindowOpener}
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
@@ -68,7 +68,8 @@ public class BrowserWindowOpenerConnector extends AbstractExtensionConnector
if (!getState().parameters.isEmpty()) {
StringBuilder params = new StringBuilder();
- for (Entry<String, String> entry : getState().parameters.entrySet()) {
+ for (Entry<String, String> entry : getState().parameters
+ .entrySet()) {
if (params.length() != 0) {
params.append('&');
}
diff --git a/client/src/main/java/com/vaadin/client/extensions/FileDownloaderConnector.java b/client/src/main/java/com/vaadin/client/extensions/FileDownloaderConnector.java
index bed6622a6c..431991e886 100644
--- a/client/src/main/java/com/vaadin/client/extensions/FileDownloaderConnector.java
+++ b/client/src/main/java/com/vaadin/client/extensions/FileDownloaderConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/extensions/ResponsiveConnector.java b/client/src/main/java/com/vaadin/client/extensions/ResponsiveConnector.java
index ae330be8f4..864a948a1e 100644
--- a/client/src/main/java/com/vaadin/client/extensions/ResponsiveConnector.java
+++ b/client/src/main/java/com/vaadin/client/extensions/ResponsiveConnector.java
@@ -4,9 +4,9 @@
* Licensed under the Apache 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
@@ -34,14 +34,14 @@ import com.vaadin.shared.util.SharedUtil;
/**
* The client side connector for the Responsive extension.
- *
+ *
* @author Vaadin Ltd
* @since 7.2
*/
@SuppressWarnings("GwtInconsistentSerializableClass")
@Connect(Responsive.class)
-public class ResponsiveConnector extends AbstractExtensionConnector implements
- ElementResizeListener {
+public class ResponsiveConnector extends AbstractExtensionConnector
+ implements ElementResizeListener {
/**
* The target component which we will monitor for width changes
@@ -99,7 +99,7 @@ public class ResponsiveConnector extends AbstractExtensionConnector implements
/**
* Construct the list of selectors that should be matched against in the
* range selectors
- *
+ *
* @return The selectors in a comma delimited string.
*/
protected String constructSelectorsForTarget() {
@@ -192,7 +192,7 @@ public class ResponsiveConnector extends AbstractExtensionConnector implements
* Process an individual stylesheet object. Any @import statements are
* handled recursively. Regular rule declarations are searched for
* 'width-range' and 'height-range' attribute selectors.
- *
+ *
* @param sheet
*/
private static native void searchStylesheetForBreakPoints(
@@ -268,7 +268,7 @@ public class ResponsiveConnector extends AbstractExtensionConnector implements
// Loop all the selectors in this ruleset
for(var k = 0, len2 = haystack.length; k < len2; k++) {
-
+
// Split the haystack into parts.
var widthRange = haystack[k].match(/\[width-range.*?\]/);
var heightRange = haystack[k].match(/\[height-range.*?\]/);
@@ -276,13 +276,13 @@ public class ResponsiveConnector extends AbstractExtensionConnector implements
if (selector != null) {
selector = selector[1];
-
+
// Check for width-ranges.
if (widthRange != null) {
var minMax = widthRange[0].match(/\[width-range~?=["|'](.*?)-(.*?)["|']\]/i);
var min = minMax[1];
var max = minMax[2];
-
+
pushToCache(widthRanges, selector, min, max);
}
@@ -291,7 +291,7 @@ public class ResponsiveConnector extends AbstractExtensionConnector implements
var minMax = heightRange[0].match(/\[height-range~?=["|'](.*?)-(.*?)["|']\]/i);
var min = minMax[1];
var max = minMax[2];
-
+
pushToCache(heightRanges, selector, min, max);
}
}
@@ -303,7 +303,7 @@ public class ResponsiveConnector extends AbstractExtensionConnector implements
/**
* Get all matching ranges from the cache for this particular instance.
- *
+ *
* @param selectors
*/
private native void getBreakPointsFor(final String selectors)
@@ -386,8 +386,8 @@ public class ResponsiveConnector extends AbstractExtensionConnector implements
// case some new styles are applied
if (!currentWidthRanges.equals(oldWidthRanges)
|| !currentHeightRanges.equals(oldHeightRanges)) {
- layoutManager
- .setNeedsMeasureRecursively(ResponsiveConnector.this.target);
+ layoutManager.setNeedsMeasureRecursively(
+ ResponsiveConnector.this.target);
}
}
@@ -395,7 +395,7 @@ public class ResponsiveConnector extends AbstractExtensionConnector implements
* Forces IE8 to reinterpret CSS rules.
* {@link com.vaadin.client.WidgetUtil#forceIE8Redraw(com.google.gwt.dom.client.Element)}
* doesn't work in this case.
- *
+ *
* @param element
* the element to redraw
*/
diff --git a/client/src/main/java/com/vaadin/client/extensions/javascriptmanager/JavaScriptManagerConnector.java b/client/src/main/java/com/vaadin/client/extensions/javascriptmanager/JavaScriptManagerConnector.java
index 364b948573..604081c5e5 100644
--- a/client/src/main/java/com/vaadin/client/extensions/javascriptmanager/JavaScriptManagerConnector.java
+++ b/client/src/main/java/com/vaadin/client/extensions/javascriptmanager/JavaScriptManagerConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -71,7 +71,7 @@ public class JavaScriptManagerConnector extends AbstractExtensionConnector {
var m = this;
var target = $wnd;
var parts = name.split('.');
-
+
for(var i = 0; i < parts.length - 1; i++) {
var part = parts[i];
if (target[part] === undefined) {
@@ -79,7 +79,7 @@ public class JavaScriptManagerConnector extends AbstractExtensionConnector {
}
target = target[part];
}
-
+
target[parts[parts.length - 1]] = $entry(function() {
//Must make a copy because arguments is an array-like object (not instanceof Array), causing suboptimal JSON encoding
var args = Array.prototype.slice.call(arguments, 0);
@@ -94,7 +94,7 @@ public class JavaScriptManagerConnector extends AbstractExtensionConnector {
/*-{
var target = $wnd;
var parts = name.split('.');
-
+
for(var i = 0; i < parts.length - 1; i++) {
var part = parts[i];
if (target[part] === undefined) {
diff --git a/client/src/main/java/com/vaadin/client/metadata/AsyncBundleLoader.java b/client/src/main/java/com/vaadin/client/metadata/AsyncBundleLoader.java
index 9b7f611281..174b5cb4a9 100644
--- a/client/src/main/java/com/vaadin/client/metadata/AsyncBundleLoader.java
+++ b/client/src/main/java/com/vaadin/client/metadata/AsyncBundleLoader.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/metadata/BundleLoadCallback.java b/client/src/main/java/com/vaadin/client/metadata/BundleLoadCallback.java
index 399ac87d4e..a3f6217142 100644
--- a/client/src/main/java/com/vaadin/client/metadata/BundleLoadCallback.java
+++ b/client/src/main/java/com/vaadin/client/metadata/BundleLoadCallback.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/metadata/ConnectorBundleLoader.java b/client/src/main/java/com/vaadin/client/metadata/ConnectorBundleLoader.java
index e67fee96cf..9a02912b6c 100644
--- a/client/src/main/java/com/vaadin/client/metadata/ConnectorBundleLoader.java
+++ b/client/src/main/java/com/vaadin/client/metadata/ConnectorBundleLoader.java
@@ -102,8 +102,8 @@ public abstract class ConnectorBundleLoader {
public boolean isBundleLoaded(String bundleName) {
AsyncBundleLoader loader = asyncBlockLoaders.get(bundleName);
if (loader == null) {
- throw new IllegalArgumentException("Bundle " + bundleName
- + " not recognized");
+ throw new IllegalArgumentException(
+ "Bundle " + bundleName + " not recognized");
}
return loader.getState() == State.LOADED;
}
diff --git a/client/src/main/java/com/vaadin/client/metadata/InvokationHandler.java b/client/src/main/java/com/vaadin/client/metadata/InvokationHandler.java
index 4faf0a1484..74dfee9cbc 100644
--- a/client/src/main/java/com/vaadin/client/metadata/InvokationHandler.java
+++ b/client/src/main/java/com/vaadin/client/metadata/InvokationHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/metadata/Invoker.java b/client/src/main/java/com/vaadin/client/metadata/Invoker.java
index 6e263829c0..31440e9d1a 100644
--- a/client/src/main/java/com/vaadin/client/metadata/Invoker.java
+++ b/client/src/main/java/com/vaadin/client/metadata/Invoker.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/metadata/JsniInvoker.java b/client/src/main/java/com/vaadin/client/metadata/JsniInvoker.java
index d6a60c89f3..fe4f613650 100644
--- a/client/src/main/java/com/vaadin/client/metadata/JsniInvoker.java
+++ b/client/src/main/java/com/vaadin/client/metadata/JsniInvoker.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ import com.vaadin.client.JsArrayObject;
/**
* Special {@link Invoker} that uses JSNI to invoke methods with limited
* visibility.
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
@@ -39,7 +39,7 @@ public abstract class JsniInvoker implements Invoker {
/**
* Abstract method that will be generated to contain JSNI for invoking the
* actual method.
- *
+ *
* @param target
* the object upon which to invoke the method
* @param params
diff --git a/client/src/main/java/com/vaadin/client/metadata/Method.java b/client/src/main/java/com/vaadin/client/metadata/Method.java
index 8757a9de20..dadbe90ba0 100644
--- a/client/src/main/java/com/vaadin/client/metadata/Method.java
+++ b/client/src/main/java/com/vaadin/client/metadata/Method.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -48,7 +48,7 @@ public class Method {
* returned string may change without notice and should not be used for any
* other purpose than identification. The signature is currently based on
* the declaring type's signature and the method's name.
- *
+ *
* @return the unique signature of this method
*/
public String getSignature() {
@@ -59,9 +59,9 @@ public class Method {
* Gets the string that is internally used when looking up generated support
* code for this method. This is the same as {@link #getSignature()}, but
* without any type parameters.
- *
+ *
* @return the string to use for looking up generated support code
- *
+ *
* @since 7.2
*/
public String getLookupKey() {
@@ -104,9 +104,9 @@ public class Method {
/**
* Checks whether this method is annotated with {@link NoLayout}.
- *
+ *
* @since 7.4
- *
+ *
* @return <code>true</code> if this method has a NoLayout annotation;
* otherwise <code>false</code>
*/
diff --git a/client/src/main/java/com/vaadin/client/metadata/NoDataException.java b/client/src/main/java/com/vaadin/client/metadata/NoDataException.java
index 45ea67d017..415b9eb958 100644
--- a/client/src/main/java/com/vaadin/client/metadata/NoDataException.java
+++ b/client/src/main/java/com/vaadin/client/metadata/NoDataException.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/metadata/OnStateChangeMethod.java b/client/src/main/java/com/vaadin/client/metadata/OnStateChangeMethod.java
index 47749fcd52..bf3b0d2694 100644
--- a/client/src/main/java/com/vaadin/client/metadata/OnStateChangeMethod.java
+++ b/client/src/main/java/com/vaadin/client/metadata/OnStateChangeMethod.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ import com.vaadin.client.communication.StateChangeEvent;
/**
* Encapsulates the data that the widgetset compiler generates for supporting a
* connector method annotated with {@link OnStateChange}
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
@@ -39,7 +39,7 @@ public class OnStateChangeMethod {
/**
* Creates a new instance based on a method name, a list of parameters names
* and a list of properties to listen for.
- *
+ *
* @param methodName
* the name of the method to call
* @param properties
@@ -55,7 +55,7 @@ public class OnStateChangeMethod {
* <p>
* If the declaring class is <code>null</code>, the method is found based on
* the type of the connector that fired the state change event.
- *
+ *
* @param declaringClass
* the class in which the target method is declared, or
* <code>null</code> to use the class of the connector firing the
@@ -70,15 +70,15 @@ public class OnStateChangeMethod {
this.methodName = methodName;
- this.properties = Collections.unmodifiableList(Arrays
- .asList(properties));
+ this.properties = Collections
+ .unmodifiableList(Arrays.asList(properties));
this.declaringClass = declaringClass;
}
/**
* Invokes the listener method for a state change.
- *
+ *
* @param stateChangeEvent
* the state change event
*/
@@ -95,14 +95,16 @@ public class OnStateChangeMethod {
try {
declaringType.getMethod(methodName).invoke(connector);
} catch (NoDataException e) {
- throw new RuntimeException("Couldn't invoke @OnStateChange method "
- + declaringType.getSignature() + "." + methodName, e);
+ throw new RuntimeException(
+ "Couldn't invoke @OnStateChange method "
+ + declaringType.getSignature() + "." + methodName,
+ e);
}
}
/**
* Gets the list of state property names to listen for.
- *
+ *
* @return the list of state property names to listen for
*/
public List<String> getProperties() {
diff --git a/client/src/main/java/com/vaadin/client/metadata/Property.java b/client/src/main/java/com/vaadin/client/metadata/Property.java
index 90b29b32b7..a4ec8c56e4 100644
--- a/client/src/main/java/com/vaadin/client/metadata/Property.java
+++ b/client/src/main/java/com/vaadin/client/metadata/Property.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -57,7 +57,7 @@ public class Property {
* returned string may change without notice and should not be used for any
* other purpose than identification. The signature is currently based on
* the declaring type's signature and the property's name.
- *
+ *
* @return the unique signature of this property
*/
public String getSignature() {
@@ -68,9 +68,9 @@ public class Property {
* Gets the string that is internally used when looking up generated support
* code for this method. This is the same as {@link #getSignature()}, but
* without any type parameters.
- *
+ *
* @return the string to use for looking up generated support code
- *
+ *
* @since 7.2
*/
public String getLookupKey() {
@@ -105,9 +105,9 @@ public class Property {
/**
* Gets the property name formatted for displaying in a user interface. This
- * returns a string where e.g. "camelCase" has been converted to
- * "Camel case".
- *
+ * returns a string where e.g. "camelCase" has been converted to "Camel
+ * case".
+ *
* @return the name of this property, formatted for humans to read
*/
public String getDisplayName() {
@@ -130,9 +130,9 @@ public class Property {
/**
* Checks whether this property is annotated with {@link NoLayout}.
- *
+ *
* @since 7.4
- *
+ *
* @return <code>true</code> if this property has a NoLayout annotation;
* otherwise <code>false</code>
*/
diff --git a/client/src/main/java/com/vaadin/client/metadata/ProxyHandler.java b/client/src/main/java/com/vaadin/client/metadata/ProxyHandler.java
index 6fba8a8155..a9e9ada083 100644
--- a/client/src/main/java/com/vaadin/client/metadata/ProxyHandler.java
+++ b/client/src/main/java/com/vaadin/client/metadata/ProxyHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/metadata/Type.java b/client/src/main/java/com/vaadin/client/metadata/Type.java
index 15617ffe3c..d863bed78b 100644
--- a/client/src/main/java/com/vaadin/client/metadata/Type.java
+++ b/client/src/main/java/com/vaadin/client/metadata/Type.java
@@ -80,7 +80,8 @@ public class Type {
return new Property(this, propertyName);
}
- private static String calculateSignature(String name, Type[] parameterTypes) {
+ private static String calculateSignature(String name,
+ Type[] parameterTypes) {
String string = name;
if (parameterTypes != null && parameterTypes.length != 0) {
string += '<';
diff --git a/client/src/main/java/com/vaadin/client/metadata/TypeData.java b/client/src/main/java/com/vaadin/client/metadata/TypeData.java
index 9addc4ffb2..cadbb1262c 100644
--- a/client/src/main/java/com/vaadin/client/metadata/TypeData.java
+++ b/client/src/main/java/com/vaadin/client/metadata/TypeData.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/metadata/TypeDataStore.java b/client/src/main/java/com/vaadin/client/metadata/TypeDataStore.java
index e3c1c8392a..a057f4aed2 100644
--- a/client/src/main/java/com/vaadin/client/metadata/TypeDataStore.java
+++ b/client/src/main/java/com/vaadin/client/metadata/TypeDataStore.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -74,8 +74,8 @@ public class TypeDataStore {
public static Class<?> getClass(String identifier) throws NoDataException {
Class<?> class1 = get().identifiers.get(identifier);
if (class1 == null) {
- throw new NoDataException("There is not class for identifier "
- + identifier);
+ throw new NoDataException(
+ "There is not class for identifier " + identifier);
}
return class1;
}
@@ -103,8 +103,8 @@ public class TypeDataStore {
public static Type getReturnType(Method method) throws NoDataException {
Type type = get().returnTypes.get(method.getLookupKey());
if (type == null) {
- throw new NoDataException("There is no return type for "
- + method.getSignature());
+ throw new NoDataException(
+ "There is no return type for " + method.getSignature());
}
return type;
}
@@ -112,26 +112,27 @@ public class TypeDataStore {
public static Invoker getInvoker(Method method) throws NoDataException {
Invoker invoker = get().invokers.get(method.getLookupKey());
if (invoker == null) {
- throw new NoDataException("There is no invoker for "
- + method.getSignature());
+ throw new NoDataException(
+ "There is no invoker for " + method.getSignature());
}
return invoker;
}
public static Invoker getConstructor(Type type) throws NoDataException {
- Invoker invoker = get().invokers.get(new Method(type, CONSTRUCTOR_NAME)
- .getLookupKey());
+ Invoker invoker = get().invokers
+ .get(new Method(type, CONSTRUCTOR_NAME).getLookupKey());
if (invoker == null) {
- throw new NoDataException("There is no constructor for "
- + type.getSignature());
+ throw new NoDataException(
+ "There is no constructor for " + type.getSignature());
}
return invoker;
}
public static Object getValue(Property property, Object target)
throws NoDataException {
- return getJsPropertyValue(get().jsTypeData, property.getBeanType()
- .getBaseTypeName(), property.getName(), target);
+ return getJsPropertyValue(get().jsTypeData,
+ property.getBeanType().getBaseTypeName(), property.getName(),
+ target);
}
public static String getDelegateToWidget(Property property) {
@@ -151,8 +152,8 @@ public class TypeDataStore {
Type type = getType(clazz);
delegateToWidget.put(new Property(type, propertyName).getLookupKey(),
delegateValue);
- JsArrayString typeProperties = delegateToWidgetProperties.get(type
- .getBaseTypeName());
+ JsArrayString typeProperties = delegateToWidgetProperties
+ .get(type.getBaseTypeName());
if (typeProperties == null) {
typeProperties = JavaScriptObject.createArray().cast();
delegateToWidgetProperties.put(type.getBaseTypeName(),
@@ -166,7 +167,8 @@ public class TypeDataStore {
getType(presentationType));
}
- public void setReturnType(Class<?> type, String methodName, Type returnType) {
+ public void setReturnType(Class<?> type, String methodName,
+ Type returnType) {
returnTypes.put(new Method(getType(type), methodName).getLookupKey(),
returnType);
}
@@ -202,11 +204,11 @@ public class TypeDataStore {
public static ProxyHandler getProxyHandler(Type type)
throws NoDataException {
- ProxyHandler proxyHandler = get().proxyHandlers.get(type
- .getBaseTypeName());
+ ProxyHandler proxyHandler = get().proxyHandlers
+ .get(type.getBaseTypeName());
if (proxyHandler == null) {
- throw new NoDataException("No proxy handler for "
- + type.getSignature());
+ throw new NoDataException(
+ "No proxy handler for " + type.getSignature());
}
return proxyHandler;
}
@@ -225,8 +227,8 @@ public class TypeDataStore {
private static boolean hasMethodAttribute(Method method,
MethodAttribute attribute) {
- FastStringSet attributes = get().methodAttributes.get(method
- .getLookupKey());
+ FastStringSet attributes = get().methodAttributes
+ .get(method.getLookupKey());
return attributes != null && attributes.contains(attribute.name());
}
@@ -249,7 +251,7 @@ public class TypeDataStore {
* @param type
* @return
* @throws NoDataException
- *
+ *
* @deprecated As of 7.0.1, use {@link #getPropertiesAsArray(Type)} instead
* for improved performance
*/
@@ -282,17 +284,20 @@ public class TypeDataStore {
}
public static Type getType(Property property) throws NoDataException {
- return getJsPropertyType(get().jsTypeData, property.getBeanType()
- .getBaseTypeName(), property.getName());
+ return getJsPropertyType(get().jsTypeData,
+ property.getBeanType().getBaseTypeName(), property.getName());
}
- public void setPropertyType(Class<?> clazz, String propertyName, Type type) {
+ public void setPropertyType(Class<?> clazz, String propertyName,
+ Type type) {
setJsPropertyType(jsTypeData, clazz.getName(), propertyName, type);
}
- public static void setValue(Property property, Object target, Object value) {
- setJsPropertyValue(get().jsTypeData, property.getBeanType()
- .getBaseTypeName(), property.getName(), target, value);
+ public static void setValue(Property property, Object target,
+ Object value) {
+ setJsPropertyValue(get().jsTypeData,
+ property.getBeanType().getBaseTypeName(), property.getName(),
+ target, value);
}
public void setSerializerFactory(Class<?> clazz, Invoker factory) {
@@ -300,8 +305,8 @@ public class TypeDataStore {
}
public static JSONSerializer<?> findSerializer(Type type) {
- Invoker factoryCreator = get().serializerFactories.get(type
- .getBaseTypeName());
+ Invoker factoryCreator = get().serializerFactories
+ .get(type.getBaseTypeName());
if (factoryCreator == null) {
return null;
}
@@ -313,8 +318,8 @@ public class TypeDataStore {
}
public void setSuperClass(Class<?> baseClass, Class<?> superClass) {
- String superClassName = superClass == null ? null : superClass
- .getName();
+ String superClassName = superClass == null ? null
+ : superClass.getName();
setSuperClass(jsTypeData, baseClass.getName(), superClassName);
}
@@ -324,7 +329,8 @@ public class TypeDataStore {
}
private static native void setPropertyData(JavaScriptObject typeData,
- String className, String propertyName, JavaScriptObject propertyData)
+ String className, String propertyName,
+ JavaScriptObject propertyData)
/*-{
typeData[className][propertyName] = propertyData;
}-*/;
@@ -333,7 +339,7 @@ public class TypeDataStore {
* This method sets up prototypes chain for <code>baseClassName</code>.
* Precondition is : <code>superClassName</code> had to be handled before
* its child <code>baseClassName</code>.
- *
+ *
* It makes all properties defined in the <code>superClassName</code>
* available for <code>baseClassName</code> as well.
*/
@@ -414,7 +420,7 @@ public class TypeDataStore {
/**
* Gets data for all methods annotated with {@link OnStateChange} in the
* given connector type.
- *
+ *
* @since 7.2
* @param type
* the connector type
@@ -428,7 +434,7 @@ public class TypeDataStore {
/**
* Adds data about a method annotated with {@link OnStateChange} for the
* given connector type.
- *
+ *
* @since 7.2
* @param clazz
* the connector type
@@ -437,7 +443,8 @@ public class TypeDataStore {
*/
public void addOnStateChangeMethod(Class<?> clazz,
OnStateChangeMethod method) {
- FastStringMap<JsArrayObject<OnStateChangeMethod>> handlers = getOnStateChangeMethods(clazz);
+ FastStringMap<JsArrayObject<OnStateChangeMethod>> handlers = getOnStateChangeMethods(
+ clazz);
if (handlers == null) {
handlers = FastStringMap.create();
onStateChangeMethods.put(getType(clazz).getSignature(), handlers);
@@ -457,12 +464,12 @@ public class TypeDataStore {
/**
* Checks whether the provided method is annotated with {@link NoLayout}.
- *
+ *
* @param method
* the rpc method to check
- *
+ *
* @since 7.4
- *
+ *
* @return <code>true</code> if the method has a NoLayout annotation;
* otherwise <code>false</code>
*/
@@ -472,17 +479,17 @@ public class TypeDataStore {
/**
* Checks whether the provided property is annotated with {@link NoLayout}.
- *
+ *
* @param property
* the property to check
- *
+ *
* @since 7.4
- *
+ *
* @return <code>true</code> if the property has a NoLayout annotation;
* otherwise <code>false</code>
*/
public static boolean isNoLayoutProperty(Property property) {
- return hasNoLayout(get().jsTypeData, property.getBeanType()
- .getSignature(), property.getName());
+ return hasNoLayout(get().jsTypeData,
+ property.getBeanType().getSignature(), property.getName());
}
}
diff --git a/client/src/main/java/com/vaadin/client/renderers/ButtonRenderer.java b/client/src/main/java/com/vaadin/client/renderers/ButtonRenderer.java
index b173aef60a..52fa2c7bdb 100644
--- a/client/src/main/java/com/vaadin/client/renderers/ButtonRenderer.java
+++ b/client/src/main/java/com/vaadin/client/renderers/ButtonRenderer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.client.widget.grid.RendererCellReference;
* A Renderer that displays buttons with textual captions. The values of the
* corresponding column are used as the captions. Click handlers can be added to
* the renderer, invoked when any of the rendered buttons is clicked.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
diff --git a/client/src/main/java/com/vaadin/client/renderers/ClickableRenderer.java b/client/src/main/java/com/vaadin/client/renderers/ClickableRenderer.java
index caffc521d1..59caf4f150 100644
--- a/client/src/main/java/com/vaadin/client/renderers/ClickableRenderer.java
+++ b/client/src/main/java/com/vaadin/client/renderers/ClickableRenderer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -40,31 +40,31 @@ import com.vaadin.shared.ui.grid.GridConstants.Section;
* An abstract superclass for renderers that render clickable widgets. Click
* handlers can be added to a renderer to listen to click events emitted by all
* widgets rendered by the renderer.
- *
+ *
* @param <T>
* the presentation (column) type
* @param <W>
* the widget type
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
-public abstract class ClickableRenderer<T, W extends Widget> extends
- WidgetRenderer<T, W> implements ClickHandler {
+public abstract class ClickableRenderer<T, W extends Widget>
+ extends WidgetRenderer<T, W> implements ClickHandler {
/**
* A handler for {@link RendererClickEvent renderer click events}.
- *
+ *
* @param <R>
* the row type of the containing Grid
- *
+ *
* @see {@link ButtonRenderer#addClickHandler(RendererClickHandler)}
*/
public interface RendererClickHandler<R> extends EventHandler {
/**
* Called when a rendered button is clicked.
- *
+ *
* @param event
* the event representing the click
*/
@@ -74,13 +74,13 @@ public abstract class ClickableRenderer<T, W extends Widget> extends
/**
* An event fired when a widget rendered by a ClickableWidgetRenderer
* subclass is clicked.
- *
+ *
* @param <R>
* the row type of the containing Grid
*/
@SuppressWarnings("rawtypes")
- public static class RendererClickEvent<R> extends
- MouseEvent<RendererClickHandler> {
+ public static class RendererClickEvent<R>
+ extends MouseEvent<RendererClickHandler> {
@SuppressWarnings("unchecked")
static final Type<RendererClickHandler> TYPE = new Type<RendererClickHandler>(
@@ -95,7 +95,7 @@ public abstract class ClickableRenderer<T, W extends Widget> extends
/**
* Returns the cell of the clicked button.
- *
+ *
* @return the cell
*/
public CellReference<R> getCell() {
@@ -105,7 +105,7 @@ public abstract class ClickableRenderer<T, W extends Widget> extends
/**
* Returns the data object corresponding to the row of the clicked
* button.
- *
+ *
* @return the row data object
*/
public R getRow() {
@@ -138,7 +138,7 @@ public abstract class ClickableRenderer<T, W extends Widget> extends
/**
* Returns the cell the given element belongs to.
- *
+ *
* @param grid
* the grid instance that is queried
* @param e
@@ -174,7 +174,7 @@ public abstract class ClickableRenderer<T, W extends Widget> extends
* please refer to the note in
* {@link WidgetUtil#findWidget(Element, Class) Util.findWidget} for
* details.
- *
+ *
* @param e
* the element whose parent grid to find
* @return the parent grid or null if none found.
@@ -209,11 +209,12 @@ public abstract class ClickableRenderer<T, W extends Widget> extends
* <p>
* Note that the row type of the click handler must match the row type of
* the containing Grid.
- *
+ *
* @param handler
* the click handler to be added
*/
- public HandlerRegistration addClickHandler(RendererClickHandler<?> handler) {
+ public HandlerRegistration addClickHandler(
+ RendererClickHandler<?> handler) {
if (handlerManager == null) {
handlerManager = new HandlerManager(this);
}
diff --git a/client/src/main/java/com/vaadin/client/renderers/ComplexRenderer.java b/client/src/main/java/com/vaadin/client/renderers/ComplexRenderer.java
index 262de79468..eeb0577737 100644
--- a/client/src/main/java/com/vaadin/client/renderers/ComplexRenderer.java
+++ b/client/src/main/java/com/vaadin/client/renderers/ComplexRenderer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,11 +32,11 @@ import com.vaadin.client.widget.grid.RendererCellReference;
* (override {@link #init(FlyweightCell)} and {@link #destroy(FlyweightCell) }
* and event handling (see {@link #onBrowserEvent(Cell, NativeEvent)},
* {@link #getConsumedEvents()} and {@link #onActivate()}.
- *
+ *
* <p>
* Also provides a helper method for hiding the cell contents by overriding
* {@link #setContentVisible(FlyweightCell, boolean)}
- *
+ *
* @since 7.4.0
* @author Vaadin Ltd
*/
@@ -45,7 +45,7 @@ public abstract class ComplexRenderer<T> implements Renderer<T> {
/**
* Called at initialization stage. Perform any initialization here e.g.
* attach handlers, attach widgets etc.
- *
+ *
* @param cell
* The cell. Note that the cell is not to be stored outside of
* the method as the cell instance will change. See
@@ -59,7 +59,7 @@ public abstract class ComplexRenderer<T> implements Renderer<T> {
* <p>
* The row object in the cell reference will be <code>null</code> since the
* row might no longer be present in the data source.
- *
+ *
* @param cell
* The cell. Note that the cell is not to be stored outside of
* the method as the cell instance will change. See
@@ -73,9 +73,9 @@ public abstract class ComplexRenderer<T> implements Renderer<T> {
* Returns the events that the renderer should consume. These are also the
* events that the Grid will pass to
* {@link #onBrowserEvent(Cell, NativeEvent)} when they occur.
- *
+ *
* @return a list of consumed events
- *
+ *
* @see com.google.gwt.dom.client.BrowserEvents
*/
public Collection<String> getConsumedEvents() {
@@ -91,11 +91,11 @@ public abstract class ComplexRenderer<T> implements Renderer<T> {
* <p>
* Returns boolean telling if the event has been completely handled and
* should not cause any other actions.
- *
+ *
* @param cell
* Object containing information about the cell the event was
* triggered on.
- *
+ *
* @param event
* The original DOM event
* @return true if event should not be handled by grid
@@ -112,12 +112,12 @@ public abstract class ComplexRenderer<T> implements Renderer<T> {
* Default implementation hides content by setting visibility: hidden to all
* elements inside the cell. Text nodes are left as is - renderers that add
* such to the root element need to implement explicit support hiding them.
- *
+ *
* @param cell
* The cell
* @param hasData
* Has the cell content been loaded from the data source
- *
+ *
*/
public void setContentVisible(RendererCellReference cell, boolean hasData) {
Element cellElement = cell.getElement();
@@ -137,7 +137,7 @@ public abstract class ComplexRenderer<T> implements Renderer<T> {
/**
* Called when the cell is activated by pressing <code>enter</code>, double
* clicking or performing a double tap on the cell.
- *
+ *
* @param cell
* the activated cell
* @return <code>true</code> if event was handled and should not be
diff --git a/client/src/main/java/com/vaadin/client/renderers/DateRenderer.java b/client/src/main/java/com/vaadin/client/renderers/DateRenderer.java
index 4d15fac724..45f82ccff3 100644
--- a/client/src/main/java/com/vaadin/client/renderers/DateRenderer.java
+++ b/client/src/main/java/com/vaadin/client/renderers/DateRenderer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.client.widget.grid.RendererCellReference;
/**
* A renderer for rendering dates into cells
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -34,8 +34,8 @@ public class DateRenderer implements Renderer<Date> {
// Calendar is unavailable for GWT
@SuppressWarnings("deprecation")
- private TimeZone timeZone = TimeZone.createTimeZone(new Date()
- .getTimezoneOffset());
+ private TimeZone timeZone = TimeZone
+ .createTimeZone(new Date().getTimezoneOffset());
public DateRenderer() {
this(PredefinedFormat.DATE_TIME_SHORT);
@@ -57,10 +57,10 @@ public class DateRenderer implements Renderer<Date> {
/**
* Gets the format of how the date is formatted.
- *
+ *
* @return the format
- * @see <a
- * href="http://www.gwtproject.org/javadoc/latest/com/google/gwt/i18n/shared/DateTimeFormat.html">GWT
+ * @see <a href=
+ * "http://www.gwtproject.org/javadoc/latest/com/google/gwt/i18n/shared/DateTimeFormat.html">GWT
* documentation on DateTimeFormat</a>
*/
public DateTimeFormat getFormat() {
@@ -69,11 +69,11 @@ public class DateRenderer implements Renderer<Date> {
/**
* Sets the format used for formatting the dates.
- *
+ *
* @param format
* the format to set
- * @see <a
- * href="http://www.gwtproject.org/javadoc/latest/com/google/gwt/i18n/shared/DateTimeFormat.html">GWT
+ * @see <a href=
+ * "http://www.gwtproject.org/javadoc/latest/com/google/gwt/i18n/shared/DateTimeFormat.html">GWT
* documentation on DateTimeFormat</a>
*/
public void setFormat(DateTimeFormat format) {
@@ -85,7 +85,7 @@ public class DateRenderer implements Renderer<Date> {
/**
* Returns the time zone of the date.
- *
+ *
* @return the time zone
*/
public TimeZone getTimeZone() {
@@ -95,7 +95,7 @@ public class DateRenderer implements Renderer<Date> {
/**
* Sets the time zone of the the date. By default uses the time zone of the
* browser.
- *
+ *
* @param timeZone
* the timeZone to set
*/
diff --git a/client/src/main/java/com/vaadin/client/renderers/HtmlRenderer.java b/client/src/main/java/com/vaadin/client/renderers/HtmlRenderer.java
index ec6dc761f6..fe0b96400d 100644
--- a/client/src/main/java/com/vaadin/client/renderers/HtmlRenderer.java
+++ b/client/src/main/java/com/vaadin/client/renderers/HtmlRenderer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ import com.vaadin.client.widget.grid.RendererCellReference;
* developer to ensure that the html string honors the {@link SafeHtml}
* contract. For more information see
* {@link SafeHtmlUtils#fromSafeConstant(String)}.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
* @see SafeHtmlUtils#fromSafeConstant(String)
@@ -35,7 +35,7 @@ public class HtmlRenderer implements Renderer<String> {
@Override
public void render(RendererCellReference cell, String htmlString) {
- cell.getElement().setInnerSafeHtml(
- SafeHtmlUtils.fromSafeConstant(htmlString));
+ cell.getElement()
+ .setInnerSafeHtml(SafeHtmlUtils.fromSafeConstant(htmlString));
}
}
diff --git a/client/src/main/java/com/vaadin/client/renderers/ImageRenderer.java b/client/src/main/java/com/vaadin/client/renderers/ImageRenderer.java
index d52bc1ba6d..bf27e1e822 100644
--- a/client/src/main/java/com/vaadin/client/renderers/ImageRenderer.java
+++ b/client/src/main/java/com/vaadin/client/renderers/ImageRenderer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.client.widget.grid.RendererCellReference;
* A renderer that renders an image into a cell. Click handlers can be added to
* the renderer, invoked every time any of the images rendered by that rendered
* is clicked.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
diff --git a/client/src/main/java/com/vaadin/client/renderers/NumberRenderer.java b/client/src/main/java/com/vaadin/client/renderers/NumberRenderer.java
index a040e8d1ce..5c8fe199d3 100644
--- a/client/src/main/java/com/vaadin/client/renderers/NumberRenderer.java
+++ b/client/src/main/java/com/vaadin/client/renderers/NumberRenderer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ import com.vaadin.client.widget.grid.RendererCellReference;
* Renders a number into a cell using a specific {@link NumberFormat}. By
* default uses the default number format returned by
* {@link NumberFormat#getDecimalFormat()}.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
* @param <T>
@@ -42,7 +42,7 @@ public class NumberRenderer implements Renderer<Number> {
/**
* Gets the number format that the number should be formatted in.
- *
+ *
* @return the number format used to render the number
*/
public NumberFormat getFormat() {
@@ -51,7 +51,7 @@ public class NumberRenderer implements Renderer<Number> {
/**
* Sets the number format to use for formatting the number.
- *
+ *
* @param format
* the format to use
* @throws IllegalArgumentException
diff --git a/client/src/main/java/com/vaadin/client/renderers/ProgressBarRenderer.java b/client/src/main/java/com/vaadin/client/renderers/ProgressBarRenderer.java
index 5b2c70d274..f945283542 100644
--- a/client/src/main/java/com/vaadin/client/renderers/ProgressBarRenderer.java
+++ b/client/src/main/java/com/vaadin/client/renderers/ProgressBarRenderer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ import com.vaadin.client.widget.grid.RendererCellReference;
/**
* A Renderer that represents a double value as a graphical progress bar.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
diff --git a/client/src/main/java/com/vaadin/client/renderers/Renderer.java b/client/src/main/java/com/vaadin/client/renderers/Renderer.java
index b2e9acd582..46b68b39de 100644
--- a/client/src/main/java/com/vaadin/client/renderers/Renderer.java
+++ b/client/src/main/java/com/vaadin/client/renderers/Renderer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,10 +25,10 @@ import com.vaadin.client.widgets.Grid;
* You can add a renderer to any column by overring the
* {@link GridColumn#getRenderer()} method and returning your own renderer. You
* can retrieve the cell element using {@link Cell#getElement()}.
- *
+ *
* @param <T>
* The column type
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -42,11 +42,11 @@ public interface Renderer<T> {
* It is recommended to set up the cell's DOM structure in
* {@link ComplexRenderer#init(RendererCellReference)} and only make
* incremental updates based on cell data in this method.
- *
+ *
* @param cell
* The cell. Note that the cell is a flyweight and should not be
* stored outside of the method as it will change.
- *
+ *
* @param data
* The column data object
*/
diff --git a/client/src/main/java/com/vaadin/client/renderers/TextRenderer.java b/client/src/main/java/com/vaadin/client/renderers/TextRenderer.java
index 3f704fd0b4..250eb35661 100644
--- a/client/src/main/java/com/vaadin/client/renderers/TextRenderer.java
+++ b/client/src/main/java/com/vaadin/client/renderers/TextRenderer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import com.vaadin.client.widget.grid.RendererCellReference;
/**
* Renderer that renders text into a cell.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
diff --git a/client/src/main/java/com/vaadin/client/renderers/WidgetRenderer.java b/client/src/main/java/com/vaadin/client/renderers/WidgetRenderer.java
index d7219e7241..8ad9d96bd6 100644
--- a/client/src/main/java/com/vaadin/client/renderers/WidgetRenderer.java
+++ b/client/src/main/java/com/vaadin/client/renderers/WidgetRenderer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ import com.vaadin.client.widget.grid.RendererCellReference;
/**
* A renderer for rendering widgets into cells.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
* @param <T>
@@ -30,8 +30,8 @@ import com.vaadin.client.widget.grid.RendererCellReference;
* @param <W>
* the Widget type
*/
-public abstract class WidgetRenderer<T, W extends Widget> extends
- ComplexRenderer<T> {
+public abstract class WidgetRenderer<T, W extends Widget>
+ extends ComplexRenderer<T> {
@Override
public void init(RendererCellReference cell) {
@@ -41,7 +41,7 @@ public abstract class WidgetRenderer<T, W extends Widget> extends
/**
* Creates a widget to attach to a cell. The widgets will be attached to the
* cell after the cell element has been attached to DOM.
- *
+ *
* @return widget to attach to a cell. All returned instances should be new
* widget instances without a parent.
*/
@@ -50,8 +50,8 @@ public abstract class WidgetRenderer<T, W extends Widget> extends
@Override
public void render(RendererCellReference cell, T data) {
W w = getWidget(cell.getElement());
- assert w != null : "Widget not found in cell (" + cell.getColumn()
- + "," + cell.getRow() + ")";
+ assert w != null : "Widget not found in cell (" + cell.getColumn() + ","
+ + cell.getRow() + ")";
render(cell, data, w);
}
@@ -65,7 +65,7 @@ public abstract class WidgetRenderer<T, W extends Widget> extends
* minimum since it will be called continuously while the user is scrolling.
* The renderer can use {@link Widget#setLayoutData(Object)} to store cell
* data that might be needed in e.g. event listeners.
- *
+ *
* @param cell
* The cell to render. Note that the cell is a flyweight and
* should not be stored and used outside of this method as its
@@ -80,7 +80,7 @@ public abstract class WidgetRenderer<T, W extends Widget> extends
/**
* Returns the widget contained inside the given cell element. Cannot be
* called for cells that do not contain a widget.
- *
+ *
* @param e
* the element inside which to find a widget
* @return the widget inside the element
@@ -95,7 +95,7 @@ public abstract class WidgetRenderer<T, W extends Widget> extends
* Returns the widget contained inside the given cell element, or null if it
* is not an instance of the given class. Cannot be called for cells that do
* not contain a widget.
- *
+ *
* @param e
* the element inside to find a widget
* @param klass
@@ -105,7 +105,8 @@ public abstract class WidgetRenderer<T, W extends Widget> extends
protected static <W extends Widget> W getWidget(TableCellElement e,
Class<W> klass) {
W w = WidgetUtil.findWidget(e.getFirstChildElement(), klass);
- assert w == null || w.getElement() == e.getFirstChildElement() : "Widget not found inside cell";
+ assert w == null || w.getElement() == e
+ .getFirstChildElement() : "Widget not found inside cell";
return w;
}
}
diff --git a/client/src/main/java/com/vaadin/client/ui/AbstractClickEventHandler.java b/client/src/main/java/com/vaadin/client/ui/AbstractClickEventHandler.java
index a2c54ec7ca..b4688f19ad 100644
--- a/client/src/main/java/com/vaadin/client/ui/AbstractClickEventHandler.java
+++ b/client/src/main/java/com/vaadin/client/ui/AbstractClickEventHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -128,7 +128,7 @@ public abstract class AbstractClickEventHandler implements MouseDownHandler,
* <p>
* By default registers the handler with the connector root widget.
* </p>
- *
+ *
* @param <H>
* @param handler
* The handler to register
@@ -143,7 +143,7 @@ public abstract class AbstractClickEventHandler implements MouseDownHandler,
/**
* Checks if there is a server side event listener registered for clicks
- *
+ *
* @return true if there is a server side event listener registered, false
* otherwise
*/
@@ -171,8 +171,8 @@ public abstract class AbstractClickEventHandler implements MouseDownHandler,
* When getting a mousedown event, we must detect where the
* corresponding mouseup event if it's on a different part of the page.
*/
- lastMouseDownTarget = WidgetUtil.getElementUnderMouse(event
- .getNativeEvent());
+ lastMouseDownTarget = WidgetUtil
+ .getElementUnderMouse(event.getNativeEvent());
mouseUpPreviewMatched = false;
mouseUpEventPreviewRegistration = Event
.addNativePreviewHandler(mouseUpPreviewHandler);
@@ -186,10 +186,10 @@ public abstract class AbstractClickEventHandler implements MouseDownHandler,
* but we can't fire the even there as the event might get canceled
* before it gets here.
*/
- if (hasEventListener()
- && mouseUpPreviewMatched
+ if (hasEventListener() && mouseUpPreviewMatched
&& lastMouseDownTarget != null
- && WidgetUtil.getElementUnderMouse(event.getNativeEvent()) == lastMouseDownTarget
+ && WidgetUtil.getElementUnderMouse(
+ event.getNativeEvent()) == lastMouseDownTarget
&& shouldFireEvent(event)) {
// "Click" with left, right or middle button
fireClick(event.getNativeEvent());
@@ -200,7 +200,7 @@ public abstract class AbstractClickEventHandler implements MouseDownHandler,
/**
* Sends the click event based on the given native event.
- *
+ *
* @param event
* The native event that caused this click event
*/
@@ -209,7 +209,7 @@ public abstract class AbstractClickEventHandler implements MouseDownHandler,
/**
* Called before firing a click event. Allows sub classes to decide if this
* in an event that should cause an event or not.
- *
+ *
* @param event
* The user event
* @return true if the event should be fired, false otherwise
@@ -235,7 +235,7 @@ public abstract class AbstractClickEventHandler implements MouseDownHandler,
* Click event calculates and returns coordinates relative to the element
* returned by this method. Default implementation uses the root element of
* the widget. Override to provide a different relative element.
- *
+ *
* @return The Element used for calculating relative coordinates for a click
* or null if no relative coordinates can be calculated.
*/
diff --git a/client/src/main/java/com/vaadin/client/ui/AbstractComponentConnector.java b/client/src/main/java/com/vaadin/client/ui/AbstractComponentConnector.java
index e040386e63..75370114ac 100644
--- a/client/src/main/java/com/vaadin/client/ui/AbstractComponentConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/AbstractComponentConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -104,18 +104,19 @@ public abstract class AbstractComponentConnector extends AbstractConnector
@OnStateChange("registeredEventListeners")
void handleContextClickListenerChange() {
if (contextHandler == null && hasEventListener(EventId.CONTEXT_CLICK)) {
- contextHandler = getWidget().addDomHandler(
- new ContextMenuHandler() {
+ contextHandler = getWidget()
+ .addDomHandler(new ContextMenuHandler() {
@Override
public void onContextMenu(ContextMenuEvent event) {
- final MouseEventDetails mouseEventDetails = MouseEventDetailsBuilder.buildMouseEventDetails(
- event.getNativeEvent(), getWidget()
- .getElement());
+ final MouseEventDetails mouseEventDetails = MouseEventDetailsBuilder
+ .buildMouseEventDetails(
+ event.getNativeEvent(),
+ getWidget().getElement());
event.preventDefault();
event.stopPropagation();
- sendContextClickEvent(mouseEventDetails, event
- .getNativeEvent().getEventTarget());
+ sendContextClickEvent(mouseEventDetails,
+ event.getNativeEvent().getEventTarget());
}
}, ContextMenuEvent.getType());
@@ -139,10 +140,10 @@ public abstract class AbstractComponentConnector extends AbstractConnector
/**
* The new default behaviour is for long taps to fire a contextclick event
* if there's a contextclick listener attached to the component.
- *
+ *
* If you do not want this in your component, override this with a blank
* method to get rid of said behaviour.
- *
+ *
* @since 7.6
*/
protected void unregisterTouchHandlers() {
@@ -163,13 +164,13 @@ public abstract class AbstractComponentConnector extends AbstractConnector
/**
* The new default behaviour is for long taps to fire a contextclick event
* if there's a contextclick listener attached to the component.
- *
+ *
* If you do not want this in your component, override this with a blank
* method to get rid of said behaviour.
- *
+ *
* Some Vaadin Components already handle the long tap as a context menu.
* This method is unnecessary for those.
- *
+ *
* @since 7.6
*/
protected void registerTouchHandlers() {
@@ -196,8 +197,9 @@ public abstract class AbstractComponentConnector extends AbstractConnector
* this was the case with iOS devices.
*/
- final MouseEventDetails mouseEventDetails = MouseEventDetailsBuilder.buildMouseEventDetails(
- event.getNativeEvent(), getWidget().getElement());
+ final MouseEventDetails mouseEventDetails = MouseEventDetailsBuilder
+ .buildMouseEventDetails(event.getNativeEvent(),
+ getWidget().getElement());
final EventTarget eventTarget = event.getNativeEvent()
.getEventTarget();
@@ -288,7 +290,7 @@ public abstract class AbstractComponentConnector extends AbstractConnector
/**
* If a long touch event timer is running, cancel it.
- *
+ *
* @since 7.6
*/
private void cancelTouchTimer() {
@@ -302,7 +304,7 @@ public abstract class AbstractComponentConnector extends AbstractConnector
/**
* Cancel the timer recursively for parent components that have timers
* running
- *
+ *
* @since 7.6
*/
private void cancelParentTouchTimers() {
@@ -324,7 +326,7 @@ public abstract class AbstractComponentConnector extends AbstractConnector
* This method sends the context menu event to the server-side. Can be
* overridden to provide extra information through an alternative RPC
* interface.
- *
+ *
* @since 7.6
* @param event
*/
@@ -349,7 +351,7 @@ public abstract class AbstractComponentConnector extends AbstractConnector
* can't call <code>super.createWidget()</code> since the metadata needed
* for that implementation is not generated if there's an override of the
* method.
- *
+ *
* @return a new widget instance to use for this component connector
*/
protected Widget createWidget() {
@@ -364,14 +366,15 @@ public abstract class AbstractComponentConnector extends AbstractConnector
+ getClass().getSimpleName()
+ ". This might be caused by explicitely using "
+ "super.createWidget() or some unspecified "
- + "problem with the widgetset compilation.", e);
+ + "problem with the widgetset compilation.",
+ e);
}
}
/**
* Returns the widget associated with this paintable. The widget returned by
* this method must not changed during the life time of the paintable.
- *
+ *
* @return The widget associated with this paintable
*/
@Override
@@ -419,7 +422,8 @@ public abstract class AbstractComponentConnector extends AbstractConnector
* first setting tabindex, then enabled state (through super
* implementation).
*/
- Profiler.enter("AbstractComponentConnector.onStateChanged update tab index");
+ Profiler.enter(
+ "AbstractComponentConnector.onStateChanged update tab index");
if (getState() instanceof TabIndexState) {
if (getWidget() instanceof Focusable) {
((Focusable) getWidget())
@@ -434,27 +438,35 @@ public abstract class AbstractComponentConnector extends AbstractConnector
// + " which does not implement Focusable");
}
}
- Profiler.leave("AbstractComponentConnector.onStateChanged update tab index");
+ Profiler.leave(
+ "AbstractComponentConnector.onStateChanged update tab index");
- Profiler.enter("AbstractComponentConnector.onStateChanged AbstractConnector.onStateChanged()");
+ Profiler.enter(
+ "AbstractComponentConnector.onStateChanged AbstractConnector.onStateChanged()");
super.onStateChanged(stateChangeEvent);
- Profiler.leave("AbstractComponentConnector.onStateChanged AbstractConnector.onStateChanged()");
+ Profiler.leave(
+ "AbstractComponentConnector.onStateChanged AbstractConnector.onStateChanged()");
// Style names
- Profiler.enter("AbstractComponentConnector.onStateChanged updateWidgetStyleNames");
+ Profiler.enter(
+ "AbstractComponentConnector.onStateChanged updateWidgetStyleNames");
updateWidgetStyleNames();
- Profiler.leave("AbstractComponentConnector.onStateChanged updateWidgetStyleNames");
+ Profiler.leave(
+ "AbstractComponentConnector.onStateChanged updateWidgetStyleNames");
/*
* updateComponentSize need to be after caption update so caption can be
* taken into account
*/
- Profiler.enter("AbstractComponentConnector.onStateChanged updateComponentSize");
+ Profiler.enter(
+ "AbstractComponentConnector.onStateChanged updateComponentSize");
updateComponentSize();
- Profiler.leave("AbstractComponentConnector.onStateChanged updateComponentSize");
+ Profiler.leave(
+ "AbstractComponentConnector.onStateChanged updateComponentSize");
- Profiler.enter("AbstractComponentContainer.onStateChanged check tooltip");
+ Profiler.enter(
+ "AbstractComponentContainer.onStateChanged check tooltip");
if (!tooltipListenersAttached && hasTooltip()) {
/*
* Add event handlers for tooltips if they are needed but have not
@@ -463,7 +475,8 @@ public abstract class AbstractComponentConnector extends AbstractConnector
tooltipListenersAttached = true;
getConnection().getVTooltip().connectHandlersToWidget(getWidget());
}
- Profiler.leave("AbstractComponentContainer.onStateChanged check tooltip");
+ Profiler.leave(
+ "AbstractComponentContainer.onStateChanged check tooltip");
Profiler.leave("AbstractComponentConnector.onStateChanged");
}
@@ -504,7 +517,7 @@ public abstract class AbstractComponentConnector extends AbstractConnector
/**
* 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
@@ -518,16 +531,16 @@ public abstract class AbstractComponentConnector extends AbstractConnector
if (newWidth.endsWith("%") != lastKnownWidth.endsWith("%")) {
Connector parent = getParent();
if (parent instanceof ManagedLayout) {
- getLayoutManager().setNeedsHorizontalLayout(
- (ManagedLayout) parent);
+ getLayoutManager()
+ .setNeedsHorizontalLayout((ManagedLayout) parent);
}
}
if (newHeight.endsWith("%") != lastKnownHeight.endsWith("%")) {
Connector parent = getParent();
if (parent instanceof ManagedLayout) {
- getLayoutManager().setNeedsVerticalLayout(
- (ManagedLayout) parent);
+ getLayoutManager()
+ .setNeedsVerticalLayout((ManagedLayout) parent);
}
}
@@ -537,21 +550,25 @@ public abstract class AbstractComponentConnector extends AbstractConnector
// Set defined sizes
Widget widget = getWidget();
- Profiler.enter("AbstractComponentConnector.updateComponentSize update styleNames");
+ Profiler.enter(
+ "AbstractComponentConnector.updateComponentSize update styleNames");
widget.setStyleName("v-has-width", !isUndefinedWidth());
widget.setStyleName("v-has-height", !isUndefinedHeight());
- Profiler.leave("AbstractComponentConnector.updateComponentSize update styleNames");
+ Profiler.leave(
+ "AbstractComponentConnector.updateComponentSize update styleNames");
- Profiler.enter("AbstractComponentConnector.updateComponentSize update DOM");
+ Profiler.enter(
+ "AbstractComponentConnector.updateComponentSize update DOM");
updateWidgetSize(newWidth, newHeight);
- Profiler.leave("AbstractComponentConnector.updateComponentSize update DOM");
+ 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.
@@ -585,7 +602,7 @@ public abstract class AbstractComponentConnector extends AbstractConnector
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.ComponentConnector#delegateCaptionHandling ()
*/
@Override
@@ -617,8 +634,8 @@ public abstract class AbstractComponentConnector extends AbstractConnector
setWidgetStyleName("v-readonly", isReadOnly());
// add / remove error style name
- setWidgetStyleNameWithPrefix(primaryStyleName,
- StyleConstants.ERROR_EXT, null != state.errorMessage);
+ setWidgetStyleNameWithPrefix(primaryStyleName, StyleConstants.ERROR_EXT,
+ null != state.errorMessage);
// add additional user defined style names as class names, prefixed with
// component default class name. remove nonexistent style names.
@@ -662,7 +679,7 @@ public abstract class AbstractComponentConnector extends AbstractConnector
* updated in another widget in addition to the one returned by the
* {@link #getWidget()}.
* </p>
- *
+ *
* @param styleName
* the style name to be added or removed
* @param add
@@ -683,7 +700,7 @@ public abstract class AbstractComponentConnector extends AbstractConnector
* different. For example see
* {@link com.vaadin.client.ui.datefield.DateFieldConnector#setWidgetStyleNameWithPrefix(String, String, boolean)}
* </p>
- *
+ *
* @param styleName
* the style name to be added or removed
* @param add
@@ -693,8 +710,8 @@ public abstract class AbstractComponentConnector extends AbstractConnector
* prefixes.
*/
@Deprecated
- protected void setWidgetStyleNameWithPrefix(String prefix,
- String styleName, boolean add) {
+ protected void setWidgetStyleNameWithPrefix(String prefix, String styleName,
+ boolean add) {
if (!styleName.startsWith("-")) {
if (!prefix.endsWith("-")) {
prefix += "-";
@@ -709,7 +726,7 @@ public abstract class AbstractComponentConnector extends AbstractConnector
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.ComponentConnector#isReadOnly()
*/
@Override
@@ -738,9 +755,10 @@ public abstract class AbstractComponentConnector extends AbstractConnector
// at this point.
if (getWidget() != null && getWidget().isAttached()) {
getWidget().removeFromParent();
- VConsole.error("Widget is still attached to the DOM after the connector ("
- + Util.getConnectorString(this)
- + ") has been unregistered. Widget was removed.");
+ VConsole.error(
+ "Widget is still attached to the DOM after the connector ("
+ + Util.getConnectorString(this)
+ + ") has been unregistered. Widget was removed.");
}
}
@@ -755,7 +773,8 @@ public abstract class AbstractComponentConnector extends AbstractConnector
AbstractComponentState state = getState();
if (state.description != null && !state.description.equals("")) {
return true;
- } else if (state.errorMessage != null && !state.errorMessage.equals("")) {
+ } else if (state.errorMessage != null
+ && !state.errorMessage.equals("")) {
return true;
} else {
return false;
@@ -764,7 +783,7 @@ public abstract class AbstractComponentConnector extends AbstractConnector
/**
* Gets the URI of the icon set for this component.
- *
+ *
* @return the URI of the icon, or <code>null</code> if no icon has been
* defined.
*/
@@ -774,7 +793,7 @@ public abstract class AbstractComponentConnector extends AbstractConnector
/**
* Gets the icon set for this component.
- *
+ *
* @return the icon, or <code>null</code> if no icon has been defined.
*/
protected Icon getIcon() {
@@ -783,7 +802,7 @@ public abstract class AbstractComponentConnector extends AbstractConnector
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.ComponentConnector#flush()
*/
@Override
diff --git a/client/src/main/java/com/vaadin/client/ui/AbstractComponentContainerConnector.java b/client/src/main/java/com/vaadin/client/ui/AbstractComponentContainerConnector.java
index f808fb194c..4e8b2a087e 100644
--- a/client/src/main/java/com/vaadin/client/ui/AbstractComponentContainerConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/AbstractComponentContainerConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -17,10 +17,10 @@ package com.vaadin.client.ui;
/**
* Client side connector for subclasses of AbstractComponentConnector.
- *
+ *
* @since 7.0
*/
-public abstract class AbstractComponentContainerConnector extends
- AbstractHasComponentsConnector {
+public abstract class AbstractComponentContainerConnector
+ extends AbstractHasComponentsConnector {
}
diff --git a/client/src/main/java/com/vaadin/client/ui/AbstractConnector.java b/client/src/main/java/com/vaadin/client/ui/AbstractConnector.java
index 7f8d6c2b14..15a62b4817 100644
--- a/client/src/main/java/com/vaadin/client/ui/AbstractConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/AbstractConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -49,13 +49,13 @@ import com.vaadin.shared.communication.URLReference;
/**
* An abstract implementation of Connector.
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
- *
+ *
*/
-public abstract class AbstractConnector implements ServerConnector,
- StateChangeHandler {
+public abstract class AbstractConnector
+ implements ServerConnector, StateChangeHandler {
private ApplicationConnection connection;
private String id;
@@ -85,7 +85,7 @@ public abstract class AbstractConnector implements ServerConnector,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.VPaintable#getConnection()
*/
@Override
@@ -95,7 +95,7 @@ public abstract class AbstractConnector implements ServerConnector,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.Connector#getId()
*/
@Override
@@ -120,13 +120,13 @@ public abstract class AbstractConnector implements ServerConnector,
addStateChangeHandler(this);
if (Profiler.isEnabled()) {
- Profiler.enter("AbstractConnector.init "
- + getClass().getSimpleName());
+ Profiler.enter(
+ "AbstractConnector.init " + getClass().getSimpleName());
}
init();
if (Profiler.isEnabled()) {
- Profiler.leave("AbstractConnector.init "
- + getClass().getSimpleName());
+ Profiler.leave(
+ "AbstractConnector.init " + getClass().getSimpleName());
}
Profiler.leave("AbstractConnector.doInit");
}
@@ -144,10 +144,10 @@ public abstract class AbstractConnector implements ServerConnector,
/**
* Registers an implementation for a server to client RPC interface.
- *
+ *
* Multiple registrations can be made for a single interface, in which case
* all of them receive corresponding RPC calls.
- *
+ *
* @param rpcInterface
* RPC interface
* @param implementation
@@ -169,7 +169,7 @@ public abstract class AbstractConnector implements ServerConnector,
/**
* Unregisters an implementation for a server to client RPC interface.
- *
+ *
* @param rpcInterface
* RPC interface
* @param implementation
@@ -187,7 +187,7 @@ public abstract class AbstractConnector implements ServerConnector,
/**
* Returns an RPC proxy object which can be used to invoke the RPC method on
* the server.
- *
+ *
* @param <T>
* The type of the ServerRpc interface
* @param rpcInterface
@@ -225,7 +225,8 @@ public abstract class AbstractConnector implements ServerConnector,
}
if (statePropertyHandlerManagers != null
&& event instanceof StateChangeEvent) {
- Profiler.enter("AbstractConnector.fireEvent statePropertyHandlerManagers");
+ Profiler.enter(
+ "AbstractConnector.fireEvent statePropertyHandlerManagers");
StateChangeEvent stateChangeEvent = (StateChangeEvent) event;
JsArrayString keys = statePropertyHandlerManagers.getKeys();
for (int i = 0; i < keys.length(); i++) {
@@ -234,7 +235,8 @@ public abstract class AbstractConnector implements ServerConnector,
statePropertyHandlerManagers.get(property).fireEvent(event);
}
}
- Profiler.leave("AbstractConnector.fireEvent statePropertyHandlerManagers");
+ Profiler.leave(
+ "AbstractConnector.fireEvent statePropertyHandlerManagers");
}
if (Profiler.isEnabled()) {
Profiler.leave(profilerKey);
@@ -251,9 +253,10 @@ public abstract class AbstractConnector implements ServerConnector,
}
@Override
- public HandlerRegistration addStateChangeHandler(StateChangeHandler handler) {
- return ensureHandlerManager()
- .addHandler(StateChangeEvent.TYPE, handler);
+ public HandlerRegistration addStateChangeHandler(
+ StateChangeHandler handler) {
+ return ensureHandlerManager().addHandler(StateChangeEvent.TYPE,
+ handler);
}
@Override
@@ -264,8 +267,8 @@ public abstract class AbstractConnector implements ServerConnector,
@Override
public HandlerRegistration addStateChangeHandler(String propertyName,
StateChangeHandler handler) {
- return ensureHandlerManager(propertyName).addHandler(
- StateChangeEvent.TYPE, handler);
+ return ensureHandlerManager(propertyName)
+ .addHandler(StateChangeEvent.TYPE, handler);
}
@Override
@@ -333,23 +336,23 @@ public abstract class AbstractConnector implements ServerConnector,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.ServerConnector#onUnregister()
*/
@Override
public void onUnregister() {
if (debugLogging) {
- VConsole.log("Unregistered connector "
- + Util.getConnectorString(this));
+ VConsole.log(
+ "Unregistered connector " + Util.getConnectorString(this));
}
}
/**
* Returns the shared state object for this connector.
- *
+ *
* Override this method to define the shared state type for your connector.
- *
+ *
* @return the current shared state (never null)
*/
@Override
@@ -368,7 +371,7 @@ public abstract class AbstractConnector implements ServerConnector,
* created state object must be compatible with the return type of
* {@link #getState()}. The default implementation creates a state object
* using GWT.create() using the defined return type of {@link #getState()}.
- *
+ *
* @return A new state object
*/
protected SharedState createState() {
@@ -457,7 +460,7 @@ public abstract class AbstractConnector implements ServerConnector,
* {@link com.vaadin.terminal.AbstractClientConnector#setResource(String, com.vaadin.terminal.Resource)}
* with the same key. <code>null</code> is returned if no corresponding
* resource is found.
- *
+ *
* @param key
* a string identifying the resource.
* @return the resource URL as a string, or <code>null</code> if no
@@ -474,7 +477,7 @@ public abstract class AbstractConnector implements ServerConnector,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.ServerConnector#hasEventListener(java.lang.String)
*/
@Override
@@ -486,7 +489,7 @@ public abstract class AbstractConnector implements ServerConnector,
/**
* Force the connector to recheck its state variables as the variables or
* their meaning might have changed.
- *
+ *
* @since 7.3
*/
public void forceStateChange() {
diff --git a/client/src/main/java/com/vaadin/client/ui/AbstractFieldConnector.java b/client/src/main/java/com/vaadin/client/ui/AbstractFieldConnector.java
index 8d8df81bd8..a093f2f3ef 100644
--- a/client/src/main/java/com/vaadin/client/ui/AbstractFieldConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/AbstractFieldConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -18,7 +18,8 @@ package com.vaadin.client.ui;
import com.vaadin.client.StyleConstants;
import com.vaadin.shared.AbstractFieldState;
-public abstract class AbstractFieldConnector extends AbstractComponentConnector {
+public abstract class AbstractFieldConnector
+ extends AbstractComponentConnector {
@Override
public AbstractFieldState getState() {
@@ -36,10 +37,10 @@ public abstract class AbstractFieldConnector extends AbstractComponentConnector
/**
* Checks whether the required indicator should be shown for the field.
- *
+ *
* Required indicators are hidden if the field or its data source is
* read-only.
- *
+ *
* @return true if required indicator should be shown
*/
public boolean isRequired() {
diff --git a/client/src/main/java/com/vaadin/client/ui/AbstractHasComponentsConnector.java b/client/src/main/java/com/vaadin/client/ui/AbstractHasComponentsConnector.java
index 27210de10d..50ecd7a014 100644
--- a/client/src/main/java/com/vaadin/client/ui/AbstractHasComponentsConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/AbstractHasComponentsConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,9 +24,9 @@ import com.vaadin.client.ConnectorHierarchyChangeEvent;
import com.vaadin.client.ConnectorHierarchyChangeEvent.ConnectorHierarchyChangeHandler;
import com.vaadin.client.HasComponentsConnector;
-public abstract class AbstractHasComponentsConnector extends
- AbstractComponentConnector implements HasComponentsConnector,
- ConnectorHierarchyChangeHandler {
+public abstract class AbstractHasComponentsConnector
+ extends AbstractComponentConnector
+ implements HasComponentsConnector, ConnectorHierarchyChangeHandler {
List<ComponentConnector> childComponents;
@@ -39,7 +39,7 @@ public abstract class AbstractHasComponentsConnector extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.HasComponentsConnector#getChildren()
*/
@Override
@@ -53,7 +53,7 @@ public abstract class AbstractHasComponentsConnector extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.HasComponentsConnector#setChildren
* (java.util.Collection)
*/
@@ -65,7 +65,7 @@ public abstract class AbstractHasComponentsConnector extends
@Override
public HandlerRegistration addConnectorHierarchyChangeHandler(
ConnectorHierarchyChangeHandler handler) {
- return ensureHandlerManager().addHandler(
- ConnectorHierarchyChangeEvent.TYPE, handler);
+ return ensureHandlerManager()
+ .addHandler(ConnectorHierarchyChangeEvent.TYPE, handler);
}
}
diff --git a/client/src/main/java/com/vaadin/client/ui/AbstractLayoutConnector.java b/client/src/main/java/com/vaadin/client/ui/AbstractLayoutConnector.java
index 6e1dde3863..b18acdf9bb 100644
--- a/client/src/main/java/com/vaadin/client/ui/AbstractLayoutConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/AbstractLayoutConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -17,8 +17,8 @@ package com.vaadin.client.ui;
import com.vaadin.shared.ui.AbstractLayoutState;
-public abstract class AbstractLayoutConnector extends
- AbstractComponentContainerConnector {
+public abstract class AbstractLayoutConnector
+ extends AbstractComponentContainerConnector {
@Override
public AbstractLayoutState getState() {
diff --git a/client/src/main/java/com/vaadin/client/ui/AbstractSingleComponentContainerConnector.java b/client/src/main/java/com/vaadin/client/ui/AbstractSingleComponentContainerConnector.java
index 954803b64c..9c93d91177 100644
--- a/client/src/main/java/com/vaadin/client/ui/AbstractSingleComponentContainerConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/AbstractSingleComponentContainerConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,15 +22,15 @@ import com.vaadin.client.ComponentConnector;
/**
* Client side connector for subclasses of AbstractSingleComponentConnector.
- *
+ *
* @since 7.0
*/
-public abstract class AbstractSingleComponentContainerConnector extends
- AbstractHasComponentsConnector {
+public abstract class AbstractSingleComponentContainerConnector
+ extends AbstractHasComponentsConnector {
/**
* Returns the content (only/first child) of the container.
- *
+ *
* @return child connector or null if none (e.g. invisible or not set on
* server)
*/
@@ -45,7 +45,7 @@ public abstract class AbstractSingleComponentContainerConnector extends
/**
* Returns the widget (if any) of the content of the container.
- *
+ *
* @return widget of the only/first connector of the container, null if no
* content or if there is no widget for the connector
*/
diff --git a/client/src/main/java/com/vaadin/client/ui/Action.java b/client/src/main/java/com/vaadin/client/ui/Action.java
index d7593740d6..6dc7d95d74 100644
--- a/client/src/main/java/com/vaadin/client/ui/Action.java
+++ b/client/src/main/java/com/vaadin/client/ui/Action.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ package com.vaadin.client.ui;
import com.google.gwt.user.client.Command;
/**
- *
+ *
*/
public abstract class Action implements Command {
@@ -72,7 +72,7 @@ public abstract class Action implements Command {
/*
* (non-Javadoc)
- *
+ *
* @see java.lang.Object#toString()
*/
@Override
diff --git a/client/src/main/java/com/vaadin/client/ui/ActionOwner.java b/client/src/main/java/com/vaadin/client/ui/ActionOwner.java
index 73c3675438..d775a8ca5e 100644
--- a/client/src/main/java/com/vaadin/client/ui/ActionOwner.java
+++ b/client/src/main/java/com/vaadin/client/ui/ActionOwner.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/CalendarEntry.java b/client/src/main/java/com/vaadin/client/ui/CalendarEntry.java
index 8050f0aab1..e40903009a 100644
--- a/client/src/main/java/com/vaadin/client/ui/CalendarEntry.java
+++ b/client/src/main/java/com/vaadin/client/ui/CalendarEntry.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/ClickEventHandler.java b/client/src/main/java/com/vaadin/client/ui/ClickEventHandler.java
index 7947e0560c..0a24bb5122 100644
--- a/client/src/main/java/com/vaadin/client/ui/ClickEventHandler.java
+++ b/client/src/main/java/com/vaadin/client/ui/ClickEventHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -35,7 +35,7 @@ public abstract class ClickEventHandler extends AbstractClickEventHandler {
/**
* Sends the click event based on the given native event. Delegates actual
* sending to {@link #fireClick(MouseEventDetails)}.
- *
+ *
* @param event
* The native event that caused this click event
*/
@@ -49,10 +49,10 @@ public abstract class ClickEventHandler extends AbstractClickEventHandler {
/**
* Sends the click event to the server. Must be implemented by sub classes,
* typically by calling an RPC method.
- *
+ *
* @param event
* The event that caused this click to be fired
- *
+ *
* @param mouseDetails
* The mouse details for the event
*/
diff --git a/client/src/main/java/com/vaadin/client/ui/ConnectorFocusAndBlurHandler.java b/client/src/main/java/com/vaadin/client/ui/ConnectorFocusAndBlurHandler.java
index 8272f99d25..fd7c4d1f53 100644
--- a/client/src/main/java/com/vaadin/client/ui/ConnectorFocusAndBlurHandler.java
+++ b/client/src/main/java/com/vaadin/client/ui/ConnectorFocusAndBlurHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,12 +31,12 @@ import com.vaadin.shared.communication.FieldRpc.FocusAndBlurServerRpc;
* A handler for focus and blur events which uses {@link FocusAndBlurServerRpc}
* to transmit received events to the server. Events are only handled if there
* is a corresponding listener on the server side.
- *
+ *
* @since 7.6
* @author Vaadin Ltd
*/
-public class ConnectorFocusAndBlurHandler implements StateChangeHandler,
- FocusHandler, BlurHandler {
+public class ConnectorFocusAndBlurHandler
+ implements StateChangeHandler, FocusHandler, BlurHandler {
private final AbstractComponentConnector connector;
private final Widget widget;
diff --git a/client/src/main/java/com/vaadin/client/ui/Field.java b/client/src/main/java/com/vaadin/client/ui/Field.java
index 99bfe107b3..8a5e8e96b8 100644
--- a/client/src/main/java/com/vaadin/client/ui/Field.java
+++ b/client/src/main/java/com/vaadin/client/ui/Field.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -14,14 +14,14 @@
* the License.
*/
/**
- *
+ *
*/
package com.vaadin.client.ui;
/**
* This interface indicates that the component is a Field (serverside), and
* wants (for instance) to automatically get the v-modified classname.
- *
+ *
*/
public interface Field {
diff --git a/client/src/main/java/com/vaadin/client/ui/FocusElementPanel.java b/client/src/main/java/com/vaadin/client/ui/FocusElementPanel.java
index d0ddca0935..3aa087f7d1 100644
--- a/client/src/main/java/com/vaadin/client/ui/FocusElementPanel.java
+++ b/client/src/main/java/com/vaadin/client/ui/FocusElementPanel.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/FocusUtil.java b/client/src/main/java/com/vaadin/client/ui/FocusUtil.java
index 4750b89173..27a1015d77 100644
--- a/client/src/main/java/com/vaadin/client/ui/FocusUtil.java
+++ b/client/src/main/java/com/vaadin/client/ui/FocusUtil.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,38 +21,40 @@ import com.google.gwt.user.client.ui.Widget;
/**
* A helper class used to make it easier for {@link Widget}s to implement
* {@link Focusable}.
- *
+ *
* @author Vaadin Ltd
* @version @VERSION@
* @since 7.0.3
- *
+ *
*/
public class FocusUtil {
/**
* Sets the access key property
- *
+ *
* @param focusable
* The widget for which we want to set the access key.
* @param key
* The access key to set
*/
public static void setAccessKey(Widget focusable, char key) {
- assert (focusable != null && focusable.getElement() != null) : "Can't setAccessKey for a widget without an element";
+ assert (focusable != null && focusable
+ .getElement() != null) : "Can't setAccessKey for a widget without an element";
focusable.getElement().setPropertyString("accessKey", "" + key);
}
/**
* Explicitly focus/unfocus the given widget. Only one widget can have focus
* at a time, and the widget that does will receive all keyboard events.
- *
+ *
* @param focusable
* the widget to focus/unfocus
* @param focused
* whether this widget should take focus or release it
*/
public static void setFocus(Widget focusable, boolean focus) {
- assert (focusable != null && focusable.getElement() != null) : "Can't setFocus for a widget without an element";
+ assert (focusable != null && focusable
+ .getElement() != null) : "Can't setFocus for a widget without an element";
if (focus) {
focusable.getElement().focus();
@@ -66,28 +68,30 @@ public class FocusUtil {
* the same tab index, each such widget will receive focus in an arbitrary
* order. Setting the tab index to <code>-1</code> will cause the widget to
* be removed from the tab order.
- *
+ *
* @param focusable
* The widget
* @param tabIndex
* the widget's tab index
*/
public static void setTabIndex(Widget focusable, int tabIndex) {
- assert (focusable != null && focusable.getElement() != null) : "Can't setTabIndex for a widget without an element";
+ assert (focusable != null && focusable
+ .getElement() != null) : "Can't setTabIndex for a widget without an element";
focusable.getElement().setTabIndex(tabIndex);
}
/**
* Gets the widget's position in the tab index.
- *
+ *
* @param focusable
* The widget
- *
+ *
* @return the widget's tab index
*/
public static int getTabIndex(Widget focusable) {
- assert (focusable != null && focusable.getElement() != null) : "Can't getTabIndex for a widget without an element";
+ assert (focusable != null && focusable
+ .getElement() != null) : "Can't getTabIndex for a widget without an element";
return focusable.getElement().getTabIndex();
}
diff --git a/client/src/main/java/com/vaadin/client/ui/FocusableFlexTable.java b/client/src/main/java/com/vaadin/client/ui/FocusableFlexTable.java
index 8deec2babb..13628e1413 100644
--- a/client/src/main/java/com/vaadin/client/ui/FocusableFlexTable.java
+++ b/client/src/main/java/com/vaadin/client/ui/FocusableFlexTable.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -49,7 +49,7 @@ public class FocusableFlexTable extends FlexTable implements HasFocusHandlers,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.HasFocusHandlers#addFocusHandler(com.
* google.gwt.event.dom.client.FocusHandler)
@@ -61,7 +61,7 @@ public class FocusableFlexTable extends FlexTable implements HasFocusHandlers,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.HasBlurHandlers#addBlurHandler(com.google
* .gwt.event.dom.client.BlurHandler)
@@ -73,7 +73,7 @@ public class FocusableFlexTable extends FlexTable implements HasFocusHandlers,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.HasKeyDownHandlers#addKeyDownHandler(
* com.google.gwt.event.dom.client.KeyDownHandler)
@@ -85,7 +85,7 @@ public class FocusableFlexTable extends FlexTable implements HasFocusHandlers,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.HasKeyPressHandlers#addKeyPressHandler
* (com.google.gwt.event.dom.client.KeyPressHandler)
@@ -97,7 +97,7 @@ public class FocusableFlexTable extends FlexTable implements HasFocusHandlers,
/**
* Sets the keyboard focus to the panel
- *
+ *
* @param focus
* Should the panel have keyboard focus. If true the keyboard
* focus will be moved to the
@@ -112,7 +112,7 @@ public class FocusableFlexTable extends FlexTable implements HasFocusHandlers,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.Focusable#focus()
*/
@Override
diff --git a/client/src/main/java/com/vaadin/client/ui/FocusableFlowPanel.java b/client/src/main/java/com/vaadin/client/ui/FocusableFlowPanel.java
index 77a26361ef..f2d84cf590 100644
--- a/client/src/main/java/com/vaadin/client/ui/FocusableFlowPanel.java
+++ b/client/src/main/java/com/vaadin/client/ui/FocusableFlowPanel.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -46,7 +46,7 @@ public class FocusableFlowPanel extends FlowPanel implements HasFocusHandlers,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.HasFocusHandlers#addFocusHandler(com.
* google.gwt.event.dom.client.FocusHandler)
@@ -58,7 +58,7 @@ public class FocusableFlowPanel extends FlowPanel implements HasFocusHandlers,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.HasBlurHandlers#addBlurHandler(com.google
* .gwt.event.dom.client.BlurHandler)
@@ -70,7 +70,7 @@ public class FocusableFlowPanel extends FlowPanel implements HasFocusHandlers,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.HasKeyDownHandlers#addKeyDownHandler(
* com.google.gwt.event.dom.client.KeyDownHandler)
@@ -82,7 +82,7 @@ public class FocusableFlowPanel extends FlowPanel implements HasFocusHandlers,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.HasKeyPressHandlers#addKeyPressHandler
* (com.google.gwt.event.dom.client.KeyPressHandler)
@@ -94,7 +94,7 @@ public class FocusableFlowPanel extends FlowPanel implements HasFocusHandlers,
/**
* Sets/Removes the keyboard focus to the panel.
- *
+ *
* @param focus
* If set to true then the focus is moved to the panel, if set to
* false the focus is removed
diff --git a/client/src/main/java/com/vaadin/client/ui/FocusableScrollPanel.java b/client/src/main/java/com/vaadin/client/ui/FocusableScrollPanel.java
index 1ac5a08ccd..e49e7692c1 100644
--- a/client/src/main/java/com/vaadin/client/ui/FocusableScrollPanel.java
+++ b/client/src/main/java/com/vaadin/client/ui/FocusableScrollPanel.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -37,10 +37,10 @@ import com.vaadin.client.BrowserInfo;
/**
* A scrollhandlers similar to {@link ScrollPanel}.
- *
+ *
*/
-public class FocusableScrollPanel extends SimpleFocusablePanel implements
- HasScrollHandlers, ScrollHandler {
+public class FocusableScrollPanel extends SimpleFocusablePanel
+ implements HasScrollHandlers, ScrollHandler {
public FocusableScrollPanel() {
// Prevent IE standard mode bug when a AbsolutePanel is contained.
@@ -131,7 +131,7 @@ public class FocusableScrollPanel extends SimpleFocusablePanel implements
/**
* Gets the horizontal scroll position.
- *
+ *
* @return the horizontal scroll position, in pixels
*/
public int getHorizontalScrollPosition() {
@@ -140,7 +140,7 @@ public class FocusableScrollPanel extends SimpleFocusablePanel implements
/**
* Gets the vertical scroll position.
- *
+ *
* @return the vertical scroll position, in pixels
*/
public int getScrollPosition() {
@@ -153,7 +153,7 @@ public class FocusableScrollPanel extends SimpleFocusablePanel implements
/**
* Sets the horizontal scroll position.
- *
+ *
* @param position
* the new horizontal scroll position, in pixels
*/
@@ -163,7 +163,7 @@ public class FocusableScrollPanel extends SimpleFocusablePanel implements
/**
* Sets the vertical scroll position.
- *
+ *
* @param position
* the new vertical scroll position, in pixels
*/
@@ -174,8 +174,8 @@ public class FocusableScrollPanel extends SimpleFocusablePanel implements
.getElements(getElement());
for (com.google.gwt.dom.client.Element el : elements) {
final Style style = el.getStyle();
- style.setProperty("webkitTransform", "translate3d(0px,"
- + -position + "px,0px)");
+ style.setProperty("webkitTransform",
+ "translate3d(0px," + -position + "px,0px)");
}
getElement().setPropertyInt("_vScrollTop", position);
} else {
diff --git a/client/src/main/java/com/vaadin/client/ui/FontIcon.java b/client/src/main/java/com/vaadin/client/ui/FontIcon.java
index 74d094a0f2..d5a1e9579a 100644
--- a/client/src/main/java/com/vaadin/client/ui/FontIcon.java
+++ b/client/src/main/java/com/vaadin/client/ui/FontIcon.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,7 +27,7 @@ import com.vaadin.shared.ApplicationConstants;
* (identified by font-family, {@link #getFontFamily()},
* {@link #setFontFamily(String)}).
* </p>
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
@@ -43,16 +43,17 @@ public class FontIcon extends Icon {
@Override
public void setUri(String uri) {
- String[] parts = uri.substring(
- ApplicationConstants.FONTICON_PROTOCOL_PREFIX.length()).split(
- "/");
+ String[] parts = uri
+ .substring(
+ ApplicationConstants.FONTICON_PROTOCOL_PREFIX.length())
+ .split("/");
setFontFamily(URL.decode(parts[0]));
setCodepoint(Integer.parseInt(parts[1], 16));
}
/**
* Not implemeted for {@link FontIcon} yet.
- *
+ *
* @see com.vaadin.client.ui.Icon#setAlternateText(java.lang.String)
*/
@Override
@@ -66,7 +67,7 @@ public class FontIcon extends Icon {
* Sets the font-family from which this icon comes. Use
* {@link #setCodepoint(int)} to specify a particular icon (character)
* within the font.
- *
+ *
* @param fontFamily
* font-family name
*/
@@ -84,7 +85,7 @@ public class FontIcon extends Icon {
* Gets the font-family from which this icon comes. Use
* {@link #getCodepoint()} to find out which particular icon (character)
* within the font this is.
- *
+ *
* @return font-family name
*/
public String getFontFamily() {
@@ -94,7 +95,7 @@ public class FontIcon extends Icon {
/**
* Sets the codepoint indicating which particular icon (character) within
* the font-family this is.
- *
+ *
* @param codepoint
*/
protected void setCodepoint(int codepoint) {
@@ -105,7 +106,7 @@ public class FontIcon extends Icon {
/**
* Gets the codepoint indicating which particular icon (character) within
* the font-family this is.
- *
+ *
* @return
*/
public int getCodepoint() {
@@ -114,7 +115,7 @@ public class FontIcon extends Icon {
/**
* Get the font-family based stylename used to apply the font-family.
- *
+ *
* @since 7.2
* @return stylename used to apply font-family
*/
@@ -128,14 +129,14 @@ public class FontIcon extends Icon {
/**
* Checks whether or not the given uri is a font icon uri. Does not check
* whether or not the font icon is available and can be rendered.
- *
+ *
* @since 7.2
* @param uri
* @return true if it's a fonticon uri
*/
public static boolean isFontIconUri(String uri) {
- return uri != null
- && uri.startsWith(ApplicationConstants.FONTICON_PROTOCOL_PREFIX);
+ return uri != null && uri
+ .startsWith(ApplicationConstants.FONTICON_PROTOCOL_PREFIX);
}
@Override
diff --git a/client/src/main/java/com/vaadin/client/ui/Icon.java b/client/src/main/java/com/vaadin/client/ui/Icon.java
index 277fc2dd5d..f3cc3f3785 100644
--- a/client/src/main/java/com/vaadin/client/ui/Icon.java
+++ b/client/src/main/java/com/vaadin/client/ui/Icon.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import com.vaadin.client.ApplicationConnection;
/**
* An abstract representation of an icon.
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
@@ -35,7 +35,7 @@ public abstract class Icon extends UIObject {
* This might be a URL referencing a image (e.g {@link ImageIcon}) or a
* custom URI (e.g {@link FontIcon}).
* </p>
- *
+ *
* @param uri
* the URI for this icon
*/
@@ -43,14 +43,14 @@ public abstract class Icon extends UIObject {
/**
* Gets the current URI for this icon.
- *
+ *
* @return URI in use
*/
public abstract String getUri();
/**
* Sets the alternate text for the icon.
- *
+ *
* @param alternateText
* with the alternate text.
*/
diff --git a/client/src/main/java/com/vaadin/client/ui/ImageIcon.java b/client/src/main/java/com/vaadin/client/ui/ImageIcon.java
index 7174c73637..b3e2166142 100644
--- a/client/src/main/java/com/vaadin/client/ui/ImageIcon.java
+++ b/client/src/main/java/com/vaadin/client/ui/ImageIcon.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import com.vaadin.client.BrowserInfo;
* The image is loaded from the given URL ( {@link #setUri(String)}) and
* displayed in full.
* </p>
- *
+ *
* @author Vaadin Ltd
*/
public class ImageIcon extends Icon {
diff --git a/client/src/main/java/com/vaadin/client/ui/JavaScriptComponentConnector.java b/client/src/main/java/com/vaadin/client/ui/JavaScriptComponentConnector.java
index a3a03b597b..c6be984759 100644
--- a/client/src/main/java/com/vaadin/client/ui/JavaScriptComponentConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/JavaScriptComponentConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/JavaScriptWidget.java b/client/src/main/java/com/vaadin/client/ui/JavaScriptWidget.java
index da9192dace..7691888e76 100644
--- a/client/src/main/java/com/vaadin/client/ui/JavaScriptWidget.java
+++ b/client/src/main/java/com/vaadin/client/ui/JavaScriptWidget.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/JsniMousewheelHandler.java b/client/src/main/java/com/vaadin/client/ui/JsniMousewheelHandler.java
index 82ea768871..58ad36855a 100644
--- a/client/src/main/java/com/vaadin/client/ui/JsniMousewheelHandler.java
+++ b/client/src/main/java/com/vaadin/client/ui/JsniMousewheelHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,9 +24,9 @@ import com.vaadin.client.widgets.Escalator;
/**
* A mousewheel handling class to get around the limits of
* {@link Event#ONMOUSEWHEEL}.
- *
+ *
* For internal use only. May be removed or replaced in the future.
- *
+ *
* @see Escalator.JsniWorkaround
*/
abstract class JsniMousewheelHandler {
@@ -34,7 +34,7 @@ abstract class JsniMousewheelHandler {
/**
* A JavaScript function that handles the mousewheel DOM event, and passes
* it on to Java code.
- *
+ *
* @see #createMousewheelListenerFunction(Widget)
*/
protected final JavaScriptObject mousewheelListenerFunction;
@@ -46,7 +46,7 @@ abstract class JsniMousewheelHandler {
/**
* A method that constructs the JavaScript function that will be stored into
* {@link #mousewheelListenerFunction}.
- *
+ *
* @param widget
* a reference to the current instance of {@link Widget}
*/
diff --git a/client/src/main/java/com/vaadin/client/ui/LayoutClickEventHandler.java b/client/src/main/java/com/vaadin/client/ui/LayoutClickEventHandler.java
index 6eccb9cb3b..d5b731ca13 100644
--- a/client/src/main/java/com/vaadin/client/ui/LayoutClickEventHandler.java
+++ b/client/src/main/java/com/vaadin/client/ui/LayoutClickEventHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,8 @@ import com.vaadin.shared.EventId;
import com.vaadin.shared.MouseEventDetails;
import com.vaadin.shared.ui.LayoutClickRpc;
-public abstract class LayoutClickEventHandler extends AbstractClickEventHandler {
+public abstract class LayoutClickEventHandler
+ extends AbstractClickEventHandler {
public LayoutClickEventHandler(ComponentConnector connector) {
this(connector, EventId.LAYOUT_CLICK_EVENT_IDENTIFIER);
diff --git a/client/src/main/java/com/vaadin/client/ui/LegacyConnector.java b/client/src/main/java/com/vaadin/client/ui/LegacyConnector.java
index 35a82cff53..891f7f6a1d 100644
--- a/client/src/main/java/com/vaadin/client/ui/LegacyConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/LegacyConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/ManagedLayout.java b/client/src/main/java/com/vaadin/client/ui/ManagedLayout.java
index e7266d99b5..ab17e4023b 100644
--- a/client/src/main/java/com/vaadin/client/ui/ManagedLayout.java
+++ b/client/src/main/java/com/vaadin/client/ui/ManagedLayout.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/MediaBaseConnector.java b/client/src/main/java/com/vaadin/client/ui/MediaBaseConnector.java
index fdd9610517..c2300de671 100644
--- a/client/src/main/java/com/vaadin/client/ui/MediaBaseConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/MediaBaseConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/PostLayoutListener.java b/client/src/main/java/com/vaadin/client/ui/PostLayoutListener.java
index bbeb6f1255..ed108d91a8 100644
--- a/client/src/main/java/com/vaadin/client/ui/PostLayoutListener.java
+++ b/client/src/main/java/com/vaadin/client/ui/PostLayoutListener.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.client.LayoutManager;
* to know whenever a layout phase has ended. At the end of each layout phase,
* {@link LayoutManager} invokes the {@link #postLayout()} method for all
* registered component connectors implementing this interface.
- *
+ *
* @since 7.0
* @author Vaadin Ltd
*/
diff --git a/client/src/main/java/com/vaadin/client/ui/ShortcutActionHandler.java b/client/src/main/java/com/vaadin/client/ui/ShortcutActionHandler.java
index a9d5f0731a..83214173dc 100644
--- a/client/src/main/java/com/vaadin/client/ui/ShortcutActionHandler.java
+++ b/client/src/main/java/com/vaadin/client/ui/ShortcutActionHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -37,7 +37,7 @@ import com.vaadin.client.Util;
* A helper class to implement keyboard shorcut handling. Keeps a list of owners
* actions and fires actions to server. User class needs to delegate keyboard
* events to handleKeyboardEvents function.
- *
+ *
* @author Vaadin Ltd
*/
public class ShortcutActionHandler {
@@ -71,7 +71,7 @@ public class ShortcutActionHandler {
* shortcut if the Paintable is currently focused (aka the target of the
* shortcut action). Eg. a field can update its possibly changed value
* to the server before shortcut action is fired.
- *
+ *
* @param e
* the event that triggered the shortcut action
*/
@@ -83,7 +83,7 @@ public class ShortcutActionHandler {
private String paintableId;
/**
- *
+ *
* @param pid
* Paintable id
* @param c
@@ -96,7 +96,7 @@ public class ShortcutActionHandler {
/**
* Updates list of actions this handler listens to.
- *
+ *
* @param c
* UIDL snippet containing actions
*/
@@ -119,7 +119,8 @@ public class ShortcutActionHandler {
}
}
- public void handleKeyboardEvent(final Event event, ComponentConnector target) {
+ public void handleKeyboardEvent(final Event event,
+ ComponentConnector target) {
final int modifiers = KeyboardListenerCollection
.getKeyboardModifiers(event);
final char keyCode = (char) DOM.eventGetKeyCode(event);
@@ -192,7 +193,7 @@ public class ShortcutActionHandler {
* {@link BeforeShortcutActionListener} via widgets could be notified when
* they should fire value change. Big task for TextFields, DateFields and
* various selects.
- *
+ *
* <p>
* TODO separate opera impl with generator
*/
@@ -291,7 +292,8 @@ class ShortcutAction {
private final String caption;
private final String key;
- public ShortcutAction(String key, ShortcutKeyCombination sc, String caption) {
+ public ShortcutAction(String key, ShortcutKeyCombination sc,
+ String caption) {
this.sc = sc;
this.key = key;
this.caption = caption;
diff --git a/client/src/main/java/com/vaadin/client/ui/SimpleFocusablePanel.java b/client/src/main/java/com/vaadin/client/ui/SimpleFocusablePanel.java
index f938b2e74f..6d989988a7 100644
--- a/client/src/main/java/com/vaadin/client/ui/SimpleFocusablePanel.java
+++ b/client/src/main/java/com/vaadin/client/ui/SimpleFocusablePanel.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -38,8 +38,8 @@ import com.vaadin.client.Focusable;
* Compared to FocusPanel in GWT this panel does not support eg. accesskeys, but
* is simpler by its dom hierarchy nor supports focusing via java api.
*/
-public class SimpleFocusablePanel extends SimplePanel implements
- HasFocusHandlers, HasBlurHandlers, HasKeyDownHandlers,
+public class SimpleFocusablePanel extends SimplePanel
+ implements HasFocusHandlers, HasBlurHandlers, HasKeyDownHandlers,
HasKeyPressHandlers, Focusable {
public SimpleFocusablePanel() {
diff --git a/client/src/main/java/com/vaadin/client/ui/SimpleManagedLayout.java b/client/src/main/java/com/vaadin/client/ui/SimpleManagedLayout.java
index e61e2799c4..4a4990e132 100644
--- a/client/src/main/java/com/vaadin/client/ui/SimpleManagedLayout.java
+++ b/client/src/main/java/com/vaadin/client/ui/SimpleManagedLayout.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/SubPartAware.java b/client/src/main/java/com/vaadin/client/ui/SubPartAware.java
index 7a40eea20e..4e8b861d01 100644
--- a/client/src/main/java/com/vaadin/client/ui/SubPartAware.java
+++ b/client/src/main/java/com/vaadin/client/ui/SubPartAware.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import com.google.gwt.user.client.ui.Widget;
/**
* Interface implemented by {@link Widget}s which can provide identifiers for at
* least one element inside the component.
- *
+ *
*/
public interface SubPartAware {
@@ -28,7 +28,7 @@ public interface SubPartAware {
* Locates an element inside a component using the identifier provided in
* {@code subPart}. The {@code subPart} identifier is component specific and
* may be any string of characters, numbers, space characters and brackets.
- *
+ *
* @param subPart
* The identifier for the element inside the component
* @return The element identified by subPart or null if the element could
@@ -49,7 +49,7 @@ public interface SubPartAware {
* identifier for the root element even though a DIV inside the button was
* passed as {@code subElement} because interactions with the DIV and the
* root button element produce the same result.
- *
+ *
* @param subElement
* The element the identifier string should uniquely identify
* @return An identifier that uniquely identifies {@code subElement} or null
diff --git a/client/src/main/java/com/vaadin/client/ui/TouchScrollDelegate.java b/client/src/main/java/com/vaadin/client/ui/TouchScrollDelegate.java
index f53b32b4e1..7ef673ad68 100644
--- a/client/src/main/java/com/vaadin/client/ui/TouchScrollDelegate.java
+++ b/client/src/main/java/com/vaadin/client/ui/TouchScrollDelegate.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -57,26 +57,26 @@ import com.vaadin.client.VConsole;
* Scroll event should only happen when the "touch scrolling actually ends".
* Later we might also tune this so that a scroll event happens if user stalls
* her finger long enought.
- *
+ *
* TODO static getter for active touch scroll delegate. Components might need to
* prevent scrolling in some cases. Consider Table with drag and drop, or drag
* and drop in scrollable area. Optimal implementation might be to start the
* drag and drop only if user keeps finger down for a moment, otherwise do the
* scroll. In this case, the draggable component would need to cancel scrolling
* in a timer after touchstart event and take over from there.
- *
+ *
* TODO support scrolling horizontally
- *
+ *
* TODO cancel if user add second finger to the screen (user expects a gesture).
- *
+ *
* TODO "scrollbars", see e.g. iscroll.js
- *
+ *
* TODO write an email to sjobs √§t apple dot com and beg for this feature to be
* built into webkit. Seriously, we should try to lobbying this to webkit folks.
* This sure ain't our business to implement this with javascript.
- *
+ *
* TODO collect all general touch related constant to better place.
- *
+ *
* @author Matti Tahvonen, Vaadin Ltd
*/
public class TouchScrollDelegate implements NativePreviewHandler {
@@ -129,12 +129,12 @@ public class TouchScrollDelegate implements NativePreviewHandler {
/**
* Attaches the scroll handler to the widget. This method must be called
* before calling any other methods in this class.
- *
+ *
* @param widget
* The widget that contains scrollable elements
* @param scrollables
* The elements of the widget that should be scrollable.
- *
+ *
* @deprecated Use {@link GWT#create(Class)} and
* {@link #init(Widget, Element...)} instead of this
* constructor to enable overriding.
@@ -148,7 +148,7 @@ public class TouchScrollDelegate implements NativePreviewHandler {
/**
* Attaches the scroll handler to the widget. This method must be called
* once before calling any other method in this class.
- *
+ *
* @param widget
* The widget that contains scrollable elements
* @param scrollables
@@ -202,7 +202,7 @@ public class TouchScrollDelegate implements NativePreviewHandler {
/**
* Registers the given elements as scrollable, removing previously
* registered scrollables from this handler.
- *
+ *
* @param scrollables
* The elements that should be scrollable
*/
@@ -223,7 +223,7 @@ public class TouchScrollDelegate implements NativePreviewHandler {
* scrolling of the device should be used. By default, relies on
* {@link BrowserInfo#requiresTouchScrollDelegate()}, override to change
* the behavior.
- *
+ *
* @return true if a Javascript delegate should be used for scrolling,
* false to use the native scrolling of the device
*/
@@ -242,7 +242,7 @@ public class TouchScrollDelegate implements NativePreviewHandler {
/**
* Makes the given elements scrollable, either natively or by using a
* TouchScrollDelegate, depending on platform capabilities.
- *
+ *
* @param widget
* The widget that contains scrollable elements
* @param scrollables
@@ -270,7 +270,7 @@ public class TouchScrollDelegate implements NativePreviewHandler {
/**
* Has user moved the touch.
- *
+ *
* @return
*/
public boolean isMoved() {
@@ -399,7 +399,7 @@ public class TouchScrollDelegate implements NativePreviewHandler {
/**
* Detects if a touch happens on a predefined element and the element has
* something to scroll.
- *
+ *
* @param touch
* @return
*/
@@ -480,7 +480,7 @@ public class TouchScrollDelegate implements NativePreviewHandler {
private Animation momentum;
/**
- *
+ *
* @param event
* @return
*/
@@ -602,15 +602,15 @@ public class TouchScrollDelegate implements NativePreviewHandler {
private void translateTo(double translateY) {
for (Element el : layers) {
Style style = el.getStyle();
- style.setProperty("webkitTransform", "translate3d(0px,"
- + translateY + "px,0px)");
+ style.setProperty("webkitTransform",
+ "translate3d(0px," + translateY + "px,0px)");
}
}
/**
* Note positive scrolltop moves layer up, positive translate moves layer
* down.
- *
+ *
* @param duration
*/
private void translateTo(int duration, final int fromY, final int finalY) {
@@ -621,8 +621,8 @@ public class TouchScrollDelegate implements NativePreviewHandler {
@Override
protected void onUpdate(double progress) {
- lastAnimatedTranslateY = (fromY + (finalY - fromY)
- * progress);
+ lastAnimatedTranslateY = (fromY
+ + (finalY - fromY) * progress);
translateTo(lastAnimatedTranslateY);
}
@@ -651,8 +651,8 @@ public class TouchScrollDelegate implements NativePreviewHandler {
}
private int getMaxOverScroll() {
- return androidWithBrokenScrollTop ? 0 : scrolledElement
- .getClientHeight() / 3;
+ return androidWithBrokenScrollTop ? 0
+ : scrolledElement.getClientHeight() / 3;
}
private int getMaxFinalY() {
@@ -713,7 +713,7 @@ public class TouchScrollDelegate implements NativePreviewHandler {
/**
* long calcucation are not very efficient in GWT, so this helper method
* returns timestamp in double.
- *
+ *
* @return
*/
public static double getTimeStamp() {
diff --git a/client/src/main/java/com/vaadin/client/ui/TreeAction.java b/client/src/main/java/com/vaadin/client/ui/TreeAction.java
index f190ab62d2..222c0f8108 100644
--- a/client/src/main/java/com/vaadin/client/ui/TreeAction.java
+++ b/client/src/main/java/com/vaadin/client/ui/TreeAction.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -38,9 +38,9 @@ public class TreeAction extends Action {
* Sends message to server that this action has been fired. Messages are
* "standard" Vaadin messages whose value is comma separated pair of
* targetKey (row, treeNod ...) and actions id.
- *
+ *
* Variablename is always "action".
- *
+ *
* Actions are always sent immediatedly to server.
*/
@Override
diff --git a/client/src/main/java/com/vaadin/client/ui/UnknownComponentConnector.java b/client/src/main/java/com/vaadin/client/ui/UnknownComponentConnector.java
index 50ded0aeba..bb06aa3507 100644
--- a/client/src/main/java/com/vaadin/client/ui/UnknownComponentConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/UnknownComponentConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,17 +31,13 @@ public class UnknownComponentConnector extends AbstractComponentConnector {
}
public void setServerSideClassName(String serverClassName) {
- getWidget()
- .setCaption(
- "Widgetset '"
- + GWT.getModuleName()
- + "' does not contain implementation for "
- + serverClassName
- + ". Check its component connector's @Connect mapping, widgetsets "
- + "GWT module description file and re-compile your"
- + " widgetset. In case you have downloaded a vaadin"
- + " add-on package, you might want to refer to "
- + "<a href='http://vaadin.com/using-addons'>add-on "
- + "instructions</a>.");
+ getWidget().setCaption("Widgetset '" + GWT.getModuleName()
+ + "' does not contain implementation for " + serverClassName
+ + ". Check its component connector's @Connect mapping, widgetsets "
+ + "GWT module description file and re-compile your"
+ + " widgetset. In case you have downloaded a vaadin"
+ + " add-on package, you might want to refer to "
+ + "<a href='http://vaadin.com/using-addons'>add-on "
+ + "instructions</a>.");
}
}
diff --git a/client/src/main/java/com/vaadin/client/ui/VAbsoluteLayout.java b/client/src/main/java/com/vaadin/client/ui/VAbsoluteLayout.java
index 44230288a7..880463dfa3 100644
--- a/client/src/main/java/com/vaadin/client/ui/VAbsoluteLayout.java
+++ b/client/src/main/java/com/vaadin/client/ui/VAbsoluteLayout.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -53,7 +53,7 @@ public class VAbsoluteLayout extends ComplexPanel {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.user.client.ui.Panel#add(com.google.gwt.user.client.ui
* .Widget)
@@ -67,7 +67,7 @@ public class VAbsoluteLayout extends ComplexPanel {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.user.client.ui.ComplexPanel#remove(com.google.gwt.user
* .client.ui.Widget)
@@ -84,7 +84,7 @@ public class VAbsoluteLayout extends ComplexPanel {
/**
* Does this layout contain a widget
- *
+ *
* @param widget
* The widget to check
* @return Returns true if the widget is in this layout, false if not
@@ -95,7 +95,7 @@ public class VAbsoluteLayout extends ComplexPanel {
/*
* (non-Javadoc)
- *
+ *
* @see com.google.gwt.user.client.ui.ComplexPanel#getWidget(int)
*/
@Override
@@ -115,7 +115,7 @@ public class VAbsoluteLayout extends ComplexPanel {
/*
* (non-Javadoc)
- *
+ *
* @see com.google.gwt.user.client.ui.ComplexPanel#getWidgetCount()
*/
@Override
@@ -131,7 +131,7 @@ public class VAbsoluteLayout extends ComplexPanel {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.user.client.ui.ComplexPanel#getWidgetIndex(com.google.
* gwt.user.client.ui.Widget)
@@ -153,7 +153,7 @@ public class VAbsoluteLayout extends ComplexPanel {
/**
* Sets a caption for a contained widget
- *
+ *
* @param child
* The child widget to set the caption for
* @param caption
@@ -178,7 +178,7 @@ public class VAbsoluteLayout extends ComplexPanel {
/**
* Set the position of the widget in the layout. The position is a CSS
* property string using properties such as top,left,right,top
- *
+ *
* @param child
* The child widget to set the position for
* @param position
@@ -193,7 +193,7 @@ public class VAbsoluteLayout extends ComplexPanel {
/**
* Get the caption for a widget
- *
+ *
* @param child
* The child widget to get the caption of
*/
@@ -207,7 +207,7 @@ public class VAbsoluteLayout extends ComplexPanel {
/**
* Get the pixel width of an slot in the layout
- *
+ *
* @param child
* The widget in the layout.
* @return Returns the size in pixels, or 0 if child is not in the layout
@@ -222,7 +222,7 @@ public class VAbsoluteLayout extends ComplexPanel {
/**
* Get the pixel height of an slot in the layout
- *
+ *
* @param child
* The widget in the layout
* @return Returns the size in pixels, or 0 if the child is not in the
@@ -238,7 +238,7 @@ public class VAbsoluteLayout extends ComplexPanel {
/**
* Get the wrapper for a widget
- *
+ *
* @param child
* The child to get the wrapper for
* @return
@@ -257,7 +257,7 @@ public class VAbsoluteLayout extends ComplexPanel {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.user.client.ui.UIObject#setStylePrimaryName(java.lang.
* String)
@@ -269,7 +269,7 @@ public class VAbsoluteLayout extends ComplexPanel {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.user.client.ui.UIObject#setStyleName(java.lang.String)
*/
@@ -282,7 +282,7 @@ public class VAbsoluteLayout extends ComplexPanel {
/**
* Updates all style names contained in the layout
- *
+ *
* @param primaryStyleName
* The style name to use as primary
*/
@@ -347,13 +347,14 @@ public class VAbsoluteLayout extends ComplexPanel {
/**
* Sets style names for the wrapper wrapping the widget in the layout. The
* style names will be prefixed with v-absolutelayout-wrapper.
- *
+ *
* @param widget
* The widget which wrapper we want to add the stylenames to
* @param stylenames
* The style names that should be added to the wrapper
*/
- public void setWidgetWrapperStyleNames(Widget widget, String... stylenames) {
+ public void setWidgetWrapperStyleNames(Widget widget,
+ String... stylenames) {
AbsoluteWrapper wrapper = getChildWrapper(widget);
if (wrapper == null) {
throw new IllegalArgumentException(
@@ -378,7 +379,7 @@ public class VAbsoluteLayout extends ComplexPanel {
/**
* Constructor
- *
+ *
* @param child
* The child to wrap
*/
@@ -395,7 +396,7 @@ public class VAbsoluteLayout extends ComplexPanel {
/**
* Set the caption for the wrapper
- *
+ *
* @param caption
* The caption for the wrapper
*/
@@ -420,7 +421,7 @@ public class VAbsoluteLayout extends ComplexPanel {
/**
* Set the position for the wrapper in the layout
- *
+ *
* @param position
* The position string
*/
@@ -474,15 +475,15 @@ public class VAbsoluteLayout extends ComplexPanel {
Style style = caption.getElement().getStyle();
style.setProperty("position", "absolute");
style.setPropertyPx("left", getElement().getOffsetLeft());
- style.setPropertyPx("top", getElement().getOffsetTop()
- - caption.getHeight());
+ style.setPropertyPx("top",
+ getElement().getOffsetTop() - caption.getHeight());
}
}
/**
* Sets the style names of the wrapper. Will be prefixed with the
* v-absolutelayout-wrapper prefix
- *
+ *
* @param stylenames
* The wrapper style names
*/
@@ -495,8 +496,8 @@ public class VAbsoluteLayout extends ComplexPanel {
* Updates the style names using the primary style name as prefix
*/
protected void updateStyleNames() {
- setStyleName(VAbsoluteLayout.this.getStylePrimaryName()
- + "-wrapper");
+ setStyleName(
+ VAbsoluteLayout.this.getStylePrimaryName() + "-wrapper");
if (extraStyleNames != null) {
for (String stylename : extraStyleNames) {
addStyleDependentName(stylename);
diff --git a/client/src/main/java/com/vaadin/client/ui/VAbstractSplitPanel.java b/client/src/main/java/com/vaadin/client/ui/VAbstractSplitPanel.java
index 6c11783d34..06a773e0eb 100644
--- a/client/src/main/java/com/vaadin/client/ui/VAbstractSplitPanel.java
+++ b/client/src/main/java/com/vaadin/client/ui/VAbstractSplitPanel.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -252,18 +252,17 @@ public abstract class VAbstractSplitPanel extends ComplexPanel {
/**
* Converts given split position string (in pixels or percentage) to a
* floating point pixel value.
- *
+ *
* @param pos
* @return
*/
private float convertToPixels(String pos) {
float posAsFloat;
if (pos.indexOf("%") > 0) {
- posAsFloat = Math.round(Float.parseFloat(pos.substring(0,
- pos.length() - 1))
- / 100
- * (orientation == Orientation.HORIZONTAL ? getOffsetWidth()
- : getOffsetHeight()));
+ posAsFloat = Math
+ .round(Float.parseFloat(pos.substring(0, pos.length() - 1))
+ / 100 * (orientation == Orientation.HORIZONTAL
+ ? getOffsetWidth() : getOffsetHeight()));
} else {
posAsFloat = Float.parseFloat(pos.substring(0, pos.length() - 2));
}
@@ -273,16 +272,16 @@ public abstract class VAbstractSplitPanel extends ComplexPanel {
/**
* Converts given split position string (in pixels or percentage) to a float
* percentage value.
- *
+ *
* @param pos
* @return
*/
private float convertToPercentage(String pos) {
if (pos.endsWith("px")) {
- float pixelPosition = Float.parseFloat(pos.substring(0,
- pos.length() - 2));
- int offsetLength = orientation == Orientation.HORIZONTAL ? getOffsetWidth()
- : getOffsetHeight();
+ float pixelPosition = Float
+ .parseFloat(pos.substring(0, pos.length() - 2));
+ int offsetLength = orientation == Orientation.HORIZONTAL
+ ? getOffsetWidth() : getOffsetHeight();
// Take splitter size into account at the edge
if (pixelPosition + getSplitterSize() >= offsetLength) {
@@ -299,9 +298,9 @@ public abstract class VAbstractSplitPanel extends ComplexPanel {
/**
* Returns the given position clamped to the range between current minimum
* and maximum positions.
- *
+ *
* TODO Should this be in the connector?
- *
+ *
* @param pos
* Position of the splitter as a CSS string, either pixels or a
* percentage.
@@ -324,7 +323,7 @@ public abstract class VAbstractSplitPanel extends ComplexPanel {
/**
* Converts given string to the same units as the split position is.
- *
+ *
* @param pos
* position to be converted
* @return converted position string
@@ -359,8 +358,8 @@ public abstract class VAbstractSplitPanel extends ComplexPanel {
if (pos.indexOf("%") > 0) {
int size = orientation == Orientation.HORIZONTAL ? getOffsetWidth()
: getOffsetHeight();
- float percentage = Float.parseFloat(pos.substring(0,
- pos.length() - 1));
+ float percentage = Float
+ .parseFloat(pos.substring(0, pos.length() - 1));
pos = percentage / 100 * size + "px";
}
@@ -419,7 +418,8 @@ public abstract class VAbstractSplitPanel extends ComplexPanel {
}
firstContainer.getStyle().setHeight(pixelPosition, Unit.PX);
- int secondContainerHeight = (wholeSize - pixelPosition - getSplitterSize());
+ int secondContainerHeight = (wholeSize - pixelPosition
+ - getSplitterSize());
if (secondContainerHeight < 0) {
secondContainerHeight = 0;
}
@@ -468,7 +468,8 @@ public abstract class VAbstractSplitPanel extends ComplexPanel {
}
firstContainer.getStyle().setWidth(pixelPosition, Unit.PX);
- int secondContainerWidth = (wholeSize - pixelPosition - getSplitterSize());
+ int secondContainerWidth = (wholeSize - pixelPosition
+ - getSplitterSize());
if (secondContainerWidth < 0) {
secondContainerWidth = 0;
}
@@ -605,21 +606,21 @@ public abstract class VAbstractSplitPanel extends ComplexPanel {
/**
* Called when starting drag resize
- *
+ *
* @since 7.5.1
*/
abstract protected void startResize();
/**
* Called when stopping drag resize
- *
+ *
* @since 7.5.1
*/
abstract protected void stopResize();
/**
* Gets the first container
- *
+ *
* @since 7.5.1
* @return the firstContainer
*/
@@ -629,7 +630,7 @@ public abstract class VAbstractSplitPanel extends ComplexPanel {
/**
* Gets the second container
- *
+ *
* @since 7.5.1
* @return the secondContainer
*/
@@ -732,8 +733,8 @@ public abstract class VAbstractSplitPanel extends ComplexPanel {
public interface SplitterMoveHandler extends EventHandler {
public void splitterMoved(SplitterMoveEvent event);
- public static class SplitterMoveEvent extends
- GwtEvent<SplitterMoveHandler> {
+ public static class SplitterMoveEvent
+ extends GwtEvent<SplitterMoveHandler> {
public static final Type<SplitterMoveHandler> TYPE = new Type<SplitterMoveHandler>();
@@ -784,7 +785,7 @@ public abstract class VAbstractSplitPanel extends ComplexPanel {
/**
* A dragging curtain is required in Gecko and Webkit.
- *
+ *
* @return true if the browser requires a dragging curtain
*/
private boolean isDraggingCurtainRequired() {
@@ -836,8 +837,8 @@ public abstract class VAbstractSplitPanel extends ComplexPanel {
secondContainer.setClassName(secondContainerClass);
for (String styleName : componentStyleNames) {
- splitter.addClassName(splitterClass + "-" + styleName
- + lockedSuffix);
+ splitter.addClassName(
+ splitterClass + "-" + styleName + lockedSuffix);
firstContainer.addClassName(firstContainerClass + "-" + styleName);
secondContainer
.addClassName(secondContainerClass + "-" + styleName);
diff --git a/client/src/main/java/com/vaadin/client/ui/VAccordion.java b/client/src/main/java/com/vaadin/client/ui/VAccordion.java
index afc66d0f7b..0e202c3153 100644
--- a/client/src/main/java/com/vaadin/client/ui/VAccordion.java
+++ b/client/src/main/java/com/vaadin/client/ui/VAccordion.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -151,8 +151,8 @@ public class VAccordion extends VTabsheetBase {
addStyleDependentName("loading");
- connector.getRpcProxy(TabsheetServerRpc.class).setSelected(
- tabKeys.get(index).toString());
+ connector.getRpcProxy(TabsheetServerRpc.class)
+ .setSelected(tabKeys.get(index).toString());
}
}
@@ -210,7 +210,7 @@ public class VAccordion extends VTabsheetBase {
/**
* Returns caption width including padding
- *
+ *
* @return
*/
public int getCaptionWidth() {
@@ -333,10 +333,10 @@ public class VAccordion extends VTabsheetBase {
/**
* Updates the content of the open tab of the accordion.
- *
+ *
* This method is mostly for internal use and may change in future
* versions.
- *
+ *
* @since 7.2
* @param newWidget
* new content
@@ -361,13 +361,11 @@ public class VAccordion extends VTabsheetBase {
public void updateCaption(TabState tabState) {
// TODO need to call this because the caption does not have an owner
caption.setCaptionAsHtml(isTabCaptionsAsHtml());
- caption.updateCaptionWithoutOwner(
- tabState.caption,
- !tabState.enabled,
- hasAttribute(tabState.description),
+ caption.updateCaptionWithoutOwner(tabState.caption,
+ !tabState.enabled, hasAttribute(tabState.description),
hasAttribute(tabState.componentError),
- connector.getResourceUrl(ComponentConstants.ICON_RESOURCE
- + tabState.key));
+ connector.getResourceUrl(
+ ComponentConstants.ICON_RESOURCE + tabState.key));
}
private boolean hasAttribute(String string) {
@@ -376,7 +374,7 @@ public class VAccordion extends VTabsheetBase {
/**
* Updates a tabs stylename from the child UIDL
- *
+ *
* @param uidl
* The child uidl of the tab
*/
diff --git a/client/src/main/java/com/vaadin/client/ui/VAudio.java b/client/src/main/java/com/vaadin/client/ui/VAudio.java
index 109e4d65b0..f77a74fd06 100644
--- a/client/src/main/java/com/vaadin/client/ui/VAudio.java
+++ b/client/src/main/java/com/vaadin/client/ui/VAudio.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/VBrowserFrame.java b/client/src/main/java/com/vaadin/client/ui/VBrowserFrame.java
index 2c4011e87d..d6ecda6425 100644
--- a/client/src/main/java/com/vaadin/client/ui/VBrowserFrame.java
+++ b/client/src/main/java/com/vaadin/client/ui/VBrowserFrame.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -40,7 +40,7 @@ public class VBrowserFrame extends Widget {
/**
* Always creates new iframe inside widget. Will replace previous iframe.
- *
+ *
* @return
*/
protected IFrameElement createIFrameElement(String src) {
@@ -109,7 +109,7 @@ public class VBrowserFrame extends Widget {
/**
* Set the source (the "src" attribute) of iframe. Will replace old iframe
* with new.
- *
+ *
* @param source
* Source of iframe.
*/
diff --git a/client/src/main/java/com/vaadin/client/ui/VButton.java b/client/src/main/java/com/vaadin/client/ui/VButton.java
index 2eb967c4fa..e3d8908c9d 100644
--- a/client/src/main/java/com/vaadin/client/ui/VButton.java
+++ b/client/src/main/java/com/vaadin/client/ui/VButton.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -138,14 +138,14 @@ public class VButton extends FocusWidget implements ClickHandler {
@Override
/*
* Copy-pasted from GWT CustomButton, some minor modifications done:
- *
+ *
* -for IE/Opera added CLASSNAME_PRESSED
- *
+ *
* -event.preventDefault() removed from ONMOUSEDOWN (Firefox won't apply
* :active styles if it is present)
- *
+ *
* -Tooltip event handling added
- *
+ *
* -onload event handler added (for icon handling)
*/
public void onBrowserEvent(Event event) {
@@ -168,8 +168,8 @@ public class VButton extends FocusWidget implements ClickHandler {
boolean isPhantomClickPossible = BrowserInfo.get().isSafari()
&& BrowserInfo.get().isTouchDevice()
&& BrowserInfo.get().getBrowserMajorVersion() == 8;
- long clickTime = isPhantomClickPossible ? System
- .currentTimeMillis() : 0;
+ long clickTime = isPhantomClickPossible ? System.currentTimeMillis()
+ : 0;
// If clicks are currently disallowed or phantom, keep it from
// bubbling or being passed to the superclass.
if (disallowNextClick || isPhantomClickPossible
@@ -251,8 +251,10 @@ public class VButton extends FocusWidget implements ClickHandler {
case Event.ONMOUSEOUT:
if (isTargetInsideButton(event)) {
if (clickPending
- && Math.abs(mousedownX - event.getClientX()) < MOVE_THRESHOLD
- && Math.abs(mousedownY - event.getClientY()) < MOVE_THRESHOLD) {
+ && Math.abs(mousedownX
+ - event.getClientX()) < MOVE_THRESHOLD
+ && Math.abs(mousedownY
+ - event.getClientY()) < MOVE_THRESHOLD) {
onClick();
break;
}
@@ -330,7 +332,7 @@ public class VButton extends FocusWidget implements ClickHandler {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.ClickHandler#onClick(com.google.gwt.event
* .dom.client.ClickEvent)
@@ -382,7 +384,7 @@ public class VButton extends FocusWidget implements ClickHandler {
/**
* Sets whether this button is enabled.
- *
+ *
* @param enabled
* <code>true</code> to enable the button, <code>false</code> to
* disable it
@@ -447,7 +449,7 @@ public class VButton extends FocusWidget implements ClickHandler {
// Revert the changed values
elem.style.left = left;
elem.runtimeStyle.left = rsLeft;
-
+
return ret;
}
@@ -466,7 +468,7 @@ public class VButton extends FocusWidget implements ClickHandler {
ret += parseInt(value.substr(0, value.length-2));
}
}
-
+
// Padding -------------------------------------------------------
value = elem.currentStyle["padding"+side];
if ( !/^\d+(px)?$/i.test( value ) && /^\d/.test( value ) ) {
diff --git a/client/src/main/java/com/vaadin/client/ui/VCalendar.java b/client/src/main/java/com/vaadin/client/ui/VCalendar.java
index 08d4351931..2c600d2bb9 100644
--- a/client/src/main/java/com/vaadin/client/ui/VCalendar.java
+++ b/client/src/main/java/com/vaadin/client/ui/VCalendar.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -45,7 +45,7 @@ import com.vaadin.shared.ui.calendar.DateConstants;
/**
* Client side implementation for Calendar
- *
+ *
* @since 7.1
* @author Vaadin Ltd.
*/
@@ -106,7 +106,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
public interface DateClickListener {
/**
* Triggered when a date was clicked
- *
+ *
* @param date
* The date and time that was clicked
*/
@@ -119,7 +119,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
public interface WeekClickListener {
/**
* Called when a week number was selected.
- *
+ *
* @param event
* The format of the vent string is "<year>w<week>"
*/
@@ -156,9 +156,9 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Called when a user selected a new event by highlighting an area of
* the calendar.
- *
+ *
* FIXME Fix the value nonsense.
- *
+ *
* @param value
* The format of the value string is
* "<year>:<start-minutes>:<end-minutes>" if called from the
@@ -174,7 +174,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
public interface EventClickListener {
/**
* Called when an event was clicked
- *
+ *
* @param event
* The event that was clicked
*/
@@ -189,7 +189,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Triggered when an event was dragged to a new position and the start
* and end dates was changed
- *
+ *
* @param event
* The event that was moved
*/
@@ -203,7 +203,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
public interface EventResizeListener {
/**
* Triggers when the time limits for the event was changed.
- *
+ *
* @param event
* The event that was changed. The new time limits have been
* updated in the event before calling this method
@@ -217,7 +217,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
public interface ScrollListener {
/**
* Triggered when the calendar is scrolled
- *
+ *
* @param scrollPosition
* The scroll position in pixels as returned by
* {@link ScrollPanel#getScrollPosition()}
@@ -231,10 +231,10 @@ public class VCalendar extends Composite implements VHasDropHandler {
public interface MouseEventListener {
/**
* Triggered when a user wants an context menu
- *
+ *
* @param event
* The context menu event
- *
+ *
* @param widget
* The widget that the context menu should be added to
*/
@@ -253,7 +253,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Hack for IE to not select text when dragging.
- *
+ *
* @param e
* The element to apply the hack on
*/
@@ -292,13 +292,13 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Adds events to the month grid
- *
+ *
* @param events
* The events to add
* @param drawImmediately
* Should the grid be rendered immediately. (currently not in
* use)
- *
+ *
*/
public void updateEventsToMonthGrid(Collection<CalendarEvent> events,
boolean drawImmediately) {
@@ -308,7 +308,8 @@ public class VCalendar extends Composite implements VHasDropHandler {
}
}
- private void addEventToMonthGrid(CalendarEvent e, boolean renderImmediately) {
+ private void addEventToMonthGrid(CalendarEvent e,
+ boolean renderImmediately) {
Date when = e.getStart();
Date to = e.getEnd();
boolean eventAdded = false;
@@ -374,7 +375,8 @@ public class VCalendar extends Composite implements VHasDropHandler {
&& from.getDay() != to.getDay() && isMidnight(endTime)));
}
- private void updateEventSlotIndex(CalendarEvent e, List<SimpleDayCell> cells) {
+ private void updateEventSlotIndex(CalendarEvent e,
+ List<SimpleDayCell> cells) {
if (cells.isEmpty()) {
return;
}
@@ -424,10 +426,10 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Remove a month event from the view
- *
+ *
* @param target
* The event to remove
- *
+ *
* @param repaintImmediately
* Should we repaint after the event was removed?
*/
@@ -437,8 +439,8 @@ public class VCalendar extends Composite implements VHasDropHandler {
// Remove event
for (int row = 0; row < monthGrid.getRowCount(); row++) {
for (int cell = 0; cell < monthGrid.getCellCount(row); cell++) {
- SimpleDayCell sdc = (SimpleDayCell) monthGrid.getWidget(
- row, cell);
+ SimpleDayCell sdc = (SimpleDayCell) monthGrid.getWidget(row,
+ cell);
if (sdc == null) {
return;
}
@@ -450,7 +452,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Updates an event in the month grid
- *
+ *
* @param changedEvent
* The event that has changed
*/
@@ -462,12 +464,13 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Sort the event by how long they are
- *
+ *
* @param events
* The events to sort
* @return An array where the events has been sorted
*/
- public CalendarEvent[] sortEventsByDuration(Collection<CalendarEvent> events) {
+ public CalendarEvent[] sortEventsByDuration(
+ Collection<CalendarEvent> events) {
CalendarEvent[] sorted = events
.toArray(new CalendarEvent[events.size()]);
Arrays.sort(sorted, getEventComparator());
@@ -489,7 +492,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Re-render the week grid
- *
+ *
* @param daysCount
* The amount of days to include in the week
* @param days
@@ -541,11 +544,11 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Updates the events in the Month view
- *
+ *
* @param daysCount
* How many days there are
* @param daysUidl
- *
+ *
* @param today
* Todays date
*/
@@ -649,13 +652,13 @@ public class VCalendar extends Composite implements VHasDropHandler {
monthGrid.updateCellSizes(intWidth - weekToolbar.getOffsetWidth(),
intHeight - nameToolbar.getOffsetHeight());
- weekToolbar.setHeightPX((intHeight == -1) ? intHeight : intHeight
- - nameToolbar.getOffsetHeight());
+ weekToolbar.setHeightPX((intHeight == -1) ? intHeight
+ : intHeight - nameToolbar.getOffsetHeight());
} else if (weekGrid != null) {
- weekGrid.setHeightPX((intHeight == -1) ? intHeight : intHeight
- - weeklyLongEvents.getOffsetHeight()
- - dayToolbar.getOffsetHeight());
+ weekGrid.setHeightPX((intHeight == -1) ? intHeight
+ : intHeight - weeklyLongEvents.getOffsetHeight()
+ - dayToolbar.getOffsetHeight());
}
}
@@ -669,8 +672,8 @@ public class VCalendar extends Composite implements VHasDropHandler {
if (monthGrid != null) {
monthGrid.updateCellSizes(
- intWidth - weekToolbar.getOffsetWidth(), intHeight
- - nameToolbar.getOffsetHeight());
+ intWidth - weekToolbar.getOffsetWidth(),
+ intHeight - nameToolbar.getOffsetHeight());
} else if (weekGrid != null) {
weekGrid.setWidthPX(intWidth);
weeklyLongEvents.setWidthPX(weekGrid.getInternalWidth());
@@ -695,7 +698,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Get the date format used to format dates only (excludes time)
- *
+ *
* @return
*/
public DateTimeFormat getDateFormat() {
@@ -704,7 +707,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Get the time format used to format time only (excludes date)
- *
+ *
* @return
*/
public DateTimeFormat getTimeFormat() {
@@ -717,7 +720,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Get the date and time format to format the dates (includes both date and
* time)
- *
+ *
* @return
*/
public DateTimeFormat getDateTimeFormat() {
@@ -726,7 +729,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Is the calendar either disabled or readonly
- *
+ *
* @return
*/
public boolean isDisabledOrReadOnly() {
@@ -742,7 +745,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Is the component disabled
- *
+ *
* @param disabled
* True if disabled
*/
@@ -759,7 +762,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Is the component read-only
- *
+ *
* @param readOnly
* True if component is readonly
*/
@@ -769,7 +772,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Get the month grid component
- *
+ *
* @return
*/
public MonthGrid getMonthGrid() {
@@ -778,7 +781,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Get he week grid component
- *
+ *
* @return
*/
public WeekGrid getWeekGrid() {
@@ -788,7 +791,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Calculates correct size for all cells (size / amount of cells ) and
* distributes any overflow over all the cells.
- *
+ *
* @param totalSize
* the total amount of size reserved for all cells
* @param numberOfCells
@@ -826,7 +829,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Returns a comparator which can compare calendar events.
- *
+ *
* @return
*/
public static Comparator<CalendarEvent> getEventComparator() {
@@ -846,8 +849,9 @@ public class VCalendar extends Composite implements VHasDropHandler {
int r = 0;
if (!d1.equals(0L) && !d2.equals(0L)) {
r = d2.compareTo(d1);
- return (r == 0) ? ((Integer) o2.getIndex()).compareTo(o1
- .getIndex()) : r;
+ return (r == 0)
+ ? ((Integer) o2.getIndex()).compareTo(o1.getIndex())
+ : r;
}
if (d2.equals(0L) && d1.equals(0L)) {
@@ -862,29 +866,30 @@ public class VCalendar extends Composite implements VHasDropHandler {
return -1;
}
r = d2.compareTo(d1);
- return (r == 0) ? ((Integer) o2.getIndex()).compareTo(o1
- .getIndex()) : r;
+ return (r == 0)
+ ? ((Integer) o2.getIndex()).compareTo(o1.getIndex())
+ : r;
}
};
}
/**
* Is the date at midnight
- *
+ *
* @param date
* The date to check
- *
+ *
* @return
*/
@SuppressWarnings("deprecation")
public static boolean isMidnight(Date date) {
- return (date.getHours() == 0 && date.getMinutes() == 0 && date
- .getSeconds() == 0);
+ return (date.getHours() == 0 && date.getMinutes() == 0
+ && date.getSeconds() == 0);
}
/**
* Are the dates equal (uses second resolution)
- *
+ *
* @param date1
* The first the to compare
* @param date2
@@ -902,7 +907,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Is the calendar event zero seconds long and is occurring at midnight
- *
+ *
* @param event
* The event to check
* @return
@@ -914,7 +919,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Should the 24h time format be used
- *
+ *
* @param format
* True if the 24h format should be used else the 12h format is
* used
@@ -932,7 +937,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Set the names of the week days
- *
+ *
* @param names
* The names of the days (Monday, Thursday,...)
*/
@@ -950,7 +955,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Set the names of the months
- *
+ *
* @param names
* The names of the months (January, February,...)
*/
@@ -968,7 +973,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Set the number when a week starts
- *
+ *
* @param dayNumber
* The number of the day
*/
@@ -986,7 +991,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Set the number when a week ends
- *
+ *
* @param dayNumber
* The number of the day
*/
@@ -1004,7 +1009,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Set the number when a week starts
- *
+ *
* @param dayNumber
* The number of the day
*/
@@ -1022,7 +1027,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Set the number when a week ends
- *
+ *
* @param dayNumber
* The number of the day
*/
@@ -1040,7 +1045,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Re-renders the whole week view
- *
+ *
* @param scroll
* The amount of pixels to scroll the week view
* @param today
@@ -1090,7 +1095,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Re-renders the whole month view
- *
+ *
* @param firstDayOfWeek
* The first day of the week
* @param today
@@ -1102,9 +1107,8 @@ public class VCalendar extends Composite implements VHasDropHandler {
* @param days
* The day information
*/
- public void updateMonthView(int firstDayOfWeek, Date today,
- int daysInMonth, Collection<CalendarEvent> events,
- List<CalendarDay> days) {
+ public void updateMonthView(int firstDayOfWeek, Date today, int daysInMonth,
+ Collection<CalendarEvent> events, List<CalendarDay> days) {
// Remove all week numbers from bar
while (outer.getWidgetCount() > 0) {
@@ -1152,7 +1156,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Sets the listener for listening to event clicks
- *
+ *
* @param listener
* The listener to use
*/
@@ -1162,7 +1166,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Gets the listener for listening to event clicks
- *
+ *
* @return
*/
public DateClickListener getDateClickListener() {
@@ -1173,7 +1177,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Set the listener which listens to forward events from the calendar
- *
+ *
* @param listener
* The listener to use
*/
@@ -1183,7 +1187,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Get the listener which listens to forward events from the calendar
- *
+ *
* @return
*/
public ForwardListener getForwardListener() {
@@ -1194,7 +1198,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Set the listener which listens to backward events from the calendar
- *
+ *
* @param listener
* The listener to use
*/
@@ -1204,7 +1208,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Set the listener which listens to backward events from the calendar
- *
+ *
* @return
*/
public BackwardListener getBackwardListener() {
@@ -1215,7 +1219,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Set the listener that listens to user clicking on the week numbers
- *
+ *
* @param listener
* The listener to use
*/
@@ -1225,7 +1229,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Get the listener that listens to user clicking on the week numbers
- *
+ *
* @return
*/
public WeekClickListener getWeekClickListener() {
@@ -1237,7 +1241,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Set the listener that listens to the user highlighting a region in the
* calendar
- *
+ *
* @param listener
* The listener to use
*/
@@ -1248,7 +1252,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Get the listener that listens to the user highlighting a region in the
* calendar
- *
+ *
* @return
*/
public RangeSelectListener getRangeSelectListener() {
@@ -1266,7 +1270,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Set the listener that listens to the user clicking on the events
- *
+ *
* @param listener
* The listener to use
*/
@@ -1278,7 +1282,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Get the listener that listens to when event is dragged to a new location
- *
+ *
* @return
*/
public EventMovedListener getEventMovedListener() {
@@ -1287,7 +1291,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Set the listener that listens to when event is dragged to a new location
- *
+ *
* @param eventMovedListener
* The listener to use
*/
@@ -1299,7 +1303,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Get the listener that listens to when the calendar widget is scrolled
- *
+ *
* @return
*/
public ScrollListener getScrollListener() {
@@ -1308,7 +1312,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Set the listener that listens to when the calendar widget is scrolled
- *
+ *
* @param scrollListener
* The listener to use
*/
@@ -1321,7 +1325,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Get the listener that listens to when an events time limits are being
* adjusted
- *
+ *
* @return
*/
public EventResizeListener getEventResizeListener() {
@@ -1331,7 +1335,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Set the listener that listens to when an events time limits are being
* adjusted
- *
+ *
* @param eventResizeListener
* The listener to use
*/
@@ -1346,7 +1350,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Get the listener that listen to mouse events
- *
+ *
* @return
*/
public MouseEventListener getMouseEventListener() {
@@ -1355,7 +1359,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Set the listener that listen to mouse events
- *
+ *
* @param mouseEventListener
* The listener to use
*/
@@ -1372,7 +1376,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Set selecting a range allowed
- *
+ *
* @param rangeSelectAllowed
* Should selecting a range be allowed
*/
@@ -1382,7 +1386,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Is moving a range allowed
- *
+ *
* @return
*/
public boolean isRangeMoveAllowed() {
@@ -1391,7 +1395,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Is moving a range allowed
- *
+ *
* @param rangeMoveAllowed
* Is it allowed
*/
@@ -1408,7 +1412,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Is resizing an event allowed
- *
+ *
* @param eventResizeAllowed
* True if allowed false if not
*/
@@ -1425,7 +1429,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Is moving an event allowed
- *
+ *
* @param eventMoveAllowed
* True if moving is allowed, false if not
*/
@@ -1451,7 +1455,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.ui.dd.VHasDropHandler#getDropHandler()
*/
@Override
@@ -1461,7 +1465,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
/**
* Set the drop handler
- *
+ *
* @param dropHandler
* The drophandler to use
*/
@@ -1477,7 +1481,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
* false, the caption is rendered in the browser as plain text.
* <p>
* The default is false, i.e. to render that caption as plain text.
- *
+ *
* @param captionAsHtml
* true if the captions are rendered as HTML, false if rendered
* as plain text
@@ -1490,7 +1494,7 @@ public class VCalendar extends Composite implements VHasDropHandler {
* Checks whether event captions are rendered as HTML
* <p>
* The default is false, i.e. to render that caption as plain text.
- *
+ *
* @return true if the captions are rendered as HTML, false if rendered as
* plain text
*/
diff --git a/client/src/main/java/com/vaadin/client/ui/VCalendarPanel.java b/client/src/main/java/com/vaadin/client/ui/VCalendarPanel.java
index e1b906b6e4..4b3ebff766 100644
--- a/client/src/main/java/com/vaadin/client/ui/VCalendarPanel.java
+++ b/client/src/main/java/com/vaadin/client/ui/VCalendarPanel.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -132,7 +132,7 @@ public class VCalendarPanel extends FocusableFlexTable implements
private ClickHandler dayClickHandler = new ClickHandler() {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.ClickHandler#onClick(com.google.gwt
* .event.dom.client.ClickEvent)
@@ -231,14 +231,15 @@ public class VCalendarPanel extends FocusableFlexTable implements
/**
* Sets the focus to given date in the current view. Used when moving in the
* calendar with the keyboard.
- *
+ *
* @param date
* A Date representing the day of month to be focused. Must be
* one of the days currently visible.
*/
private void focusDay(Date date) {
// Only used when calender body is present
- if (resolution.getCalendarField() > Resolution.MONTH.getCalendarField()) {
+ if (resolution.getCalendarField() > Resolution.MONTH
+ .getCalendarField()) {
if (focusedDay != null) {
focusedDay.removeStyleDependentName(CN_FOCUSED);
}
@@ -266,17 +267,17 @@ public class VCalendarPanel extends FocusableFlexTable implements
/**
* Sets the selection highlight to a given day in the current view
- *
+ *
* @param date
* A Date representing the day of month to be selected. Must be
* one of the days currently visible.
- *
+ *
*/
private void selectDate(Date date) {
if (selectedDay != null) {
selectedDay.removeStyleDependentName(CN_SELECTED);
- Roles.getGridcellRole().removeAriaSelectedState(
- selectedDay.getElement());
+ Roles.getGridcellRole()
+ .removeAriaSelectedState(selectedDay.getElement());
}
int rowCount = days.getRowCount();
@@ -396,7 +397,7 @@ public class VCalendarPanel extends FocusableFlexTable implements
/**
* Builds the top buttons and current month and year header.
- *
+ *
* @param needsMonth
* Should the month buttons be visible?
*/
@@ -446,8 +447,8 @@ public class VCalendarPanel extends FocusableFlexTable implements
updateControlButtonRangeStyles(needsMonth);
- final String monthName = needsMonth ? getDateTimeService().getMonth(
- displayedMonth.getMonth()) : "";
+ final String monthName = needsMonth
+ ? getDateTimeService().getMonth(displayedMonth.getMonth()) : "";
final int year = displayedMonth.getYear() + 1900;
getFlexCellFormatter().setStyleName(0, 2,
@@ -461,9 +462,10 @@ public class VCalendarPanel extends FocusableFlexTable implements
getFlexCellFormatter().setStyleName(0, 1,
parent.getStylePrimaryName() + "-calendarpanel-prevmonth");
- setHTML(0, 2, "<span class=\"" + parent.getStylePrimaryName()
- + "-calendarpanel-month\">" + monthName + " " + year
- + "</span>");
+ setHTML(0, 2,
+ "<span class=\"" + parent.getStylePrimaryName()
+ + "-calendarpanel-month\">" + monthName + " " + year
+ + "</span>");
}
private void updateControlButtonRangeStyles(boolean needsMonth) {
@@ -520,7 +522,7 @@ public class VCalendarPanel extends FocusableFlexTable implements
* Returns whether ISO 8601 week numbers should be shown in the value
* selector or not. ISO 8601 defines that a week always starts with a Monday
* so the week numbers are only shown if this is the case.
- *
+ *
* @return true if week number should be shown, false otherwise
*/
public boolean isShowISOWeekNumbers() {
@@ -533,7 +535,7 @@ public class VCalendarPanel extends FocusableFlexTable implements
/**
* Checks inclusively whether a date is inside a range of dates or not.
- *
+ *
* @param date
* @return
*/
@@ -550,12 +552,13 @@ public class VCalendarPanel extends FocusableFlexTable implements
* day-basis. If the resolution is set to YEAR, only years are compared. So
* even if the range is set to one millisecond in next year, also next year
* will be included.
- *
+ *
* @param date
* @param minResolution
* @return
*/
- private boolean isAcceptedByRangeStart(Date date, Resolution minResolution) {
+ private boolean isAcceptedByRangeStart(Date date,
+ Resolution minResolution) {
assert (date != null);
// rangeStart == null means that we accept all values below rangeEnd
@@ -586,7 +589,7 @@ public class VCalendarPanel extends FocusableFlexTable implements
* day-basis. If the resolution is set to YEAR, only years are compared. So
* even if the range is set to one millisecond in next year, also next year
* will be included.
- *
+ *
* @param date
* @param minResolution
* @return
@@ -663,11 +666,9 @@ public class VCalendarPanel extends FocusableFlexTable implements
"v-first");
days.getFlexCellFormatter().setStyleName(headerRow,
firstWeekdayColumn, "");
- days.getRowFormatter()
- .addStyleName(
- headerRow,
- parent.getStylePrimaryName()
- + "-calendarpanel-weeknumbers");
+ days.getRowFormatter().addStyleName(headerRow,
+ parent.getStylePrimaryName()
+ + "-calendarpanel-weeknumbers");
} else {
days.getFlexCellFormatter().setStyleName(headerRow, weekColumn, "");
days.getFlexCellFormatter().setStyleName(headerRow,
@@ -692,9 +693,8 @@ public class VCalendarPanel extends FocusableFlexTable implements
days.setHTML(headerRow, firstWeekdayColumn + i, "");
}
- Roles.getColumnheaderRole().set(
- days.getCellFormatter().getElement(headerRow,
- firstWeekdayColumn + i));
+ Roles.getColumnheaderRole().set(days.getCellFormatter()
+ .getElement(headerRow, firstWeekdayColumn + i));
}
// Zero out hours, minutes, seconds, and milliseconds to compare dates
@@ -703,11 +703,11 @@ public class VCalendarPanel extends FocusableFlexTable implements
final Date today = new Date(tmp.getYear(), tmp.getMonth(),
tmp.getDate());
- final Date selectedDate = value == null ? null : new Date(
- value.getYear(), value.getMonth(), value.getDate());
+ final Date selectedDate = value == null ? null
+ : new Date(value.getYear(), value.getMonth(), value.getDate());
- final int startWeekDay = getDateTimeService().getStartWeekDay(
- displayedMonth);
+ final int startWeekDay = getDateTimeService()
+ .getStartWeekDay(displayedMonth);
final Date curr = (Date) displayedMonth.clone();
// Start from the first day of the week that at least partially belongs
// to the current month
@@ -721,8 +721,8 @@ public class VCalendarPanel extends FocusableFlexTable implements
Date dayDate = (Date) curr.clone();
Day day = new Day(dayDate);
- day.setStyleName(parent.getStylePrimaryName()
- + "-calendarpanel-day");
+ day.setStyleName(
+ parent.getStylePrimaryName() + "-calendarpanel-day");
if (!isDateInsideRange(dayDate, Resolution.DAY)) {
day.addStyleDependentName(CN_OUTSIDE_RANGE);
@@ -747,10 +747,10 @@ public class VCalendarPanel extends FocusableFlexTable implements
day.addStyleDependentName(CN_OFFMONTH);
}
- days.setWidget(weekOfMonth, firstWeekdayColumn + dayOfWeek, day);
- Roles.getGridcellRole().set(
- days.getCellFormatter().getElement(weekOfMonth,
- firstWeekdayColumn + dayOfWeek));
+ days.setWidget(weekOfMonth, firstWeekdayColumn + dayOfWeek,
+ day);
+ Roles.getGridcellRole().set(days.getCellFormatter().getElement(
+ weekOfMonth, firstWeekdayColumn + dayOfWeek));
// ISO week numbers if requested
days.getCellFormatter().setVisible(weekOfMonth, weekColumn,
@@ -763,9 +763,8 @@ public class VCalendarPanel extends FocusableFlexTable implements
int weekNumber = DateTimeService.getISOWeekNumber(curr);
- days.setHTML(weekOfMonth, 0, "<span class=\""
- + weekCssClass + "\"" + ">" + weekNumber
- + "</span>");
+ days.setHTML(weekOfMonth, 0, "<span class=\"" + weekCssClass
+ + "\"" + ">" + weekNumber + "</span>");
}
curr.setDate(curr.getDate() + 1);
}
@@ -774,7 +773,7 @@ public class VCalendarPanel extends FocusableFlexTable implements
/**
* Do we need the time selector
- *
+ *
* @return True if it is required
*/
private boolean isTimeSelectorNeeded() {
@@ -791,9 +790,9 @@ public class VCalendarPanel extends FocusableFlexTable implements
/**
* For internal use only. May be removed or replaced in the future.
- *
+ *
* Updates the calendar and text field with the selected dates.
- *
+ *
* @param updateDate
* The value false prevents setting the selected date of the
* calendar based on focusedDate. That can be used when only the
@@ -802,8 +801,8 @@ public class VCalendarPanel extends FocusableFlexTable implements
*/
public void renderCalendar(boolean updateDate) {
- super.setStylePrimaryName(parent.getStylePrimaryName()
- + "-calendarpanel");
+ super.setStylePrimaryName(
+ parent.getStylePrimaryName() + "-calendarpanel");
if (focusedDate == null) {
Date now = new Date();
@@ -813,14 +812,13 @@ public class VCalendarPanel extends FocusableFlexTable implements
displayedMonth = new FocusedDate(now.getYear(), now.getMonth(), 1);
}
- if (updateDate
- && getResolution().getCalendarField() <= Resolution.MONTH
- .getCalendarField() && focusChangeListener != null) {
+ if (updateDate && getResolution().getCalendarField() <= Resolution.MONTH
+ .getCalendarField() && focusChangeListener != null) {
focusChangeListener.focusChanged(new Date(focusedDate.getTime()));
}
- final boolean needsMonth = getResolution().getCalendarField() > Resolution.YEAR
- .getCalendarField();
+ final boolean needsMonth = getResolution()
+ .getCalendarField() > Resolution.YEAR.getCalendarField();
boolean needsBody = getResolution().getCalendarField() >= Resolution.DAY
.getCalendarField();
buildCalendarHeader(needsMonth);
@@ -901,7 +899,8 @@ public class VCalendarPanel extends FocusableFlexTable implements
// inside,
// correct it
if (!isDateInsideRange(requestedNextMonthDate, Resolution.DAY)) {
- requestedNextMonthDate = adjustDateToFitInsideRange(requestedNextMonthDate);
+ requestedNextMonthDate = adjustDateToFitInsideRange(
+ requestedNextMonthDate);
}
focusedDate.setTime(requestedNextMonthDate.getTime());
@@ -957,7 +956,8 @@ public class VCalendarPanel extends FocusableFlexTable implements
}
if (!isDateInsideRange(requestedPreviousMonthDate, Resolution.DAY)) {
- requestedPreviousMonthDate = adjustDateToFitInsideRange(requestedPreviousMonthDate);
+ requestedPreviousMonthDate = adjustDateToFitInsideRange(
+ requestedPreviousMonthDate);
}
focusedDate.setTime(requestedPreviousMonthDate.getTime());
displayedMonth.setMonth(displayedMonth.getMonth() - 1);
@@ -1051,12 +1051,12 @@ public class VCalendarPanel extends FocusableFlexTable implements
/**
* Handles a user click on the component
- *
+ *
* @param sender
* The component that was clicked
* @param updateVariable
* Should the value field be updated
- *
+ *
*/
private void processClickEvent(Widget sender) {
if (!isEnabled() || isReadonly()) {
@@ -1075,7 +1075,7 @@ public class VCalendarPanel extends FocusableFlexTable implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.KeyDownHandler#onKeyDown(com.google.gwt
* .event.dom.client.KeyDownEvent)
@@ -1087,7 +1087,7 @@ public class VCalendarPanel extends FocusableFlexTable implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.KeyPressHandler#onKeyPress(com.google
* .gwt.event.dom.client.KeyPressEvent)
@@ -1100,15 +1100,14 @@ public class VCalendarPanel extends FocusableFlexTable implements
/**
* Handles the keypress from both the onKeyPress event and the onKeyDown
* event
- *
+ *
* @param event
* The keydown/keypress event
*/
private void handleKeyPress(DomEvent<?> event) {
// Special handling for events from time ListBoxes.
- if (time != null
- && time.getElement().isOrHasChild(
- (Node) event.getNativeEvent().getEventTarget().cast())) {
+ if (time != null && time.getElement().isOrHasChild(
+ (Node) event.getNativeEvent().getEventTarget().cast())) {
int nativeKeyCode = event.getNativeEvent().getKeyCode();
if (nativeKeyCode == getSelectKey()) {
onSubmit(); // submit if enter key hit down on listboxes
@@ -1125,16 +1124,18 @@ public class VCalendarPanel extends FocusableFlexTable implements
// Check tabs
int keycode = event.getNativeEvent().getKeyCode();
- if (keycode == KeyCodes.KEY_TAB && event.getNativeEvent().getShiftKey()) {
+ if (keycode == KeyCodes.KEY_TAB
+ && event.getNativeEvent().getShiftKey()) {
if (onTabOut(event)) {
return;
}
}
// Handle the navigation
- if (handleNavigation(keycode, event.getNativeEvent().getCtrlKey()
- || event.getNativeEvent().getMetaKey(), event.getNativeEvent()
- .getShiftKey())) {
+ if (handleNavigation(keycode,
+ event.getNativeEvent().getCtrlKey()
+ || event.getNativeEvent().getMetaKey(),
+ event.getNativeEvent().getShiftKey())) {
event.preventDefault();
}
@@ -1160,7 +1161,7 @@ public class VCalendarPanel extends FocusableFlexTable implements
/**
* Handles the keyboard navigation when the resolution is set to years.
- *
+ *
* @param keycode
* The keycode to process
* @param ctrl
@@ -1218,7 +1219,7 @@ public class VCalendarPanel extends FocusableFlexTable implements
/**
* Handle the keyboard navigation when the resolution is set to MONTH
- *
+ *
* @param keycode
* The keycode to handle
* @param ctrl
@@ -1274,7 +1275,7 @@ public class VCalendarPanel extends FocusableFlexTable implements
/**
* Handle keyboard navigation what the resolution is set to DAY
- *
+ *
* @param keycode
* The keycode to handle
* @param ctrl
@@ -1380,7 +1381,7 @@ public class VCalendarPanel extends FocusableFlexTable implements
/**
* Handles the keyboard navigation
- *
+ *
* @param keycode
* The key code that was pressed
* @param ctrl
@@ -1390,7 +1391,8 @@ public class VCalendarPanel extends FocusableFlexTable implements
* @return Return true if key press was handled by the component, else
* return false
*/
- protected boolean handleNavigation(int keycode, boolean ctrl, boolean shift) {
+ protected boolean handleNavigation(int keycode, boolean ctrl,
+ boolean shift) {
if (!isEnabled() || isReadonly()) {
return false;
}
@@ -1417,7 +1419,7 @@ public class VCalendarPanel extends FocusableFlexTable implements
* Returns the reset key which will reset the calendar to the previous
* selection. By default this is backspace but it can be overriden to change
* the key to whatever you want.
- *
+ *
* @return
*/
protected int getResetKey() {
@@ -1428,7 +1430,7 @@ public class VCalendarPanel extends FocusableFlexTable implements
* Returns the select key which selects the value. By default this is the
* enter key but it can be changed to whatever you like by overriding this
* method.
- *
+ *
* @return
*/
protected int getSelectKey() {
@@ -1439,7 +1441,7 @@ public class VCalendarPanel extends FocusableFlexTable implements
* Returns the key that closes the popup window if this is a VPopopCalendar.
* Else this does nothing. By default this is the Escape key but you can
* change the key to whatever you want by overriding this method.
- *
+ *
* @return
*/
protected int getCloseKey() {
@@ -1450,7 +1452,7 @@ public class VCalendarPanel extends FocusableFlexTable implements
* The key that selects the next day in the calendar. By default this is the
* right arrow key but by overriding this method it can be changed to
* whatever you like.
- *
+ *
* @return
*/
protected int getForwardKey() {
@@ -1461,7 +1463,7 @@ public class VCalendarPanel extends FocusableFlexTable implements
* The key that selects the previous day in the calendar. By default this is
* the left arrow key but by overriding this method it can be changed to
* whatever you like.
- *
+ *
* @return
*/
protected int getBackwardKey() {
@@ -1472,7 +1474,7 @@ public class VCalendarPanel extends FocusableFlexTable implements
* The key that selects the next week in the calendar. By default this is
* the down arrow key but by overriding this method it can be changed to
* whatever you like.
- *
+ *
* @return
*/
protected int getNextKey() {
@@ -1483,7 +1485,7 @@ public class VCalendarPanel extends FocusableFlexTable implements
* The key that selects the previous week in the calendar. By default this
* is the up arrow key but by overriding this method it can be changed to
* whatever you like.
- *
+ *
* @return
*/
protected int getPreviousKey() {
@@ -1492,7 +1494,7 @@ public class VCalendarPanel extends FocusableFlexTable implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.MouseOutHandler#onMouseOut(com.google
* .gwt.event.dom.client.MouseOutEvent)
@@ -1506,7 +1508,7 @@ public class VCalendarPanel extends FocusableFlexTable implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.MouseDownHandler#onMouseDown(com.google
* .gwt.event.dom.client.MouseDownEvent)
@@ -1540,7 +1542,7 @@ public class VCalendarPanel extends FocusableFlexTable implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.MouseUpHandler#onMouseUp(com.google.gwt
* .event.dom.client.MouseUpEvent)
@@ -1554,7 +1556,7 @@ public class VCalendarPanel extends FocusableFlexTable implements
/**
* Adjusts a date to fit inside the range, only if outside
- *
+ *
* @param date
*/
private Date adjustDateToFitInsideRange(Date date) {
@@ -1568,7 +1570,7 @@ public class VCalendarPanel extends FocusableFlexTable implements
/**
* Sets the data of the Panel.
- *
+ *
* @param currentDate
* The date to set
*/
@@ -1580,7 +1582,8 @@ public class VCalendarPanel extends FocusableFlexTable implements
}
boolean currentDateWasAdjusted = false;
// Check that selected date is inside the allowed range
- if (currentDate != null && !isDateInsideRange(currentDate, resolution)) {
+ if (currentDate != null
+ && !isDateInsideRange(currentDate, resolution)) {
currentDate = adjustDateToFitInsideRange(currentDate);
currentDateWasAdjusted = true;
}
@@ -1595,9 +1598,9 @@ public class VCalendarPanel extends FocusableFlexTable implements
// If ranges enabled, we may need to focus on a different view to
// potentially not get stuck
if (rangeStart != null || rangeEnd != null) {
- Date dateThatFitsInsideRange = adjustDateToFitInsideRange(new Date());
- focusedDate = new FocusedDate(
- dateThatFitsInsideRange.getYear(),
+ Date dateThatFitsInsideRange = adjustDateToFitInsideRange(
+ new Date());
+ focusedDate = new FocusedDate(dateThatFitsInsideRange.getYear(),
dateThatFitsInsideRange.getMonth(),
dateThatFitsInsideRange.getDate());
displayedMonth = new FocusedDate(
@@ -1644,7 +1647,7 @@ public class VCalendarPanel extends FocusableFlexTable implements
/**
* TimeSelector is a widget consisting of list boxes that modifie the Date
* object that is given for.
- *
+ *
*/
public class VTime extends FlowPanel implements ChangeHandler {
@@ -1676,7 +1679,7 @@ public class VCalendarPanel extends FocusableFlexTable implements
/**
* Constructs the ListBoxes and updates their value
- *
+ *
* @param redraw
* Should new instances of the listboxes be created
*/
@@ -1857,7 +1860,7 @@ public class VCalendarPanel extends FocusableFlexTable implements
/*
* (non-Javadoc) VT
- *
+ *
* @see
* com.google.gwt.event.dom.client.ChangeHandler#onChange(com.google.gwt
* .event.dom.client.ChangeEvent)
@@ -1941,7 +1944,7 @@ public class VCalendarPanel extends FocusableFlexTable implements
/**
* If true should be returned if the panel will not be used after this
* event.
- *
+ *
* @param event
* @return
*/
@@ -1955,7 +1958,7 @@ public class VCalendarPanel extends FocusableFlexTable implements
/**
* A focus out listener is triggered when the panel loosed focus. This can
* happen either after a user clicks outside the panel or tabs out.
- *
+ *
* @param listener
* The listener to trigger
*/
@@ -1966,7 +1969,7 @@ public class VCalendarPanel extends FocusableFlexTable implements
/**
* The submit listener is called when the user selects a value from the
* calender either by clicking the day or selects it by keyboard.
- *
+ *
* @param submitListener
* The listener to trigger
*/
@@ -1977,7 +1980,7 @@ public class VCalendarPanel extends FocusableFlexTable implements
/**
* The given FocusChangeListener is notified when the focused date changes
* by user either clicking on a new date or by using the keyboard.
- *
+ *
* @param listener
* The FocusChangeListener to be notified
*/
@@ -1987,7 +1990,7 @@ public class VCalendarPanel extends FocusableFlexTable implements
/**
* The time change listener is triggered when the user changes the time.
- *
+ *
* @param listener
*/
public void setTimeChangeListener(TimeChangeListener listener) {
@@ -1996,7 +1999,7 @@ public class VCalendarPanel extends FocusableFlexTable implements
/**
* Returns the submit listener that listens to selection made from the panel
- *
+ *
* @return The listener or NULL if no listener has been set
*/
public SubmitListener getSubmitListener() {
@@ -2005,7 +2008,7 @@ public class VCalendarPanel extends FocusableFlexTable implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.BlurHandler#onBlur(com.google.gwt.event
* .dom.client.BlurEvent)
@@ -2020,7 +2023,7 @@ public class VCalendarPanel extends FocusableFlexTable implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.FocusHandler#onFocus(com.google.gwt.event
* .dom.client.FocusEvent)
@@ -2054,7 +2057,8 @@ public class VCalendarPanel extends FocusableFlexTable implements
private Date rangeEnd;
@Override
- public String getSubPartName(com.google.gwt.user.client.Element subElement) {
+ public String getSubPartName(
+ com.google.gwt.user.client.Element subElement) {
if (contains(nextMonth, subElement)) {
return SUBPART_NEXT_MONTH;
} else if (contains(prevMonth, subElement)) {
@@ -2090,7 +2094,8 @@ public class VCalendarPanel extends FocusableFlexTable implements
return SUBPART_AMPM_SELECT;
}
- } else if (getCellFormatter().getElement(0, 2).isOrHasChild(subElement)) {
+ } else if (getCellFormatter().getElement(0, 2)
+ .isOrHasChild(subElement)) {
return SUBPART_MONTH_YEAR_HEADER;
}
@@ -2099,7 +2104,7 @@ public class VCalendarPanel extends FocusableFlexTable implements
/**
* Checks if subElement is inside the widget DOM hierarchy.
- *
+ *
* @param w
* @param subElement
* @return true if {@code w} is a parent of subElement, false otherwise.
@@ -2113,7 +2118,8 @@ public class VCalendarPanel extends FocusableFlexTable implements
}
@Override
- public com.google.gwt.user.client.Element getSubPartElement(String subPart) {
+ public com.google.gwt.user.client.Element getSubPartElement(
+ String subPart) {
if (SUBPART_NEXT_MONTH.equals(subPart)) {
return nextMonth.getElement();
}
@@ -2141,8 +2147,8 @@ public class VCalendarPanel extends FocusableFlexTable implements
if (subPart.startsWith(SUBPART_DAY)) {
// Zero or negative ids map to days in the preceding month,
// past-the-end-of-month ids to days in the following month
- int dayOfMonth = Integer.parseInt(subPart.substring(SUBPART_DAY
- .length()));
+ int dayOfMonth = Integer
+ .parseInt(subPart.substring(SUBPART_DAY.length()));
Date date = new Date(displayedMonth.getYear(),
displayedMonth.getMonth(), dayOfMonth);
Iterator<Widget> iter = days.iterator();
@@ -2158,8 +2164,8 @@ public class VCalendarPanel extends FocusableFlexTable implements
}
if (SUBPART_MONTH_YEAR_HEADER.equals(subPart)) {
- return DOM.asOld((Element) getCellFormatter().getElement(0, 2)
- .getChild(0));
+ return DOM.asOld(
+ (Element) getCellFormatter().getElement(0, 2).getChild(0));
}
return null;
}
@@ -2222,7 +2228,7 @@ public class VCalendarPanel extends FocusableFlexTable implements
* Sets the start range for this component. The start range is inclusive,
* and it depends on the current resolution, what is considered inside the
* range.
- *
+ *
* @param startDate
* - the allowed range's start date
*/
@@ -2241,7 +2247,7 @@ public class VCalendarPanel extends FocusableFlexTable implements
/**
* Sets the end range for this component. The end range is inclusive, and it
* depends on the current resolution, what is considered inside the range.
- *
+ *
* @param endDate
* - the allowed range's end date
*/
diff --git a/client/src/main/java/com/vaadin/client/ui/VCheckBox.java b/client/src/main/java/com/vaadin/client/ui/VCheckBox.java
index 887dba262a..34f1b4f38f 100644
--- a/client/src/main/java/com/vaadin/client/ui/VCheckBox.java
+++ b/client/src/main/java/com/vaadin/client/ui/VCheckBox.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,8 +29,8 @@ import com.vaadin.client.ui.aria.AriaHelper;
import com.vaadin.client.ui.aria.HandlesAriaInvalid;
import com.vaadin.client.ui.aria.HandlesAriaRequired;
-public class VCheckBox extends com.google.gwt.user.client.ui.CheckBox implements
- Field, HandlesAriaInvalid, HandlesAriaRequired {
+public class VCheckBox extends com.google.gwt.user.client.ui.CheckBox
+ implements Field, HandlesAriaInvalid, HandlesAriaRequired {
public static final String CLASSNAME = "v-checkbox";
@@ -88,7 +88,7 @@ public class VCheckBox extends com.google.gwt.user.client.ui.CheckBox implements
/**
* Gives access to the input element.
- *
+ *
* @return Element of the CheckBox itself
*/
private Element getCheckBoxElement() {
diff --git a/client/src/main/java/com/vaadin/client/ui/VColorPicker.java b/client/src/main/java/com/vaadin/client/ui/VColorPicker.java
index b55c125418..c7197aa493 100644
--- a/client/src/main/java/com/vaadin/client/ui/VColorPicker.java
+++ b/client/src/main/java/com/vaadin/client/ui/VColorPicker.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ import com.google.gwt.user.client.ui.HTML;
/**
* Client side implementation for ColorPicker.
- *
+ *
* @since 7.0.0
*/
public class VColorPicker extends VButton implements ClickHandler {
@@ -41,7 +41,7 @@ public class VColorPicker extends VButton implements ClickHandler {
/**
* Set the color of the component, e.g. #ffffff
- *
+ *
* @param color
*/
public void setColor(String color) {
@@ -50,7 +50,7 @@ public class VColorPicker extends VButton implements ClickHandler {
/**
* Mark the popup opened/closed.
- *
+ *
* @param open
*/
public void setOpen(boolean open) {
@@ -59,7 +59,7 @@ public class VColorPicker extends VButton implements ClickHandler {
/**
* Check the popup's marked state.
- *
+ *
* @return true if the popup has been marked being open, false otherwise.
*/
public boolean isOpen() {
diff --git a/client/src/main/java/com/vaadin/client/ui/VColorPickerArea.java b/client/src/main/java/com/vaadin/client/ui/VColorPickerArea.java
index 23a9379c80..6e82ac2998 100644
--- a/client/src/main/java/com/vaadin/client/ui/VColorPickerArea.java
+++ b/client/src/main/java/com/vaadin/client/ui/VColorPickerArea.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,11 +28,11 @@ import com.google.gwt.user.client.ui.Widget;
/**
* Client side implementation for ColorPickerArea.
- *
+ *
* @since 7.0.0
*/
-public class VColorPickerArea extends Widget implements ClickHandler, HasHTML,
- HasClickHandlers {
+public class VColorPickerArea extends Widget
+ implements ClickHandler, HasHTML, HasClickHandlers {
public static final String CLASSNAME = "v-colorpicker";
private String color = null;
@@ -65,7 +65,7 @@ public class VColorPickerArea extends Widget implements ClickHandler, HasHTML,
/**
* Adds a click handler to the widget and sinks the click event.
- *
+ *
* @param handler
* @return HandlerRegistration used to remove the handler
*/
@@ -84,7 +84,8 @@ public class VColorPickerArea extends Widget implements ClickHandler, HasHTML,
int type = DOM.eventGetType(event);
switch (type) {
case Event.ONCLICK:
- if (DOM.isOrHasChild(area.getElement(), DOM.eventGetTarget(event))) {
+ if (DOM.isOrHasChild(area.getElement(),
+ DOM.eventGetTarget(event))) {
super.onBrowserEvent(event);
}
break;
@@ -95,7 +96,7 @@ public class VColorPickerArea extends Widget implements ClickHandler, HasHTML,
/**
* Mark the popup opened/closed.
- *
+ *
* @param open
*/
public void setOpen(boolean open) {
@@ -104,7 +105,7 @@ public class VColorPickerArea extends Widget implements ClickHandler, HasHTML,
/**
* Check the popup's marked state.
- *
+ *
* @return true if the popup has been marked being open, false otherwise.
*/
public boolean isOpen() {
@@ -113,9 +114,9 @@ public class VColorPickerArea extends Widget implements ClickHandler, HasHTML,
/**
* Sets the caption's content to the given text.
- *
+ *
* @param text
- *
+ *
* @see Label#setText(String)
*/
@Override
@@ -125,7 +126,7 @@ public class VColorPickerArea extends Widget implements ClickHandler, HasHTML,
/**
* Gets the caption's contents as text.
- *
+ *
* @return the caption's text
*/
@Override
@@ -135,7 +136,7 @@ public class VColorPickerArea extends Widget implements ClickHandler, HasHTML,
/**
* Sets the caption's content to the given HTML.
- *
+ *
* @param html
*/
@Override
@@ -145,7 +146,7 @@ public class VColorPickerArea extends Widget implements ClickHandler, HasHTML,
/**
* Gets the caption's contents as HTML.
- *
+ *
* @return the caption's HTML
*/
@Override
@@ -155,7 +156,7 @@ public class VColorPickerArea extends Widget implements ClickHandler, HasHTML,
/**
* Sets the color for the area.
- *
+ *
* @param color
*/
public void setColor(String color) {
diff --git a/client/src/main/java/com/vaadin/client/ui/VContextMenu.java b/client/src/main/java/com/vaadin/client/ui/VContextMenu.java
index 6028eea52c..553e972532 100644
--- a/client/src/main/java/com/vaadin/client/ui/VContextMenu.java
+++ b/client/src/main/java/com/vaadin/client/ui/VContextMenu.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -76,7 +76,7 @@ public class VContextMenu extends VOverlay implements SubPartAware {
/**
* This method should be used only by Client object as only one per client
* should exists. Request an instance via client.getContextMenu();
- *
+ *
* @param cli
* to be set as an owner of menu
*/
@@ -90,10 +90,9 @@ public class VContextMenu extends VOverlay implements SubPartAware {
@Override
public void onClose(CloseEvent<PopupPanel> event) {
Element currentFocus = WidgetUtil.getFocusedElement();
- if (focusedElement != null
- && (currentFocus == null
- || menu.getElement().isOrHasChild(currentFocus) || RootPanel
- .getBodyElement().equals(currentFocus))) {
+ if (focusedElement != null && (currentFocus == null
+ || menu.getElement().isOrHasChild(currentFocus)
+ || RootPanel.getBodyElement().equals(currentFocus))) {
focusedElement.focus();
focusedElement = null;
}
@@ -109,7 +108,7 @@ public class VContextMenu extends VOverlay implements SubPartAware {
/**
* Sets the element from which to build menu
- *
+ *
* @param ao
*/
public void setActionOwner(ActionOwner ao) {
@@ -118,7 +117,7 @@ public class VContextMenu extends VOverlay implements SubPartAware {
/**
* Shows context menu at given location IF it contain at least one item.
- *
+ *
* @param left
* @param top
*/
@@ -197,9 +196,9 @@ public class VContextMenu extends VOverlay implements SubPartAware {
* Extend standard Gwt MenuBar to set proper settings and to override
* onPopupClosed method so that PopupPanel gets closed.
*/
- class CMenuBar extends MenuBar implements HasFocusHandlers,
- HasBlurHandlers, HasKeyDownHandlers, HasKeyPressHandlers,
- Focusable, LoadHandler, KeyUpHandler {
+ class CMenuBar extends MenuBar
+ implements HasFocusHandlers, HasBlurHandlers, HasKeyDownHandlers,
+ HasKeyPressHandlers, Focusable, LoadHandler, KeyUpHandler {
public CMenuBar() {
super(true);
addDomHandler(this, LoadEvent.getType());
@@ -225,7 +224,7 @@ public class VContextMenu extends VOverlay implements SubPartAware {
* (!DOM.isOrHasChild(getElement(), to)) { DOM.setElementProperty(
* super.getSelectedItem().getElement(), "className",
* super.getSelectedItem().getStylePrimaryName()); } }
- *
+ *
* super.onBrowserEvent(event); }
*/
@@ -282,7 +281,8 @@ public class VContextMenu extends VOverlay implements SubPartAware {
}
@Override
- public com.google.gwt.user.client.Element getSubPartElement(String subPart) {
+ public com.google.gwt.user.client.Element getSubPartElement(
+ String subPart) {
int index = Integer.parseInt(subPart.substring(6));
// ApplicationConnection.getConsole().log(
// "Searching element for selection index " + index);
@@ -293,11 +293,13 @@ public class VContextMenu extends VOverlay implements SubPartAware {
}
@Override
- public String getSubPartName(com.google.gwt.user.client.Element subElement) {
+ public String getSubPartName(
+ com.google.gwt.user.client.Element subElement) {
if (getElement().isOrHasChild(subElement)) {
com.google.gwt.dom.client.Element e = subElement;
{
- while (e != null && !e.getTagName().toLowerCase().equals("tr")) {
+ while (e != null
+ && !e.getTagName().toLowerCase().equals("tr")) {
e = e.getParentElement();
// ApplicationConnection.getConsole().log("Found row");
}
@@ -320,7 +322,7 @@ public class VContextMenu extends VOverlay implements SubPartAware {
/**
* Hides context menu if it is currently shown by given action owner.
- *
+ *
* @param actionOwner
*/
public void ensureHidden(ActionOwner actionOwner) {
diff --git a/client/src/main/java/com/vaadin/client/ui/VCssLayout.java b/client/src/main/java/com/vaadin/client/ui/VCssLayout.java
index d7d9eefef9..9e262f64cf 100644
--- a/client/src/main/java/com/vaadin/client/ui/VCssLayout.java
+++ b/client/src/main/java/com/vaadin/client/ui/VCssLayout.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/VCustomComponent.java b/client/src/main/java/com/vaadin/client/ui/VCustomComponent.java
index 6aa21b08d2..7184af58d5 100644
--- a/client/src/main/java/com/vaadin/client/ui/VCustomComponent.java
+++ b/client/src/main/java/com/vaadin/client/ui/VCustomComponent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/VCustomLayout.java b/client/src/main/java/com/vaadin/client/ui/VCustomLayout.java
index 0ee50fe0dd..33ac090aae 100644
--- a/client/src/main/java/com/vaadin/client/ui/VCustomLayout.java
+++ b/client/src/main/java/com/vaadin/client/ui/VCustomLayout.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -41,9 +41,9 @@ import com.vaadin.client.WidgetUtil;
/**
* Custom Layout implements complex layout defined with HTML template.
- *
+ *
* @author Vaadin Ltd
- *
+ *
*/
public class VCustomLayout extends ComplexPanel {
@@ -106,14 +106,14 @@ public class VCustomLayout extends ComplexPanel {
/**
* Sets widget to given location.
- *
+ *
* If location already contains a widget it will be removed.
- *
+ *
* @param widget
* Widget to be set into location.
* @param location
* location name where widget will be added
- *
+ *
* @throws IllegalArgumentException
* if no such location is found in the layout.
*/
@@ -126,8 +126,8 @@ public class VCustomLayout extends ComplexPanel {
// If no given location is found in the layout, and exception is throws
Element elem = locationToElement.get(location);
if (elem == null && hasTemplate()) {
- throw new IllegalArgumentException("No location " + location
- + " found");
+ throw new IllegalArgumentException(
+ "No location " + location + " found");
}
// Get previous widget
@@ -168,15 +168,13 @@ public class VCustomLayout extends ComplexPanel {
"<((?:img)|(?:IMG))\\s([^>]*)src=\"((?![a-z]+:)[^/][^\"]+)\"",
"<$1 $2src=\"" + relImgPrefix + "$3\"");
// also support src attributes without quotes
- template = template
- .replaceAll(
- "<((?:img)|(?:IMG))\\s([^>]*)src=[^\"]((?![a-z]+:)[^/][^ />]+)[ />]",
- "<$1 $2src=\"" + relImgPrefix + "$3\"");
+ template = template.replaceAll(
+ "<((?:img)|(?:IMG))\\s([^>]*)src=[^\"]((?![a-z]+:)[^/][^ />]+)[ />]",
+ "<$1 $2src=\"" + relImgPrefix + "$3\"");
// also prefix relative style="...url(...)..."
- template = template
- .replaceAll(
- "(<[^>]+style=\"[^\"]*url\\()((?![a-z]+:)[^/][^\"]+)(\\)[^>]*>)",
- "$1 " + relImgPrefix + "$2 $3");
+ template = template.replaceAll(
+ "(<[^>]+style=\"[^\"]*url\\()((?![a-z]+:)[^/][^\"]+)(\\)[^>]*>)",
+ "$1 " + relImgPrefix + "$2 $3");
getElement().setInnerHTML(template);
@@ -251,11 +249,11 @@ public class VCustomLayout extends ComplexPanel {
/**
* Extract body part and script tags from raw html-template.
- *
+ *
* Saves contents of all script-tags to private property: scripts. Returns
* contents of the body part for the html without script-tags. Also replaces
* all _UID_ tags with an unique id-string.
- *
+ *
* @param html
* Original HTML-template received from server
* @return html that is used to create the HTMLPanel.
@@ -416,7 +414,7 @@ public class VCustomLayout extends ComplexPanel {
* functions are to be run.
* <p>
* For internal use only. May be removed or replaced in the future.
- *
+ *
* @param el
* @return true if layout function exists and was run successfully, else
* false.
diff --git a/client/src/main/java/com/vaadin/client/ui/VDateField.java b/client/src/main/java/com/vaadin/client/ui/VDateField.java
index b4084847dd..3922219c7b 100644
--- a/client/src/main/java/com/vaadin/client/ui/VDateField.java
+++ b/client/src/main/java/com/vaadin/client/ui/VDateField.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -188,7 +188,7 @@ public class VDateField extends FlowPanel implements Field, HasEnabled {
* Returns whether ISO 8601 week numbers should be shown in the date
* selector or not. ISO 8601 defines that a week always starts with a Monday
* so the week numbers are only shown if this is the case.
- *
+ *
* @return true if week number should be shown, false otherwise
*/
public boolean isShowISOWeekNumbers() {
@@ -205,7 +205,7 @@ public class VDateField extends FlowPanel implements Field, HasEnabled {
* the current date.
* <p>
* For internal use only. May be removed or replaced in the future.
- *
+ *
* @return A copy of the current date
*/
public Date getDate() {
@@ -219,7 +219,7 @@ public class VDateField extends FlowPanel implements Field, HasEnabled {
/**
* Sets the current date for this VDateField.
- *
+ *
* @param date
* The new date to use
*/
diff --git a/client/src/main/java/com/vaadin/client/ui/VDateFieldCalendar.java b/client/src/main/java/com/vaadin/client/ui/VDateFieldCalendar.java
index 759ebef102..8f1b86a28f 100644
--- a/client/src/main/java/com/vaadin/client/ui/VDateFieldCalendar.java
+++ b/client/src/main/java/com/vaadin/client/ui/VDateFieldCalendar.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -87,24 +87,26 @@ public class VDateFieldCalendar extends VDateField {
.getCalendarField()) {
getClient().updateVariable(getId(), "day", date2.getDate(),
false);
- if (getCurrentResolution().getCalendarField() > Resolution.DAY
- .getCalendarField()) {
+ if (getCurrentResolution()
+ .getCalendarField() > Resolution.DAY
+ .getCalendarField()) {
getClient().updateVariable(getId(), "hour",
date2.getHours(), false);
- if (getCurrentResolution().getCalendarField() > Resolution.HOUR
- .getCalendarField()) {
+ if (getCurrentResolution()
+ .getCalendarField() > Resolution.HOUR
+ .getCalendarField()) {
getClient().updateVariable(getId(), "min",
date2.getMinutes(), false);
- if (getCurrentResolution().getCalendarField() > Resolution.MINUTE
- .getCalendarField()) {
+ if (getCurrentResolution()
+ .getCalendarField() > Resolution.MINUTE
+ .getCalendarField()) {
getClient().updateVariable(getId(), "sec",
date2.getSeconds(), false);
- if (getCurrentResolution().getCalendarField() > Resolution.SECOND
- .getCalendarField()) {
- getClient().updateVariable(
- getId(),
- "msec",
- DateTimeService
+ if (getCurrentResolution()
+ .getCalendarField() > Resolution.SECOND
+ .getCalendarField()) {
+ getClient().updateVariable(getId(),
+ "msec", DateTimeService
.getMilliseconds(date2),
false);
}
diff --git a/client/src/main/java/com/vaadin/client/ui/VDragAndDropWrapper.java b/client/src/main/java/com/vaadin/client/ui/VDragAndDropWrapper.java
index 4ecdec8b6f..e025d88740 100644
--- a/client/src/main/java/com/vaadin/client/ui/VDragAndDropWrapper.java
+++ b/client/src/main/java/com/vaadin/client/ui/VDragAndDropWrapper.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -60,14 +60,14 @@ import com.vaadin.shared.ui.dd.HorizontalDropLocation;
import com.vaadin.shared.ui.dd.VerticalDropLocation;
/**
- *
+ *
* Must have features pending:
- *
+ *
* drop details: locations + sizes in document hierarchy up to wrapper
- *
+ *
*/
-public class VDragAndDropWrapper extends VCustomComponent implements
- VHasDropHandler {
+public class VDragAndDropWrapper extends VCustomComponent
+ implements VHasDropHandler {
/**
* Minimum pixel delta is used to detect click from drag. #12838
@@ -91,7 +91,8 @@ public class VDragAndDropWrapper extends VCustomComponent implements
@Override
public void onMouseDown(final MouseDownEvent event) {
if (getConnector().isEnabled()
- && event.getNativeEvent().getButton() == Event.BUTTON_LEFT
+ && event.getNativeEvent()
+ .getButton() == Event.BUTTON_LEFT
&& startDrag(event.getNativeEvent())) {
event.preventDefault(); // prevent text selection
startX = event.getClientX();
@@ -135,7 +136,7 @@ public class VDragAndDropWrapper extends VCustomComponent implements
/**
* Starts a drag and drop operation from mousedown or touchstart event if
* required conditions are met.
- *
+ *
* @param event
* @return true if the event was handled as a drag start event
*/
@@ -149,8 +150,8 @@ public class VDragAndDropWrapper extends VCustomComponent implements
Element.as(event.getEventTarget()));
Widget widget = paintable.getWidget();
transferable.setData("component", paintable);
- VDragEvent dragEvent = VDragAndDropManager.get().startDrag(
- transferable, event, true);
+ VDragEvent dragEvent = VDragAndDropManager.get()
+ .startDrag(transferable, event, true);
transferable.setData("mouseDown", MouseEventDetailsBuilder
.buildMouseEventDetails(event).serialize());
@@ -253,9 +254,8 @@ public class VDragAndDropWrapper extends VCustomComponent implements
uploading = true;
final Integer fileId = fileIds.remove(0);
VHtml5File file = files.remove(0);
- final String receiverUrl = client
- .translateVaadinUri(fileIdToReceiver
- .remove(fileId.toString()));
+ final String receiverUrl = client.translateVaadinUri(
+ fileIdToReceiver.remove(fileId.toString()));
ExtendedXHR extendedXHR = (ExtendedXHR) ExtendedXHR
.create();
extendedXHR
@@ -297,14 +297,15 @@ public class VDragAndDropWrapper extends VCustomComponent implements
dragleavetimer.cancel();
dragleavetimer = null;
}
- if (VDragAndDropManager.get().getCurrentDropHandler() != getDropHandler()) {
+ if (VDragAndDropManager.get()
+ .getCurrentDropHandler() != getDropHandler()) {
VTransferable transferable = new VTransferable();
transferable.setDragSource(getConnector());
- vaadinDragEvent = VDragAndDropManager.get().startDrag(
- transferable, event, false);
- VDragAndDropManager.get().setCurrentDropHandler(
- getDropHandler());
+ vaadinDragEvent = VDragAndDropManager.get()
+ .startDrag(transferable, event, false);
+ VDragAndDropManager.get()
+ .setCurrentDropHandler(getDropHandler());
}
try {
event.preventDefault();
@@ -334,9 +335,8 @@ public class VDragAndDropWrapper extends VCustomComponent implements
// this
// is what IE does).
// In Vaadin we fire it only if drop did not happen.
- if (vaadinDragEvent != null
- && VDragAndDropManager.get()
- .getCurrentDropHandler() == getDropHandler()) {
+ if (vaadinDragEvent != null && VDragAndDropManager.get()
+ .getCurrentDropHandler() == getDropHandler()) {
VDragAndDropManager.get().interruptDrag();
}
}
@@ -617,7 +617,7 @@ public class VDragAndDropWrapper extends VCustomComponent implements
/**
* Prototype code, memory leak risk.
- *
+ *
* @param el
* @deprecated As of 7.2, call or override {@link #hookHtml5Events(Element)}
* instead
@@ -646,9 +646,9 @@ public class VDragAndDropWrapper extends VCustomComponent implements
/**
* Prototype code, memory leak risk.
- *
+ *
* @param el
- *
+ *
* @since 7.2
*/
protected void hookHtml5Events(Element el) {
@@ -676,10 +676,12 @@ public class VDragAndDropWrapper extends VCustomComponent implements
protected void deEmphasis(boolean doLayout) {
if (emphasizedVDrop != null) {
VDragAndDropWrapper.setStyleName(getElement(), OVER_STYLE, false);
- VDragAndDropWrapper.setStyleName(getElement(), OVER_STYLE + "-"
- + emphasizedVDrop.toString().toLowerCase(), false);
- VDragAndDropWrapper.setStyleName(getElement(), OVER_STYLE + "-"
- + emphasizedHDrop.toString().toLowerCase(), false);
+ VDragAndDropWrapper.setStyleName(getElement(),
+ OVER_STYLE + "-" + emphasizedVDrop.toString().toLowerCase(),
+ false);
+ VDragAndDropWrapper.setStyleName(getElement(),
+ OVER_STYLE + "-" + emphasizedHDrop.toString().toLowerCase(),
+ false);
}
if (doLayout) {
notifySizePotentiallyChanged();
@@ -695,8 +697,10 @@ public class VDragAndDropWrapper extends VCustomComponent implements
VDragAndDropWrapper.setStyleName(getElement(), OVER_STYLE, true);
VDragAndDropWrapper.setStyleName(getElement(), OVER_STYLE + "-"
+ verticalDropLocation.toString().toLowerCase(), true);
- VDragAndDropWrapper.setStyleName(getElement(), OVER_STYLE + "-"
- + horizontalDropLocation.toString().toLowerCase(), true);
+ VDragAndDropWrapper.setStyleName(getElement(),
+ OVER_STYLE + "-"
+ + horizontalDropLocation.toString().toLowerCase(),
+ true);
emphasizedVDrop = verticalDropLocation;
emphasizedHDrop = horizontalDropLocation;
@@ -708,7 +712,7 @@ public class VDragAndDropWrapper extends VCustomComponent implements
/**
* Set the widget that will be used as the drag image when using
* DragStartMode {@link COMPONENT_OTHER} .
- *
+ *
* @param widget
*/
public void setDragAndDropWidget(Widget widget) {
@@ -727,7 +731,7 @@ public class VDragAndDropWrapper extends VCustomComponent implements
* Internal client side interface used by the connector and the widget for
* the drag and drop wrapper to signal the completion of an HTML5 file
* upload.
- *
+ *
* @since 7.6.4
*/
public interface UploadHandler {
diff --git a/client/src/main/java/com/vaadin/client/ui/VDragAndDropWrapperIE.java b/client/src/main/java/com/vaadin/client/ui/VDragAndDropWrapperIE.java
index b32b36d13b..4ddaad25a5 100644
--- a/client/src/main/java/com/vaadin/client/ui/VDragAndDropWrapperIE.java
+++ b/client/src/main/java/com/vaadin/client/ui/VDragAndDropWrapperIE.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/VEmbedded.java b/client/src/main/java/com/vaadin/client/ui/VEmbedded.java
index f3970f9ac7..68dcc6152a 100644
--- a/client/src/main/java/com/vaadin/client/ui/VEmbedded.java
+++ b/client/src/main/java/com/vaadin/client/ui/VEmbedded.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -58,7 +58,7 @@ public class VEmbedded extends HTML {
* cross-browser.
* <p>
* For internal use only. May be removed or replaced in the future.
- *
+ *
* @param uidl
* The UIDL
* @return Tags concatenated into a string
@@ -83,11 +83,14 @@ public class VEmbedded extends HTML {
* this by setting his own classid.
*/
if (uidl.hasAttribute("classid")) {
- html.append("classid=\""
- + WidgetUtil.escapeAttribute(uidl
- .getStringAttribute("classid")) + "\" ");
+ html.append(
+ "classid=\""
+ + WidgetUtil.escapeAttribute(
+ uidl.getStringAttribute("classid"))
+ + "\" ");
} else {
- html.append("classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" ");
+ html.append(
+ "classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" ");
}
/*
@@ -99,15 +102,18 @@ public class VEmbedded extends HTML {
* codebase
*/
if (uidl.hasAttribute("codebase")) {
- html.append("codebase=\""
- + WidgetUtil.escapeAttribute(uidl
- .getStringAttribute("codebase")) + "\" ");
+ html.append(
+ "codebase=\""
+ + WidgetUtil.escapeAttribute(
+ uidl.getStringAttribute("codebase"))
+ + "\" ");
} else {
- html.append("codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" ");
+ html.append(
+ "codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" ");
}
- ComponentConnector paintable = ConnectorMap.get(client).getConnector(
- this);
+ ComponentConnector paintable = ConnectorMap.get(client)
+ .getConnector(this);
String height = paintable.getState().height;
String width = paintable.getState().width;
@@ -118,23 +124,29 @@ public class VEmbedded extends HTML {
// Codetype
if (uidl.hasAttribute("codetype")) {
- html.append("codetype=\""
- + WidgetUtil.escapeAttribute(uidl
- .getStringAttribute("codetype")) + "\" ");
+ html.append(
+ "codetype=\""
+ + WidgetUtil.escapeAttribute(
+ uidl.getStringAttribute("codetype"))
+ + "\" ");
}
// Standby
if (uidl.hasAttribute("standby")) {
- html.append("standby=\""
- + WidgetUtil.escapeAttribute(uidl
- .getStringAttribute("standby")) + "\" ");
+ html.append(
+ "standby=\""
+ + WidgetUtil.escapeAttribute(
+ uidl.getStringAttribute("standby"))
+ + "\" ");
}
// Archive
if (uidl.hasAttribute("archive")) {
- html.append("archive=\""
- + WidgetUtil.escapeAttribute(uidl
- .getStringAttribute("archive")) + "\" ");
+ html.append(
+ "archive=\""
+ + WidgetUtil.escapeAttribute(
+ uidl.getStringAttribute("archive"))
+ + "\" ");
}
// End object tag
@@ -175,8 +187,8 @@ public class VEmbedded extends HTML {
html.append("></embed>");
if (uidl.hasAttribute(EmbeddedConstants.ALTERNATE_TEXT)) {
- html.append(uidl
- .getStringAttribute(EmbeddedConstants.ALTERNATE_TEXT));
+ html.append(
+ uidl.getStringAttribute(EmbeddedConstants.ALTERNATE_TEXT));
}
// End object tag
@@ -189,7 +201,7 @@ public class VEmbedded extends HTML {
* Returns a map (name -> value) of all parameters in the UIDL.
* <p>
* For internal use only. May be removed or replaced in the future.
- *
+ *
* @param uidl
* @return
*/
@@ -219,7 +231,7 @@ public class VEmbedded extends HTML {
* Helper to return translated src-attribute from embedded's UIDL
* <p>
* For internal use only. May be removed or replaced in the future.
- *
+ *
* @param uidl
* @param client
* @return
diff --git a/client/src/main/java/com/vaadin/client/ui/VFilterSelect.java b/client/src/main/java/com/vaadin/client/ui/VFilterSelect.java
index e3fe49871a..2eeff9ece2 100644
--- a/client/src/main/java/com/vaadin/client/ui/VFilterSelect.java
+++ b/client/src/main/java/com/vaadin/client/ui/VFilterSelect.java
@@ -89,14 +89,14 @@ import com.vaadin.shared.util.SharedUtil;
/**
* Client side implementation of the Select component.
- *
+ *
* TODO needs major refactoring (to be extensible etc)
*/
@SuppressWarnings("deprecation")
-public class VFilterSelect extends Composite implements Field, KeyDownHandler,
- KeyUpHandler, ClickHandler, FocusHandler, BlurHandler, Focusable,
- SubPartAware, HandlesAriaCaption, HandlesAriaInvalid,
- HandlesAriaRequired, DeferredWorker {
+public class VFilterSelect extends Composite
+ implements Field, KeyDownHandler, KeyUpHandler, ClickHandler,
+ FocusHandler, BlurHandler, Focusable, SubPartAware, HandlesAriaCaption,
+ HandlesAriaInvalid, HandlesAriaRequired, DeferredWorker {
/**
* Represents a suggestion in the suggestion popup box
@@ -110,7 +110,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
/**
* Constructor
- *
+ *
* @param uidl
* The UIDL recieved from the server
*/
@@ -133,8 +133,8 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
@Override
public String getDisplayString() {
final StringBuffer sb = new StringBuffer();
- final Icon icon = client.getIcon(client
- .translateVaadinUri(untranslatedIconUri));
+ final Icon icon = client
+ .getIcon(client.translateVaadinUri(untranslatedIconUri));
if (icon != null) {
sb.append(icon.getElement().getString());
}
@@ -161,7 +161,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
/**
* Get the option key which represents the item on the server side.
- *
+ *
* @return The key of the item
*/
public String getOptionKey() {
@@ -170,7 +170,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
/**
* Get the URI of the icon. Used when constructing the displayed option.
- *
+ *
* @return
*/
public String getIconUri() {
@@ -181,7 +181,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
* Gets the style set for this suggestion item. Styles are typically set
* by a server-side {@link com.vaadin.ui.ComboBox.ItemStyleGenerator}.
* The returned style is prefixed by <code>v-filterselect-item-</code>.
- *
+ *
* @since 7.5.6
* @return the style name to use, or <code>null</code> to not apply any
* custom style.
@@ -238,7 +238,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
return $entry(function(e) {
var deltaX = e.deltaX ? e.deltaX : -0.5*e.wheelDeltaX;
var deltaY = e.deltaY ? e.deltaY : -0.5*e.wheelDeltaY;
-
+
// IE8 has only delta y
if (isNaN(deltaY)) {
deltaY = -0.5*e.wheelDelta;
@@ -317,8 +317,8 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
* Represents the popup box with the selection options. Wraps a suggestion
* menu.
*/
- public class SuggestionPopup extends VOverlay implements PositionCallback,
- CloseHandler<PopupPanel> {
+ public class SuggestionPopup extends VOverlay
+ implements PositionCallback, CloseHandler<PopupPanel> {
private static final int Z_INDEX = 30000;
@@ -389,7 +389,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
/**
* Shows the popup where the user can see the filtered options
- *
+ *
* @param currentSuggestions
* The filtered suggestions
* @param currentPage
@@ -410,7 +410,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
* correctly. This issue manifests when a Combobox is placed in
* another popupView which also needs to calculate the absoluteTop()
* to position itself. #9768
- *
+ *
* After deferring the showSuggestions method, a problem with
* navigating in the combo box occurs. Because of that the method
* navigateItemAfterPageChange in ComboBoxConnector class, which
@@ -437,9 +437,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
boolean firstPage = (currentPage == 0);
final int first = currentPage * pageLength + 1
- (firstPage ? 0 : nullOffset);
- final int last = first
- + currentSuggestions.size()
- - 1
+ final int last = first + currentSuggestions.size() - 1
- (firstPage && "".equals(lastFilter) ? nullOffset
: 0);
final int matches = totalSuggestions - nullOffset;
@@ -471,7 +469,8 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
// box-shadow.
// IE9 and IE10 need explicit update to remove extra
// box-shadows
- if (BrowserInfo.get().isIE9() || BrowserInfo.get().isIE10()) {
+ if (BrowserInfo.get().isIE9()
+ || BrowserInfo.get().isIE10()) {
forceReflow();
}
}
@@ -480,7 +479,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
/**
* Should the next page button be visible to the user?
- *
+ *
* @param active
*/
private void setNextButtonActive(boolean active) {
@@ -489,8 +488,8 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
}
if (active) {
DOM.sinkEvents(down, Event.ONCLICK);
- down.setClassName(VFilterSelect.this.getStylePrimaryName()
- + "-nextpage");
+ down.setClassName(
+ VFilterSelect.this.getStylePrimaryName() + "-nextpage");
} else {
DOM.sinkEvents(down, 0);
down.setClassName(VFilterSelect.this.getStylePrimaryName()
@@ -500,7 +499,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
/**
* Should the previous page button be visible to the user
- *
+ *
* @param active
*/
private void setPrevButtonActive(boolean active) {
@@ -510,8 +509,8 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
if (active) {
DOM.sinkEvents(up, Event.ONCLICK);
- up.setClassName(VFilterSelect.this.getStylePrimaryName()
- + "-prevpage");
+ up.setClassName(
+ VFilterSelect.this.getStylePrimaryName() + "-prevpage");
} else {
DOM.sinkEvents(up, 0);
up.setClassName(VFilterSelect.this.getStylePrimaryName()
@@ -557,7 +556,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
/**
* Select the first item of the suggestions list popup.
- *
+ *
* @since 7.2.6
*/
public void selectFirstItem() {
@@ -567,7 +566,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
/**
* Select the last item of the suggestions list popup.
- *
+ *
* @since 7.2.6
*/
public void selectLastItem() {
@@ -610,7 +609,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
* because otherwise the waiting flag will be reset in
* the first response and the second response will be
* ignored, causing an empty popup...
- *
+ *
* As long as the scrolling delay is suitable
* double/triple clicks will work by scrolling two or
* three pages at a time and this should not be a
@@ -683,7 +682,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
* amount of items are visible at a time and a scrollbar or buttons are
* visible to change page. If paging is turned of then all options are
* rendered into the popup menu.
- *
+ *
* @param paging
* Should the paging be turned on?
*/
@@ -821,7 +820,8 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
menuHeight -= up.getOffsetHeight() + down.getOffsetHeight()
+ status.getOffsetHeight();
} else {
- final ComputedStyle s = new ComputedStyle(menu.getElement());
+ final ComputedStyle s = new ComputedStyle(
+ menu.getElement());
menuHeight -= s.getIntProperty("marginBottom")
+ s.getIntProperty("marginTop");
}
@@ -865,7 +865,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
/**
* Adds in-line CSS rules to the DOM according to the
* suggestionPopupWidth field
- *
+ *
* @param desiredWidth
* @param naturalMenuWidth
*/
@@ -873,13 +873,13 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
int naturalMenuWidth) {
/**
* Three different width modes for the suggestion pop-up:
- *
+ *
* 1. Legacy "null"-mode: width is determined by the longest item
* caption for each page while still maintaining minimum width of
* (desiredWidth - popupOuterPadding)
- *
+ *
* 2. relative to the component itself
- *
+ *
* 3. fixed width
*/
String width = "auto";
@@ -891,8 +891,8 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
} else if (isrelativeUnits(suggestionPopupWidth)) {
float mainComponentWidth = desiredWidth - popupOuterPadding;
// convert percentage value to fraction
- int widthInPx = Math.round(mainComponentWidth
- * asFraction(suggestionPopupWidth));
+ int widthInPx = Math.round(
+ mainComponentWidth * asFraction(suggestionPopupWidth));
width = widthInPx + "px";
} else {
// use as fixed width CSS definition
@@ -912,8 +912,8 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
int compensation = WidgetUtil
.measureHorizontalPaddingAndBorder(
menu.getElement(), 4);
- setTdWidth(menu.getElement(), menu.getOffsetWidth()
- - compensation);
+ setTdWidth(menu.getElement(),
+ menu.getOffsetWidth() - compensation);
}
}
@@ -923,7 +923,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
* Descends to child elements until finds TD elements and sets their
* width in pixels. Can be used to workaround IE8 & 9 TD element
* display: block issues
- *
+ *
* @param parent
* @param width
*/
@@ -941,7 +941,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
/**
* Returns the percentage value as a fraction, e.g. 42% -> 0.42
- *
+ *
* @param percentage
*/
private float asFraction(String percentage) {
@@ -963,7 +963,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
/**
* Was the popup just closed?
- *
+ *
* @return true if popup was just closed
*/
public boolean isJustClosed() {
@@ -974,7 +974,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.logical.shared.CloseHandler#onClose(com.google
* .gwt.event.logical.shared.CloseEvent)
@@ -992,7 +992,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
/**
* Updates style names in suggestion popup to help theme building.
- *
+ *
* @param uidl
* UIDL for the whole combo box
* @param componentState
@@ -1001,12 +1001,12 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
public void updateStyleNames(UIDL uidl,
AbstractComponentState componentState) {
debug("VFS.SP: updateStyleNames()");
- setStyleName(VFilterSelect.this.getStylePrimaryName()
- + "-suggestpopup");
- menu.setStyleName(VFilterSelect.this.getStylePrimaryName()
- + "-suggestmenu");
- status.setClassName(VFilterSelect.this.getStylePrimaryName()
- + "-status");
+ setStyleName(
+ VFilterSelect.this.getStylePrimaryName() + "-suggestpopup");
+ menu.setStyleName(
+ VFilterSelect.this.getStylePrimaryName() + "-suggestmenu");
+ status.setClassName(
+ VFilterSelect.this.getStylePrimaryName() + "-status");
if (ComponentStateUtil.hasStyles(componentState)) {
for (String style : componentState.styles) {
if (!"".equals(style)) {
@@ -1021,8 +1021,8 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
/**
* The menu where the suggestions are rendered
*/
- public class SuggestionMenu extends MenuBar implements SubPartAware,
- LoadHandler {
+ public class SuggestionMenu extends MenuBar
+ implements SubPartAware, LoadHandler {
private VLazyExecutor delayedImageLoadExecutioner = new VLazyExecutor(
100, new ScheduledCommand() {
@@ -1066,8 +1066,8 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
*/
String getPreferredHeight(int pageItemsCount) {
if (currentSuggestions.size() > 0) {
- final int pixels = (getPreferredHeight() / currentSuggestions
- .size()) * pageItemsCount;
+ final int pixels = (getPreferredHeight()
+ / currentSuggestions.size()) * pageItemsCount;
return pixels + "px";
} else {
return "";
@@ -1076,7 +1076,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
/**
* Sets the suggestions rendered in the menu
- *
+ *
* @param suggestions
* The suggestions to be rendered in the menu
*/
@@ -1121,8 +1121,8 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
&& BrowserInfo.get().getBrowserMajorVersion() < 10) {
// set TD width to a low value so that they won't mandate the
// suggestion pop-up width
- suggestionPopup
- .setTdWidth(suggestionPopup.menu.getElement(), 1);
+ suggestionPopup.setTdWidth(suggestionPopup.menu.getElement(),
+ 1);
}
}
@@ -1174,13 +1174,14 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
if (p > 0) {
for (int i = 0; i < p; i++) {
final MenuItem potentialExactMatch = getItems().get(i);
- if (potentialExactMatch.getText().equals(enteredItemValue)) {
+ if (potentialExactMatch.getText()
+ .equals(enteredItemValue)) {
selectItem(potentialExactMatch);
// do not send a value change event if null was and
// stays selected
if (!"".equals(enteredItemValue)
- || (selectedOptionKey != null && !""
- .equals(selectedOptionKey))) {
+ || (selectedOptionKey != null
+ && !"".equals(selectedOptionKey))) {
doItemAction(potentialExactMatch, true);
}
suggestionPopup.hide();
@@ -1199,13 +1200,12 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
enteredItemValue, immediate);
afterUpdateClientVariables();
}
- } else if (item != null
- && !"".equals(lastFilter)
- && (filteringmode == FilteringMode.CONTAINS ? item
- .getText().toLowerCase()
- .contains(lastFilter.toLowerCase()) : item
- .getText().toLowerCase()
- .startsWith(lastFilter.toLowerCase()))) {
+ } else if (item != null && !"".equals(lastFilter)
+ && (filteringmode == FilteringMode.CONTAINS
+ ? item.getText().toLowerCase()
+ .contains(lastFilter.toLowerCase())
+ : item.getText().toLowerCase()
+ .startsWith(lastFilter.toLowerCase()))) {
doItemAction(item, true);
} else {
// currentSuggestion has key="" for nullselection
@@ -1229,8 +1229,8 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
@Override
public com.google.gwt.user.client.Element getSubPartElement(
String subPart) {
- int index = Integer.parseInt(subPart.substring(SUBPART_PREFIX
- .length()));
+ int index = Integer
+ .parseInt(subPart.substring(SUBPART_PREFIX.length()));
MenuItem item = getItems().get(index);
@@ -1296,8 +1296,8 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
*/
int getItemOffsetHeight() {
List<MenuItem> items = getItems();
- return items != null && items.size() > 0 ? items.get(0)
- .getOffsetHeight() : 0;
+ return items != null && items.size() > 0
+ ? items.get(0).getOffsetHeight() : 0;
}
/*
@@ -1305,8 +1305,8 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
*/
int getItemOffsetWidth() {
List<MenuItem> items = getItems();
- return items != null && items.size() > 0 ? items.get(0)
- .getOffsetWidth() : 0;
+ return items != null && items.size() > 0
+ ? items.get(0).getOffsetWidth() : 0;
}
/**
@@ -1314,7 +1314,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
* menu currently displays the last page with less items then the
* maximum visibility (in which case the scroll is not active, but the
* scroll is active for any other page in general).
- *
+ *
* @since 7.2.6
*/
@Override
@@ -1322,8 +1322,8 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
String height = getElement().getStyle().getHeight();
String preferredHeight = getPreferredHeight(pageLength);
- return !(height == null || height.length() == 0 || height
- .equals(preferredHeight));
+ return !(height == null || height.length() == 0
+ || height.equals(preferredHeight));
}
}
@@ -1331,23 +1331,23 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
/**
* TextBox variant used as input element for filter selects, which prevents
* selecting text when disabled.
- *
+ *
* @since 7.1.5
*/
public class FilterSelectTextBox extends TextBox {
/**
* Creates a new filter select text box.
- *
+ *
* @since 7.6.4
*/
public FilterSelectTextBox() {
/*-
* Stop the browser from showing its own suggestion popup.
- *
+ *
* Using an invalid value instead of "off" as suggested by
* https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion
- *
+ *
* Leaving the non-standard Safari options autocapitalize and
* autocorrect untouched since those do not interfere in the same
* way, and they might be useful in a combo box where new items are
@@ -1367,7 +1367,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
* back, focus at the front. This means that items that are too
* long to display will display from the start and not the end
* even on Firefox.
- *
+ *
* We need the JSNI function to set selection range so that we
* can use the optional direction attribute to set the anchor to
* the end and the focus to the start. This makes Firefox work
@@ -1382,7 +1382,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
* unwanted behaviour when the width of the textbox is narrower
* than the width of the entry: the end of the entry is shown
* instead of the beginning. (see #13477)
- *
+ *
* To avoid this, we set the caret to the beginning of the line.
*/
@@ -1426,7 +1426,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.user.client.ui.Widget#onBrowserEvent(com.google.gwt
* .user.client.Event)
@@ -1575,8 +1575,8 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
suggestionPopup = createSuggestionPopup();
popupOpener.sinkEvents(Event.ONMOUSEDOWN);
- Roles.getButtonRole()
- .setAriaHiddenState(popupOpener.getElement(), true);
+ Roles.getButtonRole().setAriaHiddenState(popupOpener.getElement(),
+ true);
Roles.getButtonRole().set(popupOpener.getElement());
panel.add(tb);
@@ -1606,7 +1606,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.user.client.ui.Composite#onBrowserEvent(com.google.gwt
* .user.client.Event)
@@ -1633,7 +1633,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
* It is invoked during the Constructor and should only be overridden if a
* custom TextBox shall be used. The overriding method cannot use any
* instance variables.
- *
+ *
* @since 7.1.5
* @return TextBox instance used by this VFilterSelect
*/
@@ -1646,7 +1646,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
* instance. It is invoked during the Constructor and should only be
* overridden if a custom SuggestionPopup shall be used. The overriding
* method cannot use any instance variables.
- *
+ *
* @since 7.1.5
* @return SuggestionPopup instance used by this VFilterSelect
*/
@@ -1674,7 +1674,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
/**
* Does the Select have more pages?
- *
+ *
* @return true if a next page exists, else false if the current page is the
* last page
*/
@@ -1689,7 +1689,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
/**
* Filters the options at a certain page. Uses the text box input as a
* filter
- *
+ *
* @param page
* The page which items are to be filtered
*/
@@ -1699,7 +1699,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
/**
* Filters the options at certain page using the given filter
- *
+ *
* @param page
* The page to filter
* @param filter
@@ -1711,7 +1711,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
/**
* Filters the options at certain page using the given filter
- *
+ *
* @param page
* The page to filter
* @param filter
@@ -1725,8 +1725,8 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
if (filter.equals(lastFilter) && currentPage == page) {
if (!suggestionPopup.isAttached()) {
- suggestionPopup.showSuggestions(currentSuggestions,
- currentPage, totalMatches);
+ suggestionPopup.showSuggestions(currentSuggestions, currentPage,
+ totalMatches);
}
return;
}
@@ -1779,7 +1779,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
/**
* Sets the text in the text box.
- *
+ *
* @param text
* the text to set in the text box
*/
@@ -1819,7 +1819,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
* shown in the text box if nothing has been entered.
* <p>
* For internal use only. May be removed or replaced in the future.
- *
+ *
* @param text
* The text the text box should contain.
*/
@@ -1834,7 +1834,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
/**
* Triggered when a suggestion is selected
- *
+ *
* @param suggestion
* The suggestion that just got selected.
*/
@@ -1863,7 +1863,8 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
}
setSelectedItemIcon(suggestion.getIconUri());
- if (!(newKey.equals(selectedOptionKey) || ("".equals(newKey) && selectedOptionKey == null))) {
+ if (!(newKey.equals(selectedOptionKey)
+ || ("".equals(newKey) && selectedOptionKey == null))) {
selectedOptionKey = newKey;
client.updateVariable(paintableId, "selected",
new String[] { selectedOptionKey }, immediate);
@@ -1889,7 +1890,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
/**
* Sets the icon URI of the selected item. The icon is shown on the left
* side of the item caption text. Set the URI to null to remove the icon.
- *
+ *
* @param iconUri
* The URI of the icon
*/
@@ -1947,8 +1948,8 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
int iconHeight = WidgetUtil.getRequiredHeight(selectedItemIcon);
int marginTop = (availableHeight - iconHeight) / 2;
- selectedItemIcon.getElement().getStyle()
- .setMarginTop(marginTop, Unit.PX);
+ selectedItemIcon.getElement().getStyle().setMarginTop(marginTop,
+ Unit.PX);
}
private static Set<Integer> navigationKeyCodes = new HashSet<Integer>();
@@ -1962,7 +1963,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.KeyDownHandler#onKeyDown(com.google.gwt
* .event.dom.client.KeyDownEvent)
@@ -1984,8 +1985,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
* items, wrongly interpreted responses and more.
*/
if (enableDebug) {
- debug("Ignoring "
- + keyCode
+ debug("Ignoring " + keyCode
+ " because we are waiting for a filtering response");
}
DOM.eventPreventDefault(DOM.eventGetCurrentEvent());
@@ -2015,7 +2015,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
/**
* Triggered when a key is pressed in the text box
- *
+ *
* @param event
* The KeyDownEvent
*/
@@ -2043,9 +2043,8 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
return;
}
- if (currentSuggestion != null
- && tb.getText().equals(
- currentSuggestion.getReplacementString())) {
+ if (currentSuggestion != null && tb.getText()
+ .equals(currentSuggestion.getReplacementString())) {
// Retain behavior from #6686 by returning without stopping
// propagation if there's nothing to do
return;
@@ -2060,7 +2059,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
/**
* Triggered when a key was pressed in the suggestion popup.
- *
+ *
* @param event
* The KeyDownEvent of the key
*/
@@ -2143,7 +2142,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
/**
* Triggered when a key was depressed
- *
+ *
* @param event
* The KeyUpEvent of the key depressed
*/
@@ -2212,9 +2211,8 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
@Override
public void onClick(ClickEvent event) {
debug("VFS: onClick()");
- if (textInputEnabled
- && event.getNativeEvent().getEventTarget().cast() == tb
- .getElement()) {
+ if (textInputEnabled && event.getNativeEvent().getEventTarget()
+ .cast() == tb.getElement()) {
// Don't process clicks on the text field if text input is enabled
return;
}
@@ -2295,7 +2293,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.FocusHandler#onFocus(com.google.gwt.event
* .dom.client.FocusEvent)
@@ -2326,10 +2324,10 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
afterUpdateClientVariables();
}
- ComponentConnector connector = ConnectorMap.get(client).getConnector(
- this);
- client.getVTooltip().showAssistive(
- connector.getTooltipInfo(getElement()));
+ ComponentConnector connector = ConnectorMap.get(client)
+ .getConnector(this);
+ client.getVTooltip()
+ .showAssistive(connector.getTooltipInfo(getElement()));
}
/**
@@ -2342,7 +2340,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.BlurHandler#onBlur(com.google.gwt.event
* .dom.client.BlurEvent)
@@ -2364,9 +2362,8 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
preventNextBlurEventInIE = false;
Element focusedElement = WidgetUtil.getFocusedElement();
- if (getElement().isOrHasChild(focusedElement)
- || suggestionPopup.getElement()
- .isOrHasChild(focusedElement)) {
+ if (getElement().isOrHasChild(focusedElement) || suggestionPopup
+ .getElement().isOrHasChild(focusedElement)) {
// IF the suggestion popup or another part of the VFilterSelect
// was focused, move the focus back to the textfield and prevent
@@ -2399,7 +2396,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.Focusable#focus()
*/
@@ -2420,8 +2417,8 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
* For internal use only. May be removed or replaced in the future.
*/
public void updateRootWidth() {
- ComponentConnector paintable = ConnectorMap.get(client).getConnector(
- this);
+ ComponentConnector paintable = ConnectorMap.get(client)
+ .getConnector(this);
if (paintable.isUndefinedWidth()) {
@@ -2453,10 +2450,10 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
// Use util.getRequiredWidth instead of getOffsetWidth here
- int iconWidth = selectedItemIcon == null ? 0 : WidgetUtil
- .getRequiredWidth(selectedItemIcon);
- int buttonWidth = popupOpener == null ? 0 : WidgetUtil
- .getRequiredWidth(popupOpener);
+ int iconWidth = selectedItemIcon == null ? 0
+ : WidgetUtil.getRequiredWidth(selectedItemIcon);
+ int buttonWidth = popupOpener == null ? 0
+ : WidgetUtil.getRequiredWidth(popupOpener);
/*
* Instead of setting the width of the wrapper, set the width of
@@ -2474,8 +2471,8 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
* locked
*/
if (!tb.getElement().getStyle().getWidth().endsWith("px")) {
- int iconWidth = selectedItemIcon == null ? 0 : selectedItemIcon
- .getOffsetWidth();
+ int iconWidth = selectedItemIcon == null ? 0
+ : selectedItemIcon.getOffsetWidth();
tb.setWidth((tb.getOffsetWidth() - iconWidth) + "px");
}
}
@@ -2484,7 +2481,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
/**
* Get the width of the select in pixels where the text area and icon has
* been included.
- *
+ *
* @return The width in pixels
*/
private int getMainWidth() {
@@ -2501,7 +2498,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
/**
* Handles special behavior of the mouse down event
- *
+ *
* @param event
*/
private void handleMouseDownEvent(Event event) {
@@ -2534,7 +2531,8 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
}
@Override
- public com.google.gwt.user.client.Element getSubPartElement(String subPart) {
+ public com.google.gwt.user.client.Element getSubPartElement(
+ String subPart) {
String[] parts = subPart.split("/");
if ("textbox".equals(parts[0])) {
return tb.getElement();
@@ -2550,7 +2548,8 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
}
@Override
- public String getSubPartName(com.google.gwt.user.client.Element subElement) {
+ public String getSubPartName(
+ com.google.gwt.user.client.Element subElement) {
if (tb.getElement().isOrHasChild(subElement)) {
return "textbox";
} else if (popupOpener.getElement().isOrHasChild(subElement)) {
@@ -2594,9 +2593,9 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
}
/**
- * Sets the caption of selected item, if "scroll to page" is disabled.
- * This method is meant for internal use and may change in future versions.
- *
+ * Sets the caption of selected item, if "scroll to page" is disabled. This
+ * method is meant for internal use and may change in future versions.
+ *
* @since 7.7
* @param selectedCaption
* the caption of selected item
@@ -2610,7 +2609,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
/**
* This method is meant for internal use and may change in future versions.
- *
+ *
* @since 7.7
* @return the caption of selected item, if "scroll to page" is disabled
*/
diff --git a/client/src/main/java/com/vaadin/client/ui/VFlash.java b/client/src/main/java/com/vaadin/client/ui/VFlash.java
index eaf53836ee..00fc881bc3 100644
--- a/client/src/main/java/com/vaadin/client/ui/VFlash.java
+++ b/client/src/main/java/com/vaadin/client/ui/VFlash.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -156,10 +156,11 @@ public class VFlash extends HTML {
* this by setting his own classid.
*/
if (classId != null) {
- html.append("classid=\"" + WidgetUtil.escapeAttribute(classId)
- + "\" ");
+ html.append(
+ "classid=\"" + WidgetUtil.escapeAttribute(classId) + "\" ");
} else {
- html.append("classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" ");
+ html.append(
+ "classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" ");
}
/*
@@ -174,7 +175,8 @@ public class VFlash extends HTML {
html.append("codebase=\"" + WidgetUtil.escapeAttribute(codebase)
+ "\" ");
} else {
- html.append("codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" ");
+ html.append(
+ "codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" ");
}
// Add width and height
@@ -190,14 +192,14 @@ public class VFlash extends HTML {
// Standby
if (standby != null) {
- html.append("standby=\"" + WidgetUtil.escapeAttribute(standby)
- + "\" ");
+ html.append(
+ "standby=\"" + WidgetUtil.escapeAttribute(standby) + "\" ");
}
// Archive
if (archive != null) {
- html.append("archive=\"" + WidgetUtil.escapeAttribute(archive)
- + "\" ");
+ html.append(
+ "archive=\"" + WidgetUtil.escapeAttribute(archive) + "\" ");
}
// End object tag
@@ -213,7 +215,8 @@ public class VFlash extends HTML {
html.append("<param ");
html.append("name=\"" + WidgetUtil.escapeAttribute(name) + "\" ");
html.append("value=\""
- + WidgetUtil.escapeAttribute(embedParams.get(name)) + "\" ");
+ + WidgetUtil.escapeAttribute(embedParams.get(name))
+ + "\" ");
html.append("/>");
}
@@ -228,8 +231,8 @@ public class VFlash extends HTML {
for (String name : embedParams.keySet()) {
html.append(WidgetUtil.escapeAttribute(name));
html.append("=");
- html.append("\""
- + WidgetUtil.escapeAttribute(embedParams.get(name)) + "\"");
+ html.append("\"" + WidgetUtil.escapeAttribute(embedParams.get(name))
+ + "\"");
}
// End embed tag
diff --git a/client/src/main/java/com/vaadin/client/ui/VForm.java b/client/src/main/java/com/vaadin/client/ui/VForm.java
index ca38ea070b..ca1217551e 100644
--- a/client/src/main/java/com/vaadin/client/ui/VForm.java
+++ b/client/src/main/java/com/vaadin/client/ui/VForm.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/VFormLayout.java b/client/src/main/java/com/vaadin/client/ui/VFormLayout.java
index 3719688f2b..a221222b92 100644
--- a/client/src/main/java/com/vaadin/client/ui/VFormLayout.java
+++ b/client/src/main/java/com/vaadin/client/ui/VFormLayout.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -60,7 +60,7 @@ public class VFormLayout extends SimplePanel {
/**
* Parses the stylenames from shared state
- *
+ *
* @param state
* shared state of the component
* @param enabled
@@ -100,7 +100,7 @@ public class VFormLayout extends SimplePanel {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.ClickHandler#onClick(com.google.gwt
* .event.dom.client.ClickEvent)
@@ -111,7 +111,8 @@ public class VFormLayout extends SimplePanel {
if (caption.getOwner() != null) {
if (caption.getOwner() instanceof Focusable) {
((Focusable) caption.getOwner()).focus();
- } else if (caption.getOwner() instanceof com.google.gwt.user.client.ui.Focusable) {
+ } else if (caption
+ .getOwner() instanceof com.google.gwt.user.client.ui.Focusable) {
((com.google.gwt.user.client.ui.Focusable) caption
.getOwner()).setFocus(true);
}
@@ -124,8 +125,7 @@ public class VFormLayout extends SimplePanel {
margins.hasTop());
setStyleName(margin, CLASSNAME + "-" + StyleConstants.MARGIN_RIGHT,
margins.hasRight());
- setStyleName(margin,
- CLASSNAME + "-" + StyleConstants.MARGIN_BOTTOM,
+ setStyleName(margin, CLASSNAME + "-" + StyleConstants.MARGIN_BOTTOM,
margins.hasBottom());
setStyleName(margin, CLASSNAME + "-" + StyleConstants.MARGIN_LEFT,
margins.hasLeft());
@@ -225,7 +225,7 @@ public class VFormLayout extends SimplePanel {
private Element captionContent;
/**
- *
+ *
* @param component
* optional owner of caption. If not set, getOwner will
* return null
@@ -253,7 +253,8 @@ public class VFormLayout extends SimplePanel {
setStyleName(styleName);
}
- public void updateCaption(AbstractComponentState state, boolean enabled) {
+ public void updateCaption(AbstractComponentState state,
+ boolean enabled) {
// Update styles as they might have changed when the caption changed
setStyles(getStylesFromState(state, enabled));
@@ -264,9 +265,8 @@ public class VFormLayout extends SimplePanel {
icon = null;
}
if (state.resources.containsKey(ComponentConstants.ICON_RESOURCE)) {
- icon = owner.getConnection().getIcon(
- state.resources.get(ComponentConstants.ICON_RESOURCE)
- .getURL());
+ icon = owner.getConnection().getIcon(state.resources
+ .get(ComponentConstants.ICON_RESOURCE).getURL());
DOM.insertChild(getElement(), icon.getElement(), 0);
isEmpty = false;
@@ -317,8 +317,8 @@ public class VFormLayout extends SimplePanel {
// Hide the required indicator from screen reader, as this
// information is set directly at the input field
- Roles.getTextboxRole().setAriaHiddenState(
- requiredFieldIndicator, true);
+ Roles.getTextboxRole()
+ .setAriaHiddenState(requiredFieldIndicator, true);
}
} else {
if (requiredFieldIndicator != null) {
@@ -330,7 +330,7 @@ public class VFormLayout extends SimplePanel {
/**
* Returns Paintable for which this Caption belongs to.
- *
+ *
* @return owner Widget
*/
public ComponentConnector getOwner() {
@@ -378,8 +378,8 @@ public class VFormLayout extends SimplePanel {
// Hide the error indicator from screen reader, as this
// information is set directly at the input field
- Roles.getFormRole().setAriaHiddenState(
- errorIndicatorElement, true);
+ Roles.getFormRole()
+ .setAriaHiddenState(errorIndicatorElement, true);
}
} else if (errorIndicatorElement != null) {
diff --git a/client/src/main/java/com/vaadin/client/ui/VGridLayout.java b/client/src/main/java/com/vaadin/client/ui/VGridLayout.java
index 9e13bb7fb2..c9140b8e91 100644
--- a/client/src/main/java/com/vaadin/client/ui/VGridLayout.java
+++ b/client/src/main/java/com/vaadin/client/ui/VGridLayout.java
@@ -97,7 +97,7 @@ public class VGridLayout extends ComplexPanel {
/**
* Returns the column widths measured in pixels
- *
+ *
* @return
*/
protected int[] getColumnWidths() {
@@ -106,7 +106,7 @@ public class VGridLayout extends ComplexPanel {
/**
* Returns the row heights measured in pixels
- *
+ *
* @return
*/
protected int[] getRowHeights() {
@@ -115,7 +115,7 @@ public class VGridLayout extends ComplexPanel {
/**
* Returns the spacing between the cells horizontally in pixels
- *
+ *
* @return
*/
protected int getHorizontalSpacing() {
@@ -124,7 +124,7 @@ public class VGridLayout extends ComplexPanel {
/**
* Returns the spacing between the cells vertically in pixels
- *
+ *
* @return
*/
protected int getVerticalSpacing() {
@@ -155,7 +155,8 @@ public class VGridLayout extends ComplexPanel {
expandRatioSum += actualExpandRatio[i];
}
for (int i = 0; i < rowHeights.length; i++) {
- int ew = (int) (excessSpace * actualExpandRatio[i] / expandRatioSum);
+ int ew = (int) (excessSpace * actualExpandRatio[i]
+ / expandRatioSum);
rowHeights[i] = minRowHeights[i] + ew;
distributed += ew;
}
@@ -184,7 +185,7 @@ public class VGridLayout extends ComplexPanel {
/**
* Checks if it is ok to hide (or ignore) the given row.
- *
+ *
* @param rowIndex
* the row to check
* @return true, if the row should be interpreted as non-existant (hides
@@ -197,7 +198,7 @@ public class VGridLayout extends ComplexPanel {
/**
* Checks if it is ok to hide (or ignore) the given column.
- *
+ *
* @param columnIndex
* the column to check
* @return true, if the column should be interpreted as non-existant (hides
@@ -236,7 +237,8 @@ public class VGridLayout extends ComplexPanel {
expandRatioSum += actualExpandRatio[i];
}
for (int i = 0; i < columnWidths.length; i++) {
- int ew = (int) (excessSpace * actualExpandRatio[i] / expandRatioSum);
+ int ew = (int) (excessSpace * actualExpandRatio[i]
+ / expandRatioSum);
columnWidths[i] = minColumnWidths[i] + ew;
distributed += ew;
}
@@ -533,9 +535,8 @@ public class VGridLayout extends ComplexPanel {
}
}
- private static void distributeSpanSize(int[] dimensions,
- int spanStartIndex, int spanSize, int spacingSize, int size,
- float[] expansionRatios) {
+ private static void distributeSpanSize(int[] dimensions, int spanStartIndex,
+ int spanSize, int spacingSize, int size, float[] expansionRatios) {
int allocated = dimensions[spanStartIndex];
for (int i = 1; i < spanSize; i++) {
allocated += spacingSize + dimensions[spanStartIndex + i];
@@ -784,7 +785,7 @@ public class VGridLayout extends ComplexPanel {
* Creates a new Cell with the given coordinates.
* <p>
* For internal use only. May be removed or replaced in the future.
- *
+ *
* @param row
* @param col
* @return
@@ -800,7 +801,7 @@ public class VGridLayout extends ComplexPanel {
* child component is also returned if "element" is part of its caption.
* <p>
* For internal use only. May be removed or replaced in the future.
- *
+ *
* @param element
* An element that is a nested sub element of the root element in
* this layout
@@ -821,13 +822,13 @@ public class VGridLayout extends ComplexPanel {
* child component is also returned if "element" is part of its caption.
* <p>
* For internal use only. May be removed or replaced in the future.
- *
+ *
* @param element
* An element that is a nested sub element of the root element in
* this layout
* @return The Paintable which the element is a part of. Null if the element
* belongs to the layout and not to a child.
- *
+ *
* @since 7.2
*/
public ComponentConnector getComponent(Element element) {
diff --git a/client/src/main/java/com/vaadin/client/ui/VHorizontalLayout.java b/client/src/main/java/com/vaadin/client/ui/VHorizontalLayout.java
index b890aefe3d..295117f6c9 100644
--- a/client/src/main/java/com/vaadin/client/ui/VHorizontalLayout.java
+++ b/client/src/main/java/com/vaadin/client/ui/VHorizontalLayout.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/VImage.java b/client/src/main/java/com/vaadin/client/ui/VImage.java
index 2742182179..3f0828a9ba 100644
--- a/client/src/main/java/com/vaadin/client/ui/VImage.java
+++ b/client/src/main/java/com/vaadin/client/ui/VImage.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/VLabel.java b/client/src/main/java/com/vaadin/client/ui/VLabel.java
index a3572759c4..d1358c4df0 100644
--- a/client/src/main/java/com/vaadin/client/ui/VLabel.java
+++ b/client/src/main/java/com/vaadin/client/ui/VLabel.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/VLazyExecutor.java b/client/src/main/java/com/vaadin/client/ui/VLazyExecutor.java
index dfa4f574c6..7190de45b3 100644
--- a/client/src/main/java/com/vaadin/client/ui/VLazyExecutor.java
+++ b/client/src/main/java/com/vaadin/client/ui/VLazyExecutor.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.google.gwt.user.client.Timer;
* {@link #trigger()}. Calling {@link #trigger()} again before the command has
* been executed causes the execution to be rescheduled to {@code delayMs} after
* the second call.
- *
+ *
*/
public class VLazyExecutor {
diff --git a/client/src/main/java/com/vaadin/client/ui/VLink.java b/client/src/main/java/com/vaadin/client/ui/VLink.java
index de99a8617f..929413db77 100644
--- a/client/src/main/java/com/vaadin/client/ui/VLink.java
+++ b/client/src/main/java/com/vaadin/client/ui/VLink.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/VListSelect.java b/client/src/main/java/com/vaadin/client/ui/VListSelect.java
index 83e25163b3..82b7e9a229 100644
--- a/client/src/main/java/com/vaadin/client/ui/VListSelect.java
+++ b/client/src/main/java/com/vaadin/client/ui/VListSelect.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/VMediaBase.java b/client/src/main/java/com/vaadin/client/ui/VMediaBase.java
index 53d7cef02d..8a6cd1af29 100644
--- a/client/src/main/java/com/vaadin/client/ui/VMediaBase.java
+++ b/client/src/main/java/com/vaadin/client/ui/VMediaBase.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,7 +31,7 @@ public abstract class VMediaBase extends Widget {
/**
* Sets the MediaElement that is to receive all commands and properties.
- *
+ *
* @param element
*/
public void setMediaElement(MediaElement element) {
diff --git a/client/src/main/java/com/vaadin/client/ui/VMenuBar.java b/client/src/main/java/com/vaadin/client/ui/VMenuBar.java
index e0cea1c837..54a8f58c23 100644
--- a/client/src/main/java/com/vaadin/client/ui/VMenuBar.java
+++ b/client/src/main/java/com/vaadin/client/ui/VMenuBar.java
@@ -52,8 +52,8 @@ import com.vaadin.client.Util;
import com.vaadin.client.WidgetUtil;
import com.vaadin.shared.ui.menubar.MenuBarConstants;
-public class VMenuBar extends SimpleFocusablePanel implements
- CloseHandler<PopupPanel>, KeyPressHandler, KeyDownHandler,
+public class VMenuBar extends SimpleFocusablePanel
+ implements CloseHandler<PopupPanel>, KeyPressHandler, KeyDownHandler,
FocusHandler, SubPartAware {
// The hierarchy of VMenuBar is a bit weird as VMenuBar is the Paintable,
@@ -170,8 +170,8 @@ public class VMenuBar extends SimpleFocusablePanel implements
}
protected void updateStyleNames() {
- String primaryStyleName = getParentMenu() != null ? getParentMenu()
- .getStylePrimaryName() : getStylePrimaryName();
+ String primaryStyleName = getParentMenu() != null
+ ? getParentMenu().getStylePrimaryName() : getStylePrimaryName();
// Reset the style name for all the items
for (CustomMenuItem item : items) {
@@ -183,8 +183,8 @@ public class VMenuBar extends SimpleFocusablePanel implements
/*
* Sub-menus should get the sub-menu prefix
*/
- super.setStylePrimaryName(primaryStyleName
- + SUBMENU_CLASSNAME_PREFIX);
+ super.setStylePrimaryName(
+ primaryStyleName + SUBMENU_CLASSNAME_PREFIX);
}
}
@@ -223,7 +223,8 @@ public class VMenuBar extends SimpleFocusablePanel implements
if (item.getChildCount() > 0) {
String bgStyle = "";
itemHTML.append("<span class=\"" + getStylePrimaryName()
- + "-submenu-indicator\"" + bgStyle + ">&#x25BA;</span>");
+ + "-submenu-indicator\"" + bgStyle
+ + ">&#x25BA;</span>");
}
itemHTML.append("<span class=\"" + getStylePrimaryName()
@@ -245,7 +246,7 @@ public class VMenuBar extends SimpleFocusablePanel implements
/**
* This is called by the items in the menu and it communicates the
* information to the server
- *
+ *
* @param clickedItemId
* id of the item that was clicked
*/
@@ -282,7 +283,7 @@ public class VMenuBar extends SimpleFocusablePanel implements
/**
* Returns the containing element of the menu
- *
+ *
* @return
*/
@Override
@@ -292,7 +293,7 @@ public class VMenuBar extends SimpleFocusablePanel implements
/**
* Add a new item to this menu
- *
+ *
* @param html
* items text
* @param cmd
@@ -309,7 +310,7 @@ public class VMenuBar extends SimpleFocusablePanel implements
/**
* Add a new item to this menu
- *
+ *
* @param item
*/
public void addItem(CustomMenuItem item) {
@@ -334,7 +335,7 @@ public class VMenuBar extends SimpleFocusablePanel implements
/**
* Remove the given item from this menu
- *
+ *
* @param item
*/
public void removeItem(CustomMenuItem item) {
@@ -431,7 +432,7 @@ public class VMenuBar extends SimpleFocusablePanel implements
/**
* When an item is clicked
- *
+ *
* @param item
*/
public void itemClick(CustomMenuItem item) {
@@ -462,11 +463,12 @@ public class VMenuBar extends SimpleFocusablePanel implements
/**
* When the user hovers the mouse over the item
- *
+ *
* @param item
*/
public void itemOver(CustomMenuItem item) {
- if ((openRootOnHover || subMenu || menuVisible) && !item.isSeparator()) {
+ if ((openRootOnHover || subMenu || menuVisible)
+ && !item.isSeparator()) {
setSelected(item);
if (!subMenu && openRootOnHover && !menuVisible) {
menuVisible = true; // start opening menus
@@ -488,7 +490,7 @@ public class VMenuBar extends SimpleFocusablePanel implements
/**
* When the mouse is moved away from an item
- *
+ *
* @param item
*/
public void itemOut(CustomMenuItem item) {
@@ -546,7 +548,7 @@ public class VMenuBar extends SimpleFocusablePanel implements
/**
* Shows the child menu of an item. The caller must ensure that the item has
* a submenu.
- *
+ *
* @param item
*/
public void showChildMenu(CustomMenuItem item) {
@@ -575,11 +577,11 @@ public class VMenuBar extends SimpleFocusablePanel implements
* Use parents primary style name if possible and remove the submenu
* prefix if needed
*/
- String primaryStyleName = parentMenu != null ? parentMenu
- .getStylePrimaryName() : getStylePrimaryName();
+ String primaryStyleName = parentMenu != null
+ ? parentMenu.getStylePrimaryName() : getStylePrimaryName();
if (subMenu) {
- primaryStyleName = primaryStyleName.replace(
- SUBMENU_CLASSNAME_PREFIX, "");
+ primaryStyleName = primaryStyleName
+ .replace(SUBMENU_CLASSNAME_PREFIX, "");
}
popup.setStyleName(primaryStyleName + "-popup");
@@ -636,9 +638,9 @@ public class VMenuBar extends SimpleFocusablePanel implements
/**
* Create an overlay for the menu bar.
- *
+ *
* This method can be overridden to use a custom overlay.
- *
+ *
* @since 7.6
* @return overlay to use
*/
@@ -648,8 +650,8 @@ public class VMenuBar extends SimpleFocusablePanel implements
private int adjustPopupHeight(int top, final int shadowSpace) {
// Check that the popup will fit the screen
- int availableHeight = RootPanel.getBodyElement().getOffsetHeight()
- - top - shadowSpace;
+ int availableHeight = RootPanel.getBodyElement().getOffsetHeight() - top
+ - shadowSpace;
int missingHeight = popup.getOffsetHeight() - availableHeight;
if (missingHeight > 0) {
// First move the top of the popup to get more space
@@ -683,7 +685,7 @@ public class VMenuBar extends SimpleFocusablePanel implements
/**
* Hides the submenu of an item
- *
+ *
* @param item
*/
public void hideChildMenu(CustomMenuItem item) {
@@ -727,9 +729,9 @@ public class VMenuBar extends SimpleFocusablePanel implements
}
/**
- *
+ *
* Recursively hide all child menus
- *
+ *
* @param animateIn
* enable/disable animate-in animation when hide popup
* @param animateOut
@@ -761,7 +763,7 @@ public class VMenuBar extends SimpleFocusablePanel implements
/**
* Returns the parent menu of this menu, or null if this is the top-level
* menu
- *
+ *
* @return
*/
public VMenuBar getParentMenu() {
@@ -770,7 +772,7 @@ public class VMenuBar extends SimpleFocusablePanel implements
/**
* Set the parent menu of this menu
- *
+ *
* @param parent
*/
public void setParentMenu(VMenuBar parent) {
@@ -780,7 +782,7 @@ public class VMenuBar extends SimpleFocusablePanel implements
/**
* Returns the currently selected item of this menu, or null if nothing is
* selected
- *
+ *
* @return
*/
public CustomMenuItem getSelected() {
@@ -789,7 +791,7 @@ public class VMenuBar extends SimpleFocusablePanel implements
/**
* Set the currently selected item of this menu
- *
+ *
* @param item
*/
public void setSelected(CustomMenuItem item) {
@@ -806,9 +808,9 @@ public class VMenuBar extends SimpleFocusablePanel implements
}
/**
- *
+ *
* A class to hold information on menu items
- *
+ *
*/
public static class CustomMenuItem extends Widget implements HasHTML {
@@ -827,7 +829,7 @@ public class VMenuBar extends SimpleFocusablePanel implements
/**
* Default menu item {@link Widget} constructor for GWT.create().
- *
+ *
* Use {@link #setHTML(String)} and {@link #setCommand(Command)} after
* constructing a menu item.
*/
@@ -837,7 +839,7 @@ public class VMenuBar extends SimpleFocusablePanel implements
/**
* Creates a menu item {@link Widget}.
- *
+ *
* @param html
* @param cmd
* @deprecated use the default constructor and {@link #setHTML(String)}
@@ -921,8 +923,8 @@ public class VMenuBar extends SimpleFocusablePanel implements
String primaryStyleName = parentMenu.getStylePrimaryName();
if (parentMenu.subMenu) {
- primaryStyleName = primaryStyleName.replace(
- SUBMENU_CLASSNAME_PREFIX, "");
+ primaryStyleName = primaryStyleName
+ .replace(SUBMENU_CLASSNAME_PREFIX, "");
}
String currentStyles = super.getStyleName();
@@ -1054,20 +1056,21 @@ public class VMenuBar extends SimpleFocusablePanel implements
// if the selected attribute is present (either true or false),
// the item is selectable
setCheckable(true);
- setChecked(uidl
- .getBooleanAttribute(MenuBarConstants.ATTRIBUTE_CHECKED));
+ setChecked(uidl.getBooleanAttribute(
+ MenuBarConstants.ATTRIBUTE_CHECKED));
} else {
setCheckable(false);
}
if (uidl.hasAttribute(MenuBarConstants.ATTRIBUTE_ITEM_STYLE)) {
- styleName = uidl
- .getStringAttribute(MenuBarConstants.ATTRIBUTE_ITEM_STYLE);
+ styleName = uidl.getStringAttribute(
+ MenuBarConstants.ATTRIBUTE_ITEM_STYLE);
}
- if (uidl.hasAttribute(MenuBarConstants.ATTRIBUTE_ITEM_DESCRIPTION)) {
- description = uidl
- .getStringAttribute(MenuBarConstants.ATTRIBUTE_ITEM_DESCRIPTION);
+ if (uidl.hasAttribute(
+ MenuBarConstants.ATTRIBUTE_ITEM_DESCRIPTION)) {
+ description = uidl.getStringAttribute(
+ MenuBarConstants.ATTRIBUTE_ITEM_DESCRIPTION);
}
updateStyleNames();
@@ -1083,7 +1086,7 @@ public class VMenuBar extends SimpleFocusablePanel implements
/**
* Checks if the item can be selected.
- *
+ *
* @return true if it is possible to select this item, false otherwise
*/
public boolean isSelectable() {
@@ -1103,8 +1106,8 @@ public class VMenuBar extends SimpleFocusablePanel implements
public void iLayout(boolean iconLoadEvent) {
// Only collapse if there is more than one item in the root menu and the
// menu has an explicit size
- if ((getItems().size() > 1 || (collapsedRootItems != null && collapsedRootItems
- .getItems().size() > 0))
+ if ((getItems().size() > 1 || (collapsedRootItems != null
+ && collapsedRootItems.getItems().size() > 0))
&& getElement().getStyle().getProperty("width") != null
&& moreItem != null) {
@@ -1116,8 +1119,8 @@ public class VMenuBar extends SimpleFocusablePanel implements
removeItem(moreItem);
}
- int availableWidth = LayoutManager.get(client).getInnerWidth(
- getElement());
+ int availableWidth = LayoutManager.get(client)
+ .getInnerWidth(getElement());
// Used width includes the "more" item if present
int usedWidth = getConsumedWidth();
@@ -1134,8 +1137,8 @@ public class VMenuBar extends SimpleFocusablePanel implements
while (widthReduced < widthNeeded && getItems().size() > 0) {
// Move last root menu item to collapsed menu
- CustomMenuItem collapse = getItems().get(
- getItems().size() - 1);
+ CustomMenuItem collapse = getItems()
+ .get(getItems().size() - 1);
widthReduced += collapse.getOffsetWidth();
removeItem(collapse);
collapsedRootItems.addItem(collapse, 0);
@@ -1194,7 +1197,7 @@ public class VMenuBar extends SimpleFocusablePanel implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.KeyPressHandler#onKeyPress(com.google
* .gwt.event.dom.client.KeyPressEvent)
@@ -1217,7 +1220,7 @@ public class VMenuBar extends SimpleFocusablePanel implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.KeyDownHandler#onKeyDown(com.google.gwt
* .event.dom.client.KeyDownEvent)
@@ -1242,7 +1245,7 @@ public class VMenuBar extends SimpleFocusablePanel implements
* Get the key that moves the selection upwards. By default it is the up
* arrow key but by overriding this you can change the key to whatever you
* want.
- *
+ *
* @return The keycode of the key
*/
protected int getNavigationUpKey() {
@@ -1253,7 +1256,7 @@ public class VMenuBar extends SimpleFocusablePanel implements
* Get the key that moves the selection downwards. By default it is the down
* arrow key but by overriding this you can change the key to whatever you
* want.
- *
+ *
* @return The keycode of the key
*/
protected int getNavigationDownKey() {
@@ -1264,7 +1267,7 @@ public class VMenuBar extends SimpleFocusablePanel implements
* Get the key that moves the selection left. By default it is the left
* arrow key but by overriding this you can change the key to whatever you
* want.
- *
+ *
* @return The keycode of the key
*/
protected int getNavigationLeftKey() {
@@ -1275,7 +1278,7 @@ public class VMenuBar extends SimpleFocusablePanel implements
* Get the key that moves the selection right. By default it is the right
* arrow key but by overriding this you can change the key to whatever you
* want.
- *
+ *
* @return The keycode of the key
*/
protected int getNavigationRightKey() {
@@ -1285,7 +1288,7 @@ public class VMenuBar extends SimpleFocusablePanel implements
/**
* Get the key that selects a menu item. By default it is the Enter key but
* by overriding this you can change the key to whatever you want.
- *
+ *
* @deprecated use {@link #isNavigationSelectKey(int)} instead
* @return
*/
@@ -1298,7 +1301,7 @@ public class VMenuBar extends SimpleFocusablePanel implements
* Checks whether key code selects a menu item. By default it is the Enter
* and Space keys but by overriding this you can change the keys to whatever
* you want.
- *
+ *
* @since 7.2
* @param keycode
* @return true if key selects menu item
@@ -1311,7 +1314,7 @@ public class VMenuBar extends SimpleFocusablePanel implements
/**
* Get the key that closes the menu. By default it is the escape key but by
* overriding this yoy can change the key to whatever you want.
- *
+ *
* @return
*/
protected int getCloseMenuKey() {
@@ -1320,7 +1323,7 @@ public class VMenuBar extends SimpleFocusablePanel implements
/**
* Handles the keyboard events handled by the MenuBar
- *
+ *
* @param event
* The keyboard event received
* @return true iff the navigation event was handled
@@ -1569,7 +1572,7 @@ public class VMenuBar extends SimpleFocusablePanel implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.FocusHandler#onFocus(com.google.gwt.event
* .dom.client.FocusEvent)
@@ -1582,10 +1585,11 @@ public class VMenuBar extends SimpleFocusablePanel implements
private final String SUBPART_PREFIX = "item";
@Override
- public com.google.gwt.user.client.Element getSubPartElement(String subPart) {
+ public com.google.gwt.user.client.Element getSubPartElement(
+ String subPart) {
if (subPart.startsWith(SUBPART_PREFIX)) {
- int index = Integer.parseInt(subPart.substring(SUBPART_PREFIX
- .length()));
+ int index = Integer
+ .parseInt(subPart.substring(SUBPART_PREFIX.length()));
CustomMenuItem item = getItems().get(index);
return item.getElement();
@@ -1604,7 +1608,8 @@ public class VMenuBar extends SimpleFocusablePanel implements
if (!item.isSeparator() && isItemNamed(item, subPart)) {
return item.getElement();
}
- if (item.getSubMenu() != null && item.getSubMenu().menuVisible) {
+ if (item.getSubMenu() != null
+ && item.getSubMenu().menuVisible) {
submenuItems.addAll(item.getSubMenu().getItems());
}
@@ -1649,7 +1654,8 @@ public class VMenuBar extends SimpleFocusablePanel implements
}
@Override
- public String getSubPartName(com.google.gwt.user.client.Element subElement) {
+ public String getSubPartName(
+ com.google.gwt.user.client.Element subElement) {
if (!getElement().isOrHasChild(subElement)) {
return null;
}
@@ -1673,7 +1679,7 @@ public class VMenuBar extends SimpleFocusablePanel implements
/**
* Get menu item with given DOM element
- *
+ *
* @param element
* Element used in search
* @return Menu item or null if not found
@@ -1702,11 +1708,11 @@ public class VMenuBar extends SimpleFocusablePanel implements
/**
* Get menu item with given DOM element
- *
+ *
* @param element
* Element used in search
* @return Menu item or null if not found
- *
+ *
* @since 7.2
*/
public CustomMenuItem getMenuItemWithElement(Element element) {
diff --git a/client/src/main/java/com/vaadin/client/ui/VNativeButton.java b/client/src/main/java/com/vaadin/client/ui/VNativeButton.java
index 77b2515f45..6378da871d 100644
--- a/client/src/main/java/com/vaadin/client/ui/VNativeButton.java
+++ b/client/src/main/java/com/vaadin/client/ui/VNativeButton.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -126,7 +126,7 @@ public class VNativeButton extends Button implements ClickHandler {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.ClickHandler#onClick(com.google.gwt.event
* .dom.client.ClickEvent)
diff --git a/client/src/main/java/com/vaadin/client/ui/VNativeSelect.java b/client/src/main/java/com/vaadin/client/ui/VNativeSelect.java
index 330442b550..bd9386f601 100644
--- a/client/src/main/java/com/vaadin/client/ui/VNativeSelect.java
+++ b/client/src/main/java/com/vaadin/client/ui/VNativeSelect.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -92,8 +92,8 @@ public class VNativeSelect extends VOptionGroupBase implements Field {
client.updateVariable(paintableId, "selected", getSelectedItems(),
isImmediate());
} else {
- client.updateVariable(paintableId, "selected", new String[] { ""
- + getSelectedItem() }, isImmediate());
+ client.updateVariable(paintableId, "selected",
+ new String[] { "" + getSelectedItem() }, isImmediate());
}
if (firstValueIsTemporaryNullItem) {
// remove temporary empty item
@@ -102,9 +102,9 @@ public class VNativeSelect extends VOptionGroupBase implements Field {
/*
* Workaround to achrome bug that may cause value change event not
* to fire when selection is done with keyboard.
- *
+ *
* http://dev.vaadin.com/ticket/10109
- *
+ *
* Problem is confirmed to exist only on Chrome-Win, but just
* execute in for all webkits. Probably exists also in other
* webkits/blinks on windows.
diff --git a/client/src/main/java/com/vaadin/client/ui/VNotification.java b/client/src/main/java/com/vaadin/client/ui/VNotification.java
index 1ff51df8d0..9b361ae114 100644
--- a/client/src/main/java/com/vaadin/client/ui/VNotification.java
+++ b/client/src/main/java/com/vaadin/client/ui/VNotification.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -108,7 +108,7 @@ public class VNotification extends VOverlay {
/**
* @deprecated Use static {@link #createNotification(int)} instead to enable
* GWT deferred binding.
- *
+ *
* @param delayMsec
*/
@Deprecated
@@ -131,7 +131,7 @@ public class VNotification extends VOverlay {
/**
* @deprecated Use static {@link #createNotification(int, int, int)} instead
* to enable GWT deferred binding.
- *
+ *
* @param delayMsec
* @param fadeMsec
* @param startOpacity
@@ -227,8 +227,8 @@ public class VNotification extends VOverlay {
return null;
}
- return getApplicationConnection().getUIConnector().getState().notificationConfigurations
- .get(style);
+ return getApplicationConnection().getUIConnector()
+ .getState().notificationConfigurations.get(style);
}
private void setWaiAriaRole(NotificationTypeConfiguration styleSetup) {
@@ -296,14 +296,13 @@ public class VNotification extends VOverlay {
// Still animating in, wait for it to finish before touching
// the animation delay (which would restart the animation-in
// in some browsers)
- if (getStyleName().contains(
- VOverlay.ADDITIONAL_CLASSNAME_ANIMATE_IN)) {
+ if (getStyleName()
+ .contains(VOverlay.ADDITIONAL_CLASSNAME_ANIMATE_IN)) {
AnimationUtil.addAnimationEndListener(getElement(),
new AnimationEndListener() {
@Override
public void onAnimationEnd(NativeEvent event) {
- if (AnimationUtil
- .getAnimationName(event)
+ if (AnimationUtil.getAnimationName(event)
.contains(
VOverlay.ADDITIONAL_CLASSNAME_ANIMATE_IN)) {
VNotification.this.hide();
@@ -439,8 +438,10 @@ public class VNotification extends VOverlay {
if (x < 0) {
x = DOM.eventGetClientX(event);
y = DOM.eventGetClientY(event);
- } else if (Math.abs(DOM.eventGetClientX(event) - x) > mouseMoveThreshold
- || Math.abs(DOM.eventGetClientY(event) - y) > mouseMoveThreshold) {
+ } else if (Math
+ .abs(DOM.eventGetClientX(event) - x) > mouseMoveThreshold
+ || Math.abs(DOM.eventGetClientY(event)
+ - y) > mouseMoveThreshold) {
hideAfterDelay();
}
break;
@@ -487,18 +488,19 @@ public class VNotification extends VOverlay {
public static void showNotification(ApplicationConnection client,
final UIDL notification) {
- boolean onlyPlainText = notification
- .hasAttribute(UIConstants.NOTIFICATION_HTML_CONTENT_NOT_ALLOWED);
+ boolean onlyPlainText = notification.hasAttribute(
+ UIConstants.NOTIFICATION_HTML_CONTENT_NOT_ALLOWED);
String html = "";
- if (notification.hasAttribute(UIConstants.ATTRIBUTE_NOTIFICATION_ICON)) {
- String iconUri = notification
- .getStringAttribute(UIConstants.ATTRIBUTE_NOTIFICATION_ICON);
+ if (notification
+ .hasAttribute(UIConstants.ATTRIBUTE_NOTIFICATION_ICON)) {
+ String iconUri = notification.getStringAttribute(
+ UIConstants.ATTRIBUTE_NOTIFICATION_ICON);
html += client.getIcon(iconUri).getElement().getString();
}
if (notification
.hasAttribute(UIConstants.ATTRIBUTE_NOTIFICATION_CAPTION)) {
- String caption = notification
- .getStringAttribute(UIConstants.ATTRIBUTE_NOTIFICATION_CAPTION);
+ String caption = notification.getStringAttribute(
+ UIConstants.ATTRIBUTE_NOTIFICATION_CAPTION);
if (onlyPlainText) {
caption = WidgetUtil.escapeHTML(caption);
caption = caption.replaceAll("\\n", "<br />");
@@ -508,20 +510,21 @@ public class VNotification extends VOverlay {
}
if (notification
.hasAttribute(UIConstants.ATTRIBUTE_NOTIFICATION_MESSAGE)) {
- String message = notification
- .getStringAttribute(UIConstants.ATTRIBUTE_NOTIFICATION_MESSAGE);
+ String message = notification.getStringAttribute(
+ UIConstants.ATTRIBUTE_NOTIFICATION_MESSAGE);
if (onlyPlainText) {
message = WidgetUtil.escapeHTML(message);
message = message.replaceAll("\\n", "<br />");
}
- html += "<p class='" + getDependentStyle(client, DESCRIPTION)
- + "'>" + message + "</p>";
+ html += "<p class='" + getDependentStyle(client, DESCRIPTION) + "'>"
+ + message + "</p>";
}
final String style = notification
- .hasAttribute(UIConstants.ATTRIBUTE_NOTIFICATION_STYLE) ? notification
- .getStringAttribute(UIConstants.ATTRIBUTE_NOTIFICATION_STYLE)
- : null;
+ .hasAttribute(UIConstants.ATTRIBUTE_NOTIFICATION_STYLE)
+ ? notification.getStringAttribute(
+ UIConstants.ATTRIBUTE_NOTIFICATION_STYLE)
+ : null;
final int pos = notification
.getIntAttribute(UIConstants.ATTRIBUTE_NOTIFICATION_POSITION);
@@ -529,13 +532,13 @@ public class VNotification extends VOverlay {
final int delay = notification
.getIntAttribute(UIConstants.ATTRIBUTE_NOTIFICATION_DELAY);
- createNotification(delay, client.getUIConnector().getWidget()).show(
- html, position, style);
+ createNotification(delay, client.getUIConnector().getWidget())
+ .show(html, position, style);
}
/**
* Meant for internal usage only.
- *
+ *
* @since 7.5.0
* @param client
* application connection
@@ -546,15 +549,16 @@ public class VNotification extends VOverlay {
*/
public static String getDependentStyle(ApplicationConnection client,
String style) {
- VNotification notification = createNotification(-1, client
- .getUIConnector().getWidget());
+ VNotification notification = createNotification(-1,
+ client.getUIConnector().getWidget());
String styleName = notification.getStyleName();
notification.addStyleDependentName(style);
String extendedStyle = notification.getStyleName();
return extendedStyle.substring(styleName.length()).trim();
}
- public static VNotification createNotification(int delayMsec, Widget owner) {
+ public static VNotification createNotification(int delayMsec,
+ Widget owner) {
final VNotification notification = GWT.create(VNotification.class);
notification.setWaiAriaRole(null);
notification.setDelay(delayMsec);
@@ -589,7 +593,7 @@ public class VNotification extends VOverlay {
* stack. Can be called when opening other overlays such as subwindows to
* ensure the notifications receive the events they need and don't linger
* indefinitely. See #7136.
- *
+ *
* TODO Should this be a generic Overlay feature instead?
*/
public static void bringNotificationsToFront() {
@@ -602,10 +606,10 @@ public class VNotification extends VOverlay {
/**
* Shows an error notification and redirects the user to the given URL when
* she clicks on the notification.
- *
+ *
* If both message and caption are null, redirects the user to the url
* immediately
- *
+ *
* @since 7.5.1
* @param connection
* A reference to the ApplicationConnection
@@ -663,10 +667,10 @@ public class VNotification extends VOverlay {
/**
* Listens for Notification hide event, and redirects. Used for system
* messages, such as session expired.
- *
+ *
*/
- private static class NotificationRedirect implements
- VNotification.EventListener {
+ private static class NotificationRedirect
+ implements VNotification.EventListener {
String url;
NotificationRedirect(String url) {
diff --git a/client/src/main/java/com/vaadin/client/ui/VOptionGroup.java b/client/src/main/java/com/vaadin/client/ui/VOptionGroup.java
index 9a28111dc5..72b0d841f0 100644
--- a/client/src/main/java/com/vaadin/client/ui/VOptionGroup.java
+++ b/client/src/main/java/com/vaadin/client/ui/VOptionGroup.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -48,8 +48,8 @@ import com.vaadin.client.WidgetUtil;
import com.vaadin.shared.EventId;
import com.vaadin.shared.ui.optiongroup.OptionGroupConstants;
-public class VOptionGroup extends VOptionGroupBase implements FocusHandler,
- BlurHandler {
+public class VOptionGroup extends VOptionGroupBase
+ implements FocusHandler, BlurHandler {
public static final String CLASSNAME = "v-select-optiongroup";
@@ -173,8 +173,8 @@ public class VOptionGroup extends VOptionGroupBase implements FocusHandler,
op.setHTML(itemHtml);
op.setValue(opUidl.getBooleanAttribute("selected"));
- boolean optionEnabled = !opUidl
- .getBooleanAttribute(OptionGroupConstants.ATTRIBUTE_OPTION_DISABLED);
+ boolean optionEnabled = !opUidl.getBooleanAttribute(
+ OptionGroupConstants.ATTRIBUTE_OPTION_DISABLED);
boolean enabled = optionEnabled && !isReadonly() && isEnabled();
op.setEnabled(enabled);
optionsEnabled.put(op, optionEnabled);
@@ -235,7 +235,8 @@ public class VOptionGroup extends VOptionGroupBase implements FocusHandler,
@Override
public void setTabIndex(int tabIndex) {
- for (Iterator<Widget> iterator = panel.iterator(); iterator.hasNext();) {
+ for (Iterator<Widget> iterator = panel.iterator(); iterator
+ .hasNext();) {
FocusWidget widget = (FocusWidget) iterator.next();
widget.setTabIndex(tabIndex);
}
diff --git a/client/src/main/java/com/vaadin/client/ui/VOptionGroupBase.java b/client/src/main/java/com/vaadin/client/ui/VOptionGroupBase.java
index ce75043d89..7b0d9531e4 100644
--- a/client/src/main/java/com/vaadin/client/ui/VOptionGroupBase.java
+++ b/client/src/main/java/com/vaadin/client/ui/VOptionGroupBase.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -137,7 +137,7 @@ public abstract class VOptionGroupBase extends Composite implements Field,
/**
* For internal use only. May be removed or replaced in the future.
- *
+ *
* @return "cols" specified in uidl, 0 if not specified
*/
public int getColumns() {
@@ -146,7 +146,7 @@ public abstract class VOptionGroupBase extends Composite implements Field,
/**
* For internal use only. May be removed or replaced in the future.
- *
+ *
* @return "rows" specified in uidl, 0 if not specified
*/
public int getRows() {
@@ -171,8 +171,8 @@ public abstract class VOptionGroupBase extends Composite implements Field,
client.updateVariable(paintableId, "selected", getSelectedItems(),
immediate);
} else {
- client.updateVariable(paintableId, "selected", new String[] { ""
- + getSelectedItem() }, immediate);
+ client.updateVariable(paintableId, "selected",
+ new String[] { "" + getSelectedItem() }, immediate);
}
}
diff --git a/client/src/main/java/com/vaadin/client/ui/VOverlay.java b/client/src/main/java/com/vaadin/client/ui/VOverlay.java
index 5dc29f5a42..076d7994cb 100644
--- a/client/src/main/java/com/vaadin/client/ui/VOverlay.java
+++ b/client/src/main/java/com/vaadin/client/ui/VOverlay.java
@@ -39,7 +39,7 @@ import com.vaadin.client.widgets.Overlay;
* {@link Overlay} superclass and the default widgetset will replace it with
* this. The widget will not be dependent on this Vaadin specific widget and can
* be used in a pure GWT environment.
- *
+ *
* @deprecated as this is specifically for Vaadin only, it should not be used
* directly.
*/
@@ -80,7 +80,7 @@ public class VOverlay extends Overlay implements CloseHandler<PopupPanel> {
* A "thread local" of sorts, set temporarily so that VOverlayImpl knows
* which VOverlay is using it, so that it can be attached to the correct
* overlay container.
- *
+ *
* TODO this is a strange pattern that we should get rid of when possible.
*/
protected static VOverlay current;
@@ -88,7 +88,7 @@ public class VOverlay extends Overlay implements CloseHandler<PopupPanel> {
/**
* Get the {@link ApplicationConnection} that this overlay belongs to. If
* it's not set, {@link #getOwner()} is used to figure it out.
- *
+ *
* @return
*/
protected ApplicationConnection getApplicationConnection() {
@@ -108,7 +108,7 @@ public class VOverlay extends Overlay implements CloseHandler<PopupPanel> {
/**
* Gets the 'overlay container' element. Tries to find the current
* {@link ApplicationConnection} using {@link #getApplicationConnection()}.
- *
+ *
* @return the overlay container element for the current
* {@link ApplicationConnection} or another element if the current
* {@link ApplicationConnection} cannot be determined.
@@ -119,9 +119,8 @@ public class VOverlay extends Overlay implements CloseHandler<PopupPanel> {
if (ac == null) {
// could not figure out which one we belong to, styling will
// probably fail
- Logger.getLogger(getClass().getSimpleName())
- .warning(
- "Could not determine ApplicationConnection for Overlay. Overlay will be attached directly to the root panel");
+ Logger.getLogger(getClass().getSimpleName()).warning(
+ "Could not determine ApplicationConnection for Overlay. Overlay will be attached directly to the root panel");
return super.getOverlayContainer();
} else {
return getOverlayContainer(ac);
@@ -133,7 +132,7 @@ public class VOverlay extends Overlay implements CloseHandler<PopupPanel> {
* {@link ApplicationConnection}. Each overlay should be created in a
* overlay container element, so that the correct theme and styles can be
* applied.
- *
+ *
* @param ac
* A reference to {@link ApplicationConnection}
* @return The overlay container
@@ -160,7 +159,7 @@ public class VOverlay extends Overlay implements CloseHandler<PopupPanel> {
/**
* Set the label of the container element, where tooltip, notification and
* dialgs are added to.
- *
+ *
* @param applicationConnection
* the application connection for which to change the label
* @param overlayContainerLabel
diff --git a/client/src/main/java/com/vaadin/client/ui/VPanel.java b/client/src/main/java/com/vaadin/client/ui/VPanel.java
index 946ff83180..a48703c914 100644
--- a/client/src/main/java/com/vaadin/client/ui/VPanel.java
+++ b/client/src/main/java/com/vaadin/client/ui/VPanel.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,8 +27,8 @@ import com.vaadin.client.Focusable;
import com.vaadin.client.ui.ShortcutActionHandler.ShortcutActionHandlerOwner;
import com.vaadin.client.ui.TouchScrollDelegate.TouchScrollHandler;
-public class VPanel extends SimplePanel implements ShortcutActionHandlerOwner,
- Focusable {
+public class VPanel extends SimplePanel
+ implements ShortcutActionHandlerOwner, Focusable {
public static final String CLASSNAME = "v-panel";
@@ -99,7 +99,7 @@ public class VPanel extends SimplePanel implements ShortcutActionHandlerOwner,
/**
* Sets the keyboard focus on the Panel
- *
+ *
* @param focus
* Should the panel have focus or not.
*/
@@ -113,7 +113,7 @@ public class VPanel extends SimplePanel implements ShortcutActionHandlerOwner,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.Focusable#focus()
*/
@@ -175,8 +175,8 @@ public class VPanel extends SimplePanel implements ShortcutActionHandlerOwner,
"scrollTop");
int newscrollLeft = DOM.getElementPropertyInt(contentNode,
"scrollLeft");
- if (client != null
- && (newscrollLeft != scrollLeft || newscrollTop != scrollTop)) {
+ if (client != null && (newscrollLeft != scrollLeft
+ || newscrollTop != scrollTop)) {
scrollLeft = newscrollLeft;
scrollTop = newscrollTop;
client.updateVariable(id, "scrollTop", scrollTop, false);
diff --git a/client/src/main/java/com/vaadin/client/ui/VPasswordField.java b/client/src/main/java/com/vaadin/client/ui/VPasswordField.java
index dcbb60364c..746bfe653c 100644
--- a/client/src/main/java/com/vaadin/client/ui/VPasswordField.java
+++ b/client/src/main/java/com/vaadin/client/ui/VPasswordField.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,9 +20,9 @@ import com.google.gwt.user.client.DOM;
/**
* This class represents a password field.
- *
+ *
* @author Vaadin Ltd.
- *
+ *
*/
public class VPasswordField extends VTextField {
diff --git a/client/src/main/java/com/vaadin/client/ui/VPopupCalendar.java b/client/src/main/java/com/vaadin/client/ui/VPopupCalendar.java
index 47f11b09b1..bba1045b89 100644
--- a/client/src/main/java/com/vaadin/client/ui/VPopupCalendar.java
+++ b/client/src/main/java/com/vaadin/client/ui/VPopupCalendar.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -57,15 +57,15 @@ import com.vaadin.shared.ui.datefield.Resolution;
/**
* Represents a date selection component with a text field and a popup date
* selector.
- *
+ *
* <b>Note:</b> To change the keyboard assignments used in the popup dialog you
* should extend <code>com.vaadin.client.ui.VCalendarPanel</code> and then pass
* set it by calling the <code>setCalendarPanel(VCalendarPanel panel)</code>
* method.
- *
+ *
*/
-public class VPopupCalendar extends VTextualDate implements Field,
- ClickHandler, CloseHandler<PopupPanel>, SubPartAware {
+public class VPopupCalendar extends VTextualDate
+ implements Field, ClickHandler, CloseHandler<PopupPanel>, SubPartAware {
/** For internal use only. May be removed or replaced in the future. */
public final Button calendarToggle = new Button();
@@ -129,8 +129,8 @@ public class VPopupCalendar extends VTextualDate implements Field,
// Description of the usage of the widget for assisitve device users
descriptionForAssisitveDevicesElement = DOM.createDiv();
- descriptionForAssisitveDevicesElement
- .setInnerText(PopupDateFieldState.DESCRIPTION_FOR_ASSISTIVE_DEVICES);
+ descriptionForAssisitveDevicesElement.setInnerText(
+ PopupDateFieldState.DESCRIPTION_FOR_ASSISTIVE_DEVICES);
AriaHelper.ensureHasId(descriptionForAssisitveDevicesElement);
Roles.getTextboxRole().setAriaDescribedbyProperty(text.getElement(),
Id.of(descriptionForAssisitveDevicesElement));
@@ -230,16 +230,19 @@ public class VPopupCalendar extends VTextualDate implements Field,
.getCalendarField()) {
getClient().updateVariable(getId(), "day",
newDate.getDate(), false);
- if (getCurrentResolution().getCalendarField() > Resolution.DAY
- .getCalendarField()) {
+ if (getCurrentResolution()
+ .getCalendarField() > Resolution.DAY
+ .getCalendarField()) {
getClient().updateVariable(getId(), "hour",
newDate.getHours(), false);
- if (getCurrentResolution().getCalendarField() > Resolution.HOUR
- .getCalendarField()) {
+ if (getCurrentResolution()
+ .getCalendarField() > Resolution.HOUR
+ .getCalendarField()) {
getClient().updateVariable(getId(), "min",
newDate.getMinutes(), false);
- if (getCurrentResolution().getCalendarField() > Resolution.MINUTE
- .getCalendarField()) {
+ if (getCurrentResolution()
+ .getCalendarField() > Resolution.MINUTE
+ .getCalendarField()) {
getClient().updateVariable(getId(), "sec",
newDate.getSeconds(), false);
}
@@ -252,7 +255,7 @@ public class VPopupCalendar extends VTextualDate implements Field,
/**
* Checks whether the text field is enabled.
- *
+ *
* @see VPopupCalendar#setTextFieldEnabled(boolean)
* @return The current state of the text field.
*/
@@ -265,7 +268,7 @@ public class VPopupCalendar extends VTextualDate implements Field,
* field is enabled. Disabling it causes only the button for date selection
* to be active, thus preventing the user from entering invalid dates. See
* {@link http://dev.vaadin.com/ticket/6790}.
- *
+ *
* @param state
*/
public void setTextFieldEnabled(boolean textFieldEnabled) {
@@ -294,12 +297,12 @@ public class VPopupCalendar extends VTextualDate implements Field,
if (reallyEnabled) {
calendarToggle.setTabIndex(-1);
- Roles.getButtonRole().setAriaHiddenState(
- calendarToggle.getElement(), true);
+ Roles.getButtonRole()
+ .setAriaHiddenState(calendarToggle.getElement(), true);
} else {
calendarToggle.setTabIndex(0);
- Roles.getButtonRole().setAriaHiddenState(
- calendarToggle.getElement(), false);
+ Roles.getButtonRole()
+ .setAriaHiddenState(calendarToggle.getElement(), false);
}
handleAriaAttributes();
@@ -309,7 +312,7 @@ public class VPopupCalendar extends VTextualDate implements Field,
* Set correct tab index for disabled text field in IE as the value set in
* setTextFieldEnabled(...) gets overridden in
* TextualDateConnection.updateFromUIDL(...)
- *
+ *
* @since 7.3.1
*/
public void setTextFieldTabIndex() {
@@ -349,11 +352,11 @@ public class VPopupCalendar extends VTextualDate implements Field,
removeFromWidget = text;
}
- Roles.getFormRole().removeAriaLabelledbyProperty(
- removeFromWidget.getElement());
+ Roles.getFormRole()
+ .removeAriaLabelledbyProperty(removeFromWidget.getElement());
if (captionId == null) {
- Roles.getFormRole().removeAriaLabelledbyProperty(
- setForWidget.getElement());
+ Roles.getFormRole()
+ .removeAriaLabelledbyProperty(setForWidget.getElement());
} else {
Roles.getFormRole().setAriaLabelledbyProperty(
setForWidget.getElement(), Id.of(captionId));
@@ -362,7 +365,7 @@ public class VPopupCalendar extends VTextualDate implements Field,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.user.client.ui.UIObject#setStyleName(java.lang.String)
*/
@@ -415,7 +418,7 @@ public class VPopupCalendar extends VTextualDate implements Field,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.ClickHandler#onClick(com.google.gwt.event
* .dom.client.ClickEvent)
@@ -432,7 +435,7 @@ public class VPopupCalendar extends VTextualDate implements Field,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.logical.shared.CloseHandler#onClose(com.google.gwt
* .event.logical.shared.CloseEvent)
@@ -462,7 +465,7 @@ public class VPopupCalendar extends VTextualDate implements Field,
/**
* Sets focus to Calendar panel.
- *
+ *
* @param focus
*/
public void setFocus(boolean focus) {
@@ -482,7 +485,7 @@ public class VPopupCalendar extends VTextualDate implements Field,
* Sets the content of a special field for assistive devices, so that they
* can recognize the change and inform the user (reading out in case of
* screen reader)
- *
+ *
* @param selectedDate
* Date that is currently selected
*/
@@ -493,7 +496,7 @@ public class VPopupCalendar extends VTextualDate implements Field,
/**
* For internal use only. May be removed or replaced in the future.
- *
+ *
* @see com.vaadin.client.ui.VTextualDate#buildDate()
*/
@Override
@@ -511,7 +514,7 @@ public class VPopupCalendar extends VTextualDate implements Field,
/**
* Update the text field contents from the date. See {@link #buildDate()}.
- *
+ *
* @param forceValid
* true to force the text field to be updated, false to only
* update if the parsable flag is true.
@@ -525,7 +528,7 @@ public class VPopupCalendar extends VTextualDate implements Field,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.ui.VDateField#onBrowserEvent(com.google
* .gwt.user.client.Event)
*/
@@ -542,7 +545,7 @@ public class VPopupCalendar extends VTextualDate implements Field,
/**
* Get the key code that opens the calendar panel. By default it is the down
* key but you can override this to be whatever you like
- *
+ *
* @return
*/
protected int getOpenCalenderPanelKey() {
@@ -562,7 +565,8 @@ public class VPopupCalendar extends VTextualDate implements Field,
private final String CALENDAR_TOGGLE_ID = "popupButton";
@Override
- public com.google.gwt.user.client.Element getSubPartElement(String subPart) {
+ public com.google.gwt.user.client.Element getSubPartElement(
+ String subPart) {
if (subPart.equals(CALENDAR_TOGGLE_ID)) {
return calendarToggle.getElement();
}
@@ -571,7 +575,8 @@ public class VPopupCalendar extends VTextualDate implements Field,
}
@Override
- public String getSubPartName(com.google.gwt.user.client.Element subElement) {
+ public String getSubPartName(
+ com.google.gwt.user.client.Element subElement) {
if (calendarToggle.getElement().isOrHasChild(subElement)) {
return CALENDAR_TOGGLE_ID;
}
@@ -582,7 +587,7 @@ public class VPopupCalendar extends VTextualDate implements Field,
/**
* Set a description that explains the usage of the Widget for users of
* assistive devices.
- *
+ *
* @param descriptionForAssistiveDevices
* String with the description
*/
@@ -595,7 +600,7 @@ public class VPopupCalendar extends VTextualDate implements Field,
/**
* Get the description that explains the usage of the Widget for users of
* assistive devices.
- *
+ *
* @return String with the description
*/
public String getDescriptionForAssistiveDevices() {
@@ -606,7 +611,7 @@ public class VPopupCalendar extends VTextualDate implements Field,
* Sets the start range for this component. The start range is inclusive,
* and it depends on the current resolution, what is considered inside the
* range.
- *
+ *
* @param startDate
* - the allowed range's start date
*/
@@ -617,7 +622,7 @@ public class VPopupCalendar extends VTextualDate implements Field,
/**
* Sets the end range for this component. The end range is inclusive, and it
* depends on the current resolution, what is considered inside the range.
- *
+ *
* @param endDate
* - the allowed range's end date
*/
diff --git a/client/src/main/java/com/vaadin/client/ui/VPopupView.java b/client/src/main/java/com/vaadin/client/ui/VPopupView.java
index 0f4e68acab..11a38b6737 100644
--- a/client/src/main/java/com/vaadin/client/ui/VPopupView.java
+++ b/client/src/main/java/com/vaadin/client/ui/VPopupView.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -52,8 +52,8 @@ import com.vaadin.client.ui.ShortcutActionHandler.ShortcutActionHandlerOwner;
import com.vaadin.client.ui.popupview.VisibilityChangeEvent;
import com.vaadin.client.ui.popupview.VisibilityChangeHandler;
-public class VPopupView extends HTML implements HasEnabled, Iterable<Widget>,
- DeferredWorker {
+public class VPopupView extends HTML
+ implements HasEnabled, Iterable<Widget>, DeferredWorker {
public static final String CLASSNAME = "v-popupview";
@@ -132,12 +132,12 @@ public class VPopupView extends HTML implements HasEnabled, Iterable<Widget>,
/**
* Determines the correct position for a popup and displays the popup at
* that position.
- *
+ *
* By default, the popup is shown centered relative to its host component,
* ensuring it is visible on the screen if possible.
- *
+ *
* Can be overridden to customize the popup position.
- *
+ *
* @param popup
*/
public void showPopup(final CustomPopup popup) {
@@ -184,7 +184,7 @@ public class VPopupView extends HTML implements HasEnabled, Iterable<Widget>,
/**
* Make sure that we remove the popup when the main widget is removed.
- *
+ *
* @see com.google.gwt.user.client.ui.Widget#onUnload()
*/
@Override
@@ -229,8 +229,8 @@ public class VPopupView extends HTML implements HasEnabled, Iterable<Widget>,
* (other than it being a VOverlay) is to be considered private and
* potentially subject to change.
*/
- public class CustomPopup extends VOverlay implements
- StateChangeEvent.StateChangeHandler {
+ public class CustomPopup extends VOverlay
+ implements StateChangeEvent.StateChangeHandler {
private ComponentConnector popupComponentConnector = null;
@@ -256,8 +256,8 @@ public class VPopupView extends HTML implements HasEnabled, Iterable<Widget>,
@Override
public void onKeyDown(KeyDownEvent event) {
if (shortcutActionHandler != null) {
- shortcutActionHandler.handleKeyboardEvent(Event
- .as(event.getNativeEvent()));
+ shortcutActionHandler.handleKeyboardEvent(
+ Event.as(event.getNativeEvent()));
}
}
}, KeyDownEvent.getType());
diff --git a/client/src/main/java/com/vaadin/client/ui/VProgressBar.java b/client/src/main/java/com/vaadin/client/ui/VProgressBar.java
index 348791728f..b01c017fd9 100644
--- a/client/src/main/java/com/vaadin/client/ui/VProgressBar.java
+++ b/client/src/main/java/com/vaadin/client/ui/VProgressBar.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,7 +30,7 @@ import com.vaadin.client.StyleConstants;
* floating point value between 0 and 1 (inclusive). The progress bar can also
* be in an indeterminate mode showing an animation indicating that the task is
* running but without providing any information about the current progress.
- *
+ *
* @since 7.1
* @author Vaadin Ltd
*/
@@ -55,7 +55,7 @@ public class VProgressBar extends Widget implements HasEnabled {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.user.client.ui.UIObject#setStylePrimaryName(java.lang.
* String)
diff --git a/client/src/main/java/com/vaadin/client/ui/VProgressIndicator.java b/client/src/main/java/com/vaadin/client/ui/VProgressIndicator.java
index f93fa37af6..158c8d3cd6 100644
--- a/client/src/main/java/com/vaadin/client/ui/VProgressIndicator.java
+++ b/client/src/main/java/com/vaadin/client/ui/VProgressIndicator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,9 +19,9 @@ package com.vaadin.client.ui;
import com.vaadin.shared.ui.progressindicator.ProgressIndicatorState;
/**
- *
+ *
* @author Vaadin Ltd
- *
+ *
* @deprecated as of 7.1, renamed to VProgressBar
*/
@Deprecated
diff --git a/client/src/main/java/com/vaadin/client/ui/VRichTextArea.java b/client/src/main/java/com/vaadin/client/ui/VRichTextArea.java
index cb4482f7cb..8f1ff6c513 100644
--- a/client/src/main/java/com/vaadin/client/ui/VRichTextArea.java
+++ b/client/src/main/java/com/vaadin/client/ui/VRichTextArea.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -43,12 +43,12 @@ import com.vaadin.client.ui.richtextarea.VRichTextToolbar;
/**
* This class implements a basic client side rich text editor component.
- *
+ *
* @author Vaadin Ltd.
- *
+ *
*/
-public class VRichTextArea extends Composite implements Field, KeyPressHandler,
- KeyDownHandler, Focusable {
+public class VRichTextArea extends Composite
+ implements Field, KeyPressHandler, KeyDownHandler, Focusable {
/**
* The input node CSS classname.
@@ -155,7 +155,7 @@ public class VRichTextArea extends Composite implements Field, KeyPressHandler,
* render. Simple deferred command is not enough. Using Timer with
* moderated timeout. If this appears to fail on many (most likely slow)
* environments, consider increasing the timeout.
- *
+ *
* FF seems to require the most time to stabilize its RTA. On Vaadin
* tiergarden test machines, 200ms was not enough always (about 50%
* success rate) - 300 ms was 100% successful. This however was not
@@ -232,10 +232,9 @@ public class VRichTextArea extends Composite implements Field, KeyPressHandler,
ShortcutActionHandler shortcutHandler = getShortcutHandlerOwner()
.getShortcutActionHandler();
if (shortcutHandler != null) {
- shortcutHandler
- .handleKeyboardEvent(com.google.gwt.user.client.Event
- .as(event.getNativeEvent()),
- ConnectorMap.get(client).getConnector(this));
+ shortcutHandler.handleKeyboardEvent(
+ com.google.gwt.user.client.Event.as(event.getNativeEvent()),
+ ConnectorMap.get(client).getConnector(this));
}
}
@@ -285,7 +284,7 @@ public class VRichTextArea extends Composite implements Field, KeyPressHandler,
/**
* Set the value of the text area
- *
+ *
* @param value
* The text value. Can be html.
*/
@@ -312,7 +311,7 @@ public class VRichTextArea extends Composite implements Field, KeyPressHandler,
* Browsers differ in what they return as the content of a visually empty
* rich text area. This method is used to normalize these to an empty
* string. See #8004.
- *
+ *
* @return cleaned html string
*/
public String getSanitizedValue() {
@@ -340,7 +339,7 @@ public class VRichTextArea extends Composite implements Field, KeyPressHandler,
/**
* Adds a blur handler to the component.
- *
+ *
* @param blurHandler
* the blur handler to add
*/
@@ -350,7 +349,7 @@ public class VRichTextArea extends Composite implements Field, KeyPressHandler,
/**
* Removes a blur handler.
- *
+ *
* @param blurHandler
* the handler to remove
*/
diff --git a/client/src/main/java/com/vaadin/client/ui/VScrollTable.java b/client/src/main/java/com/vaadin/client/ui/VScrollTable.java
index 479fffc741..b4eb18a01d 100644
--- a/client/src/main/java/com/vaadin/client/ui/VScrollTable.java
+++ b/client/src/main/java/com/vaadin/client/ui/VScrollTable.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -109,34 +109,34 @@ import com.vaadin.shared.ui.table.TableConstants;
/**
* VScrollTable
- *
+ *
* VScrollTable is a FlowPanel having two widgets in it: * TableHead component *
* ScrollPanel
- *
+ *
* TableHead contains table's header and widgets + logic for resizing,
* reordering and hiding columns.
- *
+ *
* ScrollPanel contains VScrollTableBody object which handles content. To save
* some bandwidth and to improve clients responsiveness with loads of data, in
* VScrollTableBody all rows are not necessary rendered. There are "spacers" in
* VScrollTableBody to use the exact same space as non-rendered rows would use.
* This way we can use seamlessly traditional scrollbars and scrolling to fetch
* more rows instead of "paging".
- *
+ *
* In VScrollTable we listen to scroll events. On horizontal scrolling we also
* update TableHeads scroll position which has its scrollbars hidden. On
* vertical scroll events we will check if we are reaching the end of area where
* we have rows rendered and
- *
+ *
* TODO implement unregistering for child components in Cells
*/
-public class VScrollTable extends FlowPanel implements HasWidgets,
- ScrollHandler, VHasDropHandler, FocusHandler, BlurHandler, Focusable,
- ActionOwner, SubPartAware, DeferredWorker {
+public class VScrollTable extends FlowPanel
+ implements HasWidgets, ScrollHandler, VHasDropHandler, FocusHandler,
+ BlurHandler, Focusable, ActionOwner, SubPartAware, DeferredWorker {
/**
* Simple interface for parts of the table capable of owning a context menu.
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
@@ -146,7 +146,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Handles showing context menu on "long press" from a touch screen.
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
@@ -162,7 +162,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Initializes a handler for a certain context menu owner.
- *
+ *
* @param target
* the owner of the context menu
*/
@@ -183,7 +183,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* A function to handle touch context events in a table.
- *
+ *
* @param event
* browser event to handle
*/
@@ -237,7 +237,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
* Calculates how many pixels away the user's finger has traveled. This
* reduces the chance of small non-intentional movements from canceling
* the long press detection.
- *
+ *
* @param event
* the Event for which to check the move distance
* @return true if this is considered an intentional move by the user
@@ -403,7 +403,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
* The last known row height used to preserve the height of a table with
* custom row heights and a fixed page length after removing the last row
* from the table.
- *
+ *
* A new VScrollTableBody instance is created every time the number of rows
* changes causing {@link VScrollTableBody#rowHeight} to be discarded and
* the height recalculated by {@link VScrollTableBody#getRowHeight(boolean)}
@@ -447,7 +447,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/*
* (non-Javadoc)
- *
+ *
* @see java.lang.Object#toString()
*/
@@ -468,8 +468,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
int endOfFirstRange = row.getIndex() - 1;
if (endOfFirstRange >= startRow.getIndex()) {
// create range of first part unless its length is < 1
- ranges.add(new SelectionRange(startRow, endOfFirstRange
- - startRow.getIndex() + 1));
+ ranges.add(new SelectionRange(startRow,
+ endOfFirstRange - startRow.getIndex() + 1));
}
int startOfSecondRange = row.getIndex() + 1;
if (getEndIndex() >= startOfSecondRange) {
@@ -477,8 +477,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
VScrollTableRow startOfRange = scrollBody
.getRowByRowIndex(startOfSecondRange);
if (startOfRange != null) {
- ranges.add(new SelectionRange(startOfRange, getEndIndex()
- - startOfSecondRange + 1));
+ ranges.add(new SelectionRange(startOfRange,
+ getEndIndex() - startOfSecondRange + 1));
}
}
return ranges;
@@ -529,11 +529,11 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* For internal use only. May be removed or replaced in the future.
- *
+ *
* Overwrites onBrowserEvent function on FocusableScrollPanel to give event
* access to touchContextProvider. Has to be public to give TableConnector
* access to the scrollBodyPanel field.
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
@@ -634,8 +634,9 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
// (prevents scrolling)
event.preventDefault();
} else if (hasFocus()) {
- if (handleNavigation(event.getKeyCode(), event.getCtrlKey()
- || event.getMetaKey(), event.getShiftKey())) {
+ if (handleNavigation(event.getKeyCode(),
+ event.getCtrlKey() || event.getMetaKey(),
+ event.getShiftKey())) {
navKeyDown = true;
event.preventDefault();
}
@@ -718,14 +719,14 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
* Values (serverCacheFirst+serverCacheLast) sent by server that tells which
* rows (indexes) are in the server side cache (page buffer). -1 means
* unknown. The server side cache row MUST MATCH the client side cache rows.
- *
+ *
* If the client side cache contains additional rows with e.g. buttons, it
* will cause out of sync when such a button is pressed.
- *
+ *
* If the server side cache contains additional rows with e.g. buttons,
* scrolling in the client will cause empty buttons to be rendered
* (cached=true request for non-existing components)
- *
+ *
* For internal use only. May be removed or replaced in the future.
*/
public int serverCacheFirst = -1;
@@ -806,12 +807,11 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
// capture is in use
Element elementUnderMouse = WidgetUtil
.getElementUnderMouse(event.getNativeEvent());
- if (lastMouseDownTarget != null
- && lastMouseDownTarget.isOrHasChild(elementUnderMouse)) {
+ if (lastMouseDownTarget != null && lastMouseDownTarget
+ .isOrHasChild(elementUnderMouse)) {
mouseUpPreviewMatched = true;
} else {
- getLogger().log(
- Level.FINEST,
+ getLogger().log(Level.FINEST,
"Ignoring mouseup from " + elementUnderMouse
+ " when mousedown was on "
+ lastMouseDownTarget);
@@ -867,8 +867,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
scrollBodyPanel.removeStyleName(getStylePrimaryName() + "-body");
if (scrollBody != null) {
- scrollBody.removeStyleName(getStylePrimaryName()
- + "-body-noselection");
+ scrollBody.removeStyleName(
+ getStylePrimaryName() + "-body-noselection");
}
if (isPrimary) {
@@ -892,8 +892,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
this.client = client;
// Add a handler to clear saved context menu details when the menu
// closes. See #8526.
- addCloseHandler = client.getContextMenu().addCloseHandler(
- new CloseHandler<PopupPanel>() {
+ addCloseHandler = client.getContextMenu()
+ .addCloseHandler(new CloseHandler<PopupPanel>() {
@Override
public void onClose(CloseEvent<PopupPanel> event) {
@@ -904,7 +904,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Handles a context menu event on table body.
- *
+ *
* @param left
* left position of the context menu
* @param top
@@ -924,7 +924,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Fires a column resize event which sends the resize information to the
* server.
- *
+ *
* @param columnId
* The columnId of the column which was resized
* @param originalWidth
@@ -946,7 +946,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Non-immediate variable update of column widths for a collection of
* columns.
- *
+ *
* @param columns
* the columns to trigger the events for.
*/
@@ -962,7 +962,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Moves the focus one step down
- *
+ *
* @return Returns true if succeeded
*/
private boolean moveFocusDown() {
@@ -971,7 +971,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Moves the focus down by 1+offset rows
- *
+ *
* @return Returns true if succeeded, else false if the selection could not
* be move downwards
*/
@@ -980,8 +980,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
if (focusedRow == null && scrollBody.iterator().hasNext()) {
// FIXME should focus first visible from top, not first rendered
// ??
- return setRowFocus((VScrollTableRow) scrollBody.iterator()
- .next());
+ return setRowFocus(
+ (VScrollTableRow) scrollBody.iterator().next());
} else {
VScrollTableRow next = getNextRow(focusedRow, offset);
if (next != null) {
@@ -995,7 +995,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Moves the selection one step up
- *
+ *
* @return Returns true if succeeded
*/
private boolean moveFocusUp() {
@@ -1004,18 +1004,18 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Moves the focus row upwards
- *
+ *
* @return Returns true if succeeded, else false if the selection could not
* be move upwards
- *
+ *
*/
private boolean moveFocusUp(int offset) {
if (isSelectable()) {
if (focusedRow == null && scrollBody.iterator().hasNext()) {
// FIXME logic is exactly the same as in moveFocusDown, should
// be the opposite??
- return setRowFocus((VScrollTableRow) scrollBody.iterator()
- .next());
+ return setRowFocus(
+ (VScrollTableRow) scrollBody.iterator().next());
} else {
VScrollTableRow prev = getPreviousRow(focusedRow, offset);
if (prev != null) {
@@ -1031,7 +1031,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Selects a row where the current selection head is
- *
+ *
* @param ctrlSelect
* Is the selection a ctrl+selection
* @param shiftSelect
@@ -1071,7 +1071,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Sends the selection to the server if it has been changed since the last
* update/visit.
- *
+ *
* @param immediately
* set to true to immediately send the rows
*/
@@ -1095,12 +1095,13 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
// Send the selected row ranges
client.updateVariable(paintableId, "selectedRanges",
- ranges.toArray(new String[selectedRowRanges.size()]), false);
+ ranges.toArray(new String[selectedRowRanges.size()]),
+ false);
selectedRowRanges.clear();
// clean selectedRowKeys so that they don't contain excess values
- for (Iterator<String> iterator = selectedRowKeys.iterator(); iterator
- .hasNext();) {
+ for (Iterator<String> iterator = selectedRowKeys
+ .iterator(); iterator.hasNext();) {
String key = iterator.next();
VScrollTableRow renderedRowByKey = getRenderedRowByKey(key);
if (renderedRowByKey != null) {
@@ -1128,7 +1129,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
* Get the key that moves the selection head upwards. By default it is the
* up arrow key but by overriding this you can change the key to whatever
* you want.
- *
+ *
* @return The keycode of the key
*/
protected int getNavigationUpKey() {
@@ -1139,7 +1140,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
* Get the key that moves the selection head downwards. By default it is the
* down arrow key but by overriding this you can change the key to whatever
* you want.
- *
+ *
* @return The keycode of the key
*/
protected int getNavigationDownKey() {
@@ -1150,7 +1151,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
* Get the key that scrolls to the left in the table. By default it is the
* left arrow key but by overriding this you can change the key to whatever
* you want.
- *
+ *
* @return The keycode of the key
*/
protected int getNavigationLeftKey() {
@@ -1161,7 +1162,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
* Get the key that scroll to the right on the table. By default it is the
* right arrow key but by overriding this you can change the key to whatever
* you want.
- *
+ *
* @return The keycode of the key
*/
protected int getNavigationRightKey() {
@@ -1172,7 +1173,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
* Get the key that selects an item in the table. By default it is the space
* bar key but by overriding this you can change the key to whatever you
* want.
- *
+ *
* @return
*/
protected int getNavigationSelectKey() {
@@ -1183,7 +1184,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
* Get the key the moves the selection one page up in the table. By default
* this is the Page Up key but by overriding this you can change the key to
* whatever you want.
- *
+ *
* @return
*/
protected int getNavigationPageUpKey() {
@@ -1194,7 +1195,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
* Get the key the moves the selection one page down in the table. By
* default this is the Page Down key but by overriding this you can change
* the key to whatever you want.
- *
+ *
* @return
*/
protected int getNavigationPageDownKey() {
@@ -1205,7 +1206,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
* Get the key the moves the selection to the beginning of the table. By
* default this is the Home key but by overriding this you can change the
* key to whatever you want.
- *
+ *
* @return
*/
protected int getNavigationStartKey() {
@@ -1216,7 +1217,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
* Get the key the moves the selection to the end of the table. By default
* this is the End key but by overriding this you can change the key to
* whatever you want.
- *
+ *
* @return
*/
protected int getNavigationEndKey() {
@@ -1312,10 +1313,9 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
*/
VScrollTableRow row = (VScrollTableRow) iterator.next();
boolean selected = selectedKeys.contains(row.getKey());
- if (!selected
- && unSyncedselectionsBeforeRowFetch != null
- && unSyncedselectionsBeforeRowFetch.contains(row
- .getKey())) {
+ if (!selected && unSyncedselectionsBeforeRowFetch != null
+ && unSyncedselectionsBeforeRowFetch
+ .contains(row.getKey())) {
selected = true;
keyboardSelectionOverRowFetchInProgress = true;
}
@@ -1409,11 +1409,11 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
if (firstvisible >= 0) {
firstRowInViewPort = firstvisible;
if (firstvisibleOnLastPage > -1) {
- scrollBodyPanel
- .setScrollPosition(measureRowHeightOffset(firstvisibleOnLastPage));
+ scrollBodyPanel.setScrollPosition(
+ measureRowHeightOffset(firstvisibleOnLastPage));
} else {
- scrollBodyPanel
- .setScrollPosition(measureRowHeightOffset(firstvisible));
+ scrollBodyPanel.setScrollPosition(
+ measureRowHeightOffset(firstvisible));
}
}
disableLazyScroller();
@@ -1422,10 +1422,10 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/** For internal use only. May be removed or replaced in the future. */
public void updateFirstVisibleAndScrollIfNeeded(UIDL uidl) {
- firstvisible = uidl.hasVariable("firstvisible") ? uidl
- .getIntVariable("firstvisible") : 0;
- firstvisibleOnLastPage = uidl.hasVariable("firstvisibleonlastpage") ? uidl
- .getIntVariable("firstvisibleonlastpage") : -1;
+ firstvisible = uidl.hasVariable("firstvisible")
+ ? uidl.getIntVariable("firstvisible") : 0;
+ firstvisibleOnLastPage = uidl.hasVariable("firstvisibleonlastpage")
+ ? uidl.getIntVariable("firstvisibleonlastpage") : -1;
if (firstvisible != lastRequestedFirstvisible && scrollBody != null) {
// Update lastRequestedFirstvisible right away here
@@ -1462,11 +1462,12 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/** For internal use only. May be removed or replaced in the future. */
public void updateSelectionProperties(UIDL uidl,
AbstractComponentState state, boolean readOnly) {
- setMultiSelectMode(uidl.hasAttribute("multiselectmode") ? uidl
- .getIntAttribute("multiselectmode") : MULTISELECT_MODE_DEFAULT);
+ setMultiSelectMode(uidl.hasAttribute("multiselectmode")
+ ? uidl.getIntAttribute("multiselectmode")
+ : MULTISELECT_MODE_DEFAULT);
- nullSelectionAllowed = uidl.hasAttribute("nsa") ? uidl
- .getBooleanAttribute("nsa") : true;
+ nullSelectionAllowed = uidl.hasAttribute("nsa")
+ ? uidl.getBooleanAttribute("nsa") : true;
if (uidl.hasAttribute("selectmode")) {
if (readOnly) {
@@ -1483,8 +1484,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/** For internal use only. May be removed or replaced in the future. */
public void updateDragMode(UIDL uidl) {
- dragmode = uidl.hasAttribute("dragmode") ? uidl
- .getIntAttribute("dragmode") : 0;
+ dragmode = uidl.hasAttribute("dragmode")
+ ? uidl.getIntAttribute("dragmode") : 0;
if (BrowserInfo.get().isIE()) {
if (dragmode > 0) {
getElement().setPropertyJSO("onselectstart",
@@ -1523,7 +1524,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Returns the extra space that is given to the header column when column
* width is determined by header text.
- *
+ *
* @return extra space in pixels
*/
private int getHeaderPadding() {
@@ -1534,7 +1535,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
* This method exists for the needs of {@link VTreeTable} only. Not part of
* the official API, <b>extend at your own risk</b>. May be removed or
* replaced in the future.
- *
+ *
* @return index of TreeTable's hierarchy column, or -1 if not applicable
*/
protected int getHierarchyColumnIndex() {
@@ -1559,9 +1560,11 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
// try to focus a row currently selected and in viewport
String selectedRowKey = selectedRowKeys.iterator().next();
if (selectedRowKey != null) {
- VScrollTableRow renderedRow = getRenderedRowByKey(selectedRowKey);
+ VScrollTableRow renderedRow = getRenderedRowByKey(
+ selectedRowKey);
if (renderedRow == null || !renderedRow.isInViewPort()) {
- setRowFocus(scrollBody.getRowByRowIndex(firstRowInViewPort));
+ setRowFocus(
+ scrollBody.getRowByRowIndex(firstRowInViewPort));
} else {
setRowFocus(renderedRow);
}
@@ -1580,7 +1583,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
* Selects the last row visible in the table
* <p>
* For internal use only. May be removed or replaced in the future.
- *
+ *
* @param focusOnly
* Should the focus only be moved to the last row
*/
@@ -1590,8 +1593,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
if (lastRowInViewport == null) {
// this should not happen in normal situations (white space at the
// end of viewport). Select the last rendered as a fallback.
- lastRowInViewport = scrollBody.getRowByRowIndex(scrollBody
- .getLastRendered());
+ lastRowInViewport = scrollBody
+ .getRowByRowIndex(scrollBody.getLastRendered());
if (lastRowInViewport == null) {
return; // empty table
}
@@ -1607,7 +1610,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
* Selects the first row visible in the table
* <p>
* For internal use only. May be removed or replaced in the future.
- *
+ *
* @param focusOnly
* Should the focus only be moved to the first row
*/
@@ -1705,7 +1708,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
* <p>
* Update headers whould be called before this method is called!
* </p>
- *
+ *
* @param strings
*/
private void updateFooter(String[] strings) {
@@ -1734,7 +1737,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* For internal use only. May be removed or replaced in the future.
- *
+ *
* @param uidl
* which contains row data
* @param firstRow
@@ -1784,10 +1787,10 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
* caching window.
*/
protected void discardRowsOutsideCacheWindow() {
- int firstRowToKeep = (int) (firstRowInViewPort - pageLength
- * cache_rate);
- int lastRowToKeep = (int) (firstRowInViewPort + pageLength + pageLength
- * cache_rate);
+ int firstRowToKeep = (int) (firstRowInViewPort
+ - pageLength * cache_rate);
+ int lastRowToKeep = (int) (firstRowInViewPort + pageLength
+ + pageLength * cache_rate);
// sanity checks:
if (firstRowToKeep < 0) {
firstRowToKeep = 0;
@@ -1863,7 +1866,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
* on the commands in the UIDL.
* <p>
* For internal use only. May be removed or replaced in the future.
- *
+ *
* @param partialRowAdditions
* the UIDL containing row updates.
*/
@@ -1893,7 +1896,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Gives correct column index for given column key ("cid" in UIDL).
- *
+ *
* @param colKey
* @return column index of visible columns, -1 if column not visible
*/
@@ -1961,9 +1964,9 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Note: not part of the official API, extend at your own risk. May be
* removed or replaced in the future.
- *
+ *
* Sets the indicated column's width for headers and scrollBody alike.
- *
+ *
* @param colIndex
* index of the modified column
* @param w
@@ -2011,7 +2014,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Get a rendered row by its key
- *
+ *
* @param key
* The key to search with
* @return
@@ -2032,10 +2035,10 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Returns the next row to the given row
- *
+ *
* @param row
* The row to calculate from
- *
+ *
* @return The next row or null if no row exists
*/
private VScrollTableRow getNextRow(VScrollTableRow row, int offset) {
@@ -2058,7 +2061,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Returns the previous row from the given row
- *
+ *
* @param row
* The row to calculate from
* @return The previous row or null if no row exists
@@ -2170,13 +2173,13 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Run only once when component is attached and received its initial
* content. This function:
- *
+ *
* * Syncs headers and bodys "natural widths and saves the values.
- *
+ *
* * Sets proper width and height
- *
+ *
* * Makes deferred request to get some cache rows
- *
+ *
* For internal use only. May be removed or replaced in the future.
*/
public void sizeInit() {
@@ -2188,7 +2191,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
* We will use browsers table rendering algorithm to find proper column
* widths. If content and header take less space than available, we will
* divide extra space relatively to each column which has not width set.
- *
+ *
* Overflow pixels are added to last column.
*/
@@ -2204,8 +2207,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
tHead.enableBrowserIntelligence();
tFoot.enableBrowserIntelligence();
- int hierarchyColumnIndent = scrollBody != null ? scrollBody
- .getMaxIndent() : 0;
+ int hierarchyColumnIndent = scrollBody != null
+ ? scrollBody.getMaxIndent() : 0;
HeaderCell hierarchyHeaderWithExpandRatio = null;
// first loop: collect natural widths
@@ -2319,9 +2322,9 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
if (hierarchyHeaderWithExpandRatio != null) {
// ensure first that the hierarchyColumn gets at least the
// space allocated for indent
- final int newSpace = Math
- .round((extraSpace * (hierarchyHeaderWithExpandRatio
- .getExpandRatio() / expandRatioDivider)));
+ final int newSpace = Math.round((extraSpace
+ * (hierarchyHeaderWithExpandRatio.getExpandRatio()
+ / expandRatioDivider)));
if (newSpace < hierarchyColumnIndent) {
// not enough space for indent, remove indent from the
// extraSpace again and handle hierarchy column's header
@@ -2340,14 +2343,15 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
if (hCell.getExpandRatio() > 0) {
int w = widths[i];
if (setIndentToHierarchyHeader
- && hierarchyHeaderWithExpandRatio.equals(hCell)) {
+ && hierarchyHeaderWithExpandRatio
+ .equals(hCell)) {
// hierarchy column's header is no longer part of
// the expansion divide and only gets indent
w += hierarchyColumnIndent;
} else {
final int newSpace = Math
- .round((extraSpace * (hCell
- .getExpandRatio() / expandRatioDivider)));
+ .round((extraSpace * (hCell.getExpandRatio()
+ / expandRatioDivider)));
w += newSpace;
}
widths[i] = w;
@@ -2366,8 +2370,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
HeaderCell hCell = (HeaderCell) headCells.next();
if (!hCell.isDefinedWidth()) {
int w = widths[i];
- final int newSpace = Math.round((float) extraSpace
- * (float) w / totalWidthR);
+ final int newSpace = Math.round(
+ (float) extraSpace * (float) w / totalWidthR);
w += newSpace;
widths[i] = w;
}
@@ -2444,8 +2448,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
// int bodyHeight = scrollBody.getOffsetHeight();
bodyHeight = scrollBody.getRequiredHeight();
} else {
- bodyHeight = (int) Math.round(scrollBody.getRowHeight(true)
- * pageLength);
+ bodyHeight = (int) Math
+ .round(scrollBody.getRowHeight(true) * pageLength);
}
boolean needsSpaceForHorizontalSrollbar = (total > availW);
if (needsSpaceForHorizontalSrollbar) {
@@ -2468,8 +2472,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
if (totalRows - 1 > scrollBody.getLastRendered()) {
// fetch cache rows
int firstInNewSet = scrollBody.getLastRendered() + 1;
- int lastInNewSet = (int) (firstRowInViewPort + pageLength + cache_rate
- * pageLength);
+ int lastInNewSet = (int) (firstRowInViewPort + pageLength
+ + cache_rate * pageLength);
if (lastInNewSet > totalRows - 1) {
lastInNewSet = totalRows - 1;
}
@@ -2483,8 +2487,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
* Ensures the column alignments are correct at initial loading. <br/>
* (child components widths are correct)
*/
- WidgetUtil.runWebkitOverflowAutoFixDeferred(scrollBodyPanel
- .getElement());
+ WidgetUtil
+ .runWebkitOverflowAutoFixDeferred(scrollBodyPanel.getElement());
hadScrollBars = willHaveScrollbarz;
}
@@ -2492,7 +2496,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Note: this method is not part of official API although declared as
* protected. Extend at your own risk.
- *
+ *
* @return true if content area will have scrollbars visible.
*/
protected boolean willHaveScrollbars() {
@@ -2501,10 +2505,10 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
return true;
}
} else {
- int fakeheight = (int) Math.round(scrollBody.getRowHeight()
- * totalRows);
- int availableHeight = scrollBodyPanel.getElement().getPropertyInt(
- "clientHeight");
+ int fakeheight = (int) Math
+ .round(scrollBody.getRowHeight() * totalRows);
+ int availableHeight = scrollBodyPanel.getElement()
+ .getPropertyInt("clientHeight");
if (fakeheight > availableHeight) {
return true;
}
@@ -2515,8 +2519,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
private void announceScrollPosition() {
if (scrollPositionElement == null) {
scrollPositionElement = DOM.createDiv();
- scrollPositionElement.setClassName(getStylePrimaryName()
- + "-scrollposition");
+ scrollPositionElement
+ .setClassName(getStylePrimaryName() + "-scrollposition");
scrollPositionElement.getStyle().setPosition(Position.ABSOLUTE);
scrollPositionElement.getStyle().setDisplay(Display.NONE);
getElement().appendChild(scrollPositionElement);
@@ -2545,9 +2549,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/** For internal use only. May be removed or replaced in the future. */
public boolean isScrollPositionVisible() {
- return scrollPositionElement != null
- && !scrollPositionElement.getStyle().getDisplay()
- .equals(Display.NONE.toString());
+ return scrollPositionElement != null && !scrollPositionElement
+ .getStyle().getDisplay().equals(Display.NONE.toString());
}
/** For internal use only. May be removed or replaced in the future. */
@@ -2584,9 +2587,9 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
// tell scroll position to user if currently "visible" rows are
// not rendered
- if (totalRows > pageLength
- && ((firstRowInViewPort + pageLength > scrollBody
- .getLastRendered()) || (firstRowInViewPort < scrollBody
+ if (totalRows > pageLength && ((firstRowInViewPort
+ + pageLength > scrollBody.getLastRendered())
+ || (firstRowInViewPort < scrollBody
.getFirstRendered()))) {
announceScrollPosition();
} else {
@@ -2633,12 +2636,13 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
* to Table.setCurrentPageFirstItemIndex(int) In this case,
* scrolling event takes way too late, and all the rows from
* previous viewport to this one were requested.
- *
+ *
* This should prevent requesting unneeded rows by updating
* reqFirstRow and reqRows before needing them. See (#14135)
*/
- setReqFirstRow((firstRowInViewPort - (int) (pageLength * cache_rate)));
+ setReqFirstRow(
+ (firstRowInViewPort - (int) (pageLength * cache_rate)));
int last = firstRowInViewPort + (int) (cache_rate * pageLength)
+ pageLength - 1;
if (last >= totalRows) {
@@ -2661,7 +2665,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
if (reqFirstRow < firstToBeRendered) {
firstToBeRendered = reqFirstRow;
- } else if (firstRowInViewPort - (int) (cache_rate * pageLength) > firstToBeRendered) {
+ } else if (firstRowInViewPort
+ - (int) (cache_rate * pageLength) > firstToBeRendered) {
firstToBeRendered = firstRowInViewPort
- (int) (cache_rate * pageLength);
if (firstToBeRendered < 0) {
@@ -2685,9 +2690,10 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
if (lastReqRow > lastToBeRendered) {
lastToBeRendered = lastReqRow;
- } else if (firstRowInViewPort + pageLength + pageLength
- * cache_rate < lastToBeRendered) {
- lastToBeRendered = (firstRowInViewPort + pageLength + (int) (pageLength * cache_rate));
+ } else if (firstRowInViewPort + pageLength
+ + pageLength * cache_rate < lastToBeRendered) {
+ lastToBeRendered = (firstRowInViewPort + pageLength
+ + (int) (pageLength * cache_rate));
if (lastToBeRendered >= totalRows) {
lastToBeRendered = totalRows - 1;
}
@@ -2707,7 +2713,9 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
lastToBeRendered = totalRows - 1;
}
if (reqFirstRow < firstToBeRendered
- || (reqFirstRow > firstToBeRendered && (reqFirstRow < firstRendered || reqFirstRow > lastRendered + 1))) {
+ || (reqFirstRow > firstToBeRendered
+ && (reqFirstRow < firstRendered
+ || reqFirstRow > lastRendered + 1))) {
setReqFirstRow(firstToBeRendered);
}
if (lastRendered < lastToBeRendered
@@ -2823,8 +2831,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
* of the caption container element by the correct amount
*/
public void resizeCaptionContainer(int rightSpacing) {
- int captionContainerWidth = width
- - colResizeWidget.getOffsetWidth() - rightSpacing;
+ int captionContainerWidth = width - colResizeWidget.getOffsetWidth()
+ - rightSpacing;
if (td.getClassName().contains("-asc")
|| td.getClassName().contains("-desc")) {
@@ -2876,8 +2884,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
protected void updateStyleNames(String primaryStyleName) {
colResizeWidget.setClassName(primaryStyleName + "-resizer");
sortIndicator.setClassName(primaryStyleName + "-sort-indicator");
- captionContainer.setClassName(primaryStyleName
- + "-caption-container");
+ captionContainer
+ .setClassName(primaryStyleName + "-caption-container");
if (sorted) {
if (sortAscending) {
setStyleName(primaryStyleName + "-header-cell-asc");
@@ -2918,7 +2926,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
* Sets width to the header cell. This width should not include any
* possible indent modifications that are present in
* {@link VScrollTableBody#getMaxIndent()}.
- *
+ *
* @param w
* required width of the cell sans indentations
* @param ensureDefinedWidth
@@ -2985,7 +2993,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Detects if width is fixed by developer on server side or resized to
* current width by user.
- *
+ *
* @return true if defined, false if "natural" width
*/
public boolean isDefinedWidth() {
@@ -2994,10 +3002,10 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* This method exists for the needs of {@link VTreeTable} only.
- *
+ *
* Returns the pixels width of the header cell. This includes the
* indent, if applicable.
- *
+ *
* @return The width in pixels
*/
protected int getWidthWithIndent() {
@@ -3012,7 +3020,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Returns the pixels width of the header cell.
- *
+ *
* @return The width in pixels
*/
public int getWidth() {
@@ -3021,7 +3029,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* This method exists for the needs of {@link VTreeTable} only.
- *
+ *
* @return <code>true</code> if this is hierarcyColumn's header cell,
* <code>false</code> otherwise
*/
@@ -3053,9 +3061,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
if (enabled && event != null) {
if (isResizing
|| event.getEventTarget().cast() == colResizeWidget) {
- if (dragging
- && (event.getTypeInt() == Event.ONMOUSEUP || event
- .getTypeInt() == Event.ONTOUCHEND)) {
+ if (dragging && (event.getTypeInt() == Event.ONMOUSEUP
+ || event.getTypeInt() == Event.ONTOUCHEND)) {
// Handle releasing column header on spacer #5318
handleCaptionEvent(event);
} else {
@@ -3092,8 +3099,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
private void createFloatingCopy() {
floatingCopyOfHeaderCell = DOM.createDiv();
DOM.setInnerHTML(floatingCopyOfHeaderCell, DOM.getInnerHTML(td));
- floatingCopyOfHeaderCell = DOM
- .getChild(floatingCopyOfHeaderCell, 2);
+ floatingCopyOfHeaderCell = DOM.getChild(floatingCopyOfHeaderCell,
+ 2);
// #12714 the shown "ghost element" should be inside
// v-overlay-container, and it should contain the same styles as the
// table to enable theming (except v-table & v-widget).
@@ -3135,7 +3142,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Fires a header click event after the user has clicked a column header
* cell
- *
+ *
* @param event
* The click event
*/
@@ -3207,8 +3214,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
if (!moved) {
// mouse event was a click to header -> sort column
- if (sortable
- && WidgetUtil.isTouchEventOrLeftMouseButton(event)) {
+ if (sortable && WidgetUtil
+ .isTouchEventOrLeftMouseButton(event)) {
if (sortColumn.equals(cid)) {
// just toggle order
client.updateVariable(paintableId, "sortascending",
@@ -3222,8 +3229,9 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
scrollBodyPanel.setScrollPosition(0);
firstvisible = 0;
rowRequestHandler.setReqFirstRow(0);
- rowRequestHandler.setReqRows((int) (2 * pageLength
- * cache_rate + pageLength));
+ rowRequestHandler
+ .setReqRows((int) (2 * pageLength * cache_rate
+ + pageLength));
rowRequestHandler.deferRowFetch(); // some validation +
// defer 250ms
rowRequestHandler.cancel(); // instead of waiting
@@ -3250,10 +3258,10 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
// distance in x-axis (the same idea as in #13381)
int currentX = WidgetUtil.getTouchOrMouseClientX(event);
- if (currentDragX == null
- || Math.abs(currentDragX - currentX) > VDragAndDropManager.MINIMUM_DISTANCE_TO_START_DRAG) {
- if (dragging
- && WidgetUtil.isTouchEventOrLeftMouseButton(event)) {
+ if (currentDragX == null || Math.abs(currentDragX
+ - currentX) > VDragAndDropManager.MINIMUM_DISTANCE_TO_START_DRAG) {
+ if (dragging && WidgetUtil
+ .isTouchEventOrLeftMouseButton(event)) {
if (event.getTypeInt() == Event.ONTOUCHMOVE) {
/*
* prevent using this event in e.g. scrolling
@@ -3288,7 +3296,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
+ scrollBody.getCellExtraWidth();
}
final int dist = Math.abs(x - slotX);
- if (closestDistance == -1 || dist < closestDistance) {
+ if (closestDistance == -1
+ || dist < closestDistance) {
closestDistance = dist;
closestSlot = i;
}
@@ -3327,8 +3336,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
// Ensure last header cell is taking into account possible
// column selector
- HeaderCell lastCell = tHead.getHeaderCell(tHead
- .getVisibleCellCount() - 1);
+ HeaderCell lastCell = tHead
+ .getHeaderCell(tHead.getVisibleCellCount() - 1);
tHead.resizeCaptionContainer(lastCell);
triggerLazyColumnAdjustment(true);
@@ -3364,7 +3373,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Returns the smallest possible cell width in pixels.
- *
+ *
* @param includeIndent
* - width should include hierarchy column indent if
* applicable (VTreeTable only)
@@ -3414,7 +3423,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Saves natural column width if it hasn't been saved already.
- *
+ *
* @param columnIndex
* @since 7.3.9
*/
@@ -3429,7 +3438,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
}
if (columnIndex < 0) {
columnIndex = 0;
- for (Iterator<Widget> it = tHead.iterator(); it.hasNext(); columnIndex++) {
+ for (Iterator<Widget> it = tHead.iterator(); it
+ .hasNext(); columnIndex++) {
if (it.next() == this) {
break;
}
@@ -3444,15 +3454,15 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
* Detects the natural minimum width for the column of this header cell.
* If column is resized by user or the width is defined by server the
* actual width is returned. Else the natural min width is returned.
- *
+ *
* @param columnIndex
* column index hint, if -1 (unknown) it will be detected
- *
+ *
* @return
*/
public int getNaturalColumnWidth(int columnIndex) {
- final int iw = columnIndex == getHierarchyColumnIndex() ? scrollBody
- .getMaxIndent() : 0;
+ final int iw = columnIndex == getHierarchyColumnIndex()
+ ? scrollBody.getMaxIndent() : 0;
saveNaturalColumnWidthIfNotSaved(columnIndex);
if (isDefinedWidth()) {
if (iw > width) {
@@ -3488,7 +3498,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* HeaderCell that is header cell for row headers.
- *
+ *
* Reordering disabled and clicking on it resets sorting.
*/
public class RowHeadersHeaderCell extends HeaderCell {
@@ -3573,7 +3583,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
for (Widget w : visibleCells) {
int cellExtraWidth = w.getOffsetWidth();
if (scrollBody != null
- && visibleCells.indexOf(w) == getHierarchyColumnIndex()
+ && visibleCells
+ .indexOf(w) == getHierarchyColumnIndex()
&& cellExtraWidth < scrollBody.getMaxIndent()) {
// indent must be taken into consideration even if it
// hasn't been applied yet
@@ -3824,9 +3835,9 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Get's HeaderCell by it's column Key.
- *
+ *
* Note that this returns HeaderCell even if it is currently collapsed.
- *
+ *
* @param cid
* Column key of accessed HeaderCell
* @return HeaderCell
@@ -3871,14 +3882,14 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
removeSlotFocus();
if (index > 0) {
Element child = tr.getChild(index - 1).getFirstChild().cast();
- child.setClassName(VScrollTable.this.getStylePrimaryName()
- + "-resizer");
+ child.setClassName(
+ VScrollTable.this.getStylePrimaryName() + "-resizer");
child.addClassName(VScrollTable.this.getStylePrimaryName()
+ "-focus-slot-right");
} else {
Element child = tr.getChild(index).getFirstChild().cast();
- child.setClassName(VScrollTable.this.getStylePrimaryName()
- + "-resizer");
+ child.setClassName(
+ VScrollTable.this.getStylePrimaryName() + "-resizer");
child.addClassName(VScrollTable.this.getStylePrimaryName()
+ "-focus-slot-left");
}
@@ -3891,13 +3902,13 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
}
if (focusedSlot == 0) {
Element child = tr.getChild(focusedSlot).getFirstChild().cast();
- child.setClassName(VScrollTable.this.getStylePrimaryName()
- + "-resizer");
+ child.setClassName(
+ VScrollTable.this.getStylePrimaryName() + "-resizer");
} else if (focusedSlot > 0) {
Element child = tr.getChild(focusedSlot - 1).getFirstChild()
.cast();
- child.setClassName(VScrollTable.this.getStylePrimaryName()
- + "-resizer");
+ child.setClassName(
+ VScrollTable.this.getStylePrimaryName() + "-resizer");
}
focusedSlot = -1;
}
@@ -3953,9 +3964,10 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
}
// update variable to server
- client.updateVariable(paintableId, "collapsedcolumns",
- collapsedColumns.toArray(new String[collapsedColumns
- .size()]), false);
+ client.updateVariable(
+ paintableId, "collapsedcolumns", collapsedColumns
+ .toArray(new String[collapsedColumns.size()]),
+ false);
// let rowRequestHandler determine proper rows
rowRequestHandler.refreshContent();
lazyRevertFocusToRow(currentlyFocusedRow);
@@ -4111,8 +4123,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
DOM.appendChild(td, captionContainer);
- DOM.sinkEvents(td, Event.MOUSEEVENTS | Event.ONDBLCLICK
- | Event.ONCONTEXTMENU);
+ DOM.sinkEvents(td,
+ Event.MOUSEEVENTS | Event.ONDBLCLICK | Event.ONCONTEXTMENU);
setElement(td);
@@ -4120,13 +4132,13 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
}
protected void updateStyleNames(String primaryStyleName) {
- captionContainer.setClassName(primaryStyleName
- + "-footer-container");
+ captionContainer
+ .setClassName(primaryStyleName + "-footer-container");
}
/**
* Sets the text of the footer
- *
+ *
* @param footerText
* The text in the footer
*/
@@ -4140,7 +4152,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Set alignment of the text in the cell
- *
+ *
* @param c
* The alignment which can be ALIGN_CENTER, ALIGN_LEFT,
* ALIGN_RIGHT
@@ -4164,7 +4176,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Get the alignment of the text int the cell
- *
+ *
* @return Returns either ALIGN_CENTER, ALIGN_LEFT or ALIGN_RIGHT
*/
public char getAlign() {
@@ -4175,7 +4187,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
* Sets the width of the cell. This width should not include any
* possible indent modifications that are present in
* {@link VScrollTableBody#getMaxIndent()}.
- *
+ *
* @param w
* The width of the cell
* @param ensureDefinedWidth
@@ -4217,8 +4229,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
*/
if (scrollBody != null) {
int maxIndent = scrollBody.getMaxIndent();
- if (w < maxIndent
- && tFoot.visibleCells.indexOf(this) == getHierarchyColumnIndex()) {
+ if (w < maxIndent && tFoot.visibleCells
+ .indexOf(this) == getHierarchyColumnIndex()) {
// ensure there's room for the indent
w = maxIndent;
}
@@ -4233,7 +4245,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
int tdWidth = width;
int maxIndent = scrollBody.getMaxIndent();
if (tdWidth < maxIndent
- && tFoot.visibleCells.indexOf(this) == getHierarchyColumnIndex()) {
+ && tFoot.visibleCells.indexOf(
+ this) == getHierarchyColumnIndex()) {
// ensure there's room for the indent
tdWidth = maxIndent;
}
@@ -4257,7 +4270,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Detects if width is fixed by developer on server side or resized to
* current width by user.
- *
+ *
* @return true if defined, false if "natural" width
*/
public boolean isDefinedWidth() {
@@ -4266,7 +4279,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Returns the pixels width of the footer cell.
- *
+ *
* @return The width in pixels
*/
public int getWidth() {
@@ -4275,7 +4288,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Sets the expand ratio of the cell
- *
+ *
* @param floatAttribute
* The expand ratio
*/
@@ -4285,7 +4298,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Returns the expand ratio of the cell
- *
+ *
* @return The expand ratio
*/
public float getExpandRatio() {
@@ -4294,7 +4307,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Is the cell enabled?
- *
+ *
* @return True if enabled else False
*/
public boolean isEnabled() {
@@ -4330,7 +4343,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Handles a event on the captions
- *
+ *
* @param event
* The event to handle
*/
@@ -4344,7 +4357,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Fires a footer click event after the user has clicked a column footer
* cell
- *
+ *
* @param event
* The click event
*/
@@ -4361,7 +4374,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Returns the column key of the column
- *
+ *
* @return The column key
*/
public String getColKey() {
@@ -4370,7 +4383,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Saves natural column width if it hasn't been saved already.
- *
+ *
* @param columnIndex
* @since 7.3.9
*/
@@ -4383,7 +4396,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
.getOffsetWidth() + getHeaderPadding();
if (columnIndex < 0) {
columnIndex = 0;
- for (Iterator<Widget> it = tHead.iterator(); it.hasNext(); columnIndex++) {
+ for (Iterator<Widget> it = tHead.iterator(); it
+ .hasNext(); columnIndex++) {
if (it.next() == this) {
break;
}
@@ -4398,15 +4412,15 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
* Detects the natural minimum width for the column of this header cell.
* If column is resized by user or the width is defined by server the
* actual width is returned. Else the natural min width is returned.
- *
+ *
* @param columnIndex
* column index hint, if -1 (unknown) it will be detected
- *
+ *
* @return
*/
public int getNaturalColumnWidth(int columnIndex) {
- final int iw = columnIndex == getHierarchyColumnIndex() ? scrollBody
- .getMaxIndent() : 0;
+ final int iw = columnIndex == getHierarchyColumnIndex()
+ ? scrollBody.getMaxIndent() : 0;
saveNaturalColumnWidthIfNotSaved(columnIndex);
if (isDefinedWidth()) {
if (iw > width) {
@@ -4429,7 +4443,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* HeaderCell that is header cell for row headers.
- *
+ *
* Reordering disabled and clicking on it resets sorting.
*/
public class RowHeadersFooterCell extends FooterCell {
@@ -4499,7 +4513,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.user.client.ui.Panel#remove(com.google.gwt.user.client
* .ui.Widget)
@@ -4518,7 +4532,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/*
* (non-Javadoc)
- *
+ *
* @see com.google.gwt.user.client.ui.HasWidgets#iterator()
*/
@@ -4529,10 +4543,10 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Gets a footer cell which represents the given columnId
- *
+ *
* @param cid
* The columnId
- *
+ *
* @return The cell
*/
public FooterCell getFooterCell(String cid) {
@@ -4541,7 +4555,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Gets a footer cell by using a column index
- *
+ *
* @param index
* The index of the column
* @return The Cell
@@ -4556,7 +4570,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Updates the cells contents when updateUIDL request is received
- *
+ *
* @param uidl
* The UIDL
*/
@@ -4568,8 +4582,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
final String cid = col.getStringAttribute("cid");
updated.add(cid);
- String caption = col.hasAttribute("fcaption") ? col
- .getStringAttribute("fcaption") : "";
+ String caption = col.hasAttribute("fcaption")
+ ? col.getStringAttribute("fcaption") : "";
FooterCell c = getFooterCell(cid);
if (c == null) {
c = new FooterCell(cid, caption);
@@ -4627,7 +4641,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Set a footer cell for a specified column index
- *
+ *
* @param index
* The index
* @param cell
@@ -4658,7 +4672,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Remove a cell by using the columnId
- *
+ *
* @param colKey
* The columnId to remove
*/
@@ -4669,7 +4683,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Enable a column (Sets the footer cell)
- *
+ *
* @param cid
* The columnId
* @param index
@@ -4702,7 +4716,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Set the horizontal position in the cell in the footer. This is done
* when a horizontal scrollbar is present.
- *
+ *
* @param scrollLeft
* The value of the leftScroll
*/
@@ -4712,7 +4726,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Swap cells when the column are dragged
- *
+ *
* @param oldIndex
* The old index of the cell
* @param newIndex
@@ -4734,7 +4748,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
* This Panel can only contain VScrollTableRow type of widgets. This
* "simulates" very large table, keeping spacers which take room of
* unrendered rows.
- *
+ *
*/
public class VScrollTableBody extends Panel {
@@ -4927,10 +4941,10 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
return;
}
- int reactFirstRow = (int) (firstRowInViewPort - pageLength
- * cache_react_rate);
- int reactLastRow = (int) (firstRowInViewPort + pageLength + pageLength
- * cache_react_rate);
+ int reactFirstRow = (int) (firstRowInViewPort
+ - pageLength * cache_react_rate);
+ int reactLastRow = (int) (firstRowInViewPort + pageLength
+ + pageLength * cache_react_rate);
if (reactFirstRow < 0) {
reactFirstRow = 0;
}
@@ -4941,14 +4955,14 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/*
* #8040 - scroll position is completely changed since the
* latest request, so request a new set of rows.
- *
+ *
* TODO: We should probably check whether the fetched rows match
* the current scroll position right when they arrive, so as to
* not waste time rendering a set of rows that will never be
* visible...
*/
- rowRequestHandler.triggerRowFetch(reactFirstRow, reactLastRow
- - reactFirstRow + 1, 1);
+ rowRequestHandler.triggerRowFetch(reactFirstRow,
+ reactLastRow - reactFirstRow + 1, 1);
} else if (lastRendered < reactLastRow) {
// get some cache rows below visible area
rowRequestHandler.triggerRowFetch(lastRendered + 1,
@@ -4956,28 +4970,28 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
} else if (firstRendered > reactFirstRow) {
/*
* Branch for fetching cache above visible area.
- *
+ *
* If cache needed for both before and after visible area, this
* will be rendered after-cache is received and rendered. So in
* some rare situations the table may make two cache visits to
* server.
*/
- rowRequestHandler.triggerRowFetch(reactFirstRow, firstRendered
- - reactFirstRow, 1);
+ rowRequestHandler.triggerRowFetch(reactFirstRow,
+ firstRendered - reactFirstRow, 1);
}
}
/**
* Inserts rows as provided in the rowData starting at firstIndex.
- *
+ *
* @param rowData
* @param firstIndex
* @param rows
* the number of rows
* @return a list of the rows added.
*/
- protected List<VScrollTableRow> insertRows(UIDL rowData,
- int firstIndex, int rows) {
+ protected List<VScrollTableRow> insertRows(UIDL rowData, int firstIndex,
+ int rows) {
aligns = tHead.getColumnAlignments();
final Iterator<?> it = rowData.getChildIterator();
List<VScrollTableRow> insertedRows = new ArrayList<VScrollTableRow>();
@@ -5051,9 +5065,9 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
* This method is used to instantiate new rows for this table. It
* automatically sets correct widths to rows cells and assigns correct
* client reference for child widgets.
- *
+ *
* This method can be called only after table has been initialized
- *
+ *
* @param uidl
*/
private VScrollTableRow prepareRow(UIDL uidl) {
@@ -5100,8 +5114,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
}
if (index > 0) {
VScrollTableRow sibling = getRowByRowIndex(index - 1);
- tBodyElement
- .insertAfter(row.getElement(), sibling.getElement());
+ tBodyElement.insertAfter(row.getElement(),
+ sibling.getElement());
} else {
VScrollTableRow sibling = getRowByRowIndex(index);
tBodyElement.insertBefore(row.getElement(),
@@ -5294,7 +5308,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Returns the width available for column content.
- *
+ *
* @param columnIndex
* @return
*/
@@ -5310,8 +5324,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
// Spanned rows might cause an NPE.
if (columnIndex < tr.getChildCount()) {
Element wrapperdiv = tr.getCells()
- .getItem(columnIndex)
- .getFirstChildElement().cast();
+ .getItem(columnIndex).getFirstChildElement()
+ .cast();
return wrapperdiv.getOffsetWidth();
}
}
@@ -5324,14 +5338,14 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Sets the content width of a column.
- *
+ *
* Due IE limitation, we must set the width to a wrapper elements inside
* table cells (with overflow hidden, which does not work on td
* elements).
- *
+ *
* To get this work properly crossplatform, we will also set the width
* of td.
- *
+ *
* @param colIndex
* @param w
*/
@@ -5355,11 +5369,12 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* This method exists for the needs of {@link VTreeTable} only. May be
- * removed or replaced in the future.</br> </br> Returns the maximum
- * indent of the hierarcyColumn, if applicable.
- *
+ * removed or replaced in the future.</br>
+ * </br>
+ * Returns the maximum indent of the hierarcyColumn, if applicable.
+ *
* @see {@link VScrollTable#getHierarchyColumnIndex()}
- *
+ *
* @return maximum indent in pixels
*/
protected int getMaxIndent() {
@@ -5368,8 +5383,9 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* This method exists for the needs of {@link VTreeTable} only. May be
- * removed or replaced in the future.</br> </br> Calculates the maximum
- * indent of the hierarcyColumn, if applicable.
+ * removed or replaced in the future.</br>
+ * </br>
+ * Calculates the maximum indent of the hierarcyColumn, if applicable.
*/
protected void calculateMaxIndent() {
// NOP
@@ -5380,8 +5396,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
if (rows.getLength() == 0) {
/* need to temporary add empty row and detect */
VScrollTableRow scrollTableRow = new VScrollTableRow();
- scrollTableRow.updateStyleNames(VScrollTable.this
- .getStylePrimaryName());
+ scrollTableRow.updateStyleNames(
+ VScrollTable.this.getStylePrimaryName());
tBodyElement.appendChild(scrollTableRow.getElement());
detectExtrawidth();
tBodyElement.removeChild(scrollTableRow.getElement());
@@ -5394,8 +5410,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
// for measuring
noCells = true;
VScrollTableRow next = (VScrollTableRow) iterator().next();
- boolean sorted = tHead.getHeaderCell(0) != null ? tHead
- .getHeaderCell(0).isSorted() : false;
+ boolean sorted = tHead.getHeaderCell(0) != null
+ ? tHead.getHeaderCell(0).isSorted() : false;
next.addCell(null, "", ALIGN_LEFT, "", true, sorted);
firstTD = item.getCells().getItem(0);
}
@@ -5450,8 +5466,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
return -1;
}
- public class VScrollTableRow extends Panel implements ActionOwner,
- ContextMenuOwner {
+ public class VScrollTableRow extends Panel
+ implements ActionOwner, ContextMenuOwner {
private static final int TOUCHSCROLL_TIMEOUT = 100;
private static final int DRAGMODE_MULTIROW = 2;
@@ -5483,9 +5499,10 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
this.rowKey = rowKey;
rowElement = Document.get().createTRElement();
setElement(rowElement);
- DOM.sinkEvents(getElement(), Event.MOUSEEVENTS
- | Event.TOUCHEVENTS | Event.ONDBLCLICK
- | Event.ONCONTEXTMENU | VTooltip.TOOLTIP_EVENTS);
+ DOM.sinkEvents(getElement(),
+ Event.MOUSEEVENTS | Event.TOUCHEVENTS | Event.ONDBLCLICK
+ | Event.ONCONTEXTMENU
+ | VTooltip.TOOLTIP_EVENTS);
}
public VScrollTableRow(UIDL uidl, char[] aligns) {
@@ -5610,8 +5627,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
String description = null;
if (uidl.hasAttribute("descr-" + columnId)) {
- description = uidl.getStringAttribute("descr-"
- + columnId);
+ description = uidl
+ .getStringAttribute("descr-" + columnId);
}
boolean sorted = tHead.getHeaderCell(col).isSorted();
@@ -5631,7 +5648,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Overriding this and returning true causes all text cells to be
* rendered as HTML.
- *
+ *
* @return always returns false in the default implementation
*/
protected boolean isRenderHtmlInCells() {
@@ -5640,7 +5657,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Detects whether row is visible in tables viewport.
- *
+ *
* @return
*/
public boolean isInViewPort() {
@@ -5656,7 +5673,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Makes a check based on indexes whether the row is before the
* compared row.
- *
+ *
* @param row1
* @return true if this rows index is smaller than in the row1
*/
@@ -5667,7 +5684,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Sets the index of the row in the whole table. Currently used just
* to set even/odd classname
- *
+ *
* @param indexInWholeTable
*/
private void setIndex(int indexInWholeTable) {
@@ -5687,8 +5704,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
addStyleName(VScrollTable.this.getStylePrimaryName()
+ "-row-odd");
} else {
- addStyleName(VScrollTable.this.getStylePrimaryName()
- + "-row");
+ addStyleName(
+ VScrollTable.this.getStylePrimaryName() + "-row");
}
}
@@ -5762,8 +5779,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
*/
String className = td.getClassName();
String oldPrimaryName = className.split("-cell-content")[0];
- td.setClassName(className.replaceAll(oldPrimaryName,
- primaryStyleName));
+ td.setClassName(
+ className.replaceAll(oldPrimaryName, primaryStyleName));
}
public void addCell(UIDL rowUidl, Widget w, char align,
@@ -5846,7 +5863,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* If there are registered click listeners, sends a click event and
* returns true. Otherwise, does nothing and returns false.
- *
+ *
* @param event
* @param targetTdOrTr
* @param immediate
@@ -5889,8 +5906,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
TooltipInfo info = null;
final Element targetTdOrTr = getTdOrTr(target);
- if (targetTdOrTr != null
- && "td".equals(targetTdOrTr.getTagName().toLowerCase())) {
+ if (targetTdOrTr != null && "td"
+ .equals(targetTdOrTr.getTagName().toLowerCase())) {
TableCellElement td = (TableCellElement) targetTdOrTr
.cast();
info = cellToolTips.get(td);
@@ -5921,7 +5938,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Special handler for touch devices that support native scrolling
- *
+ *
* @return Whether the event was handled by this method.
*/
private boolean handleTouchEvent(final Event event) {
@@ -6048,11 +6065,9 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
final Element targetTdOrTr = getEventTargetTdOrTr(event);
if (type == Event.ONCONTEXTMENU) {
showContextMenu(event);
- if (enabled
- && (actionKeys != null || client
- .hasEventListeners(
- VScrollTable.this,
- TableConstants.ITEM_CLICK_EVENT_ID))) {
+ if (enabled && (actionKeys != null
+ || client.hasEventListeners(VScrollTable.this,
+ TableConstants.ITEM_CLICK_EVENT_ID))) {
/*
* Prevent browser context menu only if there are
* action handlers or item click listeners
@@ -6080,10 +6095,10 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
* event there as the event might get canceled before it
* gets here.
*/
- if (mouseUpPreviewMatched
- && lastMouseDownTarget != null
- && lastMouseDownTarget == getElementTdOrTr(WidgetUtil
- .getElementUnderMouse(event))) {
+ if (mouseUpPreviewMatched && lastMouseDownTarget != null
+ && lastMouseDownTarget == getElementTdOrTr(
+ WidgetUtil
+ .getElementUnderMouse(event))) {
// "Click" with left, right or middle button
if (targetCellOrRowFound) {
@@ -6091,23 +6106,23 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
* Queue here, send at the same time as the
* corresponding value change event - see #7127
*/
- boolean clickEventSent = handleClickEvent(
- event, targetTdOrTr, false);
+ boolean clickEventSent = handleClickEvent(event,
+ targetTdOrTr, false);
if (event.getButton() == Event.BUTTON_LEFT
&& isSelectable()) {
// Ctrl+Shift click
- if ((event.getCtrlKey() || event
- .getMetaKey())
+ if ((event.getCtrlKey()
+ || event.getMetaKey())
&& event.getShiftKey()
&& isMultiSelectModeDefault()) {
toggleShiftSelection(false);
setRowFocus(this);
// Ctrl click
- } else if ((event.getCtrlKey() || event
- .getMetaKey())
+ } else if ((event.getCtrlKey()
+ || event.getMetaKey())
&& isMultiSelectModeDefault()) {
boolean wasSelected = isSelected();
toggleSelection();
@@ -6118,16 +6133,17 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
*/
selectionRangeStart = this;
if (wasSelected) {
- removeRowFromUnsentSelectionRanges(this);
+ removeRowFromUnsentSelectionRanges(
+ this);
}
- } else if ((event.getCtrlKey() || event
- .getMetaKey())
+ } else if ((event.getCtrlKey()
+ || event.getMetaKey())
&& isSingleSelectMode()) {
// Ctrl (or meta) click (Single
// selection)
- if (!isSelected()
- || (isSelected() && nullSelectionAllowed)) {
+ if (!isSelected() || (isSelected()
+ && nullSelectionAllowed)) {
if (!isSelected()) {
deselectAll();
@@ -6166,14 +6182,15 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
deselectAll();
}
toggleSelection();
- } else if ((isSingleSelectMode() || isMultiSelectModeSimple())
+ } else if ((isSingleSelectMode()
+ || isMultiSelectModeSimple())
&& nullSelectionAllowed) {
toggleSelection();
- }/*
- * else NOP to avoid excessive server
- * visits (selection is removed with
- * CTRL/META click)
- */
+ } /*
+ * else NOP to avoid excessive server
+ * visits (selection is removed with
+ * CTRL/META click)
+ */
selectionRangeStart = this;
setRowFocus(this);
@@ -6183,7 +6200,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
if (BrowserInfo.get().isIE()) {
((Element) event.getEventTarget()
.cast()).setPropertyJSO(
- "onselectstart", null);
+ "onselectstart", null);
}
// Queue value change
sendSelectedRows(false);
@@ -6222,8 +6239,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
* if row is selected. Null check for active
* delegate is as a workaround.
*/
- if (dragmode != 0
- && touchStart != null
+ if (dragmode != 0 && touchStart != null
&& (TouchScrollDelegate
.getActiveScrollDelegate() == null)) {
startRowDrag(touchStart, type, targetTdOrTr);
@@ -6312,8 +6328,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
* the corresponding mouseup event if it's on a
* different part of the page.
*/
- lastMouseDownTarget = getElementTdOrTr(WidgetUtil
- .getElementUnderMouse(event));
+ lastMouseDownTarget = getElementTdOrTr(
+ WidgetUtil.getElementUnderMouse(event));
mouseUpPreviewMatched = false;
mouseUpEventPreviewRegistration = Event
.addNativePreviewHandler(mouseUpPreviewHandler);
@@ -6321,14 +6337,13 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
if (targetCellOrRowFound) {
setRowFocus(this);
ensureFocus();
- if (dragmode != 0
- && (event.getButton() == NativeEvent.BUTTON_LEFT)) {
+ if (dragmode != 0 && (event
+ .getButton() == NativeEvent.BUTTON_LEFT)) {
startRowDrag(event, type, targetTdOrTr);
- } else if (event.getCtrlKey()
- || event.getShiftKey()
+ } else if (event.getCtrlKey() || event.getShiftKey()
|| event.getMetaKey()
- && isMultiSelectModeDefault()) {
+ && isMultiSelectModeDefault()) {
// Prevent default text selection in Firefox
event.preventDefault();
@@ -6336,8 +6351,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
// Prevent default text selection in IE
if (BrowserInfo.get().isIE()) {
((Element) event.getEventTarget().cast())
- .setPropertyJSO(
- "onselectstart",
+ .setPropertyJSO("onselectstart",
getPreventTextSelectionIEHack());
}
@@ -6364,10 +6378,12 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
* axis checks
*/
Touch touch = event.getChangedTouches().get(0);
- if (Math.abs(touch.getClientX() - touchStartX) > TouchScrollDelegate.SIGNIFICANT_MOVE_THRESHOLD) {
+ if (Math.abs(touch.getClientX()
+ - touchStartX) > TouchScrollDelegate.SIGNIFICANT_MOVE_THRESHOLD) {
return true;
}
- if (Math.abs(touch.getClientY() - touchStartY) > TouchScrollDelegate.SIGNIFICANT_MOVE_THRESHOLD) {
+ if (Math.abs(touch.getClientY()
+ - touchStartY) > TouchScrollDelegate.SIGNIFICANT_MOVE_THRESHOLD) {
return true;
}
return false;
@@ -6375,7 +6391,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Checks if the row represented by the row key has been selected
- *
+ *
* @param key
* The generated row key
*/
@@ -6409,8 +6425,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
}
}
- VDragEvent ev = VDragAndDropManager.get().startDrag(
- transferable, event, true);
+ VDragEvent ev = VDragAndDropManager.get()
+ .startDrag(transferable, event, true);
if (dragmode == DRAGMODE_MULTIROW && isMultiSelectModeAny()
&& rowKeyIsSelected(rowKey)) {
@@ -6420,8 +6436,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
// Hide rows which are not selected
Element dragImage = ev.getDragImage();
int i = 0;
- for (Iterator<Widget> iterator = scrollBody.iterator(); iterator
- .hasNext();) {
+ for (Iterator<Widget> iterator = scrollBody
+ .iterator(); iterator.hasNext();) {
VScrollTableRow next = (VScrollTableRow) iterator
.next();
@@ -6445,7 +6461,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
* target of the event should not be handled. If the event target is
* the row directly this method returns the TR element instead of
* the TD.
- *
+ *
* @param event
* @return TD or TR element that the event targets (the actual event
* target is this element or a child of it)
@@ -6472,8 +6488,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
if (!(widget instanceof VLabel)
&& !(widget instanceof VEmbedded)
- && !(widget instanceof VTextField && ((VTextField) widget)
- .isReadOnly())) {
+ && !(widget instanceof VTextField
+ && ((VTextField) widget).isReadOnly())) {
return null;
}
}
@@ -6500,7 +6516,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Has the row been selected?
- *
+ *
* @return Returns true if selected, else false
*/
public boolean isSelected() {
@@ -6525,7 +6541,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Is called when a user clicks an item when holding SHIFT key down.
* This will select a new range from the last focused row
- *
+ *
* @param deselectPrevious
* Should the previous selected range be deselected
*/
@@ -6594,7 +6610,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.ui.IActionOwner#getActions ()
*/
@@ -6708,9 +6724,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
if (cells.hasNext()) {
final Object cell = cells.next();
if (cell instanceof String) {
- addSpannedCell(uidl, cell.toString(), aligns[0],
- "", htmlContentAllowed, false, null,
- colCount);
+ addSpannedCell(uidl, cell.toString(), aligns[0], "",
+ htmlContentAllowed, false, null, colCount);
} else {
addSpannedCell(uidl, (Widget) cell, aligns[0], "",
false, colCount);
@@ -6773,7 +6788,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Ensure the component has a focus.
- *
+ *
* TODO the current implementation simply always calls focus for the
* component. In case the Table at some point implements focus/blur
* listeners, this method needs to be evolved to conditionally call
@@ -6984,7 +6999,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
if (getTotalRows() == 0) {
/*
* Too wide header combined with no rows in the table.
- *
+ *
* No horizontal scrollbars would be displayed because
* there's no rows that grows too wide causing the
* scrollBody container div to overflow. Must explicitely
@@ -7017,7 +7032,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
- totalExplicitColumnsWidths;
if (hierarchyHeaderInNeedOfFurtherHandling != null
- && !hierarchyHeaderInNeedOfFurtherHandling.isDefinedWidth()) {
+ && !hierarchyHeaderInNeedOfFurtherHandling
+ .isDefinedWidth()) {
// ensure the cell gets enough space for the indent
int w = hierarchyHeaderInNeedOfFurtherHandling
.getNaturalColumnWidth(hierarchyColumnIndex);
@@ -7102,8 +7118,9 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
while (headCells.hasNext()) {
HeaderCell hc = (HeaderCell) headCells.next();
if (!hc.isResizing && !hc.isDefinedWidth()) {
- setColWidth(colIndex, hc.getWidthWithIndent() + availW
- - checksum, false);
+ setColWidth(colIndex,
+ hc.getWidthWithIndent() + availW - checksum,
+ false);
break;
}
colIndex++;
@@ -7145,7 +7162,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* helper to set pixel size of head and body part
- *
+ *
* @param pixels
*/
private void setContentWidth(int pixels) {
@@ -7284,8 +7301,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
@Override
public void execute() {
- scrollBodyPanel
- .setScrollPosition(measureRowHeightOffset(firstRowInViewPort));
+ scrollBodyPanel.setScrollPosition(
+ measureRowHeightOffset(firstRowInViewPort));
}
});
}
@@ -7295,14 +7312,14 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Helper function to build html snippet for column or row headers
- *
+ *
* @param uidl
* possibly with values caption and icon
* @return html snippet containing possibly an icon + caption text
*/
protected String buildCaptionHtmlSnippet(UIDL uidl) {
- String s = uidl.hasAttribute("caption") ? uidl
- .getStringAttribute("caption") : "";
+ String s = uidl.hasAttribute("caption")
+ ? uidl.getStringAttribute("caption") : "";
if (uidl.hasAttribute("icon")) {
Icon icon = client.getIcon(uidl.getStringAttribute("icon"));
icon.setAlternateText("icon");
@@ -7342,7 +7359,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
scrollTop = scrollBodyPanel.getScrollPosition();
/*
* #6970 - IE sometimes fires scroll events for a detached table.
- *
+ *
* FIXME initializedAndAttached should probably be renamed - its name
* doesn't seem to reflect its semantics. onDetach() doesn't set it to
* false, and changing that might break something else, so we need to
@@ -7352,8 +7369,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
return;
}
if (!enabled) {
- scrollBodyPanel
- .setScrollPosition(measureRowHeightOffset(firstRowInViewPort));
+ scrollBodyPanel.setScrollPosition(
+ measureRowHeightOffset(firstRowInViewPort));
return;
}
@@ -7391,13 +7408,13 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
firstRowInViewPort = maxFirstRow;
}
- int postLimit = (int) (firstRowInViewPort + (pageLength - 1) + pageLength
- * cache_react_rate);
+ int postLimit = (int) (firstRowInViewPort + (pageLength - 1)
+ + pageLength * cache_react_rate);
if (postLimit > totalRows - 1) {
postLimit = totalRows - 1;
}
- int preLimit = (int) (firstRowInViewPort - pageLength
- * cache_react_rate);
+ int preLimit = (int) (firstRowInViewPort
+ - pageLength * cache_react_rate);
if (preLimit < 0) {
preLimit = 0;
}
@@ -7416,15 +7433,15 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
if (allRenderedRowsAreNew()) {
// need a totally new set of rows
- rowRequestHandler
- .setReqFirstRow((firstRowInViewPort - (int) (pageLength * cache_rate)));
+ rowRequestHandler.setReqFirstRow(
+ (firstRowInViewPort - (int) (pageLength * cache_rate)));
int last = firstRowInViewPort + (int) (cache_rate * pageLength)
+ pageLength - 1;
if (last >= totalRows) {
last = totalRows - 1;
}
- rowRequestHandler.setReqRows(last
- - rowRequestHandler.getReqFirstRow() + 1);
+ rowRequestHandler
+ .setReqRows(last - rowRequestHandler.getReqFirstRow() + 1);
updatedReqRows = false;
rowRequestHandler.deferRowFetch();
return;
@@ -7432,19 +7449,18 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
if (preLimit < firstRendered) {
// need some rows to the beginning of the rendered area
- rowRequestHandler
- .setReqFirstRow((int) (firstRowInViewPort - pageLength
- * cache_rate));
- rowRequestHandler.setReqRows(firstRendered
- - rowRequestHandler.getReqFirstRow());
+ rowRequestHandler.setReqFirstRow(
+ (int) (firstRowInViewPort - pageLength * cache_rate));
+ rowRequestHandler.setReqRows(
+ firstRendered - rowRequestHandler.getReqFirstRow());
rowRequestHandler.deferRowFetch();
return;
}
if (postLimit > lastRendered) {
// need some rows to the end of the rendered area
- int reqRows = (int) ((firstRowInViewPort + pageLength + pageLength
- * cache_rate) - lastRendered);
+ int reqRows = (int) ((firstRowInViewPort + pageLength
+ + pageLength * cache_rate) - lastRendered);
rowRequestHandler.triggerRowFetch(lastRendered + 1, reqRows);
}
}
@@ -7453,8 +7469,9 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
int firstRowInViewPort = calcFirstRowInViewPort();
int firstRendered = scrollBody.getFirstRendered();
int lastRendered = scrollBody.getLastRendered();
- return (firstRowInViewPort - pageLength * cache_rate > lastRendered || firstRowInViewPort
- + pageLength + pageLength * cache_rate < firstRendered);
+ return (firstRowInViewPort - pageLength * cache_rate > lastRendered
+ || firstRowInViewPort + pageLength
+ + pageLength * cache_rate < firstRendered);
}
protected int calcFirstRowInViewPort() {
@@ -7477,7 +7494,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
TableDDDetails other = (TableDDDetails) obj;
return dropLocation == other.dropLocation
&& overkey == other.overkey
- && ((colkey != null && colkey.equals(other.colkey)) || (colkey == null && other.colkey == null));
+ && ((colkey != null && colkey.equals(other.colkey))
+ || (colkey == null && other.colkey == null));
}
return false;
}
@@ -7524,10 +7542,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
}
drag.getDropDetails().put("itemIdOver", dropDetails.overkey + "");
- drag.getDropDetails().put(
- "detail",
- dropDetails.dropLocation != null ? dropDetails.dropLocation
- .toString() : null);
+ drag.getDropDetails().put("detail", dropDetails.dropLocation != null
+ ? dropDetails.dropLocation.toString() : null);
}
@@ -7578,8 +7594,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
}
private void deEmphasis() {
- UIObject.setStyleName(getElement(),
- getStylePrimaryName() + "-drag", false);
+ UIObject.setStyleName(getElement(), getStylePrimaryName() + "-drag",
+ false);
if (lastEmphasized == null) {
return;
}
@@ -7604,8 +7620,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
*/
private void emphasis(TableDDDetails details) {
deEmphasis();
- UIObject.setStyleName(getElement(),
- getStylePrimaryName() + "-drag", true);
+ UIObject.setStyleName(getElement(), getStylePrimaryName() + "-drag",
+ true);
// iterate old and new emphasized row
for (Widget w : scrollBody.renderedRows) {
VScrollTableRow row = (VScrollTableRow) w;
@@ -7643,7 +7659,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Moves the selection head to a specific row
- *
+ *
* @param row
* The row to where the selection head should move
* @return Returns true if focus was moved successfully, else false
@@ -7685,7 +7701,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Ensures that the row is visible
- *
+ *
* @param row
* The row to ensure is visible
*/
@@ -7704,12 +7720,13 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Handles the keyboard events handled by the table
- *
+ *
* @param event
* The keyboard event received
* @return true iff the navigation event was handled
*/
- protected boolean handleNavigation(int keycode, boolean ctrl, boolean shift) {
+ protected boolean handleNavigation(int keycode, boolean ctrl,
+ boolean shift) {
if (keycode == KeyCodes.KEY_TAB || keycode == KeyCodes.KEY_SHIFT) {
// Do not handle tab key
return false;
@@ -7717,8 +7734,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
// Down navigation
if (!isSelectable() && keycode == getNavigationDownKey()) {
- scrollBodyPanel.setScrollPosition(scrollBodyPanel
- .getScrollPosition() + scrollingVelocity);
+ scrollBodyPanel.setScrollPosition(
+ scrollBodyPanel.getScrollPosition() + scrollingVelocity);
return true;
} else if (keycode == getNavigationDownKey()) {
if (isMultiSelectModeAny() && moveFocusDown()) {
@@ -7732,8 +7749,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
// Up navigation
if (!isSelectable() && keycode == getNavigationUpKey()) {
- scrollBodyPanel.setScrollPosition(scrollBodyPanel
- .getScrollPosition() - scrollingVelocity);
+ scrollBodyPanel.setScrollPosition(
+ scrollBodyPanel.getScrollPosition() - scrollingVelocity);
return true;
} else if (keycode == getNavigationUpKey()) {
if (isMultiSelectModeAny() && moveFocusUp()) {
@@ -7746,14 +7763,16 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
if (keycode == getNavigationLeftKey()) {
// Left navigation
- scrollBodyPanel.setHorizontalScrollPosition(scrollBodyPanel
- .getHorizontalScrollPosition() - scrollingVelocity);
+ scrollBodyPanel.setHorizontalScrollPosition(
+ scrollBodyPanel.getHorizontalScrollPosition()
+ - scrollingVelocity);
return true;
} else if (keycode == getNavigationRightKey()) {
// Right navigation
- scrollBodyPanel.setHorizontalScrollPosition(scrollBodyPanel
- .getHorizontalScrollPosition() + scrollingVelocity);
+ scrollBodyPanel.setHorizontalScrollPosition(
+ scrollBodyPanel.getHorizontalScrollPosition()
+ + scrollingVelocity);
return true;
}
@@ -7945,8 +7964,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
}
private int getFullyVisibleRowCount() {
- return (int) (scrollBodyPanel.getOffsetHeight() / scrollBody
- .getRowHeight());
+ return (int) (scrollBodyPanel.getOffsetHeight()
+ / scrollBody.getRowHeight());
}
private void scrollByPagelength(int i) {
@@ -7961,7 +7980,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.FocusHandler#onFocus(com.google.gwt.event
* .dom.client.FocusEvent)
@@ -7983,7 +8002,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.BlurHandler#onBlur(com.google.gwt.event
* .dom.client.BlurEvent)
@@ -8009,7 +8028,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
&& focusedElement != scrollBodyPanel.getFocusElement()
&& Util.getConnectorForElement(client, getParent(),
focusedElement) == ConnectorMap.get(client)
- .getConnector(this)) {
+ .getConnector(this)) {
/*
* Steal focus back to the focus handler if it was moved to some
* other part of the table. Avoid stealing focus in other cases.
@@ -8027,14 +8046,14 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Removes a key from a range if the key is found in a selected range
- *
+ *
* @param key
* The key to remove
*/
private void removeRowFromUnsentSelectionRanges(VScrollTableRow row) {
Collection<SelectionRange> newRanges = null;
- for (Iterator<SelectionRange> iterator = selectedRowRanges.iterator(); iterator
- .hasNext();) {
+ for (Iterator<SelectionRange> iterator = selectedRowRanges
+ .iterator(); iterator.hasNext();) {
SelectionRange range = iterator.next();
if (range.inRange(row)) {
// Split the range if given row is in range
@@ -8053,12 +8072,13 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/**
* Can the Table be focused?
- *
+ *
* @return True if the table can be focused, else false
*/
public boolean isFocusable() {
if (scrollBody != null && enabled) {
- return !(!hasHorizontalScrollbar() && !hasVerticalScrollbar() && !isSelectable());
+ return !(!hasHorizontalScrollbar() && !hasVerticalScrollbar()
+ && !isSelectable());
}
return false;
}
@@ -8073,7 +8093,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.Focusable#focus()
*/
@@ -8142,7 +8162,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
}
/**
- *
+ *
* @param keyCode
* @return true if the given keyCode is used by the table for navigation
*/
@@ -8157,7 +8177,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
|| keyCode == getNavigationStartKey();
}
- public void lazyRevertFocusToRow(final VScrollTableRow currentlyFocusedRow) {
+ public void lazyRevertFocusToRow(
+ final VScrollTableRow currentlyFocusedRow) {
Scheduler.get().scheduleFinally(new ScheduledCommand() {
@Override
public void execute() {
@@ -8202,7 +8223,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
* Add this to the element mouse down event by using element.setPropertyJSO
* ("onselectstart",applyDisableTextSelectionIEHack()); Remove it then again
* when the mouse is depressed in the mouse up event.
- *
+ *
* @return Returns the JSO preventing text selection
*/
private static native JavaScriptObject getPreventTextSelectionIEHack()
@@ -8220,14 +8241,14 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
}
private boolean isDynamicWidth() {
- ComponentConnector paintable = ConnectorMap.get(client).getConnector(
- this);
+ ComponentConnector paintable = ConnectorMap.get(client)
+ .getConnector(this);
return paintable.isUndefinedWidth();
}
private boolean isDynamicHeight() {
- ComponentConnector paintable = ConnectorMap.get(client).getConnector(
- this);
+ ComponentConnector paintable = ConnectorMap.get(client)
+ .getConnector(this);
if (paintable == null) {
// This should be refactored. As isDynamicHeight can be called from
// a timer it is possible that the connector has been unregistered
@@ -8264,15 +8285,17 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
private static final RegExp SUBPART_FOOTER_REGEXP = RegExp
.compile(SUBPART_FOOTER + "\\[(\\d+)\\]");
/** Matches row[ix] - used for extracting the index of the targeted row */
- private static final RegExp SUBPART_ROW_REGEXP = RegExp.compile(SUBPART_ROW
- + "\\[(\\d+)]");
- /** Matches col[ix] - used for extracting the index of the targeted column */
- private static final RegExp SUBPART_ROW_COL_REGEXP = RegExp
- .compile(SUBPART_ROW + "\\[(\\d+)\\]/" + SUBPART_COL
- + "\\[(\\d+)\\]");
+ private static final RegExp SUBPART_ROW_REGEXP = RegExp
+ .compile(SUBPART_ROW + "\\[(\\d+)]");
+ /**
+ * Matches col[ix] - used for extracting the index of the targeted column
+ */
+ private static final RegExp SUBPART_ROW_COL_REGEXP = RegExp.compile(
+ SUBPART_ROW + "\\[(\\d+)\\]/" + SUBPART_COL + "\\[(\\d+)\\]");
@Override
- public com.google.gwt.user.client.Element getSubPartElement(String subPart) {
+ public com.google.gwt.user.client.Element getSubPartElement(
+ String subPart) {
if (SUBPART_ROW_COL_REGEXP.test(subPart)) {
MatchResult result = SUBPART_ROW_COL_REGEXP.exec(subPart);
int rowIx = Integer.valueOf(result.getGroup(1));
@@ -8314,7 +8337,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
}
@Override
- public String getSubPartName(com.google.gwt.user.client.Element subElement) {
+ public String getSubPartName(
+ com.google.gwt.user.client.Element subElement) {
Widget widget = WidgetUtil.findWidget(subElement, null);
if (widget instanceof HeaderCell) {
return SUBPART_HEADER + "[" + tHead.visibleCells.indexOf(widget)
@@ -8329,7 +8353,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
if (rowIx >= 0) {
int colIx = -1;
for (int ix = 0; ix < row.getElement().getChildCount(); ix++) {
- if (row.getElement().getChild(ix).isOrHasChild(subElement)) {
+ if (row.getElement().getChild(ix)
+ .isOrHasChild(subElement)) {
colIx = ix;
break;
}
diff --git a/client/src/main/java/com/vaadin/client/ui/VSlider.java b/client/src/main/java/com/vaadin/client/ui/VSlider.java
index 952c387539..cc36d8b8d9 100644
--- a/client/src/main/java/com/vaadin/client/ui/VSlider.java
+++ b/client/src/main/java/com/vaadin/client/ui/VSlider.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -37,8 +37,8 @@ import com.vaadin.client.BrowserInfo;
import com.vaadin.client.WidgetUtil;
import com.vaadin.shared.ui.slider.SliderOrientation;
-public class VSlider extends SimpleFocusablePanel implements Field,
- HasValue<Double>, SubPartAware {
+public class VSlider extends SimpleFocusablePanel
+ implements Field, HasValue<Double>, SubPartAware {
public static final String CLASSNAME = "v-slider";
@@ -137,7 +137,8 @@ public class VSlider extends SimpleFocusablePanel implements Field,
updateStyleNames(style, true);
}
- protected void updateStyleNames(String styleName, boolean isPrimaryStyleName) {
+ protected void updateStyleNames(String styleName,
+ boolean isPrimaryStyleName) {
feedbackPopup.removeStyleName(getStylePrimaryName() + "-feedback");
removeStyleName(getStylePrimaryName() + "-vertical");
@@ -282,8 +283,10 @@ public class VSlider extends SimpleFocusablePanel implements Field,
increaseValue(true);
} else if (DOM.eventGetType(event) == Event.MOUSEEVENTS) {
processBaseEvent(event);
- } else if ((BrowserInfo.get().isGecko() && DOM.eventGetType(event) == Event.ONKEYPRESS)
- || (!BrowserInfo.get().isGecko() && DOM.eventGetType(event) == Event.ONKEYDOWN)) {
+ } else if ((BrowserInfo.get().isGecko()
+ && DOM.eventGetType(event) == Event.ONKEYPRESS)
+ || (!BrowserInfo.get().isGecko()
+ && DOM.eventGetType(event) == Event.ONKEYDOWN)) {
if (handleNavigation(event.getKeyCode(), event.getCtrlKey(),
event.getShiftKey())) {
@@ -403,8 +406,8 @@ public class VSlider extends SimpleFocusablePanel implements Field,
}
if (isVertical()) {
- v = ((baseSize - (coord - baseOffset)) / (double) (baseSize - handleSize))
- * (max - min) + min;
+ v = ((baseSize - (coord - baseOffset))
+ / (double) (baseSize - handleSize)) * (max - min) + min;
} else {
v = ((coord - baseOffset) / (double) (baseSize - handleSize))
* (max - min) + min;
@@ -422,7 +425,7 @@ public class VSlider extends SimpleFocusablePanel implements Field,
/**
* TODO consider extracting touches support to an impl class specific for
* webkit (only browser that really supports touches).
- *
+ *
* @param event
* @return
*/
@@ -460,7 +463,7 @@ public class VSlider extends SimpleFocusablePanel implements Field,
/**
* Handles the keyboard events handled by the Slider
- *
+ *
* @param event
* The keyboard event received
* @return true iff the navigation event was handled
@@ -503,7 +506,7 @@ public class VSlider extends SimpleFocusablePanel implements Field,
* Get the key that increases the vertical slider. By default it is the up
* arrow key but by overriding this you can change the key to whatever you
* want.
- *
+ *
* @return The keycode of the key
*/
protected int getNavigationUpKey() {
@@ -514,7 +517,7 @@ public class VSlider extends SimpleFocusablePanel implements Field,
* Get the key that decreases the vertical slider. By default it is the down
* arrow key but by overriding this you can change the key to whatever you
* want.
- *
+ *
* @return The keycode of the key
*/
protected int getNavigationDownKey() {
@@ -525,7 +528,7 @@ public class VSlider extends SimpleFocusablePanel implements Field,
* Get the key that decreases the horizontal slider. By default it is the
* left arrow key but by overriding this you can change the key to whatever
* you want.
- *
+ *
* @return The keycode of the key
*/
protected int getNavigationLeftKey() {
@@ -536,7 +539,7 @@ public class VSlider extends SimpleFocusablePanel implements Field,
* Get the key that increases the horizontal slider. By default it is the
* right arrow key but by overriding this you can change the key to whatever
* you want.
- *
+ *
* @return The keycode of the key
*/
protected int getNavigationRightKey() {
@@ -657,7 +660,8 @@ public class VSlider extends SimpleFocusablePanel implements Field,
}
@Override
- public com.google.gwt.user.client.Element getSubPartElement(String subPart) {
+ public com.google.gwt.user.client.Element getSubPartElement(
+ String subPart) {
if (subPart.equals("popup")) {
feedbackPopup.show();
return feedbackPopup.getElement();
@@ -666,7 +670,8 @@ public class VSlider extends SimpleFocusablePanel implements Field,
}
@Override
- public String getSubPartName(com.google.gwt.user.client.Element subElement) {
+ public String getSubPartName(
+ com.google.gwt.user.client.Element subElement) {
if (feedbackPopup.getElement().isOrHasChild(subElement)) {
return "popup";
}
diff --git a/client/src/main/java/com/vaadin/client/ui/VSplitPanelHorizontal.java b/client/src/main/java/com/vaadin/client/ui/VSplitPanelHorizontal.java
index 1a3e699b20..facba82b4a 100644
--- a/client/src/main/java/com/vaadin/client/ui/VSplitPanelHorizontal.java
+++ b/client/src/main/java/com/vaadin/client/ui/VSplitPanelHorizontal.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/VSplitPanelVertical.java b/client/src/main/java/com/vaadin/client/ui/VSplitPanelVertical.java
index 7baed03ca3..b3904960ad 100644
--- a/client/src/main/java/com/vaadin/client/ui/VSplitPanelVertical.java
+++ b/client/src/main/java/com/vaadin/client/ui/VSplitPanelVertical.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,7 +32,8 @@ public class VSplitPanelVertical extends VAbstractSplitPanel {
getFirstContainer().getStyle().setOverflow(Overflow.HIDDEN);
}
- if (getSecondWidget() != null && isWidgetFullHeight(getSecondWidget())) {
+ if (getSecondWidget() != null
+ && isWidgetFullHeight(getSecondWidget())) {
getSecondContainer().getStyle().setOverflow(Overflow.HIDDEN);
}
}
diff --git a/client/src/main/java/com/vaadin/client/ui/VTabsheet.java b/client/src/main/java/com/vaadin/client/ui/VTabsheet.java
index 9b1608cb65..ca7db968d8 100644
--- a/client/src/main/java/com/vaadin/client/ui/VTabsheet.java
+++ b/client/src/main/java/com/vaadin/client/ui/VTabsheet.java
@@ -77,7 +77,8 @@ import com.vaadin.shared.ui.tabsheet.TabState;
import com.vaadin.shared.ui.tabsheet.TabsheetServerRpc;
import com.vaadin.shared.ui.tabsheet.TabsheetState;
-public class VTabsheet extends VTabsheetBase implements Focusable, SubPartAware {
+public class VTabsheet extends VTabsheetBase
+ implements Focusable, SubPartAware {
private static final String PREV_SCROLLER_DISABLED_CLASSNAME = "Prev-disabled";
@@ -284,7 +285,8 @@ public class VTabsheet extends VTabsheetBase implements Focusable, SubPartAware
}
@Override
- public HandlerRegistration addMouseDownHandler(MouseDownHandler handler) {
+ public HandlerRegistration addMouseDownHandler(
+ MouseDownHandler handler) {
return addDomHandler(handler, MouseDownEvent.getType());
}
@@ -334,7 +336,8 @@ public class VTabsheet extends VTabsheetBase implements Focusable, SubPartAware
}
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, this));
} else {
@@ -348,9 +351,9 @@ public class VTabsheet extends VTabsheetBase implements Focusable, SubPartAware
boolean ret = updateCaptionWithoutOwner(captionString,
!tabState.enabled, hasAttribute(tabState.description),
hasAttribute(tabState.componentError),
- tab.getTabsheet().connector
- .getResourceUrl(ComponentConstants.ICON_RESOURCE
- + tabState.key), tabState.iconAltText);
+ tab.getTabsheet().connector.getResourceUrl(
+ ComponentConstants.ICON_RESOURCE + tabState.key),
+ tabState.iconAltText);
setClosable(tabState.closable);
@@ -602,7 +605,8 @@ public class VTabsheet extends VTabsheetBase implements Focusable, SubPartAware
}
// FIXME: Shouldn't something be selected instead?
- int scrollerIndexCandidate = getTabIndex(getTabsheet().scrollerPositionTabId);
+ int scrollerIndexCandidate = getTabIndex(
+ getTabsheet().scrollerPositionTabId);
if (scrollerIndexCandidate < 0) {
// The tab with id scrollerPositionTabId has been removed
scrollerIndexCandidate = getTabsheet().scrollerIndex;
@@ -901,15 +905,15 @@ public class VTabsheet extends VTabsheetBase implements Focusable, SubPartAware
scrollerPrev = DOM.createButton();
scrollerPrev.setTabIndex(-1);
- DOM.setElementProperty(scrollerPrev, "className", SCROLLER_CLASSNAME
- + "Prev");
+ DOM.setElementProperty(scrollerPrev, "className",
+ SCROLLER_CLASSNAME + "Prev");
Roles.getTablistRole().setAriaHiddenState(scrollerPrev, true);
DOM.sinkEvents(scrollerPrev, Event.ONCLICK | Event.ONMOUSEDOWN);
scrollerNext = DOM.createButton();
scrollerNext.setTabIndex(-1);
- DOM.setElementProperty(scrollerNext, "className", SCROLLER_CLASSNAME
- + "Next");
+ DOM.setElementProperty(scrollerNext, "className",
+ SCROLLER_CLASSNAME + "Next");
Roles.getTablistRole().setAriaHiddenState(scrollerNext, true);
DOM.sinkEvents(scrollerNext, Event.ONCLICK | Event.ONMOUSEDOWN);
@@ -923,7 +927,8 @@ public class VTabsheet extends VTabsheetBase implements Focusable, SubPartAware
deco = DOM.createDiv();
tb.setStyleName(CLASSNAME + "-tabs");
- DOM.setElementProperty(contentNode, "className", CLASSNAME + "-content");
+ DOM.setElementProperty(contentNode, "className",
+ CLASSNAME + "-content");
DOM.setElementProperty(deco, "className", CLASSNAME + "-deco");
add(tb, tabs);
@@ -1020,7 +1025,8 @@ public class VTabsheet extends VTabsheetBase implements Focusable, SubPartAware
// style inheritance)
if (ComponentStateUtil.hasStyles(state)) {
final List<String> styles = state.styles;
- if (currentStyle == null || !currentStyle.equals(styles.toString())) {
+ if (currentStyle == null
+ || !currentStyle.equals(styles.toString())) {
currentStyle = styles.toString();
final String tabsBaseClass = TABS_CLASSNAME;
String tabsClass = tabsBaseClass;
@@ -1041,8 +1047,8 @@ public class VTabsheet extends VTabsheetBase implements Focusable, SubPartAware
} else {
tb.setStyleName(CLASSNAME + "-tabs");
DOM.setElementProperty(tabs, "className", TABS_CLASSNAME);
- DOM.setElementProperty(contentNode, "className", CLASSNAME
- + "-content");
+ DOM.setElementProperty(contentNode, "className",
+ CLASSNAME + "-content");
DOM.setElementProperty(deco, "className", CLASSNAME + "-deco");
}
}
@@ -1109,8 +1115,8 @@ public class VTabsheet extends VTabsheetBase implements Focusable, SubPartAware
}
private boolean isScrollerPrevDisabled() {
- return scrollerPrev.getClassName().contains(
- PREV_SCROLLER_DISABLED_CLASSNAME);
+ return scrollerPrev.getClassName()
+ .contains(PREV_SCROLLER_DISABLED_CLASSNAME);
}
private boolean isScrollerHidden() {
@@ -1319,18 +1325,16 @@ public class VTabsheet extends VTabsheetBase implements Focusable, SubPartAware
boolean clipped = isClippedTabs();
if (tb.getTabCount() > 0 && tb.isVisible() && (scrolled || clipped)) {
scroller.getStyle().clearDisplay();
- DOM.setElementProperty(scrollerPrev, "className",
- SCROLLER_CLASSNAME
- + (scrolled ? "Prev"
- : PREV_SCROLLER_DISABLED_CLASSNAME));
+ DOM.setElementProperty(scrollerPrev, "className", SCROLLER_CLASSNAME
+ + (scrolled ? "Prev" : PREV_SCROLLER_DISABLED_CLASSNAME));
DOM.setElementProperty(scrollerNext, "className",
SCROLLER_CLASSNAME + (clipped ? "Next" : "Next-disabled"));
// the active tab should be focusable if and only if it is visible
boolean isActiveTabVisible = scrollerIndex <= activeTabIndex
&& !isClipped(tb.selected);
- tb.selected.setTabulatorIndex(isActiveTabVisible ? tabulatorIndex
- : -1);
+ tb.selected.setTabulatorIndex(
+ isActiveTabVisible ? tabulatorIndex : -1);
} else {
scroller.getStyle().setDisplay(Display.NONE);
@@ -1358,8 +1362,8 @@ public class VTabsheet extends VTabsheetBase implements Focusable, SubPartAware
/** For internal use only. May be removed or replaced in the future. */
public void showAllTabs() {
scrollerIndex = tb.getFirstVisibleTab();
- scrollerPositionTabId = scrollerIndex < 0 ? null : tb
- .getTab(scrollerIndex).id;
+ scrollerPositionTabId = scrollerIndex < 0 ? null
+ : tb.getTab(scrollerIndex).id;
for (int i = 0; i < tb.getTabCount(); i++) {
Tab t = tb.getTab(i);
if (!t.isHiddenOnServer()) {
@@ -1373,9 +1377,10 @@ public class VTabsheet extends VTabsheetBase implements Focusable, SubPartAware
}
private boolean isClippedTabs() {
- return (tb.getOffsetWidth() - DOM.getElementPropertyInt((Element) tb
- .getContainerElement().getLastChild().cast(), "offsetWidth")) > getOffsetWidth()
- - (isScrolledTabs() ? scroller.getOffsetWidth() : 0);
+ return (tb.getOffsetWidth() - DOM.getElementPropertyInt(
+ (Element) tb.getContainerElement().getLastChild().cast(),
+ "offsetWidth")) > getOffsetWidth()
+ - (isScrolledTabs() ? scroller.getOffsetWidth() : 0);
}
private boolean isClipped(Tab tab) {
@@ -1461,7 +1466,7 @@ public class VTabsheet extends VTabsheetBase implements Focusable, SubPartAware
/*
* Generate the correct focus/blur events for the main TabSheet component
* (#14304).
- *
+ *
* The TabSheet must fire one focus event when the user clicks on the tab
* bar (i.e. inner TabBar class) containing the Tabs or when the focus is
* provided to the TabSheet by any means. Also one blur event should be
@@ -1469,15 +1474,15 @@ public class VTabsheet extends VTabsheetBase implements Focusable, SubPartAware
* tab bar and before leaving it, no matter how many times he's pressing the
* Tabs or the scroll buttons, the TabSheet component should not fire any of
* those blur/focus events.
- *
+ *
* The only focusable elements contained in the tab bar are the Tabs (see
* inner class Tab). The reason is the accessibility support.
- *
+ *
* Having this in mind, the chosen solution path for our problem is to match
* a sequence of focus/blur events on the tabs, choose only the first focus
* and last blur events and pass only those further to the main component.
* Any consecutive blur/focus events on 2 Tabs must be ignored.
- *
+ *
* Because in a blur event we don't know whether or not a focus will follow,
* we just defer a command initiated on the blur event to wait and see if
* any focus will appear. The command will be executed after the next focus,
@@ -1733,8 +1738,8 @@ public class VTabsheet extends VTabsheetBase implements Focusable, SubPartAware
focusBlurManager.onFocus(focusSource);
if (focusSource.hasTooltip()) {
- focusSource.setAssistiveDescription(getVTooltip()
- .getUniqueId());
+ focusSource.setAssistiveDescription(
+ getVTooltip().getUniqueId());
getVTooltip().showAssistive(focusSource.getTooltipInfo());
}
@@ -1888,9 +1893,9 @@ public class VTabsheet extends VTabsheetBase implements Focusable, SubPartAware
/**
* Gets the key to activate the selected tab when navigating using
* previous/next (left/right) keys.
- *
+ *
* @return the key to activate the selected tab.
- *
+ *
* @see #getNextTabKey()
* @see #getPreviousTabKey()
*/
@@ -1944,7 +1949,7 @@ public class VTabsheet extends VTabsheetBase implements Focusable, SubPartAware
/**
* Makes tab bar visible.
- *
+ *
* @since 7.2
*/
public void showTabs() {
@@ -1968,7 +1973,8 @@ public class VTabsheet extends VTabsheetBase implements Focusable, SubPartAware
.compile("tab\\[(\\d+)](.*)");
@Override
- public com.google.gwt.user.client.Element getSubPartElement(String subPart) {
+ public com.google.gwt.user.client.Element getSubPartElement(
+ String subPart) {
if ("tabpanel".equals(subPart)) {
return DOM.asOld(tabPanel.getElement().getFirstChildElement());
} else if (SUBPART_TAB_REGEXP.test(subPart)) {
@@ -1989,16 +1995,16 @@ public class VTabsheet extends VTabsheetBase implements Focusable, SubPartAware
}
@Override
- public String getSubPartName(com.google.gwt.user.client.Element subElement) {
+ public String getSubPartName(
+ com.google.gwt.user.client.Element subElement) {
if (tabPanel.getElement().equals(subElement.getParentElement())
|| tabPanel.getElement().equals(subElement)) {
return "tabpanel";
} else {
for (int i = 0; i < tb.getTabCount(); ++i) {
Tab tab = tb.getTab(i);
- if (tab.isClosable()
- && tab.tabCaption.getCloseButton().isOrHasChild(
- subElement)) {
+ if (tab.isClosable() && tab.tabCaption.getCloseButton()
+ .isOrHasChild(subElement)) {
return "tab[" + i + "]/close";
} else if (tab.getElement().isOrHasChild(subElement)) {
return "tab[" + i + "]";
diff --git a/client/src/main/java/com/vaadin/client/ui/VTabsheetBase.java b/client/src/main/java/com/vaadin/client/ui/VTabsheetBase.java
index e96aa035ed..cc22213b14 100644
--- a/client/src/main/java/com/vaadin/client/ui/VTabsheetBase.java
+++ b/client/src/main/java/com/vaadin/client/ui/VTabsheetBase.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -92,7 +92,7 @@ public abstract class VTabsheetBase extends ComplexPanel implements HasEnabled {
/**
* Returns true if the width of the widget is undefined, false otherwise.
- *
+ *
* @since 7.2
* @return true if width of the widget is determined by its content
*/
@@ -102,7 +102,7 @@ public abstract class VTabsheetBase extends ComplexPanel implements HasEnabled {
/**
* Returns true if the height of the widget is undefined, false otherwise.
- *
+ *
* @since 7.2
* @return true if width of the height is determined by its content
*/
@@ -112,10 +112,10 @@ public abstract class VTabsheetBase extends ComplexPanel implements HasEnabled {
/**
* Sets the connector that should be notified of events etc.
- *
+ *
* For internal use only. This method may be removed or replaced in the
* future.
- *
+ *
* @since 7.2
* @param connector
*/
@@ -175,7 +175,7 @@ public abstract class VTabsheetBase extends ComplexPanel implements HasEnabled {
* Sets whether the caption is rendered as HTML.
* <p>
* The default is false, i.e. render tab captions as plain text
- *
+ *
* @since 7.4
* @param captionAsHtml
* true if the captions are rendered as HTML, false if rendered
@@ -187,9 +187,9 @@ public abstract class VTabsheetBase extends ComplexPanel implements HasEnabled {
/**
* Checks whether captions are rendered as HTML
- *
+ *
* The default is false, i.e. render tab captions as plain text
- *
+ *
* @since 7.4
* @return true if the captions are rendered as HTML, false if rendered as
* plain text
diff --git a/client/src/main/java/com/vaadin/client/ui/VTabsheetPanel.java b/client/src/main/java/com/vaadin/client/ui/VTabsheetPanel.java
index 240f493907..a2da8f948a 100644
--- a/client/src/main/java/com/vaadin/client/ui/VTabsheetPanel.java
+++ b/client/src/main/java/com/vaadin/client/ui/VTabsheetPanel.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ import com.vaadin.client.ui.TouchScrollDelegate.TouchScrollHandler;
* A panel that displays all of its child widgets in a 'deck', where only one
* can be visible at a time. It is used by
* {@link com.vaadin.client.ui.VTabsheet}.
- *
+ *
* This class has the same basic functionality as the GWT DeckPanel
* {@link com.google.gwt.user.client.ui.DeckPanel}, with the exception that it
* doesn't manipulate the child widgets' width and height attributes.
@@ -50,7 +50,7 @@ public class VTabsheetPanel extends ComplexPanel {
/**
* Adds the specified widget to the deck.
- *
+ *
* @param w
* the widget to be added
*/
@@ -71,7 +71,7 @@ public class VTabsheetPanel extends ComplexPanel {
/**
* Gets the index of the currently-visible widget.
- *
+ *
* @return the visible widget's index
*/
public int getVisibleWidget() {
@@ -80,7 +80,7 @@ public class VTabsheetPanel extends ComplexPanel {
/**
* Inserts a widget before the specified index.
- *
+ *
* @param w
* the widget to be inserted
* @param beforeIndex
@@ -117,7 +117,7 @@ public class VTabsheetPanel extends ComplexPanel {
/**
* Shows the widget at the specified index. This causes the currently-
* visible widget to be hidden.
- *
+ *
* @param index
* the index of the widget to be shown
*/
@@ -129,8 +129,8 @@ public class VTabsheetPanel extends ComplexPanel {
hide(DOM.getParent(visibleWidget.getElement()));
}
visibleWidget = newVisible;
- touchScrollHandler.setElements(visibleWidget.getElement()
- .getParentElement());
+ touchScrollHandler
+ .setElements(visibleWidget.getElement().getParentElement());
}
// Always ensure the selected tab is visible. If server prevents a tab
// change we might end up here with visibleWidget == newVisible but its
diff --git a/client/src/main/java/com/vaadin/client/ui/VTextArea.java b/client/src/main/java/com/vaadin/client/ui/VTextArea.java
index bb3d3a476b..c675986f1e 100644
--- a/client/src/main/java/com/vaadin/client/ui/VTextArea.java
+++ b/client/src/main/java/com/vaadin/client/ui/VTextArea.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -37,12 +37,12 @@ import com.vaadin.client.ui.dd.DragImageModifier;
/**
* This class represents a multiline textfield (textarea).
- *
+ *
* TODO consider replacing this with a RichTextArea based implementation. IE
* does not support CSS height for textareas in Strict mode :-(
- *
+ *
* @author Vaadin Ltd.
- *
+ *
*/
public class VTextArea extends VTextField implements DragImageModifier {
diff --git a/client/src/main/java/com/vaadin/client/ui/VTextField.java b/client/src/main/java/com/vaadin/client/ui/VTextField.java
index 1268b8a078..946a2b624c 100644
--- a/client/src/main/java/com/vaadin/client/ui/VTextField.java
+++ b/client/src/main/java/com/vaadin/client/ui/VTextField.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -40,9 +40,9 @@ import com.vaadin.shared.ui.textfield.TextFieldConstants;
/**
* This class represents a basic text input field with one row.
- *
+ *
* @author Vaadin Ltd.
- *
+ *
*/
public class VTextField extends TextBoxBase implements Field, ChangeHandler,
FocusHandler, BlurHandler, KeyDownHandler {
@@ -340,7 +340,7 @@ public class VTextField extends TextBoxBase implements Field, ChangeHandler,
* This method is responsible for updating the DOM or otherwise ensuring
* that the given max length is enforced. Called when the max length for the
* field has changed.
- *
+ *
* @param maxLength
* The new max length
*/
@@ -375,7 +375,7 @@ public class VTextField extends TextBoxBase implements Field, ChangeHandler,
* Called when the field value might have changed and/or the field was
* blurred. These are combined so the blur event is sent in the same batch
* as a possible value change event (these are often connected).
- *
+ *
* @param blurred
* true if the field was blurred
*/
@@ -418,7 +418,7 @@ public class VTextField extends TextBoxBase implements Field, ChangeHandler,
/**
* Updates the cursor position variable if it has changed since the last
* update.
- *
+ *
* @return true iff the value was updated
*/
protected boolean updateCursorPosition() {
diff --git a/client/src/main/java/com/vaadin/client/ui/VTextualDate.java b/client/src/main/java/com/vaadin/client/ui/VTextualDate.java
index 4d80b30f4f..77a5867df7 100644
--- a/client/src/main/java/com/vaadin/client/ui/VTextualDate.java
+++ b/client/src/main/java/com/vaadin/client/ui/VTextualDate.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -79,11 +79,10 @@ public class VTextualDate extends VDateField implements Field, ChangeHandler,
text.setText("");
setPrompting(false);
}
- if (getClient() != null
- && getClient().hasEventListeners(VTextualDate.this,
- EventId.FOCUS)) {
- getClient()
- .updateVariable(getId(), EventId.FOCUS, "", true);
+ if (getClient() != null && getClient()
+ .hasEventListeners(VTextualDate.this, EventId.FOCUS)) {
+ getClient().updateVariable(getId(), EventId.FOCUS, "",
+ true);
}
// Needed for tooltip event handling
@@ -101,9 +100,8 @@ public class VTextualDate extends VDateField implements Field, ChangeHandler,
if (prompting) {
text.setText(readonly ? "" : inputPrompt);
}
- if (getClient() != null
- && getClient().hasEventListeners(VTextualDate.this,
- EventId.BLUR)) {
+ if (getClient() != null && getClient()
+ .hasEventListeners(VTextualDate.this, EventId.BLUR)) {
getClient().updateVariable(getId(), EventId.BLUR, "", true);
}
@@ -143,11 +141,13 @@ public class VTextualDate extends VDateField implements Field, ChangeHandler,
} else {
frmString += " HH";
}
- if (currentResolution.getCalendarField() >= Resolution.MINUTE
- .getCalendarField()) {
+ if (currentResolution
+ .getCalendarField() >= Resolution.MINUTE
+ .getCalendarField()) {
frmString += ":mm";
- if (currentResolution.getCalendarField() >= Resolution.SECOND
- .getCalendarField()) {
+ if (currentResolution
+ .getCalendarField() >= Resolution.SECOND
+ .getCalendarField()) {
frmString += ":ss";
}
}
@@ -252,9 +252,8 @@ public class VTextualDate extends VDateField implements Field, ChangeHandler,
// presentation.
// FIXME: Add a description/example here of when this is
// needed
- text.setValue(
- getDateTimeService().formatDate(getDate(),
- getFormatString()), false);
+ text.setValue(getDateTimeService().formatDate(getDate(),
+ getFormatString()), false);
}
// remove possibly added invalid value indication
@@ -274,8 +273,8 @@ public class VTextualDate extends VDateField implements Field, ChangeHandler,
removeStyleName(getStylePrimaryName() + PARSE_ERROR_CLASSNAME);
}
// always send the date string
- getClient()
- .updateVariable(getId(), "dateString", text.getText(), false);
+ getClient().updateVariable(getId(), "dateString", text.getText(),
+ false);
// Update variables
// (only the smallest defining resolution needs to be
@@ -363,12 +362,9 @@ public class VTextualDate extends VDateField implements Field, ChangeHandler,
}
protected void setText(String text) {
- if (inputPrompt != null
- && (text == null || "".equals(text))
- && !this.text.getStyleName()
- .contains(
- VTextField.CLASSNAME + "-"
- + VTextField.CLASSNAME_FOCUS)) {
+ if (inputPrompt != null && (text == null || "".equals(text))
+ && !this.text.getStyleName().contains(VTextField.CLASSNAME + "-"
+ + VTextField.CLASSNAME_FOCUS)) {
text = readonly ? "" : inputPrompt;
setPrompting(true);
} else {
@@ -381,7 +377,8 @@ public class VTextualDate extends VDateField implements Field, ChangeHandler,
private final String TEXTFIELD_ID = "field";
@Override
- public com.google.gwt.user.client.Element getSubPartElement(String subPart) {
+ public com.google.gwt.user.client.Element getSubPartElement(
+ String subPart) {
if (subPart.equals(TEXTFIELD_ID)) {
return text.getElement();
}
@@ -390,7 +387,8 @@ public class VTextualDate extends VDateField implements Field, ChangeHandler,
}
@Override
- public String getSubPartName(com.google.gwt.user.client.Element subElement) {
+ public String getSubPartName(
+ com.google.gwt.user.client.Element subElement) {
if (text.getElement().isOrHasChild(subElement)) {
return TEXTFIELD_ID;
}
diff --git a/client/src/main/java/com/vaadin/client/ui/VTree.java b/client/src/main/java/com/vaadin/client/ui/VTree.java
index efbafd0cb7..7f83548010 100644
--- a/client/src/main/java/com/vaadin/client/ui/VTree.java
+++ b/client/src/main/java/com/vaadin/client/ui/VTree.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -79,11 +79,11 @@ import com.vaadin.shared.ui.dd.VerticalDropLocation;
import com.vaadin.shared.ui.tree.TreeConstants;
/**
- *
+ *
*/
-public class VTree extends FocusElementPanel implements VHasDropHandler,
- FocusHandler, BlurHandler, KeyPressHandler, KeyDownHandler,
- SubPartAware, ActionOwner, HandlesAriaCaption {
+public class VTree extends FocusElementPanel
+ implements VHasDropHandler, FocusHandler, BlurHandler, KeyPressHandler,
+ KeyDownHandler, SubPartAware, ActionOwner, HandlesAriaCaption {
private String lastNodeKey = "";
public static final String CLASSNAME = "v-tree";
@@ -237,7 +237,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.user.client.ui.Widget#onBrowserEvent(com.google.gwt.user
* .client.Event)
@@ -254,8 +254,8 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
} else if (event.getTypeInt() == Event.ONMOUSEUP) {
// Remove IE text selection hack
if (BrowserInfo.get().isIE()) {
- ((Element) event.getEventTarget().cast()).setPropertyJSO(
- "onselectstart", null);
+ ((Element) event.getEventTarget().cast())
+ .setPropertyJSO("onselectstart", null);
}
} else if (event.getTypeInt() == Event.ONKEYUP) {
if (selectionHasChanged) {
@@ -289,7 +289,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
/**
* Returns the first root node of the tree or null if there are no root
* nodes.
- *
+ *
* @return The first root {@link TreeNode}
*/
protected TreeNode getFirstRootNode() {
@@ -302,7 +302,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
/**
* Returns the last root node of the tree or null if there are no root
* nodes.
- *
+ *
* @return The last root {@link TreeNode}
*/
protected TreeNode getLastRootNode() {
@@ -315,7 +315,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
/**
* Returns a list of all root nodes in the Tree in the order they appear in
* the tree.
- *
+ *
* @return A list of all root {@link TreeNode}s.
*/
protected List<TreeNode> getRootNodes() {
@@ -333,8 +333,8 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
drag.getDropDetails().put("itemIdOver", currentMouseOverKey);
if (currentMouseOverKey != null) {
TreeNode treeNode = getNodeByKey(currentMouseOverKey);
- VerticalDropLocation detail = treeNode.getDropDetail(drag
- .getCurrentGwtEvent());
+ VerticalDropLocation detail = treeNode
+ .getDropDetail(drag.getCurrentGwtEvent());
Boolean overTreeNode = null;
if (treeNode != null && !treeNode.isLeaf()
&& detail == VerticalDropLocation.MIDDLE) {
@@ -370,17 +370,20 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
@Override
public void dragOver(final VDragEvent currentDrag) {
- final Object oldIdOver = currentDrag.getDropDetails().get(
- "itemIdOver");
+ final Object oldIdOver = currentDrag.getDropDetails()
+ .get("itemIdOver");
final VerticalDropLocation oldDetail = (VerticalDropLocation) currentDrag
.getDropDetails().get("detail");
updateTreeRelatedDragData(currentDrag);
final VerticalDropLocation detail = (VerticalDropLocation) currentDrag
.getDropDetails().get("detail");
- boolean nodeHasChanged = (currentMouseOverKey != null && currentMouseOverKey != oldIdOver)
- || (currentMouseOverKey == null && oldIdOver != null);
- boolean detailHasChanded = (detail != null && detail != oldDetail)
+ boolean nodeHasChanged = (currentMouseOverKey != null
+ && currentMouseOverKey != oldIdOver)
+ || (currentMouseOverKey == null
+ && oldIdOver != null);
+ boolean detailHasChanded = (detail != null
+ && detail != oldDetail)
|| (detail == null && oldDetail != null);
if (nodeHasChanged || detailHasChanded) {
@@ -396,8 +399,8 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
public void accepted(VDragEvent event) {
VerticalDropLocation curDetail = (VerticalDropLocation) event
.getDropDetails().get("detail");
- if (curDetail == detail
- && newKey.equals(currentMouseOverKey)) {
+ if (curDetail == detail && newKey
+ .equals(currentMouseOverKey)) {
getNodeByKey(newKey).emphasis(detail);
}
/*
@@ -511,7 +514,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
/**
* Is a node selected in the tree
- *
+ *
* @param treeNode
* The node to check
* @return
@@ -634,7 +637,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
/**
* Handles mouse selection
- *
+ *
* @param ctrl
* Was the ctrl-key pressed
* @param shift
@@ -699,7 +702,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.user.client.ui.Widget#onBrowserEvent(com.google.gwt
* .user.client.Event)
@@ -710,7 +713,8 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
final int type = DOM.eventGetType(event);
final Element target = DOM.eventGetTarget(event);
- if (type == Event.ONLOAD && icon != null && target == icon.getElement()) {
+ if (type == Event.ONLOAD && icon != null
+ && target == icon.getElement()) {
iconLoaded.trigger();
}
@@ -719,9 +723,8 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
}
final boolean inCaption = isCaptionElement(target);
- if (inCaption
- && client.hasEventListeners(VTree.this,
- TreeConstants.ITEM_CLICK_EVENT_ID)
+ if (inCaption && client.hasEventListeners(VTree.this,
+ TreeConstants.ITEM_CLICK_EVENT_ID)
&& (type == Event.ONDBLCLICK || type == Event.ONMOUSEUP)) {
fireClick(event);
@@ -751,11 +754,10 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
if (dragMode != 0 || dropHandler != null) {
if (type == Event.ONMOUSEDOWN || type == Event.ONTOUCHSTART) {
- if (nodeCaptionDiv.isOrHasChild((Node) event
- .getEventTarget().cast())) {
- if (dragMode > 0
- && (type == Event.ONTOUCHSTART || event
- .getButton() == NativeEvent.BUTTON_LEFT)) {
+ if (nodeCaptionDiv.isOrHasChild(
+ (Node) event.getEventTarget().cast())) {
+ if (dragMode > 0 && (type == Event.ONTOUCHSTART || event
+ .getButton() == NativeEvent.BUTTON_LEFT)) {
mouseDownEvent = event; // save event for possible
// dd operation
if (type == Event.ONMOUSEDOWN) {
@@ -775,18 +777,17 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
}
}
}
- } else if (type == Event.ONMOUSEMOVE
- || type == Event.ONMOUSEOUT
+ } else if (type == Event.ONMOUSEMOVE || type == Event.ONMOUSEOUT
|| type == Event.ONTOUCHMOVE) {
if (mouseDownEvent != null) {
// start actual drag on slight move when mouse is down
VTransferable t = new VTransferable();
- t.setDragSource(ConnectorMap.get(client).getConnector(
- VTree.this));
+ t.setDragSource(ConnectorMap.get(client)
+ .getConnector(VTree.this));
t.setData("itemId", key);
- VDragEvent drag = VDragAndDropManager.get().startDrag(
- t, mouseDownEvent, true);
+ VDragEvent drag = VDragAndDropManager.get().startDrag(t,
+ mouseDownEvent, true);
drag.createDragImage(nodeCaptionDiv, true);
event.stopPropagation();
@@ -810,14 +811,15 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
/**
* Checks if the given element is the caption or the icon.
- *
+ *
* @param target
* The element to check
* @return true if the element is the caption or the icon
*/
- public boolean isCaptionElement(com.google.gwt.dom.client.Element target) {
- return (target == nodeCaptionSpan || (icon != null && target == icon
- .getElement()));
+ public boolean isCaptionElement(
+ com.google.gwt.dom.client.Element target) {
+ return (target == nodeCaptionSpan
+ || (icon != null && target == icon.getElement()));
}
private void fireClick(final Event evt) {
@@ -849,8 +851,8 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
// selection event happening after this. In all other cases
// we want to send it immediately.
clickEventPending = false;
- if ((details.getButton() == MouseButton.LEFT || details
- .getButton() == MouseButton.MIDDLE)
+ if ((details.getButton() == MouseButton.LEFT
+ || details.getButton() == MouseButton.MIDDLE)
&& !details.isDoubleClick() && selectable) {
// Probably a selection that will cause a value change
// event to be sent
@@ -864,7 +866,8 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
clickEventPending = false;
}
}
- client.updateVariable(paintableId, "clickedKey", key, false);
+ client.updateVariable(paintableId, "clickedKey", key,
+ false);
client.updateVariable(paintableId, "clickEvent",
details.toString(), !clickEventPending);
}
@@ -906,8 +909,8 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
Id.of(labelId));
nodeCaptionDiv = DOM.createDiv();
- DOM.setElementProperty(nodeCaptionDiv, "className", CLASSNAME
- + "-caption");
+ DOM.setElementProperty(nodeCaptionDiv, "className",
+ CLASSNAME + "-caption");
Element wrapper = DOM.createDiv();
wrapper.setId(labelId);
wrapper.setAttribute("for", treeItemId);
@@ -948,8 +951,8 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
}
if (state) {
if (!childrenLoaded && notifyServer) {
- client.updateVariable(paintableId, "requestChildTree",
- true, false);
+ client.updateVariable(paintableId, "requestChildTree", true,
+ false);
}
if (notifyServer) {
client.updateVariable(paintableId, "expand",
@@ -997,7 +1000,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
/**
* Returns the children of the node
- *
+ *
* @return A set of tree nodes
*/
public List<TreeNode> getChildren() {
@@ -1044,7 +1047,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
* Adds/removes Vaadin specific style name.
* <p>
* For internal use only. May be removed or replaced in the future.
- *
+ *
* @param selected
*/
public void setSelected(boolean selected) {
@@ -1058,7 +1061,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
/**
* Travels up the hierarchy looking for this node
- *
+ *
* @param child
* The child which grandparent this is or is not
* @return True if this is a grandparent of the child node
@@ -1097,7 +1100,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
/*
* (non-Javadoc)
- *
+ *
* @see com.google.gwt.user.client.ui.Widget#onDetach()
*/
@Override
@@ -1108,7 +1111,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
/*
* (non-Javadoc)
- *
+ *
* @see com.google.gwt.user.client.ui.UIObject#toString()
*/
@Override
@@ -1118,7 +1121,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
/**
* Is the node focused?
- *
+ *
* @param focused
* True if focused, false if not
*/
@@ -1160,10 +1163,10 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
public void setNodeStyleName(String styleName) {
addStyleName(TreeNode.CLASSNAME + "-" + styleName);
- setStyleName(nodeCaptionDiv, TreeNode.CLASSNAME + "-caption-"
- + styleName, true);
- childNodeContainer.addStyleName(TreeNode.CLASSNAME + "-children-"
- + styleName);
+ setStyleName(nodeCaptionDiv,
+ TreeNode.CLASSNAME + "-caption-" + styleName, true);
+ childNodeContainer.addStyleName(
+ TreeNode.CLASSNAME + "-children-" + styleName);
}
@@ -1194,7 +1197,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
/**
* Selects a range of nodes
- *
+ *
* @param startNodeKey
* The start node key
* @param endNodeKey
@@ -1224,7 +1227,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
/**
* Selects a node and deselect all other nodes
- *
+ *
* @param node
* The node to select
*/
@@ -1243,7 +1246,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
/**
* Deselects a node
- *
+ *
* @param node
* The node to deselect
*/
@@ -1255,7 +1258,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
/**
* Selects all the open children to a node
- *
+ *
* @param node
* The parent node
*/
@@ -1278,7 +1281,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
/**
* Selects all children until a stop child is reached
- *
+ *
* @param root
* The root not to start from
* @param stopNode
@@ -1287,7 +1290,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
* Should the root node be selected
* @param includeStopNode
* Should the stop node be selected
- *
+ *
* @return Returns false if the stop child was found, else true if all
* children was selected
*/
@@ -1323,7 +1326,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
/**
* Select a range between two nodes which have no relation to each other
- *
+ *
* @param startNode
* The start node to start the selection from
* @param endNode
@@ -1369,8 +1372,8 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
TreeNode currentNode = startNode;
while (startParent != null && startParent != commonParent) {
List<TreeNode> startChildren = startParent.getChildren();
- for (int i = startChildren.indexOf(currentNode) + 1; i < startChildren
- .size(); i++) {
+ for (int i = startChildren.indexOf(currentNode)
+ + 1; i < startChildren.size(); i++) {
selectAllChildren(startChildren.get(i), true);
}
@@ -1393,7 +1396,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
/**
* Examines the children of the branch node and returns true if a node is in
* that branch
- *
+ *
* @param node
* The node to search for
* @param branch
@@ -1418,11 +1421,12 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
}
/**
- * Selects a range of items which are in direct relation with each other.<br/>
+ * Selects a range of items which are in direct relation with each
+ * other.<br/>
* NOTE: The start node <b>MUST</b> be before the end node!
- *
+ *
* @param startNode
- *
+ *
* @param endNode
*/
private void doRelationSelection(TreeNode startNode, TreeNode endNode) {
@@ -1452,7 +1456,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
/**
* Selects a range of items which have the same parent.
- *
+ *
* @param startNode
* The start node
* @param endNode
@@ -1502,7 +1506,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
/**
* Returns the first common parent of two nodes
- *
+ *
* @param node1
* The first node
* @param node2
@@ -1552,7 +1556,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
/**
* Sets the node currently in focus
- *
+ *
* @param node
* The node to focus or null to remove the focus completely
* @param scrollIntoView
@@ -1575,12 +1579,12 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
/*
* FIXME: This code needs to be changed when the keyboard navigation
* doesn't immediately trigger a selection change anymore.
- *
+ *
* Right now this function is called before and after the Tree is
* rebuilt when up/down arrow keys are pressed. This leads to the
* problem, that the newly selected item is announced too often with
* a screen reader.
- *
+ *
* Behaviour is different when using the Tree with and without
* screen reader.
*/
@@ -1614,7 +1618,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
/**
* Focuses a node and scrolls it into view
- *
+ *
* @param node
* The node to focus
*/
@@ -1624,7 +1628,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.FocusHandler#onFocus(com.google.gwt.event
* .dom.client.FocusEvent)
@@ -1644,7 +1648,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.BlurHandler#onBlur(com.google.gwt.event
* .dom.client.BlurEvent)
@@ -1659,7 +1663,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.KeyPressHandler#onKeyPress(com.google
* .gwt.event.dom.client.KeyPressEvent)
@@ -1683,7 +1687,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.KeyDownHandler#onKeyDown(com.google.gwt
* .event.dom.client.KeyDownEvent)
@@ -1700,7 +1704,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
/**
* Handles the keyboard navigation
- *
+ *
* @param keycode
* The keycode of the pressed key
* @param ctrl
@@ -1820,9 +1824,9 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
// Selection
if (keycode == getNavigationSelectKey()) {
if (!focusedNode.isSelected()) {
- selectNode(
- focusedNode,
- (!isMultiselect || multiSelectMode == MULTISELECT_MODE_SIMPLE)
+ selectNode(focusedNode,
+ (!isMultiselect
+ || multiSelectMode == MULTISELECT_MODE_SIMPLE)
&& selectable);
} else {
deselectNode(focusedNode);
@@ -1881,7 +1885,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
* be at least one selection. After this the newly focused node is
* selected and we've ended up with two selected nodes even though we
* only navigated with the arrow keys.
- *
+ *
* Because of this, we first select the next node and later de-select
* the old one.
*/
@@ -1893,13 +1897,14 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
/**
* Traverses the tree to the bottom most child
- *
+ *
* @param root
* The root of the tree
* @return The bottom most child
*/
private TreeNode getLastVisibleChildInTree(TreeNode root) {
- if (root.isLeaf() || !root.getState() || root.getChildren().size() == 0) {
+ if (root.isLeaf() || !root.getState()
+ || root.getChildren().size() == 0) {
return root;
}
List<TreeNode> children = root.getChildren();
@@ -1908,7 +1913,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
/**
* Gets the next sibling in the tree
- *
+ *
* @param node
* The node to get the sibling for
* @return The sibling node or null if the node is the last sibling
@@ -1932,7 +1937,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
/**
* Returns the previous sibling in the tree
- *
+ *
* @param node
* The node to get the sibling for
* @return The sibling node or null if the node is the first sibling
@@ -1958,7 +1963,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
* Add this to the element mouse down event by using element.setPropertyJSO
* ("onselectstart",applyDisableTextSelectionIEHack()); Remove it then again
* when the mouse is depressed in the mouse up event.
- *
+ *
* @return Returns the JSO preventing text selection
*/
private native JavaScriptObject applyDisableTextSelectionIEHack()
@@ -1970,7 +1975,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
* Get the key that moves the selection head upwards. By default it is the
* up arrow key but by overriding this you can change the key to whatever
* you want.
- *
+ *
* @return The keycode of the key
*/
protected int getNavigationUpKey() {
@@ -1981,7 +1986,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
* Get the key that moves the selection head downwards. By default it is the
* down arrow key but by overriding this you can change the key to whatever
* you want.
- *
+ *
* @return The keycode of the key
*/
protected int getNavigationDownKey() {
@@ -1992,7 +1997,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
* Get the key that scrolls to the left in the table. By default it is the
* left arrow key but by overriding this you can change the key to whatever
* you want.
- *
+ *
* @return The keycode of the key
*/
protected int getNavigationLeftKey() {
@@ -2003,7 +2008,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
* Get the key that scroll to the right on the table. By default it is the
* right arrow key but by overriding this you can change the key to whatever
* you want.
- *
+ *
* @return The keycode of the key
*/
protected int getNavigationRightKey() {
@@ -2014,7 +2019,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
* Get the key that selects an item in the table. By default it is the space
* bar key but by overriding this you can change the key to whatever you
* want.
- *
+ *
* @return
*/
protected int getNavigationSelectKey() {
@@ -2025,7 +2030,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
* Get the key the moves the selection one page up in the table. By default
* this is the Page Up key but by overriding this you can change the key to
* whatever you want.
- *
+ *
* @return
*/
protected int getNavigationPageUpKey() {
@@ -2036,7 +2041,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
* Get the key the moves the selection one page down in the table. By
* default this is the Page Down key but by overriding this you can change
* the key to whatever you want.
- *
+ *
* @return
*/
protected int getNavigationPageDownKey() {
@@ -2047,7 +2052,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
* Get the key the moves the selection to the beginning of the table. By
* default this is the Home key but by overriding this you can change the
* key to whatever you want.
- *
+ *
* @return
*/
protected int getNavigationStartKey() {
@@ -2058,7 +2063,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
* Get the key the moves the selection to the end of the table. By default
* this is the End key but by overriding this you can change the key to
* whatever you want.
- *
+ *
* @return
*/
protected int getNavigationEndKey() {
@@ -2077,12 +2082,13 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.ui.SubPartAware#getSubPartElement(java
* .lang.String)
*/
@Override
- public com.google.gwt.user.client.Element getSubPartElement(String subPart) {
+ public com.google.gwt.user.client.Element getSubPartElement(
+ String subPart) {
if ("fe".equals(subPart)) {
if (BrowserInfo.get().isOpera() && focusedNode != null) {
return focusedNode.getElement();
@@ -2130,12 +2136,13 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.ui.SubPartAware#getSubPartName(com.google
* .gwt.user.client.Element)
*/
@Override
- public String getSubPartName(com.google.gwt.user.client.Element subElement) {
+ public String getSubPartName(
+ com.google.gwt.user.client.Element subElement) {
// Supported identifiers:
//
// n[index]/n[index]/n[index]{/expand}
diff --git a/client/src/main/java/com/vaadin/client/ui/VTreeTable.java b/client/src/main/java/com/vaadin/client/ui/VTreeTable.java
index 0ba84af4bb..2538e2707c 100644
--- a/client/src/main/java/com/vaadin/client/ui/VTreeTable.java
+++ b/client/src/main/java/com/vaadin/client/ui/VTreeTable.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -48,7 +48,8 @@ public class VTreeTable extends VScrollTable {
public final boolean ctrl;
public final boolean shift;
- public PendingNavigationEvent(int keycode, boolean ctrl, boolean shift) {
+ public PendingNavigationEvent(int keycode, boolean ctrl,
+ boolean shift) {
this.keycode = keycode;
this.ctrl = ctrl;
this.shift = shift;
@@ -143,8 +144,8 @@ public class VTreeTable extends VScrollTable {
return new VTreeTableRow(uidl, aligns2);
}
- public class VTreeTableRow extends
- VScrollTable.VScrollTableBody.VScrollTableRow {
+ public class VTreeTableRow
+ extends VScrollTable.VScrollTableBody.VScrollTableRow {
private boolean isTreeCellAdded = false;
private SpanElement treeSpacer;
@@ -163,8 +164,8 @@ public class VTreeTable extends VScrollTable {
public void addCell(UIDL rowUidl, String text, char align,
String style, boolean textIsHTML, boolean isSorted,
String description) {
- super.addCell(rowUidl, text, align, style, textIsHTML,
- isSorted, description);
+ super.addCell(rowUidl, text, align, style, textIsHTML, isSorted,
+ description);
addTreeSpacer(rowUidl);
}
@@ -175,8 +176,8 @@ public class VTreeTable extends VScrollTable {
.getFirstChild();
if (rowUidl.hasAttribute("icon")) {
- Icon icon = client.getIcon(rowUidl
- .getStringAttribute("icon"));
+ Icon icon = client
+ .getIcon(rowUidl.getStringAttribute("icon"));
icon.setAlternateText("icon");
container.insertFirst(icon.getElement());
}
@@ -193,8 +194,8 @@ public class VTreeTable extends VScrollTable {
treeSpacer.setClassName(classname);
container.insertFirst(treeSpacer);
- depth = rowUidl.hasAttribute("depth") ? rowUidl
- .getIntAttribute("depth") : 0;
+ depth = rowUidl.hasAttribute("depth")
+ ? rowUidl.getIntAttribute("depth") : 0;
setIndent();
isTreeCellAdded = true;
return true;
@@ -355,9 +356,8 @@ public class VTreeTable extends VScrollTable {
if (cells.hasNext()) {
final Object cell = cells.next();
if (cell instanceof String) {
- addSpannedCell(uidl, cell.toString(), aligns[0],
- "", htmlContentAllowed, false, null,
- colCount);
+ addSpannedCell(uidl, cell.toString(), aligns[0], "",
+ htmlContentAllowed, false, null, colCount);
} else {
addSpannedCell(uidl, (Widget) cell, aligns[0], "",
false, colCount);
@@ -580,35 +580,35 @@ public class VTreeTable extends VScrollTable {
/**
* Animates row expansion using the GWT animation framework.
- *
+ *
* The idea is as follows:
- *
+ *
* 1. Insert all rows normally
- *
+ *
* 2. Insert a newly created DIV containing a new TABLE element below
* the DIV containing the actual scroll table body.
- *
+ *
* 3. Clone the rows that were inserted in step 1 and attach the clones
* to the new TABLE element created in step 2.
- *
+ *
* 4. The new DIV from step 2 is absolutely positioned so that the last
* inserted row is just behind the row that was expanded.
- *
+ *
* 5. Hide the contents of the originally inserted rows by setting the
* DIV.v-table-cell-wrapper to display:none;.
- *
+ *
* 6. Set the height of the originally inserted rows to 0.
- *
+ *
* 7. The animation loop slides the DIV from step 2 downwards, while at
* the same pace growing the height of each of the inserted rows from 0
* to full height. The first inserted row grows from 0 to full and after
* this the second row grows from 0 to full, etc until all rows are full
* height.
- *
+ *
* 8. Remove the DIV from step 2
- *
+ *
* 9. Restore display:block; to the DIV.v-table-cell-wrapper elements.
- *
+ *
* 10. DONE
*/
private class RowExpandAnimation extends Animation {
@@ -625,7 +625,8 @@ public class VTreeTable extends VScrollTable {
public RowExpandAnimation(List<VScrollTableRow> rows) {
this.rows = rows;
buildAndInsertAnimatingDiv();
- preparator = new AnimationPreparator(rows.get(0).getIndex() - 1);
+ preparator = new AnimationPreparator(
+ rows.get(0).getIndex() - 1);
preparator.prepareTableForAnimation();
for (VScrollTableRow row : rows) {
cloneAndAppendRow(row);
@@ -724,7 +725,8 @@ public class VTreeTable extends VScrollTable {
return td.getChild(0).cast();
}
- private void resetCellWrapperDivsDisplayProperty(VScrollTableRow row) {
+ private void resetCellWrapperDivsDisplayProperty(
+ VScrollTableRow row) {
Element tr = row.getElement();
for (int ix = 0; ix < tr.getChildCount(); ix++) {
getWrapperDiv(tr, ix).getStyle().clearProperty("display");
@@ -804,8 +806,9 @@ public class VTreeTable extends VScrollTable {
VTreeTableRow focusedRow = (VTreeTableRow) getFocusedRow();
if (focusedRow != null) {
- if (focusedRow.canHaveChildren
- && ((keycode == KeyCodes.KEY_RIGHT && !focusedRow.open) || (keycode == KeyCodes.KEY_LEFT && focusedRow.open))) {
+ if (focusedRow.canHaveChildren && ((keycode == KeyCodes.KEY_RIGHT
+ && !focusedRow.open)
+ || (keycode == KeyCodes.KEY_LEFT && focusedRow.open))) {
if (!ctrl) {
client.updateVariable(paintableId, "selectCollapsed", true,
false);
diff --git a/client/src/main/java/com/vaadin/client/ui/VTwinColSelect.java b/client/src/main/java/com/vaadin/client/ui/VTwinColSelect.java
index 853bd8d456..6d4d15cfc9 100644
--- a/client/src/main/java/com/vaadin/client/ui/VTwinColSelect.java
+++ b/client/src/main/java/com/vaadin/client/ui/VTwinColSelect.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -72,10 +72,10 @@ public class VTwinColSelect extends VOptionGroupBase implements KeyDownHandler,
/**
* A ListBox which catches double clicks
- *
+ *
*/
- public class DoubleClickListBox extends ListBox implements
- HasDoubleClickHandlers {
+ public class DoubleClickListBox extends ListBox
+ implements HasDoubleClickHandlers {
public DoubleClickListBox(boolean isMultipleSelect) {
super(isMultipleSelect);
}
@@ -170,13 +170,15 @@ public class VTwinColSelect extends VOptionGroupBase implements KeyDownHandler,
/** For internal use only. May be removed or replaced in the future. */
public void updateCaptions(UIDL uidl) {
String leftCaption = (uidl
- .hasAttribute(TwinColSelectConstants.ATTRIBUTE_LEFT_CAPTION) ? uidl
- .getStringAttribute(TwinColSelectConstants.ATTRIBUTE_LEFT_CAPTION)
- : null);
+ .hasAttribute(TwinColSelectConstants.ATTRIBUTE_LEFT_CAPTION)
+ ? uidl.getStringAttribute(
+ TwinColSelectConstants.ATTRIBUTE_LEFT_CAPTION)
+ : null);
String rightCaption = (uidl
- .hasAttribute(TwinColSelectConstants.ATTRIBUTE_RIGHT_CAPTION) ? uidl
- .getStringAttribute(TwinColSelectConstants.ATTRIBUTE_RIGHT_CAPTION)
- : null);
+ .hasAttribute(TwinColSelectConstants.ATTRIBUTE_RIGHT_CAPTION)
+ ? uidl.getStringAttribute(
+ TwinColSelectConstants.ATTRIBUTE_RIGHT_CAPTION)
+ : null);
boolean hasCaptions = (leftCaption != null || rightCaption != null);
@@ -394,13 +396,14 @@ public class VTwinColSelect extends VOptionGroupBase implements KeyDownHandler,
/** For internal use only. May be removed or replaced in the future. */
public void setInternalWidths() {
getElement().getStyle().setPosition(Position.RELATIVE);
- int bordersAndPaddings = WidgetUtil.measureHorizontalPaddingAndBorder(
- buttons.getElement(), 0);
+ int bordersAndPaddings = WidgetUtil
+ .measureHorizontalPaddingAndBorder(buttons.getElement(), 0);
int buttonWidth = WidgetUtil.getRequiredWidth(buttons);
int totalWidth = getOffsetWidth();
- int spaceForSelect = (totalWidth - buttonWidth - bordersAndPaddings) / 2;
+ int spaceForSelect = (totalWidth - buttonWidth - bordersAndPaddings)
+ / 2;
options.setWidth(spaceForSelect + "px");
if (optionsCaption != null) {
@@ -441,7 +444,7 @@ public class VTwinColSelect extends VOptionGroupBase implements KeyDownHandler,
/**
* Get the key that selects an item in the table. By default it is the Enter
* key but by overriding this you can change the key to whatever you want.
- *
+ *
* @return
*/
protected int getNavigationSelectKey() {
@@ -450,7 +453,7 @@ public class VTwinColSelect extends VOptionGroupBase implements KeyDownHandler,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.KeyDownHandler#onKeyDown(com.google.gwt
* .event.dom.client.KeyDownEvent)
@@ -514,7 +517,7 @@ public class VTwinColSelect extends VOptionGroupBase implements KeyDownHandler,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.MouseDownHandler#onMouseDown(com.google
* .gwt.event.dom.client.MouseDownEvent)
@@ -537,7 +540,7 @@ public class VTwinColSelect extends VOptionGroupBase implements KeyDownHandler,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.DoubleClickHandler#onDoubleClick(com.
* google.gwt.event.dom.client.DoubleClickEvent)
@@ -568,7 +571,8 @@ public class VTwinColSelect extends VOptionGroupBase implements KeyDownHandler,
private static final String SUBPART_REMOVE_BUTTON = "remove";
@Override
- public com.google.gwt.user.client.Element getSubPartElement(String subPart) {
+ public com.google.gwt.user.client.Element getSubPartElement(
+ String subPart) {
if (SUBPART_OPTION_SELECT.equals(subPart)) {
return options.getElement();
} else if (subPart.startsWith(SUBPART_OPTION_SELECT_ITEM)) {
@@ -578,8 +582,8 @@ public class VTwinColSelect extends VOptionGroupBase implements KeyDownHandler,
} else if (SUBPART_SELECTION_SELECT.equals(subPart)) {
return selections.getElement();
} else if (subPart.startsWith(SUBPART_SELECTION_SELECT_ITEM)) {
- String idx = subPart.substring(SUBPART_SELECTION_SELECT_ITEM
- .length());
+ String idx = subPart
+ .substring(SUBPART_SELECTION_SELECT_ITEM.length());
return (com.google.gwt.user.client.Element) selections.getElement()
.getChild(Integer.parseInt(idx));
} else if (optionsCaption != null
@@ -598,7 +602,8 @@ public class VTwinColSelect extends VOptionGroupBase implements KeyDownHandler,
}
@Override
- public String getSubPartName(com.google.gwt.user.client.Element subElement) {
+ public String getSubPartName(
+ com.google.gwt.user.client.Element subElement) {
if (optionsCaption != null
&& optionsCaption.getElement().isOrHasChild(subElement)) {
return SUBPART_LEFT_CAPTION;
diff --git a/client/src/main/java/com/vaadin/client/ui/VUI.java b/client/src/main/java/com/vaadin/client/ui/VUI.java
index 08641ad6ba..4367603b89 100644
--- a/client/src/main/java/com/vaadin/client/ui/VUI.java
+++ b/client/src/main/java/com/vaadin/client/ui/VUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -50,7 +50,7 @@ import com.vaadin.shared.ApplicationConstants;
import com.vaadin.shared.ui.ui.UIConstants;
/**
- *
+ *
*/
public class VUI extends SimplePanel implements ResizeHandler,
Window.ClosingHandler, ShortcutActionHandlerOwner, Focusable,
@@ -85,7 +85,7 @@ public class VUI extends SimplePanel implements ResizeHandler,
/**
* Keep track of possible parent size changes when an embedded application.
- *
+ *
* Uses {@link #parentWidth} and {@link #parentHeight} as an optimization to
* keep track of when there is a real change.
*/
@@ -131,14 +131,13 @@ public class VUI extends SimplePanel implements ResizeHandler,
/*
* Ensure the fragment is properly encoded in all browsers
* (#10769)
- *
+ *
* createUrlBuilder does not properly pass an empty fragment to
* UrlBuilder on Webkit browsers so do it manually (#11686)
*/
- String location = Window.Location
- .createUrlBuilder()
- .setHash(
- URL.decodeQueryString(Window.Location.getHash()))
+ String location = Window.Location.createUrlBuilder()
+ .setHash(URL
+ .decodeQueryString(Window.Location.getHash()))
.buildString();
currentFragment = newFragment;
@@ -221,7 +220,7 @@ public class VUI extends SimplePanel implements ResizeHandler,
/**
* Called when the window or parent div might have been resized.
- *
+ *
* This immediately checks the sizes of the window and the parent div (if
* monitoring it) and triggers layout recalculation if they have changed.
*/
@@ -232,15 +231,15 @@ public class VUI extends SimplePanel implements ResizeHandler,
/**
* Called when the window or parent div might have been resized.
- *
+ *
* This immediately checks the sizes of the window and the parent div (if
* monitoring it) and triggers layout recalculation if they have changed.
- *
+ *
* @param newWindowWidth
* The new width of the window
* @param newWindowHeight
* The new height of the window
- *
+ *
* @deprecated use {@link #performSizeCheck()}
*/
@Deprecated
@@ -293,7 +292,8 @@ public class VUI extends SimplePanel implements ResizeHandler,
* should shrink as the content's size is fixed and would thus not
* automatically shrink.)
*/
- VConsole.log("Running layout functions due to window or parent resize");
+ VConsole.log(
+ "Running layout functions due to window or parent resize");
// update size to avoid (most) redundant re-layout passes
// there can still be an extra layout recalculation if webkit
@@ -328,7 +328,7 @@ public class VUI extends SimplePanel implements ResizeHandler,
* Returns true if the body is NOT generated, i.e if someone else has made
* the page that we're running in. Otherwise we're in charge of the whole
* page.
- *
+ *
* @return true if we're running embedded
*/
public boolean isEmbedded() {
@@ -339,7 +339,7 @@ public class VUI extends SimplePanel implements ResizeHandler,
/**
* Returns true if the size of the parent should be checked periodically and
* the application should react to its changes.
- *
+ *
* @return true if size of parent should be tracked
*/
protected boolean isMonitoringParentSize() {
@@ -349,7 +349,7 @@ public class VUI extends SimplePanel implements ResizeHandler,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.logical.shared.ResizeHandler#onResize(com.google
* .gwt.event.logical.shared.ResizeEvent)
@@ -362,7 +362,7 @@ public class VUI extends SimplePanel implements ResizeHandler,
/**
* Called when a resize event is received.
- *
+ *
* This may trigger a lazy refresh or perform the size check immediately
* depending on the browser used and whether the server side requests
* resizes to be lazy.
@@ -373,7 +373,7 @@ public class VUI extends SimplePanel implements ResizeHandler,
* problems with scrollbars. Firefox 3 might also produce some extra
* events. We postpone both the re-layouting and the server side event
* for a while to deal with these issues.
- *
+ *
* We may also postpone these events to avoid slowness when resizing the
* browser window. Constantly recalculating the layout causes the resize
* operation to be really slow with complex layouts.
@@ -481,10 +481,10 @@ public class VUI extends SimplePanel implements ResizeHandler,
/**
* Allows to store the currently focused Element.
- *
+ *
* Current use case is to store the focus when a Window is opened. Does
* currently handle only a single value. Needs to be extended for #12158
- *
+ *
* @param focusedElement
*/
public void storeFocus() {
@@ -493,10 +493,10 @@ public class VUI extends SimplePanel implements ResizeHandler,
/**
* Restores the previously stored focus Element.
- *
+ *
* Current use case is to restore the focus when a Window is closed. Does
* currently handle only a single value. Needs to be extended for #12158
- *
+ *
* @return the lastFocusElementBeforeDialogOpened
*/
public void focusStoredElement() {
diff --git a/client/src/main/java/com/vaadin/client/ui/VUnknownComponent.java b/client/src/main/java/com/vaadin/client/ui/VUnknownComponent.java
index 89907854de..cd1fd57727 100644
--- a/client/src/main/java/com/vaadin/client/ui/VUnknownComponent.java
+++ b/client/src/main/java/com/vaadin/client/ui/VUnknownComponent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/VUpload.java b/client/src/main/java/com/vaadin/client/ui/VUpload.java
index 2800acccf9..18766b32c0 100644
--- a/client/src/main/java/com/vaadin/client/ui/VUpload.java
+++ b/client/src/main/java/com/vaadin/client/ui/VUpload.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -44,10 +44,10 @@ import com.vaadin.client.ui.upload.UploadIFrameOnloadStrategy;
import com.vaadin.shared.ui.upload.UploadServerRpc;
/**
- *
+ *
* Note, we are not using GWT FormPanel as we want to listen submitcomplete
* events even though the upload component is already detached.
- *
+ *
*/
public class VUpload extends SimplePanel {
@@ -250,8 +250,9 @@ public class VUpload extends SimplePanel {
}
VConsole.log("VUpload:Submit complete");
((UploadConnector) ConnectorMap.get(client)
- .getConnector(VUpload.this)).getRpcProxy(
- UploadServerRpc.class).poll();
+ .getConnector(VUpload.this))
+ .getRpcProxy(UploadServerRpc.class)
+ .poll();
}
rebuildPanel();
@@ -281,7 +282,7 @@ public class VUpload extends SimplePanel {
/*
* Visit server a moment after upload has started to see possible
* changes from UploadStarted event. Will be cleared on complete.
- *
+ *
* Must get the id here as the upload can finish before the timer
* expires and in that case nextUploadId has been updated and is
* wrong.
@@ -293,7 +294,8 @@ public class VUpload extends SimplePanel {
// Only visit the server if the upload has not already
// finished
if (thisUploadId == nextUploadId) {
- VConsole.log("Visiting server to see if upload started event changed UI.");
+ VConsole.log(
+ "Visiting server to see if upload started event changed UI.");
client.updateVariable(paintableId, "pollForStart",
thisUploadId, true);
}
diff --git a/client/src/main/java/com/vaadin/client/ui/VVerticalLayout.java b/client/src/main/java/com/vaadin/client/ui/VVerticalLayout.java
index 00ef0fc719..ba01c5330a 100644
--- a/client/src/main/java/com/vaadin/client/ui/VVerticalLayout.java
+++ b/client/src/main/java/com/vaadin/client/ui/VVerticalLayout.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/VVideo.java b/client/src/main/java/com/vaadin/client/ui/VVideo.java
index 023a7f9ee0..e7f86a51f4 100644
--- a/client/src/main/java/com/vaadin/client/ui/VVideo.java
+++ b/client/src/main/java/com/vaadin/client/ui/VVideo.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -39,7 +39,7 @@ public class VVideo extends VMediaBase {
/**
* Registers a listener that updates the dimensions of the widget when the
* video metadata has been loaded.
- *
+ *
* @param el
*/
private native void updateDimensionsWhenMetadataLoaded(Element el)
@@ -53,7 +53,7 @@ public class VVideo extends VMediaBase {
/**
* Updates the dimensions of the widget.
- *
+ *
* @param w
* @param h
*/
diff --git a/client/src/main/java/com/vaadin/client/ui/VWindow.java b/client/src/main/java/com/vaadin/client/ui/VWindow.java
index de465f6c1f..008ea4ef83 100644
--- a/client/src/main/java/com/vaadin/client/ui/VWindow.java
+++ b/client/src/main/java/com/vaadin/client/ui/VWindow.java
@@ -73,7 +73,7 @@ import com.vaadin.shared.ui.window.WindowRole;
/**
* "Sub window" component.
- *
+ *
* @author Vaadin Ltd
*/
public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
@@ -136,10 +136,14 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
/** For internal use only. May be removed or replaced in the future. */
public ShortcutActionHandler shortcutHandler;
- /** Last known positionx read from UIDL or updated to application connection */
+ /**
+ * Last known positionx read from UIDL or updated to application connection
+ */
private int uidlPositionX = -1;
- /** Last known positiony read from UIDL or updated to application connection */
+ /**
+ * Last known positiony read from UIDL or updated to application connection
+ */
private int uidlPositionY = -1;
/** For internal use only. May be removed or replaced in the future. */
@@ -233,7 +237,7 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
/*
* Stores the element that has focus in the application UI when the
* window is opened, so it can be restored when the window closes.
- *
+ *
* This is currently implemented for the case when one non-modal window
* can be open at the same time, and the focus is not changed while the
* window is open.
@@ -267,7 +271,7 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
/*
* Restores the previously stored focused element.
- *
+ *
* When the focus was changed outside the window while the window was
* open, the originally stored element is restored.
*/
@@ -309,7 +313,7 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
/**
* Returns true if this window is the topmost VWindow
- *
+ *
* @return
*/
private boolean isActive() {
@@ -334,8 +338,8 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
final int order = windowOrder.size();
setWindowOrder(order);
windowOrder.add(this);
- setPopupPosition(order * STACKING_OFFSET_PIXELS, order
- * STACKING_OFFSET_PIXELS);
+ setPopupPosition(order * STACKING_OFFSET_PIXELS,
+ order * STACKING_OFFSET_PIXELS);
}
@@ -374,11 +378,12 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
footer = DOM.createDiv();
DOM.setElementProperty(footer, "className", CLASSNAME + "-footer");
resizeBox = DOM.createDiv();
- DOM.setElementProperty(resizeBox, "className", CLASSNAME + "-resizebox");
+ DOM.setElementProperty(resizeBox, "className",
+ CLASSNAME + "-resizebox");
closeBox = DOM.createDiv();
maximizeRestoreBox = DOM.createDiv();
- DOM.setElementProperty(maximizeRestoreBox, "className", CLASSNAME
- + "-maximizebox");
+ DOM.setElementProperty(maximizeRestoreBox, "className",
+ CLASSNAME + "-maximizebox");
DOM.setElementAttribute(maximizeRestoreBox, "tabindex", "0");
DOM.setElementProperty(closeBox, "className", CLASSNAME + "-closebox");
DOM.setElementAttribute(closeBox, "tabindex", "0");
@@ -460,7 +465,7 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
* is prevented.
* <p>
* This message is not visible on the screen.
- *
+ *
* @param topMessage
* String provided when the user navigates with Shift-Tab keys to
* the top of the window
@@ -475,7 +480,7 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
* key is prevented.
* <p>
* This message is not visible on the screen.
- *
+ *
* @param bottomMessage
* String provided when the user navigates with the Tab key to
* the bottom of the window
@@ -488,7 +493,7 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
* Gets the message that is provided to users of assistive devices when the
* user reaches the top of the window when leaving a window with the tab key
* is prevented.
- *
+ *
* @return the top message
*/
public String getTabStopTopAssistiveText() {
@@ -499,7 +504,7 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
* Gets the message that is provided to users of assistive devices when the
* user reaches the bottom of the window when leaving a window with the tab
* key is prevented.
- *
+ *
* @return the bottom message
*/
public String getTabStopBottomAssistiveText() {
@@ -580,8 +585,8 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
super.setVisible(visible);
}
- if (visible
- && BrowserInfo.get().requiresPositionAbsoluteOverflowAutoFix()) {
+ if (visible && BrowserInfo.get()
+ .requiresPositionAbsoluteOverflowAutoFix()) {
/*
* Shake up the DOM a bit to make the window shed unnecessary
@@ -618,7 +623,7 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
/**
* Sets the closable state of the window. Additionally hides/shows the close
* button according to the new state.
- *
+ *
* @param closable
* true if the window can be closed by the user
*/
@@ -629,8 +634,8 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
this.closable = closable;
if (closable) {
- DOM.setElementProperty(closeBox, "className", CLASSNAME
- + "-closebox");
+ DOM.setElementProperty(closeBox, "className",
+ CLASSNAME + "-closebox");
} else {
DOM.setElementProperty(closeBox, "className", CLASSNAME
@@ -644,7 +649,7 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
* Returns the closable state of the sub window. If the sub window is
* closable a decoration (typically an X) is shown to the user. By clicking
* on the X the user can close the window.
- *
+ *
* @return true if the sub window is closable
*/
protected boolean isClosable() {
@@ -676,7 +681,7 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
* correctly if clicking on the "close" button in the window header but
* closing the window from a button for example in the window will fail.
* Symptom described in #10776
- *
+ *
* The problematic part is that for the focus to be returned correctly
* an input element needs to be focused in the root panel. Focusing some
* other element apparently won't work.
@@ -737,8 +742,8 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
}
private void showModalityCurtain() {
- getModalityCurtain().getStyle().setZIndex(
- windowOrder.indexOf(this) + Z_INDEX);
+ getModalityCurtain().getStyle()
+ .setZIndex(windowOrder.indexOf(this) + Z_INDEX);
if (isShowing()) {
getOverlayContainer().insertBefore(getModalityCurtain(),
@@ -826,11 +831,11 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
resizable = resizability;
if (resizability) {
DOM.setElementProperty(footer, "className", CLASSNAME + "-footer");
- DOM.setElementProperty(resizeBox, "className", CLASSNAME
- + "-resizebox");
+ DOM.setElementProperty(resizeBox, "className",
+ CLASSNAME + "-resizebox");
} else {
- DOM.setElementProperty(footer, "className", CLASSNAME + "-footer "
- + CLASSNAME + "-footer-noresize");
+ DOM.setElementProperty(footer, "className",
+ CLASSNAME + "-footer " + CLASSNAME + "-footer-noresize");
DOM.setElementProperty(resizeBox, "className", CLASSNAME
+ "-resizebox " + CLASSNAME + "-resizebox-disabled");
}
@@ -896,9 +901,8 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
}
// Provide information to assistive device users that a sub window was
// opened
- String prefix = "<span class='"
- + AriaHelper.ASSISTIVE_DEVICE_ONLY_STYLE + "'>"
- + assistivePrefix + "</span>";
+ String prefix = "<span class='" + AriaHelper.ASSISTIVE_DEVICE_ONLY_STYLE
+ + "'>" + assistivePrefix + "</span>";
String postfix = "<span class='"
+ AriaHelper.ASSISTIVE_DEVICE_ONLY_STYLE + "'>"
+ assistivePostfix + "</span>";
@@ -915,7 +919,7 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
/**
* Setter for the text for assistive devices the window caption is prefixed
* with.
- *
+ *
* @param assistivePrefix
* the assistivePrefix to set
*/
@@ -926,7 +930,7 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
/**
* Getter for the text for assistive devices the window caption is prefixed
* with.
- *
+ *
* @return the assistivePrefix
*/
public String getAssistivePrefix() {
@@ -936,7 +940,7 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
/**
* Setter for the text for assistive devices the window caption is postfixed
* with.
- *
+ *
* @param assistivePostfix
* the assistivePostfix to set
*/
@@ -947,7 +951,7 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
/**
* Getter for the text for assistive devices the window caption is postfixed
* with.
- *
+ *
* @return the assistivePostfix
*/
public String getAssistivePostfix() {
@@ -1112,14 +1116,14 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
/**
* TODO check if we need to support this with touch based devices.
- *
+ *
* Checks if the cursor was inside the browser content area when the event
* happened.
- *
+ *
* @param event
* The event to be checked
* @return true, if the cursor is inside the browser content area
- *
+ *
* false, otherwise
*/
private boolean cursorInsideBrowserContentArea(Event event) {
@@ -1185,8 +1189,8 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
public void updateContentsSize() {
LayoutManager layoutManager = getLayoutManager();
- layoutManager.setNeedsMeasure(ConnectorMap.get(client).getConnector(
- this));
+ layoutManager
+ .setNeedsMeasure(ConnectorMap.get(client).getConnector(this));
layoutManager.layoutNow();
}
@@ -1347,8 +1351,8 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
@Override
public void onScroll(ScrollEvent event) {
- client.updateVariable(id, "scrollTop",
- contentPanel.getScrollPosition(), false);
+ client.updateVariable(id, "scrollTop", contentPanel.getScrollPosition(),
+ false);
client.updateVariable(id, "scrollLeft",
contentPanel.getHorizontalScrollPosition(), false);
@@ -1356,8 +1360,7 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
@Override
public void onKeyDown(KeyDownEvent event) {
- if (vaadinModality
- && event.getNativeKeyCode() == KeyCodes.KEY_BACKSPACE
+ if (vaadinModality && event.getNativeKeyCode() == KeyCodes.KEY_BACKSPACE
&& !isFocusedElementEditable()) {
event.preventDefault();
}
@@ -1414,7 +1417,7 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
* assistive devices when it is opened.
* <p>
* When the provided array is empty, an existing description is removed.
- *
+ *
* @param connectors
* with the connectors of the widgets to use as description
*/
@@ -1423,8 +1426,8 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
assistiveConnectors = connectors;
if (connectors.length == 0) {
- Roles.getDialogRole().removeAriaDescribedbyProperty(
- getElement());
+ Roles.getDialogRole()
+ .removeAriaDescribedbyProperty(getElement());
} else {
Id[] ids = new Id[connectors.length];
for (int index = 0; index < connectors.length; index++) {
@@ -1452,7 +1455,7 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
* Gets the connectors that are used as assistive description. Text
* contained in these connectors will be read by assistive devices when the
* window is opened.
- *
+ *
* @return list of previously set connectors
*/
public List<Connector> getAssistiveDescription() {
@@ -1461,14 +1464,14 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
/**
* Sets the WAI-ARIA role the window.
- *
+ *
* This role defines how an assistive device handles a window. Available
- * roles are alertdialog and dialog (@see <a
- * href="http://www.w3.org/TR/2011/CR-wai-aria-20110118/roles">Roles
+ * roles are alertdialog and dialog (@see
+ * <a href="http://www.w3.org/TR/2011/CR-wai-aria-20110118/roles">Roles
* Model</a>).
- *
+ *
* The default role is dialog.
- *
+ *
* @param role
* WAI-ARIA role to set for the window
*/
@@ -1487,7 +1490,7 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
* The value of the parameter doTabStop is stored and used for non-modal
* windows. For modal windows, the handlers are always registered, while
* preserving the stored value.
- *
+ *
* @param doTabStop
* true to prevent leaving the window, false to allow leaving the
* window for non modal windows
@@ -1504,9 +1507,9 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
/**
* Adds a Handler for when user moves the window.
- *
+ *
* @since 7.1.9
- *
+ *
* @return {@link HandlerRegistration} used to remove the handler
*/
public HandlerRegistration addMoveHandler(WindowMoveHandler handler) {
diff --git a/client/src/main/java/com/vaadin/client/ui/absolutelayout/AbsoluteLayoutConnector.java b/client/src/main/java/com/vaadin/client/ui/absolutelayout/AbsoluteLayoutConnector.java
index 19b66fb72f..477d59289e 100644
--- a/client/src/main/java/com/vaadin/client/ui/absolutelayout/AbsoluteLayoutConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/absolutelayout/AbsoluteLayoutConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -40,8 +40,8 @@ import com.vaadin.ui.AbsoluteLayout;
* counterpart {@link VAbsoluteLayout}
*/
@Connect(AbsoluteLayout.class)
-public class AbsoluteLayoutConnector extends
- AbstractComponentContainerConnector implements DirectionalManagedLayout {
+public class AbsoluteLayoutConnector extends AbstractComponentContainerConnector
+ implements DirectionalManagedLayout {
private LayoutClickEventHandler clickEventHandler = new LayoutClickEventHandler(
this) {
@@ -77,7 +77,7 @@ public class AbsoluteLayoutConnector extends
/**
* Returns the deepest nested child component which contains "element". The
* child component is also returned if "element" is part of its caption.
- *
+ *
* @param element
* An element that is a nested sub element of the root element in
* this layout
@@ -96,13 +96,13 @@ public class AbsoluteLayoutConnector extends
/**
* Returns the deepest nested child component which contains "element". The
* child component is also returned if "element" is part of its caption.
- *
+ *
* @param element
* An element that is a nested sub element of the root element in
* this layout
* @return The Paintable which the element is a part of. Null if the element
* belongs to the layout and not to a child.
- *
+ *
* @since 7.2
*/
protected ComponentConnector getConnectorForElement(Element element) {
@@ -111,7 +111,7 @@ public class AbsoluteLayoutConnector extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.HasComponentsConnector#updateCaption(com.vaadin
* .client.ComponentConnector)
*/
@@ -120,8 +120,8 @@ public class AbsoluteLayoutConnector extends
VAbsoluteLayout absoluteLayoutWidget = getWidget();
boolean captionIsNeeded = VCaption.isNeeded(component.getState());
- VCaption caption = absoluteLayoutWidget.getWidgetCaption(component
- .getWidget());
+ VCaption caption = absoluteLayoutWidget
+ .getWidgetCaption(component.getWidget());
if (captionIsNeeded) {
if (caption == null) {
caption = new VCaption(component, getConnection());
@@ -135,7 +135,7 @@ public class AbsoluteLayoutConnector extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.ui.AbstractComponentConnector#getWidget()
*/
@Override
@@ -145,7 +145,7 @@ public class AbsoluteLayoutConnector extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.ui.AbstractComponentConnector#getState()
*/
@Override
@@ -155,7 +155,7 @@ public class AbsoluteLayoutConnector extends
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.client.ui.AbstractComponentConnector#onStateChanged(com.vaadin
* .client.communication.StateChangeEvent)
@@ -173,8 +173,8 @@ public class AbsoluteLayoutConnector extends
}
private void setChildWidgetPosition(ComponentConnector child) {
- String position = getState().connectorToCssPosition.get(child
- .getConnectorId());
+ String position = getState().connectorToCssPosition
+ .get(child.getConnectorId());
if (position == null) {
position = "";
}
@@ -196,7 +196,7 @@ public class AbsoluteLayoutConnector extends
* Adds default value of 0.0px for the given property if it's missing from
* the position string altogether. If the property value is already set no
* changes are needed.
- *
+ *
* @param position
* original position styles
* @param property
@@ -204,7 +204,8 @@ public class AbsoluteLayoutConnector extends
* @return updated position, or the original string if no updates were
* needed
*/
- private String addDefaultPositionIfMissing(String position, String property) {
+ private String addDefaultPositionIfMissing(String position,
+ String property) {
if (!position.contains(property)) {
position = position + property + ":0.0px;";
}
@@ -213,13 +214,14 @@ public class AbsoluteLayoutConnector extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.ui.AbstractComponentContainerConnector#
* onConnectorHierarchyChange
* (com.vaadin.client.ConnectorHierarchyChangeEvent)
*/
@Override
- public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent event) {
+ public void onConnectorHierarchyChange(
+ ConnectorHierarchyChangeEvent event) {
for (ComponentConnector child : getChildComponents()) {
if (!getWidget().contains(child.getWidget())) {
getWidget().add(child.getWidget());
@@ -239,7 +241,7 @@ public class AbsoluteLayoutConnector extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.DirectionalManagedLayout#layoutVertically()
*/
@Override
@@ -255,7 +257,7 @@ public class AbsoluteLayoutConnector extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.DirectionalManagedLayout#layoutHorizontally()
*/
@Override
diff --git a/client/src/main/java/com/vaadin/client/ui/accordion/AccordionConnector.java b/client/src/main/java/com/vaadin/client/ui/accordion/AccordionConnector.java
index 949e19071c..8e12af213c 100644
--- a/client/src/main/java/com/vaadin/client/ui/accordion/AccordionConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/accordion/AccordionConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,8 +29,8 @@ import com.vaadin.shared.ui.accordion.AccordionState;
import com.vaadin.ui.Accordion;
@Connect(Accordion.class)
-public class AccordionConnector extends TabsheetBaseConnector implements
- SimpleManagedLayout, MayScrollChildren {
+public class AccordionConnector extends TabsheetBaseConnector
+ implements SimpleManagedLayout, MayScrollChildren {
@Override
protected void init() {
@@ -47,8 +47,8 @@ public class AccordionConnector extends TabsheetBaseConnector implements
* the content area is
*/
if (getWidget().selectedItemIndex >= 0) {
- StackItem selectedItem = getWidget().getStackItem(
- getWidget().selectedItemIndex);
+ StackItem selectedItem = getWidget()
+ .getStackItem(getWidget().selectedItemIndex);
ComponentConnector contentConnector = getChildComponents().get(0);
if (contentConnector != null) {
@@ -106,12 +106,12 @@ public class AccordionConnector extends TabsheetBaseConnector implements
usedPixels += item.getCaptionHeight();
} else {
// This includes the captionNode borders
- usedPixels += WidgetUtil.getRequiredHeight(item
- .getElement());
+ usedPixels += WidgetUtil
+ .getRequiredHeight(item.getElement());
}
}
- int rootElementInnerHeight = getLayoutManager().getInnerHeight(
- getWidget().getElement());
+ int rootElementInnerHeight = getLayoutManager()
+ .getInnerHeight(getWidget().getElement());
int spaceForOpenItem = rootElementInnerHeight - usedPixels;
if (spaceForOpenItem < 0) {
@@ -126,7 +126,7 @@ public class AccordionConnector extends TabsheetBaseConnector implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.ConnectorHierarchyChangeEvent.
* ConnectorHierarchyChangeHandler
* #onConnectorHierarchyChange(com.vaadin.client
diff --git a/client/src/main/java/com/vaadin/client/ui/aria/AriaHelper.java b/client/src/main/java/com/vaadin/client/ui/aria/AriaHelper.java
index bf93901a33..7b8c248130 100644
--- a/client/src/main/java/com/vaadin/client/ui/aria/AriaHelper.java
+++ b/client/src/main/java/com/vaadin/client/ui/aria/AriaHelper.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,7 +32,7 @@ public class AriaHelper {
/**
* Binds a caption (label in HTML speak) to the form element as required by
* WAI-ARIA specification.
- *
+ *
* @param widget
* Widget, that should be bound to the caption
* @param captionElements
@@ -47,8 +47,8 @@ public class AriaHelper {
((HandlesAriaCaption) widget).bindAriaCaption(null);
} else {
ensureHasId(captionElement);
- ((HandlesAriaCaption) widget).bindAriaCaption(DOM
- .asOld(captionElement));
+ ((HandlesAriaCaption) widget)
+ .bindAriaCaption(DOM.asOld(captionElement));
}
} else if (captionElement != null) {
// Handle the default case
@@ -66,7 +66,7 @@ public class AriaHelper {
/**
* Removes a binding to a caption added with bindCaption() from the provided
* Widget.
- *
+ *
* @param widget
* Widget, that was bound to a caption before
*/
@@ -78,7 +78,7 @@ public class AriaHelper {
/**
* Handles the required actions depending of the input Widget being required
* or not.
- *
+ *
* @param widget
* Widget, typically an input Widget like TextField
* @param required
@@ -97,7 +97,7 @@ public class AriaHelper {
/**
* Handles the required actions depending of the input element being
* required or not.
- *
+ *
* @param element
* Element, typically from an input Widget like TextField
* @param required
@@ -114,7 +114,7 @@ public class AriaHelper {
/**
* Handles the required actions depending of the input Widget contains
* unaccepted input.
- *
+ *
* @param widget
* Widget, typically an input Widget like TextField
* @param invalid
@@ -133,7 +133,7 @@ public class AriaHelper {
/**
* Handles the required actions depending of the input element contains
* unaccepted input.
- *
+ *
* @param element
* Element, typically an input Widget like TextField
* @param invalid
@@ -151,7 +151,7 @@ public class AriaHelper {
/**
* Makes sure that the provided element has an id attribute. Adds a new
* unique id if not.
- *
+ *
* @param element
* Element to check
* @return String with the id of the element
@@ -169,14 +169,15 @@ public class AriaHelper {
/**
* Allows to move an element out of the visible area of the browser window.
- *
+ *
* This makes it possible to have additional information for an assistive
* device, that is not in the way for visual users.
- *
+ *
* @param element
* Element to move out of sight
- * @param boolean assistiveOnly true when element should only be visible for
- * assistive devices, false to make the element visible for all
+ * @param boolean
+ * assistiveOnly true when element should only be visible for
+ * assistive devices, false to make the element visible for all
*/
public static void setVisibleForAssistiveDevicesOnly(Element element,
boolean assistiveOnly) {
diff --git a/client/src/main/java/com/vaadin/client/ui/aria/HandlesAriaCaption.java b/client/src/main/java/com/vaadin/client/ui/aria/HandlesAriaCaption.java
index 369edb7d69..4f704b8c09 100644
--- a/client/src/main/java/com/vaadin/client/ui/aria/HandlesAriaCaption.java
+++ b/client/src/main/java/com/vaadin/client/ui/aria/HandlesAriaCaption.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,10 +26,10 @@ public interface HandlesAriaCaption {
/**
* Called to bind the provided caption (label in HTML speak) element to the
* main input element of the Widget.
- *
+ *
* Binding should be removed from the main input field when captionElement
* is null.
- *
+ *
* @param captionElement
* Element of the caption
*/
diff --git a/client/src/main/java/com/vaadin/client/ui/aria/HandlesAriaInvalid.java b/client/src/main/java/com/vaadin/client/ui/aria/HandlesAriaInvalid.java
index 296e455dcd..3866c68e5e 100644
--- a/client/src/main/java/com/vaadin/client/ui/aria/HandlesAriaInvalid.java
+++ b/client/src/main/java/com/vaadin/client/ui/aria/HandlesAriaInvalid.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ package com.vaadin.client.ui.aria;
public interface HandlesAriaInvalid {
/**
* Called to set the element, typically an input element, as invalid.
- *
+ *
* @param invalid
* boolean, true when the element should be marked invalid, false
* otherwise
diff --git a/client/src/main/java/com/vaadin/client/ui/aria/HandlesAriaRequired.java b/client/src/main/java/com/vaadin/client/ui/aria/HandlesAriaRequired.java
index 95ebd7fb9a..da04d9974a 100644
--- a/client/src/main/java/com/vaadin/client/ui/aria/HandlesAriaRequired.java
+++ b/client/src/main/java/com/vaadin/client/ui/aria/HandlesAriaRequired.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ package com.vaadin.client.ui.aria;
public interface HandlesAriaRequired {
/**
* Called to set the element, typically an input element, as required.
- *
+ *
* @param required
* boolean true when the element needs to be set as required
*/
diff --git a/client/src/main/java/com/vaadin/client/ui/audio/AudioConnector.java b/client/src/main/java/com/vaadin/client/ui/audio/AudioConnector.java
index a451d117f2..108a57eca5 100644
--- a/client/src/main/java/com/vaadin/client/ui/audio/AudioConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/audio/AudioConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/browserframe/BrowserFrameConnector.java b/client/src/main/java/com/vaadin/client/ui/browserframe/BrowserFrameConnector.java
index 95d64b61d0..998d822428 100644
--- a/client/src/main/java/com/vaadin/client/ui/browserframe/BrowserFrameConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/browserframe/BrowserFrameConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/button/ButtonConnector.java b/client/src/main/java/com/vaadin/client/ui/button/ButtonConnector.java
index 2c2006e19b..0bd403edff 100644
--- a/client/src/main/java/com/vaadin/client/ui/button/ButtonConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/button/ButtonConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -34,8 +34,8 @@ import com.vaadin.shared.ui.button.ButtonState;
import com.vaadin.ui.Button;
@Connect(value = Button.class, loadStyle = LoadStyle.EAGER)
-public class ButtonConnector extends AbstractComponentConnector implements
- ClickHandler {
+public class ButtonConnector extends AbstractComponentConnector
+ implements ClickHandler {
@Override
public boolean delegateCaptionHandling() {
@@ -123,8 +123,8 @@ public class ButtonConnector extends AbstractComponentConnector implements
// Add mouse details
MouseEventDetails details = MouseEventDetailsBuilder
- .buildMouseEventDetails(event.getNativeEvent(), getWidget()
- .getElement());
+ .buildMouseEventDetails(event.getNativeEvent(),
+ getWidget().getElement());
getRpcProxy(ButtonServerRpc.class).click(details);
}
diff --git a/client/src/main/java/com/vaadin/client/ui/calendar/CalendarConnector.java b/client/src/main/java/com/vaadin/client/ui/calendar/CalendarConnector.java
index 58cc31a580..04c6943edc 100644
--- a/client/src/main/java/com/vaadin/client/ui/calendar/CalendarConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/calendar/CalendarConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -77,13 +77,13 @@ import com.vaadin.ui.Calendar;
/**
* Handles communication between Calendar on the server side and
* {@link VCalendar} on the client side.
- *
+ *
* @since 7.1
* @author Vaadin Ltd.
*/
@Connect(value = Calendar.class, loadStyle = LoadStyle.LAZY)
-public class CalendarConnector extends AbstractComponentConnector implements
- ActionOwner, SimpleManagedLayout, Paintable {
+public class CalendarConnector extends AbstractComponentConnector
+ implements ActionOwner, SimpleManagedLayout, Paintable {
private CalendarServerRpc rpc = RpcProxy.create(CalendarServerRpc.class,
this);
@@ -94,7 +94,7 @@ public class CalendarConnector extends AbstractComponentConnector implements
private static final String DROPHANDLER_ACCEPT_CRITERIA_PAINT_TAG = "-ac";
/**
- *
+ *
*/
public CalendarConnector() {
@@ -184,8 +184,8 @@ public class CalendarConnector extends AbstractComponentConnector implements
StringBuilder sb = new StringBuilder();
sb.append(DateUtil.formatClientSideDate(event.getStart()));
sb.append("-");
- sb.append(DateUtil.formatClientSideTime(event
- .getStartTime()));
+ sb.append(DateUtil
+ .formatClientSideTime(event.getStartTime()));
rpc.eventMove(event.getIndex(), sb.toString());
}
}
@@ -196,19 +196,20 @@ public class CalendarConnector extends AbstractComponentConnector implements
if (hasEventListener(CalendarEventId.EVENTRESIZE)) {
StringBuilder buffer = new StringBuilder();
- buffer.append(DateUtil.formatClientSideDate(event
- .getStart()));
+ buffer.append(
+ DateUtil.formatClientSideDate(event.getStart()));
buffer.append("-");
- buffer.append(DateUtil.formatClientSideTime(event
- .getStartTime()));
+ buffer.append(DateUtil
+ .formatClientSideTime(event.getStartTime()));
String newStartDate = buffer.toString();
buffer = new StringBuilder();
- buffer.append(DateUtil.formatClientSideDate(event.getEnd()));
+ buffer.append(
+ DateUtil.formatClientSideDate(event.getEnd()));
buffer.append("-");
- buffer.append(DateUtil.formatClientSideTime(event
- .getEndTime()));
+ buffer.append(
+ DateUtil.formatClientSideTime(event.getEndTime()));
String newEndDate = buffer.toString();
@@ -233,7 +234,8 @@ public class CalendarConnector extends AbstractComponentConnector implements
});
getWidget().setListener(new MouseEventListener() {
@Override
- public void contextMenu(ContextMenuEvent event, final Widget widget) {
+ public void contextMenu(ContextMenuEvent event,
+ final Widget widget) {
final NativeEvent ne = event.getNativeEvent();
int left = ne.getClientX();
int top = ne.getClientY();
@@ -259,15 +261,15 @@ public class CalendarConnector extends AbstractComponentConnector implements
*/
SimpleDayCell cell = (SimpleDayCell) widget;
Date start = new Date(cell.getDate().getYear(),
- cell.getDate().getMonth(), cell.getDate()
- .getDate(), 0, 0, 0);
+ cell.getDate().getMonth(),
+ cell.getDate().getDate(), 0, 0, 0);
- Date end = new Date(cell.getDate().getYear(), cell
- .getDate().getMonth(), cell.getDate()
- .getDate(), 23, 59, 59);
+ Date end = new Date(cell.getDate().getYear(),
+ cell.getDate().getMonth(),
+ cell.getDate().getDate(), 23, 59, 59);
- return CalendarConnector.this.getActionsBetween(
- start, end);
+ return CalendarConnector.this
+ .getActionsBetween(start, end);
} else if (widget instanceof MonthEventLabel) {
MonthEventLabel mel = (MonthEventLabel) widget;
@@ -285,9 +287,8 @@ public class CalendarConnector extends AbstractComponentConnector implements
* Week and Day view
*/
DateCell cell = (DateCell) widget;
- int slotIndex = DOM.getChildIndex(
- cell.getElement(), (Element) ne
- .getEventTarget().cast());
+ int slotIndex = DOM.getChildIndex(cell.getElement(),
+ (Element) ne.getEventTarget().cast());
DateCellSlot slot = cell.getSlot(slotIndex);
return CalendarConnector.this.getActionsBetween(
slot.getFrom(), slot.getTo());
@@ -327,8 +328,10 @@ public class CalendarConnector extends AbstractComponentConnector implements
VCalendar widget = getWidget();
// Enable or disable the forward and backward navigation buttons
- widget.setForwardNavigationEnabled(hasEventListener(CalendarEventId.FORWARD));
- widget.setBackwardNavigationEnabled(hasEventListener(CalendarEventId.BACKWARD));
+ widget.setForwardNavigationEnabled(
+ hasEventListener(CalendarEventId.FORWARD));
+ widget.setBackwardNavigationEnabled(
+ hasEventListener(CalendarEventId.BACKWARD));
widget.set24HFormat(state.format24H);
widget.setDayNames(state.dayNames);
@@ -340,10 +343,12 @@ public class CalendarConnector extends AbstractComponentConnector implements
widget.setReadOnly(state.readOnly);
widget.setDisabled(!state.enabled);
- widget.setRangeSelectAllowed(hasEventListener(CalendarEventId.RANGESELECT));
+ widget.setRangeSelectAllowed(
+ hasEventListener(CalendarEventId.RANGESELECT));
widget.setRangeMoveAllowed(hasEventListener(CalendarEventId.EVENTMOVE));
widget.setEventMoveAllowed(hasEventListener(CalendarEventId.EVENTMOVE));
- widget.setEventResizeAllowed(hasEventListener(CalendarEventId.EVENTRESIZE));
+ widget.setEventResizeAllowed(
+ hasEventListener(CalendarEventId.EVENTRESIZE));
widget.setEventCaptionAsHtml(state.eventCaptionAsHtml);
@@ -373,10 +378,10 @@ public class CalendarConnector extends AbstractComponentConnector implements
/*
* (non-Javadoc)
- *
- * @see
- * com.vaadin.terminal.gwt.client.Paintable#updateFromUIDL(com.vaadin.terminal
- * .gwt.client.UIDL, com.vaadin.terminal.gwt.client.ApplicationConnection)
+ *
+ * @see com.vaadin.terminal.gwt.client.Paintable#updateFromUIDL(com.vaadin.
+ * terminal .gwt.client.UIDL,
+ * com.vaadin.terminal.gwt.client.ApplicationConnection)
*/
@Override
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
@@ -385,9 +390,9 @@ public class CalendarConnector extends AbstractComponentConnector implements
UIDL child = (UIDL) childIterator.next();
if (DROPHANDLER_ACCEPT_CRITERIA_PAINT_TAG.equals(child.getTag())) {
if (getWidget().getDropHandler() == null) {
- getWidget().setDropHandler(
- showingMonthView() ? new CalendarMonthDropHandler(
- this) : new CalendarWeekDropHandler(this));
+ getWidget().setDropHandler(showingMonthView()
+ ? new CalendarMonthDropHandler(this)
+ : new CalendarWeekDropHandler(this));
}
getWidget().getDropHandler().updateAcceptRules(child);
} else {
@@ -420,7 +425,8 @@ public class CalendarConnector extends AbstractComponentConnector implements
}
@Override
- public TooltipInfo getTooltipInfo(com.google.gwt.dom.client.Element element) {
+ public TooltipInfo getTooltipInfo(
+ com.google.gwt.dom.client.Element element) {
TooltipInfo tooltipInfo = null;
Widget w = WidgetUtil.findWidget(element, null);
if (w instanceof HasTooltipKey) {
@@ -550,7 +556,7 @@ public class CalendarConnector extends AbstractComponentConnector implements
/**
* Get the original action ID that was passed in from the shared state
- *
+ *
* @since 7.1.2
* @param actionKey
* the unique action key
@@ -562,7 +568,7 @@ public class CalendarConnector extends AbstractComponentConnector implements
/**
* Get the text that is displayed for a context menu item
- *
+ *
* @param actionKey
* The unique action key
* @return
@@ -573,7 +579,7 @@ public class CalendarConnector extends AbstractComponentConnector implements
/**
* Get the icon url for a context menu item
- *
+ *
* @param actionKey
* The unique action key
* @return
@@ -584,7 +590,7 @@ public class CalendarConnector extends AbstractComponentConnector implements
/**
* Get the start date for an action item
- *
+ *
* @param actionKey
* The unique action key
* @return
@@ -599,7 +605,7 @@ public class CalendarConnector extends AbstractComponentConnector implements
/**
* Get the end date for an action item
- *
+ *
* @param actionKey
* The unique action key
* @return
@@ -639,7 +645,7 @@ public class CalendarConnector extends AbstractComponentConnector implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.terminal.gwt.client.ui.ActionOwner#getPaintableId()
*/
@Override
@@ -662,10 +668,10 @@ public class CalendarConnector extends AbstractComponentConnector implements
calendarEvent.setStart(getWidget().getDateFormat().parse(dateFrom));
calendarEvent.setEnd(getWidget().getDateFormat().parse(dateTo));
calendarEvent.setFormat24h(format24h);
- calendarEvent.setStartTime(getWidget().getDateTimeFormat().parse(
- dateFrom + " " + timeFrom));
- calendarEvent.setEndTime(getWidget().getDateTimeFormat().parse(
- dateTo + " " + timeTo));
+ calendarEvent.setStartTime(getWidget().getDateTimeFormat()
+ .parse(dateFrom + " " + timeFrom));
+ calendarEvent.setEndTime(getWidget().getDateTimeFormat()
+ .parse(dateTo + " " + timeTo));
calendarEvent.setStyleName(event.styleName);
calendarEvent.setIndex(event.index);
list.add(calendarEvent);
diff --git a/client/src/main/java/com/vaadin/client/ui/calendar/VCalendarAction.java b/client/src/main/java/com/vaadin/client/ui/calendar/VCalendarAction.java
index 470ee3cf1a..70ecce18b6 100644
--- a/client/src/main/java/com/vaadin/client/ui/calendar/VCalendarAction.java
+++ b/client/src/main/java/com/vaadin/client/ui/calendar/VCalendarAction.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.shared.ui.calendar.DateConstants;
/**
* Action performed by the calendar
- *
+ *
* @since 7.1
* @author Vaadin Ltd.
*/
@@ -45,7 +45,7 @@ public class VCalendarAction extends Action {
.getFormat(DateConstants.ACTION_DATE_FORMAT_PATTERN);
/**
- *
+ *
* @param owner
*/
public VCalendarAction(CalendarConnector owner) {
@@ -54,7 +54,7 @@ public class VCalendarAction extends Action {
/**
* Constructor
- *
+ *
* @param owner
* The owner who trigger this kinds of events
* @param rpc
@@ -71,7 +71,7 @@ public class VCalendarAction extends Action {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.terminal.gwt.client.ui.Action#execute()
*/
@Override
@@ -91,7 +91,7 @@ public class VCalendarAction extends Action {
/**
* Get the date and time when the action starts
- *
+ *
* @return
*/
public Date getActionStartDate() {
@@ -100,7 +100,7 @@ public class VCalendarAction extends Action {
/**
* Set the date when the actions start
- *
+ *
* @param actionStartDate
* The date and time when the action starts
*/
@@ -110,7 +110,7 @@ public class VCalendarAction extends Action {
/**
* Get the date and time when the action ends
- *
+ *
* @return
*/
public Date getActionEndDate() {
@@ -119,7 +119,7 @@ public class VCalendarAction extends Action {
/**
* Set the date and time when the action ends
- *
+ *
* @param actionEndDate
* The date and time when the action ends
*/
diff --git a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/CalendarDay.java b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/CalendarDay.java
index 0fceb6b6f9..7b25abdb38 100644
--- a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/CalendarDay.java
+++ b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/CalendarDay.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -18,7 +18,7 @@ package com.vaadin.client.ui.calendar.schedule;
/**
* Utility class used to represent a day when updating views. Only used
* internally.
- *
+ *
* @since 7.1
* @author Vaadin Ltd.
*/
diff --git a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/CalendarEvent.java b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/CalendarEvent.java
index 5630db2415..21088e92e6 100644
--- a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/CalendarEvent.java
+++ b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/CalendarEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ import com.vaadin.shared.ui.calendar.DateConstants;
/**
* A client side implementation of a calendar event
- *
+ *
* @since 7.1
* @author Vaadin Ltd.
*/
@@ -88,7 +88,7 @@ public class CalendarEvent {
/**
* Returns the start time of the event
- *
+ *
* @return Time embedded in the {@link Date} object
*/
public Date getStartTime() {
@@ -97,7 +97,7 @@ public class CalendarEvent {
/**
* Set the start time of the event
- *
+ *
* @param startTime
* The time of the event. Use the time fields in the {@link Date}
* object
@@ -108,7 +108,7 @@ public class CalendarEvent {
/**
* Get the end time of the event
- *
+ *
* @return Time embedded in the {@link Date} object
*/
public Date getEndTime() {
@@ -117,7 +117,7 @@ public class CalendarEvent {
/**
* Set the end time of the event
- *
+ *
* @param endTime
* Time embedded in the {@link Date} object
*/
@@ -127,7 +127,7 @@ public class CalendarEvent {
/**
* Get the (server side) index of the event
- *
+ *
* @return
*/
public int getIndex() {
@@ -136,7 +136,7 @@ public class CalendarEvent {
/**
* Get the index of the slot where the event in rendered
- *
+ *
* @return
*/
public int getSlotIndex() {
@@ -145,7 +145,7 @@ public class CalendarEvent {
/**
* Set the index of the slot where the event in rendered
- *
+ *
* @param index
* The index of the slot
*/
@@ -155,7 +155,7 @@ public class CalendarEvent {
/**
* Set the (server side) index of the event
- *
+ *
* @param index
* The index
*/
@@ -166,7 +166,7 @@ public class CalendarEvent {
/**
* Get the caption of the event. The caption is the text displayed in the
* calendar on the event.
- *
+ *
* @return
*/
public String getCaption() {
@@ -176,7 +176,7 @@ public class CalendarEvent {
/**
* Set the caption of the event. The caption is the text displayed in the
* calendar on the event.
- *
+ *
* @param caption
* The visible caption of the event
*/
@@ -187,7 +187,7 @@ public class CalendarEvent {
/**
* Get the description of the event. The description is the text displayed
* when hoovering over the event with the mouse
- *
+ *
* @return
*/
public String getDescription() {
@@ -197,7 +197,7 @@ public class CalendarEvent {
/**
* Set the description of the event. The description is the text displayed
* when hoovering over the event with the mouse
- *
+ *
* @param description
*/
public void setDescription(String description) {
@@ -206,7 +206,7 @@ public class CalendarEvent {
/**
* Does the event use the 24h time format
- *
+ *
* @param format24h
* True if it uses the 24h format, false if it uses the 12h time
* format
@@ -217,7 +217,7 @@ public class CalendarEvent {
/**
* Is the event an all day event.
- *
+ *
* @param allDay
* True if the event should be rendered all day
*/
@@ -227,7 +227,7 @@ public class CalendarEvent {
/**
* Is the event an all day event.
- *
+ *
* @return
*/
public boolean isAllDay() {
@@ -236,7 +236,7 @@ public class CalendarEvent {
/**
* Get the time as a formatted string
- *
+ *
* @return
*/
public String getTimeAsText() {
@@ -249,7 +249,7 @@ public class CalendarEvent {
/**
* Get the amount of milliseconds between the start and end of the event
- *
+ *
* @return
*/
public long getRangeInMilliseconds() {
@@ -258,7 +258,7 @@ public class CalendarEvent {
/**
* Get the amount of minutes between the start and end of the event
- *
+ *
* @return
*/
public long getRangeInMinutes() {
@@ -268,7 +268,7 @@ public class CalendarEvent {
/**
* Get the amount of minutes for the event on a specific day. This is useful
* if the event spans several days.
- *
+ *
* @param targetDay
* The date to check
* @return
@@ -282,10 +282,10 @@ public class CalendarEvent {
if (targetDay.compareTo(getStart()) == 0) { // for first day
rangeInMinutesForDay = DateConstants.DAYINMINUTES
- (getStartTime().getTime() - getStart().getTime())
- / DateConstants.MINUTEINMILLIS;
+ / DateConstants.MINUTEINMILLIS;
} else if (targetDay.compareTo(getEnd()) == 0) { // for last day
- rangeInMinutesForDay = (getEndTime().getTime() - getEnd()
- .getTime()) / DateConstants.MINUTEINMILLIS;
+ rangeInMinutesForDay = (getEndTime().getTime()
+ - getEnd().getTime()) / DateConstants.MINUTEINMILLIS;
} else { // for in-between days
rangeInMinutesForDay = DateConstants.DAYINMINUTES;
}
@@ -297,7 +297,7 @@ public class CalendarEvent {
/**
* Does the event span several days
- *
+ *
* @return
*/
@SuppressWarnings("deprecation")
@@ -306,7 +306,8 @@ public class CalendarEvent {
// if difference between start and end times is more than day - of
// course it is not one day, but several days
- if (getEndTime().getTime() - getStartTime().getTime() > DateConstants.DAYINMILLIS) {
+ if (getEndTime().getTime()
+ - getStartTime().getTime() > DateConstants.DAYINMILLIS) {
isSeveralDays = true;
} else { // if difference <= day -> there can be different cases
if (getStart().compareTo(getEnd()) != 0
diff --git a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/DateCell.java b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/DateCell.java
index 39d516b694..83017713d9 100644
--- a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/DateCell.java
+++ b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/DateCell.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -45,9 +45,8 @@ import com.google.gwt.user.client.Event;
import com.google.gwt.user.client.ui.Widget;
import com.vaadin.client.WidgetUtil;
-public class DateCell extends FocusableComplexPanel implements
- MouseDownHandler, MouseMoveHandler, MouseUpHandler, KeyDownHandler,
- ContextMenuHandler {
+public class DateCell extends FocusableComplexPanel implements MouseDownHandler,
+ MouseMoveHandler, MouseUpHandler, KeyDownHandler, ContextMenuHandler {
private static final String DRAGEMPHASISSTYLE = " dragemphasis";
private Date date;
private int width;
@@ -111,8 +110,8 @@ public class DateCell extends FocusableComplexPanel implements
firstHour = weekgrid.getFirstHour();
lastHour = weekgrid.getLastHour();
numberOfSlots = (lastHour - firstHour + 1) * 2;
- long slotTime = Math.round(((lastHour - firstHour + 1) * 3600000.0)
- / numberOfSlots);
+ long slotTime = Math.round(
+ ((lastHour - firstHour + 1) * 3600000.0) / numberOfSlots);
slotElements = new Element[numberOfSlots];
slotElementHeights = new int[numberOfSlots];
@@ -176,7 +175,8 @@ public class DateCell extends FocusableComplexPanel implements
}
}
- throw new IllegalArgumentException("Element not found in this DateCell");
+ throw new IllegalArgumentException(
+ "Element not found in this DateCell");
}
public DateCellSlot getSlot(int index) {
@@ -326,8 +326,8 @@ public class DateCell extends FocusableComplexPanel implements
startingSlotHeight = height / numberOfSlots;
for (int i = 0; i < slotElements.length; i++) {
- slotElements[i].getStyle()
- .setHeight(slotElementHeights[i], Unit.PX);
+ slotElements[i].getStyle().setHeight(slotElementHeights[i],
+ Unit.PX);
}
updateEventCellsHeight();
@@ -352,9 +352,10 @@ public class DateCell extends FocusableComplexPanel implements
d.setMoveWidth(width);
int freeSpaceCol = findFreeColumnSpaceOnLeft(
- new WeekGridMinuteTimeRange(d.getCalendarEvent()
- .getStartTime(), d.getCalendarEvent()
- .getEndTime()), order, columns);
+ new WeekGridMinuteTimeRange(
+ d.getCalendarEvent().getStartTime(),
+ d.getCalendarEvent().getEndTime()),
+ order, columns);
if (freeSpaceCol >= 0) {
col = freeSpaceCol;
columns.put(eventIndex, col);
@@ -378,10 +379,8 @@ public class DateCell extends FocusableComplexPanel implements
int eventWidth = (width / colCount);
for (Integer index : g.getItems()) {
DateCellDayEvent d = (DateCellDayEvent) getWidget(index);
- d.getElement()
- .getStyle()
- .setMarginLeft((eventWidth * columns.get(index)),
- Unit.PX);
+ d.getElement().getStyle().setMarginLeft(
+ (eventWidth * columns.get(index)), Unit.PX);
d.setWidth(eventWidth + "px");
d.setSlotHeightInPX(getSlotHeight());
}
@@ -404,9 +403,9 @@ public class DateCell extends FocusableComplexPanel implements
}
DateCellDayEvent d = (DateCellDayEvent) getWidget(eventIndex);
- WeekGridMinuteTimeRange nextRange = new WeekGridMinuteTimeRange(d
- .getCalendarEvent().getStartTime(), d.getCalendarEvent()
- .getEndTime());
+ WeekGridMinuteTimeRange nextRange = new WeekGridMinuteTimeRange(
+ d.getCalendarEvent().getStartTime(),
+ d.getCalendarEvent().getEndTime());
if (WeekGridMinuteTimeRange.doesOverlap(dateRange, nextRange)) {
skipIndex = col;
@@ -442,7 +441,7 @@ public class DateCell extends FocusableComplexPanel implements
/**
* Returns all overlapping DayEvent indexes in the Group. Including the
* target.
- *
+ *
* @param targetIndex
* Index of DayEvent in the current DateCell widget.
* @return Group that contains all Overlapping DayEvent indexes
@@ -453,8 +452,8 @@ public class DateCell extends FocusableComplexPanel implements
int count = getWidgetCount();
DateCellDayEvent target = (DateCellDayEvent) getWidget(targetIndex);
WeekGridMinuteTimeRange targetRange = new WeekGridMinuteTimeRange(
- target.getCalendarEvent().getStartTime(), target
- .getCalendarEvent().getEndTime());
+ target.getCalendarEvent().getStartTime(),
+ target.getCalendarEvent().getEndTime());
Date groupStart = targetRange.getStart();
Date groupEnd = targetRange.getEnd();
@@ -464,9 +463,9 @@ public class DateCell extends FocusableComplexPanel implements
}
DateCellDayEvent d = (DateCellDayEvent) getWidget(i);
- WeekGridMinuteTimeRange nextRange = new WeekGridMinuteTimeRange(d
- .getCalendarEvent().getStartTime(), d.getCalendarEvent()
- .getEndTime());
+ WeekGridMinuteTimeRange nextRange = new WeekGridMinuteTimeRange(
+ d.getCalendarEvent().getStartTime(),
+ d.getCalendarEvent().getEndTime());
if (WeekGridMinuteTimeRange.doesOverlap(targetRange, nextRange)) {
g.add(i);
@@ -547,8 +546,8 @@ public class DateCell extends FocusableComplexPanel implements
events.add(dayEvent.getCalendarEvent());
index = 0;
- for (CalendarEvent e : weekgrid.getCalendar().sortEventsByDuration(
- events)) {
+ for (CalendarEvent e : weekgrid.getCalendar()
+ .sortEventsByDuration(events)) {
if (e.equals(dayEvent.getCalendarEvent())) {
break;
}
@@ -562,10 +561,10 @@ public class DateCell extends FocusableComplexPanel implements
}
/**
- *
+ *
* @param event
* @return
- *
+ *
* This method is not necessary in the long run.. Or here can be
* various types of implementations..
*/
@@ -584,7 +583,8 @@ public class DateCell extends FocusableComplexPanel implements
int eventStartHours = eventStart.getHours();
int eventEndHours = eventEnd.getHours();
- display = !(eventEndHours < firstHour || eventStartHours > lastHour);
+ display = !(eventEndHours < firstHour
+ || eventStartHours > lastHour);
}
return display;
}
@@ -642,8 +642,8 @@ public class DateCell extends FocusableComplexPanel implements
// and then the end
for (int i = 0; i < nodes.getLength(); i++) {
Element element = (Element) nodes.getItem(i);
- boolean isRangeElement = element.getClassName().contains(
- "v-daterange");
+ boolean isRangeElement = element.getClassName()
+ .contains("v-daterange");
if (isRangeElement && slotStart == -1) {
slotStart = i;
@@ -666,10 +666,8 @@ public class DateCell extends FocusableComplexPanel implements
+ (currentDate.getMonth() + 1) + "-"
+ currentDate.getDate();
if (weekgrid.getCalendar().getRangeSelectListener() != null) {
- weekgrid.getCalendar()
- .getRangeSelectListener()
- .rangeSelected(
- yr + ":" + startMinutes + ":" + endMinutes);
+ weekgrid.getCalendar().getRangeSelectListener().rangeSelected(
+ yr + ":" + startMinutes + ":" + endMinutes);
}
eventRangeStart = -1;
} else {
@@ -792,7 +790,8 @@ public class DateCell extends FocusableComplexPanel implements
* {@link #addEmphasisStyle(Element)} instead
*/
@Deprecated
- public void addEmphasisStyle(com.google.gwt.user.client.Element elementOver) {
+ public void addEmphasisStyle(
+ com.google.gwt.user.client.Element elementOver) {
String originalStylename = getStyleName(elementOver);
setStyleName(elementOver, originalStylename + DRAGEMPHASISSTYLE);
}
@@ -812,10 +811,8 @@ public class DateCell extends FocusableComplexPanel implements
public void removeEmphasisStyle(
com.google.gwt.user.client.Element elementOver) {
String originalStylename = getStyleName(elementOver);
- setStyleName(
- elementOver,
- originalStylename.substring(0, originalStylename.length()
- - DRAGEMPHASISSTYLE.length()));
+ setStyleName(elementOver, originalStylename.substring(0,
+ originalStylename.length() - DRAGEMPHASISSTYLE.length()));
}
/**
@@ -830,8 +827,8 @@ public class DateCell extends FocusableComplexPanel implements
if (weekgrid.getCalendar().getMouseEventListener() != null) {
event.preventDefault();
event.stopPropagation();
- weekgrid.getCalendar().getMouseEventListener()
- .contextMenu(event, DateCell.this);
+ weekgrid.getCalendar().getMouseEventListener().contextMenu(event,
+ DateCell.this);
}
}
diff --git a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/DateCellContainer.java b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/DateCellContainer.java
index 26f5951987..82cd26dd3c 100644
--- a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/DateCellContainer.java
+++ b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/DateCellContainer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,11 +28,11 @@ import com.vaadin.client.ui.VCalendar;
/**
* Internally used class by the Calendar
- *
+ *
* since 7.1
*/
-public class DateCellContainer extends FlowPanel implements MouseDownHandler,
- MouseUpHandler {
+public class DateCellContainer extends FlowPanel
+ implements MouseDownHandler, MouseUpHandler {
private Date date;
diff --git a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/DateCellDayEvent.java b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/DateCellDayEvent.java
index 55834397d3..7d938e42be 100644
--- a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/DateCellDayEvent.java
+++ b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/DateCellDayEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -46,12 +46,12 @@ import com.vaadin.shared.ui.calendar.DateConstants;
/**
* Internally used by the calendar
- *
+ *
* @since 7.1
*/
-public class DateCellDayEvent extends FocusableHTML implements
- MouseDownHandler, MouseUpHandler, MouseMoveHandler, KeyDownHandler,
- ContextMenuHandler, HasTooltipKey {
+public class DateCellDayEvent extends FocusableHTML
+ implements MouseDownHandler, MouseUpHandler, MouseMoveHandler,
+ KeyDownHandler, ContextMenuHandler, HasTooltipKey {
private final DateCell dateCell;
private Element caption = null;
@@ -215,20 +215,24 @@ public class DateCellDayEvent extends FocusableHTML implements
public void onMouseDown(MouseDownEvent event) {
startX = event.getClientX();
startY = event.getClientY();
- if (isDisabled() || event.getNativeButton() != NativeEvent.BUTTON_LEFT) {
+ if (isDisabled()
+ || event.getNativeButton() != NativeEvent.BUTTON_LEFT) {
return;
}
clickTarget = Element.as(event.getNativeEvent().getEventTarget());
mouseMoveCanceled = false;
- if (weekGrid.getCalendar().isEventMoveAllowed() || clickTargetsResize()) {
+ if (weekGrid.getCalendar().isEventMoveAllowed()
+ || clickTargetsResize()) {
moveRegistration = addMouseMoveHandler(this);
setFocus(true);
try {
- startYrelative = (int) ((double) event.getRelativeY(caption) % slotHeight);
- startXrelative = (event.getRelativeX(weekGrid.getElement()) - weekGrid.timebar
- .getOffsetWidth()) % getDateCellWidth();
+ startYrelative = (int) ((double) event.getRelativeY(caption)
+ % slotHeight);
+ startXrelative = (event.getRelativeX(weekGrid.getElement())
+ - weekGrid.timebar.getOffsetWidth())
+ % getDateCellWidth();
} catch (Exception e) {
GWT.log("Exception calculating relative start position", e);
}
@@ -282,7 +286,8 @@ public class DateCellDayEvent extends FocusableHTML implements
s.setZIndex(1);
if (!clickTargetsResize()) {
// check if mouse has moved over threshold of 3 pixels
- boolean mouseMoved = (xDiff < -3 || xDiff > 3 || yDiff < -3 || yDiff > 3);
+ boolean mouseMoved = (xDiff < -3 || xDiff > 3 || yDiff < -3
+ || yDiff > 3);
if (!weekGrid.getCalendar().isDisabledOrReadOnly() && mouseMoved) {
// Event Move:
@@ -296,7 +301,8 @@ public class DateCellDayEvent extends FocusableHTML implements
Element e = Element.as(et);
if (e == caption || e == eventContent
|| e.getParentElement() == caption) {
- if (weekGrid.getCalendar().getEventClickListener() != null) {
+ if (weekGrid.getCalendar()
+ .getEventClickListener() != null) {
weekGrid.getCalendar().getEventClickListener()
.eventClick(calendarEvent);
}
@@ -543,7 +549,7 @@ public class DateCellDayEvent extends FocusableHTML implements
/**
* Check if the given time range is too small for events
- *
+ *
* @param start
* @param end
* @return
@@ -561,7 +567,7 @@ public class DateCellDayEvent extends FocusableHTML implements
/**
* Build the string for sending resize events to server
- *
+ *
* @param event
* @return
*/
@@ -608,7 +614,8 @@ public class DateCellDayEvent extends FocusableHTML implements
*/
private boolean clickTargetsResize() {
return weekGrid.getCalendar().isEventResizeAllowed()
- && (clickTarget == topResizeBar || clickTarget == bottomResizeBar);
+ && (clickTarget == topResizeBar
+ || clickTarget == bottomResizeBar);
}
private void addGlobalResizeStyle() {
diff --git a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/DateCellGroup.java b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/DateCellGroup.java
index f4ef22f4ca..12fb07ea81 100644
--- a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/DateCellGroup.java
+++ b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/DateCellGroup.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ import java.util.List;
/**
* Internally used by the calendar
- *
+ *
* @since 7.1
*/
public class DateCellGroup {
diff --git a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/DateUtil.java b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/DateUtil.java
index 165bbefefc..2e7952ae18 100644
--- a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/DateUtil.java
+++ b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/DateUtil.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ import com.vaadin.shared.ui.calendar.DateConstants;
/**
* Utility class for {@link Date} operations
- *
+ *
* @since 7.1
* @author Vaadin Ltd.
*/
@@ -30,7 +30,7 @@ public class DateUtil {
/**
* Checks if dates are same day without checking datetimes.
- *
+ *
* @param date1
* @param date2
* @return
@@ -48,7 +48,7 @@ public class DateUtil {
/**
* @param date
* the date to format
- *
+ *
* @return given Date as String, for communicating to server-side
*/
public static String formatClientSideDate(Date date) {
diff --git a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/DayToolbar.java b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/DayToolbar.java
index 10ed5bb3f9..24ad02d132 100644
--- a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/DayToolbar.java
+++ b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/DayToolbar.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,10 +27,10 @@ import com.google.gwt.user.client.ui.Widget;
import com.vaadin.client.ui.VCalendar;
/**
- *
+ *
* @since 7.1
* @author Vaadin Ltd.
- *
+ *
*/
public class DayToolbar extends HorizontalPanel implements ClickHandler {
private int width = 0;
@@ -73,8 +73,8 @@ public class DayToolbar extends HorizontalPanel implements ClickHandler {
setCellHorizontalAlignment(nextLabel, ALIGN_RIGHT);
int cellw = width / (count - 2);
if (cellw > 0) {
- int[] cellWidths = VCalendar
- .distributeSize(width, count - 2, 0);
+ int[] cellWidths = VCalendar.distributeSize(width, count - 2,
+ 0);
for (int i = 1; i < count - 1; i++) {
Widget widget = getWidget(i);
// if (remain > 0) {
diff --git a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/FocusableComplexPanel.java b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/FocusableComplexPanel.java
index cdad83744e..3a632bcc7f 100644
--- a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/FocusableComplexPanel.java
+++ b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/FocusableComplexPanel.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -34,13 +34,13 @@ import com.vaadin.client.Focusable;
/**
* A ComplexPanel that can be focused
- *
+ *
* @since 7.1
* @author Vaadin Ltd.
- *
+ *
*/
-public class FocusableComplexPanel extends ComplexPanel implements
- HasFocusHandlers, HasBlurHandlers, HasKeyDownHandlers,
+public class FocusableComplexPanel extends ComplexPanel
+ implements HasFocusHandlers, HasBlurHandlers, HasKeyDownHandlers,
HasKeyPressHandlers, Focusable {
protected void makeFocusable() {
@@ -51,7 +51,7 @@ public class FocusableComplexPanel extends ComplexPanel implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.HasFocusHandlers#addFocusHandler(com.
* google.gwt.event.dom.client.FocusHandler)
@@ -63,7 +63,7 @@ public class FocusableComplexPanel extends ComplexPanel implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.HasBlurHandlers#addBlurHandler(com.google
* .gwt.event.dom.client.BlurHandler)
@@ -75,7 +75,7 @@ public class FocusableComplexPanel extends ComplexPanel implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.HasKeyDownHandlers#addKeyDownHandler(
* com.google.gwt.event.dom.client.KeyDownHandler)
@@ -87,7 +87,7 @@ public class FocusableComplexPanel extends ComplexPanel implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.HasKeyPressHandlers#addKeyPressHandler
* (com.google.gwt.event.dom.client.KeyPressHandler)
@@ -99,7 +99,7 @@ public class FocusableComplexPanel extends ComplexPanel implements
/**
* Sets/Removes the keyboard focus to the panel.
- *
+ *
* @param focus
* If set to true then the focus is moved to the panel, if set to
* false the focus is removed
diff --git a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/FocusableGrid.java b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/FocusableGrid.java
index 1369392656..e022c41a8b 100644
--- a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/FocusableGrid.java
+++ b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/FocusableGrid.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -34,10 +34,10 @@ import com.vaadin.client.Focusable;
/**
* A Grid that can be focused
- *
+ *
* @since 7.1
* @author Vaadin Ltd.
- *
+ *
*/
public class FocusableGrid extends Grid implements HasFocusHandlers,
HasBlurHandlers, HasKeyDownHandlers, HasKeyPressHandlers, Focusable {
@@ -63,7 +63,7 @@ public class FocusableGrid extends Grid implements HasFocusHandlers,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.HasFocusHandlers#addFocusHandler(com.
* google.gwt.event.dom.client.FocusHandler)
@@ -75,7 +75,7 @@ public class FocusableGrid extends Grid implements HasFocusHandlers,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.HasBlurHandlers#addBlurHandler(com.google
* .gwt.event.dom.client.BlurHandler)
@@ -87,7 +87,7 @@ public class FocusableGrid extends Grid implements HasFocusHandlers,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.HasKeyDownHandlers#addKeyDownHandler(
* com.google.gwt.event.dom.client.KeyDownHandler)
@@ -99,7 +99,7 @@ public class FocusableGrid extends Grid implements HasFocusHandlers,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.HasKeyPressHandlers#addKeyPressHandler
* (com.google.gwt.event.dom.client.KeyPressHandler)
@@ -111,7 +111,7 @@ public class FocusableGrid extends Grid implements HasFocusHandlers,
/**
* Sets/Removes the keyboard focus to the panel.
- *
+ *
* @param focus
* If set to true then the focus is moved to the panel, if set to
* false the focus is removed
diff --git a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/FocusableHTML.java b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/FocusableHTML.java
index 0c6ddb3697..8ca7e83ffe 100644
--- a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/FocusableHTML.java
+++ b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/FocusableHTML.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -34,10 +34,10 @@ import com.vaadin.client.Focusable;
/**
* A HTML widget that can be focused
- *
+ *
* @since 7.1
* @author Vaadin Ltd.
- *
+ *
*/
public class FocusableHTML extends HTML implements HasFocusHandlers,
HasBlurHandlers, HasKeyDownHandlers, HasKeyPressHandlers, Focusable {
@@ -53,7 +53,7 @@ public class FocusableHTML extends HTML implements HasFocusHandlers,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.HasFocusHandlers#addFocusHandler(com.
* google.gwt.event.dom.client.FocusHandler)
@@ -65,7 +65,7 @@ public class FocusableHTML extends HTML implements HasFocusHandlers,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.HasBlurHandlers#addBlurHandler(com.google
* .gwt.event.dom.client.BlurHandler)
@@ -77,7 +77,7 @@ public class FocusableHTML extends HTML implements HasFocusHandlers,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.HasKeyDownHandlers#addKeyDownHandler(
* com.google.gwt.event.dom.client.KeyDownHandler)
@@ -89,7 +89,7 @@ public class FocusableHTML extends HTML implements HasFocusHandlers,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.dom.client.HasKeyPressHandlers#addKeyPressHandler
* (com.google.gwt.event.dom.client.KeyPressHandler)
@@ -101,7 +101,7 @@ public class FocusableHTML extends HTML implements HasFocusHandlers,
/**
* Sets/Removes the keyboard focus to the panel.
- *
+ *
* @param focus
* If set to true then the focus is moved to the panel, if set to
* false the focus is removed
diff --git a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/HasTooltipKey.java b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/HasTooltipKey.java
index d04ec39527..29fc825d90 100644
--- a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/HasTooltipKey.java
+++ b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/HasTooltipKey.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -17,16 +17,16 @@ package com.vaadin.client.ui.calendar.schedule;
/**
* For Calendar client-side internal use only.
- *
+ *
* @since 7.1
* @author Vaadin Ltd.
- *
+ *
*/
public interface HasTooltipKey {
/**
* Gets the key associated for the Widget implementing this interface. This
* key is used for getting a tooltip title identified by the key
- *
+ *
* @return the tooltip key
*/
Object getTooltipKey();
diff --git a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/MonthEventLabel.java b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/MonthEventLabel.java
index 31e600c8f9..8ee9183192 100644
--- a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/MonthEventLabel.java
+++ b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/MonthEventLabel.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.client.ui.VCalendar;
/**
* The label in a month cell
- *
+ *
* @since 7.1
*/
public class MonthEventLabel extends HTML implements HasTooltipKey {
@@ -63,7 +63,7 @@ public class MonthEventLabel extends HTML implements HasTooltipKey {
/**
* Set the time of the event label
- *
+ *
* @param date
* The date object that specifies the time
*/
@@ -74,7 +74,7 @@ public class MonthEventLabel extends HTML implements HasTooltipKey {
/**
* Set the caption of the event label
- *
+ *
* @param caption
* The caption string, can be HTML if
* {@link VCalendar#isEventCaptionAsHtml()} is true
@@ -113,7 +113,7 @@ public class MonthEventLabel extends HTML implements HasTooltipKey {
/**
* Set the (server side) index of the event
- *
+ *
* @param index
* The integer index
*/
@@ -123,7 +123,7 @@ public class MonthEventLabel extends HTML implements HasTooltipKey {
/**
* Set the Calendar instance this label belongs to
- *
+ *
* @param calendar
* The calendar instance
*/
@@ -133,7 +133,7 @@ public class MonthEventLabel extends HTML implements HasTooltipKey {
/**
* Is the event bound to a specific time
- *
+ *
* @return
*/
public boolean isTimeSpecificEvent() {
@@ -142,7 +142,7 @@ public class MonthEventLabel extends HTML implements HasTooltipKey {
/**
* Is the event bound to a specific time
- *
+ *
* @param timeSpecificEvent
* True if the event is bound to a time, false if it is only
* bound to the day
@@ -153,7 +153,7 @@ public class MonthEventLabel extends HTML implements HasTooltipKey {
/*
* (non-Javadoc)
- *
+ *
* @see com.google.gwt.user.client.ui.HTML#setHTML(java.lang.String)
*/
@Override
diff --git a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/MonthGrid.java b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/MonthGrid.java
index 52a81d0eb9..4bd03d5dc9 100644
--- a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/MonthGrid.java
+++ b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/MonthGrid.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,10 +24,10 @@ import com.google.gwt.event.shared.HandlerRegistration;
import com.vaadin.client.ui.VCalendar;
/**
- *
+ *
* @since 7.1
* @author Vaadin Ltd.
- *
+ *
*/
public class MonthGrid extends FocusableGrid implements KeyDownHandler {
diff --git a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/SimpleDayCell.java b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/SimpleDayCell.java
index 158241337b..0ec26cda58 100644
--- a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/SimpleDayCell.java
+++ b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/SimpleDayCell.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -43,12 +43,12 @@ import com.vaadin.shared.ui.calendar.DateConstants;
/**
* A class representing a single cell within the calendar in month-view
- *
+ *
* @since 7.1
* @author Vaadin Ltd.
*/
-public class SimpleDayCell extends FocusableFlowPanel implements
- MouseUpHandler, MouseDownHandler, MouseOverHandler, MouseMoveHandler {
+public class SimpleDayCell extends FocusableFlowPanel implements MouseUpHandler,
+ MouseDownHandler, MouseOverHandler, MouseMoveHandler {
private static int BOTTOMSPACERHEIGHT = -1;
private static int EVENTHEIGHT = -1;
@@ -221,9 +221,8 @@ public class SimpleDayCell extends FocusableFlowPanel implements
}
}
- int remainingSpace = intHeight
- - ((slots * EVENTHEIGHT) + BOTTOMSPACERHEIGHT + caption
- .getOffsetHeight());
+ int remainingSpace = intHeight - ((slots * EVENTHEIGHT)
+ + BOTTOMSPACERHEIGHT + caption.getOffsetHeight());
int newHeight = remainingSpace + BOTTOMSPACERHEIGHT;
if (newHeight < 0) {
newHeight = EVENTHEIGHT;
@@ -344,8 +343,8 @@ public class SimpleDayCell extends FocusableFlowPanel implements
public void setMonthNameVisible(boolean b) {
monthNameVisible = b;
int dateOfMonth = date.getDate();
- caption.setText(dateOfMonth + " "
- + calendar.getMonthNames()[date.getMonth()]);
+ caption.setText(
+ dateOfMonth + " " + calendar.getMonthNames()[date.getMonth()]);
}
public HandlerRegistration addMouseMoveHandler(MouseMoveHandler handler) {
@@ -517,9 +516,11 @@ public class SimpleDayCell extends FocusableFlowPanel implements
}
// Check boundaries
if (relativeY < 0
- || relativeY >= (calendar.getMonthGrid().getRowCount() * dateCellHeigth)
+ || relativeY >= (calendar.getMonthGrid().getRowCount()
+ * dateCellHeigth)
|| relativeX < 0
- || relativeX >= (calendar.getMonthGrid().getColumnCount() * dateCellWidth)) {
+ || relativeX >= (calendar.getMonthGrid().getColumnCount()
+ * dateCellWidth)) {
return;
}
@@ -644,7 +645,8 @@ public class SimpleDayCell extends FocusableFlowPanel implements
}
}
- public void updateDragPosition(MonthEventLabel w, int dayDiff, int weekDiff) {
+ public void updateDragPosition(MonthEventLabel w, int dayDiff,
+ int weekDiff) {
// Draw event to its new position only when position has changed
if (dayDiff == prevDayDiff && weekDiff == prevWeekDiff) {
return;
diff --git a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/SimpleDayToolbar.java b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/SimpleDayToolbar.java
index 3133341542..234dc4fbc2 100644
--- a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/SimpleDayToolbar.java
+++ b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/SimpleDayToolbar.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,10 +20,10 @@ import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Widget;
/**
- *
+ *
* @since 7.1.0
* @author Vaadin Ltd.
- *
+ *
*/
public class SimpleDayToolbar extends HorizontalPanel {
private int width = 0;
diff --git a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/SimpleWeekToolbar.java b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/SimpleWeekToolbar.java
index fc79163d3e..ed1807603a 100644
--- a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/SimpleWeekToolbar.java
+++ b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/SimpleWeekToolbar.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,10 +21,10 @@ import com.google.gwt.user.client.ui.FlexTable;
import com.vaadin.client.ui.VCalendar;
/**
- *
+ *
* @since 7.1
* @author Vaadin Ltd.
- *
+ *
*/
public class SimpleWeekToolbar extends FlexTable implements ClickHandler {
private int height;
@@ -102,8 +102,8 @@ public class SimpleWeekToolbar extends FlexTable implements ClickHandler {
public void onClick(ClickEvent event) {
WeekLabel wl = (WeekLabel) event.getSource();
if (calendar.getWeekClickListener() != null) {
- calendar.getWeekClickListener().weekClick(
- wl.getYear() + "w" + wl.getWeek());
+ calendar.getWeekClickListener()
+ .weekClick(wl.getYear() + "w" + wl.getWeek());
}
}
}
diff --git a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/WeekGrid.java b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/WeekGrid.java
index aecaff1931..10fb77df92 100644
--- a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/WeekGrid.java
+++ b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/WeekGrid.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -36,10 +36,10 @@ import com.vaadin.client.ui.VCalendar;
import com.vaadin.shared.ui.calendar.DateConstants;
/**
- *
+ *
* @since 7.1
* @author Vaadin Ltd.
- *
+ *
*/
public class WeekGrid extends SimplePanel {
@@ -165,8 +165,8 @@ public class WeekGrid extends SimplePanel {
this.width = content.getOffsetWidth() - timebar.getOffsetWidth();
} else {
- this.width = (width == -1) ? width : width
- - timebar.getOffsetWidth();
+ this.width = (width == -1) ? width
+ : width - timebar.getOffsetWidth();
if (isVerticalScrollable() && width != -1) {
this.width = this.width - WidgetUtil.getNativeScrollbarSize();
@@ -219,12 +219,13 @@ public class WeekGrid extends SimplePanel {
int count = content.getWidgetCount();
int datesWidth = width;
if (datesWidth > 0 && count > 1) {
- cellWidths = VCalendar
- .distributeSize(datesWidth, count - 1, -1);
+ cellWidths = VCalendar.distributeSize(datesWidth, count - 1,
+ -1);
for (int i = 1; i < count; i++) {
DateCell dc = (DateCell) content.getWidget(i);
- dc.setHorizontalSized(isHorizontalScrollable() || width < 0);
+ dc.setHorizontalSized(
+ isHorizontalScrollable() || width < 0);
dc.setWidthPX(cellWidths[i - 1]);
if (dc.isToday()) {
dc.setTimeBarWidth(getOffsetWidth());
@@ -237,7 +238,8 @@ public class WeekGrid extends SimplePanel {
if (count > 1) {
for (int i = 1; i < count; i++) {
DateCell dc = (DateCell) content.getWidget(i);
- dc.setHorizontalSized(isHorizontalScrollable() || width < 0);
+ dc.setHorizontalSized(
+ isHorizontalScrollable() || width < 0);
}
}
}
@@ -269,8 +271,8 @@ public class WeekGrid extends SimplePanel {
if (count > 1) {
DateCell first = (DateCell) content.getWidget(1);
dateCellBorder = first.getSlotBorder();
- int dateHeight = (first.getOffsetHeight() / first
- .getNumberOfSlots()) - dateCellBorder;
+ int dateHeight = (first.getOffsetHeight()
+ / first.getNumberOfSlots()) - dateCellBorder;
cellHeights = new int[48];
Arrays.fill(cellHeights, dateHeight);
@@ -291,10 +293,8 @@ public class WeekGrid extends SimplePanel {
Date dcDate = dc.getDate();
int comp = dcDate.compareTo(from);
int comp2 = dcDate.compareTo(toTime);
- if (comp >= 0
- && comp2 < 0
- || (comp == 0 && comp2 == 0 && VCalendar
- .isZeroLengthMidnightEvent(e))) {
+ if (comp >= 0 && comp2 < 0 || (comp == 0 && comp2 == 0
+ && VCalendar.isZeroLengthMidnightEvent(e))) {
// Same event may be over two DateCells if event's date
// range floats over one day. It can't float over two days,
// because event which range is over 24 hours, will be handled
@@ -322,8 +322,8 @@ public class WeekGrid extends SimplePanel {
int shownHeightInMinutes = endHourInMinutes - firstHourInMinutes
+ DateConstants.HOURINMINUTES;
- durationInMinutes = Math.min(durationInMinutes, shownHeightInMinutes
- - startFromMinutes);
+ durationInMinutes = Math.min(durationInMinutes,
+ shownHeightInMinutes - startFromMinutes);
// calculate full slots to event
int slotsTillEvent = startFromMinutes / slotInMinutes;
@@ -353,25 +353,29 @@ public class WeekGrid extends SimplePanel {
// calculate slot overflow at start
if (startOverFlowTime > 0 && currentSlot < cellHeights.length) {
int lastSlotHeight = cellHeights[currentSlot] + dateCellBorder;
- pixelLength += (int) (((double) lastSlotHeight / (double) slotInMinutes) * startOverFlowTime);
+ pixelLength += (int) (((double) lastSlotHeight
+ / (double) slotInMinutes) * startOverFlowTime);
}
// calculate length in full slots
int lastFullSlot = currentSlot + durationInSlots;
- for (; currentSlot < lastFullSlot && currentSlot < cellHeights.length; currentSlot++) {
+ for (; currentSlot < lastFullSlot
+ && currentSlot < cellHeights.length; currentSlot++) {
pixelLength += cellHeights[currentSlot] + dateCellBorder;
}
// calculate overflow at end
if (endOverFlowTime > 0 && currentSlot < cellHeights.length) {
int lastSlotHeight = cellHeights[currentSlot] + dateCellBorder;
- pixelLength += (int) (((double) lastSlotHeight / (double) slotInMinutes) * endOverFlowTime);
+ pixelLength += (int) (((double) lastSlotHeight
+ / (double) slotInMinutes) * endOverFlowTime);
}
// reduce possible underflow at end
if (endOverFlowTime < 0) {
int lastSlotHeight = cellHeights[currentSlot] + dateCellBorder;
- pixelLength += (int) (((double) lastSlotHeight / (double) slotInMinutes) * endOverFlowTime);
+ pixelLength += (int) (((double) lastSlotHeight
+ / (double) slotInMinutes) * endOverFlowTime);
}
return pixelLength;
@@ -410,8 +414,8 @@ public class WeekGrid extends SimplePanel {
public void eventMoved(DateCellDayEvent dayEvent) {
Style s = dayEvent.getElement().getStyle();
- int left = Integer.parseInt(s.getLeft().substring(0,
- s.getLeft().length() - 2));
+ int left = Integer
+ .parseInt(s.getLeft().substring(0, s.getLeft().length() - 2));
DateCell previousParent = (DateCell) dayEvent.getParent();
DateCell newParent = (DateCell) content
.getWidget((left / getDateCellWidth()) + 1);
@@ -490,7 +494,7 @@ public class WeekGrid extends SimplePanel {
/**
* Get width of the single date cell
- *
+ *
* @return Date cell width
*/
public int getDateCellWidth() {
diff --git a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/WeekGridMinuteTimeRange.java b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/WeekGridMinuteTimeRange.java
index 07bcc1e887..fbd616e5f3 100644
--- a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/WeekGridMinuteTimeRange.java
+++ b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/WeekGridMinuteTimeRange.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import java.util.Date;
/**
* Internally used by the calendar
- *
+ *
* @since 7.1
*/
public class WeekGridMinuteTimeRange {
@@ -29,7 +29,7 @@ public class WeekGridMinuteTimeRange {
/**
* Creates a Date time range between start and end date. Drops seconds from
* the range.
- *
+ *
* @param start
* Start time of the range
* @param end
diff --git a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/WeekLabel.java b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/WeekLabel.java
index bb0cf5d1ea..1a4b0d3bf7 100644
--- a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/WeekLabel.java
+++ b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/WeekLabel.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import com.google.gwt.user.client.ui.Label;
/**
* A label in the {@link SimpleWeekToolbar}
- *
+ *
* @since 7.1
*/
public class WeekLabel extends Label {
diff --git a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/WeeklyLongEvents.java b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/WeeklyLongEvents.java
index 9488c8835a..8299f28ea0 100644
--- a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/WeeklyLongEvents.java
+++ b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/WeeklyLongEvents.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,10 +22,10 @@ import com.google.gwt.user.client.ui.HorizontalPanel;
import com.vaadin.client.ui.VCalendar;
/**
- *
+ *
* @since 7.1
* @author Vaadin Ltd.
- *
+ *
*/
public class WeeklyLongEvents extends HorizontalPanel implements HasTooltipKey {
@@ -78,8 +78,8 @@ public class WeeklyLongEvents extends HorizontalPanel implements HasTooltipKey {
Date dcDate = dc.getDate();
int comp = dcDate.compareTo(from);
int comp2 = dcDate.compareTo(to);
- WeeklyLongEventsDateCell eventLabel = dc.getDateCell(calendarEvent
- .getSlotIndex());
+ WeeklyLongEventsDateCell eventLabel = dc
+ .getDateCell(calendarEvent.getSlotIndex());
eventLabel.setStylePrimaryName("v-calendar-event");
if (comp >= 0 && comp2 <= 0) {
eventLabel.setEvent(calendarEvent);
@@ -176,8 +176,8 @@ public class WeeklyLongEvents extends HorizontalPanel implements HasTooltipKey {
dc.setWidth(cellWidth + "px");
} else {
- dc.setWidth(calendar.getWeekGrid().getDateCellWidths()[i]
- + "px");
+ dc.setWidth(
+ calendar.getWeekGrid().getDateCellWidths()[i] + "px");
}
}
}
diff --git a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/WeeklyLongEventsDateCell.java b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/WeeklyLongEventsDateCell.java
index 7d3dc9b89a..a097ab2a6a 100644
--- a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/WeeklyLongEventsDateCell.java
+++ b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/WeeklyLongEventsDateCell.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ import com.vaadin.client.ui.VCalendar;
/**
* Represents a cell used in {@link WeeklyLongEvents}
- *
+ *
* @since 7.1
*/
public class WeeklyLongEventsDateCell extends HTML implements HasTooltipKey {
diff --git a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/dd/CalendarDropHandler.java b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/dd/CalendarDropHandler.java
index 92046f96ec..821370bbce 100644
--- a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/dd/CalendarDropHandler.java
+++ b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/dd/CalendarDropHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,10 +21,10 @@ import com.vaadin.client.ui.dd.VAbstractDropHandler;
/**
* Abstract base class for calendar drop handlers.
- *
+ *
* @since 7.1
* @author Vaadin Ltd.
- *
+ *
*/
public abstract class CalendarDropHandler extends VAbstractDropHandler {
@@ -32,7 +32,7 @@ public abstract class CalendarDropHandler extends VAbstractDropHandler {
/**
* Constructor
- *
+ *
* @param connector
* The connector of the calendar
*/
@@ -42,7 +42,7 @@ public abstract class CalendarDropHandler extends VAbstractDropHandler {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.terminal.gwt.client.ui.dd.VAbstractDropHandler#getConnector()
*/
@@ -53,10 +53,9 @@ public abstract class CalendarDropHandler extends VAbstractDropHandler {
/*
* (non-Javadoc)
- *
- * @see
- * com.vaadin.terminal.gwt.client.ui.dd.VDropHandler#getApplicationConnection
- * ()
+ *
+ * @see com.vaadin.terminal.gwt.client.ui.dd.VDropHandler#
+ * getApplicationConnection ()
*/
@Override
public ApplicationConnection getApplicationConnection() {
diff --git a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/dd/CalendarMonthDropHandler.java b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/dd/CalendarMonthDropHandler.java
index 39e08e9d70..26491d3d01 100644
--- a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/dd/CalendarMonthDropHandler.java
+++ b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/dd/CalendarMonthDropHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,7 +27,7 @@ import com.vaadin.client.ui.dd.VDragEvent;
* Handles DD when the monthly view is showing in the Calendar. In the monthly
* view, drops are only allowed in the the day cells. Only the day index is
* included in the drop details sent to the server.
- *
+ *
* @since 7.1
* @author Vaadin Ltd.
*/
@@ -42,7 +42,7 @@ public class CalendarMonthDropHandler extends CalendarDropHandler {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.terminal.gwt.client.ui.dd.VAbstractDropHandler#dragAccepted
* (com.vaadin.terminal.gwt.client.ui.dd.VDragEvent)
@@ -77,7 +77,7 @@ public class CalendarMonthDropHandler extends CalendarDropHandler {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.terminal.gwt.client.ui.dd.VAbstractDropHandler#dragOver(com
* .vaadin.terminal.gwt.client.ui.dd.VDragEvent)
@@ -96,7 +96,7 @@ public class CalendarMonthDropHandler extends CalendarDropHandler {
/**
* Checks if the one can perform a drop in a element
- *
+ *
* @param elementOver
* The element to check
* @return
@@ -113,7 +113,7 @@ public class CalendarMonthDropHandler extends CalendarDropHandler {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.terminal.gwt.client.ui.dd.VAbstractDropHandler#dragEnter(com
* .vaadin.terminal.gwt.client.ui.dd.VDragEvent)
@@ -125,7 +125,7 @@ public class CalendarMonthDropHandler extends CalendarDropHandler {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.terminal.gwt.client.ui.dd.VAbstractDropHandler#drop(com.vaadin
* .terminal.gwt.client.ui.dd.VDragEvent)
@@ -145,7 +145,7 @@ public class CalendarMonthDropHandler extends CalendarDropHandler {
/**
* Updates the drop details sent to the server
- *
+ *
* @param drag
* The drag event
*/
@@ -158,7 +158,7 @@ public class CalendarMonthDropHandler extends CalendarDropHandler {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.terminal.gwt.client.ui.dd.VAbstractDropHandler#dragLeave(com
* .vaadin.terminal.gwt.client.ui.dd.VDragEvent)
diff --git a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/dd/CalendarWeekDropHandler.java b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/dd/CalendarWeekDropHandler.java
index e0edf21e89..9032321118 100644
--- a/client/src/main/java/com/vaadin/client/ui/calendar/schedule/dd/CalendarWeekDropHandler.java
+++ b/client/src/main/java/com/vaadin/client/ui/calendar/schedule/dd/CalendarWeekDropHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import com.vaadin.client.ui.dd.VDragEvent;
* Handles DD when the weekly view is showing in the Calendar. In the weekly
* view, drops are only allowed in the the time slots for each day. The slot
* index and the day index are included in the drop details sent to the server.
- *
+ *
* @since 7.1
* @author Vaadin Ltd.
*/
@@ -43,7 +43,7 @@ public class CalendarWeekDropHandler extends CalendarDropHandler {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.terminal.gwt.client.ui.dd.VAbstractDropHandler#dragAccepted
* (com.vaadin.terminal.gwt.client.ui.dd.VDragEvent)
@@ -76,7 +76,7 @@ public class CalendarWeekDropHandler extends CalendarDropHandler {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.terminal.gwt.client.ui.dd.VAbstractDropHandler#dragOver(com
* .vaadin.terminal.gwt.client.ui.dd.VDragEvent)
@@ -95,7 +95,7 @@ public class CalendarWeekDropHandler extends CalendarDropHandler {
/**
* Checks if the location is a valid drop location
- *
+ *
* @param elementOver
* The element to check
* @return
@@ -121,12 +121,13 @@ public class CalendarWeekDropHandler extends CalendarDropHandler {
return DOM.isOrHasChild(weekGridElement, elementOver)
&& !DOM.isOrHasChild(timeBarElement, elementOver)
&& todayBarElement != elementOver
- && (WidgetUtil.findWidget(elementOver, DateCellDayEvent.class) == null);
+ && (WidgetUtil.findWidget(elementOver,
+ DateCellDayEvent.class) == null);
}
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.terminal.gwt.client.ui.dd.VAbstractDropHandler#dragEnter(com
* .vaadin.terminal.gwt.client.ui.dd.VDragEvent)
@@ -138,7 +139,7 @@ public class CalendarWeekDropHandler extends CalendarDropHandler {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.terminal.gwt.client.ui.dd.VAbstractDropHandler#drop(com.vaadin
* .terminal.gwt.client.ui.dd.VDragEvent)
@@ -158,7 +159,7 @@ public class CalendarWeekDropHandler extends CalendarDropHandler {
/**
* Update the drop details sent to the server
- *
+ *
* @param drag
* The drag event
*/
@@ -173,7 +174,7 @@ public class CalendarWeekDropHandler extends CalendarDropHandler {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.terminal.gwt.client.ui.dd.VAbstractDropHandler#dragLeave(com
* .vaadin.terminal.gwt.client.ui.dd.VDragEvent)
diff --git a/client/src/main/java/com/vaadin/client/ui/checkbox/CheckBoxConnector.java b/client/src/main/java/com/vaadin/client/ui/checkbox/CheckBoxConnector.java
index 0dc9810c51..2e58124494 100644
--- a/client/src/main/java/com/vaadin/client/ui/checkbox/CheckBoxConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/checkbox/CheckBoxConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -37,8 +37,8 @@ import com.vaadin.shared.ui.checkbox.CheckBoxState;
import com.vaadin.ui.CheckBox;
@Connect(CheckBox.class)
-public class CheckBoxConnector extends AbstractFieldConnector implements
- ClickHandler {
+public class CheckBoxConnector extends AbstractFieldConnector
+ implements ClickHandler {
@Override
public boolean delegateCaptionHandling() {
@@ -76,8 +76,8 @@ public class CheckBoxConnector extends AbstractFieldConnector implements
getWidget().errorIndicatorElement.getStyle().clearDisplay();
}
} else if (getWidget().errorIndicatorElement != null) {
- getWidget().errorIndicatorElement.getStyle().setDisplay(
- Display.NONE);
+ getWidget().errorIndicatorElement.getStyle()
+ .setDisplay(Display.NONE);
getWidget().setAriaInvalid(false);
}
@@ -130,8 +130,8 @@ public class CheckBoxConnector extends AbstractFieldConnector implements
// Add mouse details
MouseEventDetails details = MouseEventDetailsBuilder
- .buildMouseEventDetails(event.getNativeEvent(), getWidget()
- .getElement());
+ .buildMouseEventDetails(event.getNativeEvent(),
+ getWidget().getElement());
getRpcProxy(CheckBoxServerRpc.class).setChecked(getState().checked,
details);
if (getState().immediate) {
diff --git a/client/src/main/java/com/vaadin/client/ui/colorpicker/AbstractColorPickerConnector.java b/client/src/main/java/com/vaadin/client/ui/colorpicker/AbstractColorPickerConnector.java
index cba2a667ca..53cf815323 100644
--- a/client/src/main/java/com/vaadin/client/ui/colorpicker/AbstractColorPickerConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/colorpicker/AbstractColorPickerConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,11 +24,11 @@ import com.vaadin.shared.ui.colorpicker.ColorPickerState;
/**
* An abstract class that defines default implementation for a color picker
* connector.
- *
+ *
* @since 7.0.0
*/
-public abstract class AbstractColorPickerConnector extends
- AbstractComponentConnector implements ClickHandler {
+public abstract class AbstractColorPickerConnector
+ extends AbstractComponentConnector implements ClickHandler {
private static final String DEFAULT_WIDTH_STYLE = "v-default-caption-width";
@@ -49,9 +49,8 @@ public abstract class AbstractColorPickerConnector extends
if (stateChangeEvent.hasPropertyChanged("color")) {
refreshColor();
- if (getState().showDefaultCaption
- && (getState().caption == null || ""
- .equals(getState().caption))) {
+ if (getState().showDefaultCaption && (getState().caption == null
+ || "".equals(getState().caption))) {
setCaption(getState().color);
}
@@ -75,12 +74,12 @@ public abstract class AbstractColorPickerConnector extends
/**
* Get caption for the color picker widget.
- *
+ *
* @return
*/
protected String getCaption() {
- if (getState().showDefaultCaption
- && (getState().caption == null || "".equals(getState().caption))) {
+ if (getState().showDefaultCaption && (getState().caption == null
+ || "".equals(getState().caption))) {
return getState().color;
}
return getState().caption;
@@ -101,7 +100,7 @@ public abstract class AbstractColorPickerConnector extends
/**
* Set caption of the color picker widget.
- *
+ *
* @param caption
*/
protected abstract void setCaption(String caption);
diff --git a/client/src/main/java/com/vaadin/client/ui/colorpicker/ColorPickerAreaConnector.java b/client/src/main/java/com/vaadin/client/ui/colorpicker/ColorPickerAreaConnector.java
index 355e705581..98b6c666ad 100644
--- a/client/src/main/java/com/vaadin/client/ui/colorpicker/ColorPickerAreaConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/colorpicker/ColorPickerAreaConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,14 +30,14 @@ import com.vaadin.ui.ColorPickerArea;
* A class that defines an implementation for a color picker connector. Connects
* the server side {@link com.vaadin.ui.ColorPickerArea} with the client side
* counterpart {@link VColorPickerArea}
- *
+ *
* @since 7.0.0
*/
@Connect(value = ColorPickerArea.class, loadStyle = LoadStyle.LAZY)
public class ColorPickerAreaConnector extends AbstractColorPickerConnector {
- private ColorPickerServerRpc rpc = RpcProxy.create(
- ColorPickerServerRpc.class, this);
+ private ColorPickerServerRpc rpc = RpcProxy
+ .create(ColorPickerServerRpc.class, this);
@Override
protected Widget createWidget() {
diff --git a/client/src/main/java/com/vaadin/client/ui/colorpicker/ColorPickerConnector.java b/client/src/main/java/com/vaadin/client/ui/colorpicker/ColorPickerConnector.java
index 2f0dbd5ce7..9fc25a9e19 100644
--- a/client/src/main/java/com/vaadin/client/ui/colorpicker/ColorPickerConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/colorpicker/ColorPickerConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,14 +29,14 @@ import com.vaadin.ui.ColorPicker;
* A class that defines default implementation for a color picker connector.
* Connects the server side {@link com.vaadin.ui.ColorPicker} with the client
* side counterpart {@link VColorPicker}
- *
+ *
* @since 7.0.0
*/
@Connect(value = ColorPicker.class, loadStyle = LoadStyle.LAZY)
public class ColorPickerConnector extends AbstractColorPickerConnector {
- private ColorPickerServerRpc rpc = RpcProxy.create(
- ColorPickerServerRpc.class, this);
+ private ColorPickerServerRpc rpc = RpcProxy
+ .create(ColorPickerServerRpc.class, this);
@Override
protected Widget createWidget() {
diff --git a/client/src/main/java/com/vaadin/client/ui/colorpicker/ColorPickerGradientConnector.java b/client/src/main/java/com/vaadin/client/ui/colorpicker/ColorPickerGradientConnector.java
index 223675f660..3cff8a4d0d 100644
--- a/client/src/main/java/com/vaadin/client/ui/colorpicker/ColorPickerGradientConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/colorpicker/ColorPickerGradientConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -33,15 +33,15 @@ import com.vaadin.ui.components.colorpicker.ColorPickerGradient;
* connector. Connects the server side
* {@link com.vaadin.ui.components.colorpicker.ColorPickerGradient} with the
* client side counterpart {@link VColorPickerGradient}
- *
+ *
* @since 7.0.0
*/
@Connect(value = ColorPickerGradient.class, loadStyle = LoadStyle.LAZY)
public class ColorPickerGradientConnector extends AbstractComponentConnector
implements MouseUpHandler {
- private ColorPickerGradientServerRpc rpc = RpcProxy.create(
- ColorPickerGradientServerRpc.class, this);
+ private ColorPickerGradientServerRpc rpc = RpcProxy
+ .create(ColorPickerGradientServerRpc.class, this);
@Override
protected Widget createWidget() {
diff --git a/client/src/main/java/com/vaadin/client/ui/colorpicker/ColorPickerGridConnector.java b/client/src/main/java/com/vaadin/client/ui/colorpicker/ColorPickerGridConnector.java
index dc3c3ca790..b13fe8fa0e 100644
--- a/client/src/main/java/com/vaadin/client/ui/colorpicker/ColorPickerGridConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/colorpicker/ColorPickerGridConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -33,15 +33,15 @@ import com.vaadin.ui.components.colorpicker.ColorPickerGrid;
* connector. Connects the server side
* {@link com.vaadin.ui.components.colorpicker.ColorPickerGrid} with the client
* side counterpart {@link VColorPickerGrid}
- *
+ *
* @since 7.0.0
*/
@Connect(value = ColorPickerGrid.class, loadStyle = LoadStyle.LAZY)
public class ColorPickerGridConnector extends AbstractComponentConnector
implements ClickHandler {
- private ColorPickerGridServerRpc rpc = RpcProxy.create(
- ColorPickerGridServerRpc.class, this);
+ private ColorPickerGridServerRpc rpc = RpcProxy
+ .create(ColorPickerGridServerRpc.class, this);
@Override
protected Widget createWidget() {
diff --git a/client/src/main/java/com/vaadin/client/ui/colorpicker/VColorPickerGradient.java b/client/src/main/java/com/vaadin/client/ui/colorpicker/VColorPickerGradient.java
index 70ced91da4..df93d485a6 100644
--- a/client/src/main/java/com/vaadin/client/ui/colorpicker/VColorPickerGradient.java
+++ b/client/src/main/java/com/vaadin/client/ui/colorpicker/VColorPickerGradient.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,9 +29,9 @@ import com.vaadin.client.ui.SubPartAware;
/**
* Client side implementation for ColorPickerGradient.
- *
+ *
* @since 7.0.0
- *
+ *
*/
public class VColorPickerGradient extends FocusPanel implements
MouseDownHandler, MouseUpHandler, MouseMoveHandler, SubPartAware {
@@ -120,7 +120,7 @@ public class VColorPickerGradient extends FocusPanel implements
/**
* Sets the given css color as the background.
- *
+ *
* @param bgColor
*/
protected void setBGColor(String bgColor) {
@@ -161,7 +161,7 @@ public class VColorPickerGradient extends FocusPanel implements
/**
* Sets the latest coordinates for pressed-down mouse cursor and updates the
* cross elements.
- *
+ *
* @param x
* @param y
*/
@@ -190,7 +190,8 @@ public class VColorPickerGradient extends FocusPanel implements
}
@Override
- public com.google.gwt.user.client.Element getSubPartElement(String subPart) {
+ public com.google.gwt.user.client.Element getSubPartElement(
+ String subPart) {
if (subPart.equals(CLICKLAYER_ID)) {
return clicklayer.getElement();
}
@@ -199,7 +200,8 @@ public class VColorPickerGradient extends FocusPanel implements
}
@Override
- public String getSubPartName(com.google.gwt.user.client.Element subElement) {
+ public String getSubPartName(
+ com.google.gwt.user.client.Element subElement) {
if (clicklayer.getElement().isOrHasChild(subElement)) {
return CLICKLAYER_ID;
}
diff --git a/client/src/main/java/com/vaadin/client/ui/colorpicker/VColorPickerGrid.java b/client/src/main/java/com/vaadin/client/ui/colorpicker/VColorPickerGrid.java
index c407bdc5ef..316bfce504 100644
--- a/client/src/main/java/com/vaadin/client/ui/colorpicker/VColorPickerGrid.java
+++ b/client/src/main/java/com/vaadin/client/ui/colorpicker/VColorPickerGrid.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,12 +26,12 @@ import com.google.gwt.user.client.ui.HTMLTable.Cell;
/**
* Client side implementation for ColorPickerGrid.
- *
+ *
* @since 7.0.0
- *
+ *
*/
-public class VColorPickerGrid extends AbsolutePanel implements ClickHandler,
- HasClickHandlers {
+public class VColorPickerGrid extends AbsolutePanel
+ implements ClickHandler, HasClickHandlers {
private int rows = 1;
private int columns = 1;
@@ -54,7 +54,7 @@ public class VColorPickerGrid extends AbsolutePanel implements ClickHandler,
/**
* Creates a grid according to the current row and column count information.
- *
+ *
* @return grid
*/
private Grid createGrid() {
@@ -68,7 +68,7 @@ public class VColorPickerGrid extends AbsolutePanel implements ClickHandler,
/**
* Updates the row and column count and creates a new grid based on them.
* The new grid replaces the old grid if one existed.
- *
+ *
* @param rowCount
* @param columnCount
*/
@@ -83,7 +83,7 @@ public class VColorPickerGrid extends AbsolutePanel implements ClickHandler,
* Updates the changed colors within the grid based on the given x- and
* y-coordinates. Nothing happens if any of the parameters is null or the
* parameter lengths don't match.
- *
+ *
* @param changedColor
* @param changedX
* @param changedY
diff --git a/client/src/main/java/com/vaadin/client/ui/combobox/ComboBoxConnector.java b/client/src/main/java/com/vaadin/client/ui/combobox/ComboBoxConnector.java
index 131485bc7b..7d025f96a6 100644
--- a/client/src/main/java/com/vaadin/client/ui/combobox/ComboBoxConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/combobox/ComboBoxConnector.java
@@ -35,8 +35,8 @@ import com.vaadin.shared.ui.combobox.FilteringMode;
import com.vaadin.ui.ComboBox;
@Connect(ComboBox.class)
-public class ComboBoxConnector extends AbstractFieldConnector implements
- Paintable, SimpleManagedLayout {
+public class ComboBoxConnector extends AbstractFieldConnector
+ implements Paintable, SimpleManagedLayout {
// oldSuggestionTextMatchTheOldSelection is used to detect when it's safe to
// update textbox text by a changed item caption.
@@ -44,7 +44,7 @@ public class ComboBoxConnector extends AbstractFieldConnector implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.Paintable#updateFromUIDL(com.vaadin.client.UIDL,
* com.vaadin.client.ApplicationConnection)
*/
@@ -65,15 +65,16 @@ public class ComboBoxConnector extends AbstractFieldConnector implements
// work without additional UIDL messages
boolean noTextInput = uidl
.hasAttribute(ComboBoxConstants.ATTR_NO_TEXT_INPUT)
- && uidl.getBooleanAttribute(ComboBoxConstants.ATTR_NO_TEXT_INPUT);
+ && uidl.getBooleanAttribute(
+ ComboBoxConstants.ATTR_NO_TEXT_INPUT);
getWidget().setTextInputEnabled(!noTextInput);
// not a FocusWidget -> needs own tabindex handling
getWidget().tb.setTabIndex(getState().tabIndex);
if (uidl.hasAttribute("filteringmode")) {
- getWidget().filteringmode = FilteringMode.valueOf(uidl
- .getStringAttribute("filteringmode"));
+ getWidget().filteringmode = FilteringMode
+ .valueOf(uidl.getStringAttribute("filteringmode"));
}
getWidget().immediate = getState().immediate;
@@ -284,16 +285,16 @@ public class ComboBoxConnector extends AbstractFieldConnector implements
if (!getWidget().waitingForFilteringResponse
|| getWidget().popupOpenerClicked) {
if (!suggestionKey.equals(getWidget().selectedOptionKey)
- || suggestion.getReplacementString().equals(
- getWidget().tb.getText())
+ || suggestion.getReplacementString()
+ .equals(getWidget().tb.getText())
|| oldSuggestionTextMatchTheOldSelection) {
// Update text field if we've got a new
// selection
// Also update if we've got the same text to
// retain old text selection behavior
// OR if selected item caption is changed.
- getWidget().setPromptingOff(
- suggestion.getReplacementString());
+ getWidget()
+ .setPromptingOff(suggestion.getReplacementString());
getWidget().selectedOptionKey = suggestionKey;
}
}
@@ -306,8 +307,8 @@ public class ComboBoxConnector extends AbstractFieldConnector implements
private boolean isWidgetsCurrentSelectionTextInTextBox() {
return getWidget().currentSuggestion != null
- && getWidget().currentSuggestion.getReplacementString().equals(
- getWidget().tb.getText());
+ && getWidget().currentSuggestion.getReplacementString()
+ .equals(getWidget().tb.getText());
}
private void resetSelection() {
@@ -329,13 +330,13 @@ public class ComboBoxConnector extends AbstractFieldConnector implements
// just clear the input if the value has changed from something
// else to null
if (getWidget().selectedOptionKey != null
- || (getWidget().allowNewItem && !getWidget().tb
- .getValue().isEmpty())) {
+ || (getWidget().allowNewItem
+ && !getWidget().tb.getValue().isEmpty())) {
boolean openedPopupWithNonScrollingMode = (getWidget().popupOpenerClicked
&& getWidget().getSelectedCaption() != null);
if (!openedPopupWithNonScrollingMode) {
- getWidget().tb.setValue("");
+ getWidget().tb.setValue("");
} else {
getWidget().tb
.setValue(getWidget().getSelectedCaption());
diff --git a/client/src/main/java/com/vaadin/client/ui/csslayout/CssLayoutConnector.java b/client/src/main/java/com/vaadin/client/ui/csslayout/CssLayoutConnector.java
index 1ec395280d..46df5c183d 100644
--- a/client/src/main/java/com/vaadin/client/ui/csslayout/CssLayoutConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/csslayout/CssLayoutConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -63,7 +63,7 @@ public class CssLayoutConnector extends AbstractLayoutConnector {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.ui.AbstractLayoutConnector#getState()
*/
@Override
@@ -73,7 +73,7 @@ public class CssLayoutConnector extends AbstractLayoutConnector {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.client.ui.AbstractComponentConnector#onStateChanged(com.vaadin
* .client.communication.StateChangeEvent)
@@ -105,15 +105,17 @@ public class CssLayoutConnector extends AbstractLayoutConnector {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.ui.AbstractComponentContainerConnector#
* onConnectorHierarchyChange
* (com.vaadin.client.ConnectorHierarchyChangeEvent)
*/
@Override
- public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent event) {
+ public void onConnectorHierarchyChange(
+ ConnectorHierarchyChangeEvent event) {
Profiler.enter("CssLayoutConnector.onConnectorHierarchyChange");
- Profiler.enter("CssLayoutConnector.onConnectorHierarchyChange add children");
+ Profiler.enter(
+ "CssLayoutConnector.onConnectorHierarchyChange add children");
int index = 0;
for (ComponentConnector child : getChildComponents()) {
VCaption childCaption = childIdToCaption
@@ -123,10 +125,12 @@ public class CssLayoutConnector extends AbstractLayoutConnector {
}
getWidget().addOrMove(child.getWidget(), index++);
}
- Profiler.leave("CssLayoutConnector.onConnectorHierarchyChange add children");
+ Profiler.leave(
+ "CssLayoutConnector.onConnectorHierarchyChange add children");
// Detach old child widgets and possibly their caption
- Profiler.enter("CssLayoutConnector.onConnectorHierarchyChange remove old children");
+ Profiler.enter(
+ "CssLayoutConnector.onConnectorHierarchyChange remove old children");
for (ComponentConnector child : event.getOldChildren()) {
if (child.getParent() == this) {
// Skip current children
@@ -139,13 +143,14 @@ public class CssLayoutConnector extends AbstractLayoutConnector {
getWidget().remove(vCaption);
}
}
- Profiler.leave("CssLayoutConnector.onConnectorHierarchyChange remove old children");
+ Profiler.leave(
+ "CssLayoutConnector.onConnectorHierarchyChange remove old children");
Profiler.leave("CssLayoutConnector.onConnectorHierarchyChange");
}
/**
* Converts a css property string to CamelCase
- *
+ *
* @param cssProperty
* The property string
* @return A string converted to camelcase
@@ -164,7 +169,7 @@ public class CssLayoutConnector extends AbstractLayoutConnector {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.ui.AbstractComponentConnector#getWidget()
*/
@Override
@@ -174,7 +179,7 @@ public class CssLayoutConnector extends AbstractLayoutConnector {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.HasComponentsConnector#updateCaption(com.vaadin
* .client.ComponentConnector)
*/
diff --git a/client/src/main/java/com/vaadin/client/ui/customcomponent/CustomComponentConnector.java b/client/src/main/java/com/vaadin/client/ui/customcomponent/CustomComponentConnector.java
index e981dc13fc..60d3a0dc82 100644
--- a/client/src/main/java/com/vaadin/client/ui/customcomponent/CustomComponentConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/customcomponent/CustomComponentConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -37,7 +37,8 @@ public class CustomComponentConnector extends AbstractHasComponentsConnector {
}
@Override
- public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent event) {
+ public void onConnectorHierarchyChange(
+ ConnectorHierarchyChangeEvent event) {
VCustomComponent customComponent = getWidget();
if (getChildComponents().size() == 1) {
ComponentConnector newChild = getChildComponents().get(0);
diff --git a/client/src/main/java/com/vaadin/client/ui/customfield/CustomFieldConnector.java b/client/src/main/java/com/vaadin/client/ui/customfield/CustomFieldConnector.java
index d18574d010..7260599fe6 100644
--- a/client/src/main/java/com/vaadin/client/ui/customfield/CustomFieldConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/customfield/CustomFieldConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,8 +30,8 @@ import com.vaadin.shared.ui.Connect;
import com.vaadin.ui.CustomField;
@Connect(value = CustomField.class)
-public class CustomFieldConnector extends AbstractFieldConnector implements
- HasComponentsConnector, ConnectorHierarchyChangeHandler {
+public class CustomFieldConnector extends AbstractFieldConnector
+ implements HasComponentsConnector, ConnectorHierarchyChangeHandler {
List<ComponentConnector> childComponents;
@@ -53,14 +53,15 @@ public class CustomFieldConnector extends AbstractFieldConnector implements
}
@Override
- public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent event) {
+ public void onConnectorHierarchyChange(
+ ConnectorHierarchyChangeEvent event) {
// We always have 1 child, unless the child is hidden
getWidget().setWidget(getContentWidget());
}
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.HasComponentsConnector#getChildren()
*/
@Override
@@ -74,7 +75,7 @@ public class CustomFieldConnector extends AbstractFieldConnector implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.HasComponentsConnector#setChildren
* (java.util.Collection)
*/
@@ -86,13 +87,13 @@ public class CustomFieldConnector extends AbstractFieldConnector implements
@Override
public HandlerRegistration addConnectorHierarchyChangeHandler(
ConnectorHierarchyChangeHandler handler) {
- return ensureHandlerManager().addHandler(
- ConnectorHierarchyChangeEvent.TYPE, handler);
+ return ensureHandlerManager()
+ .addHandler(ConnectorHierarchyChangeEvent.TYPE, handler);
}
/**
* Returns the content (only/first child) of the container.
- *
+ *
* @return child connector or null if none (e.g. invisible or not set on
* server)
*/
@@ -107,7 +108,7 @@ public class CustomFieldConnector extends AbstractFieldConnector implements
/**
* Returns the widget (if any) of the content of the container.
- *
+ *
* @return widget of the only/first connector of the container, null if no
* content or if there is no widget for the connector
*/
diff --git a/client/src/main/java/com/vaadin/client/ui/customlayout/CustomLayoutConnector.java b/client/src/main/java/com/vaadin/client/ui/customlayout/CustomLayoutConnector.java
index abbb0ef60b..d24ecf8911 100644
--- a/client/src/main/java/com/vaadin/client/ui/customlayout/CustomLayoutConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/customlayout/CustomLayoutConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -33,8 +33,8 @@ import com.vaadin.shared.ui.customlayout.CustomLayoutState;
import com.vaadin.ui.CustomLayout;
@Connect(CustomLayout.class)
-public class CustomLayoutConnector extends AbstractLayoutConnector implements
- SimpleManagedLayout, Paintable {
+public class CustomLayoutConnector extends AbstractLayoutConnector
+ implements SimpleManagedLayout, Paintable {
private boolean templateUpdated;
@@ -77,8 +77,8 @@ public class CustomLayoutConnector extends AbstractLayoutConnector implements
if (templateName != null) {
// Get the HTML-template from client. Overrides templateContents
// (even though both can never be given at the same time)
- templateContents = getConnection().getResource(
- "layouts/" + templateName + ".html");
+ templateContents = getConnection()
+ .getResource("layouts/" + templateName + ".html");
}
if (templateContents != null) {
@@ -88,21 +88,19 @@ public class CustomLayoutConnector extends AbstractLayoutConnector implements
} else {
// Template missing -> show debug notice and render components in
// order.
- String warning = templateName != null ? "Layout file layouts/"
- + templateName + ".html is missing."
+ String warning = templateName != null
+ ? "Layout file layouts/" + templateName
+ + ".html is missing."
: "Layout file not specified.";
- getWidget()
- .getElement()
- .setInnerHTML(
- "<em>"
- + warning
- + " Components will be drawn for debug purposes.</em>");
+ getWidget().getElement().setInnerHTML("<em>" + warning
+ + " Components will be drawn for debug purposes.</em>");
}
templateUpdated = true;
}
@Override
- public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent event) {
+ public void onConnectorHierarchyChange(
+ ConnectorHierarchyChangeEvent event) {
// Must call here in addition to onStateChanged because
// onConnectorHierarchyChange is invoked before onStateChanged
updateHtmlTemplate();
@@ -113,9 +111,8 @@ public class CustomLayoutConnector extends AbstractLayoutConnector implements
getWidget().setWidget(child.getWidget(), location);
} catch (final IllegalArgumentException e) {
// If no location is found, this component is not visible
- getLogger().warning(
- "Child not rendered as no slot with id '" + location
- + "' has been defined");
+ getLogger().warning("Child not rendered as no slot with id '"
+ + location + "' has been defined");
}
}
for (ComponentConnector oldChild : event.getOldChildren()) {
diff --git a/client/src/main/java/com/vaadin/client/ui/datefield/AbstractDateFieldConnector.java b/client/src/main/java/com/vaadin/client/ui/datefield/AbstractDateFieldConnector.java
index 6d1c9316f6..0b855eb7d2 100644
--- a/client/src/main/java/com/vaadin/client/ui/datefield/AbstractDateFieldConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/datefield/AbstractDateFieldConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -81,19 +81,17 @@ public class AbstractDateFieldConnector extends AbstractFieldConnector
// Remove old stylename that indicates current resolution
setWidgetStyleName(
- getWidget().getStylePrimaryName()
- + "-"
- + VDateField.resolutionToString(getWidget()
- .getCurrentResolution()), false);
+ getWidget().getStylePrimaryName() + "-" + VDateField
+ .resolutionToString(getWidget().getCurrentResolution()),
+ false);
getWidget().setCurrentResolution(newResolution);
// Add stylename that indicates current resolution
setWidgetStyleName(
- getWidget().getStylePrimaryName()
- + "-"
- + VDateField.resolutionToString(getWidget()
- .getCurrentResolution()), true);
+ getWidget().getStylePrimaryName() + "-" + VDateField
+ .resolutionToString(getWidget().getCurrentResolution()),
+ true);
final Resolution resolution = getWidget().getCurrentResolution();
final int year = uidl.getIntVariable("year");
@@ -110,9 +108,8 @@ public class AbstractDateFieldConnector extends AbstractFieldConnector
// Construct new date for this datefield (only if not null)
if (year > -1) {
- getWidget().setCurrentDate(
- new Date((long) getWidget().getTime(year, month, day, hour,
- min, sec, 0)));
+ getWidget().setCurrentDate(new Date((long) getWidget().getTime(year,
+ month, day, hour, min, sec, 0)));
} else {
getWidget().setCurrentDate(null);
}
diff --git a/client/src/main/java/com/vaadin/client/ui/datefield/DateFieldConnector.java b/client/src/main/java/com/vaadin/client/ui/datefield/DateFieldConnector.java
index c6b410fa74..04868c04b9 100644
--- a/client/src/main/java/com/vaadin/client/ui/datefield/DateFieldConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/datefield/DateFieldConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -38,7 +38,7 @@ public class DateFieldConnector extends TextualDateConnector {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.ui.AbstractConnector#init()
*/
@Override
@@ -51,7 +51,7 @@ public class DateFieldConnector extends TextualDateConnector {
* FIXME This is a hack so we do not have to rewrite half of the
* datefield so values are not sent while selecting a date
* (#6252).
- *
+ *
* The datefield will now only set the date UIDL variables while
* the user is selecting year/month/date/time and not send them
* directly. Only when the user closes the popup (by clicking on
@@ -67,7 +67,7 @@ public class DateFieldConnector extends TextualDateConnector {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.ui.VTextualDate#updateFromUIDL(com.vaadin
* .client.UIDL, com.vaadin.client.ApplicationConnection)
*/
@@ -81,20 +81,20 @@ public class DateFieldConnector extends TextualDateConnector {
super.updateFromUIDL(uidl, client);
- getWidget().calendar.setDateTimeService(getWidget()
- .getDateTimeService());
- getWidget().calendar.setShowISOWeekNumbers(getWidget()
- .isShowISOWeekNumbers());
+ getWidget().calendar
+ .setDateTimeService(getWidget().getDateTimeService());
+ getWidget().calendar
+ .setShowISOWeekNumbers(getWidget().isShowISOWeekNumbers());
if (getWidget().calendar.getResolution() != getWidget()
.getCurrentResolution()) {
boolean hasSelectedDate = false;
- getWidget().calendar.setResolution(getWidget()
- .getCurrentResolution());
+ getWidget().calendar
+ .setResolution(getWidget().getCurrentResolution());
if (getWidget().calendar.getDate() != null
&& getWidget().getCurrentDate() != null) {
hasSelectedDate = true;
- getWidget().calendar.setDate((Date) getWidget()
- .getCurrentDate().clone());
+ getWidget().calendar
+ .setDate((Date) getWidget().getCurrentDate().clone());
}
// force re-render when changing resolution only
getWidget().calendar.renderCalendar(hasSelectedDate);
@@ -105,8 +105,8 @@ public class DateFieldConnector extends TextualDateConnector {
getWidget().calendar.renderCalendar();
}
- if (getWidget().getCurrentResolution().getCalendarField() <= Resolution.MONTH
- .getCalendarField()) {
+ if (getWidget().getCurrentResolution()
+ .getCalendarField() <= Resolution.MONTH.getCalendarField()) {
getWidget().calendar
.setFocusChangeListener(new FocusChangeListener() {
@Override
@@ -123,12 +123,13 @@ public class DateFieldConnector extends TextualDateConnector {
getWidget().calendar.setFocusChangeListener(null);
}
- if (getWidget().getCurrentResolution().getCalendarField() > Resolution.DAY
- .getCalendarField()) {
+ if (getWidget().getCurrentResolution()
+ .getCalendarField() > Resolution.DAY.getCalendarField()) {
getWidget().calendar
.setTimeChangeListener(new TimeChangeListener() {
@Override
- public void changed(int hour, int min, int sec, int msec) {
+ public void changed(int hour, int min, int sec,
+ int msec) {
Date d = getWidget().getDate();
if (d == null) {
// date currently null, use the value from
@@ -152,11 +153,11 @@ public class DateFieldConnector extends TextualDateConnector {
}
if (getWidget().isReadonly()) {
- getWidget().calendarToggle.addStyleName(VPopupCalendar.CLASSNAME
- + "-button-readonly");
+ getWidget().calendarToggle.addStyleName(
+ VPopupCalendar.CLASSNAME + "-button-readonly");
} else {
- getWidget().calendarToggle.removeStyleName(VPopupCalendar.CLASSNAME
- + "-button-readonly");
+ getWidget().calendarToggle.removeStyleName(
+ VPopupCalendar.CLASSNAME + "-button-readonly");
}
getWidget().setDescriptionForAssistiveDevices(
@@ -200,18 +201,20 @@ public class DateFieldConnector extends TextualDateConnector {
}
@Override
- protected void setWidgetStyleNameWithPrefix(String prefix,
- String styleName, boolean add) {
+ protected void setWidgetStyleNameWithPrefix(String prefix, String styleName,
+ boolean add) {
super.setWidgetStyleNameWithPrefix(prefix, styleName, add);
// update the style change to popup calendar widget with the correct
// prefix
if (!styleName.startsWith("-")) {
- getWidget().popup.setStyleName(getWidget().getStylePrimaryName()
- + "-popup-" + styleName, add);
+ getWidget().popup.setStyleName(
+ getWidget().getStylePrimaryName() + "-popup-" + styleName,
+ add);
} else {
- getWidget().popup.setStyleName(getWidget().getStylePrimaryName()
- + "-popup" + styleName, add);
+ getWidget().popup.setStyleName(
+ getWidget().getStylePrimaryName() + "-popup" + styleName,
+ add);
}
}
diff --git a/client/src/main/java/com/vaadin/client/ui/datefield/InlineDateFieldConnector.java b/client/src/main/java/com/vaadin/client/ui/datefield/InlineDateFieldConnector.java
index 6321e1c092..eb9b017c91 100644
--- a/client/src/main/java/com/vaadin/client/ui/datefield/InlineDateFieldConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/datefield/InlineDateFieldConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -40,12 +40,12 @@ public class InlineDateFieldConnector extends AbstractDateFieldConnector {
return;
}
- getWidget().calendarPanel.setShowISOWeekNumbers(getWidget()
- .isShowISOWeekNumbers());
- getWidget().calendarPanel.setDateTimeService(getWidget()
- .getDateTimeService());
- getWidget().calendarPanel.setResolution(getWidget()
- .getCurrentResolution());
+ getWidget().calendarPanel
+ .setShowISOWeekNumbers(getWidget().isShowISOWeekNumbers());
+ getWidget().calendarPanel
+ .setDateTimeService(getWidget().getDateTimeService());
+ getWidget().calendarPanel
+ .setResolution(getWidget().getCurrentResolution());
Date currentDate = getWidget().getCurrentDate();
if (currentDate != null) {
getWidget().calendarPanel.setDate(new Date(currentDate.getTime()));
@@ -53,12 +53,13 @@ public class InlineDateFieldConnector extends AbstractDateFieldConnector {
getWidget().calendarPanel.setDate(null);
}
- if (getWidget().getCurrentResolution().getCalendarField() > Resolution.DAY
- .getCalendarField()) {
+ if (getWidget().getCurrentResolution()
+ .getCalendarField() > Resolution.DAY.getCalendarField()) {
getWidget().calendarPanel
.setTimeChangeListener(new TimeChangeListener() {
@Override
- public void changed(int hour, int min, int sec, int msec) {
+ public void changed(int hour, int min, int sec,
+ int msec) {
Date d = getWidget().getDate();
if (d == null) {
// date currently null, use the value from
@@ -79,8 +80,8 @@ public class InlineDateFieldConnector extends AbstractDateFieldConnector {
});
}
- if (getWidget().getCurrentResolution().getCalendarField() <= Resolution.MONTH
- .getCalendarField()) {
+ if (getWidget().getCurrentResolution()
+ .getCalendarField() <= Resolution.MONTH.getCalendarField()) {
getWidget().calendarPanel
.setFocusChangeListener(new FocusChangeListener() {
@Override
diff --git a/client/src/main/java/com/vaadin/client/ui/datefield/TextualDateConnector.java b/client/src/main/java/com/vaadin/client/ui/datefield/TextualDateConnector.java
index 8545c20d7d..b4845a7054 100644
--- a/client/src/main/java/com/vaadin/client/ui/datefield/TextualDateConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/datefield/TextualDateConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/DDEventHandleStrategy.java b/client/src/main/java/com/vaadin/client/ui/dd/DDEventHandleStrategy.java
index 7b3203f330..74bafd098c 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/DDEventHandleStrategy.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/DDEventHandleStrategy.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,9 +27,9 @@ import com.vaadin.client.ui.dd.VDragAndDropManager.DDManagerMediator;
/**
* Strategy to handle native preview events for VDragAndDropManager.
- *
+ *
* The strategy could be overridden via GWT Deferred Binding mechanism.
- *
+ *
* @author Vaadin Ltd
* @since 7.4.4
*/
@@ -37,7 +37,7 @@ public class DDEventHandleStrategy {
/**
* Returns {@code true} if {@code event} interrupts Drag and Drop.
- *
+ *
* @param event
* GWT event to handle
* @param mediator
@@ -58,9 +58,9 @@ public class DDEventHandleStrategy {
/**
* Handles key down {@code event}.
- *
+ *
* Default implementation doesn't do anything.
- *
+ *
* @param event
* key down GWT event
* @param mediator
@@ -73,7 +73,7 @@ public class DDEventHandleStrategy {
/**
* Get target element for {@code event}.
- *
+ *
* @param event
* GWT event to find target
* @param mediator
@@ -113,7 +113,7 @@ public class DDEventHandleStrategy {
* drag image. This value will be passed to the
* {@link #restoreDragImage(String, DDManagerMediator, NativePreviewEvent)}
* method.
- *
+ *
* @param event
* GWT event for active DnD operation
* @param mediator
@@ -139,7 +139,7 @@ public class DDEventHandleStrategy {
/**
* Restores drag image after temporary update by
* {@link #updateDragImage(NativePreviewEvent, DDManagerMediator)}.
- *
+ *
* @param originalImageDisplay
* original "display" CSS style property of drag image element
* @param mediator
@@ -151,8 +151,8 @@ public class DDEventHandleStrategy {
DDManagerMediator mediator, NativePreviewEvent event) {
VDragAndDropManager manager = mediator.getManager();
if (manager.getDragElement() != null) {
- manager.getDragElement().getStyle()
- .setProperty("display", originalImageDisplay);
+ manager.getDragElement().getStyle().setProperty("display",
+ originalImageDisplay);
}
}
@@ -160,9 +160,9 @@ public class DDEventHandleStrategy {
* Handles event when drag image element (
* {@link VDragAndDropManager#getDragElement()} return value) is not null or
* {@code event} is touch event.
- *
+ *
* If method returns {@code true} then event processing will be stoped.
- *
+ *
* @param target
* target element over which DnD event has happened
* @param event
@@ -187,7 +187,8 @@ public class DDEventHandleStrategy {
// ApplicationConnection
// .getConsole()
// .log(
- // "IGNORING proxy image event, fired because of hack or not significant");
+ // "IGNORING proxy image event, fired because of hack or not
+ // significant");
return true;
case Event.ONMOUSEMOVE:
case Event.ONTOUCHMOVE:
@@ -211,7 +212,7 @@ public class DDEventHandleStrategy {
/**
* Handles drag enter on new element.
- *
+ *
* @param mediator
* VDragAndDropManager data accessor
* @param target
@@ -227,7 +228,7 @@ public class DDEventHandleStrategy {
/**
* Handles drag over on element.
- *
+ *
* @param mediator
* VDragAndDropManager data accessor
* @param target
@@ -241,7 +242,7 @@ public class DDEventHandleStrategy {
/**
* Final phase of event handling.
- *
+ *
* @param targetElement
* target element over which DnD event has happened
* @param event
@@ -273,7 +274,7 @@ public class DDEventHandleStrategy {
/**
* Called to handle {@link Event#ONMOUSEMOVE} event.
- *
+ *
* @param target
* target element over which DnD event has happened
* @param event
@@ -292,7 +293,7 @@ public class DDEventHandleStrategy {
/**
* Called to handle {@link Event#ONTOUCHEND} event.
- *
+ *
* @param target
* target element over which DnD event has happened
* @param event
@@ -309,7 +310,7 @@ public class DDEventHandleStrategy {
/**
* Called to handle {@link Event#ONMOUSEUP} event.
- *
+ *
* @param target
* target element over which DnD event has happened
* @param event
@@ -324,7 +325,7 @@ public class DDEventHandleStrategy {
/**
* Called to handle {@link Event#ONMOUSEOUT} event.
- *
+ *
* @param target
* target element over which DnD event has happened
* @param event
@@ -335,8 +336,8 @@ public class DDEventHandleStrategy {
protected void handleMouseOut(Element target, NativePreviewEvent event,
DDManagerMediator mediator) {
VDragAndDropManager manager = mediator.getManager();
- Element relatedTarget = Element.as(event.getNativeEvent()
- .getRelatedEventTarget());
+ Element relatedTarget = Element
+ .as(event.getNativeEvent().getRelatedEventTarget());
VDropHandler newDragHanler = findDragTarget(relatedTarget, mediator);
if (manager.getDragElement() != null
&& manager.getDragElement().isOrHasChild(relatedTarget)) {
@@ -353,7 +354,7 @@ public class DDEventHandleStrategy {
/**
* Handles drag leave on old element.
- *
+ *
* @param mediator
* VDragAndDropManager data accessor
*/
@@ -371,7 +372,7 @@ public class DDEventHandleStrategy {
/**
* Called to handle {@link Event#ONMOUSEOVER} event.
- *
+ *
* @param target
* target element over which DnD event has happened
* @param event
@@ -403,7 +404,7 @@ public class DDEventHandleStrategy {
/**
* Find drag handler for the {@code target} element.
- *
+ *
* @param target
* target element over which DnD event has happened
* @param mediator
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/DDUtil.java b/client/src/main/java/com/vaadin/client/ui/dd/DDUtil.java
index fdccd61767..8d8c44b460 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/DDUtil.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/DDUtil.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/DragAndDropHandler.java b/client/src/main/java/com/vaadin/client/ui/dd/DragAndDropHandler.java
index 63c44f1fd5..82348e4901 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/DragAndDropHandler.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/DragAndDropHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -33,7 +33,7 @@ import com.vaadin.client.widgets.Grid;
* <p>
* The showing of the dragged element, drag hints and reacting to drop/cancel is
* delegated to {@link DragAndDropCallback} implementation.
- *
+ *
* @since 7.5.0
* @author Vaadin Ltd
*/
@@ -46,7 +46,7 @@ public class DragAndDropHandler {
/**
* Called when the drag has started. The drag can be canceled by
* returning {@code false}.
- *
+ *
* @param e
* the original event that started the drag
* @return {@code true} if the drag is OK to start, {@code false} to
@@ -56,7 +56,7 @@ public class DragAndDropHandler {
/**
* Called on drag.
- *
+ *
* @param e
* the event related to the drag
*/
@@ -150,11 +150,11 @@ public class DragAndDropHandler {
/**
* This method can be called to trigger drag and drop on any grid element
* that can be dragged and dropped.
- *
+ *
* @param dragStartingEvent
* the drag triggering event, usually a {@link Event#ONMOUSEDOWN}
* or {@link Event#ONTOUCHSTART} event on the draggable element
- *
+ *
* @param callback
* the callback that will handle actual drag and drop related
* operations
@@ -173,9 +173,8 @@ public class DragAndDropHandler {
@Override
public void onPreviewNativeEvent(NativePreviewEvent event) {
final int typeInt = event.getTypeInt();
- if (typeInt == -1
- && event.getNativeEvent().getType()
- .toLowerCase().contains("pointer")) {
+ if (typeInt == -1 && event.getNativeEvent().getType()
+ .toLowerCase().contains("pointer")) {
/*
* Ignore PointerEvents since IE10 and IE11 send
* also MouseEvents for backwards compatibility.
@@ -196,12 +195,10 @@ public class DragAndDropHandler {
break;
case Event.ONMOUSEMOVE:
case Event.ONTOUCHMOVE:
- int currentX = WidgetUtil
- .getTouchOrMouseClientX(event
- .getNativeEvent());
- int currentY = WidgetUtil
- .getTouchOrMouseClientY(event
- .getNativeEvent());
+ int currentX = WidgetUtil.getTouchOrMouseClientX(
+ event.getNativeEvent());
+ int currentY = WidgetUtil.getTouchOrMouseClientY(
+ event.getNativeEvent());
if (Math.abs(startX - currentX) > 3
|| Math.abs(startY - currentY) > 3) {
removeStartPreviewHandler();
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/DragHandle.java b/client/src/main/java/com/vaadin/client/ui/dd/DragHandle.java
index 77184e14af..a983337c22 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/DragHandle.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/DragHandle.java
@@ -31,7 +31,7 @@ import com.vaadin.client.ui.dd.DragAndDropHandler.DragAndDropCallback;
* view of this component, there really is no use for that). For the more
* general, event-providing interface that this component is based on, see
* {@link DragAndDropHandler}.
- *
+ *
* @since 7.6
*/
public class DragHandle {
@@ -48,7 +48,7 @@ public class DragHandle {
/**
* Called when the drag handle has moved.
- *
+ *
* @param deltaX
* change in X direction since start
* @param deltaY
@@ -80,7 +80,7 @@ public class DragHandle {
/**
* Creates a new DragHandle.
- *
+ *
* @param baseName
* CSS style name to use for this DragHandle element. This
* parameter is supplied to the constructor (rather than added
@@ -158,7 +158,7 @@ public class DragHandle {
/**
* Returns the current parent element for this drag handle. May be null.
- *
+ *
* @return an Element or null
*/
public Element getParent() {
@@ -167,7 +167,7 @@ public class DragHandle {
/**
* Gets the element used as actual drag handle.
- *
+ *
* @return an Element
*/
public Element getElement() {
@@ -176,7 +176,7 @@ public class DragHandle {
/**
* Adds this drag handle to an HTML element.
- *
+ *
* @param elem
* an element
*/
@@ -198,7 +198,7 @@ public class DragHandle {
/**
* Adds CSS style name to the drag handle element.
- *
+ *
* @param styleName
* a CSS style name
*/
@@ -208,7 +208,7 @@ public class DragHandle {
/**
* Removes existing style name from drag handle element.
- *
+ *
* @param styleName
* a CSS style name
*/
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/DragImageModifier.java b/client/src/main/java/com/vaadin/client/ui/dd/DragImageModifier.java
index 45ab5d9bb3..2402d59dd1 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/DragImageModifier.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/DragImageModifier.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ import com.google.gwt.dom.client.Element;
* 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
*/
@@ -32,7 +32,7 @@ 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
*/
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VAbstractDropHandler.java b/client/src/main/java/com/vaadin/client/ui/dd/VAbstractDropHandler.java
index 61708260a1..cdec7d611f 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VAbstractDropHandler.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VAbstractDropHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -33,7 +33,7 @@ public abstract class VAbstractDropHandler implements VDropHandler {
* Implementor/user of {@link VAbstractDropHandler} must pass the UIDL
* painted by {@link AcceptCriterion} to this method. Practically the
* details about {@link AcceptCriterion} are saved.
- *
+ *
* @param uidl
*/
public void updateAcceptRules(UIDL uidl) {
@@ -85,7 +85,7 @@ public abstract class VAbstractDropHandler implements VDropHandler {
* {@link Transferable} and others don't, one should use similar validation
* logic in dragOver method and replace this method with empty
* implementation.
- *
+ *
*/
@Override
public void dragEnter(final VDragEvent drag) {
@@ -103,7 +103,7 @@ public abstract class VAbstractDropHandler implements VDropHandler {
* <p>
* Implementations can set some hints for users here to highlight that the
* drag is on a valid drop location.
- *
+ *
* @param drag
*/
abstract protected void dragAccepted(VDragEvent drag);
@@ -122,7 +122,7 @@ public abstract class VAbstractDropHandler implements VDropHandler {
boolean validated = false;
/**
- * The default implemmentation visits server if {@link AcceptCriterion}
+ * The default implemmentation visits server if {@link AcceptCriterion}
* can't be verified on client or if {@link AcceptCriterion} are met on
* client.
*/
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VAcceptAll.java b/client/src/main/java/com/vaadin/client/ui/dd/VAcceptAll.java
index bb6170da45..38e306598c 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VAcceptAll.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VAcceptAll.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -14,7 +14,7 @@
* the License.
*/
/**
- *
+ *
*/
package com.vaadin.client.ui.dd;
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VAcceptCallback.java b/client/src/main/java/com/vaadin/client/ui/dd/VAcceptCallback.java
index 706abb0e05..583c1bed1f 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VAcceptCallback.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VAcceptCallback.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VAcceptCriteria.java b/client/src/main/java/com/vaadin/client/ui/dd/VAcceptCriteria.java
index 4bf23cbe7f..e5e59290de 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VAcceptCriteria.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VAcceptCriteria.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VAcceptCriterion.java b/client/src/main/java/com/vaadin/client/ui/dd/VAcceptCriterion.java
index 5205b9182b..711e030c6c 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VAcceptCriterion.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VAcceptCriterion.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ public abstract class VAcceptCriterion {
/**
* Checks if current drag event has valid drop target and target accepts the
* transferable. If drop target is valid, callback is used.
- *
+ *
* @param drag
* @param configuration
* @param callback
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VAcceptCriterionFactory.java b/client/src/main/java/com/vaadin/client/ui/dd/VAcceptCriterionFactory.java
index 1503b1f84d..5d0267b99f 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VAcceptCriterionFactory.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VAcceptCriterionFactory.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VAnd.java b/client/src/main/java/com/vaadin/client/ui/dd/VAnd.java
index ee4bc94f9e..2b448e3ed4 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VAnd.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VAnd.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -14,7 +14,7 @@
* the License.
*/
/**
- *
+ *
*/
package com.vaadin.client.ui.dd;
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VContainsDataFlavor.java b/client/src/main/java/com/vaadin/client/ui/dd/VContainsDataFlavor.java
index 2ad375fd77..cadfb79c20 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VContainsDataFlavor.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VContainsDataFlavor.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -14,7 +14,7 @@
* the License.
*/
/**
- *
+ *
*/
package com.vaadin.client.ui.dd;
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VDragAndDropManager.java b/client/src/main/java/com/vaadin/client/ui/dd/VDragAndDropManager.java
index 109b69f0c4..a3e3e9bcf1 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VDragAndDropManager.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VDragAndDropManager.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -52,7 +52,7 @@ import com.vaadin.shared.ui.dd.DragEventType;
* <p>
* Singleton. Only one drag and drop operation can be active anyways. Use
* {@link #get()} to get instance.
- *
+ *
* TODO cancel drag and drop if more than one touches !?
*/
public class VDragAndDropManager {
@@ -63,7 +63,7 @@ public class VDragAndDropManager {
* Implementation if this interface is provided as a parameter to
* DDEventHandleStrategy methods. The mediator instance allows to manage
* DnD.
- *
+ *
* @since 7.4.4
*/
public interface DDManagerMediator {
@@ -83,8 +83,8 @@ public class VDragAndDropManager {
void clearServerCallback();
}
- private final class DefaultDragAndDropEventHandler implements
- NativePreviewHandler {
+ private final class DefaultDragAndDropEventHandler
+ implements NativePreviewHandler {
@Override
public void onPreviewNativeEvent(NativePreviewEvent event) {
@@ -110,8 +110,8 @@ public class VDragAndDropManager {
String display = getEventHandleStrategy().updateDragImage(event,
managerMediator);
- Element targetElement = getEventHandleStrategy().getTargetElement(
- event, managerMediator);
+ Element targetElement = getEventHandleStrategy()
+ .getTargetElement(event, managerMediator);
try {
if (handleDragImage(targetElement, event)) {
@@ -130,7 +130,8 @@ public class VDragAndDropManager {
managerMediator);
}
- private boolean handleDragImage(Element target, NativePreviewEvent event) {
+ private boolean handleDragImage(Element target,
+ NativePreviewEvent event) {
if (!WidgetUtil.isTouchEvent(event.getNativeEvent())
&& getDragElement() == null) {
return false;
@@ -198,7 +199,7 @@ public class VDragAndDropManager {
* If drag and drop operation is not handled by {@link VDragAndDropManager}s
* internal handler, this can be used to update current {@link VDropHandler}
* .
- *
+ *
* @param currentDropHandler
*/
public void setCurrentDropHandler(VDropHandler currentDropHandler) {
@@ -241,7 +242,7 @@ public class VDragAndDropManager {
* May also be used to control the drag and drop operation. If this option
* is used, {@link VDropHandler} is searched on mouse events and appropriate
* methods on it called automatically.
- *
+ *
* @param transferable
* @param nativeEvent
* @param handleDragEvents
@@ -265,8 +266,8 @@ public class VDragAndDropManager {
addActiveDragSourceStyleName();
VDropHandler dh = null;
if (startEvent != null) {
- dh = findDragTarget(Element.as(currentDrag
- .getCurrentGwtEvent().getEventTarget()));
+ dh = findDragTarget(Element.as(
+ currentDrag.getCurrentGwtEvent().getEventTarget()));
}
if (dh != null) {
// drag has started on a DropHandler, kind of drag over
@@ -276,8 +277,8 @@ public class VDragAndDropManager {
}
if (handleDragEvents) {
- handlerRegistration = Event
- .addNativePreviewHandler(defaultDragAndDropEventHandler);
+ handlerRegistration = Event.addNativePreviewHandler(
+ defaultDragAndDropEventHandler);
if (dragElement != null
&& dragElement.getParentElement() == null) {
attachDragElement();
@@ -290,32 +291,30 @@ public class VDragAndDropManager {
private void addActiveDragSourceStyleName() {
ComponentConnector dragSource = currentDrag.getTransferable()
.getDragSource();
- dragSource.getWidget().addStyleName(
- ACTIVE_DRAG_SOURCE_STYLENAME);
+ dragSource.getWidget()
+ .addStyleName(ACTIVE_DRAG_SOURCE_STYLENAME);
}
};
final int eventType = Event.as(startEvent).getTypeInt();
- if (handleDragEvents
- && (eventType == Event.ONMOUSEDOWN || eventType == Event.ONTOUCHSTART)) {
+ if (handleDragEvents && (eventType == Event.ONMOUSEDOWN
+ || eventType == Event.ONTOUCHSTART)) {
// only really start drag event on mousemove
deferredStartRegistration = Event
.addNativePreviewHandler(new NativePreviewHandler() {
- private int startX = WidgetUtil
- .getTouchOrMouseClientX(currentDrag
- .getCurrentGwtEvent());
- private int startY = WidgetUtil
- .getTouchOrMouseClientY(currentDrag
- .getCurrentGwtEvent());
+ private int startX = WidgetUtil.getTouchOrMouseClientX(
+ currentDrag.getCurrentGwtEvent());
+ private int startY = WidgetUtil.getTouchOrMouseClientY(
+ currentDrag.getCurrentGwtEvent());
@Override
public void onPreviewNativeEvent(
NativePreviewEvent event) {
int typeInt = event.getTypeInt();
- if (typeInt == -1
- && event.getNativeEvent().getType()
- .toLowerCase().contains("pointer")) {
+ if (typeInt == -1 && event.getNativeEvent()
+ .getType().toLowerCase()
+ .contains("pointer")) {
/*
* Ignore PointerEvents since IE10 and IE11 send
* also MouseEvents for backwards compatibility.
@@ -332,8 +331,8 @@ public class VDragAndDropManager {
.getNativeEvent()
.getCurrentEventTarget();
if (Node.is(currentEventTarget)
- && !dragElement.isOrHasChild(Node
- .as(currentEventTarget))) {
+ && !dragElement.isOrHasChild(
+ Node.as(currentEventTarget))) {
// drag image appeared below, ignore
break;
}
@@ -353,24 +352,26 @@ public class VDragAndDropManager {
.getNativeEvent()
.getRelatedEventTarget();
if (Node.is(relatedEventTarget)
- && !dragElement.isOrHasChild(Node
- .as(relatedEventTarget))) {
+ && !dragElement.isOrHasChild(
+ Node.as(relatedEventTarget))) {
// drag image appeared below, ignore
break;
}
case Event.ONMOUSEMOVE:
case Event.ONTOUCHMOVE:
int currentX = WidgetUtil
- .getTouchOrMouseClientX(event
- .getNativeEvent());
+ .getTouchOrMouseClientX(
+ event.getNativeEvent());
int currentY = WidgetUtil
- .getTouchOrMouseClientY(event
- .getNativeEvent());
- if (Math.abs(startX - currentX) > MINIMUM_DISTANCE_TO_START_DRAG
- || Math.abs(startY - currentY) > MINIMUM_DISTANCE_TO_START_DRAG) {
+ .getTouchOrMouseClientY(
+ event.getNativeEvent());
+ if (Math.abs(
+ startX - currentX) > MINIMUM_DISTANCE_TO_START_DRAG
+ || Math.abs(startY
+ - currentY) > MINIMUM_DISTANCE_TO_START_DRAG) {
ensureDeferredRegistrationCleanup();
- currentDrag.setCurrentGwtEvent(event
- .getNativeEvent());
+ currentDrag.setCurrentGwtEvent(
+ event.getNativeEvent());
startDrag.execute();
}
break;
@@ -405,7 +406,7 @@ public class VDragAndDropManager {
/**
* First seeks the widget from this element, then iterates widgets until one
* implement HasDropHandler. Returns DropHandler from that.
- *
+ *
* @param element
* @return
*/
@@ -488,8 +489,7 @@ public class VDragAndDropManager {
Scheduler.get().scheduleFixedDelay(new RepeatingCommand() {
@Override
public boolean execute() {
- if (!client.getMessageSender()
- .hasActiveRequest()) {
+ if (!client.getMessageSender().hasActiveRequest()) {
removeActiveDragSourceStyleName(dragSource);
return false;
}
@@ -514,8 +514,8 @@ public class VDragAndDropManager {
* the server visit is done.
*/
if (!sendTransferableToServer && currentDrag != null) {
- removeActiveDragSourceStyleName(currentDrag.getTransferable()
- .getDragSource());
+ removeActiveDragSourceStyleName(
+ currentDrag.getTransferable().getDragSource());
}
currentDrag = null;
@@ -541,7 +541,8 @@ public class VDragAndDropManager {
}
}
- private void removeActiveDragSourceStyleName(ComponentConnector dragSource) {
+ private void removeActiveDragSourceStyleName(
+ ComponentConnector dragSource) {
dragSource.getWidget().removeStyleName(ACTIVE_DRAG_SOURCE_STYLENAME);
}
@@ -560,11 +561,11 @@ public class VDragAndDropManager {
/**
* Visits server during drag and drop procedure. Transferable and event type
* is given to server side counterpart of DropHandler.
- *
+ *
* If another server visit is started before the current is received, the
* current is just dropped. TODO consider if callback should have
* interrupted() method for cleanup.
- *
+ *
* @param acceptCallback
*/
public void visitServer(VDragEventServerCallback acceptCallback) {
@@ -583,9 +584,9 @@ public class VDragAndDropManager {
* For drag events we are using special id that are routed to
* "drag service" which then again finds the corresponding DropHandler
* on server side.
- *
+ *
* TODO add rest of the data in Transferable
- *
+ *
* TODO implement partial updates to Transferable (currently the whole
* Transferable is sent on each request)
*/
@@ -608,8 +609,8 @@ public class VDragAndDropManager {
if (currentDrag.getCurrentGwtEvent() != null) {
try {
MouseEventDetails mouseEventDetails = MouseEventDetailsBuilder
- .buildMouseEventDetails(currentDrag
- .getCurrentGwtEvent());
+ .buildMouseEventDetails(
+ currentDrag.getCurrentGwtEvent());
currentDrag.getDropDetails().put("mouseEvent",
mouseEventDetails.serialize());
} catch (Exception e) {
@@ -648,10 +649,10 @@ public class VDragAndDropManager {
/**
* Returns DnD strategy to handle native preview events used by the manager.
- *
+ *
* Subclasses can override this method to return custom strategy or use GWT
* deferred binding.
- *
+ *
* @return internal DnD native preview event handler
*/
protected DDEventHandleStrategy getEventHandleStrategy() {
@@ -700,7 +701,8 @@ public class VDragAndDropManager {
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");
+ 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);
@@ -731,7 +733,7 @@ public class VDragAndDropManager {
/**
* Method to que tasks until all dd related server visits are done
- *
+ *
* @param command
*/
private void defer(Command command) {
@@ -747,7 +749,7 @@ public class VDragAndDropManager {
* <p>
* TODO Optimization: consider if we actually only need to keep the last
* command in queue here.
- *
+ *
* @param command
*/
public void executeWhenReady(Command command) {
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VDragEvent.java b/client/src/main/java/com/vaadin/client/ui/dd/VDragEvent.java
index c889dbf34e..210e956825 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VDragEvent.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VDragEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -35,8 +35,8 @@ import com.vaadin.client.WidgetUtil;
/**
* DragEvent used by Vaadin client side engine. Supports components, items,
* properties and custom payload (HTML5 style).
- *
- *
+ *
+ *
*/
public class VDragEvent {
@@ -70,7 +70,7 @@ public class VDragEvent {
* Returns the the latest {@link NativeEvent} that relates to this drag and
* drop operation. For example on {@link VDropHandler#dragEnter(VDragEvent)}
* this is commonly a {@link MouseOverEvent}.
- *
+ *
* @return
*/
public NativeEvent getCurrentGwtEvent() {
@@ -95,7 +95,7 @@ public class VDragEvent {
* the pointer currently is (drag image excluded). {@link VDropHandler}s can
* then more easily react properly on drag events by reading the element via
* this method.
- *
+ *
* @return the element in {@link VDropHandler} on which mouse cursor is on
*/
public com.google.gwt.user.client.Element getElementOver() {
@@ -112,7 +112,8 @@ public class VDragEvent {
* instead
*/
@Deprecated
- public void setElementOver(com.google.gwt.user.client.Element targetElement) {
+ public void setElementOver(
+ com.google.gwt.user.client.Element targetElement) {
elementOver = targetElement;
}
@@ -129,13 +130,13 @@ public class VDragEvent {
* <p>
* The element to be used as drag image will automatically get CSS style
* name "v-drag-element".
- *
+ *
* TODO decide if this method should be here or in {@link VTransferable} (in
* HTML5 it is in DataTransfer) or {@link VDragAndDropManager}
- *
+ *
* TODO should be possible to override behavior. Like to proxy the element
* to HTML5 DataTransfer
- *
+ *
* @param node
* @deprecated As of 7.2, call or override {@link #setDragImage(Element)}
* instead
@@ -151,15 +152,15 @@ public class VDragEvent {
* <p>
* The element to be used as drag image will automatically get CSS style
* name "v-drag-element".
- *
+ *
* TODO decide if this method should be here or in {@link VTransferable} (in
* HTML5 it is in DataTransfer) or {@link VDragAndDropManager}
- *
+ *
* TODO should be possible to override behavior. Like to proxy the element
* to HTML5 DataTransfer
- *
+ *
* @param node
- *
+ *
* @since 7.2
*/
public void setDragImage(Element node) {
@@ -168,9 +169,9 @@ public class VDragEvent {
/**
* TODO consider using similar smaller (than map) api as in Transferable
- *
+ *
* TODO clean up when drop handler changes
- *
+ *
* @return
*/
public Map<String, Object> getDropDetails() {
@@ -183,7 +184,7 @@ public class VDragEvent {
* <p>
* The element to be used as drag image will automatically get CSS style
* name "v-drag-element".
- *
+ *
* @param element
* the dom element to be positioned next to mouse cursor
* @param offsetX
@@ -208,14 +209,14 @@ public class VDragEvent {
* <p>
* The element to be used as drag image will automatically get CSS style
* name "v-drag-element".
- *
+ *
* @param element
* the dom element to be positioned next to mouse cursor
* @param offsetX
* the horizontal offset of drag image from mouse cursor
* @param offsetY
* the vertical offset of drag image from mouse cursor
- *
+ *
* @since 7.2
*/
public void setDragImage(Element element, int offsetX, int offsetY) {
@@ -232,7 +233,7 @@ public class VDragEvent {
/**
* Automatically tries to create a proxy image from given element.
- *
+ *
* @param element
* @param alignImageToEvent
* if true, proxy image is aligned to start event, else next to
@@ -275,7 +276,7 @@ public class VDragEvent {
/**
* Automatically tries to create a proxy image from given element.
- *
+ *
* @param element
* @param alignImageToEvent
* if true, proxy image is aligned to start event, else next to
@@ -289,7 +290,7 @@ public class VDragEvent {
/**
* Do additional content sync between <code>original</code> element and its
* <code>copy</code> if needed.
- *
+ *
* @since 7.2
* @param original
* original element
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VDragEventServerCallback.java b/client/src/main/java/com/vaadin/client/ui/dd/VDragEventServerCallback.java
index ba2d0f789b..bc6e325bce 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VDragEventServerCallback.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VDragEventServerCallback.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VDragSourceIs.java b/client/src/main/java/com/vaadin/client/ui/dd/VDragSourceIs.java
index 8a8d1d7bb9..26b21a2146 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VDragSourceIs.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VDragSourceIs.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.shared.ui.dd.AcceptCriterion;
/**
* TODO Javadoc!
- *
+ *
* @since 6.3
*/
@AcceptCriterion(SourceIs.class)
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VDropHandler.java b/client/src/main/java/com/vaadin/client/ui/dd/VDropHandler.java
index 96059883e7..b6fb6b370b 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VDropHandler.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VDropHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,7 +27,7 @@ public interface VDropHandler {
/**
* Called by DragAndDropManager when a drag operation is in progress and the
* cursor enters the area occupied by this Paintable.
- *
+ *
* @param dragEvent
* DragEvent which contains the transferable and other
* information for the operation
@@ -37,7 +37,7 @@ public interface VDropHandler {
/**
* Called by DragAndDropManager when a drag operation is in progress and the
* cursor leaves the area occupied by this Paintable.
- *
+ *
* @param dragEvent
* DragEvent which contains the transferable and other
* information for the operation
@@ -47,12 +47,12 @@ public interface VDropHandler {
/**
* Called by DragAndDropManager when a drag operation was in progress and a
* drop was performed on this Paintable.
- *
- *
+ *
+ *
* @param dragEvent
* DragEvent which contains the transferable and other
* information for the operation
- *
+ *
* @return true if the Tranferrable of this drag event needs to be sent to
* the server, false if drop is rejected or no server side event
* should be sent
@@ -61,11 +61,11 @@ public interface VDropHandler {
/**
* When drag is over current drag handler.
- *
+ *
* With drag implementation by {@link VDragAndDropManager} will be called
* when mouse is moved. HTML5 implementations call this continuously even
* though mouse is not moved.
- *
+ *
* @param currentDrag
*/
public void dragOver(VDragEvent currentDrag);
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VHasDropHandler.java b/client/src/main/java/com/vaadin/client/ui/dd/VHasDropHandler.java
index 4d82c5c9cf..05c6649e80 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VHasDropHandler.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VHasDropHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,10 +19,10 @@ import com.vaadin.client.ComponentConnector;
/**
* Used to detect Widget from widget tree that has {@link #getDropHandler()}
- *
+ *
* Decide whether to get rid of this class. If so, {@link VAbstractDropHandler}
* must extend {@link ComponentConnector}.
- *
+ *
*/
public interface VHasDropHandler {
public VDropHandler getDropHandler();
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VHtml5DragEvent.java b/client/src/main/java/com/vaadin/client/ui/dd/VHtml5DragEvent.java
index 672eac9e06..785d24af74 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VHtml5DragEvent.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VHtml5DragEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import com.google.gwt.dom.client.NativeEvent;
/**
* Helper class to access html5 style drag events.
- *
+ *
* TODO Gears support ?
*/
public class VHtml5DragEvent extends NativeEvent {
@@ -41,7 +41,7 @@ public class VHtml5DragEvent extends NativeEvent {
/**
* Works on FF 3.6 and possibly with gears.
- *
+ *
* @param index
* @return
*/
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VHtml5File.java b/client/src/main/java/com/vaadin/client/ui/dd/VHtml5File.java
index 6022835343..dac5d9a961 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VHtml5File.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VHtml5File.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VIsOverId.java b/client/src/main/java/com/vaadin/client/ui/dd/VIsOverId.java
index 8e8abf1a97..d3fb378b16 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VIsOverId.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VIsOverId.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -14,7 +14,7 @@
* the License.
*/
/**
- *
+ *
*/
package com.vaadin.client.ui.dd;
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VItemIdIs.java b/client/src/main/java/com/vaadin/client/ui/dd/VItemIdIs.java
index 4bfc71ab14..22ec05448d 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VItemIdIs.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VItemIdIs.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -14,7 +14,7 @@
* the License.
*/
/**
- *
+ *
*/
package com.vaadin.client.ui.dd;
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VLazyInitItemIdentifiers.java b/client/src/main/java/com/vaadin/client/ui/dd/VLazyInitItemIdentifiers.java
index f67174c1c1..270b7580e9 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VLazyInitItemIdentifiers.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VLazyInitItemIdentifiers.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -14,7 +14,7 @@
* the License.
*/
/**
- *
+ *
*/
package com.vaadin.client.ui.dd;
@@ -26,7 +26,7 @@ import com.vaadin.ui.Table;
import com.vaadin.ui.Tree;
/**
- *
+ *
*/
public class VLazyInitItemIdentifiers extends VAcceptCriterion {
private boolean loaded = false;
@@ -34,14 +34,14 @@ public class VLazyInitItemIdentifiers extends VAcceptCriterion {
private VDragEvent lastDragEvent;
@AcceptCriterion(Table.TableDropCriterion.class)
- final public static class VTableLazyInitItemIdentifiers extends
- VLazyInitItemIdentifiers {
+ final public static class VTableLazyInitItemIdentifiers
+ extends VLazyInitItemIdentifiers {
// all logic in superclass
}
@AcceptCriterion(Tree.TreeDropCriterion.class)
- final public static class VTreeLazyInitItemIdentifiers extends
- VLazyInitItemIdentifiers {
+ final public static class VTreeLazyInitItemIdentifiers
+ extends VLazyInitItemIdentifiers {
// all logic in superclass
}
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VNot.java b/client/src/main/java/com/vaadin/client/ui/dd/VNot.java
index 3e931f9580..92b2de7eea 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VNot.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VNot.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -14,7 +14,7 @@
* the License.
*/
/**
- *
+ *
*/
package com.vaadin.client.ui.dd;
@@ -25,7 +25,7 @@ import com.vaadin.shared.ui.dd.AcceptCriterion;
/**
* TODO implementation could now be simplified/optimized
- *
+ *
*/
@AcceptCriterion(Not.class)
final public class VNot extends VAcceptCriterion {
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VOr.java b/client/src/main/java/com/vaadin/client/ui/dd/VOr.java
index e189e22b45..98e6a08b94 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VOr.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VOr.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -14,7 +14,7 @@
* the License.
*/
/**
- *
+ *
*/
package com.vaadin.client.ui.dd;
@@ -23,7 +23,7 @@ import com.vaadin.event.dd.acceptcriteria.Or;
import com.vaadin.shared.ui.dd.AcceptCriterion;
/**
- *
+ *
*/
@AcceptCriterion(Or.class)
final public class VOr extends VAcceptCriterion implements VAcceptCallback {
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VOverTreeNode.java b/client/src/main/java/com/vaadin/client/ui/dd/VOverTreeNode.java
index c7c00a6bee..a8bac3e5a7 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VOverTreeNode.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VOverTreeNode.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -14,7 +14,7 @@
* the License.
*/
/**
- *
+ *
*/
package com.vaadin.client.ui.dd;
@@ -24,8 +24,8 @@ final public class VOverTreeNode extends VAcceptCriterion {
@Override
protected boolean accept(VDragEvent drag, UIDL configuration) {
- Boolean containsKey = (Boolean) drag.getDropDetails().get(
- "itemIdOverIsNode");
+ Boolean containsKey = (Boolean) drag.getDropDetails()
+ .get("itemIdOverIsNode");
return containsKey != null && containsKey.booleanValue();
}
}
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VServerAccept.java b/client/src/main/java/com/vaadin/client/ui/dd/VServerAccept.java
index 9ead6298b0..291e22e950 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VServerAccept.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VServerAccept.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -14,7 +14,7 @@
* the License.
*/
/**
- *
+ *
*/
package com.vaadin.client.ui.dd;
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VSourceIsTarget.java b/client/src/main/java/com/vaadin/client/ui/dd/VSourceIsTarget.java
index 3e453b4105..01d8fc2c6f 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VSourceIsTarget.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VSourceIsTarget.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -14,7 +14,7 @@
* the License.
*/
/**
- *
+ *
*/
package com.vaadin.client.ui.dd;
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VTargetDetailIs.java b/client/src/main/java/com/vaadin/client/ui/dd/VTargetDetailIs.java
index 9084d7df89..1ced0afc3c 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VTargetDetailIs.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VTargetDetailIs.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -14,7 +14,7 @@
* the License.
*/
/**
- *
+ *
*/
package com.vaadin.client.ui.dd;
@@ -28,8 +28,8 @@ final public class VTargetDetailIs extends VAcceptCriterion {
@Override
protected boolean accept(VDragEvent drag, UIDL configuration) {
String name = configuration.getStringAttribute("p");
- String t = configuration.hasAttribute("t") ? configuration
- .getStringAttribute("t").intern() : "s";
+ String t = configuration.hasAttribute("t")
+ ? configuration.getStringAttribute("t").intern() : "s";
Object value = null;
if (t == "s") {
value = configuration.getStringAttribute("v");
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VTargetInSubtree.java b/client/src/main/java/com/vaadin/client/ui/dd/VTargetInSubtree.java
index 1641eb30f1..489a489196 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VTargetInSubtree.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VTargetInSubtree.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -14,7 +14,7 @@
* the License.
*/
/**
- *
+ *
*/
package com.vaadin.client.ui.dd;
@@ -33,8 +33,8 @@ final public class VTargetInSubtree extends VAcceptCriterion {
VTree tree = (VTree) VDragAndDropManager.get().getCurrentDropHandler()
.getConnector().getWidget();
- TreeNode treeNode = tree.getNodeByKey((String) drag.getDropDetails()
- .get("itemIdOver"));
+ TreeNode treeNode = tree
+ .getNodeByKey((String) drag.getDropDetails().get("itemIdOver"));
if (treeNode != null) {
Widget parent2 = treeNode;
int depth = configuration.getIntAttribute("depth");
diff --git a/client/src/main/java/com/vaadin/client/ui/dd/VTransferable.java b/client/src/main/java/com/vaadin/client/ui/dd/VTransferable.java
index b03dcbcb35..479cadb159 100644
--- a/client/src/main/java/com/vaadin/client/ui/dd/VTransferable.java
+++ b/client/src/main/java/com/vaadin/client/ui/dd/VTransferable.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.event.dd.DragSource;
/**
* Client side counterpart for Transferable in com.vaadin.event.Transferable
- *
+ *
*/
public class VTransferable {
@@ -35,7 +35,7 @@ public class VTransferable {
/**
* Returns the component from which the transferable is created (eg. a tree
* which node is dragged).
- *
+ *
* @return the component
*/
public ComponentConnector getDragSource() {
@@ -49,7 +49,7 @@ public class VTransferable {
* The server side counterpart of the component may implement
* {@link DragSource} interface if it wants to translate or complement the
* server side instance of this Transferable.
- *
+ *
* @param component
* the component to set
*/
@@ -71,7 +71,7 @@ public class VTransferable {
/**
* This helper method should only be called by {@link VDragAndDropManager}.
- *
+ *
* @return data in this Transferable that needs to be moved to server.
*/
Map<String, Object> getVariableMap() {
diff --git a/client/src/main/java/com/vaadin/client/ui/draganddropwrapper/DragAndDropWrapperConnector.java b/client/src/main/java/com/vaadin/client/ui/draganddropwrapper/DragAndDropWrapperConnector.java
index 7ea9596809..f11b4a8b2d 100644
--- a/client/src/main/java/com/vaadin/client/ui/draganddropwrapper/DragAndDropWrapperConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/draganddropwrapper/DragAndDropWrapperConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -78,11 +78,13 @@ public class DragAndDropWrapperConnector extends CustomComponentConnector
&& !receiverUrl
.equals(getWidget().fileIdToReceiver
.get(fileId))) {
- VConsole.error("Overwriting file receiver mapping for fileId "
- + fileId
- + " . Old receiver URL: "
- + getWidget().fileIdToReceiver.get(fileId)
- + " New receiver URL: " + receiverUrl);
+ VConsole.error(
+ "Overwriting file receiver mapping for fileId "
+ + fileId + " . Old receiver URL: "
+ + getWidget().fileIdToReceiver
+ .get(fileId)
+ + " New receiver URL: "
+ + receiverUrl);
}
getWidget().fileIdToReceiver.put(fileId, receiverUrl);
}
@@ -90,11 +92,11 @@ public class DragAndDropWrapperConnector extends CustomComponentConnector
}
getWidget().startNextUpload();
- getWidget().dragStartMode = uidl
- .getIntAttribute(DragAndDropWrapperConstants.DRAG_START_MODE);
+ getWidget().dragStartMode = uidl.getIntAttribute(
+ DragAndDropWrapperConstants.DRAG_START_MODE);
- String dragImageComponentConnectorId = uidl
- .getStringAttribute(DragAndDropWrapperConstants.DRAG_START_COMPONENT_ATTRIBUTE);
+ String dragImageComponentConnectorId = uidl.getStringAttribute(
+ DragAndDropWrapperConstants.DRAG_START_COMPONENT_ATTRIBUTE);
ComponentConnector connector = null;
if (dragImageComponentConnectorId != null) {
@@ -102,8 +104,7 @@ public class DragAndDropWrapperConnector extends CustomComponentConnector
.getConnector(dragImageComponentConnectorId);
if (connector == null) {
- getLogger().log(
- Level.WARNING,
+ getLogger().log(Level.WARNING,
"DragAndDropWrapper drag image component"
+ " connector now found. Make sure the"
+ " component is attached.");
@@ -112,8 +113,8 @@ public class DragAndDropWrapperConnector extends CustomComponentConnector
}
}
getWidget().initDragStartMode();
- getWidget().html5DataFlavors = uidl
- .getMapAttribute(DragAndDropWrapperConstants.HTML5_DATA_FLAVORS);
+ getWidget().html5DataFlavors = uidl.getMapAttribute(
+ DragAndDropWrapperConstants.HTML5_DATA_FLAVORS);
// Used to prevent wrapper from stealing tooltips when not defined
getWidget().hasTooltip = getState().description != null;
diff --git a/client/src/main/java/com/vaadin/client/ui/embedded/EmbeddedConnector.java b/client/src/main/java/com/vaadin/client/ui/embedded/EmbeddedConnector.java
index 7b837726a7..168f0e7f70 100644
--- a/client/src/main/java/com/vaadin/client/ui/embedded/EmbeddedConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/embedded/EmbeddedConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -44,8 +44,8 @@ import com.vaadin.shared.ui.embedded.EmbeddedState;
import com.vaadin.ui.Embedded;
@Connect(Embedded.class)
-public class EmbeddedConnector extends AbstractComponentConnector implements
- Paintable {
+public class EmbeddedConnector extends AbstractComponentConnector
+ implements Paintable {
private Element resourceElement;
private ObjectElement objectElement;
@@ -136,9 +136,9 @@ public class EmbeddedConnector extends AbstractComponentConnector implements
setResourceUrl(getResourceUrl("src"));
if (uidl.hasAttribute(EmbeddedConstants.ALTERNATE_TEXT)) {
- el.setPropertyString(
- EmbeddedConstants.ALTERNATE_TEXT,
- uidl.getStringAttribute(EmbeddedConstants.ALTERNATE_TEXT));
+ el.setPropertyString(EmbeddedConstants.ALTERNATE_TEXT,
+ uidl.getStringAttribute(
+ EmbeddedConstants.ALTERNATE_TEXT));
}
if (created) {
@@ -160,16 +160,16 @@ public class EmbeddedConnector extends AbstractComponentConnector implements
+ " allowTransparency=\"true\" src=\"\""
+ " name=\"" + uidl.getId()
+ "\"></iframe>");
- getWidget().browserElement = DOM.getFirstChild(getWidget()
- .getElement());
+ getWidget().browserElement = DOM
+ .getFirstChild(getWidget().getElement());
}
resourceElement = getWidget().browserElement;
objectElement = null;
setResourceUrl(getResourceUrl("src"));
clearBrowserElement = false;
} else {
- VConsole.error("Unknown Embedded type '" + getWidget().type
- + "'");
+ VConsole.error(
+ "Unknown Embedded type '" + getWidget().type + "'");
}
} else if (uidl.hasAttribute("mimetype")) {
// remove old style name related to type
@@ -235,8 +235,8 @@ public class EmbeddedConnector extends AbstractComponentConnector implements
}
getWidget().getElement().appendChild(obj);
if (uidl.hasAttribute(EmbeddedConstants.ALTERNATE_TEXT)) {
- obj.setInnerText(uidl
- .getStringAttribute(EmbeddedConstants.ALTERNATE_TEXT));
+ obj.setInnerText(uidl.getStringAttribute(
+ EmbeddedConstants.ALTERNATE_TEXT));
}
} else {
VConsole.error("Unknown Embedded mimetype '" + mime + "'");
diff --git a/client/src/main/java/com/vaadin/client/ui/flash/FlashConnector.java b/client/src/main/java/com/vaadin/client/ui/flash/FlashConnector.java
index e859e9cbf1..856fc776a8 100644
--- a/client/src/main/java/com/vaadin/client/ui/flash/FlashConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/flash/FlashConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/form/FormConnector.java b/client/src/main/java/com/vaadin/client/ui/form/FormConnector.java
index 857c2bd40e..3c5da2bbd8 100644
--- a/client/src/main/java/com/vaadin/client/ui/form/FormConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/form/FormConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -54,8 +54,8 @@ public class FormConnector extends AbstractComponentContainerConnector
}
if (form.errorMessage.isVisible()) {
- footerHeight += lm.getOuterHeight(form.errorMessage
- .getElement());
+ footerHeight += lm
+ .getOuterHeight(form.errorMessage.getElement());
footerHeight -= lm.getMarginTop(form.errorMessage.getElement());
form.errorMessage.getElement().getStyle()
.setMarginTop(-footerHeight, Unit.PX);
diff --git a/client/src/main/java/com/vaadin/client/ui/formlayout/FormLayoutConnector.java b/client/src/main/java/com/vaadin/client/ui/formlayout/FormLayoutConnector.java
index 39992d91a6..682d0dfd1f 100644
--- a/client/src/main/java/com/vaadin/client/ui/formlayout/FormLayoutConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/formlayout/FormLayoutConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -45,8 +45,8 @@ import com.vaadin.shared.ui.orderedlayout.FormLayoutState;
import com.vaadin.ui.FormLayout;
@Connect(FormLayout.class)
-public class FormLayoutConnector extends AbstractLayoutConnector implements
- PostLayoutListener {
+public class FormLayoutConnector extends AbstractLayoutConnector
+ implements PostLayoutListener {
/*
* Handlers & Listeners
@@ -85,8 +85,8 @@ public class FormLayoutConnector extends AbstractLayoutConnector implements
LayoutManager layoutManager = getLayoutManager();
double tableWidth = layoutManager
.getOuterWidthDouble(getWidget().table.getElement());
- double ownWidth = layoutManager.getInnerWidthDouble(getWidget()
- .getElement());
+ double ownWidth = layoutManager
+ .getInnerWidthDouble(getWidget().getElement());
if (ownWidth < tableWidth) {
// Something inside the table prevents it from shrinking,
// temporarily force column widths
@@ -113,8 +113,8 @@ public class FormLayoutConnector extends AbstractLayoutConnector implements
// Restrict content td width
// Round down to prevent interactions with fractional sizes of
// other columns
- int targetWidth = (int) Math.floor(componentColWidth
- - excessWidth);
+ int targetWidth = (int) Math
+ .floor(componentColWidth - excessWidth);
// Target might be negative if captions are wider than the total
// available width
@@ -152,8 +152,8 @@ public class FormLayoutConnector extends AbstractLayoutConnector implements
public void onUnregister() {
getLayoutManager().removeElementResizeListener(
getWidget().table.getElement(), resizeListener);
- getLayoutManager().removeElementResizeListener(
- getWidget().getElement(), resizeListener);
+ getLayoutManager().removeElementResizeListener(getWidget().getElement(),
+ resizeListener);
removeComponentCellListener();
super.onUnregister();
}
@@ -176,7 +176,8 @@ public class FormLayoutConnector extends AbstractLayoutConnector implements
}
@Override
- public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent event) {
+ public void onConnectorHierarchyChange(
+ ConnectorHierarchyChangeEvent event) {
VFormLayout formLayout = getWidget();
VFormLayoutTable formLayoutTable = getWidget().table;
@@ -249,7 +250,8 @@ public class FormLayoutConnector extends AbstractLayoutConnector implements
// FIXME This incorrectly depends on AbstractFieldConnector
if (component instanceof AbstractFieldConnector) {
- hideErrors = ((AbstractFieldConnector) component).getState().hideErrors;
+ hideErrors = ((AbstractFieldConnector) component)
+ .getState().hideErrors;
}
getWidget().table.updateError(component.getWidget(),
diff --git a/client/src/main/java/com/vaadin/client/ui/gridlayout/GridLayoutConnector.java b/client/src/main/java/com/vaadin/client/ui/gridlayout/GridLayoutConnector.java
index 03beb3c1e0..1a81c657a0 100644
--- a/client/src/main/java/com/vaadin/client/ui/gridlayout/GridLayoutConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/gridlayout/GridLayoutConnector.java
@@ -111,7 +111,8 @@ public class GridLayoutConnector extends AbstractComponentContainerConnector
layout.colExpandRatioArray = getState().colExpand;
layout.rowExpandRatioArray = getState().rowExpand;
- layout.updateMarginStyleNames(new MarginInfo(getState().marginsBitmask));
+ layout.updateMarginStyleNames(
+ new MarginInfo(getState().marginsBitmask));
layout.updateSpacingStyleName(getState().spacing);
getLayoutManager().setNeedsLayout(this);
}
@@ -132,7 +133,8 @@ public class GridLayoutConnector extends AbstractComponentContainerConnector
}
@Override
- public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent event) {
+ public void onConnectorHierarchyChange(
+ ConnectorHierarchyChangeEvent event) {
VGridLayout layout = getWidget();
// clean non rendered components
diff --git a/client/src/main/java/com/vaadin/client/ui/image/ImageConnector.java b/client/src/main/java/com/vaadin/client/ui/image/ImageConnector.java
index e4ba4af070..042cbd2d40 100644
--- a/client/src/main/java/com/vaadin/client/ui/image/ImageConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/image/ImageConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/label/LabelConnector.java b/client/src/main/java/com/vaadin/client/ui/label/LabelConnector.java
index fc94f27cf0..c0f1d37bdc 100644
--- a/client/src/main/java/com/vaadin/client/ui/label/LabelConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/label/LabelConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/layout/ComponentConnectorLayoutSlot.java b/client/src/main/java/com/vaadin/client/ui/layout/ComponentConnectorLayoutSlot.java
index b323fde1db..3df4833772 100644
--- a/client/src/main/java/com/vaadin/client/ui/layout/ComponentConnectorLayoutSlot.java
+++ b/client/src/main/java/com/vaadin/client/ui/layout/ComponentConnectorLayoutSlot.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -39,15 +39,15 @@ public class ComponentConnectorLayoutSlot extends VLayoutSlot {
@Override
protected int getCaptionHeight() {
VCaption caption = getCaption();
- return caption != null ? getLayoutManager().getOuterHeight(
- caption.getElement()) : 0;
+ return caption != null
+ ? getLayoutManager().getOuterHeight(caption.getElement()) : 0;
}
@Override
protected int getCaptionWidth() {
VCaption caption = getCaption();
- return caption != null ? getLayoutManager().getOuterWidth(
- caption.getElement()) : 0;
+ return caption != null
+ ? getLayoutManager().getOuterWidth(caption.getElement()) : 0;
}
public LayoutManager getLayoutManager() {
diff --git a/client/src/main/java/com/vaadin/client/ui/layout/ElementResizeEvent.java b/client/src/main/java/com/vaadin/client/ui/layout/ElementResizeEvent.java
index a1f75baff4..91aa7850c0 100644
--- a/client/src/main/java/com/vaadin/client/ui/layout/ElementResizeEvent.java
+++ b/client/src/main/java/com/vaadin/client/ui/layout/ElementResizeEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/layout/ElementResizeListener.java b/client/src/main/java/com/vaadin/client/ui/layout/ElementResizeListener.java
index 97ca34a8a4..6a625f72d1 100644
--- a/client/src/main/java/com/vaadin/client/ui/layout/ElementResizeListener.java
+++ b/client/src/main/java/com/vaadin/client/ui/layout/ElementResizeListener.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/layout/LayoutDependencyTree.java b/client/src/main/java/com/vaadin/client/ui/layout/LayoutDependencyTree.java
index 27733bfbe3..5f277a903e 100644
--- a/client/src/main/java/com/vaadin/client/ui/layout/LayoutDependencyTree.java
+++ b/client/src/main/java/com/vaadin/client/ui/layout/LayoutDependencyTree.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -37,7 +37,7 @@ import com.vaadin.shared.AbstractComponentState;
/**
* Internal class used to keep track of layout dependencies during one layout
* run. This class is not intended to be used directly by applications.
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
@@ -67,8 +67,8 @@ public class LayoutDependencyTree {
layoutBlockers.add(blockerId);
if (wasEmpty) {
if (needsLayout) {
- getLayoutQueue(direction).remove(
- connector.getConnectorId());
+ getLayoutQueue(direction)
+ .remove(connector.getConnectorId());
} else {
// Propagation already done if needsLayout is set
propagatePotentialLayout();
@@ -83,8 +83,8 @@ public class LayoutDependencyTree {
layoutBlockers.remove(blockerId);
if (layoutBlockers.isEmpty()) {
if (needsLayout) {
- getLayoutQueue(direction).add(
- connector.getConnectorId());
+ getLayoutQueue(direction)
+ .add(connector.getConnectorId());
} else {
propagateNoUpcomingLayout();
}
@@ -102,8 +102,8 @@ public class LayoutDependencyTree {
measureBlockers.add(blockerId);
if (wasEmpty) {
if (needsMeasure) {
- getMeasureQueue(direction).remove(
- connector.getConnectorId());
+ getMeasureQueue(direction)
+ .remove(connector.getConnectorId());
} else {
propagatePotentialResize();
}
@@ -247,7 +247,8 @@ public class LayoutDependencyTree {
if (connector instanceof HasComponentsConnector) {
HasComponentsConnector container = (HasComponentsConnector) connector;
- for (ComponentConnector child : container.getChildComponents()) {
+ for (ComponentConnector child : container
+ .getChildComponents()) {
if (!Util.shouldSkipMeasurementOfConnector(child, connector)
&& isRelativeInDirection(child, direction)) {
resized.push(child.getConnectorId());
@@ -280,15 +281,19 @@ public class LayoutDependencyTree {
LayoutDependency layoutDependency = getDependency(connectorId,
direction);
if (layoutDependency.connector instanceof ManagedLayout) {
- Profiler.enter("LayoutDependency.markSizeAsChanged setNeedsLayout");
+ Profiler.enter(
+ "LayoutDependency.markSizeAsChanged setNeedsLayout");
layoutDependency.setNeedsLayout(true);
- Profiler.leave("LayoutDependency.markSizeAsChanged setNeedsLayout");
+ Profiler.leave(
+ "LayoutDependency.markSizeAsChanged setNeedsLayout");
} else {
- Profiler.enter("LayoutDependency.markSizeAsChanged propagatePostLayoutMeasure");
+ Profiler.enter(
+ "LayoutDependency.markSizeAsChanged propagatePostLayoutMeasure");
// Should simulate setNeedsLayout(true) + markAsLayouted ->
// propagate needs measure
layoutDependency.propagatePostLayoutMeasure();
- Profiler.leave("LayoutDependency.markSizeAsChanged propagatePostLayoutMeasure");
+ Profiler.leave(
+ "LayoutDependency.markSizeAsChanged propagatePostLayoutMeasure");
}
}
Profiler.leave("LayoutDependency.markSizeAsChanged phase 1");
@@ -296,7 +301,8 @@ public class LayoutDependencyTree {
Profiler.enter("LayoutDependency.markSizeAsChanged scrollbars");
// Should also go through the hierarchy to discover appeared or
// disappeared scrollbars
- ComponentConnector scrollingBoundary = getScrollingBoundary(connector);
+ ComponentConnector scrollingBoundary = getScrollingBoundary(
+ connector);
if (scrollingBoundary != null) {
getDependency(scrollingBoundary.getConnectorId(),
getOppositeDirection()).setNeedsMeasure(true);
@@ -309,7 +315,7 @@ public class LayoutDependencyTree {
* Go up the hierarchy to find a component whose size might have changed
* in the other direction because changes to this component causes
* scrollbars to appear or disappear.
- *
+ *
* @return
*/
private LayoutDependency findPotentiallyChangedScrollbar() {
@@ -343,28 +349,34 @@ public class LayoutDependencyTree {
}
private void propagatePostLayoutMeasure() {
- Profiler.enter("LayoutDependency.propagatePostLayoutMeasure getResizedByLayout");
+ Profiler.enter(
+ "LayoutDependency.propagatePostLayoutMeasure getResizedByLayout");
JsArrayString resizedByLayout = getResizedByLayout();
- Profiler.leave("LayoutDependency.propagatePostLayoutMeasure getResizedByLayout");
+ Profiler.leave(
+ "LayoutDependency.propagatePostLayoutMeasure getResizedByLayout");
int length = resizedByLayout.length();
for (int i = 0; i < length; i++) {
- Profiler.enter("LayoutDependency.propagatePostLayoutMeasure setNeedsMeasure");
+ Profiler.enter(
+ "LayoutDependency.propagatePostLayoutMeasure setNeedsMeasure");
String resizedId = resizedByLayout.get(i);
LayoutDependency layoutDependency = getDependency(resizedId,
direction);
layoutDependency.setNeedsMeasure(true);
- Profiler.leave("LayoutDependency.propagatePostLayoutMeasure setNeedsMeasure");
+ Profiler.leave(
+ "LayoutDependency.propagatePostLayoutMeasure setNeedsMeasure");
}
// Special case for e.g. wrapping texts
- Profiler.enter("LayoutDependency.propagatePostLayoutMeasure horizontal case");
+ Profiler.enter(
+ "LayoutDependency.propagatePostLayoutMeasure horizontal case");
if (direction == HORIZONTAL && !connector.isUndefinedWidth()
&& connector.isUndefinedHeight()) {
LayoutDependency dependency = getDependency(
connector.getConnectorId(), VERTICAL);
dependency.setNeedsMeasure(true);
}
- Profiler.leave("LayoutDependency.propagatePostLayoutMeasure horizontal case");
+ Profiler.leave(
+ "LayoutDependency.propagatePostLayoutMeasure horizontal case");
}
@Override
@@ -377,13 +389,15 @@ public class LayoutDependencyTree {
}
AbstractComponentState state = connector.getState();
s += " sizing: "
- + getSizeDefinition(direction == VERTICAL ? state.height
- : state.width) + "\n";
+ + getSizeDefinition(
+ direction == VERTICAL ? state.height : state.width)
+ + "\n";
if (needsLayout) {
s += "Needs layout\n";
}
- if (getLayoutQueue(direction).contains(connector.getConnectorId())) {
+ if (getLayoutQueue(direction)
+ .contains(connector.getConnectorId())) {
s += "In layout queue\n";
}
s += "Layout blockers: " + blockersToString(layoutBlockers) + "\n";
@@ -391,7 +405,8 @@ public class LayoutDependencyTree {
if (needsMeasure) {
s += "Needs measure\n";
}
- if (getMeasureQueue(direction).contains(connector.getConnectorId())) {
+ if (getMeasureQueue(direction)
+ .contains(connector.getConnectorId())) {
s += "In measure queue\n";
}
s += "Measure blockers: " + blockersToString(measureBlockers);
@@ -434,15 +449,15 @@ public class LayoutDependencyTree {
/**
* @param connectorId
* @param needsMeasure
- *
+ *
* @deprecated As of 7.4.2, use
* {@link #setNeedsMeasure(ComponentConnector, boolean)} for
* improved performance.
*/
@Deprecated
public void setNeedsMeasure(String connectorId, boolean needsMeasure) {
- ComponentConnector connector = (ComponentConnector) ConnectorMap.get(
- connection).getConnector(connectorId);
+ ComponentConnector connector = (ComponentConnector) ConnectorMap
+ .get(connection).getConnector(connectorId);
if (connector == null) {
return;
}
@@ -459,8 +474,8 @@ public class LayoutDependencyTree {
public void setNeedsHorizontalMeasure(String connectorId,
boolean needsMeasure) {
// Ensure connector exists
- ComponentConnector connector = (ComponentConnector) ConnectorMap.get(
- connection).getConnector(connectorId);
+ ComponentConnector connector = (ComponentConnector) ConnectorMap
+ .get(connection).getConnector(connectorId);
if (connector == null) {
return;
}
@@ -474,10 +489,11 @@ public class LayoutDependencyTree {
dependency.setNeedsMeasure(needsMeasure);
}
- public void setNeedsVerticalMeasure(String connectorId, boolean needsMeasure) {
+ public void setNeedsVerticalMeasure(String connectorId,
+ boolean needsMeasure) {
// Ensure connector exists
- ComponentConnector connector = (ComponentConnector) ConnectorMap.get(
- connection).getConnector(connectorId);
+ ComponentConnector connector = (ComponentConnector) ConnectorMap
+ .get(connection).getConnector(connectorId);
if (connector == null) {
return;
}
@@ -503,9 +519,8 @@ public class LayoutDependencyTree {
connector = (ComponentConnector) ConnectorMap.get(connection)
.getConnector(connectorId);
if (connector == null) {
- getLogger().warning(
- "No connector found for id " + connectorId
- + " while creating LayoutDependency");
+ getLogger().warning("No connector found for id "
+ + connectorId + " while creating LayoutDependency");
return null;
}
}
@@ -526,7 +541,7 @@ public class LayoutDependencyTree {
/**
* @param layout
* @param needsLayout
- *
+ *
* @deprecated As of 7.0.1, use
* {@link #setNeedsHorizontalLayout(String, boolean)} for
* improved performance.
@@ -537,30 +552,33 @@ public class LayoutDependencyTree {
setNeedsHorizontalLayout(layout.getConnectorId(), needsLayout);
}
- public void setNeedsHorizontalLayout(String connectorId, boolean needsLayout) {
+ public void setNeedsHorizontalLayout(String connectorId,
+ boolean needsLayout) {
LayoutDependency dependency = getDependency(connectorId, HORIZONTAL);
if (dependency != null) {
dependency.setNeedsLayout(needsLayout);
} else {
- getLogger().warning(
- "No dependency found in setNeedsHorizontalLayout");
+ getLogger()
+ .warning("No dependency found in setNeedsHorizontalLayout");
}
}
/**
* @param layout
* @param needsLayout
- *
+ *
* @deprecated As of 7.0.1, use
* {@link #setNeedsVerticalLayout(String, boolean)} for improved
* performance.
*/
@Deprecated
- public void setNeedsVerticalLayout(ManagedLayout layout, boolean needsLayout) {
+ public void setNeedsVerticalLayout(ManagedLayout layout,
+ boolean needsLayout) {
setNeedsVerticalLayout(layout.getConnectorId(), needsLayout);
}
- public void setNeedsVerticalLayout(String connectorId, boolean needsLayout) {
+ public void setNeedsVerticalLayout(String connectorId,
+ boolean needsLayout) {
LayoutDependency dependency = getDependency(connectorId, VERTICAL);
if (dependency != null) {
dependency.setNeedsLayout(needsLayout);
@@ -634,8 +652,8 @@ public class LayoutDependencyTree {
ConnectorMap connectorMap = ConnectorMap.get(connection);
JsArrayString blockersDump = blockers.dump();
for (int i = 0; i < blockersDump.length(); i++) {
- ServerConnector blocker = connectorMap.getConnector(blockersDump
- .get(i));
+ ServerConnector blocker = connectorMap
+ .getConnector(blockersDump.get(i));
if (b.length() != 1) {
b.append(", ");
}
@@ -678,7 +696,8 @@ public class LayoutDependencyTree {
return asManagedLayoutArray(getVerticalLayoutTargetsJsArray());
}
- private ManagedLayout[] asManagedLayoutArray(JsArrayString connectorIdArray) {
+ private ManagedLayout[] asManagedLayoutArray(
+ JsArrayString connectorIdArray) {
int length = connectorIdArray.length();
ConnectorMap connectorMap = ConnectorMap.get(connection);
ManagedLayout[] result = new ManagedLayout[length];
@@ -738,7 +757,8 @@ public class LayoutDependencyTree {
.noMoreChangesExpected();
}
- public ComponentConnector getScrollingBoundary(ComponentConnector connector) {
+ public ComponentConnector getScrollingBoundary(
+ ComponentConnector connector) {
LayoutDependency dependency = getDependency(connector.getConnectorId(),
HORIZONTAL);
if (!dependency.scrollingParentCached) {
@@ -746,7 +766,8 @@ public class LayoutDependencyTree {
if (parent instanceof MayScrollChildren) {
dependency.scrollingBoundary = connector;
} else if (parent instanceof ComponentConnector) {
- dependency.scrollingBoundary = getScrollingBoundary((ComponentConnector) parent);
+ dependency.scrollingBoundary = getScrollingBoundary(
+ (ComponentConnector) parent);
} else {
// No scrolling parent
}
diff --git a/client/src/main/java/com/vaadin/client/ui/layout/Margins.java b/client/src/main/java/com/vaadin/client/ui/layout/Margins.java
index 75839c9ce8..a1466b9b61 100644
--- a/client/src/main/java/com/vaadin/client/ui/layout/Margins.java
+++ b/client/src/main/java/com/vaadin/client/ui/layout/Margins.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/layout/MayScrollChildren.java b/client/src/main/java/com/vaadin/client/ui/layout/MayScrollChildren.java
index 2a0b821646..9b9e90cefa 100644
--- a/client/src/main/java/com/vaadin/client/ui/layout/MayScrollChildren.java
+++ b/client/src/main/java/com/vaadin/client/ui/layout/MayScrollChildren.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/layout/VLayoutSlot.java b/client/src/main/java/com/vaadin/client/ui/layout/VLayoutSlot.java
index 5260e1866e..762056de0d 100644
--- a/client/src/main/java/com/vaadin/client/ui/layout/VLayoutSlot.java
+++ b/client/src/main/java/com/vaadin/client/ui/layout/VLayoutSlot.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -52,7 +52,8 @@ public abstract class VLayoutSlot {
this.caption = caption;
if (caption != null) {
// Physical attach.
- DOM.insertBefore(wrapper, caption.getElement(), widget.getElement());
+ DOM.insertBefore(wrapper, caption.getElement(),
+ widget.getElement());
Style style = caption.getElement().getStyle();
style.setPosition(Position.ABSOLUTE);
style.setTop(0, Unit.PX);
@@ -119,7 +120,8 @@ public abstract class VLayoutSlot {
.getWidth();
double percentage = parsePercent(percentWidth);
allocatedContentWidth = availableWidth * (percentage / 100);
- reportActualRelativeWidth(Math.round((float) allocatedContentWidth));
+ reportActualRelativeWidth(
+ Math.round((float) allocatedContentWidth));
}
double usedWidth; // widget width in px
@@ -191,8 +193,8 @@ public abstract class VLayoutSlot {
String height = getWidget().getElement().getStyle().getHeight();
double percentage = parsePercent(height);
allocatedContentHeight = contentHeight * (percentage / 100);
- reportActualRelativeHeight(Math
- .round((float) allocatedContentHeight));
+ reportActualRelativeHeight(
+ Math.round((float) allocatedContentHeight));
}
style.setTop(currentLocation, Unit.PX);
diff --git a/client/src/main/java/com/vaadin/client/ui/link/LinkConnector.java b/client/src/main/java/com/vaadin/client/ui/link/LinkConnector.java
index 1e77fb51b4..fb49db05c9 100644
--- a/client/src/main/java/com/vaadin/client/ui/link/LinkConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/link/LinkConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -80,8 +80,8 @@ public class LinkConnector extends AbstractComponentConnector {
DOM.insertChild(getWidget().getElement(),
getWidget().errorIndicatorElement, 0);
} else if (getWidget().errorIndicatorElement != null) {
- getWidget().errorIndicatorElement.getStyle().setDisplay(
- Display.NONE);
+ getWidget().errorIndicatorElement.getStyle()
+ .setDisplay(Display.NONE);
}
if (getWidget().icon != null) {
diff --git a/client/src/main/java/com/vaadin/client/ui/listselect/ListSelectConnector.java b/client/src/main/java/com/vaadin/client/ui/listselect/ListSelectConnector.java
index b867a3358c..1334e92c6d 100644
--- a/client/src/main/java/com/vaadin/client/ui/listselect/ListSelectConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/listselect/ListSelectConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/loginform/LoginFormConnector.java b/client/src/main/java/com/vaadin/client/ui/loginform/LoginFormConnector.java
index da80287826..e7ea956b8c 100644
--- a/client/src/main/java/com/vaadin/client/ui/loginform/LoginFormConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/loginform/LoginFormConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -41,8 +41,8 @@ import com.vaadin.shared.ui.loginform.LoginFormState;
import com.google.gwt.core.client.Scheduler;
@Connect(com.vaadin.ui.LoginForm.class)
-public class LoginFormConnector extends
- AbstractSingleComponentContainerConnector {
+public class LoginFormConnector
+ extends AbstractSingleComponentContainerConnector {
private VTextField passwordField;
private VTextField userField;
@@ -63,13 +63,15 @@ public class LoginFormConnector extends
super.init();
loginFormRpc = getRpcProxy(LoginFormRpc.class);
- getWidget().addSubmitCompleteHandler(new FormPanel.SubmitCompleteHandler() {
- @Override
- public void onSubmitComplete(FormPanel.SubmitCompleteEvent event) {
- valuesChanged();
- loginFormRpc.submitCompleted();
- }
- });
+ getWidget().addSubmitCompleteHandler(
+ new FormPanel.SubmitCompleteHandler() {
+ @Override
+ public void onSubmitComplete(
+ FormPanel.SubmitCompleteEvent event) {
+ valuesChanged();
+ loginFormRpc.submitCompleted();
+ }
+ });
}
@Override
@@ -78,7 +80,8 @@ public class LoginFormConnector extends
}
@Override
- public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent event) {
+ public void onConnectorHierarchyChange(
+ ConnectorHierarchyChangeEvent event) {
ComponentConnector content = getContent();
if (content != null) {
getWidget().setWidget(getContentWidget());
@@ -90,7 +93,8 @@ public class LoginFormConnector extends
super.onStateChanged(stateChangeEvent);
LoginFormState state = getState();
- userField = configureTextField(state.userNameFieldConnector, "username");
+ userField = configureTextField(state.userNameFieldConnector,
+ "username");
passwordField = configureTextField(state.passwordFieldConnector,
"password");
addSubmitButtonClickHandler(state.loginButtonConnector);
@@ -135,11 +139,11 @@ public class LoginFormConnector extends
private void addSubmitButtonClickHandler(Connector buttonConnector) {
if (buttonConnector instanceof ButtonConnector) {
- addSubmitButtonClickHandler(((ButtonConnector) buttonConnector)
- .getWidget());
+ addSubmitButtonClickHandler(
+ ((ButtonConnector) buttonConnector).getWidget());
} else if (buttonConnector instanceof NativeButtonConnector) {
- addSubmitButtonClickHandler(((NativeButtonConnector) buttonConnector)
- .getWidget());
+ addSubmitButtonClickHandler(
+ ((NativeButtonConnector) buttonConnector).getWidget());
}
}
diff --git a/client/src/main/java/com/vaadin/client/ui/loginform/VLoginForm.java b/client/src/main/java/com/vaadin/client/ui/loginform/VLoginForm.java
index e3dccd1ba5..d31ba55173 100644
--- a/client/src/main/java/com/vaadin/client/ui/loginform/VLoginForm.java
+++ b/client/src/main/java/com/vaadin/client/ui/loginform/VLoginForm.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/menubar/MenuBar.java b/client/src/main/java/com/vaadin/client/ui/menubar/MenuBar.java
index 833fb5a38a..25f2ca753f 100644
--- a/client/src/main/java/com/vaadin/client/ui/menubar/MenuBar.java
+++ b/client/src/main/java/com/vaadin/client/ui/menubar/MenuBar.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -18,13 +18,13 @@ package com.vaadin.client.ui.menubar;
/*
* Copyright 2007 Google Inc.
- *
+ *
* Licensed under the Apache 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
@@ -51,24 +51,22 @@ import com.vaadin.client.ui.VOverlay;
* A standard menu bar widget. A menu bar can contain any number of menu items,
* each of which can either fire a {@link com.google.gwt.user.client.Command} or
* open a cascaded menu bar.
- *
+ *
* <p>
* <img class='gallery' src='MenuBar.png'/>
* </p>
- *
+ *
* <h3>CSS Style Rules</h3>
* <ul class='css'>
* <li>.gwt-MenuBar { the menu bar itself }</li>
* <li>.gwt-MenuBar .gwt-MenuItem { menu items }</li>
- * <li>
- * .gwt-MenuBar .gwt-MenuItem-selected { selected menu items }</li>
+ * <li>.gwt-MenuBar .gwt-MenuItem-selected { selected menu items }</li>
* </ul>
- *
+ *
* <p>
- * <h3>Example</h3>
- * {@example com.google.gwt.examples.MenuBarExample}
+ * <h3>Example</h3> {@example com.google.gwt.examples.MenuBarExample}
* </p>
- *
+ *
* @deprecated
*/
@Deprecated
@@ -95,7 +93,7 @@ public class MenuBar extends Widget implements PopupListener {
/**
* Creates an empty menu bar.
- *
+ *
* @param vertical
* <code>true</code> to orient the menu bar vertically
*/
@@ -123,7 +121,7 @@ public class MenuBar extends Widget implements PopupListener {
/**
* Adds a menu item to the bar.
- *
+ *
* @param item
* the item to be added
*/
@@ -146,7 +144,7 @@ public class MenuBar extends Widget implements PopupListener {
/**
* Adds a menu item to the bar, that will fire the given command when it is
* selected.
- *
+ *
* @param text
* the item's text
* @param asHTML
@@ -164,7 +162,7 @@ public class MenuBar extends Widget implements PopupListener {
/**
* Adds a menu item to the bar, that will open the specified menu when it is
* selected.
- *
+ *
* @param text
* the item's text
* @param asHTML
@@ -182,7 +180,7 @@ public class MenuBar extends Widget implements PopupListener {
/**
* Adds a menu item to the bar, that will fire the given command when it is
* selected.
- *
+ *
* @param text
* the item's text
* @param cmd
@@ -198,7 +196,7 @@ public class MenuBar extends Widget implements PopupListener {
/**
* Adds a menu item to the bar, that will open the specified menu when it is
* selected.
- *
+ *
* @param text
* the item's text
* @param popup
@@ -225,7 +223,7 @@ public class MenuBar extends Widget implements PopupListener {
/**
* Gets whether this menu bar's child menus will open when the mouse is
* moved over it.
- *
+ *
* @return <code>true</code> if child menus will auto-open
*/
public boolean getAutoOpen() {
@@ -278,7 +276,7 @@ public class MenuBar extends Widget implements PopupListener {
/**
* Removes the specified menu item from the bar.
- *
+ *
* @param item
* the item to be removed
*/
@@ -296,7 +294,7 @@ public class MenuBar extends Widget implements PopupListener {
/**
* Sets whether this menu bar's child menus will open when the mouse is
* moved over it.
- *
+ *
* @param autoOpen
* <code>true</code> to cause child menus to auto-open
*/
@@ -308,7 +306,7 @@ public class MenuBar extends Widget implements PopupListener {
* Returns a list containing the <code>MenuItem</code> objects in the menu
* bar. If there are no items in the menu bar, then an empty
* <code>List</code> object will be returned.
- *
+ *
* @return a list containing the <code>MenuItem</code> objects in the menu
* bar
*/
@@ -320,7 +318,7 @@ public class MenuBar extends Widget implements PopupListener {
* Returns the <code>MenuItem</code> that is currently selected
* (highlighted) by the user. If none of the items in the menu are currently
* selected, then <code>null</code> will be returned.
- *
+ *
* @return the <code>MenuItem</code> that is currently selected, or
* <code>null</code> if no items are currently selected
*/
@@ -330,7 +328,7 @@ public class MenuBar extends Widget implements PopupListener {
/**
* Gets the first item from the menu or null if no items.
- *
+ *
* @since 7.2.6
* @return the first item from the menu or null if no items.
*/
@@ -340,7 +338,7 @@ public class MenuBar extends Widget implements PopupListener {
/**
* Gest the last item from the menu or null if no items.
- *
+ *
* @since 7.2.6
* @return the last item from the menu or null if no items.
*/
@@ -351,7 +349,7 @@ public class MenuBar extends Widget implements PopupListener {
/**
* Gets the index of the selected item.
- *
+ *
* @since 7.2.6
* @return the index of the selected item.
*/
@@ -377,7 +375,8 @@ public class MenuBar extends Widget implements PopupListener {
while (curMenu != null) {
curMenu.close();
- if ((curMenu.parentMenu == null) && (curMenu.selectedItem != null)) {
+ if ((curMenu.parentMenu == null)
+ && (curMenu.selectedItem != null)) {
curMenu.selectedItem.setSelectionStyle(false);
curMenu.selectedItem = null;
}
@@ -391,7 +390,7 @@ public class MenuBar extends Widget implements PopupListener {
* a popup associated with it, the popup will be shown. If it has a command
* associated with it, and 'fireCommand' is true, then the command will be
* fired. Popups associated with other items will be hidden.
- *
+ *
* @param item the item whose popup is to be shown. @param fireCommand
* <code>true</code> if the item's command should be fired,
* <code>false</code> otherwise.
@@ -531,7 +530,7 @@ public class MenuBar extends Widget implements PopupListener {
/**
* Scroll the selected item into view.
- *
+ *
* @since 7.2.6
*/
public void scrollSelectionIntoView() {
@@ -540,7 +539,7 @@ public class MenuBar extends Widget implements PopupListener {
/**
* Sets the menu scroll enabled or disabled.
- *
+ *
* @since 7.2.6
* @param enabled
* the enabled state of the scroll.
@@ -564,7 +563,7 @@ public class MenuBar extends Widget implements PopupListener {
/**
* Gets whether the scroll is activate for this menu.
- *
+ *
* @since 7.2.6
* @return true if the scroll is active, otherwise false.
*/
@@ -579,7 +578,7 @@ public class MenuBar extends Widget implements PopupListener {
/**
* Gets the preferred height of the menu.
- *
+ *
* @since 7.2.6
*/
protected int getPreferredHeight() {
diff --git a/client/src/main/java/com/vaadin/client/ui/menubar/MenuBarConnector.java b/client/src/main/java/com/vaadin/client/ui/menubar/MenuBarConnector.java
index 03eeb85165..c0b1c84bce 100644
--- a/client/src/main/java/com/vaadin/client/ui/menubar/MenuBarConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/menubar/MenuBarConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -36,13 +36,13 @@ import com.vaadin.shared.ui.menubar.MenuBarConstants;
import com.vaadin.shared.ui.menubar.MenuBarState;
@Connect(com.vaadin.ui.MenuBar.class)
-public class MenuBarConnector extends AbstractComponentConnector implements
- Paintable, SimpleManagedLayout {
+public class MenuBarConnector extends AbstractComponentConnector
+ implements Paintable, SimpleManagedLayout {
/**
* This method must be implemented to update the client-side component from
* UIDL data received from server.
- *
+ *
* This method is called when the page is loaded for the first time, and
* every time UI changes in the component are received from the server.
*/
@@ -78,9 +78,8 @@ public class MenuBarConnector extends AbstractComponentConnector implements
if (moreItemUIDL.hasAttribute("icon")) {
itemHTML.append("<img src=\""
- + WidgetUtil.escapeAttribute(client
- .translateVaadinUri(moreItemUIDL
- .getStringAttribute("icon")))
+ + WidgetUtil.escapeAttribute(client.translateVaadinUri(
+ moreItemUIDL.getStringAttribute("icon")))
+ "\" class=\"" + ImageIcon.CLASSNAME
+ "\" alt=\"\" />");
}
@@ -97,8 +96,8 @@ public class MenuBarConnector extends AbstractComponentConnector implements
getWidget().collapsedRootItems = new VMenuBar(true, getWidget());
getWidget().moreItem.setSubMenu(getWidget().collapsedRootItems);
- getWidget().moreItem.addStyleName(getWidget().getStylePrimaryName()
- + "-more-menuitem");
+ getWidget().moreItem.addStyleName(
+ getWidget().getStylePrimaryName() + "-more-menuitem");
}
UIDL uidlItems = uidl.getChildUIDL(1);
@@ -155,7 +154,8 @@ public class MenuBarConnector extends AbstractComponentConnector implements
while (!itr.hasNext() && !iteratorStack.empty()) {
boolean hasCheckableItem = false;
- for (VMenuBar.CustomMenuItem menuItem : currentMenu.getItems()) {
+ for (VMenuBar.CustomMenuItem menuItem : currentMenu
+ .getItems()) {
hasCheckableItem = hasCheckableItem
|| menuItem.isCheckable();
}
@@ -168,7 +168,7 @@ public class MenuBarConnector extends AbstractComponentConnector implements
itr = iteratorStack.pop();
currentMenu = menuStack.pop();
}
- }// while
+ } // while
getLayoutManager().setNeedsHorizontalLayout(this);
@@ -196,8 +196,8 @@ public class MenuBarConnector extends AbstractComponentConnector implements
// Check content of widget to find tooltip for element
if (element != getWidget().getElement()) {
- VMenuBar.CustomMenuItem item = getWidget().getMenuItemWithElement(
- element);
+ VMenuBar.CustomMenuItem item = getWidget()
+ .getMenuItemWithElement(element);
if (item != null) {
info = item.getTooltip();
}
diff --git a/client/src/main/java/com/vaadin/client/ui/menubar/MenuItem.java b/client/src/main/java/com/vaadin/client/ui/menubar/MenuItem.java
index bf2fbf8feb..f5dd968ad0 100644
--- a/client/src/main/java/com/vaadin/client/ui/menubar/MenuItem.java
+++ b/client/src/main/java/com/vaadin/client/ui/menubar/MenuItem.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -18,13 +18,13 @@ package com.vaadin.client.ui.menubar;
/*
* Copyright 2007 Google Inc.
- *
+ *
* Licensed under the Apache 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
@@ -43,7 +43,7 @@ import com.google.gwt.user.client.ui.UIObject;
* {@link com.google.gwt.user.client.ui.MenuBar}. Menu items can either fire a
* {@link com.google.gwt.user.client.Command} when they are clicked, or open a
* cascading sub-menu.
- *
+ *
* @deprecated
*/
@Deprecated
@@ -56,7 +56,7 @@ public class MenuItem extends UIObject implements HasHTML {
/**
* Constructs a new menu item that fires a command when it is selected.
- *
+ *
* @param text
* the item's text
* @param cmd
@@ -69,7 +69,7 @@ public class MenuItem extends UIObject implements HasHTML {
/**
* Constructs a new menu item that fires a command when it is selected.
- *
+ *
* @param text
* the item's text
* @param asHTML
@@ -85,7 +85,7 @@ public class MenuItem extends UIObject implements HasHTML {
/**
* Constructs a new menu item that cascades to a sub-menu when it is
* selected.
- *
+ *
* @param text
* the item's text
* @param subMenu
@@ -99,7 +99,7 @@ public class MenuItem extends UIObject implements HasHTML {
/**
* Constructs a new menu item that cascades to a sub-menu when it is
* selected.
- *
+ *
* @param text
* the item's text
* @param asHTML
@@ -126,7 +126,7 @@ public class MenuItem extends UIObject implements HasHTML {
/**
* Gets the command associated with this item.
- *
+ *
* @return this item's command, or <code>null</code> if none exists
*/
public Command getCommand() {
@@ -140,7 +140,7 @@ public class MenuItem extends UIObject implements HasHTML {
/**
* Gets the menu that contains this item.
- *
+ *
* @return the parent menu, or <code>null</code> if none exists.
*/
public MenuBar getParentMenu() {
@@ -149,7 +149,7 @@ public class MenuItem extends UIObject implements HasHTML {
/**
* Gets the sub-menu associated with this item.
- *
+ *
* @return this item's sub-menu, or <code>null</code> if none exists
*/
public MenuBar getSubMenu() {
@@ -163,7 +163,7 @@ public class MenuItem extends UIObject implements HasHTML {
/**
* Sets the command associated with this item.
- *
+ *
* @param cmd
* the command to be associated with this item
*/
@@ -178,7 +178,7 @@ public class MenuItem extends UIObject implements HasHTML {
/**
* Sets the sub-menu associated with this item.
- *
+ *
* @param subMenu
* this item's new sub-menu
*/
diff --git a/client/src/main/java/com/vaadin/client/ui/nativebutton/NativeButtonConnector.java b/client/src/main/java/com/vaadin/client/ui/nativebutton/NativeButtonConnector.java
index 65d4a1eb9b..81823c3d3c 100644
--- a/client/src/main/java/com/vaadin/client/ui/nativebutton/NativeButtonConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/nativebutton/NativeButtonConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -67,8 +67,8 @@ public class NativeButtonConnector extends AbstractComponentConnector {
getWidget().captionElement);
} else if (getWidget().errorIndicatorElement != null) {
- getWidget().getElement().removeChild(
- getWidget().errorIndicatorElement);
+ getWidget().getElement()
+ .removeChild(getWidget().errorIndicatorElement);
getWidget().errorIndicatorElement = null;
}
diff --git a/client/src/main/java/com/vaadin/client/ui/nativeselect/NativeSelectConnector.java b/client/src/main/java/com/vaadin/client/ui/nativeselect/NativeSelectConnector.java
index d6ff2015b4..4adc233cdf 100644
--- a/client/src/main/java/com/vaadin/client/ui/nativeselect/NativeSelectConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/nativeselect/NativeSelectConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/optiongroup/OptionGroupBaseConnector.java b/client/src/main/java/com/vaadin/client/ui/optiongroup/OptionGroupBaseConnector.java
index 0757bc395b..65135fe5e1 100644
--- a/client/src/main/java/com/vaadin/client/ui/optiongroup/OptionGroupBaseConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/optiongroup/OptionGroupBaseConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -43,8 +43,8 @@ public abstract class OptionGroupBaseConnector extends AbstractFieldConnector
getWidget().selectedKeys = uidl.getStringArrayVariableAsSet("selected");
getWidget().setReadonly(isReadOnly());
- getWidget().multiselect = "multi".equals(uidl
- .getStringAttribute("selectmode"));
+ getWidget().multiselect = "multi"
+ .equals(uidl.getStringAttribute("selectmode"));
getWidget().immediate = getState().immediate;
getWidget().nullSelectionAllowed = uidl
.getBooleanAttribute("nullselect");
@@ -83,13 +83,13 @@ public abstract class OptionGroupBaseConnector extends AbstractFieldConnector
getWidget().newItemField.addStyleName(StyleConstants.UI_WIDGET);
}
- getWidget().newItemField.setEnabled(getWidget().isEnabled()
- && !getWidget().isReadonly());
- getWidget().newItemButton.setEnabled(getWidget().isEnabled()
- && !getWidget().isReadonly());
+ getWidget().newItemField.setEnabled(
+ getWidget().isEnabled() && !getWidget().isReadonly());
+ getWidget().newItemButton.setEnabled(
+ getWidget().isEnabled() && !getWidget().isReadonly());
- if (getWidget().newItemField == null
- || getWidget().newItemField.getParent() != getWidget().container) {
+ if (getWidget().newItemField == null || getWidget().newItemField
+ .getParent() != getWidget().container) {
getWidget().container.add(getWidget().newItemField);
getWidget().container.add(getWidget().newItemButton);
final int w = getWidget().container.getOffsetWidth()
diff --git a/client/src/main/java/com/vaadin/client/ui/optiongroup/OptionGroupConnector.java b/client/src/main/java/com/vaadin/client/ui/optiongroup/OptionGroupConnector.java
index f9bdf455f6..2101ff5d39 100644
--- a/client/src/main/java/com/vaadin/client/ui/optiongroup/OptionGroupConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/optiongroup/OptionGroupConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -66,10 +66,10 @@ public class OptionGroupConnector extends OptionGroupBaseConnector {
// add focus and blur handlers to checkboxes / radio buttons
for (Widget wid : getWidget().panel) {
if (wid instanceof CheckBox) {
- getWidget().focusHandlers.add(((CheckBox) wid)
- .addFocusHandler(getWidget()));
- getWidget().blurHandlers.add(((CheckBox) wid)
- .addBlurHandler(getWidget()));
+ getWidget().focusHandlers
+ .add(((CheckBox) wid).addFocusHandler(getWidget()));
+ getWidget().blurHandlers
+ .add(((CheckBox) wid).addBlurHandler(getWidget()));
}
}
}
diff --git a/client/src/main/java/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java b/client/src/main/java/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java
index dbd530dde1..960bf71884 100644
--- a/client/src/main/java/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -52,8 +52,8 @@ import com.vaadin.shared.ui.orderedlayout.AbstractOrderedLayoutState;
/**
* Base class for vertical and horizontal ordered layouts
*/
-public abstract class AbstractOrderedLayoutConnector extends
- AbstractLayoutConnector {
+public abstract class AbstractOrderedLayoutConnector
+ extends AbstractLayoutConnector {
/*
* Handlers & Listeners
@@ -132,11 +132,11 @@ public abstract class AbstractOrderedLayoutConnector extends
String widgetWidth = widgetElement.getStyle().getWidth();
String widgetHeight = widgetElement.getStyle().getHeight();
- if (widgetHeight.endsWith("%")
- && (pos == CaptionPosition.TOP || pos == CaptionPosition.BOTTOM)) {
+ if (widgetHeight.endsWith("%") && (pos == CaptionPosition.TOP
+ || pos == CaptionPosition.BOTTOM)) {
getWidget().updateCaptionOffset(captionElement);
- } else if (widgetWidth.endsWith("%")
- && (pos == CaptionPosition.LEFT || pos == CaptionPosition.RIGHT)) {
+ } else if (widgetWidth.endsWith("%") && (pos == CaptionPosition.LEFT
+ || pos == CaptionPosition.RIGHT)) {
getWidget().updateCaptionOffset(captionElement);
}
@@ -169,7 +169,7 @@ public abstract class AbstractOrderedLayoutConnector extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.ui.AbstractComponentConnector#init()
*/
@Override
@@ -180,7 +180,7 @@ public abstract class AbstractOrderedLayoutConnector extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.ui.AbstractLayoutConnector#getState()
*/
@Override
@@ -190,7 +190,7 @@ public abstract class AbstractOrderedLayoutConnector extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.ui.AbstractComponentConnector#getWidget()
*/
@Override
@@ -226,15 +226,15 @@ public abstract class AbstractOrderedLayoutConnector extends
/**
* The id of the previous response for which state changes have been
* processed. If this is the same as the
- * {@link ApplicationConnection#getLastSeenServerSyncId()}, it means that we can
- * skip some quite expensive calculations because we know that the state
+ * {@link ApplicationConnection#getLastSeenServerSyncId()}, it means that we
+ * can skip some quite expensive calculations because we know that the state
* hasn't changed since the last time the values were calculated.
*/
private int processedResponseId = -1;
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.HasComponentsConnector#updateCaption(com.vaadin
* .client.ComponentConnector)
*/
@@ -286,11 +286,11 @@ public abstract class AbstractOrderedLayoutConnector extends
if (slot.hasCaption()) {
CaptionPosition pos = slot.getCaptionPosition();
slot.setCaptionResizeListener(slotCaptionResizeListener);
- if (child.isRelativeHeight()
- && (pos == CaptionPosition.TOP || pos == CaptionPosition.BOTTOM)) {
+ if (child.isRelativeHeight() && (pos == CaptionPosition.TOP
+ || pos == CaptionPosition.BOTTOM)) {
getWidget().updateCaptionOffset(slot.getCaptionElement());
- } else if (child.isRelativeWidth()
- && (pos == CaptionPosition.LEFT || pos == CaptionPosition.RIGHT)) {
+ } else if (child.isRelativeWidth() && (pos == CaptionPosition.LEFT
+ || pos == CaptionPosition.RIGHT)) {
getWidget().updateCaptionOffset(slot.getCaptionElement());
}
}
@@ -299,13 +299,14 @@ public abstract class AbstractOrderedLayoutConnector extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.ui.AbstractComponentContainerConnector#
* onConnectorHierarchyChange
* (com.vaadin.client.ConnectorHierarchyChangeEvent)
*/
@Override
- public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent event) {
+ public void onConnectorHierarchyChange(
+ ConnectorHierarchyChangeEvent event) {
Profiler.enter("AOLC.onConnectorHierarchyChange");
List<ComponentConnector> previousChildren = event.getOldChildren();
@@ -314,17 +315,21 @@ public abstract class AbstractOrderedLayoutConnector extends
// remove spacing as it is exists as separate elements that cannot be
// removed easily after reordering the contents
- Profiler.enter("AOLC.onConnectorHierarchyChange temporarily remove spacing");
+ Profiler.enter(
+ "AOLC.onConnectorHierarchyChange temporarily remove spacing");
layout.setSpacing(false);
- Profiler.leave("AOLC.onConnectorHierarchyChange temporarily remove spacing");
+ Profiler.leave(
+ "AOLC.onConnectorHierarchyChange temporarily remove spacing");
for (ComponentConnector child : getChildComponents()) {
Profiler.enter("AOLC.onConnectorHierarchyChange add children");
Slot slot = layout.getSlot(child.getWidget());
if (slot.getParent() != layout) {
- Profiler.enter("AOLC.onConnectorHierarchyChange add state change handler");
+ Profiler.enter(
+ "AOLC.onConnectorHierarchyChange add state change handler");
child.addStateChangeHandler(childStateChangeHandler);
- Profiler.leave("AOLC.onConnectorHierarchyChange add state change handler");
+ Profiler.leave(
+ "AOLC.onConnectorHierarchyChange add state change handler");
}
Profiler.enter("AOLC.onConnectorHierarchyChange addOrMoveSlot");
layout.addOrMoveSlot(slot, currentIndex++, false);
@@ -362,7 +367,7 @@ public abstract class AbstractOrderedLayoutConnector extends
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.client.ui.AbstractComponentConnector#onStateChanged(com.vaadin
* .client.communication.StateChangeEvent)
@@ -380,20 +385,21 @@ public abstract class AbstractOrderedLayoutConnector extends
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.client.ui.AbstractComponentConnector#getTooltipInfo(com.google
* .gwt.dom.client.Element)
*/
@Override
- public TooltipInfo getTooltipInfo(com.google.gwt.dom.client.Element element) {
+ public TooltipInfo getTooltipInfo(
+ com.google.gwt.dom.client.Element element) {
if (element != getWidget().getElement()) {
Slot slot = WidgetUtil.findWidget(element, Slot.class);
if (slot != null && slot.getCaptionElement() != null
&& slot.getParent() == getWidget()
&& slot.getCaptionElement().isOrHasChild(element)) {
- ComponentConnector connector = Util.findConnectorFor(slot
- .getWidget());
+ ComponentConnector connector = Util
+ .findConnectorFor(slot.getWidget());
if (connector != null) {
return connector.getTooltipInfo(element);
}
@@ -404,7 +410,7 @@ public abstract class AbstractOrderedLayoutConnector extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.ui.AbstractComponentConnector#hasTooltip()
*/
@Override
@@ -441,7 +447,8 @@ public abstract class AbstractOrderedLayoutConnector extends
boolean onlyZeroExpands = true;
if (needsExpand) {
for (ComponentConnector child : getChildComponents()) {
- double expandRatio = getState().childData.get(child).expandRatio;
+ double expandRatio = getState().childData
+ .get(child).expandRatio;
if (expandRatio != 0) {
onlyZeroExpands = false;
break;
@@ -478,8 +485,8 @@ public abstract class AbstractOrderedLayoutConnector extends
hasChildrenWithMiddleAlignment = true;
}
- double expandRatio = onlyZeroExpands ? 1 : getState().childData
- .get(child).expandRatio;
+ double expandRatio = onlyZeroExpands ? 1
+ : getState().childData.get(child).expandRatio;
slot.setExpandRatio(expandRatio);
@@ -588,13 +595,13 @@ public abstract class AbstractOrderedLayoutConnector extends
if (slot.hasCaption()) {
slot.setCaptionResizeListener(slotCaptionResizeListener);
}
- } else if ((hasChildrenWithRelativeHeight || hasChildrenWithRelativeWidth)
- && slot.hasCaption()) {
+ } else if ((hasChildrenWithRelativeHeight
+ || hasChildrenWithRelativeWidth) && slot.hasCaption()) {
/*
* If the slot has caption, we need to listen for its size changes
* in order to update the padding/margin offset for relative sized
* components.
- *
+ *
* TODO might only be needed if the caption is in the same direction
* as the relative size?
*/
@@ -622,8 +629,8 @@ public abstract class AbstractOrderedLayoutConnector extends
return;
}
h += getLayoutManager().getBorderHeight(getWidget().getElement())
- + getLayoutManager().getPaddingHeight(
- getWidget().getElement());
+ + getLayoutManager()
+ .getPaddingHeight(getWidget().getElement());
getWidget().getElement().getStyle().setHeight(h, Unit.PX);
getLayoutManager().setNeedsMeasure(this);
}
@@ -644,8 +651,8 @@ public abstract class AbstractOrderedLayoutConnector extends
Element captionElement = slot.getCaptionElement();
CaptionPosition captionPosition = slot.getCaptionPosition();
- int pixelHeight = layoutManager.getOuterHeight(childWidget
- .getElement());
+ int pixelHeight = layoutManager
+ .getOuterHeight(childWidget.getElement());
if (pixelHeight == -1) {
// Height has not yet been measured -> postpone actions that
// depend on the max height
@@ -660,8 +667,7 @@ public abstract class AbstractOrderedLayoutConnector extends
&& captionSizeShouldBeAddedtoComponentHeight;
if (includeCaptionHeight) {
- int captionHeight = layoutManager
- .getOuterHeight(captionElement)
+ int captionHeight = layoutManager.getOuterHeight(captionElement)
- getLayoutManager().getMarginHeight(captionElement);
if (captionHeight == -1) {
// Height has not yet been measured -> postpone actions that
@@ -686,7 +692,7 @@ public abstract class AbstractOrderedLayoutConnector extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.ui.AbstractComponentConnector#onUnregister()
*/
@Override
diff --git a/client/src/main/java/com/vaadin/client/ui/orderedlayout/CaptionPosition.java b/client/src/main/java/com/vaadin/client/ui/orderedlayout/CaptionPosition.java
index 885dc1ecd7..6a55491639 100644
--- a/client/src/main/java/com/vaadin/client/ui/orderedlayout/CaptionPosition.java
+++ b/client/src/main/java/com/vaadin/client/ui/orderedlayout/CaptionPosition.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/orderedlayout/HorizontalLayoutConnector.java b/client/src/main/java/com/vaadin/client/ui/orderedlayout/HorizontalLayoutConnector.java
index 2cd1acd78b..b84be60a1a 100644
--- a/client/src/main/java/com/vaadin/client/ui/orderedlayout/HorizontalLayoutConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/orderedlayout/HorizontalLayoutConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,10 +30,9 @@ public class HorizontalLayoutConnector extends AbstractOrderedLayoutConnector {
/*
* (non-Javadoc)
- *
- * @see
- * com.vaadin.client.ui.orderedlayout.AbstractOrderedLayoutConnector#getWidget
- * ()
+ *
+ * @see com.vaadin.client.ui.orderedlayout.AbstractOrderedLayoutConnector#
+ * getWidget ()
*/
@Override
public VHorizontalLayout getWidget() {
diff --git a/client/src/main/java/com/vaadin/client/ui/orderedlayout/Slot.java b/client/src/main/java/com/vaadin/client/ui/orderedlayout/Slot.java
index 564c15472f..2315f0bc4b 100644
--- a/client/src/main/java/com/vaadin/client/ui/orderedlayout/Slot.java
+++ b/client/src/main/java/com/vaadin/client/ui/orderedlayout/Slot.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -90,10 +90,10 @@ public class Slot extends SimplePanel {
/**
* Constructs a slot.
- *
+ *
* When using this constructor, the layout and widget must be set before any
* other operations are performed on the slot.
- *
+ *
* @since 7.6
*/
public Slot() {
@@ -103,10 +103,10 @@ public class Slot extends SimplePanel {
/**
* Set the layout in which this slot is. This method must be called exactly
* once at slot construction time when using the default constructor.
- *
+ *
* The method should normally only be called by
* {@link VAbstractOrderedLayout#createSlot(Widget)}.
- *
+ *
* @since 7.6
* @param layout
* the layout containing the slot
@@ -117,7 +117,7 @@ public class Slot extends SimplePanel {
/**
* Constructs a slot.
- *
+ *
* @param layout
* The layout to which this slot belongs
* @param widget
@@ -134,7 +134,7 @@ public class Slot extends SimplePanel {
/*
* (non-Javadoc)
- *
+ *
* @see com.google.gwt.user.client.ui.SimplePanel#remove(com.google.gwt.user
* .client.ui.Widget)
*/
@@ -146,7 +146,7 @@ public class Slot extends SimplePanel {
/*
* (non-Javadoc)
- *
+ *
* @see com.google.gwt.user.client.ui.SimplePanel#setWidget(com.google.gwt
* .user.client.ui.Widget)
*/
@@ -246,7 +246,7 @@ public class Slot extends SimplePanel {
/**
* Returns the alignment for the slot
- *
+ *
*/
public AlignmentInfo getAlignment() {
return alignment;
@@ -254,7 +254,7 @@ public class Slot extends SimplePanel {
/**
* Sets the style names for the slot containing the widget
- *
+ *
* @param stylenames
* The style names for the slot
*/
@@ -272,7 +272,7 @@ public class Slot extends SimplePanel {
/**
* Sets how the widget is aligned inside the slot
- *
+ *
* @param alignment
* The alignment inside the slot
*/
@@ -308,10 +308,10 @@ public class Slot extends SimplePanel {
* the expand ratios but instead be allocated space based on its natural
* size. Other values causes the slot to get a share of the otherwise
* unallocated space in proportion to the slot's expand ratio value.
- *
+ *
* @param expandRatio
* The ratio of the space the slot should occupy
- *
+ *
*/
public void setExpandRatio(double expandRatio) {
this.expandRatio = expandRatio;
@@ -320,9 +320,9 @@ public class Slot extends SimplePanel {
/**
* Get the expand ratio for the slot. The expand ratio describes how the
* slot should be resized compared to other slots in the layout
- *
+ *
* @return the expand ratio of the slot
- *
+ *
* @see #setExpandRatio(double)
*/
public double getExpandRatio() {
@@ -332,7 +332,7 @@ public class Slot extends SimplePanel {
/**
* Set the spacing for the slot. The spacing determines if there should be
* empty space around the slot when the slot.
- *
+ *
* @param spacing
* Should spacing be enabled
*/
@@ -360,7 +360,7 @@ public class Slot extends SimplePanel {
/**
* Get the element which is added to make the spacing
- *
+ *
* @return
*/
public com.google.gwt.user.client.Element getSpacingElement() {
@@ -388,7 +388,7 @@ public class Slot extends SimplePanel {
/**
* Get the horizontal amount of pixels of the spacing
- *
+ *
* @return
*/
protected int getHorizontalSpacing() {
@@ -402,7 +402,7 @@ public class Slot extends SimplePanel {
/**
* Set the position of the caption relative to the slot
- *
+ *
* @param captionPosition
* The position of the caption
*/
@@ -410,8 +410,8 @@ public class Slot extends SimplePanel {
if (caption == null) {
return;
}
- captionWrap.removeClassName("v-caption-on-"
- + this.captionPosition.name().toLowerCase());
+ captionWrap.removeClassName(
+ "v-caption-on-" + this.captionPosition.name().toLowerCase());
this.captionPosition = captionPosition;
if (captionPosition == CaptionPosition.BOTTOM
@@ -421,8 +421,8 @@ public class Slot extends SimplePanel {
captionWrap.insertFirst(caption);
}
- captionWrap.addClassName("v-caption-on-"
- + captionPosition.name().toLowerCase());
+ captionWrap.addClassName(
+ "v-caption-on-" + captionPosition.name().toLowerCase());
}
/**
@@ -434,7 +434,7 @@ public class Slot extends SimplePanel {
/**
* Set the caption of the slot
- *
+ *
* @param captionText
* The text of the caption
* @param iconUrl
@@ -449,7 +449,7 @@ public class Slot extends SimplePanel {
* Is the (field) required
* @param enabled
* Is the component enabled
- *
+ *
* @deprecated Use
* {@link #setCaption(String, Icon, List, String, boolean, boolean, boolean)}
* instead
@@ -472,7 +472,7 @@ public class Slot extends SimplePanel {
/**
* Set the caption of the slot as text
- *
+ *
* @param captionText
* The text of the caption
* @param icon
@@ -489,14 +489,15 @@ public class Slot extends SimplePanel {
* Is the component enabled
*/
public void setCaption(String captionText, Icon icon, List<String> styles,
- String error, boolean showError, boolean required, boolean enabled) {
+ String error, boolean showError, boolean required,
+ boolean enabled) {
setCaption(captionText, icon, styles, error, showError, required,
enabled, false);
}
/**
* Set the caption of the slot
- *
+ *
* @param captionText
* The text of the caption
* @param icon
@@ -540,8 +541,8 @@ public class Slot extends SimplePanel {
// Made changes to DOM. Focus can be lost if it was in the
// widget.
- focusLost = (focusedElement == null ? false : widget
- .getElement().isOrHasChild(focusedElement));
+ focusLost = (focusedElement == null ? false
+ : widget.getElement().isOrHasChild(focusedElement));
}
} else if (caption != null) {
orphan(widget);
@@ -552,8 +553,8 @@ public class Slot extends SimplePanel {
captionWrap = null;
// Made changes to DOM. Focus can be lost if it was in the widget.
- focusLost = (focusedElement == null ? false : widget.getElement()
- .isOrHasChild(focusedElement));
+ focusLost = (focusedElement == null ? false
+ : widget.getElement().isOrHasChild(focusedElement));
}
// Caption text
@@ -663,8 +664,8 @@ public class Slot extends SimplePanel {
// even if it does it will be stopped once something
// is done with the browser.
schedule(25);
- } else if (WidgetUtil.getFocusedElement().equals(
- Document.get().getBody())) {
+ } else if (WidgetUtil.getFocusedElement()
+ .equals(Document.get().getBody())) {
// Focus found it's way to BodyElement. Now it can
// be restored
focusedElement.focus();
@@ -700,7 +701,7 @@ public class Slot extends SimplePanel {
/**
* Set if the slot has a relative width
- *
+ *
* @param relativeWidth
* True if slot uses relative width, false if the slot has a
* static width
@@ -718,7 +719,7 @@ public class Slot extends SimplePanel {
/**
* Set if the slot has a relative height
- *
+ *
* @param relativeHeight
* True if the slot uses a relative height, false if the slot has
* a static height
@@ -734,7 +735,7 @@ public class Slot extends SimplePanel {
/**
* Updates the captions size if the slot is relative
- *
+ *
* @param isRelativeSize
* Is the slot relatively sized
* @param direction
@@ -765,7 +766,7 @@ public class Slot extends SimplePanel {
/*
* (non-Javadoc)
- *
+ *
* @see com.google.gwt.user.client.ui.Widget#onBrowserEvent(com.google.gwt
* .user.client.Event)
*/
@@ -784,7 +785,7 @@ public class Slot extends SimplePanel {
/*
* (non-Javadoc)
- *
+ *
* @see com.google.gwt.user.client.ui.SimplePanel#getContainerElement()
*/
@Override
@@ -798,7 +799,7 @@ public class Slot extends SimplePanel {
/*
* (non-Javadoc)
- *
+ *
* @see com.google.gwt.user.client.ui.Widget#onDetach()
*/
@Override
@@ -811,7 +812,7 @@ public class Slot extends SimplePanel {
/*
* (non-Javadoc)
- *
+ *
* @see com.google.gwt.user.client.ui.Widget#onAttach()
*/
@Override
diff --git a/client/src/main/java/com/vaadin/client/ui/orderedlayout/VAbstractOrderedLayout.java b/client/src/main/java/com/vaadin/client/ui/orderedlayout/VAbstractOrderedLayout.java
index 1a36ba9c93..bea0d19d95 100644
--- a/client/src/main/java/com/vaadin/client/ui/orderedlayout/VAbstractOrderedLayout.java
+++ b/client/src/main/java/com/vaadin/client/ui/orderedlayout/VAbstractOrderedLayout.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -67,10 +67,10 @@ public class VAbstractOrderedLayout extends FlowPanel {
/**
* See the method {@link #addOrMoveSlot(Slot, int, boolean)}.
- *
+ *
* <p>
* This method always adjusts spacings for the whole layout.
- *
+ *
* @param slot
* The slot to move or add
* @param index
@@ -93,7 +93,7 @@ public class VAbstractOrderedLayout extends FlowPanel {
* <p>
* For instance when using spacing the index converts to DOM index in the
* following way:
- *
+ *
* <pre>
* index : 0 -> DOM index: 0
* index : 1 -> DOM index: 1
@@ -101,16 +101,16 @@ public class VAbstractOrderedLayout extends FlowPanel {
* index : 3 -> DOM index: 5
* index : 4 -> DOM index: 7
* </pre>
- *
+ *
* When using this method never account for spacings.
* <p>
* The caller should remove all spacings before calling this method and
* re-add them (if necessary) after this method. This can be done before and
* after all slots have been added/moved.
* </p>
- *
+ *
* @since 7.1.4
- *
+ *
* @param slot
* The slot to move or add
* @param index
@@ -120,30 +120,35 @@ public class VAbstractOrderedLayout extends FlowPanel {
* operation
*/
public void addOrMoveSlot(Slot slot, int index, boolean adjustSpacing) {
- Profiler.enter("VAOL.onConnectorHierarchyChange addOrMoveSlot find index");
+ Profiler.enter(
+ "VAOL.onConnectorHierarchyChange addOrMoveSlot find index");
if (slot.getParent() == this) {
int currentIndex = getWidgetIndex(slot);
if (index == currentIndex) {
- Profiler.leave("VAOL.onConnectorHierarchyChange addOrMoveSlot find index");
+ Profiler.leave(
+ "VAOL.onConnectorHierarchyChange addOrMoveSlot find index");
return;
}
}
- Profiler.leave("VAOL.onConnectorHierarchyChange addOrMoveSlot find index");
+ Profiler.leave(
+ "VAOL.onConnectorHierarchyChange addOrMoveSlot find index");
Profiler.enter("VAOL.onConnectorHierarchyChange addOrMoveSlot insert");
insert(slot, index);
Profiler.leave("VAOL.onConnectorHierarchyChange addOrMoveSlot insert");
if (adjustSpacing) {
- Profiler.enter("VAOL.onConnectorHierarchyChange addOrMoveSlot setSpacing");
+ Profiler.enter(
+ "VAOL.onConnectorHierarchyChange addOrMoveSlot setSpacing");
setSpacing(spacing);
- Profiler.leave("VAOL.onConnectorHierarchyChange addOrMoveSlot setSpacing");
+ Profiler.leave(
+ "VAOL.onConnectorHierarchyChange addOrMoveSlot setSpacing");
}
}
/**
* {@inheritDoc}
- *
+ *
* @deprecated As of 7.2, use or override
* {@link #insert(Widget, Element, int, boolean)} instead.
*/
@@ -172,11 +177,11 @@ public class VAbstractOrderedLayout extends FlowPanel {
* Since the spacing elements are located at the same DOM
* level as the slots we need to take them into account when
* calculating the slot position.
- *
+ *
* The spacing elements are always located before the actual
* slot except for the first slot which do not have a
* spacing element like this
- *
+ *
* |<slot1><spacing2><slot2><spacing3><slot3>...|
*/
beforeIndex = beforeIndex * 2 - 1;
@@ -193,7 +198,7 @@ public class VAbstractOrderedLayout extends FlowPanel {
/**
* {@inheritDoc}
- *
+ *
* @since 7.2
*/
@Override
@@ -204,7 +209,7 @@ public class VAbstractOrderedLayout extends FlowPanel {
/**
* Remove a slot from the layout
- *
+ *
* @param widget
* @return
*/
@@ -217,11 +222,11 @@ public class VAbstractOrderedLayout extends FlowPanel {
/**
* Remove a slot from the layout.
- *
+ *
* This method is called automatically by {@link #removeWidget(Widget)} and
* should not be called directly by the user. When overridden, the super
* method must be called.
- *
+ *
* @since 7.6
* @param Slot
* to remove
@@ -233,10 +238,10 @@ public class VAbstractOrderedLayout extends FlowPanel {
/**
* Get the containing slot for a widget. If no slot is found a new slot is
* created and returned.
- *
+ *
* @param widget
* The widget whose slot you want to get
- *
+ *
* @return
*/
public Slot getSlot(Widget widget) {
@@ -250,11 +255,11 @@ public class VAbstractOrderedLayout extends FlowPanel {
/**
* Create a slot to be added to the layout.
- *
+ *
* This method is called automatically by {@link #getSlot(Widget)} when a
* new slot is needed. It should not be called directly by the user, but can
* be overridden to customize slot creation.
- *
+ *
* @since 7.6
* @param widget
* the widget for which a slot is being created
@@ -270,7 +275,7 @@ public class VAbstractOrderedLayout extends FlowPanel {
/**
* Gets a slot based on the widget element. If no slot is found then null is
* returned.
- *
+ *
* @param widgetElement
* The element of the widget ( Same as getWidget().getElement() )
* @return
@@ -289,11 +294,11 @@ public class VAbstractOrderedLayout extends FlowPanel {
/**
* Gets a slot based on the widget element. If no slot is found then null is
* returned.
- *
+ *
* @param widgetElement
* The element of the widget ( Same as getWidget().getElement() )
* @return
- *
+ *
* @since 7.2
*/
public Slot getSlot(Element widgetElement) {
@@ -302,7 +307,7 @@ public class VAbstractOrderedLayout extends FlowPanel {
/**
* Set the layout manager for the layout
- *
+ *
* @param manager
* The layout manager to use
*/
@@ -312,7 +317,7 @@ public class VAbstractOrderedLayout extends FlowPanel {
/**
* Get the layout manager used by this layout
- *
+ *
*/
public LayoutManager getLayoutManager() {
return layoutManager;
@@ -322,10 +327,10 @@ public class VAbstractOrderedLayout extends FlowPanel {
* Deducts the caption position by examining the wrapping element.
* <p>
* For internal use only. May be removed or replaced in the future.
- *
+ *
* @param captionWrap
* The wrapping element
- *
+ *
* @return The caption position
* @deprecated As of 7.2, call or override
* {@link #getCaptionPositionFromElement(Element)} instead
@@ -336,14 +341,14 @@ public class VAbstractOrderedLayout extends FlowPanel {
RegExp captionPositionRegexp = RegExp.compile("v-caption-on-(\\S+)");
// Get caption position from the classname
- MatchResult matcher = captionPositionRegexp.exec(captionWrap
- .getClassName());
+ MatchResult matcher = captionPositionRegexp
+ .exec(captionWrap.getClassName());
if (matcher == null || matcher.getGroupCount() < 2) {
return CaptionPosition.TOP;
}
String captionClass = matcher.getGroup(1);
- CaptionPosition captionPosition = CaptionPosition.valueOf(
- CaptionPosition.class, captionClass.toUpperCase());
+ CaptionPosition captionPosition = CaptionPosition
+ .valueOf(CaptionPosition.class, captionClass.toUpperCase());
return captionPosition;
}
@@ -351,10 +356,10 @@ public class VAbstractOrderedLayout extends FlowPanel {
* Deducts the caption position by examining the wrapping element.
* <p>
* For internal use only. May be removed or replaced in the future.
- *
+ *
* @param captionWrap
* The wrapping element
- *
+ *
* @return The caption position
* @since 7.2
*/
@@ -366,14 +371,15 @@ public class VAbstractOrderedLayout extends FlowPanel {
* Update the offset off the caption relative to the slot
* <p>
* For internal use only. May be removed or replaced in the future.
- *
+ *
* @param caption
* The caption element
* @deprecated As of 7.2, call or override
* {@link #updateCaptionOffset(Element)} instead
*/
@Deprecated
- public void updateCaptionOffset(com.google.gwt.user.client.Element caption) {
+ public void updateCaptionOffset(
+ com.google.gwt.user.client.Element caption) {
Element captionWrap = caption.getParentElement();
@@ -390,7 +396,8 @@ public class VAbstractOrderedLayout extends FlowPanel {
captionStyle.clearMarginLeft();
// Get caption position from the classname
- CaptionPosition captionPosition = getCaptionPositionFromElement(captionWrap);
+ CaptionPosition captionPosition = getCaptionPositionFromElement(
+ captionWrap);
if (captionPosition == CaptionPosition.LEFT
|| captionPosition == CaptionPosition.RIGHT) {
@@ -436,7 +443,7 @@ public class VAbstractOrderedLayout extends FlowPanel {
* Update the offset off the caption relative to the slot
* <p>
* For internal use only. May be removed or replaced in the future.
- *
+ *
* @param caption
* The caption element
* @since 7.2
@@ -447,7 +454,7 @@ public class VAbstractOrderedLayout extends FlowPanel {
/**
* Set the margin of the layout
- *
+ *
* @param marginInfo
* The margin information
*/
@@ -462,7 +469,7 @@ public class VAbstractOrderedLayout extends FlowPanel {
/**
* Turn on or off spacing in the layout
- *
+ *
* @param spacing
* True if spacing should be used, false if not
*/
@@ -627,7 +634,7 @@ public class VAbstractOrderedLayout extends FlowPanel {
* is not considered for relative sizes and a corresponding negative
* margin for the unexpanded slots. We calculate the size by summing
* the size of all non-expanded non-relative slots.
- *
+ *
* Relatively sized slots without expansion are considered to get
* 0px, but we still keep them visible (causing overflows) to help
* the developer see what's happening. Forcing them to only get 0px
@@ -644,22 +651,22 @@ public class VAbstractOrderedLayout extends FlowPanel {
if (layoutManager != null) {
// TODO check caption position
if (vertical) {
- int size = layoutManager.getOuterHeight(slot
- .getWidget().getElement());
+ int size = layoutManager.getOuterHeight(
+ slot.getWidget().getElement());
if (slot.hasCaption()) {
- size += layoutManager.getOuterHeight(slot
- .getCaptionElement());
+ size += layoutManager.getOuterHeight(
+ slot.getCaptionElement());
}
if (size > 0) {
totalSize += size;
}
} else {
int max = -1;
- max = layoutManager.getOuterWidth(slot.getWidget()
- .getElement());
+ max = layoutManager.getOuterWidth(
+ slot.getWidget().getElement());
if (slot.hasCaption()) {
- int max2 = layoutManager.getOuterWidth(slot
- .getCaptionElement());
+ int max2 = layoutManager.getOuterWidth(
+ slot.getCaptionElement());
max = Math.max(max, max2);
}
if (max > 0) {
@@ -668,13 +675,13 @@ public class VAbstractOrderedLayout extends FlowPanel {
}
} else {
// FIXME expandRatio might be <0
- totalSize += vertical ? slot.getOffsetHeight() : slot
- .getOffsetWidth();
+ totalSize += vertical ? slot.getOffsetHeight()
+ : slot.getOffsetWidth();
}
}
// TODO fails in Opera, always returns 0
- int spacingSize = vertical ? slot.getVerticalSpacing() : slot
- .getHorizontalSpacing();
+ int spacingSize = vertical ? slot.getVerticalSpacing()
+ : slot.getHorizontalSpacing();
if (spacingSize > 0) {
totalSize += spacingSize;
}
@@ -702,8 +709,8 @@ public class VAbstractOrderedLayout extends FlowPanel {
// FIXME expandRatio might be <0
if (slot.getExpandRatio() != 0) {
if (layoutManager != null) {
- layoutManager.setNeedsMeasure(Util
- .findConnectorFor(slot.getWidget()));
+ layoutManager.setNeedsMeasure(
+ Util.findConnectorFor(slot.getWidget()));
} else if (slot.getWidget() instanceof RequiresResize) {
((RequiresResize) slot.getWidget()).onResize();
}
@@ -726,7 +733,7 @@ public class VAbstractOrderedLayout extends FlowPanel {
/**
* Sets the slots style names. The style names will be prefixed with the
* v-slot prefix.
- *
+ *
* @param stylenames
* The style names of the slot.
*/
diff --git a/client/src/main/java/com/vaadin/client/ui/orderedlayout/VerticalLayoutConnector.java b/client/src/main/java/com/vaadin/client/ui/orderedlayout/VerticalLayoutConnector.java
index 33ff020e89..02669c3d98 100644
--- a/client/src/main/java/com/vaadin/client/ui/orderedlayout/VerticalLayoutConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/orderedlayout/VerticalLayoutConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,10 +30,9 @@ public class VerticalLayoutConnector extends AbstractOrderedLayoutConnector {
/*
* (non-Javadoc)
- *
- * @see
- * com.vaadin.client.ui.orderedlayout.AbstractOrderedLayoutConnector#getWidget
- * ()
+ *
+ * @see com.vaadin.client.ui.orderedlayout.AbstractOrderedLayoutConnector#
+ * getWidget ()
*/
@Override
public VVerticalLayout getWidget() {
diff --git a/client/src/main/java/com/vaadin/client/ui/panel/PanelConnector.java b/client/src/main/java/com/vaadin/client/ui/panel/PanelConnector.java
index 11111df602..5766851bba 100644
--- a/client/src/main/java/com/vaadin/client/ui/panel/PanelConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/panel/PanelConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -92,8 +92,8 @@ public class PanelConnector extends AbstractSingleComponentContainerConnector
// Restore default stylenames
getWidget().contentNode.setClassName(VPanel.CLASSNAME + "-content");
- getWidget().bottomDecoration.setClassName(VPanel.CLASSNAME
- + "-deco");
+ getWidget().bottomDecoration
+ .setClassName(VPanel.CLASSNAME + "-deco");
getWidget().captionNode.setClassName(VPanel.CLASSNAME + "-caption");
boolean hasCaption = false;
if (getState().caption != null && !"".equals(getState().caption)) {
@@ -101,8 +101,8 @@ public class PanelConnector extends AbstractSingleComponentContainerConnector
hasCaption = true;
} else {
getWidget().setCaption("");
- getWidget().captionNode.setClassName(VPanel.CLASSNAME
- + "-nocaption");
+ getWidget().captionNode
+ .setClassName(VPanel.CLASSNAME + "-nocaption");
}
// Add proper stylenames for all elements. This way we can prevent
@@ -202,8 +202,8 @@ public class PanelConnector extends AbstractSingleComponentContainerConnector
Profiler.enter("PanelConnector.layout modify style");
Style style = panel.getElement().getStyle();
- panel.captionNode.getParentElement().getStyle()
- .setMarginTop(-top, Unit.PX);
+ panel.captionNode.getParentElement().getStyle().setMarginTop(-top,
+ Unit.PX);
panel.bottomDecoration.getStyle().setMarginBottom(-bottom, Unit.PX);
style.setPaddingTop(top, Unit.PX);
style.setPaddingBottom(bottom, Unit.PX);
@@ -248,7 +248,8 @@ public class PanelConnector extends AbstractSingleComponentContainerConnector
}
@Override
- public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent event) {
+ public void onConnectorHierarchyChange(
+ ConnectorHierarchyChangeEvent event) {
// We always have 1 child, unless the child is hidden
getWidget().setWidget(getContentWidget());
}
diff --git a/client/src/main/java/com/vaadin/client/ui/passwordfield/PasswordFieldConnector.java b/client/src/main/java/com/vaadin/client/ui/passwordfield/PasswordFieldConnector.java
index 61576fac04..1465ab98fb 100644
--- a/client/src/main/java/com/vaadin/client/ui/passwordfield/PasswordFieldConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/passwordfield/PasswordFieldConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/popupview/PopupViewConnector.java b/client/src/main/java/com/vaadin/client/ui/popupview/PopupViewConnector.java
index 6afceb75de..b29c22529b 100644
--- a/client/src/main/java/com/vaadin/client/ui/popupview/PopupViewConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/popupview/PopupViewConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -107,8 +107,8 @@ public class PopupViewConnector extends AbstractHasComponentsConnector
styleBuf.append(primaryName);
// Add "animate-in" class back if already present
- boolean isAnimatingIn = getWidget().popup.getStyleName().contains(
- VOverlay.ADDITIONAL_CLASSNAME_ANIMATE_IN);
+ boolean isAnimatingIn = getWidget().popup.getStyleName()
+ .contains(VOverlay.ADDITIONAL_CLASSNAME_ANIMATE_IN);
if (isAnimatingIn) {
styleBuf.append(" ");
@@ -138,8 +138,8 @@ public class PopupViewConnector extends AbstractHasComponentsConnector
@Override
public void onVisibilityChange(VisibilityChangeEvent event) {
- getRpcProxy(PopupViewServerRpc.class).setPopupVisibility(
- event.isVisible());
+ getRpcProxy(PopupViewServerRpc.class)
+ .setPopupVisibility(event.isVisible());
}
}
diff --git a/client/src/main/java/com/vaadin/client/ui/popupview/VisibilityChangeEvent.java b/client/src/main/java/com/vaadin/client/ui/popupview/VisibilityChangeEvent.java
index 8db2d1cb85..0bbdd39adf 100644
--- a/client/src/main/java/com/vaadin/client/ui/popupview/VisibilityChangeEvent.java
+++ b/client/src/main/java/com/vaadin/client/ui/popupview/VisibilityChangeEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/popupview/VisibilityChangeHandler.java b/client/src/main/java/com/vaadin/client/ui/popupview/VisibilityChangeHandler.java
index 3c5e09d1fc..b557cbec4d 100644
--- a/client/src/main/java/com/vaadin/client/ui/popupview/VisibilityChangeHandler.java
+++ b/client/src/main/java/com/vaadin/client/ui/popupview/VisibilityChangeHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/progressindicator/ProgressBarConnector.java b/client/src/main/java/com/vaadin/client/ui/progressindicator/ProgressBarConnector.java
index 3a83430f7a..010a948b90 100644
--- a/client/src/main/java/com/vaadin/client/ui/progressindicator/ProgressBarConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/progressindicator/ProgressBarConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.ui.ProgressBar;
/**
* Connector for {@link VProgressBar}.
- *
+ *
* @since 7.1
* @author Vaadin Ltd
*/
diff --git a/client/src/main/java/com/vaadin/client/ui/progressindicator/ProgressIndicatorConnector.java b/client/src/main/java/com/vaadin/client/ui/progressindicator/ProgressIndicatorConnector.java
index 36bb1dd6b2..bbef5a0bf2 100644
--- a/client/src/main/java/com/vaadin/client/ui/progressindicator/ProgressIndicatorConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/progressindicator/ProgressIndicatorConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,7 +27,7 @@ import com.vaadin.ui.ProgressIndicator;
/**
* Connector for {@link VProgressBar} with polling support.
- *
+ *
* @since 7.0
* @author Vaadin Ltd
* @deprecated as of 7.1, use {@link ProgressBarConnector} combined with server
diff --git a/client/src/main/java/com/vaadin/client/ui/richtextarea/RichTextAreaConnector.java b/client/src/main/java/com/vaadin/client/ui/richtextarea/RichTextAreaConnector.java
index bcf61a9338..7b50f08231 100644
--- a/client/src/main/java/com/vaadin/client/ui/richtextarea/RichTextAreaConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/richtextarea/RichTextAreaConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -80,8 +80,8 @@ public class RichTextAreaConnector extends AbstractFieldConnector implements
getWidget().setEnabled(isEnabled());
getWidget().setReadOnly(isReadOnly());
getWidget().immediate = getState().immediate;
- int newMaxLength = uidl.hasAttribute("maxLength") ? uidl
- .getIntAttribute("maxLength") : -1;
+ int newMaxLength = uidl.hasAttribute("maxLength")
+ ? uidl.getIntAttribute("maxLength") : -1;
if (newMaxLength >= 0) {
if (getWidget().maxLength == -1) {
getWidget().keyPressHandler = getWidget().rta
@@ -125,10 +125,10 @@ public class RichTextAreaConnector extends AbstractFieldConnector implements
@Override
public void layout() {
if (!isUndefinedHeight()) {
- int rootElementInnerHeight = getLayoutManager().getInnerHeight(
- getWidget().getElement());
- int formatterHeight = getLayoutManager().getOuterHeight(
- getWidget().formatter.getElement());
+ int rootElementInnerHeight = getLayoutManager()
+ .getInnerHeight(getWidget().getElement());
+ int formatterHeight = getLayoutManager()
+ .getOuterHeight(getWidget().formatter.getElement());
int editorHeight = rootElementInnerHeight - formatterHeight;
if (editorHeight < 0) {
editorHeight = 0;
diff --git a/client/src/main/java/com/vaadin/client/ui/richtextarea/VRichTextToolbar.java b/client/src/main/java/com/vaadin/client/ui/richtextarea/VRichTextToolbar.java
index 2e0554c499..690d8cdacf 100644
--- a/client/src/main/java/com/vaadin/client/ui/richtextarea/VRichTextToolbar.java
+++ b/client/src/main/java/com/vaadin/client/ui/richtextarea/VRichTextToolbar.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -181,27 +181,27 @@ public class VRichTextToolbar extends Composite {
* We use an inner EventHandler class to avoid exposing event methods on the
* RichTextToolbar itself.
*/
- private class EventHandler implements ClickHandler, ChangeHandler,
- KeyUpHandler {
+ private class EventHandler
+ implements ClickHandler, ChangeHandler, KeyUpHandler {
@Override
@SuppressWarnings("deprecation")
public void onChange(ChangeEvent event) {
Object sender = event.getSource();
if (sender == backColors) {
- basic.setBackColor(backColors.getValue(backColors
- .getSelectedIndex()));
+ basic.setBackColor(
+ backColors.getValue(backColors.getSelectedIndex()));
backColors.setSelectedIndex(0);
} else if (sender == foreColors) {
- basic.setForeColor(foreColors.getValue(foreColors
- .getSelectedIndex()));
+ basic.setForeColor(
+ foreColors.getValue(foreColors.getSelectedIndex()));
foreColors.setSelectedIndex(0);
} else if (sender == fonts) {
basic.setFontName(fonts.getValue(fonts.getSelectedIndex()));
fonts.setSelectedIndex(0);
} else if (sender == fontSizes) {
- basic.setFontSize(fontSizesConstants[fontSizes
- .getSelectedIndex() - 1]);
+ basic.setFontSize(
+ fontSizesConstants[fontSizes.getSelectedIndex() - 1]);
fontSizes.setSelectedIndex(0);
}
}
@@ -239,8 +239,8 @@ public class VRichTextToolbar extends Composite {
extended.insertImage(url);
}
} else if (sender == createLink) {
- final String url = Window
- .prompt("Enter a link URL:", "http://");
+ final String url = Window.prompt("Enter a link URL:",
+ "http://");
if (url != null) {
extended.createLink(url);
}
@@ -320,7 +320,7 @@ public class VRichTextToolbar extends Composite {
/**
* Creates a new toolbar that drives the given rich text area.
- *
+ *
* @param richText
* the rich text area to be controlled
*/
@@ -339,8 +339,8 @@ public class VRichTextToolbar extends Composite {
setStyleName("gwt-RichTextToolbar");
if (basic != null) {
- topPanel.add(bold = createToggleButton(images.bold(),
- strings.bold()));
+ topPanel.add(
+ bold = createToggleButton(images.bold(), strings.bold()));
topPanel.add(italic = createToggleButton(images.italic(),
strings.italic()));
topPanel.add(underline = createToggleButton(images.underline(),
diff --git a/client/src/main/java/com/vaadin/client/ui/slider/SliderConnector.java b/client/src/main/java/com/vaadin/client/ui/slider/SliderConnector.java
index 8c3c0254d3..1128ba5100 100644
--- a/client/src/main/java/com/vaadin/client/ui/slider/SliderConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/slider/SliderConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,11 +29,11 @@ import com.vaadin.shared.ui.slider.SliderState;
import com.vaadin.ui.Slider;
@Connect(Slider.class)
-public class SliderConnector extends AbstractFieldConnector implements
- ValueChangeHandler<Double> {
+public class SliderConnector extends AbstractFieldConnector
+ implements ValueChangeHandler<Double> {
- protected SliderServerRpc rpc = RpcProxy
- .create(SliderServerRpc.class, this);
+ protected SliderServerRpc rpc = RpcProxy.create(SliderServerRpc.class,
+ this);
private final ElementResizeListener resizeListener = new ElementResizeListener() {
@@ -56,8 +56,8 @@ public class SliderConnector extends AbstractFieldConnector implements
@Override
public void onUnregister() {
super.onUnregister();
- getLayoutManager().removeElementResizeListener(
- getWidget().getElement(), resizeListener);
+ getLayoutManager().removeElementResizeListener(getWidget().getElement(),
+ resizeListener);
}
@Override
diff --git a/client/src/main/java/com/vaadin/client/ui/splitpanel/AbstractSplitPanelConnector.java b/client/src/main/java/com/vaadin/client/ui/splitpanel/AbstractSplitPanelConnector.java
index 6bf03ad880..b9ae29a89e 100644
--- a/client/src/main/java/com/vaadin/client/ui/splitpanel/AbstractSplitPanelConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/splitpanel/AbstractSplitPanelConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -62,15 +62,15 @@ public abstract class AbstractSplitPanelConnector extends
// Send % values as a fraction to avoid that the splitter
// "jumps" when server responds with the integer pct value
// (e.g. dragged 16.6% -> should not jump to 17%)
- pos = Float.valueOf(position.substring(0,
- position.length() - 1));
+ pos = Float.valueOf(
+ position.substring(0, position.length() - 1));
} else {
- pos = Integer.parseInt(position.substring(0,
- position.length() - 2));
+ pos = Integer.parseInt(
+ position.substring(0, position.length() - 2));
}
- getRpcProxy(AbstractSplitPanelRpc.class).setSplitterPosition(
- pos);
+ getRpcProxy(AbstractSplitPanelRpc.class)
+ .setSplitterPosition(pos);
}
}, SplitterMoveEvent.TYPE);
@@ -86,8 +86,8 @@ public abstract class AbstractSplitPanelConnector extends
@Override
protected <H extends EventHandler> HandlerRegistration registerHandler(
H handler, Type<H> type) {
- if ((Event.getEventsSunk(getWidget().splitter) & Event
- .getTypeInt(type.getName())) != 0) {
+ if ((Event.getEventsSunk(getWidget().splitter)
+ & Event.getTypeInt(type.getName())) != 0) {
// If we are already sinking the event for the splitter we do
// not want to additionally sink it for the root element
return getWidget().addHandler(handler, type);
@@ -208,14 +208,14 @@ public abstract class AbstractSplitPanelConnector extends
LayoutManager layoutManager = getLayoutManager();
if (this instanceof HorizontalSplitPanelConnector) {
if (child.isRelativeHeight()) {
- int height = layoutManager.getInnerHeight(getWidget()
- .getElement());
+ int height = layoutManager
+ .getInnerHeight(getWidget().getElement());
layoutManager.reportHeightAssignedToRelative(child, height);
}
} else {
if (child.isRelativeWidth()) {
- int width = layoutManager.getInnerWidth(getWidget()
- .getElement());
+ int width = layoutManager
+ .getInnerWidth(getWidget().getElement());
layoutManager.reportWidthAssignedToRelative(child, width);
}
}
@@ -240,7 +240,8 @@ public abstract class AbstractSplitPanelConnector extends
}
@Override
- public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent event) {
+ public void onConnectorHierarchyChange(
+ ConnectorHierarchyChangeEvent event) {
handleHierarchyChange();
}
diff --git a/client/src/main/java/com/vaadin/client/ui/splitpanel/HorizontalSplitPanelConnector.java b/client/src/main/java/com/vaadin/client/ui/splitpanel/HorizontalSplitPanelConnector.java
index 75389b6cc4..a31cb979ad 100644
--- a/client/src/main/java/com/vaadin/client/ui/splitpanel/HorizontalSplitPanelConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/splitpanel/HorizontalSplitPanelConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/splitpanel/VerticalSplitPanelConnector.java b/client/src/main/java/com/vaadin/client/ui/splitpanel/VerticalSplitPanelConnector.java
index e95f7143ba..5daf738c4e 100644
--- a/client/src/main/java/com/vaadin/client/ui/splitpanel/VerticalSplitPanelConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/splitpanel/VerticalSplitPanelConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/table/TableConnector.java b/client/src/main/java/com/vaadin/client/ui/table/TableConnector.java
index cfe93b6641..87685f3e15 100644
--- a/client/src/main/java/com/vaadin/client/ui/table/TableConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/table/TableConnector.java
@@ -54,9 +54,9 @@ import com.vaadin.shared.ui.table.TableServerRpc;
import com.vaadin.shared.ui.table.TableState;
@Connect(com.vaadin.ui.Table.class)
-public class TableConnector extends AbstractFieldConnector implements
- HasComponentsConnector, ConnectorHierarchyChangeHandler, Paintable,
- DirectionalManagedLayout, PostLayoutListener,
+public class TableConnector extends AbstractFieldConnector
+ implements HasComponentsConnector, ConnectorHierarchyChangeHandler,
+ Paintable, DirectionalManagedLayout, PostLayoutListener,
HasChildMeasurementHintConnector {
private List<ComponentConnector> childComponents;
@@ -73,7 +73,7 @@ public class TableConnector extends AbstractFieldConnector implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.ui.AbstractComponentConnector#onUnregister()
*/
@Override
@@ -113,8 +113,9 @@ public class TableConnector extends AbstractFieldConnector implements
*/
if (w != null) {
rowKey = w.getKey();
- colKey = getWidget().tHead.getHeaderCell(
- getElementIndex(e, w.getElement())).getColKey();
+ colKey = getWidget().tHead
+ .getHeaderCell(getElementIndex(e, w.getElement()))
+ .getColKey();
}
}
}
@@ -142,7 +143,7 @@ public class TableConnector extends AbstractFieldConnector implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.Paintable#updateFromUIDL(com.vaadin.client.UIDL,
* com.vaadin.client.ApplicationConnection)
*/
@@ -190,8 +191,8 @@ public class TableConnector extends AbstractFieldConnector implements
getWidget().updateDragMode(uidl);
// Update child measure hint
- int childMeasureHint = uidl.hasAttribute("measurehint") ? uidl
- .getIntAttribute("measurehint") : 0;
+ int childMeasureHint = uidl.hasAttribute("measurehint")
+ ? uidl.getIntAttribute("measurehint") : 0;
getWidget().setChildMeasurementHint(
ChildMeasurementHint.values()[childMeasureHint]);
@@ -251,8 +252,8 @@ public class TableConnector extends AbstractFieldConnector implements
// sanity check (in case the value has slipped beyond the total
// amount of rows)
- getWidget().scrollBody.setLastRendered(getWidget().scrollBody
- .getLastRendered());
+ getWidget().scrollBody
+ .setLastRendered(getWidget().scrollBody.getLastRendered());
getWidget().updateMaxIndent();
} else {
getWidget().postponeSanityCheckForLastRendered = false;
@@ -284,11 +285,11 @@ public class TableConnector extends AbstractFieldConnector implements
showSavedContextMenu(contextMenuBeforeUpdate);
if (!getWidget().isSelectable()) {
- getWidget().scrollBody.addStyleName(getWidget()
- .getStylePrimaryName() + "-body-noselection");
+ getWidget().scrollBody.addStyleName(
+ getWidget().getStylePrimaryName() + "-body-noselection");
} else {
- getWidget().scrollBody.removeStyleName(getWidget()
- .getStylePrimaryName() + "-body-noselection");
+ getWidget().scrollBody.removeStyleName(
+ getWidget().getStylePrimaryName() + "-body-noselection");
}
getWidget().hideScrollPositionAnnotation();
@@ -326,21 +327,19 @@ public class TableConnector extends AbstractFieldConnector implements
if (getWidget().focusedRow != null) {
if (!getWidget().focusedRow.isAttached()
- && !getWidget().rowRequestHandler.isRequestHandlerRunning()) {
+ && !getWidget().rowRequestHandler
+ .isRequestHandlerRunning()) {
// focused row has been orphaned, can't focus
- if (getWidget().selectedRowKeys.contains(getWidget().focusedRow
- .getKey())) {
+ if (getWidget().selectedRowKeys
+ .contains(getWidget().focusedRow.getKey())) {
// if row cache was refreshed, focused row should be
// in selection and exists with same index
- getWidget().setRowFocus(
- getWidget().getRenderedRowByKey(
- getWidget().focusedRow.getKey()));
+ getWidget().setRowFocus(getWidget().getRenderedRowByKey(
+ getWidget().focusedRow.getKey()));
} else if (getWidget().selectedRowKeys.size() > 0) {
// try to focus any row in selection
- getWidget().setRowFocus(
- getWidget().getRenderedRowByKey(
- getWidget().selectedRowKeys.iterator()
- .next()));
+ getWidget().setRowFocus(getWidget().getRenderedRowByKey(
+ getWidget().selectedRowKeys.iterator().next()));
} else {
// try to focus any row
getWidget().focusRowFromBody();
@@ -356,7 +355,8 @@ public class TableConnector extends AbstractFieldConnector implements
* (#8584)
*/
if (uidl.hasAttribute(TableConstants.ATTRIBUTE_KEY_MAPPER_RESET)
- && uidl.getBooleanAttribute(TableConstants.ATTRIBUTE_KEY_MAPPER_RESET)
+ && uidl.getBooleanAttribute(
+ TableConstants.ATTRIBUTE_KEY_MAPPER_RESET)
&& getWidget().selectionRangeStart != null) {
assert !getWidget().selectionRangeStart.isAttached();
getWidget().selectionRangeStart = getWidget().focusedRow;
@@ -437,11 +437,11 @@ public class TableConnector extends AbstractFieldConnector implements
getLayoutManager().setNeedsMeasure(TableConnector.this);
ServerConnector parent = getParent();
if (parent instanceof ComponentConnector) {
- getLayoutManager().setNeedsMeasure(
- (ComponentConnector) parent);
+ getLayoutManager()
+ .setNeedsMeasure((ComponentConnector) parent);
}
- getLayoutManager().setNeedsVerticalLayout(
- TableConnector.this);
+ getLayoutManager()
+ .setNeedsVerticalLayout(TableConnector.this);
getLayoutManager().layoutNow();
}
});
@@ -461,7 +461,7 @@ public class TableConnector extends AbstractFieldConnector implements
/**
* Shows a saved row context menu if the row for the context menu is still
* visible. Does nothing if a context menu has not been saved.
- *
+ *
* @param savedContextMenu
*/
public void showSavedContextMenu(ContextMenuDetails savedContextMenu) {
@@ -544,8 +544,8 @@ public class TableConnector extends AbstractFieldConnector implements
@Override
public HandlerRegistration addConnectorHierarchyChangeHandler(
ConnectorHierarchyChangeHandler handler) {
- return ensureHandlerManager().addHandler(
- ConnectorHierarchyChangeEvent.TYPE, handler);
+ return ensureHandlerManager()
+ .addHandler(ConnectorHierarchyChangeEvent.TYPE, handler);
}
@Override
diff --git a/client/src/main/java/com/vaadin/client/ui/tabsheet/TabsheetBaseConnector.java b/client/src/main/java/com/vaadin/client/ui/tabsheet/TabsheetBaseConnector.java
index 9de415e74e..e149235b6f 100644
--- a/client/src/main/java/com/vaadin/client/ui/tabsheet/TabsheetBaseConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/tabsheet/TabsheetBaseConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,12 +26,12 @@ import com.vaadin.client.ui.VTabsheetBase;
import com.vaadin.shared.ui.tabsheet.TabState;
import com.vaadin.shared.ui.tabsheet.TabsheetState;
-public abstract class TabsheetBaseConnector extends
- AbstractComponentContainerConnector {
+public abstract class TabsheetBaseConnector
+ extends AbstractComponentContainerConnector {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.ui.AbstractConnector#init()
*/
@Override
@@ -43,7 +43,7 @@ public abstract class TabsheetBaseConnector extends
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.client.ui.AbstractComponentConnector#onStateChanged(com.vaadin
* .client.communication.StateChangeEvent)
@@ -57,8 +57,8 @@ public abstract class TabsheetBaseConnector extends
// Widgets in the TabSheet before update
ArrayList<Widget> oldWidgets = new ArrayList<Widget>();
- for (Iterator<Widget> iterator = getWidget().getWidgetIterator(); iterator
- .hasNext();) {
+ for (Iterator<Widget> iterator = getWidget()
+ .getWidgetIterator(); iterator.hasNext();) {
oldWidgets.add(iterator.next());
}
diff --git a/client/src/main/java/com/vaadin/client/ui/tabsheet/TabsheetConnector.java b/client/src/main/java/com/vaadin/client/ui/tabsheet/TabsheetConnector.java
index 1b043c8a51..1dcb517e96 100644
--- a/client/src/main/java/com/vaadin/client/ui/tabsheet/TabsheetConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/tabsheet/TabsheetConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,8 +30,8 @@ import com.vaadin.shared.ui.tabsheet.TabsheetClientRpc;
import com.vaadin.ui.TabSheet;
@Connect(TabSheet.class)
-public class TabsheetConnector extends TabsheetBaseConnector implements
- SimpleManagedLayout, MayScrollChildren {
+public class TabsheetConnector extends TabsheetBaseConnector
+ implements SimpleManagedLayout, MayScrollChildren {
public TabsheetConnector() {
registerRpc(TabsheetClientRpc.class, new TabsheetClientRpc() {
@@ -60,7 +60,7 @@ public class TabsheetConnector extends TabsheetBaseConnector implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.client.ui.AbstractComponentConnector#onStateChanged(com.vaadin
* .client.communication.StateChangeEvent)
diff --git a/client/src/main/java/com/vaadin/client/ui/textarea/TextAreaConnector.java b/client/src/main/java/com/vaadin/client/ui/textarea/TextAreaConnector.java
index 3bc0a86df4..bf51590e64 100644
--- a/client/src/main/java/com/vaadin/client/ui/textarea/TextAreaConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/textarea/TextAreaConnector.java
@@ -57,7 +57,8 @@ public class TextAreaConnector extends TextFieldConnector {
updateSize(element.getStyle().getHeight(), getState().height,
"height");
- updateSize(element.getStyle().getWidth(), getState().width, "width");
+ updateSize(element.getStyle().getWidth(), getState().width,
+ "width");
}
/*
@@ -82,8 +83,8 @@ public class TextAreaConnector extends TextFieldConnector {
return;
}
- getConnection().updateVariable(getConnectorId(), sizeType,
- sizeText, false);
+ getConnection().updateVariable(getConnectorId(), sizeType, sizeText,
+ false);
}
}
diff --git a/client/src/main/java/com/vaadin/client/ui/textfield/TextFieldConnector.java b/client/src/main/java/com/vaadin/client/ui/textfield/TextFieldConnector.java
index 0d85e98ee3..ed47e61d27 100644
--- a/client/src/main/java/com/vaadin/client/ui/textfield/TextFieldConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/textfield/TextFieldConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -33,8 +33,8 @@ import com.vaadin.shared.ui.textfield.TextFieldConstants;
import com.vaadin.ui.TextField;
@Connect(value = TextField.class, loadStyle = LoadStyle.EAGER)
-public class TextFieldConnector extends AbstractFieldConnector implements
- Paintable, BeforeShortcutActionListener {
+public class TextFieldConnector extends AbstractFieldConnector
+ implements Paintable, BeforeShortcutActionListener {
@Override
public AbstractTextFieldState getState() {
@@ -59,14 +59,14 @@ public class TextFieldConnector extends AbstractFieldConnector implements
getWidget().listenTextChangeEvents = hasEventListener("ie");
if (getWidget().listenTextChangeEvents) {
- getWidget().textChangeEventMode = uidl
- .getStringAttribute(TextFieldConstants.ATTR_TEXTCHANGE_EVENTMODE);
+ getWidget().textChangeEventMode = uidl.getStringAttribute(
+ TextFieldConstants.ATTR_TEXTCHANGE_EVENTMODE);
if (getWidget().textChangeEventMode
.equals(TextFieldConstants.TEXTCHANGE_MODE_EAGER)) {
getWidget().textChangeEventTimeout = 1;
} else {
- getWidget().textChangeEventTimeout = uidl
- .getIntAttribute(TextFieldConstants.ATTR_TEXTCHANGE_TIMEOUT);
+ getWidget().textChangeEventTimeout = uidl.getIntAttribute(
+ TextFieldConstants.ATTR_TEXTCHANGE_TIMEOUT);
if (getWidget().textChangeEventTimeout < 1) {
// Sanitize and allow lazy/timeout with timeout set to 0 to
// work as eager
@@ -90,7 +90,8 @@ public class TextFieldConnector extends AbstractFieldConnector implements
* force updating if not focused. Lost focus issue appeared in (#15144)
*/
if (!(Util.getFocusedElement() == getWidget().getElement())
- || !uidl.getBooleanAttribute(TextFieldConstants.ATTR_NO_VALUE_CHANGE_BETWEEN_PAINTS)
+ || !uidl.getBooleanAttribute(
+ TextFieldConstants.ATTR_NO_VALUE_CHANGE_BETWEEN_PAINTS)
|| getWidget().valueBeforeEdit == null
|| !text.equals(getWidget().valueBeforeEdit)) {
getWidget().updateFieldContent(text);
diff --git a/client/src/main/java/com/vaadin/client/ui/tree/TreeConnector.java b/client/src/main/java/com/vaadin/client/ui/tree/TreeConnector.java
index f49f44e802..8738120801 100644
--- a/client/src/main/java/com/vaadin/client/ui/tree/TreeConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/tree/TreeConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -43,8 +43,8 @@ import com.vaadin.shared.ui.tree.TreeState;
import com.vaadin.ui.Tree;
@Connect(Tree.class)
-public class TreeConnector extends AbstractComponentConnector implements
- Paintable {
+public class TreeConnector extends AbstractComponentConnector
+ implements Paintable {
protected final Map<TreeNode, TooltipInfo> tooltipMap = new HashMap<TreeNode, TooltipInfo>();
@@ -80,8 +80,8 @@ public class TreeConnector extends AbstractComponentConnector implements
getWidget().disabled = !isEnabled();
getWidget().readonly = isReadOnly();
- getWidget().dragMode = uidl.hasAttribute("dragMode") ? uidl
- .getIntAttribute("dragMode") : 0;
+ getWidget().dragMode = uidl.hasAttribute("dragMode")
+ ? uidl.getIntAttribute("dragMode") : 0;
getWidget().isNullSelectionAllowed = uidl
.getBooleanAttribute("nullselect");
@@ -133,8 +133,8 @@ public class TreeConnector extends AbstractComponentConnector implements
// shift/ctrl keys (#8595)
getWidget().multiSelectMode = MultiSelectMode.SIMPLE;
} else {
- getWidget().multiSelectMode = MultiSelectMode.valueOf(uidl
- .getStringAttribute("multiselectmode"));
+ getWidget().multiSelectMode = MultiSelectMode
+ .valueOf(uidl.getStringAttribute("multiselectmode"));
}
} else {
Roles.getTreeRole().setAriaMultiselectableProperty(
@@ -148,8 +148,8 @@ public class TreeConnector extends AbstractComponentConnector implements
// and keyboard navigation issues as described in #7057 and other
// tickets.
if (getWidget().lastSelection != null) {
- getWidget().lastSelection = getWidget().getNodeByKey(
- getWidget().lastSelection.key);
+ getWidget().lastSelection = getWidget()
+ .getNodeByKey(getWidget().lastSelection.key);
}
if (getWidget().focusedNode != null) {
@@ -171,12 +171,10 @@ public class TreeConnector extends AbstractComponentConnector implements
}
}
- if (getWidget().lastSelection == null
- && getWidget().focusedNode == null
+ if (getWidget().lastSelection == null && getWidget().focusedNode == null
&& !getWidget().selectedIds.isEmpty()) {
- getWidget().setFocusedNode(
- getWidget().getNodeByKey(
- getWidget().selectedIds.iterator().next()));
+ getWidget().setFocusedNode(getWidget()
+ .getNodeByKey(getWidget().selectedIds.iterator().next()));
getWidget().focusedNode.setFocused(false);
}
@@ -200,8 +198,8 @@ public class TreeConnector extends AbstractComponentConnector implements
}
private void handleUpdate(UIDL uidl) {
- final TreeNode rootNode = getWidget().getNodeByKey(
- uidl.getStringAttribute("rootKey"));
+ final TreeNode rootNode = getWidget()
+ .getNodeByKey(uidl.getStringAttribute("rootKey"));
if (rootNode != null) {
if (!rootNode.getState()) {
// expanding node happened server side
@@ -224,7 +222,7 @@ public class TreeConnector extends AbstractComponentConnector implements
/**
* Registers action for the root and also for individual nodes
- *
+ *
* @param uidl
*/
private void updateActionMap(UIDL uidl) {
@@ -237,8 +235,8 @@ public class TreeConnector extends AbstractComponentConnector implements
String iconUrl = null;
if (action.hasAttribute(TreeConstants.ATTRIBUTE_ACTION_ICON)) {
iconUrl = getConnection()
- .translateVaadinUri(
- action.getStringAttribute(TreeConstants.ATTRIBUTE_ACTION_ICON));
+ .translateVaadinUri(action.getStringAttribute(
+ TreeConstants.ATTRIBUTE_ACTION_ICON));
}
getWidget().registerAction(key, caption, iconUrl);
}
@@ -283,8 +281,8 @@ public class TreeConnector extends AbstractComponentConnector implements
String description = uidl.getStringAttribute("descr");
if (description != null) {
- tooltipMap.put(treeNode, new TooltipInfo(description, null,
- treeNode));
+ tooltipMap.put(treeNode,
+ new TooltipInfo(description, null, treeNode));
}
if (uidl.getBooleanAttribute("expanded") && !treeNode.getState()) {
@@ -321,9 +319,8 @@ public class TreeConnector extends AbstractComponentConnector implements
updateNodeFromUIDL(childTree, childUidl, level);
containerNode.childNodeContainer.add(childTree);
if (!i.hasNext()) {
- childTree
- .addStyleDependentName(childTree.isLeaf() ? "leaf-last"
- : "last");
+ childTree.addStyleDependentName(
+ childTree.isLeaf() ? "leaf-last" : "last");
childTree.childNodeContainer.addStyleDependentName("last");
}
}
diff --git a/client/src/main/java/com/vaadin/client/ui/treetable/TreeTableConnector.java b/client/src/main/java/com/vaadin/client/ui/treetable/TreeTableConnector.java
index 0e0c190c11..410787fe27 100644
--- a/client/src/main/java/com/vaadin/client/ui/treetable/TreeTableConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/treetable/TreeTableConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -43,10 +43,11 @@ public class TreeTableConnector extends TableConnector {
scrollPosition = widget.getScrollPosition();
}
getWidget().animationsEnabled = uidl.getBooleanAttribute("animate");
- getWidget().colIndexOfHierarchy = uidl
- .hasAttribute(TreeTableConstants.ATTRIBUTE_HIERARCHY_COLUMN_INDEX) ? uidl
- .getIntAttribute(TreeTableConstants.ATTRIBUTE_HIERARCHY_COLUMN_INDEX)
- : 0;
+ getWidget().colIndexOfHierarchy = uidl.hasAttribute(
+ TreeTableConstants.ATTRIBUTE_HIERARCHY_COLUMN_INDEX)
+ ? uidl.getIntAttribute(
+ TreeTableConstants.ATTRIBUTE_HIERARCHY_COLUMN_INDEX)
+ : 0;
int oldTotalRows = getWidget().getTotalRows();
super.updateFromUIDL(uidl, client);
@@ -57,8 +58,8 @@ public class TreeTableConnector extends TableConnector {
if (getWidget().collapseRequest) {
if (getWidget().collapsedRowKey != null
&& getWidget().scrollBody != null) {
- VScrollTableRow row = getWidget().getRenderedRowByKey(
- getWidget().collapsedRowKey);
+ VScrollTableRow row = getWidget()
+ .getRenderedRowByKey(getWidget().collapsedRowKey);
if (row != null) {
getWidget().setRowFocus(row);
getWidget().focus();
@@ -76,9 +77,8 @@ public class TreeTableConnector extends TableConnector {
}
// Recalculate table size if collapse request, or if page length is zero
// (not sent by server) and row count changes (#7908).
- if (getWidget().collapseRequest
- || (!uidl.hasAttribute("pagelength") && getWidget()
- .getTotalRows() != oldTotalRows)) {
+ if (getWidget().collapseRequest || (!uidl.hasAttribute("pagelength")
+ && getWidget().getTotalRows() != oldTotalRows)) {
/*
* Ensure that possibly removed/added scrollbars are considered.
* Triggers row calculations, removes cached rows etc. Basically
@@ -107,8 +107,8 @@ public class TreeTableConnector extends TableConnector {
// potential content changes pending
PendingNavigationEvent event = getWidget().pendingNavigationEvents
.removeFirst();
- getWidget()
- .handleNavigation(event.keycode, event.ctrl, event.shift);
+ getWidget().handleNavigation(event.keycode, event.ctrl,
+ event.shift);
}
getWidget().rendering = false;
}
diff --git a/client/src/main/java/com/vaadin/client/ui/twincolselect/TwinColSelectConnector.java b/client/src/main/java/com/vaadin/client/ui/twincolselect/TwinColSelectConnector.java
index 0994ac15c3..b0e6232f88 100644
--- a/client/src/main/java/com/vaadin/client/ui/twincolselect/TwinColSelectConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/twincolselect/TwinColSelectConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,8 +26,8 @@ import com.vaadin.shared.ui.twincolselect.TwinColSelectState;
import com.vaadin.ui.TwinColSelect;
@Connect(TwinColSelect.class)
-public class TwinColSelectConnector extends OptionGroupBaseConnector implements
- DirectionalManagedLayout {
+public class TwinColSelectConnector extends OptionGroupBaseConnector
+ implements DirectionalManagedLayout {
@Override
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
diff --git a/client/src/main/java/com/vaadin/client/ui/ui/UIConnector.java b/client/src/main/java/com/vaadin/client/ui/ui/UIConnector.java
index ca9cb879af..d94f030d26 100644
--- a/client/src/main/java/com/vaadin/client/ui/ui/UIConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/ui/UIConnector.java
@@ -161,7 +161,8 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
@Override
public void reportLayoutProblems(String json) {
- VConsole.printLayoutProblems(getValueMap(json), getConnection());
+ VConsole.printLayoutProblems(getValueMap(json),
+ getConnection());
}
private native ValueMap getValueMap(String json)
@@ -239,8 +240,8 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
while (childIndex < uidl.getChildCount()
&& "open".equals(uidl.getChildUIDL(childIndex).getTag())) {
final UIDL open = uidl.getChildUIDL(childIndex);
- final String url = client.translateVaadinUri(open
- .getStringAttribute("src"));
+ final String url = client
+ .translateVaadinUri(open.getStringAttribute("src"));
final String target = open.getStringAttribute("name");
if (target == null) {
// source will be opened to this browser window, but we may have
@@ -265,7 +266,8 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
}
if (alwaysAsPopup) {
if (open.hasAttribute("border")) {
- if (open.getStringAttribute("border").equals("minimal")) {
+ if (open.getStringAttribute("border")
+ .equals("minimal")) {
options = "menubar=yes,location=no,status=no";
} else {
options = "menubar=no,location=no,status=no";
@@ -350,8 +352,7 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
+ " but it is not focusable. The widget should implement either "
+ com.google.gwt.user.client.ui.Focusable.class
.getName()
- + " or "
- + Focusable.class.getName());
+ + " or " + Focusable.class.getName());
}
}
});
@@ -378,8 +379,8 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
int fragmentIndex = location.indexOf('#');
if (fragmentIndex >= 0) {
// Decode fragment to avoid double encoding (#10769)
- newFragment = URL.decodePathSegment(location
- .substring(fragmentIndex + 1));
+ newFragment = URL.decodePathSegment(
+ location.substring(fragmentIndex + 1));
if (newFragment.isEmpty()
&& Location.getHref().indexOf('#') == -1) {
@@ -415,7 +416,7 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
/**
* Reads CSS strings and resources injected by {@link Styles#inject} from
* the UIDL stream.
- *
+ *
* @param uidl
* The uidl which contains "css-resource" and "css-string" tags
*/
@@ -429,11 +430,10 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
// Check if we have resources to inject
if (cssInjectionsUidl.getTag().equals("css-resource")) {
- String url = getWidget().connection
- .translateVaadinUri(cssInjectionsUidl
- .getStringAttribute("url"));
- LinkElement link = LinkElement.as(DOM
- .createElement(LinkElement.TAG));
+ String url = getWidget().connection.translateVaadinUri(
+ cssInjectionsUidl.getStringAttribute("url"));
+ LinkElement link = LinkElement
+ .as(DOM.createElement(LinkElement.TAG));
link.setRel("stylesheet");
link.setHref(url);
link.setType("text/css");
@@ -451,7 +451,7 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
/**
* Internal helper to get the <head> tag of the page
- *
+ *
* @since 7.3
* @return the head element
*/
@@ -462,14 +462,14 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
/**
* Internal helper for removing any stylesheet with the given URL
- *
+ *
* @since 7.3
* @param url
* the url to match with existing stylesheets
*/
private void removeStylesheet(String url) {
- NodeList<Element> linkTags = getHead().getElementsByTagName(
- LinkElement.TAG);
+ NodeList<Element> linkTags = getHead()
+ .getElementsByTagName(LinkElement.TAG);
for (int i = 0; i < linkTags.getLength(); i++) {
LinkElement link = LinkElement.as(linkTags.getItem(i));
if (!"stylesheet".equals(link.getRel())) {
@@ -507,14 +507,13 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
@Override
public void onKeyDown(KeyDownEvent event) {
if (getWidget().actionHandler != null) {
- Element target = Element.as(event.getNativeEvent()
- .getEventTarget());
+ Element target = Element
+ .as(event.getNativeEvent().getEventTarget());
if (target == Document.get().getBody()
|| getWidget().getElement().isOrHasChild(target)) {
// Only react to body and elements inside the UI
- getWidget().actionHandler
- .handleKeyboardEvent((Event) event
- .getNativeEvent().cast());
+ getWidget().actionHandler.handleKeyboardEvent(
+ (Event) event.getNativeEvent().cast());
}
}
@@ -621,7 +620,7 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
/**
* Checks if the given sub window is a child of this UI Connector
- *
+ *
* @deprecated Should be replaced by a more generic mechanism for getting
* non-ComponentConnector children
* @param wc
@@ -635,7 +634,7 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
/**
* Return an iterator for current subwindows. This method is meant for
* testing purposes only.
- *
+ *
* @return
*/
public List<WindowConnector> getSubWindows() {
@@ -662,7 +661,7 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
* public API instead of their state object directly. The page state might
* not be an independent state object but can be embedded in UI state.
* </p>
- *
+ *
* @since 7.1
* @return state object of the page
*/
@@ -671,7 +670,8 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
}
@Override
- public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent event) {
+ public void onConnectorHierarchyChange(
+ ConnectorHierarchyChangeEvent event) {
ComponentConnector oldChild = null;
ComponentConnector newChild = getContent();
@@ -739,10 +739,10 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
/**
* Tries to scroll the viewport so that the given connector is in view.
- *
+ *
* @param componentConnector
* The connector which should be visible
- *
+ *
*/
public void scrollIntoView(final ComponentConnector componentConnector) {
if (componentConnector == null) {
@@ -763,14 +763,14 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
if (stateChangeEvent.hasPropertyChanged("tooltipConfiguration")) {
getConnection().getVTooltip().setCloseTimeout(
getState().tooltipConfiguration.closeTimeout);
- getConnection().getVTooltip().setOpenDelay(
- getState().tooltipConfiguration.openDelay);
+ getConnection().getVTooltip()
+ .setOpenDelay(getState().tooltipConfiguration.openDelay);
getConnection().getVTooltip().setQuickOpenDelay(
getState().tooltipConfiguration.quickOpenDelay);
getConnection().getVTooltip().setQuickOpenTimeout(
getState().tooltipConfiguration.quickOpenTimeout);
- getConnection().getVTooltip().setMaxWidth(
- getState().tooltipConfiguration.maxWidth);
+ getConnection().getVTooltip()
+ .setMaxWidth(getState().tooltipConfiguration.maxWidth);
}
if (stateChangeEvent
@@ -798,7 +798,8 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
getConnection().getMessageSender().setPushEnabled(
getState().pushConfiguration.mode.isEnabled());
}
- if (stateChangeEvent.hasPropertyChanged("reconnectDialogConfiguration")) {
+ if (stateChangeEvent
+ .hasPropertyChanged("reconnectDialogConfiguration")) {
getConnection().getConnectionStateHandler().configurationUpdated();
}
@@ -831,15 +832,15 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
pollTimer.scheduleRepeating(getState().pollInterval);
} else {
// Ensure no more polls are sent as polling has been disabled
- getConnection().getServerRpcQueue().removeMatching(
- new MethodInvocation(getConnectorId(), UIServerRpc.class
- .getName(), "poll"));
+ getConnection().getServerRpcQueue()
+ .removeMatching(new MethodInvocation(getConnectorId(),
+ UIServerRpc.class.getName(), "poll"));
}
}
/**
* Invokes the layout analyzer on the server
- *
+ *
* @since 7.1
*/
public void analyzeLayouts() {
@@ -850,20 +851,20 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
* Sends a request to the server to print details to console that will help
* the developer to locate the corresponding server-side connector in the
* source code.
- *
+ *
* @since 7.1
* @param serverConnector
* the connector to locate
*/
public void showServerDebugInfo(ServerConnector serverConnector) {
- getRpcProxy(DebugWindowServerRpc.class).showServerDebugInfo(
- serverConnector);
+ getRpcProxy(DebugWindowServerRpc.class)
+ .showServerDebugInfo(serverConnector);
}
/**
* Sends a request to the server to print a design to the console for the
* given component.
- *
+ *
* @since 7.5
* @param connector
* the component connector to output a declarative design for
@@ -908,7 +909,7 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
/**
* Loads the new theme and removes references to the old theme
- *
+ *
* @since 7.4.3
* @param oldTheme
* The name of the old theme
@@ -929,11 +930,10 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
if (tagToReplace == null) {
getLogger()
- .warning(
- "Did not find the link tag for the old theme ("
- + oldThemeUrl
- + "), adding a new stylesheet for the new theme ("
- + newThemeUrl + ")");
+ .warning("Did not find the link tag for the old theme ("
+ + oldThemeUrl
+ + "), adding a new stylesheet for the new theme ("
+ + newThemeUrl + ")");
}
}
@@ -950,7 +950,8 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
}
private void updateVaadinFavicon(String newTheme) {
- NodeList<Element> iconElements = querySelectorAll("link[rel~=\"icon\"]");
+ NodeList<Element> iconElements = querySelectorAll(
+ "link[rel~=\"icon\"]");
for (int i = 0; i < iconElements.getLength(); i++) {
Element iconElement = iconElements.getItem(i);
@@ -971,15 +972,15 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
/**
* Finds a link tag for a style sheet with the given URL
- *
+ *
* @since 7.3
* @param url
* the URL of the style sheet
* @return the link tag or null if no matching link tag was found
*/
private LinkElement findStylesheetTag(String url) {
- NodeList<Element> linkTags = getHead().getElementsByTagName(
- LinkElement.TAG);
+ NodeList<Element> linkTags = getHead()
+ .getElementsByTagName(LinkElement.TAG);
for (int i = 0; i < linkTags.getLength(); i++) {
final LinkElement link = LinkElement.as(linkTags.getItem(i));
if ("stylesheet".equals(link.getRel())
@@ -994,7 +995,7 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
/**
* Loads the given theme and replaces the given link element with the new
* theme link element.
- *
+ *
* @param newTheme
* The name of the new theme
* @param newThemeUrl
@@ -1014,22 +1015,20 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
@Override
public void onLoad(ResourceLoadEvent event) {
- getLogger().info(
- "Loading of " + newTheme + " from "
- + newThemeUrl + " completed");
+ getLogger().info("Loading of " + newTheme + " from "
+ + newThemeUrl + " completed");
if (tagToReplace != null) {
- tagToReplace.getParentElement().removeChild(
- tagToReplace);
+ tagToReplace.getParentElement()
+ .removeChild(tagToReplace);
}
activateTheme(newTheme);
}
@Override
public void onError(ResourceLoadEvent event) {
- getLogger().warning(
- "Could not load theme from "
- + getThemeUrl(newTheme));
+ getLogger().warning("Could not load theme from "
+ + getThemeUrl(newTheme));
}
}, null);
@@ -1043,7 +1042,7 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
/**
* Activates the new theme. Assumes the theme has been loaded and taken into
* use in the browser.
- *
+ *
* @since 7.4.3
* @param newTheme
* The name of the new theme
@@ -1051,8 +1050,8 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
protected void activateTheme(String newTheme) {
if (activeTheme != null) {
getWidget().getParent().removeStyleName(activeTheme);
- VOverlay.getOverlayContainer(getConnection()).removeClassName(
- activeTheme);
+ VOverlay.getOverlayContainer(getConnection())
+ .removeClassName(activeTheme);
}
String oldThemeBase = getConnection().translateVaadinUri("theme://");
@@ -1061,8 +1060,8 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
if (newTheme != null) {
getWidget().getParent().addStyleName(newTheme);
- VOverlay.getOverlayContainer(getConnection()).addClassName(
- activeTheme);
+ VOverlay.getOverlayContainer(getConnection())
+ .addClassName(activeTheme);
updateVaadinFavicon(newTheme);
@@ -1079,9 +1078,9 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
/**
* Force a full recursive recheck of every connector's state variables.
- *
+ *
* @see #forceStateChange()
- *
+ *
* @since 7.3
*/
protected static void forceStateChangeRecursively(
@@ -1102,16 +1101,16 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
/**
* Internal helper to get the theme URL for a given theme
- *
+ *
* @since 7.3
* @param theme
* the name of the theme
* @return The URL the theme can be loaded from
*/
private String getThemeUrl(String theme) {
- String themeUrl = getConnection().translateVaadinUri(
- ApplicationConstants.VAADIN_PROTOCOL_PREFIX + "themes/" + theme
- + "/styles" + ".css");
+ String themeUrl = getConnection()
+ .translateVaadinUri(ApplicationConstants.VAADIN_PROTOCOL_PREFIX
+ + "themes/" + theme + "/styles" + ".css");
// Parameter appended to bypass caches after version upgrade.
themeUrl += "?v=" + Version.getFullVersion();
return themeUrl;
@@ -1120,7 +1119,7 @@ public class UIConnector extends AbstractSingleComponentContainerConnector
/**
* Returns the name of the theme currently in used by the UI
- *
+ *
* @since 7.3
* @return the theme name used by this UI
*/
diff --git a/client/src/main/java/com/vaadin/client/ui/upload/UploadConnector.java b/client/src/main/java/com/vaadin/client/ui/upload/UploadConnector.java
index 9e25770a17..6e05387c1d 100644
--- a/client/src/main/java/com/vaadin/client/ui/upload/UploadConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/upload/UploadConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,8 +32,8 @@ import com.vaadin.shared.ui.upload.UploadState;
import com.vaadin.ui.Upload;
@Connect(Upload.class)
-public class UploadConnector extends AbstractComponentConnector implements
- Paintable {
+public class UploadConnector extends AbstractComponentConnector
+ implements Paintable {
public UploadConnector() {
registerRpc(UploadClientRpc.class, new UploadClientRpc() {
@@ -52,8 +52,8 @@ public class UploadConnector extends AbstractComponentConnector implements
@Override
public void onChange(ChangeEvent event) {
if (hasEventListener(EventId.CHANGE)) {
- getRpcProxy(UploadServerRpc.class).change(
- getWidget().fu.getFilename());
+ getRpcProxy(UploadServerRpc.class)
+ .change(getWidget().fu.getFilename());
}
}
});
@@ -72,12 +72,12 @@ public class UploadConnector extends AbstractComponentConnector implements
getWidget().client = client;
getWidget().paintableId = uidl.getId();
getWidget().nextUploadId = uidl.getIntAttribute("nextid");
- final String action = client.translateVaadinUri(uidl
- .getStringVariable("action"));
+ final String action = client
+ .translateVaadinUri(uidl.getStringVariable("action"));
getWidget().element.setAction(action);
if (uidl.hasAttribute("buttoncaption")) {
- getWidget().submitButton.setText(uidl
- .getStringAttribute("buttoncaption"));
+ getWidget().submitButton
+ .setText(uidl.getStringAttribute("buttoncaption"));
getWidget().submitButton.setVisible(true);
} else {
getWidget().submitButton.setVisible(false);
diff --git a/client/src/main/java/com/vaadin/client/ui/upload/UploadIFrameOnloadStrategy.java b/client/src/main/java/com/vaadin/client/ui/upload/UploadIFrameOnloadStrategy.java
index 2c2e10594d..4563f9a137 100644
--- a/client/src/main/java/com/vaadin/client/ui/upload/UploadIFrameOnloadStrategy.java
+++ b/client/src/main/java/com/vaadin/client/ui/upload/UploadIFrameOnloadStrategy.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/upload/UploadIFrameOnloadStrategyIE.java b/client/src/main/java/com/vaadin/client/ui/upload/UploadIFrameOnloadStrategyIE.java
index 0c114e2ee7..071c9cfef2 100644
--- a/client/src/main/java/com/vaadin/client/ui/upload/UploadIFrameOnloadStrategyIE.java
+++ b/client/src/main/java/com/vaadin/client/ui/upload/UploadIFrameOnloadStrategyIE.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import com.vaadin.client.ui.VUpload;
/**
* IE does not have onload, detect onload via readystatechange
- *
+ *
*/
public class UploadIFrameOnloadStrategyIE extends UploadIFrameOnloadStrategy {
@Override
diff --git a/client/src/main/java/com/vaadin/client/ui/video/VideoConnector.java b/client/src/main/java/com/vaadin/client/ui/video/VideoConnector.java
index de53368d6a..ee9fba950f 100644
--- a/client/src/main/java/com/vaadin/client/ui/video/VideoConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/video/VideoConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/main/java/com/vaadin/client/ui/window/WindowConnector.java b/client/src/main/java/com/vaadin/client/ui/window/WindowConnector.java
index 8ddf099e28..9160daf48a 100644
--- a/client/src/main/java/com/vaadin/client/ui/window/WindowConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/window/WindowConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -59,9 +59,8 @@ import com.vaadin.shared.ui.window.WindowState;
@Connect(value = com.vaadin.ui.Window.class)
public class WindowConnector extends AbstractSingleComponentContainerConnector
- implements Paintable, BeforeShortcutActionListener,
- SimpleManagedLayout, PostLayoutListener, MayScrollChildren,
- WindowMoveHandler {
+ implements Paintable, BeforeShortcutActionListener, SimpleManagedLayout,
+ PostLayoutListener, MayScrollChildren, WindowMoveHandler {
private Node windowClone;
@@ -73,8 +72,8 @@ public class WindowConnector extends AbstractSingleComponentContainerConnector
}
};
- abstract class WindowEventHandler implements ClickHandler,
- DoubleClickHandler {
+ abstract class WindowEventHandler
+ implements ClickHandler, DoubleClickHandler {
}
private WindowEventHandler maximizeRestoreClickHandler = new WindowEventHandler() {
@@ -196,7 +195,8 @@ public class WindowConnector extends AbstractSingleComponentContainerConnector
}
@Override
- public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent event) {
+ public void onConnectorHierarchyChange(
+ ConnectorHierarchyChangeEvent event) {
// We always have 1 child, unless the child is hidden
getWidget().contentPanel.setWidget(getContentWidget());
@@ -246,8 +246,8 @@ public class WindowConnector extends AbstractSingleComponentContainerConnector
int minHeight = footerHeight + headerHeight;
getWidget().getElement().getStyle().setPropertyPx("minWidth", minWidth);
- getWidget().getElement().getStyle()
- .setPropertyPx("minHeight", minHeight);
+ getWidget().getElement().getStyle().setPropertyPx("minHeight",
+ minHeight);
/*
* Must set absolute position if the child has relative height and
@@ -289,8 +289,8 @@ public class WindowConnector extends AbstractSingleComponentContainerConnector
VWindow window = getWidget();
if (!window.isAttached()) {
- Logger.getLogger(WindowConnector.class.getName()).warning(
- "Called postLayout to detached Window.");
+ Logger.getLogger(WindowConnector.class.getName())
+ .warning("Called postLayout to detached Window.");
return;
}
if (window.centered && getState().windowMode != WindowMode.MAXIMIZED) {
@@ -311,8 +311,8 @@ public class WindowConnector extends AbstractSingleComponentContainerConnector
// have to replace them with stubs in the clone. And we can't just
// erase them, because there are corresponding player widgets to
// animate
- windowClone = cloneNodeFilteringMedia(getWidget().getElement()
- .getFirstChild());
+ windowClone = cloneNodeFilteringMedia(
+ getWidget().getElement().getFirstChild());
}
}
@@ -328,7 +328,8 @@ public class WindowConnector extends AbstractSingleComponentContainerConnector
}
Element newEl = DOM.createElement(old.getTagName());
if (old.hasAttribute("controls")) {
- newEl.setAttribute("controls", old.getAttribute("controls"));
+ newEl.setAttribute("controls",
+ old.getAttribute("controls"));
}
if (old.hasAttribute("style")) {
newEl.setAttribute("style", old.getAttribute("style"));
@@ -373,10 +374,11 @@ public class WindowConnector extends AbstractSingleComponentContainerConnector
window.resizeLazy = state.resizeLazy;
- window.setDraggable(state.draggable
- && state.windowMode == WindowMode.NORMAL);
+ window.setDraggable(
+ state.draggable && state.windowMode == WindowMode.NORMAL);
- window.updateMaximizeRestoreClassName(state.resizable, state.windowMode);
+ window.updateMaximizeRestoreClassName(state.resizable,
+ state.windowMode);
// Caption must be set before required header size is measured. If
// the caption attribute is missing the caption should be cleared.
@@ -394,7 +396,8 @@ public class WindowConnector extends AbstractSingleComponentContainerConnector
window.setTabStopEnabled(getState().assistiveTabStop);
window.setTabStopTopAssistiveText(getState().assistiveTabStopTopText);
- window.setTabStopBottomAssistiveText(getState().assistiveTabStopBottomText);
+ window.setTabStopBottomAssistiveText(
+ getState().assistiveTabStopBottomText);
clickEventHandler.handleEventHandlerRegistration();
@@ -459,14 +462,15 @@ public class WindowConnector extends AbstractSingleComponentContainerConnector
WindowState state = getState();
// update draggable on widget
- window.setDraggable(state.draggable
- && state.windowMode == WindowMode.NORMAL);
+ window.setDraggable(
+ state.draggable && state.windowMode == WindowMode.NORMAL);
// update resizable on widget
- window.setResizable(state.resizable
- && state.windowMode == WindowMode.NORMAL);
+ window.setResizable(
+ state.resizable && state.windowMode == WindowMode.NORMAL);
updateComponentSize();
updateWindowPosition();
- window.updateMaximizeRestoreClassName(state.resizable, state.windowMode);
+ window.updateMaximizeRestoreClassName(state.resizable,
+ state.windowMode);
window.updateContentsSize();
}
@@ -483,8 +487,8 @@ public class WindowConnector extends AbstractSingleComponentContainerConnector
VWindow window = getWidget();
window.bringToFront();
- getRpcProxy(WindowServerRpc.class).windowModeChanged(
- state.windowMode);
+ getRpcProxy(WindowServerRpc.class)
+ .windowModeChanged(state.windowMode);
}
}
@@ -508,8 +512,8 @@ public class WindowConnector extends AbstractSingleComponentContainerConnector
@Override
public void onWindowMove(WindowMoveEvent event) {
- RpcProxy.create(WindowServerRpc.class, this).windowMoved(
- event.getNewX(), event.getNewY());
+ RpcProxy.create(WindowServerRpc.class, this)
+ .windowMoved(event.getNewX(), event.getNewY());
}
}
diff --git a/client/src/main/java/com/vaadin/client/ui/window/WindowMoveEvent.java b/client/src/main/java/com/vaadin/client/ui/window/WindowMoveEvent.java
index add7ee740f..498617cd30 100644
--- a/client/src/main/java/com/vaadin/client/ui/window/WindowMoveEvent.java
+++ b/client/src/main/java/com/vaadin/client/ui/window/WindowMoveEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import com.google.gwt.event.shared.GwtEvent;
/**
* Event for window position updates
- *
+ *
* @since 7.1.9
* @author Vaadin Ltd
*/
@@ -32,7 +32,7 @@ public class WindowMoveEvent extends GwtEvent<WindowMoveHandler> {
/**
* Creates a new event with the given parameters
- *
+ *
* @param x
* The new x-position for the VWindow
* @param y
@@ -45,7 +45,7 @@ public class WindowMoveEvent extends GwtEvent<WindowMoveHandler> {
/**
* Gets the new x position of the window
- *
+ *
* @return the new X position of the VWindow
*/
public int getNewX() {
@@ -54,7 +54,7 @@ public class WindowMoveEvent extends GwtEvent<WindowMoveHandler> {
/**
* Gets the new y position of the window
- *
+ *
* @return the new Y position of the VWindow
*/
public int getNewY() {
@@ -63,7 +63,7 @@ public class WindowMoveEvent extends GwtEvent<WindowMoveHandler> {
/**
* Gets the type of the event
- *
+ *
* @return the type of the event
*/
public static Type<WindowMoveHandler> getType() {
diff --git a/client/src/main/java/com/vaadin/client/ui/window/WindowMoveHandler.java b/client/src/main/java/com/vaadin/client/ui/window/WindowMoveHandler.java
index 0ac348af68..381c67ba37 100644
--- a/client/src/main/java/com/vaadin/client/ui/window/WindowMoveHandler.java
+++ b/client/src/main/java/com/vaadin/client/ui/window/WindowMoveHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import com.google.gwt.event.shared.EventHandler;
/**
* Handler for {@link WindowMoveEvent}s
- *
+ *
* @since 7.1.9
* @author Vaadin Ltd
*/
@@ -27,7 +27,7 @@ public interface WindowMoveHandler extends EventHandler {
/**
* Called when the VWindow was moved by the user.
- *
+ *
* @param event
* Contains new coordinates for the VWindow
*/
diff --git a/client/src/main/java/com/vaadin/client/widget/escalator/Cell.java b/client/src/main/java/com/vaadin/client/widget/escalator/Cell.java
index 08dbcf6955..e965557d2c 100644
--- a/client/src/main/java/com/vaadin/client/widget/escalator/Cell.java
+++ b/client/src/main/java/com/vaadin/client/widget/escalator/Cell.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.google.gwt.dom.client.TableCellElement;
* <p>
* Unlike the {@link FlyweightRow}, an instance of {@link Cell} can be stored in
* a field.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -39,7 +39,7 @@ public class Cell {
/**
* Constructs a new {@link Cell}.
- *
+ *
* @param row
* The index of the row
* @param column
@@ -56,9 +56,9 @@ public class Cell {
/**
* Returns the index of the row the cell resides in.
- *
+ *
* @return the row index
- *
+ *
*/
public int getRow() {
return row;
@@ -66,7 +66,7 @@ public class Cell {
/**
* Returns the index of the column the cell resides in.
- *
+ *
* @return the column index
*/
public int getColumn() {
@@ -75,7 +75,7 @@ public class Cell {
/**
* Returns the element of the cell.
- *
+ *
* @return the cell element
*/
public TableCellElement getElement() {
diff --git a/client/src/main/java/com/vaadin/client/widget/escalator/ColumnConfiguration.java b/client/src/main/java/com/vaadin/client/widget/escalator/ColumnConfiguration.java
index 76f6a55b8a..8e37b63b89 100644
--- a/client/src/main/java/com/vaadin/client/widget/escalator/ColumnConfiguration.java
+++ b/client/src/main/java/com/vaadin/client/widget/escalator/ColumnConfiguration.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import java.util.Map;
/**
* A representation of the columns in an instance of {@link Escalator}.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
* @see Escalator#getColumnConfiguration()
@@ -37,7 +37,7 @@ public interface ColumnConfiguration {
* do much of anything else. Especially if you have column spans, you
* probably need to run {@link #refreshColumns(int, int)} or
* {@link RowContainer#refreshRows(int, int)}
- *
+ *
* @param index
* the index of the first column to be removed
* @param numberOfColumns
@@ -71,7 +71,7 @@ public interface ColumnConfiguration {
* columns (e.g. you have column spans),
* {@link RowContainer#refreshRows(int, int)} or
* {@link #refreshColumns(int, int)} needs to be called as appropriate.
- *
+ *
* @param index
* the index of the column before which new columns are inserted,
* or {@link #getColumnCount()} to add new columns at the end
@@ -88,7 +88,7 @@ public interface ColumnConfiguration {
/**
* Returns the number of columns in the escalator.
- *
+ *
* @return the number of columns in the escalator
*/
public int getColumnCount();
@@ -96,27 +96,27 @@ public interface ColumnConfiguration {
/**
* Sets the number of leftmost columns that are not affected by horizontal
* scrolling.
- *
+ *
* @param count
* the number of columns to freeze
- *
+ *
* @throws IllegalArgumentException
* if the column count is &lt; 0 or &gt; the number of columns
- *
+ *
*/
public void setFrozenColumnCount(int count) throws IllegalArgumentException;
/**
* Get the number of leftmost columns that are not affected by horizontal
* scrolling.
- *
+ *
* @return the number of frozen columns
*/
public int getFrozenColumnCount();
/**
* Sets (or unsets) an explicit width for a column.
- *
+ *
* @param index
* the index of the column for which to set a width
* @param px
@@ -130,7 +130,7 @@ public interface ColumnConfiguration {
/**
* Returns the user-defined width of a column.
- *
+ *
* @param index
* the index of the column for which to retrieve the width
* @return the column's width in pixels, or a negative number if the width
@@ -142,7 +142,7 @@ public interface ColumnConfiguration {
/**
* Sets widths for a set of columns.
- *
+ *
* @param indexWidthMap
* a map from column index to its respective width to be set. If
* the given width for a column index is negative, the column is
@@ -159,7 +159,7 @@ public interface ColumnConfiguration {
/**
* Returns the actual width of a column.
- *
+ *
* @param index
* the index of the column for which to retrieve the width
* @return the column's actual width in pixels
@@ -175,7 +175,7 @@ public interface ColumnConfiguration {
* <p>
* The data for the refreshed columns is queried from the current cell
* renderer.
- *
+ *
* @param index
* the index of the first row that will be updated
* @param numberOfRows
diff --git a/client/src/main/java/com/vaadin/client/widget/escalator/EscalatorUpdater.java b/client/src/main/java/com/vaadin/client/widget/escalator/EscalatorUpdater.java
index 54507a7650..c26776015e 100644
--- a/client/src/main/java/com/vaadin/client/widget/escalator/EscalatorUpdater.java
+++ b/client/src/main/java/com/vaadin/client/widget/escalator/EscalatorUpdater.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ package com.vaadin.client.widget.escalator;
* <p>
* This has a similar function to {@link Grid Grid's} {@link Renderer Renderers}
* , although they operate on different abstraction levels.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
* @see RowContainer#setEscalatorUpdater(EscalatorUpdater)
@@ -84,7 +84,7 @@ public interface EscalatorUpdater {
* <p>
* For performance reasons, the escalator will never autonomously clear any
* data in a cell.
- *
+ *
* @param row
* Information about the row that is being updated.
* <em>Note:</em> You should not store nor reuse this reference.
@@ -97,7 +97,7 @@ public interface EscalatorUpdater {
/**
* Called before attaching new cells to the escalator.
- *
+ *
* @param row
* Information about the row to which the cells will be added.
* <em>Note:</em> You should not store nor reuse this reference.
@@ -105,13 +105,13 @@ public interface EscalatorUpdater {
* A collection of cells that are about to be attached.
* <em>Note:</em> You should neither store nor reuse the
* reference to the iterable, nor to the individual cells.
- *
+ *
*/
public void preAttach(Row row, Iterable<FlyweightCell> cellsToAttach);
/**
* Called after attaching new cells to the escalator.
- *
+ *
* @param row
* Information about the row to which the cells were added.
* <em>Note:</em> You should not store nor reuse this reference.
@@ -119,13 +119,13 @@ public interface EscalatorUpdater {
* A collection of cells that were attached. <em>Note:</em> You
* should neither store nor reuse the reference to the iterable,
* nor to the individual cells.
- *
+ *
*/
public void postAttach(Row row, Iterable<FlyweightCell> attachedCells);
/**
* Called before detaching cells from the escalator.
- *
+ *
* @param row
* Information about the row from which the cells will be
* removed. <em>Note:</em> You should not store nor reuse this
@@ -134,13 +134,13 @@ public interface EscalatorUpdater {
* A collection of cells that are about to be detached.
* <em>Note:</em> You should neither store nor reuse the
* reference to the iterable, nor to the individual cells.
- *
+ *
*/
public void preDetach(Row row, Iterable<FlyweightCell> cellsToDetach);
/**
* Called after detaching cells from the escalator.
- *
+ *
* @param row
* Information about the row from which the cells were removed.
* <em>Note:</em> You should not store nor reuse this reference.
@@ -148,7 +148,7 @@ public interface EscalatorUpdater {
* A collection of cells that were detached. <em>Note:</em> You
* should neither store nor reuse the reference to the iterable,
* nor to the individual cells.
- *
+ *
*/
public void postDetach(Row row, Iterable<FlyweightCell> detachedCells);
diff --git a/client/src/main/java/com/vaadin/client/widget/escalator/FlyweightCell.java b/client/src/main/java/com/vaadin/client/widget/escalator/FlyweightCell.java
index b77b752327..8e18c0f2c7 100644
--- a/client/src/main/java/com/vaadin/client/widget/escalator/FlyweightCell.java
+++ b/client/src/main/java/com/vaadin/client/widget/escalator/FlyweightCell.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,13 +26,13 @@ import com.vaadin.client.widgets.Escalator;
/**
* A {@link FlyweightCell} represents a cell in the {@link Grid} or
* {@link Escalator} at a certain point in time.
- *
+ *
* <p>
* Since the {@link FlyweightCell} follows the <code>Flyweight</code>-pattern
* any instance of this object is subject to change without the user knowing it
* and so should not be stored anywhere outside of the method providing these
* instances.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -87,7 +87,7 @@ public class FlyweightCell {
* Sets the DOM element for this FlyweightCell, either a <code>TD</code> or
* a <code>TH</code>. It is the caller's responsibility to actually insert
* the given element to the document when needed.
- *
+ *
* @param element
* the element corresponding to this cell, cannot be null
*/
@@ -126,7 +126,7 @@ public class FlyweightCell {
* This should only be used with asserts ("
* <code>assert flyweightCell.teardown()</code> ") so that the code is never
* run when asserts aren't enabled.
- *
+ *
* @return always <code>true</code>
* @see FlyweightRow#teardown()
*/
@@ -169,8 +169,8 @@ public class FlyweightCell {
}
private void adjustCellWidthForSpan(final int numberOfCells) {
- final int cellsToTheRight = currentIterator.rawPeekNext(
- numberOfCells - 1).size();
+ final int cellsToTheRight = currentIterator
+ .rawPeekNext(numberOfCells - 1).size();
final double selfWidth = row.getColumnWidth(column);
double widthsOfColumnsToTheRight = 0;
@@ -193,8 +193,8 @@ public class FlyweightCell {
}
} else if (prevColSpan > numberOfCells) {
for (int i = 0; i < affectedCells.size(); i++) {
- affectedCells.get(numberOfCells + i - 1).getElement()
- .getStyle().clearDisplay();
+ affectedCells.get(numberOfCells + i - 1).getElement().getStyle()
+ .clearDisplay();
}
}
}
diff --git a/client/src/main/java/com/vaadin/client/widget/escalator/FlyweightRow.java b/client/src/main/java/com/vaadin/client/widget/escalator/FlyweightRow.java
index 8628adb05f..f98747c3f8 100644
--- a/client/src/main/java/com/vaadin/client/widget/escalator/FlyweightRow.java
+++ b/client/src/main/java/com/vaadin/client/widget/escalator/FlyweightRow.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,7 +27,7 @@ import com.google.gwt.dom.client.TableRowElement;
* <p>
* There is only one instance per Escalator. This is designed to be re-used when
* rendering rows.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
* @see Escalator.AbstractRowContainer#refreshRow(Node, int)
@@ -45,7 +45,7 @@ public class FlyweightRow implements Row {
* Creates a new iterator of attached flyweight cells. A cell is
* attached if it has a corresponding {@link FlyweightCell#getElement()
* DOM element} attached to the row element.
- *
+ *
* @param cells
* the collection of cells to iterate
*/
@@ -59,7 +59,7 @@ public class FlyweightRow implements Row {
* unattached if it does not have a corresponding
* {@link FlyweightCell#getElement() DOM element} attached to the row
* element.
- *
+ *
* @param cells
* the collection of cells to iterate
*/
@@ -101,7 +101,7 @@ public class FlyweightRow implements Row {
/**
* Sets the number of cells to skip when {@link #next()} is called the
* next time. Cell hiding is also handled eagerly in this method.
- *
+ *
* @param colspan
* the number of cells to skip on next invocation of
* {@link #next()}
@@ -115,7 +115,7 @@ public class FlyweightRow implements Row {
/**
* Gets the next <code>n</code> cells in the iterator, ignoring any
* possibly spanned cells.
- *
+ *
* @param n
* the number of next cells to retrieve
* @return A list of next <code>n</code> cells, or less if there aren't
@@ -160,7 +160,7 @@ public class FlyweightRow implements Row {
* This should only be used with asserts ("
* <code>assert flyweightRow.teardown()</code> ") so that the code is never
* run when asserts aren't enabled.
- *
+ *
* @return always <code>true</code>
*/
public boolean teardown() {
@@ -211,9 +211,9 @@ public class FlyweightRow implements Row {
* element.
* <p>
* Precondition: each cell has a corresponding element in the row
- *
+ *
* @return an iterable of flyweight cells
- *
+ *
* @see #setup(Element, int, int[])
* @see #teardown()
*/
@@ -227,7 +227,7 @@ public class FlyweightRow implements Row {
* from the row element.
* <p>
* Precondition: each cell has a corresponding element in the row
- *
+ *
* @param offset
* the index of the first cell to return
* @param numberOfCells
@@ -237,12 +237,13 @@ public class FlyweightRow implements Row {
public Iterable<FlyweightCell> getCells(final int offset,
final int numberOfCells) {
assertSetup();
- assert offset >= 0 && offset + numberOfCells <= cells.size() : "Invalid range of cells";
+ assert offset >= 0 && offset + numberOfCells <= cells
+ .size() : "Invalid range of cells";
return new Iterable<FlyweightCell>() {
@Override
public Iterator<FlyweightCell> iterator() {
- return CellIterator.attached(cells.subList(offset, offset
- + numberOfCells));
+ return CellIterator.attached(
+ cells.subList(offset, offset + numberOfCells));
}
};
}
@@ -255,7 +256,7 @@ public class FlyweightRow implements Row {
* invoke this method with correct parameters.
* <p>
* Precondition: the range [offset, offset + numberOfCells) must be valid
- *
+ *
* @param offset
* the index of the first cell to return
* @param numberOfCells
@@ -265,12 +266,13 @@ public class FlyweightRow implements Row {
public Iterable<FlyweightCell> getUnattachedCells(final int offset,
final int numberOfCells) {
assertSetup();
- assert offset >= 0 && offset + numberOfCells <= cells.size() : "Invalid range of cells";
+ assert offset >= 0 && offset + numberOfCells <= cells
+ .size() : "Invalid range of cells";
return new Iterable<FlyweightCell>() {
@Override
public Iterator<FlyweightCell> iterator() {
- return CellIterator.unattached(cells.subList(offset, offset
- + numberOfCells));
+ return CellIterator.unattached(
+ cells.subList(offset, offset + numberOfCells));
}
};
}
@@ -280,11 +282,12 @@ public class FlyweightRow implements Row {
* access any of its data.
*/
private void assertSetup() {
- assert element != null && row != BLANK && columnWidths != null : "Flyweight row was not "
- + "properly initialized. Make sure the setup-method is "
- + "called before retrieving data. This is either a bug "
- + "in Escalator, or the instance of the flyweight row "
- + "has been stored and accessed.";
+ assert element != null && row != BLANK
+ && columnWidths != null : "Flyweight row was not "
+ + "properly initialized. Make sure the setup-method is "
+ + "called before retrieving data. This is either a bug "
+ + "in Escalator, or the instance of the flyweight row "
+ + "has been stored and accessed.";
}
double getColumnWidth(int column) {
diff --git a/client/src/main/java/com/vaadin/client/widget/escalator/PositionFunction.java b/client/src/main/java/com/vaadin/client/widget/escalator/PositionFunction.java
index 929f27df37..8ee1733c1c 100644
--- a/client/src/main/java/com/vaadin/client/widget/escalator/PositionFunction.java
+++ b/client/src/main/java/com/vaadin/client/widget/escalator/PositionFunction.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ import com.google.gwt.dom.client.Style.Unit;
/**
* A functional interface that can be used for positioning elements in the DOM.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -97,7 +97,7 @@ public interface PositionFunction {
/**
* Position an element in an (x,y) coordinate system in the DOM.
- *
+ *
* @param e
* the element to position. Never <code>null</code>.
* @param x
@@ -110,7 +110,7 @@ public interface PositionFunction {
/**
* Resets any previously applied positioning, clearing the used style
* attributes.
- *
+ *
* @param e
* the element for which to reset the positioning
*/
diff --git a/client/src/main/java/com/vaadin/client/widget/escalator/Row.java b/client/src/main/java/com/vaadin/client/widget/escalator/Row.java
index fa89853120..936f256b92 100644
--- a/client/src/main/java/com/vaadin/client/widget/escalator/Row.java
+++ b/client/src/main/java/com/vaadin/client/widget/escalator/Row.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,14 +20,14 @@ import com.google.gwt.dom.client.TableRowElement;
/**
* A representation of a row in an {@link Escalator}.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
public interface Row {
/**
* Gets the row index.
- *
+ *
* @return the row index
*/
public int getRow();
@@ -41,7 +41,7 @@ public interface Row {
* If you wish to modify the cells within this row element, access them via
* the <code>List&lt;{@link Cell}&gt;</code> objects passed in to
* {@code EscalatorUpdater.updateCells(Row, List)}
- *
+ *
* @return the root element of the row
*/
public TableRowElement getElement();
diff --git a/client/src/main/java/com/vaadin/client/widget/escalator/RowContainer.java b/client/src/main/java/com/vaadin/client/widget/escalator/RowContainer.java
index abab25046c..89da37897c 100644
--- a/client/src/main/java/com/vaadin/client/widget/escalator/RowContainer.java
+++ b/client/src/main/java/com/vaadin/client/widget/escalator/RowContainer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.google.gwt.dom.client.TableSectionElement;
/**
* A representation of the rows in each of the sections (header, body and
* footer) in an {@link com.vaadin.client.widgets.Escalator}.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
* @see com.vaadin.client.widgets.Escalator#getHeader()
@@ -38,7 +38,7 @@ public interface RowContainer {
* {@link com.vaadin.client.widgets.Escalator}.
* <p>
* The body section can contain both rows and spacers.
- *
+ *
* @since 7.5.0
* @author Vaadin Ltd
* @see com.vaadin.client.widgets.Escalator#getBody()
@@ -54,7 +54,7 @@ public interface RowContainer {
* <em>Note:</em> The row index for a spacer will change if rows are
* inserted or removed above the current position. Spacers will also be
* removed alongside their associated rows
- *
+ *
* @param rowIndex
* the row index for the spacer to modify. The affected
* spacer is underneath the given index. Use -1 to insert a
@@ -77,7 +77,7 @@ public interface RowContainer {
* {@link SpacerUpdater#destroy(Spacer) destroyed} with the previous
* one, and {@link SpacerUpdater#init(Spacer) initialized} with the new
* one.
- *
+ *
* @param spacerUpdater
* the new spacer updater
* @throws IllegalArgumentException
@@ -90,7 +90,7 @@ public interface RowContainer {
* Gets the spacer updater currently in use.
* <p>
* {@link SpacerUpdater#NULL} is the default.
- *
+ *
* @return the spacer updater currently in use. Never <code>null</code>
*/
SpacerUpdater getSpacerUpdater();
@@ -120,12 +120,12 @@ public interface RowContainer {
/**
* An arbitrary pixel height of a row, before any autodetection for the row
* height has been made.
- * */
+ */
public static final double INITIAL_DEFAULT_ROW_HEIGHT = 20;
/**
* Returns the current {@link EscalatorUpdater} used to render cells.
- *
+ *
* @return the current escalator updater
*/
public EscalatorUpdater getEscalatorUpdater();
@@ -133,7 +133,7 @@ public interface RowContainer {
/**
* Sets the {@link EscalatorUpdater} to use when displaying data in the
* escalator.
- *
+ *
* @param escalatorUpdater
* the escalator updater to use to render cells. May not be
* <code>null</code>
@@ -146,7 +146,7 @@ public interface RowContainer {
/**
* Removes rows at a certain index in the current row container.
- *
+ *
* @param index
* the index of the first row to be removed
* @param numberOfRows
@@ -176,7 +176,7 @@ public interface RowContainer {
* If inserting new rows affects the contents of existing rows,
* {@link #refreshRows(int, int)} needs to be called for those rows
* separately.
- *
+ *
* @param index
* the index of the row before which new rows are inserted, or
* {@link #getRowCount()} to add rows at the end
@@ -197,7 +197,7 @@ public interface RowContainer {
* <p>
* The data for the refreshed rows is queried from the current cell
* renderer.
- *
+ *
* @param index
* the index of the first row that will be updated
* @param numberOfRows
@@ -215,14 +215,14 @@ public interface RowContainer {
/**
* Gets the number of rows in the current row container.
- *
+ *
* @return the number of rows in the current row container
*/
public int getRowCount();
/**
* The default height of the rows in this RowContainer.
- *
+ *
* @param px
* the default height in pixels of the rows in this RowContainer
* @throws IllegalArgumentException
@@ -237,7 +237,7 @@ public interface RowContainer {
* This value will be equal to {@link #INITIAL_DEFAULT_ROW_HEIGHT} if the
* {@link Escalator} has not yet had a chance to autodetect the row height,
* or no explicit value has yet given via {@link #setDefaultRowHeight(int)}
- *
+ *
* @return the default height of the rows in this RowContainer, in pixels
* @see #setDefaultRowHeight(int)
*/
@@ -246,11 +246,11 @@ public interface RowContainer {
/**
* Returns the cell object which contains information about the cell the
* element is in.
- *
+ *
* @param element
* The element to get the cell for. If element is not present in
* row container then <code>null</code> is returned.
- *
+ *
* @return the cell of the element, or <code>null</code> if element is not
* present in the {@link RowContainer}.
*/
@@ -260,7 +260,7 @@ public interface RowContainer {
* Gets the row element with given logical index. For lazy loaded containers
* such as Escalators BodyRowContainer visibility should be checked before
* calling this function. See {@link Escalator#getVisibleRowRange()}.
- *
+ *
* @param index
* the logical index of the element to retrieve
* @return the element at position {@code index}
@@ -274,7 +274,7 @@ public interface RowContainer {
/**
* Returns the root element of RowContainer
- *
+ *
* @return RowContainer root element
*/
public TableSectionElement getElement();
diff --git a/client/src/main/java/com/vaadin/client/widget/escalator/RowVisibilityChangeEvent.java b/client/src/main/java/com/vaadin/client/widget/escalator/RowVisibilityChangeEvent.java
index 5f1531e378..2ee232aa1d 100644
--- a/client/src/main/java/com/vaadin/client/widget/escalator/RowVisibilityChangeEvent.java
+++ b/client/src/main/java/com/vaadin/client/widget/escalator/RowVisibilityChangeEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,12 +21,12 @@ import com.vaadin.shared.ui.grid.Range;
/**
* Event fired when the range of visible rows changes e.g. because of scrolling.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
-public class RowVisibilityChangeEvent extends
- GwtEvent<RowVisibilityChangeHandler> {
+public class RowVisibilityChangeEvent
+ extends GwtEvent<RowVisibilityChangeHandler> {
/**
* The type of this event.
*/
@@ -36,7 +36,7 @@ public class RowVisibilityChangeEvent extends
/**
* Creates a new row visibility change event
- *
+ *
* @param firstVisibleRow
* the index of the first visible row
* @param visibleRowCount
@@ -48,7 +48,7 @@ public class RowVisibilityChangeEvent extends
/**
* Gets the index of the first row that is at least partially visible.
- *
+ *
* @return the index of the first visible row
*/
public int getFirstVisibleRow() {
@@ -57,7 +57,7 @@ public class RowVisibilityChangeEvent extends
/**
* Gets the number of at least partially visible rows.
- *
+ *
* @return the number of visible rows
*/
public int getVisibleRowCount() {
@@ -66,7 +66,7 @@ public class RowVisibilityChangeEvent extends
/**
* Gets the range of visible rows.
- *
+ *
* @since 7.6
* @return the visible rows
*/
@@ -76,7 +76,7 @@ public class RowVisibilityChangeEvent extends
/*
* (non-Javadoc)
- *
+ *
* @see com.google.gwt.event.shared.GwtEvent#getAssociatedType()
*/
@Override
@@ -86,7 +86,7 @@ public class RowVisibilityChangeEvent extends
/*
* (non-Javadoc)
- *
+ *
* @see
* com.google.gwt.event.shared.GwtEvent#dispatch(com.google.gwt.event.shared
* .EventHandler)
diff --git a/client/src/main/java/com/vaadin/client/widget/escalator/RowVisibilityChangeHandler.java b/client/src/main/java/com/vaadin/client/widget/escalator/RowVisibilityChangeHandler.java
index 80a30184c0..2489fe6002 100644
--- a/client/src/main/java/com/vaadin/client/widget/escalator/RowVisibilityChangeHandler.java
+++ b/client/src/main/java/com/vaadin/client/widget/escalator/RowVisibilityChangeHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ import com.google.gwt.event.shared.EventHandler;
/**
* Event handler that gets notified when the range of visible rows changes e.g.
* because of scrolling.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -29,7 +29,7 @@ public interface RowVisibilityChangeHandler extends EventHandler {
/**
* Called when the range of visible rows changes e.g. because of scrolling.
- *
+ *
* @param event
* the row visibility change event describing the change
*/
diff --git a/client/src/main/java/com/vaadin/client/widget/escalator/ScrollbarBundle.java b/client/src/main/java/com/vaadin/client/widget/escalator/ScrollbarBundle.java
index 367537d20d..7443b5d315 100644
--- a/client/src/main/java/com/vaadin/client/widget/escalator/ScrollbarBundle.java
+++ b/client/src/main/java/com/vaadin/client/widget/escalator/ScrollbarBundle.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -40,7 +40,7 @@ import com.vaadin.client.widget.grid.events.ScrollHandler;
/**
* An element-like bundle representing a configurable and visual scrollbar in
* one axis.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
* @see VerticalScrollbarBundle
@@ -60,16 +60,16 @@ public abstract class ScrollbarBundle implements DeferredWorker {
* The weird thing is, that happens only once, and if you drag
* scrollbar fast enough. After it has failed once, it never
* fails again.
- *
+ *
* Theory: the user drags the scrollbar, and this command is
* executed before the browser has a chance to fire a scroll
* event (which normally would correct this situation). This
* would explain why slow scrolling doesn't trigger the problem,
* while fast scrolling does.
- *
+ *
* To make absolutely sure that we have the latest scroll
* position, let's update the internal value.
- *
+ *
* This might lead to a slight performance hit (on my computer
* it was never more than 3ms on either of Chrome 38 or Firefox
* 31). It also _slightly_ counteracts the purpose of the
@@ -131,15 +131,15 @@ public abstract class ScrollbarBundle implements DeferredWorker {
/**
* This method is called whenever the scrollbar handle's visibility is
* changed in a {@link ScrollbarBundle}.
- *
+ *
* @param event
* the {@link VisibilityChangeEvent}
*/
void visibilityChanged(VisibilityChangeEvent event);
}
- public static class VisibilityChangeEvent extends
- GwtEvent<VisibilityHandler> {
+ public static class VisibilityChangeEvent
+ extends GwtEvent<VisibilityHandler> {
public static final Type<VisibilityHandler> TYPE = new Type<ScrollbarBundle.VisibilityHandler>() {
@Override
public String toString() {
@@ -155,7 +155,7 @@ public abstract class ScrollbarBundle implements DeferredWorker {
/**
* Checks whether the scroll handle is currently visible or not
- *
+ *
* @return <code>true</code> if the scroll handle is currently visible.
* <code>false</code> if not.
*/
@@ -187,7 +187,7 @@ public abstract class ScrollbarBundle implements DeferredWorker {
/**
* A representation of a single vertical scrollbar.
- *
+ *
* @see VerticalScrollbarBundle#getElement()
*/
public final static class VerticalScrollbarBundle extends ScrollbarBundle {
@@ -257,10 +257,11 @@ public abstract class ScrollbarBundle implements DeferredWorker {
/**
* A representation of a single horizontal scrollbar.
- *
+ *
* @see HorizontalScrollbarBundle#getElement()
*/
- public final static class HorizontalScrollbarBundle extends ScrollbarBundle {
+ public final static class HorizontalScrollbarBundle
+ extends ScrollbarBundle {
@Override
public void setStylePrimaryName(String primaryStyleName) {
@@ -357,7 +358,7 @@ public abstract class ScrollbarBundle implements DeferredWorker {
/**
* Sets the primary style name
- *
+ *
* @param primaryStyleName
* The primary style name to use
*/
@@ -367,7 +368,7 @@ public abstract class ScrollbarBundle implements DeferredWorker {
/**
* Gets the root element of this scrollbar-composition.
- *
+ *
* @return the root element
*/
public final Element getElement() {
@@ -381,7 +382,7 @@ public abstract class ScrollbarBundle implements DeferredWorker {
* currently only used as integers as large {@code int} (or small but fast
* {@code long}). This means, all values are truncated to zero decimal
* places.
- *
+ *
* @param delta
* the delta in pixels to change the scroll position by
*/
@@ -394,7 +395,7 @@ public abstract class ScrollbarBundle implements DeferredWorker {
/**
* Modifies {@link #root root's} dimensions in the axis the scrollbar is
* representing.
- *
+ *
* @param px
* the new size of {@link #root} in the dimension this scrollbar
* is representing
@@ -403,7 +404,7 @@ public abstract class ScrollbarBundle implements DeferredWorker {
/**
* Sets the length of the scrollbar.
- *
+ *
* @param px
* the length of the scrollbar in pixels
*/
@@ -420,12 +421,13 @@ public abstract class ScrollbarBundle implements DeferredWorker {
&& newOffsetSizeIsGreaterThanScrollSize;
if (offsetSizeBecomesGreaterThanScrollSize && getScrollPos() != 0) {
// must be a field because Java insists.
- offsetSizeTemporaryScrollHandler = addScrollHandler(new ScrollHandler() {
- @Override
- public void onScroll(ScrollEvent event) {
- setOffsetSizeNow(px);
- }
- });
+ offsetSizeTemporaryScrollHandler = addScrollHandler(
+ new ScrollHandler() {
+ @Override
+ public void onScroll(ScrollEvent event) {
+ setOffsetSizeNow(px);
+ }
+ });
setScrollPos(0);
} else {
setOffsetSizeNow(px);
@@ -477,7 +479,7 @@ public abstract class ScrollbarBundle implements DeferredWorker {
/**
* Gets the length of the scrollbar
- *
+ *
* @return the length of the scrollbar in pixels
*/
public double getOffsetSize() {
@@ -494,7 +496,7 @@ public abstract class ScrollbarBundle implements DeferredWorker {
* currently only used as integers as large {@code int} (or small but fast
* {@code long}). This means, all values are truncated to zero decimal
* places.
- *
+ *
* @param px
* the new scroll position in pixels
*/
@@ -527,7 +529,7 @@ public abstract class ScrollbarBundle implements DeferredWorker {
* Should be called whenever this bundle is attached to the DOM (typically,
* from the onLoad of the containing widget). Used to ensure the DOM scroll
* position is maintained when detaching and reattaching the bundle.
- *
+ *
* @since 7.4.1
*/
public void onLoad() {
@@ -538,7 +540,7 @@ public abstract class ScrollbarBundle implements DeferredWorker {
* Truncates a double such that no decimal places are retained.
* <p>
* E.g. {@code trunc(2.3d) == 2.0d} and {@code trunc(-2.3d) == -2.0d}.
- *
+ *
* @param num
* the double value to be truncated
* @return the {@code num} value without any decimal digits
@@ -558,7 +560,7 @@ public abstract class ScrollbarBundle implements DeferredWorker {
* double) by design. The browsers internally convert all double values into
* an integer value. To make this fact explicit, this API has chosen to
* force integers already at this level.
- *
+ *
* @param px
* integer pixel value to scroll to
*/
@@ -567,14 +569,14 @@ public abstract class ScrollbarBundle implements DeferredWorker {
/**
* Gets the scroll position of the scrollbar in the axis the scrollbar is
* representing.
- *
+ *
* @return the new scroll position in pixels
*/
public final double getScrollPos() {
- assert internalGetScrollPos() == toInt32(scrollPos) : "calculated scroll position ("
- + scrollPos
- + ") did not match the DOM element scroll position ("
- + internalGetScrollPos() + ")";
+ assert internalGetScrollPos() == toInt32(
+ scrollPos) : "calculated scroll position (" + scrollPos
+ + ") did not match the DOM element scroll position ("
+ + internalGetScrollPos() + ")";
return scrollPos;
}
@@ -585,7 +587,7 @@ public abstract class ScrollbarBundle implements DeferredWorker {
* double) by design. The browsers internally convert all double values into
* an integer value. To make this fact explicit, this API has chosen to
* force integers already at this level.
- *
+ *
* @return integer pixel value of the scroll position
*/
protected abstract int internalGetScrollPos();
@@ -594,7 +596,7 @@ public abstract class ScrollbarBundle implements DeferredWorker {
* Modifies {@link #scrollSizeElement scrollSizeElement's} dimensions in
* such a way that the scrollbar is able to scroll a certain number of
* pixels in the axis it is representing.
- *
+ *
* @param px
* the new size of {@link #scrollSizeElement} in the dimension
* this scrollbar is representing
@@ -604,7 +606,7 @@ public abstract class ScrollbarBundle implements DeferredWorker {
/**
* Sets the amount of pixels the scrollbar needs to be able to scroll
* through.
- *
+ *
* @param px
* the number of pixels the scrollbar should be able to scroll
* through
@@ -666,7 +668,7 @@ public abstract class ScrollbarBundle implements DeferredWorker {
/**
* Gets the amount of pixels the scrollbar needs to be able to scroll
* through.
- *
+ *
* @return the number of pixels the scrollbar should be able to scroll
* through
*/
@@ -677,7 +679,7 @@ public abstract class ScrollbarBundle implements DeferredWorker {
/**
* Modifies {@link #scrollSizeElement scrollSizeElement's} dimensions in the
* opposite axis to what the scrollbar is representing.
- *
+ *
* @param px
* the dimension that {@link #scrollSizeElement} should take in
* the opposite axis to what the scrollbar is representing
@@ -691,7 +693,7 @@ public abstract class ScrollbarBundle implements DeferredWorker {
* "invisible" scrollbar. This means, the DOM structure will be given a
* non-zero size, but {@link #getScrollbarThickness()} will still return the
* value 0.
- *
+ *
* @param px
* the scrollbar's thickness in pixels
*/
@@ -718,7 +720,7 @@ public abstract class ScrollbarBundle implements DeferredWorker {
/**
* Gets the scrollbar's thickness as defined in the DOM.
- *
+ *
* @return the scrollbar's thickness as defined in the DOM, in pixels
*/
protected abstract String internalGetScrollbarThickness();
@@ -729,7 +731,7 @@ public abstract class ScrollbarBundle implements DeferredWorker {
* This value will differ from the value in the DOM, if the thickness was
* set to 0 with {@link #setScrollbarThickness(double)}, as the scrollbar is
* then treated as "invisible."
- *
+ *
* @return the scrollbar's thickness in pixels
*/
public final double getScrollbarThickness() {
@@ -745,7 +747,7 @@ public abstract class ScrollbarBundle implements DeferredWorker {
* <p>
* In other words, this method checks whether the contents is larger than
* can visually fit in the element.
- *
+ *
* @return <code>true</code> iff the scrollbar's handle is visible
*/
public boolean showsScrollHandle() {
@@ -793,7 +795,7 @@ public abstract class ScrollbarBundle implements DeferredWorker {
/**
* Adds handler for the scrollbar handle visibility.
- *
+ *
* @param handler
* the {@link VisibilityHandler} to add
* @return {@link HandlerRegistration} used to remove the handler
@@ -818,7 +820,7 @@ public abstract class ScrollbarBundle implements DeferredWorker {
* Converts a double into an integer by JavaScript's terms.
* <p>
* Implementation copied from {@link Element#toInt32(double)}.
- *
+ *
* @param val
* the double value to convert into an integer
* @return the double value converted to an integer
@@ -833,7 +835,7 @@ public abstract class ScrollbarBundle implements DeferredWorker {
* <p>
* A locked scrollbar bundle will refuse to scroll, both programmatically
* and via user-triggered events.
- *
+ *
* @param isLocked
* <code>true</code> to lock, <code>false</code> to unlock
*/
@@ -843,7 +845,7 @@ public abstract class ScrollbarBundle implements DeferredWorker {
/**
* Checks whether the scrollbar bundle is locked or not.
- *
+ *
* @return <code>true</code> iff the scrollbar bundle is locked
*/
public boolean isLocked() {
@@ -852,14 +854,14 @@ public abstract class ScrollbarBundle implements DeferredWorker {
/**
* Returns the scroll direction of this scrollbar bundle.
- *
+ *
* @return the scroll direction of this scrollbar bundle
*/
public abstract Direction getDirection();
/**
* Adds a scroll handler to the scrollbar bundle.
- *
+ *
* @param handler
* the handler to add
* @return the registration object for the handler registration
@@ -875,7 +877,7 @@ public abstract class ScrollbarBundle implements DeferredWorker {
* element.getOffset*() because those values are 0 whenever display:
* none. Because we know that all elements have populated
* CSS-dimensions, it's better to do it that way.
- *
+ *
* Another solution would be to make the elements visible while
* measuring and then re-hide them, but that would cause unnecessary
* reflows that would probably kill the performance dead.
diff --git a/client/src/main/java/com/vaadin/client/widget/escalator/Spacer.java b/client/src/main/java/com/vaadin/client/widget/escalator/Spacer.java
index 789a64a21e..000cd14f6c 100644
--- a/client/src/main/java/com/vaadin/client/widget/escalator/Spacer.java
+++ b/client/src/main/java/com/vaadin/client/widget/escalator/Spacer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import com.google.gwt.dom.client.Element;
/**
* A representation of a spacer element in a
* {@link com.vaadin.client.widget.escalator.RowContainer.BodyRowContainer}.
- *
+ *
* @since 7.5.0
* @author Vaadin Ltd
*/
@@ -28,7 +28,7 @@ public interface Spacer {
/**
* Gets the root element for the spacer content.
- *
+ *
* @return the root element for the spacer content
*/
Element getElement();
@@ -40,7 +40,7 @@ public interface Spacer {
/**
* Gets the row index.
- *
+ *
* @return the row index.
*/
int getRow();
diff --git a/client/src/main/java/com/vaadin/client/widget/escalator/SpacerUpdater.java b/client/src/main/java/com/vaadin/client/widget/escalator/SpacerUpdater.java
index 49adefd536..16a385f70a 100644
--- a/client/src/main/java/com/vaadin/client/widget/escalator/SpacerUpdater.java
+++ b/client/src/main/java/com/vaadin/client/widget/escalator/SpacerUpdater.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ import com.vaadin.client.widget.escalator.RowContainer.BodyRowContainer;
* <p>
* The updater is responsible for making sure all elements are properly
* constructed and cleaned up.
- *
+ *
* @since 7.5.0
* @author Vaadin Ltd
* @see Spacer
@@ -45,7 +45,7 @@ public interface SpacerUpdater {
/**
* Called whenever a spacer should be initialized with content.
- *
+ *
* @param spacer
* the spacer reference that should be initialized
*/
@@ -56,7 +56,7 @@ public interface SpacerUpdater {
* <p>
* The structure to clean up is the same that has been constructed by
* {@link #init(Spacer)}.
- *
+ *
* @param spacer
* the spacer reference that should be destroyed
*/
diff --git a/client/src/main/java/com/vaadin/client/widget/escalator/events/RowHeightChangedHandler.java b/client/src/main/java/com/vaadin/client/widget/escalator/events/RowHeightChangedHandler.java
index 40bd380de2..205d006326 100644
--- a/client/src/main/java/com/vaadin/client/widget/escalator/events/RowHeightChangedHandler.java
+++ b/client/src/main/java/com/vaadin/client/widget/escalator/events/RowHeightChangedHandler.java
@@ -29,7 +29,8 @@ public interface RowHeightChangedHandler extends EventHandler {
* A row height changed event, fired by Escalator when the header, body or
* footer row height has changed.
*
- * @param event Row height changed event
+ * @param event
+ * Row height changed event
*/
public void onRowHeightChanged(RowHeightChangedEvent event);
}
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/AutoScroller.java b/client/src/main/java/com/vaadin/client/widget/grid/AutoScroller.java
index 9cc238ac15..1d8d2864c1 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/AutoScroller.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/AutoScroller.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -33,7 +33,7 @@ import com.vaadin.client.widgets.Grid;
* A class for handling automatic scrolling vertically / horizontally in the
* Grid when the cursor is close enough the edge of the body of the grid,
* depending on the scroll direction chosen.
- *
+ *
* @since 7.5.0
* @author Vaadin Ltd
*/
@@ -50,7 +50,7 @@ public class AutoScroller {
* <p>
* Because the auto scroller currently only supports scrolling in one
* axis, this method is used for both vertical and horizontal scrolling.
- *
+ *
* @param scrollDiff
* the amount of pixels that have been auto scrolled since
* last call
@@ -106,7 +106,7 @@ public class AutoScroller {
* Something has dropped a touchend/touchcancel and the
* scroller is most probably running amok. Let's cancel it
* and pretend that everything's going as expected
- *
+ *
* Because this is a preview, this code is run before start
* event can be passed to the start(...) method.
*/
@@ -159,7 +159,8 @@ public class AutoScroller {
* direction has started.
*/
private static final int SCROLL_AREA_REBOUND_PX_PER_SEC = 1;
- private static final double SCROLL_AREA_REBOUND_PX_PER_MS = SCROLL_AREA_REBOUND_PX_PER_SEC / 1000.0d;
+ private static final double SCROLL_AREA_REBOUND_PX_PER_MS = SCROLL_AREA_REBOUND_PX_PER_SEC
+ / 1000.0d;
/**
* The lowest y/x-coordinate on the {@link Event#getClientY() client-y}
@@ -273,8 +274,8 @@ public class AutoScroller {
return;
}
- int reboundPx = (int) Math.ceil(SCROLL_AREA_REBOUND_PX_PER_MS
- * timeDiff);
+ int reboundPx = (int) Math
+ .ceil(SCROLL_AREA_REBOUND_PX_PER_MS * timeDiff);
if (startBound < finalStartBound) {
startBound += reboundPx;
startBound = Math.min(startBound, finalStartBound);
@@ -378,7 +379,8 @@ public class AutoScroller {
final boolean startDidNotMove = oldTopBound == startBound;
final boolean endDidNotMove = oldBottomBound == endBound;
final boolean wasMovement = pageCordinate != scrollingAxisPageCoordinate;
- scrollAreaShouldRebound = (startDidNotMove && endDidNotMove && wasMovement);
+ scrollAreaShouldRebound = (startDidNotMove && endDidNotMove
+ && wasMovement);
}
}
}
@@ -446,7 +448,7 @@ public class AutoScroller {
/**
* Creates a new instance for scrolling the given grid.
- *
+ *
* @param grid
* the grid to auto scroll
*/
@@ -456,7 +458,7 @@ public class AutoScroller {
/**
* Starts the automatic scrolling detection.
- *
+ *
* @param startEvent
* the event that starts the automatic scroll
* @param scrollAxis
@@ -497,7 +499,7 @@ public class AutoScroller {
* triggered.
* <p>
* Defaults to 100px.
- *
+ *
* @param px
* the pixel height/width for the auto scroll area depending on
* direction
@@ -510,7 +512,7 @@ public class AutoScroller {
* Returns the size of the auto scroll area in pixels.
* <p>
* Defaults to 100px.
- *
+ *
* @return size in pixels
*/
public int getScrollArea() {
@@ -623,7 +625,8 @@ public class AutoScroller {
private int getRealFrozenColumnCount() {
if (grid.getFrozenColumnCount() < 0) {
return 0;
- } else if (grid.getSelectionModel().getSelectionColumnRenderer() != null) {
+ } else if (grid.getSelectionModel()
+ .getSelectionColumnRenderer() != null) {
// includes the selection column
return grid.getFrozenColumnCount() + 1;
} else {
@@ -633,7 +636,8 @@ public class AutoScroller {
private double getMaxScrollLeft() {
return grid.getScrollWidth()
- - (getTableElement().getParentElement().getOffsetWidth() - getFrozenColumnsWidth());
+ - (getTableElement().getParentElement().getOffsetWidth()
+ - getFrozenColumnsWidth());
}
private double getMaxScrollTop() {
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/CellReference.java b/client/src/main/java/com/vaadin/client/widget/grid/CellReference.java
index e783cb92ae..17ab480d3b 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/CellReference.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/CellReference.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.client.widgets.Grid;
* Since this class follows the <code>Flyweight</code>-pattern any instance of
* this object is subject to change without the user knowing it and so should
* not be stored anywhere outside of the method providing these instances.
- *
+ *
* @author Vaadin Ltd
* @param <T>
* the type of the row object containing this cell
@@ -47,7 +47,7 @@ public class CellReference<T> {
* <p>
* The difference between {@link #columnIndexDOM} and {@link #columnIndex}
* comes from hidden columns.
- *
+ *
* @param columnIndexDOM
* the index of the column in the DOM
* @param columnIndex
@@ -64,7 +64,7 @@ public class CellReference<T> {
/**
* Gets the grid that contains the referenced cell.
- *
+ *
* @return the grid that contains referenced cell
*/
public Grid<T> getGrid() {
@@ -73,7 +73,7 @@ public class CellReference<T> {
/**
* Gets the row index of the row.
- *
+ *
* @return the index of the row
*/
public int getRowIndex() {
@@ -82,7 +82,7 @@ public class CellReference<T> {
/**
* Gets the row data object.
- *
+ *
* @return the row object
*/
public T getRow() {
@@ -94,7 +94,7 @@ public class CellReference<T> {
* <p>
* <em>NOTE:</em> The index includes hidden columns in the count, unlike
* {@link #getColumnIndexDOM()}.
- *
+ *
* @return the index of the column
*/
public int getColumnIndex() {
@@ -104,7 +104,7 @@ public class CellReference<T> {
/**
* Gets the index of the cell in the DOM. The difference to
* {@link #getColumnIndex()} is caused by hidden columns.
- *
+ *
* @since 7.5.0
* @return the index of the column in the DOM
*/
@@ -114,7 +114,7 @@ public class CellReference<T> {
/**
* Gets the column objects.
- *
+ *
* @return the column object
*/
public Grid.Column<?, T> getColumn() {
@@ -123,7 +123,7 @@ public class CellReference<T> {
/**
* Gets the value of the cell.
- *
+ *
* @return the value of the cell
*/
public Object getValue() {
@@ -132,7 +132,7 @@ public class CellReference<T> {
/**
* Get the element of the cell.
- *
+ *
* @return the element of the cell
*/
public TableCellElement getElement() {
@@ -141,7 +141,7 @@ public class CellReference<T> {
/**
* Gets the RowReference for this CellReference.
- *
+ *
* @return the row reference
*/
protected RowReference<T> getRowReference() {
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/CellStyleGenerator.java b/client/src/main/java/com/vaadin/client/widget/grid/CellStyleGenerator.java
index bbc540de64..0496001a9f 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/CellStyleGenerator.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/CellStyleGenerator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import com.vaadin.client.widgets.Grid;
/**
* Callback interface for generating custom style names for cells
- *
+ *
* @author Vaadin Ltd
* @param <T>
* the row type of the target grid
@@ -30,7 +30,7 @@ public interface CellStyleGenerator<T> {
/**
* Called by Grid to generate a style name for a column element.
- *
+ *
* @param cellReference
* The cell to generate a style for
* @return the style name to add to this cell, or {@code null} to not set
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/DataAvailableEvent.java b/client/src/main/java/com/vaadin/client/widget/grid/DataAvailableEvent.java
index d88fce4e11..5379c1cfa9 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/DataAvailableEvent.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/DataAvailableEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import com.vaadin.shared.ui.grid.Range;
/**
* Event object describing a change of row availability in DataSource of a Grid.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -35,7 +35,7 @@ public class DataAvailableEvent extends GwtEvent<DataAvailableHandler> {
/**
* Returns the range of available rows in {@link DataSource} for this event.
- *
+ *
* @return range of available rows
*/
public Range getAvailableRows() {
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/DataAvailableHandler.java b/client/src/main/java/com/vaadin/client/widget/grid/DataAvailableHandler.java
index 5e0650bc41..e4d640b952 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/DataAvailableHandler.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/DataAvailableHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import com.google.gwt.event.shared.EventHandler;
/**
* Handler for {@link DataAvailableEvent}s.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -27,7 +27,7 @@ public interface DataAvailableHandler extends EventHandler {
/**
* Called when DataSource has data available. Supplied with row range.
- *
+ *
* @param availableRows
* Range of rows available in the DataSource
* @return true if the command was successfully completed, false to call
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/DefaultEditorEventHandler.java b/client/src/main/java/com/vaadin/client/widget/grid/DefaultEditorEventHandler.java
index e4a8783f54..f5e261f901 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/DefaultEditorEventHandler.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/DefaultEditorEventHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ import com.vaadin.client.widgets.Grid.EditorDomEvent;
/**
* The default handler for Grid editor events. Offers several overridable
* protected methods for easier customization.
- *
+ *
* @since 7.6
* @author Vaadin Ltd
*/
@@ -49,7 +49,7 @@ public class DefaultEditorEventHandler<T> implements Editor.EventHandler<T> {
/**
* Returns whether the given event is a touch event that should open the
* editor.
- *
+ *
* @param event
* the received event
* @return whether the event is a touch open event
@@ -85,7 +85,7 @@ public class DefaultEditorEventHandler<T> implements Editor.EventHandler<T> {
* Returns whether the given event should open the editor. The default
* implementation returns true if and only if the event is a doubleclick or
* if it is a keydown event and the keycode is {@link #KEYCODE_OPEN}.
- *
+ *
* @param event
* the received event
* @return true if the event is an open event, false otherwise
@@ -93,7 +93,8 @@ public class DefaultEditorEventHandler<T> implements Editor.EventHandler<T> {
protected boolean isOpenEvent(EditorDomEvent<T> event) {
final Event e = event.getDomEvent();
return e.getTypeInt() == Event.ONDBLCLICK
- || (e.getTypeInt() == Event.ONKEYDOWN && e.getKeyCode() == KEYCODE_OPEN)
+ || (e.getTypeInt() == Event.ONKEYDOWN
+ && e.getKeyCode() == KEYCODE_OPEN)
|| isTouchOpenEvent(event);
}
@@ -101,7 +102,7 @@ public class DefaultEditorEventHandler<T> implements Editor.EventHandler<T> {
* Opens the editor on the appropriate row if the received event is an open
* event. The default implementation uses
* {@link #isOpenEvent(EditorDomEvent) isOpenEvent}.
- *
+ *
* @param event
* the received event
* @return true if this method handled the event and nothing else should be
@@ -128,7 +129,7 @@ public class DefaultEditorEventHandler<T> implements Editor.EventHandler<T> {
* row up or down if the shift key is pressed or not, respectively. Keydown
* event with keycode {@link #KEYCODE_MOVE_HORIZONTAL} moves the editor left
* or right if shift key is pressed or not, respectively.
- *
+ *
* @param event
* the received event
* @return true if this method handled the event and nothing else should be
@@ -172,8 +173,8 @@ public class DefaultEditorEventHandler<T> implements Editor.EventHandler<T> {
// of range.
if (rowDelta == 0) {
if (colIndex >= columnCount
- && rowIndex < event.getGrid().getDataSource()
- .size() - 1) {
+ && rowIndex < event.getGrid().getDataSource().size()
+ - 1) {
rowDelta = 1;
colIndex = 0;
} else if (colIndex < 0 && rowIndex > 0) {
@@ -196,7 +197,7 @@ public class DefaultEditorEventHandler<T> implements Editor.EventHandler<T> {
* By default the editor is moved on a keydown event with keycode
* {@link #KEYCODE_MOVE_HORIZONTAL}. This moves the editor left or right if
* shift key is pressed or not, respectively.
- *
+ *
* @param event
* the received event
* @return true if this method handled the event and nothing else should be
@@ -208,8 +209,8 @@ public class DefaultEditorEventHandler<T> implements Editor.EventHandler<T> {
if (e.getType().equals(BrowserEvents.CLICK)
&& event.getRowIndex() == event.getCell().getRowIndex()) {
- editRow(event, event.getRowIndex(), event.getCell()
- .getColumnIndexDOM());
+ editRow(event, event.getRowIndex(),
+ event.getCell().getColumnIndexDOM());
return true;
@@ -239,7 +240,7 @@ public class DefaultEditorEventHandler<T> implements Editor.EventHandler<T> {
* Returns whether the given event should close the editor. The default
* implementation returns true if and only if the event is a keydown event
* and the keycode is {@link #KEYCODE_CLOSE}.
- *
+ *
* @param event
* the received event
* @return true if the event is a close event, false otherwise
@@ -253,7 +254,7 @@ public class DefaultEditorEventHandler<T> implements Editor.EventHandler<T> {
/**
* Closes the editor if the received event is a close event. The default
* implementation uses {@link #isCloseEvent(EditorDomEvent) isCloseEvent}.
- *
+ *
* @param event
* the received event
* @return true if this method handled the event and nothing else should be
@@ -268,7 +269,8 @@ public class DefaultEditorEventHandler<T> implements Editor.EventHandler<T> {
return false;
}
- protected void editRow(EditorDomEvent<T> event, int rowIndex, int colIndex) {
+ protected void editRow(EditorDomEvent<T> event, int rowIndex,
+ int colIndex) {
int rowCount = event.getGrid().getDataSource().size();
// Limit rowIndex between 0 and rowCount - 1
rowIndex = Math.max(0, Math.min(rowCount - 1, rowIndex));
@@ -288,7 +290,7 @@ public class DefaultEditorEventHandler<T> implements Editor.EventHandler<T> {
* Triggers a value change event from the editor field if it has focus. This
* is based on the assumption that editor field will fire the value change
* when a blur event occurs.
- *
+ *
* @param event
* the editor DOM event
*/
@@ -312,8 +314,10 @@ public class DefaultEditorEventHandler<T> implements Editor.EventHandler<T> {
final boolean handled;
if (event.getGrid().isEditorActive()) {
handled = handleCloseEvent(event)
- || (!editor.isBuffered() && isBody && handleMoveEvent(event))
- || (editor.isBuffered() && isBody && handleBufferedMoveEvent(event));
+ || (!editor.isBuffered() && isBody
+ && handleMoveEvent(event))
+ || (editor.isBuffered() && isBody
+ && handleBufferedMoveEvent(event));
} else {
handled = event.getGrid().isEnabled() && isBody
&& handleOpenEvent(event);
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/DetailsGenerator.java b/client/src/main/java/com/vaadin/client/widget/grid/DetailsGenerator.java
index b9427091a7..f2b75f2576 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/DetailsGenerator.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/DetailsGenerator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import com.google.gwt.user.client.ui.Widget;
/**
* A callback interface for generating details for a particular row in Grid.
- *
+ *
* @since 7.5.0
* @author Vaadin Ltd
*/
@@ -36,7 +36,7 @@ public interface DetailsGenerator {
/**
* This method is called for whenever a new details row needs to be
* generated.
- *
+ *
* @param rowIndex
* the index of the row for which to generate details
* @return the details for the given row, or <code>null</code> to leave the
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/EditorHandler.java b/client/src/main/java/com/vaadin/client/widget/grid/EditorHandler.java
index 91198700ca..5bb1035bd4 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/EditorHandler.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/EditorHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,10 +24,10 @@ import com.vaadin.client.widgets.Grid;
* An interface for binding widgets and data to the grid row editor. Used by the
* editor to support different row types, data sources and custom data binding
* mechanisms.
- *
+ *
* @param <T>
* the row data type
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -41,35 +41,35 @@ public interface EditorHandler<T> {
* An implementation must call either {@link #success()} or {@link #fail()},
* according to whether the operation was a success or failed during
* execution, respectively.
- *
+ *
* @param <T>
* the row data type
*/
public interface EditorRequest<T> {
/**
* Returns the index of the row being requested.
- *
+ *
* @return the row index
*/
public int getRowIndex();
/**
* Returns the index of the column being focused.
- *
+ *
* @return the column index
*/
public int getColumnIndex();
/**
* Returns the row data related to the row being requested.
- *
+ *
* @return the row data
*/
public T getRow();
/**
* Returns the grid instance related to this editor request.
- *
+ *
* @return the grid instance
*/
public Grid<T> getGrid();
@@ -77,7 +77,7 @@ public interface EditorHandler<T> {
/**
* Returns the editor widget used to edit the values of the given
* column.
- *
+ *
* @param column
* the column whose widget to get
* @return the widget related to the column
@@ -92,7 +92,7 @@ public interface EditorHandler<T> {
/**
* Informs Grid that an error occurred while trying to process the
* request.
- *
+ *
* @param errorMessage
* and error message to show to the user, or
* <code>null</code> to not show any message.
@@ -106,7 +106,7 @@ public interface EditorHandler<T> {
/**
* Checks whether the request is completed or not.
- *
+ *
* @return <code>true</code> iff the request is completed
*/
public boolean isCompleted();
@@ -120,10 +120,10 @@ public interface EditorHandler<T> {
* {@link EditorRequest#success()} or
* {@link EditorRequest#failure(String, Collection)} to signal a successful
* or a failed (respectively) bind action.
- *
+ *
* @param request
* the data binding request
- *
+ *
* @see Grid#editRow(int)
*/
public void bind(EditorRequest<T> request);
@@ -138,10 +138,10 @@ public interface EditorHandler<T> {
* {@link EditorRequest#failure(String, Collection)} have no effect on the
* outcome of the cancel action. The editor is already closed when this
* method is called.
- *
+ *
* @param request
* the cancel request
- *
+ *
* @see Grid#cancelEditor()
*/
public void cancel(EditorRequest<T> request);
@@ -153,10 +153,10 @@ public interface EditorHandler<T> {
* The implementation <em>must</em> call either
* {@link EditorRequest#success()} or {@link EditorRequest#fail()} to signal
* a successful or a failed (respectively) save action.
- *
+ *
* @param request
* the save request
- *
+ *
* @see Grid#saveEditor()
*/
public void save(EditorRequest<T> request);
@@ -164,7 +164,7 @@ public interface EditorHandler<T> {
/**
* Returns a widget instance that is used to edit the values in the given
* column. A null return value means the column is not editable.
- *
+ *
* @param column
* the column whose values should be edited
* @return the editor widget for the column or null if the column is not
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/EventCellReference.java b/client/src/main/java/com/vaadin/client/widget/grid/EventCellReference.java
index 4d37be2cc1..60a1c676e8 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/EventCellReference.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/EventCellReference.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import com.vaadin.shared.ui.grid.GridConstants.Section;
* Since this class follows the <code>Flyweight</code>-pattern any instance of
* this object is subject to change without the user knowing it and so should
* not be stored anywhere outside of the method providing these instances.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -43,7 +43,7 @@ public class EventCellReference<T> extends CellReference<T> {
/**
* Sets the RowReference and CellReference to point to given Cell.
- *
+ *
* @param targetCell
* cell to point to
*/
@@ -85,7 +85,7 @@ public class EventCellReference<T> extends CellReference<T> {
/**
* Is the cell reference for a cell in the header of the Grid.
- *
+ *
* @since 7.5
* @return <code>true</true> if referenced cell is in the header,
* <code>false</code> if not
@@ -96,7 +96,7 @@ public class EventCellReference<T> extends CellReference<T> {
/**
* Is the cell reference for a cell in the body of the Grid.
- *
+ *
* @since 7.5
* @return <code>true</true> if referenced cell is in the body,
* <code>false</code> if not
@@ -107,7 +107,7 @@ public class EventCellReference<T> extends CellReference<T> {
/**
* Is the cell reference for a cell in the footer of the Grid.
- *
+ *
* @since 7.5
* @return <code>true</true> if referenced cell is in the footer,
* <code>false</code> if not
@@ -118,7 +118,7 @@ public class EventCellReference<T> extends CellReference<T> {
/**
* Gets the Grid section where the referenced cell is.
- *
+ *
* @since 7.5
* @return grid section
*/
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/HeightAwareDetailsGenerator.java b/client/src/main/java/com/vaadin/client/widget/grid/HeightAwareDetailsGenerator.java
index 5364de3411..96a92d3fc6 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/HeightAwareDetailsGenerator.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/HeightAwareDetailsGenerator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,8 +21,8 @@ package com.vaadin.client.widget.grid;
* <b>FOR INTERNAL USE ONLY!</b> This class exists only for the sake of a
* temporary workaround and might be removed or renamed at any time.
* </p>
- *
- * @since 7.6.1
+ *
+ * @since 7.6.1
* @author Vaadin Ltd
*/
@Deprecated
@@ -35,7 +35,7 @@ public interface HeightAwareDetailsGenerator extends DetailsGenerator {
* <b>FOR INTERNAL USE ONLY!</b> This method exists only for the sake of a
* temporary workaround and might be removed or renamed at any time.
* </p>
- *
+ *
* @since 7.6.1
* @param rowIndex
* the index of the row for which to calculate details row height
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/RendererCellReference.java b/client/src/main/java/com/vaadin/client/widget/grid/RendererCellReference.java
index 994db50aa0..b7aecf1aad 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/RendererCellReference.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/RendererCellReference.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ import com.vaadin.client.widgets.Grid;
* Since this class follows the <code>Flyweight</code>-pattern any instance of
* this object is subject to change without the user knowing it and so should
* not be stored anywhere outside of the method providing these instances.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -34,7 +34,7 @@ public class RendererCellReference extends CellReference<Object> {
/**
* Creates a new renderer cell reference bound to a row reference.
- *
+ *
* @param rowReference
* the row reference to bind to
*/
@@ -46,7 +46,7 @@ public class RendererCellReference extends CellReference<Object> {
/**
* Sets the identifying information for this cell.
- *
+ *
* @param cell
* the flyweight cell to reference
* @param columnIndex
@@ -64,7 +64,7 @@ public class RendererCellReference extends CellReference<Object> {
/**
* Returns the element of the cell. Can be either a <code>TD</code> element
* or a <code>TH</code> element.
- *
+ *
* @return the element of the cell
*/
@Override
@@ -74,7 +74,7 @@ public class RendererCellReference extends CellReference<Object> {
/**
* Sets the colspan attribute of the element of this cell.
- *
+ *
* @param numberOfCells
* the number of columns that the cell should span
*/
@@ -84,7 +84,7 @@ public class RendererCellReference extends CellReference<Object> {
/**
* Gets the colspan attribute of the element of this cell.
- *
+ *
* @return the number of columns that the cell should span
*/
public int getColSpan() {
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/RowReference.java b/client/src/main/java/com/vaadin/client/widget/grid/RowReference.java
index 8874fcc5cc..1bbc440aba 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/RowReference.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/RowReference.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.client.widgets.Grid;
* Since this class follows the <code>Flyweight</code>-pattern any instance of
* this object is subject to change without the user knowing it and so should
* not be stored anywhere outside of the method providing these instances.
- *
+ *
* @author Vaadin Ltd
* @param <T>
* the row object type
@@ -41,7 +41,7 @@ public class RowReference<T> {
/**
* Creates a new row reference for the given grid.
- *
+ *
* @param grid
* the grid that the row belongs to
*/
@@ -51,7 +51,7 @@ public class RowReference<T> {
/**
* Sets the identifying information for this row.
- *
+ *
* @param rowIndex
* the index of the row
* @param row
@@ -67,7 +67,7 @@ public class RowReference<T> {
/**
* Gets the grid that contains the referenced row.
- *
+ *
* @return the grid that contains referenced row
*/
public Grid<T> getGrid() {
@@ -76,7 +76,7 @@ public class RowReference<T> {
/**
* Gets the row index of the row.
- *
+ *
* @return the index of the row
*/
public int getRowIndex() {
@@ -85,7 +85,7 @@ public class RowReference<T> {
/**
* Gets the row data object.
- *
+ *
* @return the row object
*/
public T getRow() {
@@ -94,7 +94,7 @@ public class RowReference<T> {
/**
* Gets the table row element of the row.
- *
+ *
* @return the element of the row
*/
public TableRowElement getElement() {
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/RowStyleGenerator.java b/client/src/main/java/com/vaadin/client/widget/grid/RowStyleGenerator.java
index a12a9ff47d..7bef3c58c7 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/RowStyleGenerator.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/RowStyleGenerator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import java.io.Serializable;
/**
* Callback interface for generating custom style names for data rows
- *
+ *
* @author Vaadin Ltd
* @param <T>
* the row type of the target grid
@@ -30,7 +30,7 @@ public interface RowStyleGenerator<T> extends Serializable {
/**
* Called by Grid to generate a style name for a row.
- *
+ *
* @param rowReference
* The row to generate a style for
* @return the style name to add to this row, or {@code null} to not set any
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/datasources/ListDataSource.java b/client/src/main/java/com/vaadin/client/widget/grid/datasources/ListDataSource.java
index cf7ec53e68..cff544ac94 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/datasources/ListDataSource.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/datasources/ListDataSource.java
@@ -34,23 +34,23 @@ import com.vaadin.shared.util.SharedUtil;
* A simple list based on an in-memory data source for simply adding a list of
* row pojos to the grid. Based on a wrapped list instance which supports adding
* and removing of items.
- *
+ *
* <p>
* Usage:
- *
+ *
* <pre>
* ListDataSource&lt;Integer&gt; ds = new ListDataSource&lt;Integer&gt;(1, 2, 3, 4);
- *
+ *
* // Add item to the data source
* ds.asList().add(5);
- *
+ *
* // Remove item from the data source
* ds.asList().remove(3);
- *
+ *
* // Add multiple items
* ds.asList().addAll(Arrays.asList(5, 6, 7));
* </pre>
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -355,8 +355,8 @@ public class ListDataSource<T> implements DataSource<T> {
* data source after the data source has been constructed. To add or remove
* items to the data source after it has been constructed use
* {@link ListDataSource#asList()}.
- *
- *
+ *
+ *
* @param datasource
* The list to use for providing the data to the grid
*/
@@ -372,7 +372,7 @@ public class ListDataSource<T> implements DataSource<T> {
* Constructs a data source with a set of rows. You can dynamically add and
* remove rows from the data source via the list you get from
* {@link ListDataSource#asList()}
- *
+ *
* @param rows
* The rows to initially add to the data source
*/
@@ -418,7 +418,7 @@ public class ListDataSource<T> implements DataSource<T> {
* <p>
* Note: The list is not the same list as passed into the data source via
* the constructor.
- *
+ *
* @return Returns a list implementation that wraps the real list that backs
* the data source and provides events for the data source
* listeners.
@@ -436,7 +436,7 @@ public class ListDataSource<T> implements DataSource<T> {
/**
* Sort entire container according to a {@link Comparator}.
- *
+ *
* @param comparator
* a comparator object, which compares two data source entries
* (beans/pojos)
@@ -453,7 +453,7 @@ public class ListDataSource<T> implements DataSource<T> {
* <p>
* <em>Note:</em> This method does not verify that the given row object
* exists at all in this DataSource.
- *
+ *
* @param row
* the row object
* @return index of the row; or <code>-1</code> if row is not available
@@ -464,7 +464,7 @@ public class ListDataSource<T> implements DataSource<T> {
/**
* Returns a {@link SelectAllHandler} for this ListDataSource.
- *
+ *
* @return select all handler
*/
public SelectAllHandler<T> getSelectAllHandler() {
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/datasources/ListSorter.java b/client/src/main/java/com/vaadin/client/widget/grid/datasources/ListSorter.java
index 69bea629b0..b0ae3ace89 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/datasources/ListSorter.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/datasources/ListSorter.java
@@ -31,7 +31,7 @@ import com.vaadin.shared.data.sort.SortDirection;
/**
* Provides sorting facility from Grid for the {@link ListDataSource} in-memory
* data source.
- *
+ *
* @author Vaadin Ltd
* @param <T>
* Grid row data type
@@ -75,7 +75,7 @@ public class ListSorter<T> {
* which includes all standard data classes like String, Number derivatives
* and Dates). Any existing comparator can be removed by passing in a
* non-null GridColumn and a null Comparator.
- *
+ *
* @param column
* a grid column. May not be null.
* @param comparator
@@ -97,7 +97,7 @@ public class ListSorter<T> {
/**
* Retrieve the comparator assigned for a specific grid column.
- *
+ *
* @param column
* a grid column. May not be null.
* @return a comparator, or null if no comparator for the specified grid
@@ -122,15 +122,15 @@ public class ListSorter<T> {
/**
* Apply sorting to the current ListDataSource.
- *
+ *
* @param order
* the sort order list provided by the grid sort event
*/
private void sort(final List<SortOrder> order) {
DataSource<T> ds = grid.getDataSource();
if (!(ds instanceof ListDataSource)) {
- throw new IllegalStateException("Grid " + grid
- + " data source is not a ListDataSource!");
+ throw new IllegalStateException(
+ "Grid " + grid + " data source is not a ListDataSource!");
}
((ListDataSource<T>) ds).sort(new Comparator<T>() {
@@ -158,15 +158,16 @@ public class ListSorter<T> {
}
if (result != 0) {
- return o.getDirection() == SortDirection.ASCENDING ? result
- : -result;
+ return o.getDirection() == SortDirection.ASCENDING
+ ? result : -result;
}
}
if (order.size() > 0) {
- return order.get(0).getDirection() == SortDirection.ASCENDING ? a
- .hashCode() - b.hashCode()
- : b.hashCode() - a.hashCode();
+ return order.get(0)
+ .getDirection() == SortDirection.ASCENDING
+ ? a.hashCode() - b.hashCode()
+ : b.hashCode() - a.hashCode();
}
return a.hashCode() - b.hashCode();
}
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/events/AbstractGridKeyEventHandler.java b/client/src/main/java/com/vaadin/client/widget/grid/events/AbstractGridKeyEventHandler.java
index 120c32d380..a0e1b3fa9b 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/events/AbstractGridKeyEventHandler.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/events/AbstractGridKeyEventHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,24 +20,24 @@ import com.vaadin.client.widgets.Grid.AbstractGridKeyEvent;
/**
* Base interface of all handlers for {@link AbstractGridKeyEvent}s.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
public abstract interface AbstractGridKeyEventHandler extends EventHandler {
- public abstract interface GridKeyDownHandler extends
- AbstractGridKeyEventHandler {
+ public abstract interface GridKeyDownHandler
+ extends AbstractGridKeyEventHandler {
public void onKeyDown(GridKeyDownEvent event);
}
- public abstract interface GridKeyUpHandler extends
- AbstractGridKeyEventHandler {
+ public abstract interface GridKeyUpHandler
+ extends AbstractGridKeyEventHandler {
public void onKeyUp(GridKeyUpEvent event);
}
- public abstract interface GridKeyPressHandler extends
- AbstractGridKeyEventHandler {
+ public abstract interface GridKeyPressHandler
+ extends AbstractGridKeyEventHandler {
public void onKeyPress(GridKeyPressEvent event);
}
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/events/AbstractGridMouseEventHandler.java b/client/src/main/java/com/vaadin/client/widget/grid/events/AbstractGridMouseEventHandler.java
index 15e22a6d57..d3ed32978c 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/events/AbstractGridMouseEventHandler.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/events/AbstractGridMouseEventHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,19 +20,19 @@ import com.vaadin.client.widgets.Grid.AbstractGridMouseEvent;
/**
* Base interface of all handlers for {@link AbstractGridMouseEvent}s.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
public abstract interface AbstractGridMouseEventHandler extends EventHandler {
- public abstract interface GridClickHandler extends
- AbstractGridMouseEventHandler {
+ public abstract interface GridClickHandler
+ extends AbstractGridMouseEventHandler {
public void onClick(GridClickEvent event);
}
- public abstract interface GridDoubleClickHandler extends
- AbstractGridMouseEventHandler {
+ public abstract interface GridDoubleClickHandler
+ extends AbstractGridMouseEventHandler {
public void onDoubleClick(GridDoubleClickEvent event);
}
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/events/BodyClickHandler.java b/client/src/main/java/com/vaadin/client/widget/grid/events/BodyClickHandler.java
index a66e170524..c14a9650a0 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/events/BodyClickHandler.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/events/BodyClickHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import com.vaadin.client.widget.grid.events.AbstractGridMouseEventHandler.GridCl
/**
* Handler for {@link GridClickEvent}s that happen in the body of the Grid.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/events/BodyDoubleClickHandler.java b/client/src/main/java/com/vaadin/client/widget/grid/events/BodyDoubleClickHandler.java
index 7be29920e7..0eeb124e29 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/events/BodyDoubleClickHandler.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/events/BodyDoubleClickHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import com.vaadin.client.widget.grid.events.AbstractGridMouseEventHandler.GridDo
/**
* Handler for {@link GridDoubleClickEvent}s that happen in the body of the
* Grid.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/events/BodyKeyDownHandler.java b/client/src/main/java/com/vaadin/client/widget/grid/events/BodyKeyDownHandler.java
index ff1ae82d2e..2fdde86c6b 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/events/BodyKeyDownHandler.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/events/BodyKeyDownHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import com.vaadin.client.widget.grid.events.AbstractGridKeyEventHandler.GridKeyD
/**
* Handler for {@link GridKeyDownEvent}s that happen when the focused cell is in
* the body of the Grid.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/events/BodyKeyPressHandler.java b/client/src/main/java/com/vaadin/client/widget/grid/events/BodyKeyPressHandler.java
index 245250d4c0..b134566de1 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/events/BodyKeyPressHandler.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/events/BodyKeyPressHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import com.vaadin.client.widget.grid.events.AbstractGridKeyEventHandler.GridKeyP
/**
* Handler for {@link GridKeyPressEvent}s that happen when the focused cell is
* in the body of the Grid.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/events/BodyKeyUpHandler.java b/client/src/main/java/com/vaadin/client/widget/grid/events/BodyKeyUpHandler.java
index 2c0951ea40..2aac69a424 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/events/BodyKeyUpHandler.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/events/BodyKeyUpHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import com.vaadin.client.widget.grid.events.AbstractGridKeyEventHandler.GridKeyU
/**
* Handler for {@link GridKeyUpEvent}s that happen when the focused cell is in
* the body of the Grid.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/events/ColumnReorderEvent.java b/client/src/main/java/com/vaadin/client/widget/grid/events/ColumnReorderEvent.java
index 1712871089..54193e7a1b 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/events/ColumnReorderEvent.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/events/ColumnReorderEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import com.google.gwt.event.shared.GwtEvent;
/**
* An event for notifying that the columns in the Grid have been reordered.
- *
+ *
* @param <T>
* The row type of the grid. The row type is the POJO type from where
* the data is retrieved into the column cells.
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/events/ColumnReorderHandler.java b/client/src/main/java/com/vaadin/client/widget/grid/events/ColumnReorderHandler.java
index 29c476058e..f46fe41afc 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/events/ColumnReorderHandler.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/events/ColumnReorderHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import com.google.gwt.event.shared.EventHandler;
/**
* Handler for a Grid column reorder event, called when the Grid's columns has
* been reordered.
- *
+ *
* @param <T>
* The row type of the grid. The row type is the POJO type from where
* the data is retrieved into the column cells.
@@ -32,7 +32,7 @@ public interface ColumnReorderHandler<T> extends EventHandler {
/**
* A column reorder event, fired by Grid when the columns of the Grid have
* been reordered.
- *
+ *
* @param event
* column reorder event
*/
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/events/ColumnResizeEvent.java b/client/src/main/java/com/vaadin/client/widget/grid/events/ColumnResizeEvent.java
index f5c8c0fa83..7c449ab763 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/events/ColumnResizeEvent.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/events/ColumnResizeEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import com.vaadin.client.widgets.Grid.Column;
/**
* An event for notifying that the columns in the Grid have been resized.
- *
+ *
* @param <T>
* The row type of the grid. The row type is the POJO type from where
* the data is retrieved into the column cells.
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/events/ColumnResizeHandler.java b/client/src/main/java/com/vaadin/client/widget/grid/events/ColumnResizeHandler.java
index a66dbf7bd2..c0dca31263 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/events/ColumnResizeHandler.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/events/ColumnResizeHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import com.google.gwt.event.shared.EventHandler;
/**
* Handler for a Grid column resize event, called when the Grid's columns has
* been resized.
- *
+ *
* @param <T>
* The row type of the grid. The row type is the POJO type from where
* the data is retrieved into the column cells.
@@ -32,7 +32,7 @@ public interface ColumnResizeHandler<T> extends EventHandler {
/**
* A column resize event, fired by Grid when the columns of the Grid have
* been resized.
- *
+ *
* @param event
* column resize event
*/
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/events/ColumnVisibilityChangeEvent.java b/client/src/main/java/com/vaadin/client/widget/grid/events/ColumnVisibilityChangeEvent.java
index 63b788bcf2..2a94d4ec4e 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/events/ColumnVisibilityChangeEvent.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/events/ColumnVisibilityChangeEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,15 +21,15 @@ import com.vaadin.client.widgets.Grid.Column;
/**
* An event for notifying that the columns in the Grid's have changed
* visibility.
- *
+ *
* @param <T>
* The row type of the grid. The row type is the POJO type from where
* the data is retrieved into the column cells.
* @since 7.5.0
* @author Vaadin Ltd
*/
-public class ColumnVisibilityChangeEvent<T> extends
- GwtEvent<ColumnVisibilityChangeHandler<T>> {
+public class ColumnVisibilityChangeEvent<T>
+ extends GwtEvent<ColumnVisibilityChangeHandler<T>> {
private final static Type<ColumnVisibilityChangeHandler<?>> TYPE = new Type<ColumnVisibilityChangeHandler<?>>();
@@ -52,7 +52,7 @@ public class ColumnVisibilityChangeEvent<T> extends
/**
* Returns the column where the visibility change occurred.
- *
+ *
* @return the column where the visibility change occurred.
*/
public Column<?, T> getColumn() {
@@ -61,7 +61,7 @@ public class ColumnVisibilityChangeEvent<T> extends
/**
* Was the column set hidden or visible.
- *
+ *
* @return <code>true</code> if the column was hidden <code>false</code> if
* it was set visible
*/
@@ -71,7 +71,7 @@ public class ColumnVisibilityChangeEvent<T> extends
/**
* Is the visibility change triggered by user.
- *
+ *
* @return <code>true</code> if the change was triggered by user,
* <code>false</code> if not
*/
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/events/ColumnVisibilityChangeHandler.java b/client/src/main/java/com/vaadin/client/widget/grid/events/ColumnVisibilityChangeHandler.java
index 542fe4e3c1..1cdffe59e8 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/events/ColumnVisibilityChangeHandler.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/events/ColumnVisibilityChangeHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,9 +20,11 @@ import com.google.gwt.event.shared.EventHandler;
/**
* Handler for a Grid column visibility change event, called when the Grid's
* columns have changed visibility to hidden or visible.
- *
- * @param<T> The row type of the grid. The row type is the POJO type from where
- * the data is retrieved into the column cells.
+ *
+ * @param<T> The
+ * row type of the grid. The row type is the POJO type from where
+ * the data is retrieved into the column cells.
+ *
* @since 7.5.0
* @author Vaadin Ltd
*/
@@ -31,7 +33,7 @@ public interface ColumnVisibilityChangeHandler<T> extends EventHandler {
/**
* A column visibility change event, fired by Grid when a column in the Grid
* has changed visibility.
- *
+ *
* @param event
* column visibility change event
*/
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/events/FooterClickHandler.java b/client/src/main/java/com/vaadin/client/widget/grid/events/FooterClickHandler.java
index 51fa38c948..55d8329077 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/events/FooterClickHandler.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/events/FooterClickHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import com.vaadin.client.widget.grid.events.AbstractGridMouseEventHandler.GridCl
/**
* Handler for {@link GridClickEvent}s that happen in the footer of the Grid.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/events/FooterDoubleClickHandler.java b/client/src/main/java/com/vaadin/client/widget/grid/events/FooterDoubleClickHandler.java
index 2f5ba21787..7c91eef7f7 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/events/FooterDoubleClickHandler.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/events/FooterDoubleClickHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import com.vaadin.client.widget.grid.events.AbstractGridMouseEventHandler.GridDo
/**
* Handler for {@link GridDoubleClickEvent}s that happen in the footer of the
* Grid.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/events/FooterKeyDownHandler.java b/client/src/main/java/com/vaadin/client/widget/grid/events/FooterKeyDownHandler.java
index 85f83970f2..43cf6d9a69 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/events/FooterKeyDownHandler.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/events/FooterKeyDownHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import com.vaadin.client.widget.grid.events.AbstractGridKeyEventHandler.GridKeyD
/**
* Handler for {@link GridKeyDownEvent}s that happen when the focused cell is in
* the footer of the Grid.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/events/FooterKeyPressHandler.java b/client/src/main/java/com/vaadin/client/widget/grid/events/FooterKeyPressHandler.java
index 09778f6873..be0da9cb69 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/events/FooterKeyPressHandler.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/events/FooterKeyPressHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import com.vaadin.client.widget.grid.events.AbstractGridKeyEventHandler.GridKeyP
/**
* Handler for {@link GridKeyPressEvent}s that happen when the focused cell is
* in the footer of the Grid.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/events/FooterKeyUpHandler.java b/client/src/main/java/com/vaadin/client/widget/grid/events/FooterKeyUpHandler.java
index 688f89880f..9068d6c888 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/events/FooterKeyUpHandler.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/events/FooterKeyUpHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import com.vaadin.client.widget.grid.events.AbstractGridKeyEventHandler.GridKeyU
/**
* Handler for {@link GridKeyUpEvent}s that happen when the focused cell is in
* the footer of the Grid.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/events/GridClickEvent.java b/client/src/main/java/com/vaadin/client/widget/grid/events/GridClickEvent.java
index 33a4c923b7..08d08f3011 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/events/GridClickEvent.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/events/GridClickEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.shared.ui.grid.GridConstants.Section;
/**
* Represents native mouse click event in Grid.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -42,8 +42,10 @@ public class GridClickEvent extends AbstractGridMouseEvent<GridClickHandler> {
@Override
protected void doDispatch(GridClickHandler handler, Section section) {
if ((section == Section.BODY && handler instanceof BodyClickHandler)
- || (section == Section.HEADER && handler instanceof HeaderClickHandler)
- || (section == Section.FOOTER && handler instanceof FooterClickHandler)) {
+ || (section == Section.HEADER
+ && handler instanceof HeaderClickHandler)
+ || (section == Section.FOOTER
+ && handler instanceof FooterClickHandler)) {
handler.onClick(this);
}
}
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/events/GridDoubleClickEvent.java b/client/src/main/java/com/vaadin/client/widget/grid/events/GridDoubleClickEvent.java
index 64a1a88b42..55fe118426 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/events/GridDoubleClickEvent.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/events/GridDoubleClickEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,12 +24,12 @@ import com.vaadin.shared.ui.grid.GridConstants.Section;
/**
* Represents native mouse double click event in Grid.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
-public class GridDoubleClickEvent extends
- AbstractGridMouseEvent<GridDoubleClickHandler> {
+public class GridDoubleClickEvent
+ extends AbstractGridMouseEvent<GridDoubleClickHandler> {
public GridDoubleClickEvent(Grid<?> grid, CellReference<?> targetCell) {
super(grid, targetCell);
@@ -42,9 +42,12 @@ public class GridDoubleClickEvent extends
@Override
protected void doDispatch(GridDoubleClickHandler handler, Section section) {
- if ((section == Section.BODY && handler instanceof BodyDoubleClickHandler)
- || (section == Section.HEADER && handler instanceof HeaderDoubleClickHandler)
- || (section == Section.FOOTER && handler instanceof FooterDoubleClickHandler)) {
+ if ((section == Section.BODY
+ && handler instanceof BodyDoubleClickHandler)
+ || (section == Section.HEADER
+ && handler instanceof HeaderDoubleClickHandler)
+ || (section == Section.FOOTER
+ && handler instanceof FooterDoubleClickHandler)) {
handler.onDoubleClick(this);
}
}
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/events/GridKeyDownEvent.java b/client/src/main/java/com/vaadin/client/widget/grid/events/GridKeyDownEvent.java
index 9849137982..2b5b3dbeef 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/events/GridKeyDownEvent.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/events/GridKeyDownEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.shared.ui.grid.GridConstants.Section;
/**
* Represents native key down event in Grid.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -38,8 +38,10 @@ public class GridKeyDownEvent extends AbstractGridKeyEvent<GridKeyDownHandler> {
@Override
protected void doDispatch(GridKeyDownHandler handler, Section section) {
if ((section == Section.BODY && handler instanceof BodyKeyDownHandler)
- || (section == Section.HEADER && handler instanceof HeaderKeyDownHandler)
- || (section == Section.FOOTER && handler instanceof FooterKeyDownHandler)) {
+ || (section == Section.HEADER
+ && handler instanceof HeaderKeyDownHandler)
+ || (section == Section.FOOTER
+ && handler instanceof FooterKeyDownHandler)) {
handler.onKeyDown(this);
}
}
@@ -51,7 +53,7 @@ public class GridKeyDownEvent extends AbstractGridKeyEvent<GridKeyDownHandler> {
/**
* Does the key code represent an arrow key?
- *
+ *
* @param keyCode
* the key code
* @return if it is an arrow key code
@@ -71,7 +73,7 @@ public class GridKeyDownEvent extends AbstractGridKeyEvent<GridKeyDownHandler> {
/**
* Gets the native key code. These key codes are enumerated in the
* {@link KeyCodes} class.
- *
+ *
* @return the key code
*/
public int getNativeKeyCode() {
@@ -80,7 +82,7 @@ public class GridKeyDownEvent extends AbstractGridKeyEvent<GridKeyDownHandler> {
/**
* Is this a key down arrow?
- *
+ *
* @return whether this is a down arrow key event
*/
public boolean isDownArrow() {
@@ -89,7 +91,7 @@ public class GridKeyDownEvent extends AbstractGridKeyEvent<GridKeyDownHandler> {
/**
* Is this a left arrow?
- *
+ *
* @return whether this is a left arrow key event
*/
public boolean isLeftArrow() {
@@ -98,7 +100,7 @@ public class GridKeyDownEvent extends AbstractGridKeyEvent<GridKeyDownHandler> {
/**
* Is this a right arrow?
- *
+ *
* @return whether this is a right arrow key event
*/
public boolean isRightArrow() {
@@ -107,7 +109,7 @@ public class GridKeyDownEvent extends AbstractGridKeyEvent<GridKeyDownHandler> {
/**
* Is this a up arrow?
- *
+ *
* @return whether this is a right arrow key event
*/
public boolean isUpArrow() {
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/events/GridKeyPressEvent.java b/client/src/main/java/com/vaadin/client/widget/grid/events/GridKeyPressEvent.java
index 35a3af0c2e..0b6abce26b 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/events/GridKeyPressEvent.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/events/GridKeyPressEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,12 +24,12 @@ import com.vaadin.shared.ui.grid.GridConstants.Section;
/**
* Represents native key press event in Grid.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
-public class GridKeyPressEvent extends
- AbstractGridKeyEvent<GridKeyPressHandler> {
+public class GridKeyPressEvent
+ extends AbstractGridKeyEvent<GridKeyPressHandler> {
public GridKeyPressEvent(Grid<?> grid, CellReference<?> targetCell) {
super(grid, targetCell);
@@ -38,8 +38,10 @@ public class GridKeyPressEvent extends
@Override
protected void doDispatch(GridKeyPressHandler handler, Section section) {
if ((section == Section.BODY && handler instanceof BodyKeyPressHandler)
- || (section == Section.HEADER && handler instanceof HeaderKeyPressHandler)
- || (section == Section.FOOTER && handler instanceof FooterKeyPressHandler)) {
+ || (section == Section.HEADER
+ && handler instanceof HeaderKeyPressHandler)
+ || (section == Section.FOOTER
+ && handler instanceof FooterKeyPressHandler)) {
handler.onKeyPress(this);
}
}
@@ -51,7 +53,7 @@ public class GridKeyPressEvent extends
/**
* Gets the char code for this event.
- *
+ *
* @return the char code
*/
public char getCharCode() {
@@ -60,7 +62,7 @@ public class GridKeyPressEvent extends
/**
* Gets the Unicode char code (code point) for this event.
- *
+ *
* @return the Unicode char code
*/
public int getUnicodeCharCode() {
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/events/GridKeyUpEvent.java b/client/src/main/java/com/vaadin/client/widget/grid/events/GridKeyUpEvent.java
index d273835233..8cf61f9032 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/events/GridKeyUpEvent.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/events/GridKeyUpEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.shared.ui.grid.GridConstants.Section;
/**
* Represents native key up event in Grid.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -38,8 +38,10 @@ public class GridKeyUpEvent extends AbstractGridKeyEvent<GridKeyUpHandler> {
@Override
protected void doDispatch(GridKeyUpHandler handler, Section section) {
if ((section == Section.BODY && handler instanceof BodyKeyUpHandler)
- || (section == Section.HEADER && handler instanceof HeaderKeyUpHandler)
- || (section == Section.FOOTER && handler instanceof FooterKeyUpHandler)) {
+ || (section == Section.HEADER
+ && handler instanceof HeaderKeyUpHandler)
+ || (section == Section.FOOTER
+ && handler instanceof FooterKeyUpHandler)) {
handler.onKeyUp(this);
}
}
@@ -51,7 +53,7 @@ public class GridKeyUpEvent extends AbstractGridKeyEvent<GridKeyUpHandler> {
/**
* Does the key code represent an arrow key?
- *
+ *
* @param keyCode
* the key code
* @return if it is an arrow key code
@@ -71,7 +73,7 @@ public class GridKeyUpEvent extends AbstractGridKeyEvent<GridKeyUpHandler> {
/**
* Gets the native key code. These key codes are enumerated in the
* {@link KeyCodes} class.
- *
+ *
* @return the key code
*/
public int getNativeKeyCode() {
@@ -80,7 +82,7 @@ public class GridKeyUpEvent extends AbstractGridKeyEvent<GridKeyUpHandler> {
/**
* Is this a key down arrow?
- *
+ *
* @return whether this is a down arrow key event
*/
public boolean isDownArrow() {
@@ -89,7 +91,7 @@ public class GridKeyUpEvent extends AbstractGridKeyEvent<GridKeyUpHandler> {
/**
* Is this a left arrow?
- *
+ *
* @return whether this is a left arrow key event
*/
public boolean isLeftArrow() {
@@ -98,7 +100,7 @@ public class GridKeyUpEvent extends AbstractGridKeyEvent<GridKeyUpHandler> {
/**
* Is this a right arrow?
- *
+ *
* @return whether this is a right arrow key event
*/
public boolean isRightArrow() {
@@ -107,7 +109,7 @@ public class GridKeyUpEvent extends AbstractGridKeyEvent<GridKeyUpHandler> {
/**
* Is this a up arrow?
- *
+ *
* @return whether this is a right arrow key event
*/
public boolean isUpArrow() {
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/events/HeaderClickHandler.java b/client/src/main/java/com/vaadin/client/widget/grid/events/HeaderClickHandler.java
index da20e80905..6913863b19 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/events/HeaderClickHandler.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/events/HeaderClickHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import com.vaadin.client.widget.grid.events.AbstractGridMouseEventHandler.GridCl
/**
* Handler for {@link GridClickEvent}s that happen in the header of the Grid.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/events/HeaderDoubleClickHandler.java b/client/src/main/java/com/vaadin/client/widget/grid/events/HeaderDoubleClickHandler.java
index 16a4cfe1f5..01a0ac300a 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/events/HeaderDoubleClickHandler.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/events/HeaderDoubleClickHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import com.vaadin.client.widget.grid.events.AbstractGridMouseEventHandler.GridDo
/**
* Handler for {@link GridDoubleClickEvent}s that happen in the header of the
* Grid.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/events/HeaderKeyDownHandler.java b/client/src/main/java/com/vaadin/client/widget/grid/events/HeaderKeyDownHandler.java
index 555eb936af..5e4e3d7893 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/events/HeaderKeyDownHandler.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/events/HeaderKeyDownHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import com.vaadin.client.widget.grid.events.AbstractGridKeyEventHandler.GridKeyD
/**
* Handler for {@link GridKeyDownEvent}s that happen when the focused cell is in
* the header of the Grid.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/events/HeaderKeyPressHandler.java b/client/src/main/java/com/vaadin/client/widget/grid/events/HeaderKeyPressHandler.java
index c4dd312f93..4bf9a64ba7 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/events/HeaderKeyPressHandler.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/events/HeaderKeyPressHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import com.vaadin.client.widget.grid.events.AbstractGridKeyEventHandler.GridKeyP
/**
* Handler for {@link GridKeyPressEvent}s that happen when the focused cell is
* in the header of the Grid.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/events/HeaderKeyUpHandler.java b/client/src/main/java/com/vaadin/client/widget/grid/events/HeaderKeyUpHandler.java
index 4dbe1c681e..365e5883f4 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/events/HeaderKeyUpHandler.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/events/HeaderKeyUpHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import com.vaadin.client.widget.grid.events.AbstractGridKeyEventHandler.GridKeyU
/**
* Handler for {@link GridKeyUpEvent}s that happen when the focused cell is in
* the header of the Grid.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/events/ScrollEvent.java b/client/src/main/java/com/vaadin/client/widget/grid/events/ScrollEvent.java
index 08e1e07eab..ed3fe3451d 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/events/ScrollEvent.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/events/ScrollEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import com.google.gwt.event.shared.GwtEvent;
/**
* An event that signifies that a scrollbar bundle has been scrolled
- *
+ *
* @author Vaadin Ltd
* @since 7.4
*/
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/events/ScrollHandler.java b/client/src/main/java/com/vaadin/client/widget/grid/events/ScrollHandler.java
index 1ce901e707..5a106c614d 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/events/ScrollHandler.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/events/ScrollHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import com.google.gwt.event.shared.EventHandler;
/**
* A handler that gets called whenever a scrollbar bundle is scrolled
- *
+ *
* @author Vaadin Ltd
* @since 7.4
*/
@@ -27,7 +27,7 @@ public interface ScrollHandler extends EventHandler {
/**
* A callback method that is called once a scrollbar bundle has been
* scrolled.
- *
+ *
* @param event
* the scroll event
*/
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/events/SelectAllEvent.java b/client/src/main/java/com/vaadin/client/widget/grid/events/SelectAllEvent.java
index 43c2055e95..fc317979f9 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/events/SelectAllEvent.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/events/SelectAllEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ import com.vaadin.client.widget.grid.selection.SelectionModel;
/**
* A select all event, fired by the Grid when it needs all rows in data source
* to be selected.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/events/SelectAllHandler.java b/client/src/main/java/com/vaadin/client/widget/grid/events/SelectAllHandler.java
index 2cdee8d1b3..12622f482c 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/events/SelectAllHandler.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/events/SelectAllHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import com.google.gwt.event.shared.EventHandler;
/**
* Handler for a Grid select all event, called when the Grid needs all rows in
* data source to be selected.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -28,7 +28,7 @@ public interface SelectAllHandler<T> extends EventHandler {
/**
* Called when select all value in SelectionColumn header changes value.
- *
+ *
* @param event
* select all event telling that all rows should be selected
*/
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/selection/AbstractRowHandleSelectionModel.java b/client/src/main/java/com/vaadin/client/widget/grid/selection/AbstractRowHandleSelectionModel.java
index 6b7bbb6294..b47ba49baf 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/selection/AbstractRowHandleSelectionModel.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/selection/AbstractRowHandleSelectionModel.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,20 +23,20 @@ import com.vaadin.client.data.DataSource.RowHandle;
* <p>
* <em>Note:</em> This should be an interface instead of an abstract class, if
* only we could define protected methods in an interface.
- *
+ *
* @author Vaadin Ltd
* @param <T>
* The grid's row type
* @since 7.4
*/
-public abstract class AbstractRowHandleSelectionModel<T> implements
- SelectionModel<T> {
+public abstract class AbstractRowHandleSelectionModel<T>
+ implements SelectionModel<T> {
/**
* Select a row, based on its
* {@link com.vaadin.client.data.DataSource.RowHandle RowHandle}.
* <p>
* <em>Note:</em> this method may not fire selection change events.
- *
+ *
* @param handle
* the handle to select by
* @return <code>true</code> iff the selection state was changed by this
@@ -52,7 +52,7 @@ public abstract class AbstractRowHandleSelectionModel<T> implements
* {@link com.vaadin.client.data.DataSource.RowHandle RowHandle}.
* <p>
* <em>Note:</em> this method may not fire selection change events.
- *
+ *
* @param handle
* the handle to deselect by
* @return <code>true</code> iff the selection state was changed by this
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/selection/ClickSelectHandler.java b/client/src/main/java/com/vaadin/client/widget/grid/selection/ClickSelectHandler.java
index c6bc52dd1c..e7be08f141 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/selection/ClickSelectHandler.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/selection/ClickSelectHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ import com.vaadin.client.widgets.Grid;
/**
* Generic class to perform selections when clicking on cells in body of Grid.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -48,7 +48,7 @@ public class ClickSelectHandler<T> {
/**
* Constructor for ClickSelectHandler. This constructor will add all
* necessary handlers for selecting rows by clicking cells.
- *
+ *
* @param grid
* grid to attach to
*/
@@ -66,7 +66,7 @@ public class ClickSelectHandler<T> {
/**
* Sets whether clicking the currently selected row should deselect the row.
- *
+ *
* @param deselectAllowed
* <code>true</code> to allow deselecting the selected row;
* otherwise <code>false</code>
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/selection/HasSelectionHandlers.java b/client/src/main/java/com/vaadin/client/widget/grid/selection/HasSelectionHandlers.java
index ffcad4c903..6690f32b4e 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/selection/HasSelectionHandlers.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/selection/HasSelectionHandlers.java
@@ -19,7 +19,7 @@ import com.google.gwt.event.shared.HandlerRegistration;
/**
* Marker interface for widgets that fires selection events.
- *
+ *
* @author Vaadin Ltd
* @since 7.4
*/
@@ -31,7 +31,7 @@ public interface HasSelectionHandlers<T> {
* This handler is called whenever a
* {@link com.vaadin.ui.components.grid.selection.SelectionModel
* SelectionModel} detects a change in selection state.
- *
+ *
* @param handler
* a {@link SelectionHandler}
* @return a handler registration object, which can be used to remove the
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/selection/MultiSelectionRenderer.java b/client/src/main/java/com/vaadin/client/widget/grid/selection/MultiSelectionRenderer.java
index f244682b49..27e6108fa6 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/selection/MultiSelectionRenderer.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/selection/MultiSelectionRenderer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -49,14 +49,14 @@ import com.vaadin.client.widgets.Grid;
/**
* Renderer showing multi selection check boxes.
- *
+ *
* @author Vaadin Ltd
* @param <T>
* the type of the associated grid
* @since 7.4
*/
-public class MultiSelectionRenderer<T> extends
- ClickableRenderer<Boolean, CheckBox> {
+public class MultiSelectionRenderer<T>
+ extends ClickableRenderer<Boolean, CheckBox> {
private static final String SELECTION_CHECKBOX_CLASSNAME = "-selection-checkbox";
@@ -74,7 +74,7 @@ public class MultiSelectionRenderer<T> extends
/**
* Handler for MouseDown and TouchStart events for selection checkboxes.
- *
+ *
* @since 7.5
*/
private final class CheckBoxEventHandler implements MouseDownHandler,
@@ -91,16 +91,17 @@ public class MultiSelectionRenderer<T> extends
@Override
public void onMouseDown(MouseDownEvent event) {
- if(checkBox.isEnabled()) {
+ if (checkBox.isEnabled()) {
if (event.getNativeButton() == NativeEvent.BUTTON_LEFT) {
- startDragSelect(event.getNativeEvent(), checkBox.getElement());
+ startDragSelect(event.getNativeEvent(),
+ checkBox.getElement());
}
}
}
@Override
public void onTouchStart(TouchStartEvent event) {
- if(checkBox.isEnabled()) {
+ if (checkBox.isEnabled()) {
startDragSelect(event.getNativeEvent(), checkBox.getElement());
}
}
@@ -132,7 +133,7 @@ public class MultiSelectionRenderer<T> extends
* Something has dropped a touchend/touchcancel and the
* scroller is most probably running amok. Let's cancel it
* and pretend that everything's going as expected
- *
+ *
* Because this is a preview, this code is run before the
* event handler in MultiSelectionRenderer.onBrowserEvent.
* Therefore, we can simply kill everything and let that
@@ -159,8 +160,8 @@ public class MultiSelectionRenderer<T> extends
* Remember: targetElement is always where touchstart started,
* not where the finger is pointing currently.
*/
- final Element targetElement = Element.as(event.getNativeEvent()
- .getEventTarget());
+ final Element targetElement = Element
+ .as(event.getNativeEvent().getEventTarget());
if (isInFirstColumn(targetElement)) {
removeNativeHandler();
event.cancel();
@@ -222,7 +223,8 @@ public class MultiSelectionRenderer<T> extends
* direction has started.
*/
private static final int SCROLL_AREA_REBOUND_PX_PER_SEC = 1;
- private static final double SCROLL_AREA_REBOUND_PX_PER_MS = SCROLL_AREA_REBOUND_PX_PER_SEC / 1000.0d;
+ private static final double SCROLL_AREA_REBOUND_PX_PER_MS = SCROLL_AREA_REBOUND_PX_PER_SEC
+ / 1000.0d;
/**
* The lowest y-coordinate on the {@link Event#getClientY() client} from
@@ -317,8 +319,8 @@ public class MultiSelectionRenderer<T> extends
int constrainedPageY = Math.max(bodyAbsoluteTop,
Math.min(bodyAbsoluteBottom, pageY));
- int logicalRow = getLogicalRowIndex(WidgetUtil.getElementFromPoint(
- initialPageX, constrainedPageY));
+ int logicalRow = getLogicalRowIndex(WidgetUtil
+ .getElementFromPoint(initialPageX, constrainedPageY));
int incrementOrDecrement = (logicalRow > lastModifiedLogicalRow) ? 1
: -1;
@@ -346,8 +348,8 @@ public class MultiSelectionRenderer<T> extends
return;
}
- int reboundPx = (int) Math.ceil(SCROLL_AREA_REBOUND_PX_PER_MS
- * timeDiff);
+ int reboundPx = (int) Math
+ .ceil(SCROLL_AREA_REBOUND_PX_PER_MS * timeDiff);
if (topBound < finalTopBound) {
topBound += reboundPx;
topBound = Math.min(topBound, finalTopBound);
@@ -454,7 +456,8 @@ public class MultiSelectionRenderer<T> extends
final boolean topDidNotMove = oldTopBound == topBound;
final boolean bottomDidNotMove = oldBottomBound == bottomBound;
final boolean wasVerticalMovement = pageY != this.pageY;
- scrollAreaShouldRebound = (topDidNotMove && bottomDidNotMove && wasVerticalMovement);
+ scrollAreaShouldRebound = (topDidNotMove && bottomDidNotMove
+ && wasVerticalMovement);
}
}
}
@@ -604,8 +607,8 @@ public class MultiSelectionRenderer<T> extends
@Override
public CheckBox createWidget() {
final CheckBox checkBox = GWT.create(CheckBox.class);
- checkBox.setStylePrimaryName(grid.getStylePrimaryName()
- + SELECTION_CHECKBOX_CLASSNAME);
+ checkBox.setStylePrimaryName(
+ grid.getStylePrimaryName() + SELECTION_CHECKBOX_CLASSNAME);
CheckBoxEventHandler handler = new CheckBoxEventHandler(checkBox);
@@ -653,13 +656,13 @@ public class MultiSelectionRenderer<T> extends
public boolean onBrowserEvent(final CellReference<?> cell,
final NativeEvent event) {
if (BrowserEvents.TOUCHSTART.equals(event.getType())
- || (BrowserEvents.MOUSEDOWN.equals(event.getType()) && event
- .getButton() == NativeEvent.BUTTON_LEFT)) {
+ || (BrowserEvents.MOUSEDOWN.equals(event.getType())
+ && event.getButton() == NativeEvent.BUTTON_LEFT)) {
startDragSelect(event, Element.as(event.getEventTarget()));
return true;
} else {
- throw new IllegalStateException("received unexpected event: "
- + event.getType());
+ throw new IllegalStateException(
+ "received unexpected event: " + event.getType());
}
}
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/selection/SelectionEvent.java b/client/src/main/java/com/vaadin/client/widget/grid/selection/SelectionEvent.java
index 528beb5809..8ea2e56420 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/selection/SelectionEvent.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/selection/SelectionEvent.java
@@ -25,7 +25,7 @@ import com.vaadin.client.widgets.Grid;
/**
* Event object describing a change in Grid row selection state.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -41,7 +41,7 @@ public class SelectionEvent<T> extends GwtEvent<SelectionHandler> {
/**
* Creates an event with a single added or removed row.
- *
+ *
* @param grid
* grid reference, used for getSource
* @param added
@@ -72,7 +72,7 @@ public class SelectionEvent<T> extends GwtEvent<SelectionHandler> {
/**
* Creates an event where several rows have been added or removed.
- *
+ *
* @param grid
* Grid reference, used for getSource
* @param added
@@ -106,7 +106,7 @@ public class SelectionEvent<T> extends GwtEvent<SelectionHandler> {
/**
* Gets a reference to the Grid object that fired this event.
- *
+ *
* @return a grid reference
*/
@Override
@@ -117,7 +117,7 @@ public class SelectionEvent<T> extends GwtEvent<SelectionHandler> {
/**
* Gets all rows added to the selection since the last
* {@link SelectionEvent} .
- *
+ *
* @return a collection of added rows. Empty collection if no rows were
* added.
*/
@@ -128,7 +128,7 @@ public class SelectionEvent<T> extends GwtEvent<SelectionHandler> {
/**
* Gets all rows removed from the selection since the last
* {@link SelectionEvent}.
- *
+ *
* @return a collection of removed rows. Empty collection if no rows were
* removed.
*/
@@ -138,7 +138,7 @@ public class SelectionEvent<T> extends GwtEvent<SelectionHandler> {
/**
* Gets currently selected rows.
- *
+ *
* @return a non-null collection containing all currently selected rows.
*/
public Collection<T> getSelected() {
@@ -147,7 +147,7 @@ public class SelectionEvent<T> extends GwtEvent<SelectionHandler> {
/**
* Gets a type identifier for this event.
- *
+ *
* @return a {@link Type} identifier.
*/
public static Type<SelectionHandler> getType() {
@@ -168,7 +168,7 @@ public class SelectionEvent<T> extends GwtEvent<SelectionHandler> {
/**
* Checks if this selection change event is fired during a batched
* selection/deselection operation.
- *
+ *
* @return <code>true</code> iff this event is fired during a batched
* selection/deselection operation
*/
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/selection/SelectionHandler.java b/client/src/main/java/com/vaadin/client/widget/grid/selection/SelectionHandler.java
index 4f939fa798..46cafe6bbf 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/selection/SelectionHandler.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/selection/SelectionHandler.java
@@ -19,7 +19,7 @@ import com.google.gwt.event.shared.EventHandler;
/**
* Handler for {@link SelectionEvent}s.
- *
+ *
* @author Vaadin Ltd
* @param <T>
* The row data type
@@ -29,7 +29,7 @@ public interface SelectionHandler<T> extends EventHandler {
/**
* Called when a selection model's selection state is changed.
- *
+ *
* @param event
* a selection event, containing info about rows that have been
* added to or removed from the selection.
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/selection/SelectionModel.java b/client/src/main/java/com/vaadin/client/widget/grid/selection/SelectionModel.java
index ec36ab52e8..000aa50702 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/selection/SelectionModel.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/selection/SelectionModel.java
@@ -25,7 +25,7 @@ import com.vaadin.client.widgets.Grid;
* <p>
* Selection models perform tracking of selected rows in the Grid, as well as
* dispatching events when the selection state changes.
- *
+ *
* @author Vaadin Ltd
* @param <T>
* Grid's row type
@@ -36,7 +36,7 @@ public interface SelectionModel<T> {
/**
* Return true if the provided row is considered selected under the
* implementing selection model.
- *
+ *
* @param row
* row object instance
* @return <code>true</code>, if the row given as argument is considered
@@ -47,7 +47,7 @@ public interface SelectionModel<T> {
/**
* Return the {@link Renderer} responsible for rendering the selection
* column.
- *
+ *
* @return a renderer instance. If null is returned, a selection column will
* not be drawn.
*/
@@ -58,7 +58,7 @@ public interface SelectionModel<T> {
* <p>
* Implementations are free to have this be a no-op. This method is called
* internally by Grid.
- *
+ *
* @param grid
* a {@link Grid} instance; <code>null</code> when removing from
* Grid
@@ -75,7 +75,7 @@ public interface SelectionModel<T> {
/**
* Returns a Collection containing all selected rows.
- *
+ *
* @return a non-null collection.
*/
public Collection<T> getSelectedRows();
@@ -83,7 +83,7 @@ public interface SelectionModel<T> {
/**
* Selection model that allows a maximum of one row to be selected at any
* one time.
- *
+ *
* @param <T>
* type parameter corresponding with Grid row type
*/
@@ -91,7 +91,7 @@ public interface SelectionModel<T> {
/**
* Selects a row.
- *
+ *
* @param row
* a {@link Grid} row object
* @return true, if this row as not previously selected.
@@ -102,7 +102,7 @@ public interface SelectionModel<T> {
* Deselects a row.
* <p>
* This is a no-op unless {@link row} is the currently selected row.
- *
+ *
* @param row
* a {@link Grid} row object
* @return true, if the currently selected row was deselected.
@@ -111,7 +111,7 @@ public interface SelectionModel<T> {
/**
* Returns the currently selected row.
- *
+ *
* @return a {@link Grid} row object or null, if nothing is selected.
*/
public T getSelectedRow();
@@ -119,7 +119,7 @@ public interface SelectionModel<T> {
/**
* Sets whether it's allowed to deselect the selected row through the
* UI. Deselection is allowed by default.
- *
+ *
* @param deselectAllowed
* <code>true</code> if the selected row can be deselected
* without selecting another row instead; otherwise
@@ -130,7 +130,7 @@ public interface SelectionModel<T> {
/**
* Sets whether it's allowed to deselect the selected row through the
* UI.
- *
+ *
* @return <code>true</code> if deselection is allowed; otherwise
* <code>false</code>
*/
@@ -140,7 +140,7 @@ public interface SelectionModel<T> {
/**
* Selection model that allows for several rows to be selected at once.
- *
+ *
* @param <T>
* type parameter corresponding with Grid row type
*/
@@ -149,7 +149,7 @@ public interface SelectionModel<T> {
/**
* A multi selection model that can send selections and deselections in
* a batch, instead of committing them one-by-one.
- *
+ *
* @param <T>
* type parameter corresponding with Grid row type
*/
@@ -179,21 +179,21 @@ public interface SelectionModel<T> {
/**
* Checks whether or not a batch has been started.
- *
+ *
* @return <code>true</code> iff a batch has been started
*/
public boolean isBeingBatchSelected();
/**
* Gets all the rows that would become selected in this batch.
- *
+ *
* @return a collection of the rows that would become selected
*/
public Collection<T> getSelectedRowsBatch();
/**
* Gets all the rows that would become deselected in this batch.
- *
+ *
* @return a collection of the rows that would become deselected
*/
public Collection<T> getDeselectedRowsBatch();
@@ -201,7 +201,7 @@ public interface SelectionModel<T> {
/**
* Selects one or more rows.
- *
+ *
* @param rows
* {@link Grid} row objects
* @return true, if the set of selected rows was changed.
@@ -210,7 +210,7 @@ public interface SelectionModel<T> {
/**
* Deselects one or more rows.
- *
+ *
* @param rows
* Grid row objects
* @return true, if the set of selected rows was changed.
@@ -219,14 +219,14 @@ public interface SelectionModel<T> {
/**
* De-selects all rows.
- *
+ *
* @return true, if any row was previously selected.
*/
public boolean deselectAll();
/**
* Select all rows in a {@link Collection}.
- *
+ *
* @param rows
* a collection of Grid row objects
* @return true, if the set of selected rows was changed.
@@ -235,7 +235,7 @@ public interface SelectionModel<T> {
/**
* Deselect all rows in a {@link Collection}.
- *
+ *
* @param rows
* a collection of Grid row objects
* @return true, if the set of selected rows was changed.
@@ -247,7 +247,7 @@ public interface SelectionModel<T> {
/**
* Interface for a selection model that does not allow anything to be
* selected.
- *
+ *
* @param <T>
* type parameter corresponding with Grid row type
*/
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/selection/SelectionModelMulti.java b/client/src/main/java/com/vaadin/client/widget/grid/selection/SelectionModelMulti.java
index d654a28b7d..00c115c5c2 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/selection/SelectionModelMulti.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/selection/SelectionModelMulti.java
@@ -28,7 +28,7 @@ import com.vaadin.client.widgets.Grid;
/**
* Multi-row selection model.
- *
+ *
* @author Vaadin Ltd
* @since 7.4
*/
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/selection/SelectionModelNone.java b/client/src/main/java/com/vaadin/client/widget/grid/selection/SelectionModelNone.java
index 4a8b203a94..48c1e3a850 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/selection/SelectionModelNone.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/selection/SelectionModelNone.java
@@ -24,7 +24,7 @@ import com.vaadin.client.widgets.Grid;
/**
* No-row selection model.
- *
+ *
* @author Vaadin Ltd
* @since 7.4
*/
@@ -59,15 +59,15 @@ public class SelectionModelNone<T> extends AbstractRowHandleSelectionModel<T>
@Override
protected boolean selectByHandle(RowHandle<T> handle)
throws UnsupportedOperationException {
- throw new UnsupportedOperationException("This selection model "
- + "does not support selection");
+ throw new UnsupportedOperationException(
+ "This selection model " + "does not support selection");
}
@Override
protected boolean deselectByHandle(RowHandle<T> handle)
throws UnsupportedOperationException {
- throw new UnsupportedOperationException("This selection model "
- + "does not support deselection");
+ throw new UnsupportedOperationException(
+ "This selection model " + "does not support deselection");
}
}
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/selection/SelectionModelSingle.java b/client/src/main/java/com/vaadin/client/widget/grid/selection/SelectionModelSingle.java
index 38605db12c..f3df892623 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/selection/SelectionModelSingle.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/selection/SelectionModelSingle.java
@@ -24,7 +24,7 @@ import com.vaadin.client.widgets.Grid;
/**
* Single-row selection model.
- *
+ *
* @author Vaadin Ltd
* @since 7.4
*/
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/selection/SpaceSelectHandler.java b/client/src/main/java/com/vaadin/client/widget/grid/selection/SpaceSelectHandler.java
index 3e04a6dfac..456f08c5b3 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/selection/SpaceSelectHandler.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/selection/SpaceSelectHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import com.vaadin.shared.ui.grid.ScrollDestination;
/**
* Generic class to perform selections when pressing space key.
- *
+ *
* @author Vaadin Ltd
* @param <T>
* row data type
@@ -65,8 +65,8 @@ public class SpaceSelectHandler<T> {
@Override
public void onDataAvailable(
DataAvailableEvent dataAvailableEvent) {
- if (dataAvailableEvent.getAvailableRows().contains(
- rowIndex)) {
+ if (dataAvailableEvent.getAvailableRows()
+ .contains(rowIndex)) {
setSelected(grid, rowIndex);
scrollHandler.removeHandler();
scrollHandler = null;
@@ -96,7 +96,7 @@ public class SpaceSelectHandler<T> {
/**
* Constructor for SpaceSelectHandler. This constructor will add all
* necessary handlers for selecting rows with space.
- *
+ *
* @param grid
* grid to attach to
*/
@@ -126,7 +126,7 @@ public class SpaceSelectHandler<T> {
/**
* Sets whether pressing space for the currently selected row should
* deselect the row.
- *
+ *
* @param deselectAllowed
* <code>true</code> to allow deselecting the selected row;
* otherwise <code>false</code>
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/sort/Sort.java b/client/src/main/java/com/vaadin/client/widget/grid/sort/Sort.java
index b1f3c6e39a..6cc0e0f5ea 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/sort/Sort.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/sort/Sort.java
@@ -23,7 +23,7 @@ import com.vaadin.shared.data.sort.SortDirection;
/**
* Fluid Sort descriptor object.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -36,7 +36,7 @@ public class Sort {
/**
* Basic constructor, used by the {@link #by(GridColumn)} and
* {@link #by(GridColumn, SortDirection)} methods.
- *
+ *
* @param column
* a grid column
* @param direction
@@ -54,7 +54,7 @@ public class Sort {
* isn't already used earlier (which would indicate a bug). If the column
* has been used before, this constructor throws an
* {@link IllegalStateException}.
- *
+ *
* @param previous
* the sort instance that the new sort instance is to extend
* @param column
@@ -81,7 +81,7 @@ public class Sort {
/**
* Start building a Sort order by sorting a provided column in ascending
* order.
- *
+ *
* @param column
* a grid column object reference
* @return a sort instance, typed to the grid data type
@@ -92,7 +92,7 @@ public class Sort {
/**
* Start building a Sort order by sorting a provided column.
- *
+ *
* @param column
* a grid column object reference
* @param direction
@@ -107,7 +107,7 @@ public class Sort {
* Continue building a Sort order. The provided column is sorted in
* ascending order if the previously added columns have been evaluated as
* equals.
- *
+ *
* @param column
* a grid column object reference
* @return a sort instance, typed to the grid data type
@@ -120,7 +120,7 @@ public class Sort {
* Continue building a Sort order. The provided column is sorted in
* specified order if the previously added columns have been evaluated as
* equals.
- *
+ *
* @param column
* a grid column object reference
* @param direction
@@ -136,7 +136,7 @@ public class Sort {
* calling {@link com.vaadin.client.ui.grid.Grid#sort(Sort)}, but can also
* be called manually to create a SortOrder list, which can also be provided
* directly to Grid.
- *
+ *
* @return a sort order list.
*/
public List<SortOrder> build() {
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/sort/SortEvent.java b/client/src/main/java/com/vaadin/client/widget/grid/sort/SortEvent.java
index 2aad6e4f95..fce4aeba31 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/sort/SortEvent.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/sort/SortEvent.java
@@ -23,7 +23,7 @@ import com.vaadin.client.widgets.Grid;
/**
* A sort event, fired by the Grid when it needs its data source to provide data
* sorted in a specific manner.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -38,7 +38,7 @@ public class SortEvent<T> extends GwtEvent<SortHandler<?>> {
/**
* Creates a new Sort Event. All provided parameters are final, and passed
* on as-is.
- *
+ *
* @param grid
* a grid reference
* @param order
@@ -46,7 +46,8 @@ public class SortEvent<T> extends GwtEvent<SortHandler<?>> {
* @param originator
* a value indicating where this event originated from
*/
- public SortEvent(Grid<T> grid, List<SortOrder> order, boolean userOriginated) {
+ public SortEvent(Grid<T> grid, List<SortOrder> order,
+ boolean userOriginated) {
this.grid = grid;
this.order = order;
this.userOriginated = userOriginated;
@@ -60,7 +61,7 @@ public class SortEvent<T> extends GwtEvent<SortHandler<?>> {
/**
* Static access to the GWT event type identifier associated with this Event
* class
- *
+ *
* @return a type object, uniquely describing this event type.
*/
public static Type<SortHandler<?>> getType() {
@@ -69,7 +70,7 @@ public class SortEvent<T> extends GwtEvent<SortHandler<?>> {
/**
* Get access to the Grid that fired this event
- *
+ *
* @return the grid instance
*/
@Override
@@ -79,7 +80,7 @@ public class SortEvent<T> extends GwtEvent<SortHandler<?>> {
/**
* Get access to the Grid that fired this event
- *
+ *
* @return the grid instance
*/
public Grid<T> getGrid() {
@@ -88,7 +89,7 @@ public class SortEvent<T> extends GwtEvent<SortHandler<?>> {
/**
* Get the sort ordering that is to be applied to the Grid
- *
+ *
* @return a list of sort order objects
*/
public List<SortOrder> getOrder() {
@@ -97,7 +98,7 @@ public class SortEvent<T> extends GwtEvent<SortHandler<?>> {
/**
* Returns whether this event originated from actions done by the user.
- *
+ *
* @return true if sort event originated from user interaction
*/
public boolean isUserOriginated() {
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/sort/SortHandler.java b/client/src/main/java/com/vaadin/client/widget/grid/sort/SortHandler.java
index 330cbe9d58..347b0f5687 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/sort/SortHandler.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/sort/SortHandler.java
@@ -20,7 +20,7 @@ import com.google.gwt.event.shared.EventHandler;
/**
* Handler for a Grid sort event, called when the Grid needs its data source to
* provide data sorted in a specific manner.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -29,7 +29,7 @@ public interface SortHandler<T> extends EventHandler {
/**
* Handle sorting of the Grid. This method is called when a re-sorting of
* the Grid's data is requested.
- *
+ *
* @param event
* the sort event
*/
diff --git a/client/src/main/java/com/vaadin/client/widget/grid/sort/SortOrder.java b/client/src/main/java/com/vaadin/client/widget/grid/sort/SortOrder.java
index 8166f1e6ed..f8eb58b379 100644
--- a/client/src/main/java/com/vaadin/client/widget/grid/sort/SortOrder.java
+++ b/client/src/main/java/com/vaadin/client/widget/grid/sort/SortOrder.java
@@ -20,7 +20,7 @@ import com.vaadin.shared.data.sort.SortDirection;
/**
* Sort order descriptor. Contains column and direction references.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -32,7 +32,7 @@ public class SortOrder {
/**
* Create a sort order descriptor with a default sorting direction value of
* {@link SortDirection#ASCENDING}.
- *
+ *
* @param column
* a grid column descriptor object
*/
@@ -42,7 +42,7 @@ public class SortOrder {
/**
* Create a sort order descriptor.
- *
+ *
* @param column
* a grid column descriptor object
* @param direction
@@ -63,7 +63,7 @@ public class SortOrder {
/**
* Returns the {@link GridColumn} reference given in the constructor.
- *
+ *
* @return a grid column reference
*/
public Grid.Column<?, ?> getColumn() {
@@ -72,7 +72,7 @@ public class SortOrder {
/**
* Returns the {@link SortDirection} value given in the constructor.
- *
+ *
* @return a sort direction value
*/
public SortDirection getDirection() {
@@ -81,7 +81,7 @@ public class SortOrder {
/**
* Returns a new SortOrder object with the sort direction reversed.
- *
+ *
* @return a new sort order object
*/
public SortOrder getOpposite() {
diff --git a/client/src/main/java/com/vaadin/client/widgets/Escalator.java b/client/src/main/java/com/vaadin/client/widgets/Escalator.java
index d867907996..76b9c284db 100644
--- a/client/src/main/java/com/vaadin/client/widgets/Escalator.java
+++ b/client/src/main/java/com/vaadin/client/widgets/Escalator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -187,14 +187,14 @@ import com.vaadin.shared.util.SharedUtil;
* implement such an interface), makes it possible for JSNI to indirectly refer
* to the inner class, by invoking methods and fields in the non-inner-class
* API.
- *
+ *
* @see Escalator.Scroller
*/
abstract class JsniWorkaround {
/**
* A JavaScript function that handles the scroll DOM event, and passes it on
* to Java code.
- *
+ *
* @see #createScrollListenerFunction(Escalator)
* @see Escalator#onScroll()
* @see Escalator.Scroller#onScroll()
@@ -204,7 +204,7 @@ abstract class JsniWorkaround {
/**
* A JavaScript function that handles the mousewheel DOM event, and passes
* it on to Java code.
- *
+ *
* @see #createMousewheelListenerFunction(Escalator)
* @see Escalator#onScroll()
* @see Escalator.Scroller#onScroll()
@@ -214,7 +214,7 @@ abstract class JsniWorkaround {
/**
* A JavaScript function that handles the touch start DOM event, and passes
* it on to Java code.
- *
+ *
* @see TouchHandlerBundle#touchStart(Escalator.JsniUtil.TouchHandlerBundle.CustomTouchEvent)
*/
protected JavaScriptObject touchStartFunction;
@@ -222,7 +222,7 @@ abstract class JsniWorkaround {
/**
* A JavaScript function that handles the touch move DOM event, and passes
* it on to Java code.
- *
+ *
* @see TouchHandlerBundle#touchMove(Escalator.JsniUtil.TouchHandlerBundle.CustomTouchEvent)
*/
protected JavaScriptObject touchMoveFunction;
@@ -230,7 +230,7 @@ abstract class JsniWorkaround {
/**
* A JavaScript function that handles the touch end and cancel DOM events,
* and passes them on to Java code.
- *
+ *
* @see TouchHandlerBundle#touchEnd(Escalator.JsniUtil.TouchHandlerBundle.CustomTouchEvent)
*/
protected JavaScriptObject touchEndFunction;
@@ -239,7 +239,8 @@ abstract class JsniWorkaround {
protected JsniWorkaround(final Escalator escalator) {
scrollListenerFunction = createScrollListenerFunction(escalator);
- mousewheelListenerFunction = createMousewheelListenerFunction(escalator);
+ mousewheelListenerFunction = createMousewheelListenerFunction(
+ escalator);
touchHandlerBundle = new TouchHandlerBundle(escalator);
touchStartFunction = touchHandlerBundle.getTouchStartHandler();
@@ -250,7 +251,7 @@ abstract class JsniWorkaround {
/**
* A method that constructs the JavaScript function that will be stored into
* {@link #scrollListenerFunction}.
- *
+ *
* @param esc
* a reference to the current instance of {@link Escalator}
* @see Escalator#onScroll()
@@ -261,7 +262,7 @@ abstract class JsniWorkaround {
/**
* A method that constructs the JavaScript function that will be stored into
* {@link #mousewheelListenerFunction}.
- *
+ *
* @param esc
* a reference to the current instance of {@link Escalator}
* @see Escalator#onScroll()
@@ -273,12 +274,12 @@ abstract class JsniWorkaround {
/**
* A low-level table-like widget that features a scrolling virtual viewport and
* lazily generated rows.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
-public class Escalator extends Widget implements RequiresResize,
- DeferredWorker, SubPartAware {
+public class Escalator extends Widget
+ implements RequiresResize, DeferredWorker, SubPartAware {
// todo comments legend
/*
@@ -310,8 +311,8 @@ public class Escalator extends Widget implements RequiresResize,
/**
* A <a href=
* "http://www.gwtproject.org/doc/latest/DevGuideCodingBasicsOverlay.html"
- * >JavaScriptObject overlay</a> for the <a
- * href="http://www.w3.org/TR/touch-events/">JavaScript
+ * >JavaScriptObject overlay</a> for the
+ * <a href="http://www.w3.org/TR/touch-events/">JavaScript
* TouchEvent</a> object.
* <p>
* This needs to be used in the touch event handlers, since GWT's
@@ -320,8 +321,8 @@ public class Escalator extends Widget implements RequiresResize,
* {@link com.google.gwt.dom.client.NativeEvent NativeEvent} isn't
* properly populated with the correct values.
*/
- private final static class CustomTouchEvent extends
- JavaScriptObject {
+ private final static class CustomTouchEvent
+ extends JavaScriptObject {
protected CustomTouchEvent() {
}
@@ -738,8 +739,7 @@ public class Escalator extends Widget implements RequiresResize,
double tableWrapperWidth = widthOfEscalator;
boolean verticalScrollNeeded = scrollContentHeight > tableWrapperHeight
- + WidgetUtil.PIXEL_EPSILON
- - header.getHeightOfSection()
+ + WidgetUtil.PIXEL_EPSILON - header.getHeightOfSection()
- footer.getHeightOfSection();
boolean horizontalScrollNeeded = scrollContentWidth > tableWrapperWidth
+ WidgetUtil.PIXEL_EPSILON;
@@ -774,8 +774,8 @@ public class Escalator extends Widget implements RequiresResize,
double footerHeight = footer.getHeightOfSection();
double headerHeight = header.getHeightOfSection();
- double vScrollbarHeight = Math.max(0, tableWrapperHeight
- - footerHeight - headerHeight);
+ double vScrollbarHeight = Math.max(0,
+ tableWrapperHeight - footerHeight - headerHeight);
verticalScrollbar.setOffsetSize(vScrollbarHeight);
verticalScrollbar.setScrollSize(scrollContentHeight);
@@ -795,8 +795,8 @@ public class Escalator extends Widget implements RequiresResize,
double hScrollOffsetWidth = tableWrapperWidth - frozenPixels;
horizontalScrollbar.setOffsetSize(hScrollOffsetWidth);
horizontalScrollbar.setScrollSize(unfrozenPixels);
- horizontalScrollbar.getElement().getStyle()
- .setLeft(frozenPixels, Unit.PX);
+ horizontalScrollbar.getElement().getStyle().setLeft(frozenPixels,
+ Unit.PX);
horizontalScrollbar.setScrollPos(prevScrollPos);
/*
@@ -1019,9 +1019,8 @@ public class Escalator extends Widget implements RequiresResize,
+ columnConfiguration.getColumnWidthActual(columnIndex);
final double viewportStartPx = getScrollLeft();
- double viewportEndPx = viewportStartPx
- + WidgetUtil
- .getRequiredWidthBoundingClientRectDouble(getElement())
+ double viewportEndPx = viewportStartPx + WidgetUtil
+ .getRequiredWidthBoundingClientRectDouble(getElement())
- frozenPixels;
if (verticalScrollbar.showsScrollHandle()) {
viewportEndPx -= WidgetUtil.getNativeScrollbarSize();
@@ -1070,7 +1069,9 @@ public class Escalator extends Widget implements RequiresResize,
/**
* The table section element ({@code <thead>}, {@code <tbody>} or
- * {@code <tfoot>}) the rows (i.e. {@code <tr>} tags) are contained in.
+ * {@code <tfoot>}) the rows (i.e. {@code
+ * <tr>
+ * } tags) are contained in.
*/
protected final TableSectionElement root;
@@ -1101,7 +1102,7 @@ public class Escalator extends Widget implements RequiresResize,
* <p>
* <em>Note:</em> To actually <em>create</em> such an element, use
* {@link #createCellElement(int, int)} instead.
- *
+ *
* @return the tag name for the element to represent cells as
* @see #createCellElement(int, int)
*/
@@ -1118,11 +1119,12 @@ public class Escalator extends Widget implements RequiresResize,
* <em>Implementation detail:</em> This method does no DOM modifications
* (i.e. is very cheap to call) if there is no data for rows or columns
* when this method is called.
- *
+ *
* @see #hasColumnAndRowData()
*/
@Override
- public void setEscalatorUpdater(final EscalatorUpdater escalatorUpdater) {
+ public void setEscalatorUpdater(
+ final EscalatorUpdater escalatorUpdater) {
if (escalatorUpdater == null) {
throw new IllegalArgumentException(
"escalator updater cannot be null");
@@ -1141,7 +1143,7 @@ public class Escalator extends Widget implements RequiresResize,
* <em>Implementation detail:</em> This method does no DOM modifications
* (i.e. is very cheap to call) if there are no rows in the DOM when
* this method is called.
- *
+ *
* @see #hasSomethingInDom()
*/
@Override
@@ -1169,7 +1171,7 @@ public class Escalator extends Widget implements RequiresResize,
* <p>
* The implementation must call {@link #paintRemoveRow(Element, int)}
* for each row that is removed from the DOM.
- *
+ *
* @param index
* the logical index of the first removed row
* @param numberOfRows
@@ -1187,7 +1189,7 @@ public class Escalator extends Widget implements RequiresResize,
* <p>
* This method must be called for each removed DOM row by any
* {@link #paintRemoveRows(int, int)} implementation.
- *
+ *
* @param tr
* the row element to remove.
*/
@@ -1214,8 +1216,8 @@ public class Escalator extends Widget implements RequiresResize,
}
protected void assertArgumentsAreValidAndWithinRange(final int index,
- final int numberOfRows) throws IllegalArgumentException,
- IndexOutOfBoundsException {
+ final int numberOfRows)
+ throws IllegalArgumentException, IndexOutOfBoundsException {
if (numberOfRows < 1) {
throw new IllegalArgumentException(
"Number of rows must be 1 or greater (was "
@@ -1223,8 +1225,8 @@ public class Escalator extends Widget implements RequiresResize,
}
if (index < 0 || index + numberOfRows > getRowCount()) {
- throw new IndexOutOfBoundsException("The given "
- + "row range (" + index + ".." + (index + numberOfRows)
+ throw new IndexOutOfBoundsException("The given " + "row range ("
+ + index + ".." + (index + numberOfRows)
+ ") was outside of the current number of rows ("
+ getRowCount() + ")");
}
@@ -1244,9 +1246,9 @@ public class Escalator extends Widget implements RequiresResize,
* <p>
* Any extra content, such as spacers for the body, should not be
* included in this count.
- *
+ *
* @since 7.5.0
- *
+ *
* @return the actual DOM count of rows
*/
public abstract int getDomRowCount();
@@ -1257,7 +1259,7 @@ public class Escalator extends Widget implements RequiresResize,
* <em>Implementation detail:</em> This method does no DOM modifications
* (i.e. is very cheap to call) if there is no data for columns when
* this method is called.
- *
+ *
* @see #hasColumnAndRowData()
*/
@Override
@@ -1295,8 +1297,8 @@ public class Escalator extends Widget implements RequiresResize,
Map<Integer, Double> colWidths = new HashMap<Integer, Double>();
for (int i = 0; i < getColumnConfiguration()
.getColumnCount(); i++) {
- Double width = Double.valueOf(getColumnConfiguration()
- .getColumnWidth(i));
+ Double width = Double.valueOf(
+ getColumnConfiguration().getColumnWidth(i));
Integer col = Integer.valueOf(i);
colWidths.put(col, width);
}
@@ -1308,7 +1310,7 @@ public class Escalator extends Widget implements RequiresResize,
/**
* Actually add rows into the DOM, now that everything can be
* calculated.
- *
+ *
* @param visualIndex
* the DOM index to add rows into
* @param numberOfRows
@@ -1337,15 +1339,18 @@ public class Escalator extends Widget implements RequiresResize,
referenceRow = null;
}
- for (int row = visualIndex; row < visualIndex + numberOfRows; row++) {
+ for (int row = visualIndex; row < visualIndex
+ + numberOfRows; row++) {
final TableRowElement tr = TableRowElement.as(DOM.createTR());
addedRows.add(tr);
tr.addClassName(getStylePrimaryName() + "-row");
- for (int col = 0; col < columnConfiguration.getColumnCount(); col++) {
+ for (int col = 0; col < columnConfiguration
+ .getColumnCount(); col++) {
final double colWidth = columnConfiguration
.getColumnWidthActual(col);
- final TableCellElement cellElem = createCellElement(colWidth);
+ final TableCellElement cellElem = createCellElement(
+ colWidth);
tr.appendChild(cellElem);
// Set stylename and position if new cell is frozen
@@ -1375,7 +1380,7 @@ public class Escalator extends Widget implements RequiresResize,
* {@link EscalatorUpdater#postAttach(Row, Iterable) postAttach} before
* and after inserting the row, respectively. The row should have its
* cells already inserted.
- *
+ *
* @param referenceRow
* the row after which to insert or null if insert as first
* @param tr
@@ -1440,15 +1445,15 @@ public class Escalator extends Widget implements RequiresResize,
* <em>Implementation detail:</em> This method does no DOM modifications
* (i.e. is very cheap to call) if there is no data for columns when
* this method is called.
- *
+ *
* @see #hasColumnAndRowData()
*/
@Override
// overridden because of JavaDoc
public void refreshRows(final int index, final int numberOfRows) {
Range rowRange = Range.withLength(index, numberOfRows);
- Range colRange = Range.withLength(0, getColumnConfiguration()
- .getColumnCount());
+ Range colRange = Range.withLength(0,
+ getColumnConfiguration().getColumnCount());
refreshCells(rowRange, colRange);
}
@@ -1464,8 +1469,8 @@ public class Escalator extends Widget implements RequiresResize,
Range colRange) {
flyweightRow.setup(tr, logicalRowIndex,
columnConfiguration.getCalculatedColumnWidths());
- Iterable<FlyweightCell> cellsToUpdate = flyweightRow.getCells(
- colRange.getStart(), colRange.length());
+ Iterable<FlyweightCell> cellsToUpdate = flyweightRow
+ .getCells(colRange.getStart(), colRange.length());
updater.update(flyweightRow, cellsToUpdate);
/*
@@ -1477,15 +1482,15 @@ public class Escalator extends Widget implements RequiresResize,
/**
* Create and setup an empty cell element.
- *
+ *
* @param width
* the width of the cell, in pixels
- *
+ *
* @return a set-up empty cell element
*/
public TableCellElement createCellElement(final double width) {
- final TableCellElement cellElem = TableCellElement.as(DOM
- .createElement(getCellElementTagName()));
+ final TableCellElement cellElem = TableCellElement
+ .as(DOM.createElement(getCellElementTagName()));
final double height = getDefaultRowHeight();
assert height >= 0 : "defaultRowHeight was negative. There's a setter leak somewhere.";
@@ -1505,7 +1510,7 @@ public class Escalator extends Widget implements RequiresResize,
/**
* Gets the child element that is visually at a certain index
- *
+ *
* @param index
* the index of the element to retrieve
* @return the element at position {@code index}
@@ -1522,8 +1527,8 @@ public class Escalator extends Widget implements RequiresResize,
flyweightRow.setup(row, i,
columnConfiguration.getCalculatedColumnWidths());
- Iterable<FlyweightCell> attachedCells = flyweightRow.getCells(
- offset, numberOfColumns);
+ Iterable<FlyweightCell> attachedCells = flyweightRow
+ .getCells(offset, numberOfColumns);
getEscalatorUpdater().preDetach(flyweightRow, attachedCells);
for (int j = 0; j < numberOfColumns; j++) {
@@ -1565,7 +1570,7 @@ public class Escalator extends Widget implements RequiresResize,
* Precondition: The row must be already attached to the DOM and the
* FlyweightCell instances corresponding to the new columns added to
* {@code flyweightRow}.
- *
+ *
* @param tr
* the row in which to insert the cells
* @param logicalRowIndex
@@ -1576,15 +1581,17 @@ public class Escalator extends Widget implements RequiresResize,
* the number of cells to insert
*/
private void paintInsertCells(final TableRowElement tr,
- int logicalRowIndex, final int offset, final int numberOfCells) {
+ int logicalRowIndex, final int offset,
+ final int numberOfCells) {
- assert root.isOrHasChild(tr) : "The row must be attached to the document";
+ assert root.isOrHasChild(
+ tr) : "The row must be attached to the document";
flyweightRow.setup(tr, logicalRowIndex,
columnConfiguration.getCalculatedColumnWidths());
- Iterable<FlyweightCell> cells = flyweightRow.getUnattachedCells(
- offset, numberOfCells);
+ Iterable<FlyweightCell> cells = flyweightRow
+ .getUnattachedCells(offset, numberOfCells);
for (FlyweightCell cell : cells) {
final double colWidth = columnConfiguration
@@ -1664,9 +1671,9 @@ public class Escalator extends Widget implements RequiresResize,
* <p>
* In practice, this applies for all header and footer rows. For body
* rows, it applies for all rows except spacer rows.
- *
+ *
* @since 7.5.0
- *
+ *
* @param tr
* the row element to check for if it is or has elements that
* can be frozen
@@ -1678,14 +1685,14 @@ public class Escalator extends Widget implements RequiresResize,
/**
* Iterates through all the cells in a column and returns the width of
* the widest element in this RowContainer.
- *
+ *
* @param index
* the index of the column to inspect
* @return the pixel width of the widest element in the indicated column
*/
public double calculateMaxColWidth(int index) {
- TableRowElement row = TableRowElement.as(root
- .getFirstChildElement());
+ TableRowElement row = TableRowElement
+ .as(root.getFirstChildElement());
double maxWidth = 0;
while (row != null) {
final TableCellElement cell = row.getCells().getItem(index);
@@ -1740,7 +1747,8 @@ public class Escalator extends Widget implements RequiresResize,
* Since browsers don't explode with overflowing colspans, escalator
* shouldn't either.
*/
- if (spannedColumns.getEnd() > columnConfiguration.getColumnCount()) {
+ if (spannedColumns.getEnd() > columnConfiguration
+ .getColumnCount()) {
spannedColumns = Range.between(columnIndex,
columnConfiguration.getColumnCount());
}
@@ -1752,8 +1760,9 @@ public class Escalator extends Widget implements RequiresResize,
* Applies the total length of the columns to each row element.
* <p>
* <em>Note:</em> In contrast to {@link #reapplyColumnWidths()}, this
- * method only modifies the width of the {@code <tr>} element, not the
- * cells within.
+ * method only modifies the width of the {@code
+ * <tr>
+ * } element, not the cells within.
*/
protected void reapplyRowWidths() {
double rowWidth = columnConfiguration.calculateRowWidth();
@@ -1776,7 +1785,7 @@ public class Escalator extends Widget implements RequiresResize,
/**
* The primary style name for the container.
- *
+ *
* @param primaryStyleName
* the style name to use as prefix for all row and cell style
* names.
@@ -1796,8 +1805,8 @@ public class Escalator extends Widget implements RequiresResize,
Element cell = TableRowElement.as(row).getCells().getItem(0);
while (cell != null) {
assert TableCellElement.is(cell);
- UIObject.setStylePrimaryName(cell, primaryStyleName
- + "-cell");
+ UIObject.setStylePrimaryName(cell,
+ primaryStyleName + "-cell");
cell = cell.getNextSiblingElement();
}
row = row.getNextSiblingElement();
@@ -1806,7 +1815,7 @@ public class Escalator extends Widget implements RequiresResize,
/**
* Returns the primary style name of the container.
- *
+ *
* @return The primary style name or <code>null</code> if not set.
*/
protected String getStylePrimaryName() {
@@ -1817,8 +1826,8 @@ public class Escalator extends Widget implements RequiresResize,
public void setDefaultRowHeight(double px)
throws IllegalArgumentException {
if (px < 1) {
- throw new IllegalArgumentException("Height must be positive. "
- + px + " was given.");
+ throw new IllegalArgumentException(
+ "Height must be positive. " + px + " was given.");
}
defaultRowHeightShouldBeAutodetected = false;
@@ -1870,7 +1879,7 @@ public class Escalator extends Widget implements RequiresResize,
* <em>Note:</em> This method does not calculate what a row's top
* position should be. It just returns an assigned value, correct or
* not.
- *
+ *
* @param tr
* the table row element to measure
* @return the current top position for {@code tr}
@@ -1963,7 +1972,8 @@ public class Escalator extends Widget implements RequiresResize,
* hierarchy until reaching cell element.
*/
Element cellElementCandidate = element;
- while (cellElementCandidate.getParentElement().getParentElement() != root) {
+ while (cellElementCandidate.getParentElement()
+ .getParentElement() != root) {
cellElementCandidate = cellElementCandidate.getParentElement();
}
final TableCellElement cellElement = TableCellElement
@@ -1990,15 +2000,15 @@ public class Escalator extends Widget implements RequiresResize,
/*
* To get the actual width of the contents, we need to get the cell
* content without any hardcoded height or width.
- *
+ *
* But we don't want to modify the existing column, because that
* might trigger some unnecessary listeners and whatnot. So,
* instead, we make a deep clone of that cell, but without any
* explicit dimensions, and measure that instead.
*/
- TableCellElement cellClone = TableCellElement.as((Element) cell
- .cloneNode(withContent));
+ TableCellElement cellClone = TableCellElement
+ .as((Element) cell.cloneNode(withContent));
cellClone.getStyle().clearHeight();
cellClone.getStyle().clearWidth();
@@ -2021,7 +2031,7 @@ public class Escalator extends Widget implements RequiresResize,
/**
* Gets the minimum width needed to display the cell properly.
- *
+ *
* @param colIndex
* index of column to measure
* @param withContent
@@ -2051,8 +2061,8 @@ public class Escalator extends Widget implements RequiresResize,
private boolean cellIsPartOfSpan(TableCellElement cell) {
boolean cellHasColspan = cell.getColSpan() > 1;
- boolean cellIsHidden = Display.NONE.getCssName().equals(
- cell.getStyle().getDisplay());
+ boolean cellIsHidden = Display.NONE.getCssName()
+ .equals(cell.getStyle().getDisplay());
return cellHasColspan || cellIsHidden;
}
@@ -2069,9 +2079,9 @@ public class Escalator extends Widget implements RequiresResize,
* <p>
* Note that {@link Escalator#getBody() the body} will calculate its
* height, while the others will return a precomputed value.
- *
+ *
* @since 7.5.0
- *
+ *
* @return the height of this table section
*/
protected abstract double getHeightOfSection();
@@ -2082,13 +2092,14 @@ public class Escalator extends Widget implements RequiresResize,
}
- private abstract class AbstractStaticRowContainer extends
- AbstractRowContainer {
+ private abstract class AbstractStaticRowContainer
+ extends AbstractRowContainer {
/** The height of the combined rows in the DOM. Never negative. */
private double heightOfSection = 0;
- public AbstractStaticRowContainer(final TableSectionElement headElement) {
+ public AbstractStaticRowContainer(
+ final TableSectionElement headElement) {
super(headElement);
}
@@ -2098,7 +2109,8 @@ public class Escalator extends Widget implements RequiresResize,
}
@Override
- protected void paintRemoveRows(final int index, final int numberOfRows) {
+ protected void paintRemoveRows(final int index,
+ final int numberOfRows) {
for (int i = index; i < index + numberOfRows; i++) {
final TableRowElement tr = root.getRows().getItem(index);
paintRemoveRow(tr, index);
@@ -2112,8 +2124,8 @@ public class Escalator extends Widget implements RequiresResize,
if (index >= 0 && index < root.getChildCount()) {
return root.getRows().getItem(index);
} else {
- throw new IndexOutOfBoundsException("No such visual index: "
- + index);
+ throw new IndexOutOfBoundsException(
+ "No such visual index: " + index);
}
}
@@ -2132,7 +2144,7 @@ public class Escalator extends Widget implements RequiresResize,
* temporarily shrunk and then re-expanded. This leads to the fact
* that the scroll position is scooted up a bit. This means that we
* need to reset the position here.
- *
+ *
* If Escalator, at some point, gets a JIT evaluation functionality,
* this re-setting is a strong candidate for removal.
*/
@@ -2151,7 +2163,8 @@ public class Escalator extends Widget implements RequiresResize,
return;
}
- Profiler.enter("Escalator.AbstractStaticRowContainer.reapplyDefaultRowHeights");
+ Profiler.enter(
+ "Escalator.AbstractStaticRowContainer.reapplyDefaultRowHeights");
Element tr = root.getRows().getItem(0);
while (tr != null) {
@@ -2166,12 +2179,14 @@ public class Escalator extends Widget implements RequiresResize,
*/
recalculateSectionHeight();
- Profiler.leave("Escalator.AbstractStaticRowContainer.reapplyDefaultRowHeights");
+ Profiler.leave(
+ "Escalator.AbstractStaticRowContainer.reapplyDefaultRowHeights");
}
@Override
protected void recalculateSectionHeight() {
- Profiler.enter("Escalator.AbstractStaticRowContainer.recalculateSectionHeight");
+ Profiler.enter(
+ "Escalator.AbstractStaticRowContainer.recalculateSectionHeight");
double newHeight = calculateTotalRowHeight();
if (newHeight != heightOfSection) {
@@ -2185,15 +2200,16 @@ public class Escalator extends Widget implements RequiresResize,
* body.verifyEscalatorCount. This is because the logical row
* indices are calculated from the scrollbar position.
*/
- verticalScrollbar.setOffsetSize(heightOfEscalator
- - header.getHeightOfSection()
- - footer.getHeightOfSection());
+ verticalScrollbar.setOffsetSize(
+ heightOfEscalator - header.getHeightOfSection()
+ - footer.getHeightOfSection());
body.verifyEscalatorCount();
body.spacerContainer.updateSpacerDecosVisibility();
}
- Profiler.leave("Escalator.AbstractStaticRowContainer.recalculateSectionHeight");
+ Profiler.leave(
+ "Escalator.AbstractStaticRowContainer.recalculateSectionHeight");
}
/**
@@ -2237,7 +2253,8 @@ public class Escalator extends Widget implements RequiresResize,
@Override
protected boolean rowCanBeFrozen(TableRowElement tr) {
- assert root.isOrHasChild(tr) : "Row does not belong to this table section";
+ assert root.isOrHasChild(
+ tr) : "Row does not belong to this table section";
return true;
}
@@ -2258,8 +2275,8 @@ public class Escalator extends Widget implements RequiresResize,
bodyElem.getStyle().setMarginTop(heightOfSection, Unit.PX);
spacerDecoContainer.getStyle().setMarginTop(heightOfSection,
Unit.PX);
- verticalScrollbar.getElement().getStyle()
- .setTop(heightOfSection, Unit.PX);
+ verticalScrollbar.getElement().getStyle().setTop(heightOfSection,
+ Unit.PX);
headerDeco.getStyle().setHeight(heightOfSection, Unit.PX);
}
@@ -2295,8 +2312,8 @@ public class Escalator extends Widget implements RequiresResize,
protected void sectionHeightCalculated() {
double headerHeight = header.getHeightOfSection();
double footerHeight = footer.getHeightOfSection();
- int vscrollHeight = (int) Math.floor(heightOfEscalator
- - headerHeight - footerHeight);
+ int vscrollHeight = (int) Math
+ .floor(heightOfEscalator - headerHeight - footerHeight);
final boolean horizontalScrollbarNeeded = columnConfiguration
.calculateRowWidth() > widthOfEscalator;
@@ -2311,8 +2328,8 @@ public class Escalator extends Widget implements RequiresResize,
}
}
- private class BodyRowContainerImpl extends AbstractRowContainer implements
- BodyRowContainer {
+ private class BodyRowContainerImpl extends AbstractRowContainer
+ implements BodyRowContainer {
/*
* TODO [[optimize]]: check whether a native JsArray might be faster
* than LinkedList
@@ -2321,14 +2338,14 @@ public class Escalator extends Widget implements RequiresResize,
* The order in which row elements are rendered visually in the browser,
* with the help of CSS tricks. Usually has nothing to do with the DOM
* order.
- *
+ *
* @see #sortDomElements()
*/
private final LinkedList<TableRowElement> visualRowOrder = new LinkedList<TableRowElement>();
/**
* The logical index of the topmost row.
- *
+ *
* @deprecated Use the accessors {@link #setTopRowLogicalIndex(int)},
* {@link #updateTopRowLogicalIndex(int)} and
* {@link #getTopRowLogicalIndex()} instead
@@ -2338,13 +2355,14 @@ public class Escalator extends Widget implements RequiresResize,
private void setTopRowLogicalIndex(int topRowLogicalIndex) {
if (LogConfiguration.loggingIsEnabled(Level.INFO)) {
- Logger.getLogger("Escalator.BodyRowContainer").fine(
- "topRowLogicalIndex: " + this.topRowLogicalIndex
+ Logger.getLogger("Escalator.BodyRowContainer")
+ .fine("topRowLogicalIndex: " + this.topRowLogicalIndex
+ " -> " + topRowLogicalIndex);
}
assert topRowLogicalIndex >= 0 : "topRowLogicalIndex became negative (top left cell contents: "
+ visualRowOrder.getFirst().getCells().getItem(0)
- .getInnerText() + ") ";
+ .getInnerText()
+ + ") ";
/*
* if there's a smart way of evaluating and asserting the max index,
* this would be a nice place to put it. I haven't found out an
@@ -2398,7 +2416,8 @@ public class Escalator extends Widget implements RequiresResize,
private boolean sortIfConditionsMet() {
boolean enoughFramesHavePassed = framesPassed >= REQUIRED_FRAMES_PASSED;
- boolean enoughTimeHasPassed = (Duration.currentTimeMillis() - startTime) >= SORT_DELAY_MILLIS;
+ boolean enoughTimeHasPassed = (Duration.currentTimeMillis()
+ - startTime) >= SORT_DELAY_MILLIS;
boolean notTouchActivity = !scroller.touchHandlerBundle.touching;
boolean conditionsMet = enoughFramesHavePassed
&& enoughTimeHasPassed && notTouchActivity;
@@ -2471,8 +2490,8 @@ public class Escalator extends Widget implements RequiresResize,
double rowPx = getRowHeightsSumBetweenPx(scrollTop,
topElementPosition);
- int originalRowsToMove = (int) Math.ceil(rowPx
- / getDefaultRowHeight());
+ int originalRowsToMove = (int) Math
+ .ceil(rowPx / getDefaultRowHeight());
int rowsToMove = Math.min(originalRowsToMove,
visualRowOrder.size());
@@ -2507,8 +2526,8 @@ public class Escalator extends Widget implements RequiresResize,
* We scroll so little that we can just keep adding the rows
* below the current escalator
*/
- logicalRowIndex = getLogicalRowIndex(visualRowOrder
- .getLast()) + 1;
+ logicalRowIndex = getLogicalRowIndex(
+ visualRowOrder.getLast()) + 1;
} else {
/*
* Since we're moving all escalator rows, we need to
@@ -2573,8 +2592,8 @@ public class Escalator extends Widget implements RequiresResize,
+ originalRowsToMove;
final int maxLogicalIndex = getRowCount()
- visualRowOrder.size();
- setTopRowLogicalIndex(Math.min(naiveNewLogicalIndex,
- maxLogicalIndex));
+ setTopRowLogicalIndex(
+ Math.min(naiveNewLogicalIndex, maxLogicalIndex));
rowsWereMoved = true;
}
@@ -2602,7 +2621,8 @@ public class Escalator extends Widget implements RequiresResize,
}
@Override
- protected void paintInsertRows(final int index, final int numberOfRows) {
+ protected void paintInsertRows(final int index,
+ final int numberOfRows) {
if (numberOfRows == 0) {
return;
}
@@ -2613,7 +2633,7 @@ public class Escalator extends Widget implements RequiresResize,
* TODO: this method should probably only add physical rows, and not
* populate them - let everything be populated as appropriate by the
* logic that follows.
- *
+ *
* This also would lead to the fact that paintInsertRows wouldn't
* need to return anything.
*/
@@ -2630,7 +2650,7 @@ public class Escalator extends Widget implements RequiresResize,
* getDefaultRowHeight() < getScrollTop();
final boolean addedRowsBelowCurrentViewport = index
* getDefaultRowHeight() > getScrollTop()
- + getHeightOfSection();
+ + getHeightOfSection();
if (addedRowsAboveCurrentViewport) {
/*
@@ -2651,13 +2671,13 @@ public class Escalator extends Widget implements RequiresResize,
else { // some rows were added inside the current viewport
final int unupdatedLogicalStart = index + addedRows.size();
- final int visualOffset = getLogicalRowIndex(visualRowOrder
- .getFirst());
+ final int visualOffset = getLogicalRowIndex(
+ visualRowOrder.getFirst());
/*
* At this point, we have added new escalator rows, if so
* needed.
- *
+ *
* If more rows were added than the new escalator rows can
* account for, we need to start to spin the escalator to update
* the remaining rows aswell.
@@ -2665,8 +2685,9 @@ public class Escalator extends Widget implements RequiresResize,
final int rowsStillNeeded = numberOfRows - addedRows.size();
if (rowsStillNeeded > 0) {
- final Range unupdatedVisual = convertToVisual(Range
- .withLength(unupdatedLogicalStart, rowsStillNeeded));
+ final Range unupdatedVisual = convertToVisual(
+ Range.withLength(unupdatedLogicalStart,
+ rowsStillNeeded));
final int end = getDomRowCount();
final int start = end - unupdatedVisual.length();
final int visualTargetIndex = unupdatedLogicalStart
@@ -2684,7 +2705,8 @@ public class Escalator extends Widget implements RequiresResize,
// the order of operations is, in fact, wrong.
try {
final ListIterator<TableRowElement> i = visualRowOrder
- .listIterator(visualTargetIndex + (end - start));
+ .listIterator(
+ visualTargetIndex + (end - start));
int logicalRowIndexCursor = unupdatedLogicalStart;
while (i.hasNext()) {
@@ -2697,11 +2719,11 @@ public class Escalator extends Widget implements RequiresResize,
}
} catch (Exception e) {
Logger logger = getLogger();
- logger.warning("Ignored out-of-bounds row element access");
+ logger.warning(
+ "Ignored out-of-bounds row element access");
logger.warning("Escalator state: start=" + start
+ ", end=" + end + ", visualTargetIndex="
- + visualTargetIndex
- + ", visualRowOrder.size()="
+ + visualTargetIndex + ", visualRowOrder.size()="
+ visualRowOrder.size());
logger.warning(e.toString());
}
@@ -2715,7 +2737,7 @@ public class Escalator extends Widget implements RequiresResize,
/**
* Move escalator rows around, and make sure everything gets
* appropriately repositioned and repainted.
- *
+ *
* @param visualSourceRange
* the range of rows to move to a new place
* @param visualTargetIndex
@@ -2743,22 +2765,23 @@ public class Escalator extends Widget implements RequiresResize,
assert visualTargetIndex <= getDomRowCount() : "Visual target "
+ "must not be greater than the number of escalator rows (was "
- + visualTargetIndex + ", escalator rows "
- + getDomRowCount() + ")";
+ + visualTargetIndex + ", escalator rows " + getDomRowCount()
+ + ")";
- assert logicalTargetIndex + visualSourceRange.length() <= getRowCount() : "Logical "
- + "target leads to rows outside of the data range ("
- + Range.withLength(logicalTargetIndex,
- visualSourceRange.length())
- + " goes beyond "
- + Range.withLength(0, getRowCount()) + ")";
+ assert logicalTargetIndex
+ + visualSourceRange.length() <= getRowCount() : "Logical "
+ + "target leads to rows outside of the data range ("
+ + Range.withLength(logicalTargetIndex,
+ visualSourceRange.length())
+ + " goes beyond "
+ + Range.withLength(0, getRowCount()) + ")";
/*
* Since we move a range into another range, the indices might move
* about. Having 10 rows, if we move 0..1 to index 10 (to the end of
* the collection), the target range will end up being 8..9, instead
* of 10..11.
- *
+ *
* This applies only if we move elements forward in the collection,
* not backward.
*/
@@ -2840,7 +2863,7 @@ public class Escalator extends Widget implements RequiresResize,
* position with 27.5px will move the viewport 27.5px down, and place
* the row at 20px.</dd>
* </dl>
- *
+ *
* @param yDelta
* the delta of pixels by which to move the viewport and
* content. A positive value moves everything downwards,
@@ -2882,7 +2905,7 @@ public class Escalator extends Widget implements RequiresResize,
* <p>
* If Escalator already is at (or beyond) max capacity, this method does
* nothing to the DOM.
- *
+ *
* @param index
* the index at which to add new escalator rows.
* <em>Note:</em>It is assumed that the index is both the
@@ -2940,19 +2963,20 @@ public class Escalator extends Widget implements RequiresResize,
}
@Override
- protected void paintRemoveRows(final int index, final int numberOfRows) {
+ protected void paintRemoveRows(final int index,
+ final int numberOfRows) {
if (numberOfRows == 0) {
return;
}
final Range viewportRange = getVisibleRowRange();
- final Range removedRowsRange = Range
- .withLength(index, numberOfRows);
+ final Range removedRowsRange = Range.withLength(index,
+ numberOfRows);
/*
* Removing spacers as the very first step will correct the
* scrollbars and row offsets right away.
- *
+ *
* TODO: actually, it kinda sounds like a Grid feature that a spacer
* would be associated with a particular row. Maybe it would be
* better to have a spacer separate from rows, and simply collapse
@@ -2965,7 +2989,8 @@ public class Escalator extends Widget implements RequiresResize,
.partitionWith(viewportRange);
final Range removedAbove = partitions[0];
final Range removedLogicalInside = partitions[1];
- final Range removedVisualInside = convertToVisual(removedLogicalInside);
+ final Range removedVisualInside = convertToVisual(
+ removedLogicalInside);
/*
* TODO: extract the following if-block to a separate method. I'll
@@ -2976,15 +3001,15 @@ public class Escalator extends Widget implements RequiresResize,
/*
* Adjust scroll position in one of two scenarios:
- *
+ *
* 1) Rows were removed above. Then we just need to adjust the
* scrollbar by the height of the removed rows.
- *
+ *
* 2) There are no logical rows above, and at least the first (if
* not more) visual row is removed. Then we need to snap the scroll
* position to the first visible row (i.e. reset scroll position to
* absolute 0)
- *
+ *
* The logic is optimized in such a way that the
* moveViewportAndContent is called only once, to avoid extra
* reflows, and thus the code might seem a bit obscure.
@@ -3000,7 +3025,8 @@ public class Escalator extends Widget implements RequiresResize,
.getScrollPos() - yDelta < firstLogicalRowHeight;
if (removedVisualInside.isEmpty()
- && (!removalScrollsToShowFirstLogicalRow || !firstVisualRowIsRemoved)) {
+ && (!removalScrollsToShowFirstLogicalRow
+ || !firstVisualRowIsRemoved)) {
/*
* rows were removed from above the viewport, so all we need
* to do is to adjust the scroll position to account for the
@@ -3066,8 +3092,8 @@ public class Escalator extends Widget implements RequiresResize,
*/
final int rowsToUpdateDataOn = numberOfRows
- escalatorRowsToRemove;
- final int start = Math.max(0, escalatorRowCount
- - rowsToUpdateDataOn);
+ final int start = Math.max(0,
+ escalatorRowCount - rowsToUpdateDataOn);
final int end = escalatorRowCount;
for (int i = start; i < end; i++) {
final TableRowElement tr = visualRowOrder.get(i);
@@ -3080,17 +3106,17 @@ public class Escalator extends Widget implements RequiresResize,
/*
* Two things (or a combination thereof) can happen:
- *
+ *
* 1) We're scrolled to the bottom, the last rows are
* removed. SOLUTION: moveAndUpdateEscalatorRows the
* bottommost rows, and place them at the top to be
* refreshed.
- *
+ *
* 2) We're scrolled somewhere in the middle, arbitrary rows
* are removed. SOLUTION: moveAndUpdateEscalatorRows the
* removed rows, and place them at the bottom to be
* refreshed.
- *
+ *
* Since a combination can also happen, we need to handle
* this in a smart way, all while avoiding
* double-refreshing.
@@ -3119,8 +3145,8 @@ public class Escalator extends Widget implements RequiresResize,
*/
double left = horizontalScrollbar.getScrollPos();
- double top = contentBottom - visualRowOrder.size()
- * getDefaultRowHeight();
+ double top = contentBottom
+ - visualRowOrder.size() * getDefaultRowHeight();
setBodyScrollPosition(left, top);
Range allEscalatorRows = Range.withLength(0,
@@ -3134,17 +3160,18 @@ public class Escalator extends Widget implements RequiresResize,
* moveAndUpdateEscalatorRows recalculates the rows, but
* logical top row index bookkeeping is handled in this
* method.
- *
+ *
* TODO: Redesign how to keep it easy to track this.
*/
- updateTopRowLogicalIndex(-removedLogicalInside.length());
+ updateTopRowLogicalIndex(
+ -removedLogicalInside.length());
/*
* Scrolling the body to the correct location will be
* fixed automatically. Because the amount of rows is
* decreased, the viewport is pushed up as the scrollbar
* shrinks. So no need to do anything there.
- *
+ *
* TODO [[optimize]]: This might lead to a double body
* refresh. Needs investigation.
*/
@@ -3166,19 +3193,20 @@ public class Escalator extends Widget implements RequiresResize,
paintRemoveRowsAtBottom(removedLogicalInside,
removedVisualInside);
- updateTopRowLogicalIndex(-removedLogicalInside.length());
+ updateTopRowLogicalIndex(
+ -removedLogicalInside.length());
}
else {
/*
* We're in a combination, where we need to both scroll
* up AND show new rows at the bottom.
- *
+ *
* Example: Scrolled down to show the second to last
* row. Remove two. Viewport scrolls up, revealing the
* row above row. The last element collapses up and into
* view.
- *
+ *
* Reminder: this use case handles only the case when
* there are enough escalator rows to still render a
* full view. I.e. all escalator rows will _always_ be
@@ -3200,7 +3228,7 @@ public class Escalator extends Widget implements RequiresResize,
/*
* STEP 1:
- *
+ *
* reorganize deprecated escalator rows to bottom, but
* don't re-render anything yet
*/
@@ -3219,17 +3247,18 @@ public class Escalator extends Widget implements RequiresResize,
visualRowOrder.addLast(tr);
}
- for (int i = removedVisualInside.getStart(); i < escalatorRowCount; i++) {
+ for (int i = removedVisualInside
+ .getStart(); i < escalatorRowCount; i++) {
final TableRowElement tr = visualRowOrder.get(i);
setRowPosition(tr, 0, (int) newTop);
newTop += getDefaultRowHeight();
- newTop += spacerContainer.getSpacerHeight(i
- + removedLogicalInside.getStart());
+ newTop += spacerContainer.getSpacerHeight(
+ i + removedLogicalInside.getStart());
}
/*
* STEP 2:
- *
+ *
* manually scroll
*/
/*-
@@ -3254,14 +3283,14 @@ public class Escalator extends Widget implements RequiresResize,
* automatically
*/
moveAndUpdateEscalatorRows(
- Range.withOnly(escalatorRowCount - 1),
- 0,
- getLogicalRowIndex(visualRowOrder.getFirst()) - 1);
+ Range.withOnly(escalatorRowCount - 1), 0,
+ getLogicalRowIndex(visualRowOrder.getFirst())
+ - 1);
updateTopRowLogicalIndex(-1);
/*
* STEP 3:
- *
+ *
* update remaining escalator rows
*/
/*-
@@ -3279,8 +3308,8 @@ public class Escalator extends Widget implements RequiresResize,
- (removedVisualInside.length() - rowsScrolled);
final Range visualRefreshRange = Range.between(start,
escalatorRowCount);
- final int logicalTargetIndex = getLogicalRowIndex(visualRowOrder
- .getFirst()) + start;
+ final int logicalTargetIndex = getLogicalRowIndex(
+ visualRowOrder.getFirst()) + start;
// in-place move simply re-renders the rows.
moveAndUpdateEscalatorRows(visualRefreshRange, start,
logicalTargetIndex);
@@ -3312,10 +3341,9 @@ public class Escalator extends Widget implements RequiresResize,
final int escalatorRowCount = visualRowOrder.size();
- final int logicalTargetIndex = getLogicalRowIndex(visualRowOrder
- .getLast())
- - (removedVisualInside.length() - 1)
- + logicalOffset;
+ final int logicalTargetIndex = getLogicalRowIndex(
+ visualRowOrder.getLast())
+ - (removedVisualInside.length() - 1) + logicalOffset;
moveAndUpdateEscalatorRows(removedVisualInside, escalatorRowCount,
logicalTargetIndex);
@@ -3323,15 +3351,15 @@ public class Escalator extends Widget implements RequiresResize,
final ListIterator<TableRowElement> iterator = visualRowOrder
.listIterator(removedVisualInside.getStart());
- double rowTop = getRowTop(removedLogicalInside.getStart()
- + logicalOffset);
+ double rowTop = getRowTop(
+ removedLogicalInside.getStart() + logicalOffset);
for (int i = removedVisualInside.getStart(); i < escalatorRowCount
- removedVisualInside.length(); i++) {
final TableRowElement tr = iterator.next();
setRowPosition(tr, 0, rowTop);
rowTop += getDefaultRowHeight();
- rowTop += spacerContainer.getSpacerHeight(i
- + removedLogicalInside.getStart());
+ rowTop += spacerContainer
+ .getSpacerHeight(i + removedLogicalInside.getStart());
}
}
@@ -3345,8 +3373,8 @@ public class Escalator extends Widget implements RequiresResize,
* |7| |7|
*/
- final int logicalTargetIndex = getLogicalRowIndex(visualRowOrder
- .getFirst()) - removedVisualInside.length();
+ final int logicalTargetIndex = getLogicalRowIndex(
+ visualRowOrder.getFirst()) - removedVisualInside.length();
moveAndUpdateEscalatorRows(removedVisualInside, 0,
logicalTargetIndex);
@@ -3361,14 +3389,15 @@ public class Escalator extends Widget implements RequiresResize,
final TableRowElement tr = iterator.next();
setRowPosition(tr, 0, rowTop);
rowTop += getDefaultRowHeight();
- rowTop += spacerContainer.getSpacerHeight(firstUpdatedIndex
- + i++);
+ rowTop += spacerContainer
+ .getSpacerHeight(firstUpdatedIndex + i++);
}
}
@Override
protected int getLogicalRowIndex(final TableRowElement tr) {
- assert tr.getParentNode() == root : "The given element isn't a row element in the body";
+ assert tr
+ .getParentNode() == root : "The given element isn't a row element in the body";
int internalIndex = visualRowOrder.indexOf(tr);
return getTopRowLogicalIndex() + internalIndex;
}
@@ -3396,7 +3425,7 @@ public class Escalator extends Widget implements RequiresResize,
* <li>convertToVisual([35..1]) &rarr; [0..-1] <em>(empty)</em>
* <li>convertToVisual([0..100]) &rarr; [0..9]
* </ul>
- *
+ *
* @return a logical range converted to a visual range, truncated to the
* current viewport. The first visual row has the index 0.
*/
@@ -3414,11 +3443,11 @@ public class Escalator extends Widget implements RequiresResize,
* spacers.
*/
final int maxEscalatorRows = getMaxEscalatorRowCapacity();
- final int currentTopRowIndex = getLogicalRowIndex(visualRowOrder
- .getFirst());
+ final int currentTopRowIndex = getLogicalRowIndex(
+ visualRowOrder.getFirst());
- final Range[] partitions = logicalRange.partitionWith(Range
- .withLength(currentTopRowIndex, maxEscalatorRows));
+ final Range[] partitions = logicalRange.partitionWith(
+ Range.withLength(currentTopRowIndex, maxEscalatorRows));
final Range insideRange = partitions[1];
return insideRange.offsetBy(-currentTopRowIndex);
}
@@ -3445,10 +3474,11 @@ public class Escalator extends Widget implements RequiresResize,
final Range visualRange = convertToVisual(logicalRowRange);
if (!visualRange.isEmpty()) {
- final int firstLogicalRowIndex = getLogicalRowIndex(visualRowOrder
- .getFirst());
- for (int rowNumber = visualRange.getStart(); rowNumber < visualRange
- .getEnd(); rowNumber++) {
+ final int firstLogicalRowIndex = getLogicalRowIndex(
+ visualRowOrder.getFirst());
+ for (int rowNumber = visualRange
+ .getStart(); rowNumber < visualRange
+ .getEnd(); rowNumber++) {
refreshRow(visualRowOrder.get(rowNumber),
firstLogicalRowIndex + rowNumber, colRange);
}
@@ -3463,16 +3493,16 @@ public class Escalator extends Widget implements RequiresResize,
if (index >= 0 && index < visualRowOrder.size()) {
return visualRowOrder.get(index);
} else {
- throw new IndexOutOfBoundsException("No such visual index: "
- + index);
+ throw new IndexOutOfBoundsException(
+ "No such visual index: " + index);
}
}
@Override
public TableRowElement getRowElement(int index) {
if (index < 0 || index >= getRowCount()) {
- throw new IndexOutOfBoundsException("No such logical index: "
- + index);
+ throw new IndexOutOfBoundsException(
+ "No such logical index: " + index);
}
int visualIndex = index
- getLogicalRowIndex(visualRowOrder.getFirst());
@@ -3508,14 +3538,14 @@ public class Escalator extends Widget implements RequiresResize,
/*
* This method indeed has a smell very similar to paintRemoveRows
* and paintInsertRows.
- *
+ *
* Unfortunately, those the code can't trivially be shared, since
* there are some slight differences in the respective
* responsibilities. The "paint" methods fake the addition and
* removal of rows, and make sure to either push existing data out
* of view, or draw new data into view. Only in some special cases
* will the DOM element count change.
- *
+ *
* This method, however, has the explicit responsibility to verify
* that when "something" happens, we still have the correct amount
* of escalator rows in the DOM, and if not, we make sure to modify
@@ -3547,8 +3577,8 @@ public class Escalator extends Widget implements RequiresResize,
final int index = visualRowOrder.size();
final int nextLastLogicalIndex;
if (!visualRowOrder.isEmpty()) {
- nextLastLogicalIndex = getLogicalRowIndex(visualRowOrder
- .getLast()) + 1;
+ nextLastLogicalIndex = getLogicalRowIndex(
+ visualRowOrder.getLast()) + 1;
} else {
nextLastLogicalIndex = 0;
}
@@ -3565,7 +3595,7 @@ public class Escalator extends Widget implements RequiresResize,
* index, we thank for the added escalator rows, but since
* they're painted in the wrong CSS position, we need to
* move them to their actual locations.
- *
+ *
* Note: this is the second (see body.paintInsertRows)
* occasion where fillAndPopulateEscalatorRowsIfNeeded would
* behave "more correctly" if it only would add escalator
@@ -3578,17 +3608,17 @@ public class Escalator extends Widget implements RequiresResize,
} else {
/*
* TODO [[optimize]]
- *
+ *
* We're scrolled so far down that all rows can't be simply
* appended at the end, since we might start displaying
* escalator rows that don't exist. To avoid the mess that
* is body.paintRemoveRows, this is a dirty hack that dumbs
* the problem down to a more basic and already-solved
* problem:
- *
+ *
* 1) scroll all the way up 2) add the missing escalator
* rows 3) scroll back to the original position.
- *
+ *
* Letting the browser scroll back to our original position
* will automatically solve any possible overflow problems,
* since the browser will not allow us to scroll beyond the
@@ -3621,7 +3651,7 @@ public class Escalator extends Widget implements RequiresResize,
* extra escalator row at the bottom, we'll probably end up with
* blank space at the bottom of the escalator, and one extra row
* above the header.
- *
+ *
* Experimentation idea #1: calculate "scrollbottom" vs content
* bottom and remove one row from top, rest from bottom. This
* FAILED, since setHeight has already happened, thus we never
@@ -3630,13 +3660,13 @@ public class Escalator extends Widget implements RequiresResize,
*/
if (!visualRowOrder.isEmpty()) {
- final double firstRowTop = getRowTop(visualRowOrder
- .getFirst());
+ final double firstRowTop = getRowTop(
+ visualRowOrder.getFirst());
final double firstRowMinTop = tBodyScrollTop
- getDefaultRowHeight();
if (firstRowTop < firstRowMinTop) {
- final int newLogicalIndex = getLogicalRowIndex(visualRowOrder
- .getLast()) + 1;
+ final int newLogicalIndex = getLogicalRowIndex(
+ visualRowOrder.getLast()) + 1;
moveAndUpdateEscalatorRows(Range.withOnly(0),
visualRowOrder.size(), newLogicalIndex);
}
@@ -3656,7 +3686,8 @@ public class Escalator extends Widget implements RequiresResize,
return;
}
- Profiler.enter("Escalator.BodyRowContainer.reapplyDefaultRowHeights");
+ Profiler.enter(
+ "Escalator.BodyRowContainer.reapplyDefaultRowHeights");
/* step 1: resize and reposition rows */
for (int i = 0; i < visualRowOrder.size(); i++) {
@@ -3686,18 +3717,22 @@ public class Escalator extends Widget implements RequiresResize,
verticalScrollbar.getScrollPos());
scroller.onScroll();
- /* step 3: make sure we have the correct amount of escalator rows. */
+ /*
+ * step 3: make sure we have the correct amount of escalator rows.
+ */
verifyEscalatorCount();
- int logicalLogical = (int) (getRowTop(visualRowOrder.getFirst()) / getDefaultRowHeight());
+ int logicalLogical = (int) (getRowTop(visualRowOrder.getFirst())
+ / getDefaultRowHeight());
setTopRowLogicalIndex(logicalLogical);
- Profiler.leave("Escalator.BodyRowContainer.reapplyDefaultRowHeights");
+ Profiler.leave(
+ "Escalator.BodyRowContainer.reapplyDefaultRowHeights");
}
/**
* Sorts the rows in the DOM to correspond to the visual order.
- *
+ *
* @see #visualRowOrder
*/
private void sortDomElements() {
@@ -3712,20 +3747,22 @@ public class Escalator extends Widget implements RequiresResize,
final TableRowElement focusedRow = getRowWithFocus();
if (focusedRow != null) {
- assert focusedRow.getParentElement() == root : "Trying to sort around a row that doesn't exist in body";
+ assert focusedRow
+ .getParentElement() == root : "Trying to sort around a row that doesn't exist in body";
assert visualRowOrder.contains(focusedRow)
- || body.spacerContainer.isSpacer(focusedRow) : "Trying to sort around a row that doesn't exist in visualRowOrder or is not a spacer.";
+ || body.spacerContainer.isSpacer(
+ focusedRow) : "Trying to sort around a row that doesn't exist in visualRowOrder or is not a spacer.";
}
/*
* Two cases handled simultaneously:
- *
+ *
* 1) No focus on rows. We iterate visualRowOrder backwards, and
* take the respective element in the DOM, and place it as the first
* child in the body element. Then we take the next-to-last from
* visualRowOrder, and put that first, pushing the previous row as
* the second child. And so on...
- *
+ *
* 2) Focus on some row within Escalator body. Again, we iterate
* visualRowOrder backwards. This time, we use the focused row as a
* pivot: Instead of placing rows from the bottom of visualRowOrder
@@ -3745,8 +3782,8 @@ public class Escalator extends Widget implements RequiresResize,
* viewport, but its parent row is still not shown
*/
for (int i = -1; i < visualRowOrder.size(); i++) {
- SpacerContainer.SpacerImpl spacer = spacers.remove(Integer
- .valueOf(getTopRowLogicalIndex() + i));
+ SpacerContainer.SpacerImpl spacer = spacers
+ .remove(Integer.valueOf(getTopRowLogicalIndex() + i));
if (spacer != null) {
orderedBodyRows.add(i + 1, spacer.getRootElement());
@@ -3789,7 +3826,7 @@ public class Escalator extends Widget implements RequiresResize,
/**
* Get the {@literal <tbody>} row that contains (or has) focus.
- *
+ *
* @return The {@literal <tbody>} row that contains a focused DOM
* element, or <code>null</code> if focus is outside of a body
* row.
@@ -3855,7 +3892,7 @@ public class Escalator extends Widget implements RequiresResize,
* A correct result requires that both {@link #getDefaultRowHeight()} is
* consistent, and the placement and height of all spacers above the
* given logical index are consistent.
- *
+ *
* @param logicalIndex
* the logical index of the row for which to calculate the
* top position
@@ -3887,10 +3924,11 @@ public class Escalator extends Widget implements RequiresResize,
} else if (noRowsAreInView) {
return Collections.emptyList();
} else {
- int fromIndex = (logicalRow - visibleRowLogicalRange.getStart()) + 1;
+ int fromIndex = (logicalRow - visibleRowLogicalRange.getStart())
+ + 1;
int toIndex = visibleRowLogicalRange.length();
- List<TableRowElement> sublist = visualRowOrder.subList(
- fromIndex, toIndex);
+ List<TableRowElement> sublist = visualRowOrder
+ .subList(fromIndex, toIndex);
return Collections.unmodifiableList(sublist);
}
}
@@ -3948,7 +3986,7 @@ public class Escalator extends Widget implements RequiresResize,
/**
* Returns the actual width in the DOM.
- *
+ *
* @return the width in pixels in the DOM. Returns -1 if the column
* needs measuring, but has not been yet measured
*/
@@ -3957,7 +3995,7 @@ public class Escalator extends Widget implements RequiresResize,
* This might return an untrue value (e.g. during init/onload),
* since we haven't had a proper chance to actually calculate
* widths yet.
- *
+ *
* This is fixed during Escalator.onLoad, by the call to
* "measureAndSetWidthIfNeeded", which fixes "everything".
*/
@@ -3999,7 +4037,7 @@ public class Escalator extends Widget implements RequiresResize,
*/
/**
* A cached array of all the calculated column widths.
- *
+ *
* @see #getCalculatedColumnWidths()
*/
private double[] widthsArray = null;
@@ -4010,7 +4048,7 @@ public class Escalator extends Widget implements RequiresResize,
* <em>Implementation detail:</em> This method does no DOM modifications
* (i.e. is very cheap to call) if there are no rows in the DOM when
* this method is called.
- *
+ *
* @see #hasSomethingInDom()
*/
@Override
@@ -4065,7 +4103,7 @@ public class Escalator extends Widget implements RequiresResize,
* reveal further colspans, modifying the DOM structure once again,
* ending in a cascade of updates. Because we don't know how the
* data is updated.
- *
+ *
* So, instead, we don't do anything. The client code is responsible
* for re-rendering the content (if so desired). Everything Just
* Works (TM) if colspans aren't used.
@@ -4078,16 +4116,17 @@ public class Escalator extends Widget implements RequiresResize,
}
}
- private void removeColumnsAdjustScrollbar(int index, int numberOfColumns) {
+ private void removeColumnsAdjustScrollbar(int index,
+ int numberOfColumns) {
if (horizontalScrollbar.getOffsetSize() >= horizontalScrollbar
.getScrollSize()) {
return;
}
- double leftPosOfFirstColumnToRemove = getCalculatedColumnsWidth(Range
- .between(0, index));
- double widthOfColumnsToRemove = getCalculatedColumnsWidth(Range
- .withLength(index, numberOfColumns));
+ double leftPosOfFirstColumnToRemove = getCalculatedColumnsWidth(
+ Range.between(0, index));
+ double widthOfColumnsToRemove = getCalculatedColumnsWidth(
+ Range.withLength(index, numberOfColumns));
double scrollLeft = horizontalScrollbar.getScrollPos();
@@ -4106,11 +4145,12 @@ public class Escalator extends Widget implements RequiresResize,
/**
* Calculate the width of a row, as the sum of columns' widths.
- *
+ *
* @return the width of a row, in pixels
*/
public double calculateRowWidth() {
- return getCalculatedColumnsWidth(Range.between(0, getColumnCount()));
+ return getCalculatedColumnsWidth(
+ Range.between(0, getColumnCount()));
}
private void assertArgumentsAreValidAndWithinRange(final int index,
@@ -4136,7 +4176,7 @@ public class Escalator extends Widget implements RequiresResize,
* <em>Implementation detail:</em> This method does no DOM modifications
* (i.e. is very cheap to call) if there is no data for rows when this
* method is called.
- *
+ *
* @see #hasColumnAndRowData()
*/
@Override
@@ -4172,11 +4212,11 @@ public class Escalator extends Widget implements RequiresResize,
footer.paintInsertColumns(index, numberOfColumns, frozen);
// this needs to be before the scrollbar adjustment.
- boolean scrollbarWasNeeded = horizontalScrollbar.getOffsetSize() < horizontalScrollbar
- .getScrollSize();
+ boolean scrollbarWasNeeded = horizontalScrollbar
+ .getOffsetSize() < horizontalScrollbar.getScrollSize();
scroller.recalculateScrollbarsForVirtualViewport();
- boolean scrollbarIsNowNeeded = horizontalScrollbar.getOffsetSize() < horizontalScrollbar
- .getScrollSize();
+ boolean scrollbarIsNowNeeded = horizontalScrollbar
+ .getOffsetSize() < horizontalScrollbar.getScrollSize();
if (!scrollbarWasNeeded && scrollbarIsNowNeeded) {
// This might as a side effect move rows around (when scrolled
// all the way down) and require the DOM to be up to date, i.e.
@@ -4204,10 +4244,10 @@ public class Escalator extends Widget implements RequiresResize,
if (columnsWereAddedToTheLeftOfViewport) {
double insertedColumnsWidth = columnConfiguration
- .getCalculatedColumnsWidth(Range.withLength(index,
- numberOfColumns));
- horizontalScrollbar.setScrollPos(scroller.lastScrollLeft
- + insertedColumnsWidth);
+ .getCalculatedColumnsWidth(
+ Range.withLength(index, numberOfColumns));
+ horizontalScrollbar.setScrollPos(
+ scroller.lastScrollLeft + insertedColumnsWidth);
}
/*
@@ -4216,7 +4256,7 @@ public class Escalator extends Widget implements RequiresResize,
* affect surrounding colspans, modifying the DOM structure once
* again, ending in a cascade of updates. Because we don't know how
* the data is updated.
- *
+ *
* So, instead, we don't do anything. The client code is responsible
* for re-rendering the content (if so desired). Everything Just
* Works (TM) if colspans aren't used.
@@ -4332,7 +4372,8 @@ public class Escalator extends Widget implements RequiresResize,
}
@Override
- public double getColumnWidth(int index) throws IllegalArgumentException {
+ public double getColumnWidth(int index)
+ throws IllegalArgumentException {
checkValidColumnIndex(index);
return columns.get(index).getDefinedWidth();
}
@@ -4368,7 +4409,7 @@ public class Escalator extends Widget implements RequiresResize,
/**
* Calculates the width of the columns in a given range.
- *
+ *
* @param columns
* the columns to calculate
* @return the total width of the columns in the given
@@ -4379,11 +4420,11 @@ public class Escalator extends Widget implements RequiresResize,
* This is an assert instead of an exception, since this is an
* internal method.
*/
- assert columns.isSubsetOf(Range.between(0, getColumnCount())) : "Range "
- + "was outside of current column range (i.e.: "
- + Range.between(0, getColumnCount())
- + ", but was given :"
- + columns;
+ assert columns
+ .isSubsetOf(Range.between(0, getColumnCount())) : "Range "
+ + "was outside of current column range (i.e.: "
+ + Range.between(0, getColumnCount())
+ + ", but was given :" + columns;
double sum = 0;
for (int i = columns.getStart(); i < columns.getEnd(); i++) {
@@ -4413,11 +4454,11 @@ public class Escalator extends Widget implements RequiresResize,
}
if (index < 0 || index + numberOfColumns > getColumnCount()) {
- throw new IndexOutOfBoundsException("The given "
- + "column range (" + index + ".."
- + (index + numberOfColumns)
- + ") was outside of the current number of columns ("
- + getColumnCount() + ")");
+ throw new IndexOutOfBoundsException(
+ "The given " + "column range (" + index + ".."
+ + (index + numberOfColumns)
+ + ") was outside of the current number of columns ("
+ + getColumnCount() + ")");
}
header.refreshColumns(index, numberOfColumns);
@@ -4475,14 +4516,15 @@ public class Escalator extends Widget implements RequiresResize,
public void setupDom(double height) {
assert !domHasBeenSetup : "DOM can't be set up twice.";
- assert RootPanel.get().getElement().isOrHasChild(root) : "Root element should've been attached to the DOM by now.";
+ assert RootPanel.get().getElement().isOrHasChild(
+ root) : "Root element should've been attached to the DOM by now.";
domHasBeenSetup = true;
getRootElement().getStyle().setWidth(getInnerWidth(), Unit.PX);
setHeight(height);
- spacerElement.setColSpan(getColumnConfiguration()
- .getColumnCount());
+ spacerElement
+ .setColSpan(getColumnConfiguration().getColumnCount());
setStylePrimaryName(getStylePrimaryName());
}
@@ -4498,8 +4540,8 @@ public class Escalator extends Widget implements RequiresResize,
public void setPosition(double x, double y) {
positions.set(getRootElement(), x, y);
- positions
- .set(getDecoElement(), 0, y - getSpacerDecoTopOffset());
+ positions.set(getDecoElement(), 0,
+ y - getSpacerDecoTopOffset());
}
private double getSpacerDecoTopOffset() {
@@ -4526,8 +4568,9 @@ public class Escalator extends Widget implements RequiresResize,
// amount of the border thickness
if (defaultCellBorderBottomSize < 0) {
defaultCellBorderBottomSize = WidgetUtil
- .getBorderBottomThickness(body.getRowElement(
- getVisibleRowRange().getStart())
+ .getBorderBottomThickness(body
+ .getRowElement(
+ getVisibleRowRange().getStart())
.getFirstChildElement());
}
root.getStyle().setHeight(height + defaultCellBorderBottomSize,
@@ -4543,8 +4586,8 @@ public class Escalator extends Widget implements RequiresResize,
*/
boolean spacerIsGrowing = heightDiff > 0;
if (spacerIsGrowing) {
- verticalScrollbar.setScrollSize(verticalScrollbar
- .getScrollSize() + heightDiff);
+ verticalScrollbar.setScrollSize(
+ verticalScrollbar.getScrollSize() + heightDiff);
}
/*
@@ -4561,7 +4604,7 @@ public class Escalator extends Widget implements RequiresResize,
/*
* We can't use adjustScrollPos here, probably because of a
* bookkeeping-related race condition.
- *
+ *
* This particular situation is easier, however, since we
* know exactly how many pixels we need to move (heightDiff)
* and all elements below the spacer always need to move
@@ -4569,8 +4612,8 @@ public class Escalator extends Widget implements RequiresResize,
*/
for (TableRowElement row : body.visualRowOrder) {
- body.setRowPosition(row, 0, body.getRowTop(row)
- + heightDiff);
+ body.setRowPosition(row, 0,
+ body.getRowTop(row) + heightDiff);
}
double top = getTop();
@@ -4587,7 +4630,7 @@ public class Escalator extends Widget implements RequiresResize,
* If the scroll top is in the middle of the modified
* spacer, we want to scroll the viewport up as usual,
* but we don't want to scroll past the top of it.
- *
+ *
* Math.max ensures this (remember: the result is going
* to be negative).
*/
@@ -4596,8 +4639,8 @@ public class Escalator extends Widget implements RequiresResize,
} else {
moveDiff = heightDiff;
}
- body.setBodyScrollPosition(tBodyScrollLeft, tBodyScrollTop
- + moveDiff);
+ body.setBodyScrollPosition(tBodyScrollLeft,
+ tBodyScrollTop + moveDiff);
verticalScrollbar.setScrollPosByDelta(moveDiff);
} else {
@@ -4605,8 +4648,8 @@ public class Escalator extends Widget implements RequiresResize,
}
if (!spacerIsGrowing) {
- verticalScrollbar.setScrollSize(verticalScrollbar
- .getScrollSize() + heightDiff);
+ verticalScrollbar.setScrollSize(
+ verticalScrollbar.getScrollSize() + heightDiff);
}
updateDecoratorGeometry(height);
@@ -4687,7 +4730,7 @@ public class Escalator extends Widget implements RequiresResize,
/**
* Crop the decorator element so that it doesn't overlap the header
* and footer sections.
- *
+ *
* @param bodyTop
* the top cordinate of the escalator body
* @param bodyBottom
@@ -4701,7 +4744,7 @@ public class Escalator extends Widget implements RequiresResize,
final int bottom = deco.getAbsoluteBottom();
/*
* FIXME
- *
+ *
* Height and its use is a workaround for the issue where
* coordinates of the deco are not calculated yet. This will
* prevent a deco from being displayed when it's added to DOM
@@ -4795,8 +4838,8 @@ public class Escalator extends Widget implements RequiresResize,
|| padding != 0 : "destination/padding check should be done before this method";
if (!rowIndexToSpacer.containsKey(spacerIndex)) {
- throw new IllegalArgumentException("No spacer open at index "
- + spacerIndex);
+ throw new IllegalArgumentException(
+ "No spacer open at index " + spacerIndex);
}
SpacerImpl spacer = rowIndexToSpacer.get(spacerIndex);
@@ -4830,9 +4873,9 @@ public class Escalator extends Widget implements RequiresResize,
@SuppressWarnings("boxing")
public void removeSpacers(Range removedRange) {
- Map<Integer, SpacerImpl> removedSpacers = rowIndexToSpacer
- .subMap(removedRange.getStart(), true,
- removedRange.getEnd(), false);
+ Map<Integer, SpacerImpl> removedSpacers = rowIndexToSpacer.subMap(
+ removedRange.getStart(), true, removedRange.getEnd(),
+ false);
if (removedSpacers.isEmpty()) {
return;
@@ -4866,7 +4909,7 @@ public class Escalator extends Widget implements RequiresResize,
/**
* Calculates the sum of all spacers.
- *
+ *
* @return sum of all spacers, or 0 if no spacers present
*/
public double getSpacerHeightsSum() {
@@ -4875,7 +4918,7 @@ public class Escalator extends Widget implements RequiresResize,
/**
* Calculates the sum of all spacers from one row index onwards.
- *
+ *
* @param logicalRowIndex
* the spacer to include as the first calculated spacer
* @return the sum of all spacers from {@code logicalRowIndex} and
@@ -4884,14 +4927,14 @@ public class Escalator extends Widget implements RequiresResize,
@SuppressWarnings("boxing")
public Collection<SpacerImpl> getSpacersForRowAndAfter(
int logicalRowIndex) {
- return new ArrayList<SpacerImpl>(rowIndexToSpacer.tailMap(
- logicalRowIndex, true).values());
+ return new ArrayList<SpacerImpl>(
+ rowIndexToSpacer.tailMap(logicalRowIndex, true).values());
}
/**
* Get all spacers from one pixel point onwards.
* <p>
- *
+ *
* In this method, the {@link SpacerInclusionStrategy} has the following
* meaning when a spacer lies in the middle of either pixel argument:
* <dl>
@@ -4902,7 +4945,7 @@ public class Escalator extends Widget implements RequiresResize,
* <dt>{@link SpacerInclusionStrategy#NONE NONE}
* <dd>ignore the spacer
* </dl>
- *
+ *
* @param px
* the pixel point after which to return all spacers
* @param strategy
@@ -4937,7 +4980,7 @@ public class Escalator extends Widget implements RequiresResize,
/**
* Gets the spacers currently rendered in the DOM.
- *
+ *
* @return an unmodifiable (but live) collection of the spacers
* currently in the DOM
*/
@@ -4960,7 +5003,7 @@ public class Escalator extends Widget implements RequiresResize,
* <dt>{@link SpacerInclusionStrategy#NONE NONE}
* <dd>ignore that spacer
* </dl>
- *
+ *
* @param rangeTop
* the top pixel point
* @param topInclusion
@@ -5007,7 +5050,8 @@ public class Escalator extends Widget implements RequiresResize,
&& bottom <= rangeBottom;
boolean bottomIsBelowRange = rangeBottom < bottom;
- assert topIsAboveRange ^ topIsBelowRange ^ topIsInRange : "Bad top logic";
+ assert topIsAboveRange ^ topIsBelowRange
+ ^ topIsInRange : "Bad top logic";
assert bottomIsAboveRange ^ bottomIsBelowRange
^ bottomIsInRange : "Bad bottom logic";
@@ -5079,7 +5123,7 @@ public class Escalator extends Widget implements RequiresResize,
/**
* Gets the amount of pixels occupied by spacers from the top until a
* certain spot from the top of the body.
- *
+ *
* @param px
* pixels counted from the top
* @return the pixels occupied by spacers up until {@code px}
@@ -5093,15 +5137,15 @@ public class Escalator extends Widget implements RequiresResize,
/**
* Gets the amount of pixels occupied by spacers until a logical row
* index.
- *
+ *
* @param logicalIndex
* a logical row index
* @return the pixels occupied by spacers up until {@code logicalIndex}
*/
@SuppressWarnings("boxing")
public double getSpacerHeightsSumUntilIndex(int logicalIndex) {
- return getHeights(rowIndexToSpacer.headMap(logicalIndex, false)
- .values());
+ return getHeights(
+ rowIndexToSpacer.headMap(logicalIndex, false).values());
}
private double getHeights(Collection<SpacerImpl> spacers) {
@@ -5114,7 +5158,7 @@ public class Escalator extends Widget implements RequiresResize,
/**
* Gets the height of the spacer for a row index.
- *
+ *
* @param rowIndex
* the index of the row where the spacer should be
* @return the height of the spacer at index {@code rowIndex}, or 0 if
@@ -5148,8 +5192,8 @@ public class Escalator extends Widget implements RequiresResize,
calculateSpacerTop(rowIndex));
TableRowElement spacerRoot = spacer.getRootElement();
- spacerRoot.getStyle().setWidth(
- columnConfiguration.calculateRowWidth(), Unit.PX);
+ spacerRoot.getStyle()
+ .setWidth(columnConfiguration.calculateRowWidth(), Unit.PX);
body.getElement().appendChild(spacerRoot);
spacer.setupDom(height);
// set the deco position, requires that spacer is in the DOM
@@ -5161,8 +5205,8 @@ public class Escalator extends Widget implements RequiresResize,
getElement().appendChild(spacerDecoContainer);
// calculate the spacer deco width, it won't change
spacerDecoWidth = WidgetUtil
- .getRequiredWidthBoundingClientRectDouble(spacer
- .getDecoElement());
+ .getRequiredWidthBoundingClientRectDouble(
+ spacer.getDecoElement());
}
initSpacerContent(spacer);
@@ -5211,11 +5255,15 @@ public class Escalator extends Widget implements RequiresResize,
}
private void destroySpacerContent(SpacerImpl spacer) {
- assert getElement().isOrHasChild(spacer.getRootElement()) : "Spacer's root element somehow got detached from Escalator before detaching";
- assert getElement().isOrHasChild(spacer.getElement()) : "Spacer element somehow got detached from Escalator before detaching";
+ assert getElement().isOrHasChild(spacer
+ .getRootElement()) : "Spacer's root element somehow got detached from Escalator before detaching";
+ assert getElement().isOrHasChild(spacer
+ .getElement()) : "Spacer element somehow got detached from Escalator before detaching";
spacerUpdater.destroy(spacer);
- assert getElement().isOrHasChild(spacer.getRootElement()) : "Spacer's root element somehow got detached from Escalator before detaching";
- assert getElement().isOrHasChild(spacer.getElement()) : "Spacer element somehow got detached from Escalator before detaching";
+ assert getElement().isOrHasChild(spacer
+ .getRootElement()) : "Spacer's root element somehow got detached from Escalator before detaching";
+ assert getElement().isOrHasChild(spacer
+ .getElement()) : "Spacer element somehow got detached from Escalator before detaching";
}
private void initSpacerContent(Iterable<SpacerImpl> spacers) {
@@ -5225,11 +5273,15 @@ public class Escalator extends Widget implements RequiresResize,
}
private void initSpacerContent(SpacerImpl spacer) {
- assert getElement().isOrHasChild(spacer.getRootElement()) : "Spacer's root element somehow got detached from Escalator before attaching";
- assert getElement().isOrHasChild(spacer.getElement()) : "Spacer element somehow got detached from Escalator before attaching";
+ assert getElement().isOrHasChild(spacer
+ .getRootElement()) : "Spacer's root element somehow got detached from Escalator before attaching";
+ assert getElement().isOrHasChild(spacer
+ .getElement()) : "Spacer element somehow got detached from Escalator before attaching";
spacerUpdater.init(spacer);
- assert getElement().isOrHasChild(spacer.getRootElement()) : "Spacer's root element somehow got detached from Escalator during attaching";
- assert getElement().isOrHasChild(spacer.getElement()) : "Spacer element somehow got detached from Escalator during attaching";
+ assert getElement().isOrHasChild(spacer
+ .getRootElement()) : "Spacer's root element somehow got detached from Escalator during attaching";
+ assert getElement().isOrHasChild(spacer
+ .getElement()) : "Spacer element somehow got detached from Escalator during attaching";
spacer.updateVisibility();
}
@@ -5259,8 +5311,8 @@ public class Escalator extends Widget implements RequiresResize,
@SuppressWarnings("boxing")
private void shiftSpacerPositionsAfterRow(int changedRowIndex,
double diffPx) {
- for (SpacerImpl spacer : rowIndexToSpacer.tailMap(changedRowIndex,
- false).values()) {
+ for (SpacerImpl spacer : rowIndexToSpacer
+ .tailMap(changedRowIndex, false).values()) {
spacer.setPositionDiff(0, diffPx);
}
}
@@ -5273,7 +5325,7 @@ public class Escalator extends Widget implements RequiresResize,
* <p>
* <em>Note:</em> This method does not check for the validity of any
* arguments.
- *
+ *
* @param index
* the index of first row to move
* @param numberOfRows
@@ -5282,7 +5334,8 @@ public class Escalator extends Widget implements RequiresResize,
*/
public void shiftSpacersByRows(int index, int numberOfRows) {
final double pxDiff = numberOfRows * body.getDefaultRowHeight();
- for (SpacerContainer.SpacerImpl spacer : getSpacersForRowAndAfter(index)) {
+ for (SpacerContainer.SpacerImpl spacer : getSpacersForRowAndAfter(
+ index)) {
spacer.setPositionDiff(0, pxDiff);
spacer.setRowIndex(spacer.getRow() + numberOfRows);
}
@@ -5290,9 +5343,10 @@ public class Escalator extends Widget implements RequiresResize,
private void updateSpacerDecosVisibility() {
final Range visibleRowRange = getVisibleRowRange();
- Collection<SpacerImpl> visibleSpacers = rowIndexToSpacer.subMap(
- visibleRowRange.getStart() - 1,
- visibleRowRange.getEnd() + 1).values();
+ Collection<SpacerImpl> visibleSpacers = rowIndexToSpacer
+ .subMap(visibleRowRange.getStart() - 1,
+ visibleRowRange.getEnd() + 1)
+ .values();
if (!visibleSpacers.isEmpty()) {
final double top = tableWrapper.getAbsoluteTop()
+ header.getHeightOfSection();
@@ -5346,7 +5400,7 @@ public class Escalator extends Widget implements RequiresResize,
/**
* Utility class for parsing and storing SubPart request string attributes
* for Grid and Escalator.
- *
+ *
* @since 7.5.0
*/
public static class SubPartArguments {
@@ -5386,8 +5440,8 @@ public class Escalator extends Widget implements RequiresResize,
int[] indices = new int[splitArgs.length - 1];
for (int i = 0; i < indices.length; ++i) {
String tmp = splitArgs[i + 1];
- indices[i] = Integer.parseInt(tmp.substring(0,
- tmp.indexOf("]", 1)));
+ indices[i] = Integer
+ .parseInt(tmp.substring(0, tmp.indexOf("]", 1)));
}
return new SubPartArguments(type, indices);
}
@@ -5421,19 +5475,19 @@ public class Escalator extends Widget implements RequiresResize,
private FlyweightRow flyweightRow = new FlyweightRow();
/** The {@code <thead/>} tag. */
- private final TableSectionElement headElem = TableSectionElement.as(DOM
- .createTHead());
+ private final TableSectionElement headElem = TableSectionElement
+ .as(DOM.createTHead());
/** The {@code <tbody/>} tag. */
- private final TableSectionElement bodyElem = TableSectionElement.as(DOM
- .createTBody());
+ private final TableSectionElement bodyElem = TableSectionElement
+ .as(DOM.createTBody());
/** The {@code <tfoot/>} tag. */
- private final TableSectionElement footElem = TableSectionElement.as(DOM
- .createTFoot());
+ private final TableSectionElement footElem = TableSectionElement
+ .as(DOM.createTFoot());
/**
* TODO: investigate whether this field is now unnecessary, as
* {@link ScrollbarBundle} now caches its values.
- *
+ *
* @deprecated maybe...
*/
@Deprecated
@@ -5442,7 +5496,7 @@ public class Escalator extends Widget implements RequiresResize,
/**
* TODO: investigate whether this field is now unnecessary, as
* {@link ScrollbarBundle} now caches its values.
- *
+ *
* @deprecated maybe...
*/
@Deprecated
@@ -5452,7 +5506,8 @@ public class Escalator extends Widget implements RequiresResize,
private final HorizontalScrollbarBundle horizontalScrollbar = new HorizontalScrollbarBundle();
private final HeaderRowContainer header = new HeaderRowContainer(headElem);
- private final BodyRowContainerImpl body = new BodyRowContainerImpl(bodyElem);
+ private final BodyRowContainerImpl body = new BodyRowContainerImpl(
+ bodyElem);
private final FooterRowContainer footer = new FooterRowContainer(footElem);
/**
@@ -5465,12 +5520,12 @@ public class Escalator extends Widget implements RequiresResize,
private final ColumnConfigurationImpl columnConfiguration = new ColumnConfigurationImpl();
private final DivElement tableWrapper;
- private final DivElement horizontalScrollbarDeco = DivElement.as(DOM
- .createDiv());
+ private final DivElement horizontalScrollbarDeco = DivElement
+ .as(DOM.createDiv());
private final DivElement headerDeco = DivElement.as(DOM.createDiv());
private final DivElement footerDeco = DivElement.as(DOM.createDiv());
- private final DivElement spacerDecoContainer = DivElement.as(DOM
- .createDiv());
+ private final DivElement spacerDecoContainer = DivElement
+ .as(DOM.createDiv());
private PositionFunction position;
@@ -5504,9 +5559,8 @@ public class Escalator extends Widget implements RequiresResize,
public Escalator() {
detectAndApplyPositionFunction();
- getLogger().info(
- "Using " + position.getClass().getSimpleName()
- + " for position");
+ getLogger().info("Using " + position.getClass().getSimpleName()
+ + " for position");
final Element root = DOM.createDiv();
setElement(root);
@@ -5587,8 +5641,8 @@ public class Escalator extends Widget implements RequiresResize,
* http://edskes.net/ie/ie8overflowandexpandingboxbugs.htm
*/
Style vScrollStyle = verticalScrollbar.getElement().getStyle();
- vScrollStyle.setRight(
- verticalScrollbar.getScrollbarThickness() - 1, Unit.PX);
+ vScrollStyle.setRight(verticalScrollbar.getScrollbarThickness() - 1,
+ Unit.PX);
}
root.appendChild(horizontalScrollbar.getElement());
@@ -5625,7 +5679,7 @@ public class Escalator extends Widget implements RequiresResize,
/*
* Because of all the IE hacks we've done above, we now have scrollbars
* hiding underneath a lot of DOM elements.
- *
+ *
* This leads to problems with OSX (and many touch-only devices) when
* scrollbars are only shown when scrolling, as the scrollbar elements
* are hidden underneath everything. We trust that the scrollbars behave
@@ -5660,7 +5714,7 @@ public class Escalator extends Widget implements RequiresResize,
* after it is first detached and then reattached to the DOM.
* This only applies to a bare Escalator; inside a Grid
* everything works fine either way.
- *
+ *
* The three autodetectRowHeightLater calls above seem obvious
* suspects at first. However, they don't seem to have anything
* to do with the issue, as they are no-ops in the
@@ -5672,13 +5726,13 @@ public class Escalator extends Widget implements RequiresResize,
/*
* Note: There's no need to explicitly insert rows into the body.
- *
+ *
* recalculateElementSizes will recalculate the height of the body. This
* has the side-effect that as the body's size grows bigger (i.e. from 0
* to its actual height), more escalator rows are populated. Those
* escalator rows are then immediately rendered. This, in effect, is the
* same thing as inserting those rows.
- *
+ *
* In fact, having an extra paintInsertRows here would lead to duplicate
* rows.
*/
@@ -5774,18 +5828,19 @@ public class Escalator extends Widget implements RequiresResize,
/**
* Check whether there are both columns and any row data (for either
* headers, body or footer).
- *
+ *
* @return <code>true</code> iff header, body or footer has rows && there
* are columns
*/
private boolean hasColumnAndRowData() {
- return (header.getRowCount() > 0 || body.getRowCount() > 0 || footer
- .getRowCount() > 0) && columnConfiguration.getColumnCount() > 0;
+ return (header.getRowCount() > 0 || body.getRowCount() > 0
+ || footer.getRowCount() > 0)
+ && columnConfiguration.getColumnCount() > 0;
}
/**
* Check whether there are any cells in the DOM.
- *
+ *
* @return <code>true</code> iff header, body or footer has any child
* elements
*/
@@ -5796,7 +5851,7 @@ public class Escalator extends Widget implements RequiresResize,
/**
* Returns the row container for the header in this Escalator.
- *
+ *
* @return the header. Never <code>null</code>
*/
public RowContainer getHeader() {
@@ -5805,7 +5860,7 @@ public class Escalator extends Widget implements RequiresResize,
/**
* Returns the row container for the body in this Escalator.
- *
+ *
* @return the body. Never <code>null</code>
*/
public BodyRowContainer getBody() {
@@ -5814,7 +5869,7 @@ public class Escalator extends Widget implements RequiresResize,
/**
* Returns the row container for the footer in this Escalator.
- *
+ *
* @return the footer. Never <code>null</code>
*/
public RowContainer getFooter() {
@@ -5823,7 +5878,7 @@ public class Escalator extends Widget implements RequiresResize,
/**
* Returns the configuration object for the columns in this Escalator.
- *
+ *
* @return the configuration object for the columns in this Escalator. Never
* <code>null</code>
*/
@@ -5847,7 +5902,7 @@ public class Escalator extends Widget implements RequiresResize,
* <p>
* If Escalator is currently not in {@link HeightMode#CSS}, the given value
* is remembered, and applied once the mode is applied.
- *
+ *
* @see #setHeightMode(HeightMode)
*/
@Override
@@ -5902,7 +5957,7 @@ public class Escalator extends Widget implements RequiresResize,
/**
* Returns the vertical scroll offset. Note that this is not necessarily the
* same as the {@code scrollTop} attribute in the DOM.
- *
+ *
* @return the logical vertical scroll offset
*/
public double getScrollTop() {
@@ -5912,7 +5967,7 @@ public class Escalator extends Widget implements RequiresResize,
/**
* Sets the vertical scroll offset. Note that this will not necessarily
* become the same as the {@code scrollTop} attribute in the DOM.
- *
+ *
* @param scrollTop
* the number of pixels to scroll vertically
*/
@@ -5923,7 +5978,7 @@ public class Escalator extends Widget implements RequiresResize,
/**
* Returns the logical horizontal scroll offset. Note that this is not
* necessarily the same as the {@code scrollLeft} attribute in the DOM.
- *
+ *
* @return the logical horizontal scroll offset
*/
public double getScrollLeft() {
@@ -5933,7 +5988,7 @@ public class Escalator extends Widget implements RequiresResize,
/**
* Sets the logical horizontal scroll offset. Note that will not necessarily
* become the same as the {@code scrollLeft} attribute in the DOM.
- *
+ *
* @param scrollLeft
* the number of pixels to scroll horizontally
*/
@@ -5944,7 +5999,7 @@ public class Escalator extends Widget implements RequiresResize,
/**
* Returns the scroll width for the escalator. Note that this is not
* necessary the same as {@code Element.scrollWidth} in the DOM.
- *
+ *
* @since 7.5.0
* @return the scroll width in pixels
*/
@@ -5955,7 +6010,7 @@ public class Escalator extends Widget implements RequiresResize,
/**
* Returns the scroll height for the escalator. Note that this is not
* necessary the same as {@code Element.scrollHeight} in the DOM.
- *
+ *
* @since 7.5.0
* @return the scroll height in pixels
*/
@@ -5967,7 +6022,7 @@ public class Escalator extends Widget implements RequiresResize,
* Scrolls the body horizontally so that the column at the given index is
* visible and there is at least {@code padding} pixels in the direction of
* the given scroll destination.
- *
+ *
* @param columnIndex
* the index of the column to scroll to
* @param destination
@@ -5990,8 +6045,8 @@ public class Escalator extends Widget implements RequiresResize,
verifyValidColumnIndex(columnIndex);
if (columnIndex < columnConfiguration.frozenColumns) {
- throw new IllegalArgumentException("The given column index "
- + columnIndex + " is frozen.");
+ throw new IllegalArgumentException(
+ "The given column index " + columnIndex + " is frozen.");
}
scroller.scrollToColumn(columnIndex, destination, padding);
@@ -6010,7 +6065,7 @@ public class Escalator extends Widget implements RequiresResize,
* Scrolls the body vertically so that the row at the given index is visible
* and there is at least {@literal padding} pixels to the given scroll
* destination.
- *
+ *
* @param rowIndex
* the index of the logical row to scroll to
* @param destination
@@ -6041,8 +6096,8 @@ public class Escalator extends Widget implements RequiresResize,
private void verifyValidRowIndex(final int rowIndex) {
if (rowIndex < 0 || rowIndex >= body.getRowCount()) {
- throw new IndexOutOfBoundsException("The given row index "
- + rowIndex + " does not exist.");
+ throw new IndexOutOfBoundsException(
+ "The given row index " + rowIndex + " does not exist.");
}
}
@@ -6050,7 +6105,7 @@ public class Escalator extends Widget implements RequiresResize,
* Scrolls the body vertically so that the spacer at the given row index is
* visible and there is at least {@literal padding} pixesl to the given
* scroll destination.
- *
+ *
* @since 7.5.0
* @param spacerIndex
* the row index of the spacer to scroll to
@@ -6078,7 +6133,7 @@ public class Escalator extends Widget implements RequiresResize,
* <p>
* If a spacer is not open at that index, this method behaves like
* {@link #scrollToRow(int, ScrollDestination, int)}
- *
+ *
* @since 7.5.0
* @param rowIndex
* the index of the logical row to scroll to. -1 takes the
@@ -6132,7 +6187,8 @@ public class Escalator extends Widget implements RequiresResize,
final Range targetRange;
if (spacer != null) {
final int spacerTop = (int) Math.floor(spacer.getTop());
- final int spacerHeight = (int) Math.ceil(spacer.getHeight());
+ final int spacerHeight = (int) Math
+ .ceil(spacer.getHeight());
Range spacerRange = Range.withLength(spacerTop,
spacerHeight);
@@ -6201,7 +6257,7 @@ public class Escalator extends Widget implements RequiresResize,
/**
* Snap deltas of x and y to the major four axes (up, down, left, right)
* with a threshold of a number of degrees from those axes.
- *
+ *
* @param deltaX
* the delta in the x axis
* @param deltaY
@@ -6210,8 +6266,8 @@ public class Escalator extends Widget implements RequiresResize,
* the threshold in ratio (0..1) between x and y for when to snap
* @return a two-element array: <code>[snappedX, snappedY]</code>
*/
- private static double[] snapDeltas(final double deltaX,
- final double deltaY, final double thresholdRatio) {
+ private static double[] snapDeltas(final double deltaX, final double deltaY,
+ final double thresholdRatio) {
final double[] array = new double[2];
if (deltaX != 0 && deltaY != 0) {
@@ -6234,7 +6290,7 @@ public class Escalator extends Widget implements RequiresResize,
* Adds an event handler that gets notified when the range of visible rows
* changes e.g. because of scrolling, row resizing or spacers
* appearing/disappearing.
- *
+ *
* @param rowVisibilityChangeHandler
* the event handler
* @return a handler registration for the added handler
@@ -6247,10 +6303,10 @@ public class Escalator extends Widget implements RequiresResize,
private void fireRowVisibilityChangeEvent() {
if (!body.visualRowOrder.isEmpty()) {
- int visibleRangeStart = body.getLogicalRowIndex(body.visualRowOrder
- .getFirst());
- int visibleRangeEnd = body.getLogicalRowIndex(body.visualRowOrder
- .getLast()) + 1;
+ int visibleRangeStart = body
+ .getLogicalRowIndex(body.visualRowOrder.getFirst());
+ int visibleRangeEnd = body
+ .getLogicalRowIndex(body.visualRowOrder.getLast()) + 1;
int visibleRowCount = visibleRangeEnd - visibleRangeStart;
fireEvent(new RowVisibilityChangeEvent(visibleRangeStart,
@@ -6262,7 +6318,7 @@ public class Escalator extends Widget implements RequiresResize,
/**
* Gets the logical index range of currently visible rows.
- *
+ *
* @return logical index range of visible rows
*/
public Range getVisibleRowRange() {
@@ -6277,7 +6333,7 @@ public class Escalator extends Widget implements RequiresResize,
/**
* Returns the widget from a cell node or <code>null</code> if there is no
* widget in the cell
- *
+ *
* @param cellNode
* The cell node
*/
@@ -6309,10 +6365,10 @@ public class Escalator extends Widget implements RequiresResize,
UIObject.setStylePrimaryName(tableWrapper, style + "-tablewrapper");
UIObject.setStylePrimaryName(headerDeco, style + "-header-deco");
UIObject.setStylePrimaryName(footerDeco, style + "-footer-deco");
- UIObject.setStylePrimaryName(horizontalScrollbarDeco, style
- + "-horizontal-scrollbar-deco");
- UIObject.setStylePrimaryName(spacerDecoContainer, style
- + "-spacer-deco-container");
+ UIObject.setStylePrimaryName(horizontalScrollbarDeco,
+ style + "-horizontal-scrollbar-deco");
+ UIObject.setStylePrimaryName(spacerDecoContainer,
+ style + "-spacer-deco-container");
header.setStylePrimaryName(style);
body.setStylePrimaryName(style);
@@ -6325,13 +6381,12 @@ public class Escalator extends Widget implements RequiresResize,
* <p>
* If Escalator is currently not in {@link HeightMode#ROW}, the given value
* is remembered, and applied once the mode is applied.
- *
+ *
* @param rows
* the number of rows that should be visible in Escalator's body
* @throws IllegalArgumentException
- * if {@code rows} is &leq; 0,
- * {@link Double#isInifinite(double) infinite} or
- * {@link Double#isNaN(double) NaN}.
+ * if {@code rows} is &leq; 0, {@link Double#isInifinite(double)
+ * infinite} or {@link Double#isNaN(double) NaN}.
* @see #setHeightMode(HeightMode)
*/
public void setHeightByRows(double rows) throws IllegalArgumentException {
@@ -6354,7 +6409,7 @@ public class Escalator extends Widget implements RequiresResize,
* {@link #getHeightMode()} is {@link HeightMode#ROW}.
* <p>
* By default, it is 10.
- *
+ *
* @return the amount of rows that are being shown in Escalator's body
* @see #setHeightByRows(double)
*/
@@ -6367,15 +6422,16 @@ public class Escalator extends Widget implements RequiresResize,
* define its height that way.
*/
private void applyHeightByRows() {
- if (heightMode != HeightMode.ROW && heightMode != HeightMode.UNDEFINED) {
+ if (heightMode != HeightMode.ROW
+ && heightMode != HeightMode.UNDEFINED) {
return;
}
double headerHeight = header.getHeightOfSection();
double footerHeight = footer.getHeightOfSection();
double bodyHeight = body.getDefaultRowHeight() * heightByRows;
- double scrollbar = horizontalScrollbar.showsScrollHandle() ? horizontalScrollbar
- .getScrollbarThickness() : 0;
+ double scrollbar = horizontalScrollbar.showsScrollHandle()
+ ? horizontalScrollbar.getScrollbarThickness() : 0;
double spacerHeight = 0; // ignored if HeightMode.ROW
if (heightMode == HeightMode.UNDEFINED) {
spacerHeight = body.spacerContainer.getSpacerHeightsSum();
@@ -6398,7 +6454,7 @@ public class Escalator extends Widget implements RequiresResize,
* inserted or removed, the widget will resize itself to still display the
* required amount of rows in its body. It also takes the horizontal
* scrollbar into account.
- *
+ *
* @param heightMode
* the mode in to which Escalator should be set
*/
@@ -6408,7 +6464,7 @@ public class Escalator extends Widget implements RequiresResize,
* widget dimensions (height/width) on each state change event. The
* original design was to have setHeight an setHeightByRow be equals,
* and whichever was called the latest was considered in effect.
- *
+ *
* But, because of Vaadin always calling setHeight on the widget, this
* approach doesn't work.
*/
@@ -6437,7 +6493,7 @@ public class Escalator extends Widget implements RequiresResize,
* Returns the current {@link HeightMode} the Escalator is in.
* <p>
* Defaults to {@link HeightMode#CSS}.
- *
+ *
* @return the current HeightMode
*/
public HeightMode getHeightMode() {
@@ -6446,7 +6502,7 @@ public class Escalator extends Widget implements RequiresResize,
/**
* Returns the {@link RowContainer} which contains the element.
- *
+ *
* @param element
* the element to check for
* @return the container the element is in or <code>null</code> if element
@@ -6471,7 +6527,7 @@ public class Escalator extends Widget implements RequiresResize,
* <p>
* If a direction is locked, the escalator will refuse to scroll in that
* direction.
- *
+ *
* @param direction
* the orientation of the scroll to set the lock status
* @param locked
@@ -6487,14 +6543,14 @@ public class Escalator extends Widget implements RequiresResize,
verticalScrollbar.setLocked(locked);
break;
default:
- throw new UnsupportedOperationException("Unexpected value: "
- + direction);
+ throw new UnsupportedOperationException(
+ "Unexpected value: " + direction);
}
}
/**
* Checks whether or not an direction is locked for scrolling.
- *
+ *
* @param direction
* the direction of the scroll of which to check the lock status
* @return <code>true</code> iff the direction is locked
@@ -6506,14 +6562,14 @@ public class Escalator extends Widget implements RequiresResize,
case VERTICAL:
return verticalScrollbar.isLocked();
default:
- throw new UnsupportedOperationException("Unexpected value: "
- + direction);
+ throw new UnsupportedOperationException(
+ "Unexpected value: " + direction);
}
}
/**
* Adds a scroll handler to this escalator
- *
+ *
* @param handler
* the scroll handler to add
* @return a handler registration for the registered scroll handler
@@ -6539,7 +6595,7 @@ public class Escalator extends Widget implements RequiresResize,
/**
* Gets the maximum number of body rows that can be visible on the screen at
* once.
- *
+ *
* @return the maximum capacity
*/
public int getMaxVisibleRowCount() {
@@ -6549,7 +6605,7 @@ public class Escalator extends Widget implements RequiresResize,
/**
* Gets the escalator's inner width. This is the entire width in pixels,
* without the vertical scrollbar.
- *
+ *
* @return escalator's inner width
*/
public double getInnerWidth() {
@@ -6581,7 +6637,8 @@ public class Escalator extends Widget implements RequiresResize,
@Override
@SuppressWarnings("deprecation")
- public com.google.gwt.user.client.Element getSubPartElement(String subPart) {
+ public com.google.gwt.user.client.Element getSubPartElement(
+ String subPart) {
SubPartArguments args = SubPartArguments.create(subPart);
Element tableStructureElement = getSubPartElementTableStructure(args);
@@ -6659,7 +6716,8 @@ public class Escalator extends Widget implements RequiresResize,
return targetElement;
}
- private static Element getCellFromRow(TableRowElement rowElement, int index) {
+ private static Element getCellFromRow(TableRowElement rowElement,
+ int index) {
int childCount = rowElement.getCells().getLength();
if (index < 0 || index >= childCount) {
return null;
@@ -6692,7 +6750,8 @@ public class Escalator extends Widget implements RequiresResize,
@Override
@SuppressWarnings("deprecation")
- public String getSubPartName(com.google.gwt.user.client.Element subElement) {
+ public String getSubPartName(
+ com.google.gwt.user.client.Element subElement) {
/*
* The spacer check needs to be before table structure check, because
@@ -6721,9 +6780,9 @@ public class Escalator extends Widget implements RequiresResize,
for (int i = 0; i < containers.size(); ++i) {
RowContainer container = containers.get(i);
- boolean containerRow = (subElement.getTagName().equalsIgnoreCase(
- "tr") && subElement.getParentElement() == container
- .getElement());
+ boolean containerRow = (subElement.getTagName()
+ .equalsIgnoreCase("tr")
+ && subElement.getParentElement() == container.getElement());
if (containerRow) {
/*
* Wanted SubPart is row that is a child of containers root to
@@ -6753,7 +6812,7 @@ public class Escalator extends Widget implements RequiresResize,
/**
* This is an internal method for calculating minimum width for Column
* resize.
- *
+ *
* @return minimum width for column
*/
double getMinCellWidth(int colIndex) {
diff --git a/client/src/main/java/com/vaadin/client/widgets/Grid.java b/client/src/main/java/com/vaadin/client/widgets/Grid.java
index 2b117dc8e4..76c261196e 100644
--- a/client/src/main/java/com/vaadin/client/widgets/Grid.java
+++ b/client/src/main/java/com/vaadin/client/widgets/Grid.java
@@ -187,7 +187,7 @@ import com.vaadin.shared.util.SharedUtil;
/**
* A data grid view that supports columns and lazy loading of data rows from a
* data source.
- *
+ *
* <h1>Columns</h1>
* <p>
* Each column in Grid is represented by a {@link Column}. Each
@@ -207,7 +207,7 @@ import com.vaadin.shared.util.SharedUtil;
* <em>See:</em> {@link #addColumn(Column)}, {@link #addColumn(Column, int)} and
* {@link #addColumns(Column...)}. <em>Also</em>
* {@link Column#setRenderer(Renderer)}.
- *
+ *
* <h1>Data Sources</h1>
* <p>
* Grid gets its data from a {@link DataSource}, providing row objects to Grid
@@ -216,16 +216,16 @@ import com.vaadin.shared.util.SharedUtil;
* ListDataSource}) or even a remote one, retrieving data from e.g. a REST API
* (see {@link com.vaadin.client.data.AbstractRemoteDataSource
* AbstractRemoteDataSource}).
- *
- *
+ *
+ *
* @param <T>
* The row type of the grid. The row type is the POJO type from where
* the data is retrieved into the column cells.
* @since 7.4
* @author Vaadin Ltd
*/
-public class Grid<T> extends ResizeComposite implements
- HasSelectionHandlers<T>, SubPartAware, DeferredWorker, Focusable,
+public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
+ SubPartAware, DeferredWorker, Focusable,
com.google.gwt.user.client.ui.Focusable, HasWidgets, HasEnabled {
private static final String STYLE_NAME = "v-grid";
@@ -234,9 +234,9 @@ public class Grid<T> extends ResizeComposite implements
/**
* Abstract base class for Grid header and footer sections.
- *
+ *
* @since 7.5.0
- *
+ *
* @param <ROWTYPE>
* the type of the rows in the section
*/
@@ -244,7 +244,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* A header or footer cell. Has a simple textual caption.
- *
+ *
*/
public static class StaticCell {
@@ -260,7 +260,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Sets the text displayed in this cell.
- *
+ *
* @param text
* a plain text caption
*/
@@ -272,7 +272,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Returns the text displayed in this cell.
- *
+ *
* @return the plain text caption
*/
public String getText() {
@@ -294,7 +294,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Returns the amount of columns the cell spans. By default is 1.
- *
+ *
* @return The amount of columns the cell spans.
*/
public int getColspan() {
@@ -304,7 +304,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Sets the amount of columns the cell spans. Must be more or equal
* to 1. By default is 1.
- *
+ *
* @param colspan
* the colspan to set
*/
@@ -320,7 +320,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Returns the html inside the cell.
- *
+ *
* @throws IllegalStateException
* if trying to retrive HTML from a cell with a type
* other than {@link GridStaticCellType#HTML}.
@@ -338,7 +338,7 @@ public class Grid<T> extends ResizeComposite implements
* Sets the content of the cell to the provided html. All previous
* content is discarded and the cell type is set to
* {@link GridStaticCellType#HTML}.
- *
+ *
* @param html
* The html content of the cell
*/
@@ -350,16 +350,17 @@ public class Grid<T> extends ResizeComposite implements
/**
* Returns the widget in the cell.
- *
+ *
* @throws IllegalStateException
* if the cell is not {@link GridStaticCellType#WIDGET}
- *
+ *
* @return the widget in the cell
*/
public Widget getWidget() {
if (type != GridStaticCellType.WIDGET) {
throw new IllegalStateException(
- "Cannot fetch Widget from a cell with type " + type);
+ "Cannot fetch Widget from a cell with type "
+ + type);
}
return (Widget) content;
}
@@ -368,7 +369,7 @@ public class Grid<T> extends ResizeComposite implements
* Set widget as the content of the cell. The type of the cell
* becomes {@link GridStaticCellType#WIDGET}. All previous content
* is discarded.
- *
+ *
* @param widget
* The widget to add to the cell. Should not be
* previously attached anywhere (widget.getParent ==
@@ -390,7 +391,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Returns the type of the cell.
- *
+ *
* @return the type of content the cell contains.
*/
public GridStaticCellType getType() {
@@ -399,7 +400,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Returns the custom style name for this cell.
- *
+ *
* @return the style name or null if no style name has been set
*/
public String getStyleName() {
@@ -408,7 +409,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Sets a custom style name for this cell.
- *
+ *
* @param styleName
* the style name to set or null to not use any style
* name
@@ -421,7 +422,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Called when the cell is detached from the row
- *
+ *
* @since 7.6.3
*/
void detach() {
@@ -434,7 +435,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Abstract base class for Grid header and footer rows.
- *
+ *
* @param <CELLTYPE>
* the type of the cells in the row
*/
@@ -457,7 +458,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Returns the cell on given GridColumn. If the column is merged
* returned cell is the cell for the whole group.
- *
+ *
* @param column
* the column in grid
* @return the cell on given column, merged cell for merged columns,
@@ -473,7 +474,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Returns <code>true</code> if this row contains spanned cells.
- *
+ *
* @since 7.5.0
* @return does this row contain spanned cells
*/
@@ -483,7 +484,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Merges columns cells in a row
- *
+ *
* @param columns
* the columns which header should be merged
* @return the remaining visible cell after the merge, or the cell
@@ -501,7 +502,8 @@ public class Grid<T> extends ResizeComposite implements
for (Column<?, ?> column : columns) {
if (!cells.containsKey(column)) {
throw new IllegalArgumentException(
- "Given column does not exists on row " + column);
+ "Given column does not exists on row "
+ + column);
} else if (getCellGroupForColumn(column) != null) {
throw new IllegalStateException(
"Column is already in a group.");
@@ -520,7 +522,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Merges columns cells in a row
- *
+ *
* @param cells
* The cells to merge. Must be from the same row.
* @return The remaining visible cell after the merge, or the first
@@ -551,7 +553,8 @@ public class Grid<T> extends ResizeComposite implements
return join(columns);
}
- private Set<Column<?, ?>> getCellGroupForColumn(Column<?, ?> column) {
+ private Set<Column<?, ?>> getCellGroupForColumn(
+ Column<?, ?> column) {
for (Set<Column<?, ?>> group : cellGroups.keySet()) {
if (group.contains(column)) {
return group;
@@ -631,7 +634,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Returns the custom style name for this row.
- *
+ *
* @return the style name or null if no style name has been set
*/
public String getStyleName() {
@@ -640,7 +643,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Sets a custom style name for this row.
- *
+ *
* @param styleName
* the style name to set or null to not use any style
* name
@@ -652,7 +655,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Called when the row is detached from the grid
- *
+ *
* @since 7.6.3
*/
void detach() {
@@ -675,7 +678,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Creates and returns a new instance of the row type.
- *
+ *
* @return the created row
*/
protected abstract ROWTYPE createRow();
@@ -691,7 +694,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Sets the visibility of the whole section.
- *
+ *
* @param visible
* true to show this section, false to hide
*/
@@ -702,7 +705,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Returns the visibility of this section.
- *
+ *
* @return true if visible, false otherwise.
*/
public boolean isVisible() {
@@ -713,11 +716,11 @@ public class Grid<T> extends ResizeComposite implements
* Inserts a new row at the given position. Shifts the row currently at
* that position and any subsequent rows down (adds one to their
* indices).
- *
+ *
* @param index
* the position at which to insert the row
* @return the new row
- *
+ *
* @throws IndexOutOfBoundsException
* if the index is out of bounds
* @see #appendRow()
@@ -739,7 +742,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Adds a new row at the top of this section.
- *
+ *
* @return the new row
* @see #appendRow()
* @see #addRowAt(int)
@@ -752,7 +755,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Adds a new row at the bottom of this section.
- *
+ *
* @return the new row
* @see #prependRow()
* @see #addRowAt(int)
@@ -765,10 +768,10 @@ public class Grid<T> extends ResizeComposite implements
/**
* Removes the row at the given position.
- *
+ *
* @param index
* the position of the row
- *
+ *
* @throws IndexOutOfBoundsException
* if the index is out of bounds
* @see #addRowAt(int)
@@ -784,10 +787,10 @@ public class Grid<T> extends ResizeComposite implements
/**
* Removes the given row from the section.
- *
+ *
* @param row
* the row to be removed
- *
+ *
* @throws IllegalArgumentException
* if the row does not exist in this section
* @see #addRowAt(int)
@@ -806,11 +809,11 @@ public class Grid<T> extends ResizeComposite implements
/**
* Returns the row at the given position.
- *
+ *
* @param index
* the position of the row
* @return the row with the given index
- *
+ *
* @throws IndexOutOfBoundsException
* if the index is out of bounds
*/
@@ -818,14 +821,14 @@ public class Grid<T> extends ResizeComposite implements
try {
return rows.get(index);
} catch (IndexOutOfBoundsException e) {
- throw new IllegalArgumentException("Row with index " + index
- + " does not exist");
+ throw new IllegalArgumentException(
+ "Row with index " + index + " does not exist");
}
}
/**
* Returns the number of rows in this section.
- *
+ *
* @return the number of rows
*/
public int getRowCount() {
@@ -892,10 +895,10 @@ public class Grid<T> extends ResizeComposite implements
/**
* Sets the default row of this header. The default row is a special
* header row providing a user interface for sorting columns.
- *
+ *
* @param row
* the new default row, or null for no default row
- *
+ *
* @throws IllegalArgumentException
* this header does not contain the row
*/
@@ -921,7 +924,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Returns the current default row of this header. The default row is a
* special header row providing a user interface for sorting columns.
- *
+ *
* @return the default row or null if no default row set
*/
public HeaderRow getDefaultRow() {
@@ -956,7 +959,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Returns the events consumed by the header
- *
+ *
* @return a collection of BrowserEvents
*/
public Collection<String> getConsumedEvents() {
@@ -978,7 +981,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* A single row in a grid header section.
- *
+ *
*/
public static class HeaderRow extends StaticSection.StaticRow<HeaderCell> {
@@ -1045,14 +1048,14 @@ public class Grid<T> extends ResizeComposite implements
/**
* A single cell in a grid Footer row. Has a textual caption.
- *
+ *
*/
public static class FooterCell extends StaticSection.StaticCell {
}
/**
* A single row in a grid Footer section.
- *
+ *
*/
public static class FooterRow extends StaticSection.StaticRow<FooterCell> {
@@ -1067,7 +1070,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* A callback interface used to notify the invoker of the editor handler
* of completed editor requests.
- *
+ *
* @param <T>
* the row data type
*/
@@ -1075,7 +1078,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* The method that must be called when the request has been
* processed correctly.
- *
+ *
* @param request
* the original request object
*/
@@ -1084,7 +1087,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* The method that must be called when processing the request has
* produced an aborting error.
- *
+ *
* @param request
* the original request object
*/
@@ -1173,7 +1176,7 @@ public class Grid<T> extends ResizeComposite implements
* A wrapper for native DOM events originating from Grid. In addition to the
* native event, contains a {@link CellReference} instance specifying which
* cell the event originated from.
- *
+ *
* @since 7.6
* @param <T>
* The row type of the grid
@@ -1189,7 +1192,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Returns the wrapped DOM event.
- *
+ *
* @return the DOM event
*/
public Event getDomEvent() {
@@ -1198,7 +1201,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Returns the Grid cell this event originated from.
- *
+ *
* @return the event cell
*/
public EventCellReference<T> getCell() {
@@ -1207,7 +1210,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Returns the Grid instance this event originated from.
- *
+ *
* @return the grid
*/
public Grid<T> getGrid() {
@@ -1218,7 +1221,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* A wrapper for native DOM events related to the {@link Editor Grid editor}
* .
- *
+ *
* @since 7.6
* @param <T>
* the row type of the grid
@@ -1235,7 +1238,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Returns the editor of the Grid this event originated from.
- *
+ *
* @return the related editor instance
*/
public Editor<T> getEditor() {
@@ -1244,7 +1247,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Returns the currently focused editor widget.
- *
+ *
* @return the focused editor widget or {@code null} if not editable
*/
public Widget getEditorWidget() {
@@ -1254,7 +1257,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Returns the row index the editor is open at. If the editor is not
* open, returns -1.
- *
+ *
* @return the index of the edited row or -1 if editor is not open
*/
public int getRowIndex() {
@@ -1264,7 +1267,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Returns the column index the editor was opened at. If the editor is
* not open, returns -1.
- *
+ *
* @return the column index or -1 if editor is not open
*/
public int getFocusedColumnIndex() {
@@ -1275,7 +1278,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* An editor UI for Grid rows. A single Grid row at a time can be opened for
* editing.
- *
+ *
* @since 7.6
* @param <T>
* the row type of the grid
@@ -1308,7 +1311,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* A handler for events related to the Grid editor. Responsible for
* opening, moving or closing the editor based on the received event.
- *
+ *
* @since 7.6
* @author Vaadin Ltd
* @param <T>
@@ -1318,7 +1321,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Handles editor-related events in an appropriate way. Opens,
* moves, or closes the editor based on the given event.
- *
+ *
* @param event
* the received event
* @return true if the event was handled and nothing else should be
@@ -1340,8 +1343,8 @@ public class Grid<T> extends ResizeComposite implements
private DivElement cellWrapper = DivElement.as(DOM.createDiv());
private DivElement frozenCellWrapper = DivElement.as(DOM.createDiv());
- private DivElement messageAndButtonsWrapper = DivElement.as(DOM
- .createDiv());
+ private DivElement messageAndButtonsWrapper = DivElement
+ .as(DOM.createDiv());
private DivElement messageWrapper = DivElement.as(DOM.createDiv());
private DivElement buttonsWrapper = DivElement.as(DOM.createDiv());
@@ -1507,10 +1510,10 @@ public class Grid<T> extends ResizeComposite implements
* If a cell of this Grid had focus once this editRow call was
* triggered, the editor component at the previously focused column
* index will be focused.
- *
+ *
* If a Grid cell was not focused prior to calling this method, it will
* be equivalent to {@code editRow(rowIndex, -1)}.
- *
+ *
* @see #editRow(int, int)
*/
public void editRow(int rowIndex) {
@@ -1530,19 +1533,19 @@ public class Grid<T> extends ResizeComposite implements
* Opens the editor over the row with the given index and attempts to
* focus the editor widget in the given column index. Does not move
* focus if the widget is not focusable or if the column index is -1.
- *
+ *
* @param rowIndex
* the index of the row to be edited
* @param columnIndex
* the column index of the editor widget that should be
* initially focused or -1 to not set focus
- *
+ *
* @throws IllegalStateException
* if this editor is not enabled
* @throws IllegalStateException
* if this editor is already in edit mode and in buffered
* mode
- *
+ *
* @since 7.5
*/
public void editRow(final int rowIndex, final int columnIndex) {
@@ -1571,12 +1574,13 @@ public class Grid<T> extends ResizeComposite implements
}
}
if (columnIndex >= grid.getVisibleColumns().size()) {
- throw new IllegalArgumentException("Edited column index "
- + columnIndex
- + " was bigger than visible column count.");
+ throw new IllegalArgumentException(
+ "Edited column index " + columnIndex
+ + " was bigger than visible column count.");
}
- if (this.rowIndex == rowIndex && focusedColumnIndex == columnIndex) {
+ if (this.rowIndex == rowIndex
+ && focusedColumnIndex == columnIndex) {
// NO-OP
return;
}
@@ -1618,16 +1622,15 @@ public class Grid<T> extends ResizeComposite implements
}
}
});
- grid.scrollToRow(rowIndex,
- isBuffered() ? ScrollDestination.MIDDLE
- : ScrollDestination.ANY);
+ grid.scrollToRow(rowIndex, isBuffered()
+ ? ScrollDestination.MIDDLE : ScrollDestination.ANY);
}
}
/**
* Cancels the currently active edit and hides the editor. Any changes
* that are not {@link #save() saved} are lost.
- *
+ *
* @throws IllegalStateException
* if this editor is not enabled
* @throws IllegalStateException
@@ -1658,8 +1661,8 @@ public class Grid<T> extends ResizeComposite implements
private void updateSelectionCheckboxesAsNeeded(boolean isEnabled) {
// FIXME: This is too much guessing. Define a better way to do this.
- if (grid.selectionColumn != null
- && grid.selectionColumn.getRenderer() instanceof MultiSelectionRenderer) {
+ if (grid.selectionColumn != null && grid.selectionColumn
+ .getRenderer() instanceof MultiSelectionRenderer) {
grid.refreshBody();
CheckBox checkBox = (CheckBox) grid.getDefaultHeaderRow()
.getCell(grid.selectionColumn).getWidget();
@@ -1669,7 +1672,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Saves any unsaved changes to the data source and hides the editor.
- *
+ *
* @throws IllegalStateException
* if this editor is not enabled
* @throws IllegalStateException
@@ -1697,7 +1700,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Returns the handler responsible for binding data and editor widgets
* to this editor.
- *
+ *
* @return the editor handler or null if not set
*/
public EditorHandler<T> getHandler() {
@@ -1707,10 +1710,10 @@ public class Grid<T> extends ResizeComposite implements
/**
* Sets the handler responsible for binding data and editor widgets to
* this editor.
- *
+ *
* @param rowHandler
* the new editor handler
- *
+ *
* @throws IllegalStateException
* if this editor is currently in edit mode
*/
@@ -1728,10 +1731,10 @@ public class Grid<T> extends ResizeComposite implements
/**
* Sets the enabled state of this editor.
- *
+ *
* @param enabled
* true if enabled, false otherwise
- *
+ *
* @throws IllegalStateException
* if in edit mode and trying to disable
* @throws IllegalStateException
@@ -1780,7 +1783,7 @@ public class Grid<T> extends ResizeComposite implements
* Returns the editor widget associated with the given column. If the
* editor is not active or the column is not
* {@link Grid.Column#isEditable() editable}, returns null.
- *
+ *
* @param column
* the column
* @return the widget if the editor is open and the column is editable,
@@ -1792,10 +1795,10 @@ public class Grid<T> extends ResizeComposite implements
/**
* Equivalent to {@code showOverlay()}. The argument is ignored.
- *
+ *
* @param unused
* ignored argument
- *
+ *
* @deprecated As of 7.5, use {@link #showOverlay()} instead.
*/
@Deprecated
@@ -1806,7 +1809,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Opens the editor overlay over the table row indicated by
* {@link #getRow()}.
- *
+ *
* @since 7.5
*/
protected void showOverlay() {
@@ -1838,17 +1841,17 @@ public class Grid<T> extends ResizeComposite implements
for (int i = 0; i < tr.getCells().getLength(); i++) {
Element cell = createCell(tr.getCells().getItem(i));
- cellHeight = Math.max(cellHeight, WidgetUtil
- .getRequiredHeightBoundingClientRectDouble(tr
- .getCells().getItem(i)));
+ cellHeight = Math.max(cellHeight,
+ WidgetUtil.getRequiredHeightBoundingClientRectDouble(
+ tr.getCells().getItem(i)));
Column<?, T> column = grid.getVisibleColumn(i);
if (i < frozenColumns) {
frozenCellWrapper.appendChild(cell);
frozenColumnsWidth += WidgetUtil
- .getRequiredWidthBoundingClientRectDouble(tr
- .getCells().getItem(i));
+ .getRequiredWidthBoundingClientRectDouble(
+ tr.getCells().getItem(i));
} else {
cellWrapper.appendChild(cell);
}
@@ -1889,8 +1892,8 @@ public class Grid<T> extends ResizeComposite implements
// editor overlay since the original one is hidden by
// the overlay
final CheckBox checkBox = GWT.create(CheckBox.class);
- checkBox.setValue(grid.isSelected(pinnedRowHandle
- .getRow()));
+ checkBox.setValue(
+ grid.isSelected(pinnedRowHandle.getRow()));
checkBox.sinkEvents(Event.ONCLICK);
checkBox.addClickHandler(new ClickHandler() {
@@ -1910,17 +1913,18 @@ public class Grid<T> extends ResizeComposite implements
// Only enable CheckBox in non-buffered mode
checkBox.setEnabled(!isBuffered());
- } else if (!(column.getRenderer() instanceof WidgetRenderer)) {
+ } else if (!(column
+ .getRenderer() instanceof WidgetRenderer)) {
// Copy non-widget content directly
- cell.setInnerHTML(tr.getCells().getItem(i)
- .getInnerHTML());
+ cell.setInnerHTML(
+ tr.getCells().getItem(i).getInnerHTML());
}
}
}
setBounds(frozenCellWrapper, 0, 0, frozenColumnsWidth, 0);
- setBounds(cellWrapper, frozenColumnsWidth, 0, tr.getOffsetWidth()
- - frozenColumnsWidth, cellHeight);
+ setBounds(cellWrapper, frozenColumnsWidth, 0,
+ tr.getOffsetWidth() - frozenColumnsWidth, cellHeight);
// Only add these elements once
if (!messageAndButtonsWrapper.isOrHasChild(messageWrapper)) {
@@ -1957,10 +1961,9 @@ public class Grid<T> extends ResizeComposite implements
// overlay from the bottom
editorOverlay.insertFirst(messageAndButtonsWrapper);
int gridHeight = grid.getElement().getOffsetHeight();
- editorOverlay.getStyle()
- .setBottom(
- gridHeight - overlayTop - tr.getOffsetHeight(),
- Unit.PX);
+ editorOverlay.getStyle().setBottom(
+ gridHeight - overlayTop - tr.getOffsetHeight(),
+ Unit.PX);
editorOverlay.getStyle().clearTop();
}
@@ -2076,7 +2079,7 @@ public class Grid<T> extends ResizeComposite implements
* Creates an editor cell corresponding to the given table cell. The
* returned element is empty and has the same dimensions and position as
* the table cell.
- *
+ *
* @param td
* the table cell used as a reference
* @return an editor cell corresponding to the given cell
@@ -2177,7 +2180,8 @@ public class Grid<T> extends ResizeComposite implements
return cancelButton.getText();
}
- public void setEditorColumnError(Column<?, T> column, boolean hasError) {
+ public void setEditorColumnError(Column<?, T> column,
+ boolean hasError) {
if (state != State.ACTIVE && state != State.SAVING) {
throw new IllegalStateException("Cannot set cell error "
+ "status: editor is neither active nor saving.");
@@ -2236,7 +2240,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Sets the event handler for this Editor.
- *
+ *
* @since 7.6
* @param handler
* the new event handler
@@ -2247,7 +2251,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Returns the event handler of this Editor.
- *
+ *
* @since 7.6
* @return the current event handler
*/
@@ -2299,7 +2303,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Gets the Grid instance for this event.
- *
+ *
* @return grid
*/
public Grid<?> getGrid() {
@@ -2308,7 +2312,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Gets the focused cell for this event.
- *
+ *
* @return focused cell
*/
public CellReference<?> getFocusedCell() {
@@ -2349,7 +2353,8 @@ public class Grid<T> extends ResizeComposite implements
private final Type<HANDLER> associatedType = new Type<HANDLER>(
getBrowserEventType(), this);
- public AbstractGridMouseEvent(Grid<?> grid, CellReference<?> targetCell) {
+ public AbstractGridMouseEvent(Grid<?> grid,
+ CellReference<?> targetCell) {
this.grid = grid;
this.targetCell = targetCell;
}
@@ -2358,7 +2363,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Gets the Grid instance for this event.
- *
+ *
* @return grid
*/
public Grid<?> getGrid() {
@@ -2367,7 +2372,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Gets the reference of target cell for this event.
- *
+ *
* @return target cell
*/
public CellReference<?> getTargetCell() {
@@ -2418,7 +2423,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* An initial height that is given to new details rows before rendering the
* appropriate widget that we then can be measure
- *
+ *
* @see GridSpacerUpdater
*/
private static final double DETAILS_ROW_INITIAL_HEIGHT = 50;
@@ -2469,8 +2474,8 @@ public class Grid<T> extends ResizeComposite implements
// Cell is correct but it does not have focused style
if (cellWithFocusStyle != null) {
// Remove old focus style
- setStyleName(cellWithFocusStyle,
- cellFocusStyleName, false);
+ setStyleName(cellWithFocusStyle, cellFocusStyleName,
+ false);
}
cellWithFocusStyle = cell.getElement();
@@ -2489,7 +2494,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Sets focus style for the given row if needed.
- *
+ *
* @param row
* a row object
*/
@@ -2506,7 +2511,8 @@ public class Grid<T> extends ResizeComposite implements
setStyleName(rowWithFocusStyle, rowFocusStyleName, true);
}
} else if (rowWithFocusStyle == row.getElement()
- || (containerWithFocus != escalator.getBody() && rowWithFocusStyle != null)) {
+ || (containerWithFocus != escalator.getBody()
+ && rowWithFocusStyle != null)) {
// Remove focus style.
setStyleName(rowWithFocusStyle, rowFocusStyleName, false);
rowWithFocusStyle = null;
@@ -2518,7 +2524,7 @@ public class Grid<T> extends ResizeComposite implements
* <p>
* <em>NOTE:</em> the column index is the index in DOM, not the logical
* column index which includes hidden columns.
- *
+ *
* @param rowIndex
* the index of the row having focus
* @param columnIndexDOM
@@ -2528,8 +2534,7 @@ public class Grid<T> extends ResizeComposite implements
*/
private void setCellFocus(int rowIndex, int columnIndexDOM,
RowContainer container) {
- if (container == null
- || rowIndex == rowWithFocus
+ if (container == null || rowIndex == rowWithFocus
&& cellFocusRange.contains(columnIndexDOM)
&& container == this.containerWithFocus) {
return;
@@ -2558,8 +2563,8 @@ public class Grid<T> extends ResizeComposite implements
++i;
} while (cell != null);
}
- int columnIndex = getColumns().indexOf(
- getVisibleColumn(columnIndexDOM));
+ int columnIndex = getColumns()
+ .indexOf(getVisibleColumn(columnIndexDOM));
if (columnIndex >= escalator.getColumnConfiguration()
.getFrozenColumnCount()) {
escalator.scrollToColumn(columnIndexDOM, ScrollDestination.ANY,
@@ -2600,11 +2605,11 @@ public class Grid<T> extends ResizeComposite implements
/**
* Sets focus on a cell.
- *
+ *
* <p>
* <em>Note</em>: cell focus is not the same as JavaScript's
* {@code document.activeElement}.
- *
+ *
* @param cell
* a cell object
*/
@@ -2615,7 +2620,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Gets list of events that can be used for cell focusing.
- *
+ *
* @return list of navigation related event types
*/
public Collection<String> getNavigationEvents() {
@@ -2678,7 +2683,8 @@ public class Grid<T> extends ResizeComposite implements
case KeyCodes.KEY_PAGEDOWN:
case KeyCodes.KEY_PAGEUP:
if (newContainer.getRowCount() > 0) {
- boolean down = event.getKeyCode() == KeyCodes.KEY_PAGEDOWN;
+ boolean down = event
+ .getKeyCode() == KeyCodes.KEY_PAGEDOWN;
// If there is a visible focused cell, scroll by one
// page from its position. Otherwise, use the first or
// the last visible row as the scroll start position.
@@ -2692,12 +2698,12 @@ public class Grid<T> extends ResizeComposite implements
// Scroll by a little less than the visible area to
// account for the possibility that the top and the
// bottom row are only partially visible.
- int moveFocusBy = Math.max(1, lastVisible
- - firstVisible - 1);
+ int moveFocusBy = Math.max(1,
+ lastVisible - firstVisible - 1);
moveFocusBy *= down ? 1 : -1;
newRow += moveFocusBy;
- newRow = Math.max(0, Math.min(
- newContainer.getRowCount() - 1, newRow));
+ newRow = Math.max(0, Math
+ .min(newContainer.getRowCount() - 1, newRow));
}
break;
default:
@@ -2786,7 +2792,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Offsets the focused cell's range.
- *
+ *
* @param offset
* offset for fixing focused cell's range
*/
@@ -2798,17 +2804,18 @@ public class Grid<T> extends ResizeComposite implements
* Informs {@link CellFocusHandler} that certain range of rows has been
* added to the Grid body. {@link CellFocusHandler} will fix indices
* accordingly.
- *
+ *
* @param added
* a range of added rows
*/
public void rowsAddedToBody(Range added) {
boolean bodyHasFocus = (containerWithFocus == escalator.getBody());
- boolean insertionIsAboveFocusedCell = (added.getStart() <= rowWithFocus);
+ boolean insertionIsAboveFocusedCell = (added
+ .getStart() <= rowWithFocus);
if (bodyHasFocus && insertionIsAboveFocusedCell) {
rowWithFocus += added.length();
- rowWithFocus = Math.min(rowWithFocus, escalator.getBody()
- .getRowCount() - 1);
+ rowWithFocus = Math.min(rowWithFocus,
+ escalator.getBody().getRowCount() - 1);
refreshRow(rowWithFocus);
}
}
@@ -2817,7 +2824,7 @@ public class Grid<T> extends ResizeComposite implements
* Informs {@link CellFocusHandler} that certain range of rows has been
* removed from the Grid body. {@link CellFocusHandler} will fix indices
* accordingly.
- *
+ *
* @param removed
* a range of removed rows
*/
@@ -2836,12 +2843,12 @@ public class Grid<T> extends ResizeComposite implements
rowWithFocus = removed.getStart() - 1;
} else {
if (escalator.getHeader().getRowCount() > 0) {
- rowWithFocus = Math.min(lastFocusedHeaderRow, escalator
- .getHeader().getRowCount() - 1);
+ rowWithFocus = Math.min(lastFocusedHeaderRow,
+ escalator.getHeader().getRowCount() - 1);
containerWithFocus = escalator.getHeader();
} else if (escalator.getFooter().getRowCount() > 0) {
- rowWithFocus = Math.min(lastFocusedFooterRow, escalator
- .getFooter().getRowCount() - 1);
+ rowWithFocus = Math.min(lastFocusedFooterRow,
+ escalator.getFooter().getRowCount() - 1);
containerWithFocus = escalator.getFooter();
}
}
@@ -2851,7 +2858,7 @@ public class Grid<T> extends ResizeComposite implements
}
public final class SelectionColumn extends Column<Boolean, T>
- implements GridEnabledHandler {
+ implements GridEnabledHandler {
private boolean initDone = false;
private boolean selected = false;
@@ -2878,7 +2885,7 @@ public class Grid<T> extends ResizeComposite implements
* TODO: Currently the select all check box is shown when multi
* selection is in use. This might result in malfunctions if no
* SelectAllHandlers are present.
- *
+ *
* Later on this could be fixed so that it check such handlers
* exist.
*/
@@ -2886,10 +2893,10 @@ public class Grid<T> extends ResizeComposite implements
if (selectAllCheckBox == null) {
selectAllCheckBox = GWT.create(CheckBox.class);
- selectAllCheckBox.setStylePrimaryName(getStylePrimaryName()
- + SELECT_ALL_CHECKBOX_CLASSNAME);
- selectAllCheckBox
- .addValueChangeHandler(new ValueChangeHandler<Boolean>() {
+ selectAllCheckBox.setStylePrimaryName(
+ getStylePrimaryName() + SELECT_ALL_CHECKBOX_CLASSNAME);
+ selectAllCheckBox.addValueChangeHandler(
+ new ValueChangeHandler<Boolean>() {
@Override
public void onValueChange(
@@ -2909,11 +2916,11 @@ public class Grid<T> extends ResizeComposite implements
@Override
public void onClick(GridClickEvent event) {
CellReference<?> targetCell = event.getTargetCell();
- int defaultRowIndex = getHeader().getRows().indexOf(
- getDefaultHeaderRow());
+ int defaultRowIndex = getHeader().getRows()
+ .indexOf(getDefaultHeaderRow());
- if (targetCell.getColumnIndex() == 0
- && targetCell.getRowIndex() == defaultRowIndex) {
+ if (targetCell.getColumnIndex() == 0 && targetCell
+ .getRowIndex() == defaultRowIndex) {
selectAllCheckBox.setValue(
!selectAllCheckBox.getValue(), true);
}
@@ -2927,12 +2934,13 @@ public class Grid<T> extends ResizeComposite implements
if (event.getNativeKeyCode() != KeyCodes.KEY_SPACE) {
return;
}
- HeaderRow targetHeaderRow = getHeader().getRow(
- event.getFocusedCell().getRowIndex());
+ HeaderRow targetHeaderRow = getHeader()
+ .getRow(event.getFocusedCell().getRowIndex());
if (!targetHeaderRow.isDefault()) {
return;
}
- if (event.getFocusedCell().getColumn() == SelectionColumn.this) {
+ if (event.getFocusedCell()
+ .getColumn() == SelectionColumn.this) {
// Send events to ensure state is updated
selectAllCheckBox.setValue(
!selectAllCheckBox.getValue(), true);
@@ -2941,7 +2949,8 @@ public class Grid<T> extends ResizeComposite implements
});
} else {
for (HeaderRow row : header.getRows()) {
- if (row.getCell(this).getType() == GridStaticCellType.WIDGET) {
+ if (row.getCell(this)
+ .getType() == GridStaticCellType.WIDGET) {
// Detach from old header.
row.getCell(this).setText("");
}
@@ -3015,11 +3024,12 @@ public class Grid<T> extends ResizeComposite implements
* Sets whether the selection column is enabled.
*
* @since 7.7
- * @param enabled <code>true</code> to enable the column,
- * <code>false</code> to disable it.
+ * @param enabled
+ * <code>true</code> to enable the column, <code>false</code>
+ * to disable it.
*/
public void setEnabled(boolean enabled) {
- if(selectAllCheckBox != null) {
+ if (selectAllCheckBox != null) {
selectAllCheckBox.setEnabled(enabled);
}
}
@@ -3058,7 +3068,7 @@ public class Grid<T> extends ResizeComposite implements
* chain. If false, the sorting order is set to ASCENDING for that
* cell's column. If that column was already the only sorted column in
* the Grid, the sort direction is flipped.
- *
+ *
* @param cell
* a valid cell reference
* @param multisort
@@ -3114,7 +3124,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Perform a sort after a delay.
- *
+ *
* @param delay
* delay, in milliseconds
*/
@@ -3127,7 +3137,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Check if a delayed sort command has been issued but not yet carried
* out.
- *
+ *
* @return a boolean value
*/
public boolean isDelayedSortScheduled() {
@@ -3193,7 +3203,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Calculates and applies column widths, taking into account fixed
* widths and column expand rules
- *
+ *
* @param immediately
* <code>true</code> if the widths should be executed
* immediately (ignoring lazy loading completely), or
@@ -3249,8 +3259,8 @@ public class Grid<T> extends ResizeComposite implements
for (int index = 0; index < columns.size(); index++) {
selfWidths.put(index, columns.get(index).getWidth());
}
- Grid.this.escalator.getColumnConfiguration().setColumnWidths(
- selfWidths);
+ Grid.this.escalator.getColumnConfiguration()
+ .setColumnWidths(selfWidths);
/*
* Step 2: Make sure that each column ends up obeying their min/max
@@ -3275,8 +3285,8 @@ public class Grid<T> extends ResizeComposite implements
constrainedWidths.put(index, column.getMaximumWidth());
}
}
- Grid.this.escalator.getColumnConfiguration().setColumnWidths(
- constrainedWidths);
+ Grid.this.escalator.getColumnConfiguration()
+ .setColumnWidths(constrainedWidths);
}
private void applyColumnWidthsWithExpansion() {
@@ -3291,7 +3301,7 @@ public class Grid<T> extends ResizeComposite implements
/*
* Set all fixed widths and also calculate the size-to-fit widths
* for the autocalculated columns.
- *
+ *
* This way we know with how many pixels we have left to expand the
* rest.
*/
@@ -3303,7 +3313,8 @@ public class Grid<T> extends ResizeComposite implements
Math.min(getMaxWidth(column), widthAsIs),
column.getMinimumWidth());
defaultExpandRatios = defaultExpandRatios
- && (column.getExpandRatio() == -1 || column == selectionColumn);
+ && (column.getExpandRatio() == -1
+ || column == selectionColumn);
if (isFixedWidth) {
columnSizes.put(visibleColumns.indexOf(column), widthFixed);
@@ -3317,8 +3328,8 @@ public class Grid<T> extends ResizeComposite implements
setColumnSizes(columnSizes);
for (Column<?, T> column : nonFixedColumns) {
- final int expandRatio = (defaultExpandRatios ? 1 : column
- .getExpandRatio());
+ final int expandRatio = (defaultExpandRatios ? 1
+ : column.getExpandRatio());
final double maxWidth = getMaxWidth(column);
final double newWidth = Math.min(maxWidth,
column.getWidthActual());
@@ -3365,8 +3376,8 @@ public class Grid<T> extends ResizeComposite implements
final int columnIndex = visibleColumns.indexOf(column);
final double autoWidth = columnSizes.get(columnIndex);
final double maxWidth = getMaxWidth(column);
- double expandedWidth = autoWidth + widthPerRatio
- * expandRatio;
+ double expandedWidth = autoWidth
+ + widthPerRatio * expandRatio;
if (maxWidth <= expandedWidth) {
i.remove();
@@ -3383,12 +3394,12 @@ public class Grid<T> extends ResizeComposite implements
return;
}
assert pixelsToDistribute > 0 : "We've run out of pixels to distribute ("
- + pixelsToDistribute
- + "px to "
- + totalRatios
+ + pixelsToDistribute + "px to " + totalRatios
+ " ratios between " + columnsToExpand.size() + " columns)";
- assert totalRatios > 0 && !columnsToExpand.isEmpty() : "Bookkeeping out of sync. Ratios: "
- + totalRatios + " Columns: " + columnsToExpand.size();
+ assert totalRatios > 0 && !columnsToExpand
+ .isEmpty() : "Bookkeeping out of sync. Ratios: "
+ + totalRatios + " Columns: "
+ + columnsToExpand.size();
/*
* If we still have anything left, distribute the remaining pixels
@@ -3401,8 +3412,8 @@ public class Grid<T> extends ResizeComposite implements
// These browsers report subpixels as integers. this usually
// results into issues..
widthPerRatio = (int) (pixelsToDistribute / totalRatios);
- leftOver = (int) (pixelsToDistribute - widthPerRatio
- * totalRatios);
+ leftOver = (int) (pixelsToDistribute
+ - widthPerRatio * totalRatios);
} else {
widthPerRatio = pixelsToDistribute / totalRatios;
}
@@ -3451,7 +3462,8 @@ public class Grid<T> extends ResizeComposite implements
boolean hasAutoWidth = column.getWidth() < 0;
if (hasAutoWidth && currentWidth < minWidth) {
columnSizes.put(columnIndex, minWidth);
- pixelsToRemoveFromOtherColumns += (minWidth - currentWidth);
+ pixelsToRemoveFromOtherColumns += (minWidth
+ - currentWidth);
minWidthsCausedReflows = true;
/*
@@ -3477,8 +3489,8 @@ public class Grid<T> extends ResizeComposite implements
final double pixelsToRemove = pixelsToRemovePerRatio
* getExpandRatio(column, defaultExpandRatios);
int colIndex = visibleColumns.indexOf(column);
- columnSizes.put(colIndex, columnSizes.get(colIndex)
- - pixelsToRemove);
+ columnSizes.put(colIndex,
+ columnSizes.get(colIndex) - pixelsToRemove);
}
} while (minWidthsCausedReflows);
@@ -3534,7 +3546,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Check whether the auto width calculation is currently scheduled.
- *
+ *
* @return <code>true</code> if auto width calculation is currently
* scheduled
*/
@@ -3559,10 +3571,10 @@ public class Grid<T> extends ResizeComposite implements
try {
detailsWidget = detailsGenerator.getDetails(rowIndex);
} catch (Throwable e) {
- getLogger().log(
- Level.SEVERE,
+ getLogger().log(Level.SEVERE,
"Exception while generating details for row "
- + rowIndex, e);
+ + rowIndex,
+ e);
}
final double spacerHeight;
@@ -3583,7 +3595,7 @@ public class Grid<T> extends ResizeComposite implements
/*
* Once we have the content properly inside the DOM, we should
* re-measure it to make sure that it's the correct height.
- *
+ *
* This is rather tricky, since the row (tr) will get the
* height, but the spacer cell (td) has the borders, which
* should go on top of the previous row and next row.
@@ -3600,7 +3612,8 @@ public class Grid<T> extends ResizeComposite implements
.getBorderTopAndBottomThickness(spacerElement);
double measuredHeight = contentHeight
+ borderTopAndBottomHeight;
- assert getElement().isOrHasChild(spacerElement) : "The spacer element wasn't in the DOM during measurement, but was assumed to be.";
+ assert getElement().isOrHasChild(
+ spacerElement) : "The spacer element wasn't in the DOM during measurement, but was assumed to be.";
spacerHeight = measuredHeight;
}
@@ -3619,8 +3632,8 @@ public class Grid<T> extends ResizeComposite implements
+ "Grid's DOM. (row: " + spacer.getRow() + ", element: "
+ spacerElement + ")";
- Widget detailsWidget = elementToWidgetMap.remove(spacerElement
- .getFirstChildElement());
+ Widget detailsWidget = elementToWidgetMap
+ .remove(spacerElement.getFirstChildElement());
if (detailsWidget != null) {
/*
@@ -3631,8 +3644,8 @@ public class Grid<T> extends ResizeComposite implements
assert spacerElement.getFirstChild() != null : "The "
+ "details row to destroy did not contain a widget - "
+ "probably removed by something else without "
- + "permission? (row: " + spacer.getRow()
- + ", element: " + spacerElement + ")";
+ + "permission? (row: " + spacer.getRow() + ", element: "
+ + spacerElement + ")";
setParent(detailsWidget, null);
spacerElement.removeAllChildren();
@@ -3664,7 +3677,7 @@ public class Grid<T> extends ResizeComposite implements
* grid, if it contains any column hiding options or custom widgets. The
* column hiding toggles and custom widgets become visible once the sidebar
* has been opened.
- *
+ *
* @since 7.5.0
*/
private static class Sidebar extends Composite implements HasEnabled {
@@ -3749,8 +3762,8 @@ public class Grid<T> extends ResizeComposite implements
&& event.getKeyCode() == KeyCodes.KEY_ENTER) {
final MenuItem item = getSelectedItem();
super.onBrowserEvent(event);
- Scheduler.get().scheduleDeferred(
- new ScheduledCommand() {
+ Scheduler.get()
+ .scheduleDeferred(new ScheduledCommand() {
@Override
public void execute() {
@@ -3820,7 +3833,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Returns whether the sidebar is open or not.
- *
+ *
* @return <code>true</code> if open, <code>false</code> if not
*/
public boolean isOpen() {
@@ -3858,8 +3871,8 @@ public class Grid<T> extends ResizeComposite implements
RowContainer header = grid.escalator.getHeader();
if (header.getRowCount() == 0
|| !header.getRowElement(0).hasChildNodes()) {
- getLogger()
- .info("No header cell available when calculating sidebar button height");
+ getLogger().info(
+ "No header cell available when calculating sidebar button height");
openCloseButton.setHeight(header.getDefaultRowHeight() + "px");
return;
@@ -3944,8 +3957,8 @@ public class Grid<T> extends ResizeComposite implements
}
toggle.setStyleName("hidden", column.isHidden());
} else if (columnToHidingToggleMap.containsKey(column)) {
- sidebar.menuBar.removeItem((columnToHidingToggleMap
- .remove(column)));
+ sidebar.menuBar
+ .removeItem((columnToHidingToggleMap.remove(column)));
}
updateTogglesOrder();
}
@@ -4081,12 +4094,15 @@ public class Grid<T> extends ResizeComposite implements
* This is a workaround to make Chrome work like Firefox. In Chrome,
* normally if you start a drag on one cell and release on:
* <ul>
- * <li>that same cell, the click event is that {@code <td>}.
- * <li>a cell on that same row, the click event is the parent {@code <tr>}.
+ * <li>that same cell, the click event is that {@code
+ * <td>}.
+ * <li>a cell on that same row, the click event is the parent {@code
+ * <tr>
+ * }.
* <li>a cell on another row, the click event is the table section ancestor
* ({@code <thead>}, {@code <tbody>} or {@code <tfoot>}).
* </ul>
- *
+ *
* @see #onBrowserEvent(Event)
*/
private Cell cellOnPrevMouseDown;
@@ -4181,8 +4197,8 @@ public class Grid<T> extends ResizeComposite implements
}
// update the style names on each run in case primary name has been
// modified
- tableHeader.setClassName(escalator.getHeader().getElement()
- .getClassName());
+ tableHeader.setClassName(
+ escalator.getHeader().getElement().getClassName());
dropMarker.setClassName(getStylePrimaryName() + "-drop-marker");
int topOffset = 0;
for (int i = 0; i < eventCell.getRowIndex(); i++) {
@@ -4215,9 +4231,11 @@ public class Grid<T> extends ResizeComposite implements
.ceilingEntry(cursorXCoordinate);
final Entry<Double, Integer> cellEdgeOnLeft = possibleDropPositions
.floorEntry(cursorXCoordinate);
- final double diffToRightEdge = cellEdgeOnRight == null ? Double.MAX_VALUE
+ final double diffToRightEdge = cellEdgeOnRight == null
+ ? Double.MAX_VALUE
: cellEdgeOnRight.getKey() - cursorXCoordinate;
- final double diffToLeftEdge = cellEdgeOnLeft == null ? Double.MAX_VALUE
+ final double diffToLeftEdge = cellEdgeOnLeft == null
+ ? Double.MAX_VALUE
: cursorXCoordinate - cellEdgeOnLeft.getKey();
double dropMarkerLeft = 0 - scrollLeft;
@@ -4233,7 +4251,8 @@ public class Grid<T> extends ResizeComposite implements
final double frozenColumnsWidth = autoScroller
.getFrozenColumnsWidth();
- final double rightBoundaryForDrag = getSidebarBoundaryComparedTo(dropMarkerLeft);
+ final double rightBoundaryForDrag = getSidebarBoundaryComparedTo(
+ dropMarkerLeft);
final int visibleColumns = getVisibleColumns().size();
// First check if the drop marker should move left because of the
@@ -4248,7 +4267,8 @@ public class Grid<T> extends ResizeComposite implements
// Check if the drop marker shouldn't be shown at all
else if (dropMarkerLeft < frozenColumnsWidth
|| dropMarkerLeft > Math.min(rightBoundaryForDrag,
- escalator.getInnerWidth()) || dropMarkerLeft < 0) {
+ escalator.getInnerWidth())
+ || dropMarkerLeft < 0) {
dropMarkerLeft = -10000000;
}
dropMarker.getStyle().setLeft(dropMarkerLeft, Unit.PX);
@@ -4271,8 +4291,8 @@ public class Grid<T> extends ResizeComposite implements
// Do not show the drag element beyond the grid
final double sidebarBoundary = getSidebarBoundaryComparedTo(left);
final double gridBoundary = escalator.getInnerWidth();
- final double rightBoundary = Math
- .min(sidebarBoundary, gridBoundary);
+ final double rightBoundary = Math.min(sidebarBoundary,
+ gridBoundary);
// Do not show on left of the frozen columns (even if scrolled)
final int frozenColumnsWidth = (int) autoScroller
@@ -4345,13 +4365,15 @@ public class Grid<T> extends ResizeComposite implements
final int colspan = header.getRow(eventCell.getRowIndex())
.getCell(eventCell.getColumn()).getColspan();
if (latestColumnDropIndex != draggedColumnIndex
- && latestColumnDropIndex != (draggedColumnIndex + colspan)) {
+ && latestColumnDropIndex != (draggedColumnIndex
+ + colspan)) {
List<Column<?, T>> columns = getColumns();
List<Column<?, T>> reordered = new ArrayList<Column<?, T>>();
if (draggedColumnIndex < latestColumnDropIndex) {
reordered.addAll(columns.subList(0, draggedColumnIndex));
- reordered.addAll(columns.subList(draggedColumnIndex
- + colspan, latestColumnDropIndex));
+ reordered.addAll(
+ columns.subList(draggedColumnIndex + colspan,
+ latestColumnDropIndex));
reordered.addAll(columns.subList(draggedColumnIndex,
draggedColumnIndex + colspan));
reordered.addAll(columns.subList(latestColumnDropIndex,
@@ -4362,8 +4384,8 @@ public class Grid<T> extends ResizeComposite implements
draggedColumnIndex + colspan));
reordered.addAll(columns.subList(latestColumnDropIndex,
draggedColumnIndex));
- reordered.addAll(columns.subList(draggedColumnIndex
- + colspan, columns.size()));
+ reordered.addAll(columns.subList(
+ draggedColumnIndex + colspan, columns.size()));
}
reordered.remove(selectionColumn); // since setColumnOrder will
// add it anyway!
@@ -4372,12 +4394,12 @@ public class Grid<T> extends ResizeComposite implements
Cell focusedCell = cellFocusHandler.getFocusedCell();
if (focusedCell != null) {
// take hidden columns into account
- focusedColumnIndex = getColumns().indexOf(
- getVisibleColumn(focusedCell.getColumn()));
+ focusedColumnIndex = getColumns()
+ .indexOf(getVisibleColumn(focusedCell.getColumn()));
}
- Column<?, T>[] array = reordered.toArray(new Column[reordered
- .size()]);
+ Column<?, T>[] array = reordered
+ .toArray(new Column[reordered.size()]);
setColumnOrder(array);
transferCellFocusOnDrop();
} // else no reordering
@@ -4394,11 +4416,11 @@ public class Grid<T> extends ResizeComposite implements
.findRowContainer(focusedCell.getElement());
if (focusedColumnIndex == draggedColumnIndex) {
// move with the dragged column
- int adjustedDropIndex = latestColumnDropIndex > draggedColumnIndex ? latestColumnDropIndex - 1
- : latestColumnDropIndex;
+ int adjustedDropIndex = latestColumnDropIndex > draggedColumnIndex
+ ? latestColumnDropIndex - 1 : latestColumnDropIndex;
// remove hidden columns from indexing
- adjustedDropIndex = getVisibleColumns().indexOf(
- getColumn(adjustedDropIndex));
+ adjustedDropIndex = getVisibleColumns()
+ .indexOf(getColumn(adjustedDropIndex));
cellFocusHandler.setCellFocus(focusedRowIndex,
adjustedDropIndex, rowContainer);
} else if (latestColumnDropIndex <= focusedColumnIndex
@@ -4456,8 +4478,8 @@ public class Grid<T> extends ResizeComposite implements
possibleDropPositions.clear();
final int draggedColumnIndex = eventCell.getColumnIndex();
- final StaticRow<?> draggedCellRow = header.getRow(eventCell
- .getRowIndex());
+ final StaticRow<?> draggedCellRow = header
+ .getRow(eventCell.getRowIndex());
final int draggedColumnRightIndex = draggedColumnIndex
+ draggedCellRow.getCell(eventCell.getColumn())
.getColspan();
@@ -4606,10 +4628,10 @@ public class Grid<T> extends ResizeComposite implements
/**
* Base class for grid columns internally used by the Grid. The user should
* use {@link Column} when creating new columns.
- *
+ *
* @param <C>
* the column type
- *
+ *
* @param <T>
* the row type
*/
@@ -4627,9 +4649,8 @@ public class Grid<T> extends ResizeComposite implements
@Override
public void render(RendererCellReference cell, Object data) {
if (!warned && !(data instanceof String)) {
- getLogger().warning(
- Column.this.toString() + ": "
- + DEFAULT_RENDERER_WARNING);
+ getLogger().warning(Column.this.toString() + ": "
+ + DEFAULT_RENDERER_WARNING);
warned = true;
}
@@ -4687,10 +4708,10 @@ public class Grid<T> extends ResizeComposite implements
/**
* Constructs a new column with a simple TextRenderer.
- *
+ *
* @param caption
* The header caption for this column
- *
+ *
* @throws IllegalArgumentException
* if given header caption is null
*/
@@ -4701,10 +4722,10 @@ public class Grid<T> extends ResizeComposite implements
/**
* Constructs a new column with a custom renderer.
- *
+ *
* @param renderer
* The renderer to use for rendering the cells
- *
+ *
* @throws IllegalArgumentException
* if given Renderer is null
*/
@@ -4715,12 +4736,12 @@ public class Grid<T> extends ResizeComposite implements
/**
* Constructs a new column with a custom renderer.
- *
+ *
* @param renderer
* The renderer to use for rendering the cells
* @param caption
* The header caption for this column
- *
+ *
* @throws IllegalArgumentException
* if given Renderer or header caption is null
*/
@@ -4732,7 +4753,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Internally used by the grid to set itself
- *
+ *
* @param grid
*/
private void setGrid(Grid<T> grid) {
@@ -4754,11 +4775,11 @@ public class Grid<T> extends ResizeComposite implements
/**
* Sets a header caption for this column.
- *
+ *
* @param caption
* The header caption for this column
* @return the column itself
- *
+ *
*/
public Column<C, T> setHeaderCaption(String caption) {
if (caption == null) {
@@ -4777,7 +4798,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Returns the current header caption for this column
- *
+ *
* @since 7.6
* @return the header caption string
*/
@@ -4802,10 +4823,10 @@ public class Grid<T> extends ResizeComposite implements
* <p>
* To support other types you will need to pass a custom renderer to the
* column via the column constructor.
- *
+ *
* @param row
* The row object that provides the cell content.
- *
+ *
* @return The cell content
*/
public abstract C getValue(T row);
@@ -4814,7 +4835,7 @@ public class Grid<T> extends ResizeComposite implements
* The renderer to render the cell with. By default renders the data as
* a String or adds the widget into the cell if the column type is of
* widget type.
- *
+ *
* @return The renderer to render the cell content with
*/
public Renderer<? super C> getRenderer() {
@@ -4823,11 +4844,11 @@ public class Grid<T> extends ResizeComposite implements
/**
* Sets a custom {@link Renderer} for this column.
- *
+ *
* @param renderer
* The renderer to use for rendering the cells
* @return the column itself
- *
+ *
* @throws IllegalArgumentException
* if given Renderer is null
*/
@@ -4844,8 +4865,8 @@ public class Grid<T> extends ResizeComposite implements
ColumnConfiguration conf = null;
int index = 0;
- if (grid != null
- && (bodyRenderer instanceof WidgetRenderer || renderer instanceof WidgetRenderer)) {
+ if (grid != null && (bodyRenderer instanceof WidgetRenderer
+ || renderer instanceof WidgetRenderer)) {
// Column needs to be recreated.
index = grid.getColumns().indexOf(this);
conf = grid.escalator.getColumnConfiguration();
@@ -4885,7 +4906,7 @@ public class Grid<T> extends ResizeComposite implements
* <p>
* If the column is currently {@link #isHidden() hidden}, then this set
* width has effect only once the column has been made visible again.
- *
+ *
* @param pixels
* the width in pixels or negative for auto sizing
*/
@@ -4917,7 +4938,7 @@ public class Grid<T> extends ResizeComposite implements
* <p>
* <em>Note:</em> Returns the value, even if the column is currently
* {@link #isHidden() hidden}.
- *
+ *
* @return pixel width of the column, or a negative number if the column
* width has been automatically calculated.
* @see #setWidth(double)
@@ -4933,16 +4954,15 @@ public class Grid<T> extends ResizeComposite implements
* This differs from {@link #getWidth()} only when the column has been
* automatically resized, or when the column is currently
* {@link #isHidden() hidden}, when the value is 0.
- *
+ *
* @return pixel width of the column.
*/
public double getWidthActual() {
if (isHidden()) {
return 0;
}
- return grid.escalator.getColumnConfiguration()
- .getColumnWidthActual(
- grid.getVisibleColumns().indexOf(this));
+ return grid.escalator.getColumnConfiguration().getColumnWidthActual(
+ grid.getVisibleColumns().indexOf(this));
}
void reapplyWidth() {
@@ -4954,7 +4974,7 @@ public class Grid<T> extends ResizeComposite implements
* be sorted by a sortable column by clicking or tapping the column's
* default header. Programmatic sorting using the Grid#sort methods is
* not affected by this setting.
- *
+ *
* @param sortable
* {@code true} if the user should be able to sort the
* column, {@code false} otherwise
@@ -4975,7 +4995,7 @@ public class Grid<T> extends ResizeComposite implements
* <p>
* <em>Note:</em> it is possible to sort by this column programmatically
* using the Grid#sort methods regardless of the returned value.
- *
+ *
* @return {@code true} if the column is sortable by the user,
* {@code false} otherwise
*/
@@ -4985,9 +5005,9 @@ public class Grid<T> extends ResizeComposite implements
/**
* Sets whether this column can be resized by the user.
- *
+ *
* @since 7.6
- *
+ *
* @param resizable
* {@code true} if this column should be resizable,
* {@code false} otherwise
@@ -5009,9 +5029,9 @@ public class Grid<T> extends ResizeComposite implements
* <em>Note:</em> the column can be programmatically resized using
* {@link #setWidth(double)} and {@link #setWidthUndefined()} regardless
* of the returned value.
- *
+ *
* @since 7.6
- *
+ *
* @return {@code true} if this column is resizable, {@code false}
* otherwise
*/
@@ -5022,7 +5042,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Hides or shows the column. By default columns are visible before
* explicitly hiding them.
- *
+ *
* @since 7.5.0
* @param hidden
* <code>true</code> to hide the column, <code>false</code>
@@ -5042,10 +5062,10 @@ public class Grid<T> extends ResizeComposite implements
} else {
this.hidden = hidden;
- final int columnIndex = grid.getVisibleColumns().indexOf(
- this);
- grid.escalator.getColumnConfiguration().insertColumns(
- columnIndex, 1);
+ final int columnIndex = grid.getVisibleColumns()
+ .indexOf(this);
+ grid.escalator.getColumnConfiguration()
+ .insertColumns(columnIndex, 1);
// make sure column is set to frozen if it needs to be,
// escalator doesn't handle situation where the added column
@@ -5070,7 +5090,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Returns whether this column is hidden. Default is {@code false}.
- *
+ *
* @since 7.5.0
* @return {@code true} if the column is currently hidden, {@code false}
* otherwise
@@ -5085,7 +5105,7 @@ public class Grid<T> extends ResizeComposite implements
* <p>
* <em>Note:</em> it is still possible to hide the column
* programmatically using {@link #setHidden(boolean)}.
- *
+ *
* @since 7.5.0
* @param hidable
* {@code true} the user can hide this column, {@code false}
@@ -5105,7 +5125,7 @@ public class Grid<T> extends ResizeComposite implements
* <p>
* <em>Note:</em> the column can be programmatically hidden using
* {@link #setHidden(boolean)} regardless of the returned value.
- *
+ *
* @since 7.5.0
* @return <code>true</code> if the user can hide the column,
* <code>false</code> if not
@@ -5121,7 +5141,7 @@ public class Grid<T> extends ResizeComposite implements
* <p>
* The default value is <code>null</code>. In this case the header
* caption is used, see {@link #setHeaderCaption(String)}.
- *
+ *
* @since 7.5.0
* @param hidingToggleCaption
* the caption for the hiding toggle for this column
@@ -5136,7 +5156,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Gets the hiding toggle caption for this column.
- *
+ *
* @since 7.5.0
* @see #setHidingToggleCaption(String)
* @return the hiding toggle's caption for this column
@@ -5180,7 +5200,7 @@ public class Grid<T> extends ResizeComposite implements
* This action is done "finally", once the current execution loop
* returns. This is done to reduce overhead of unintentionally always
* recalculate all columns, when modifying several columns at once.
- *
+ *
* @param pixels
* the minimum width
* @return this column
@@ -5203,13 +5223,13 @@ public class Grid<T> extends ResizeComposite implements
/**
* Sets the maximum width for this column.
* <p>
- * This defines the maximum allowed pixel width of the column
- * <em>when it is set to expand</em>.
+ * This defines the maximum allowed pixel width of the column <em>when
+ * it is set to expand</em>.
* <p>
* This action is done "finally", once the current execution loop
* returns. This is done to reduce overhead of unintentionally always
* recalculate all columns, when modifying several columns at once.
- *
+ *
* @param pixels
* the maximum width
* @param immediately
@@ -5257,7 +5277,7 @@ public class Grid<T> extends ResizeComposite implements
* This action is done "finally", once the current execution loop
* returns. This is done to reduce overhead of unintentionally always
* recalculate all columns, when modifying several columns at once.
- *
+ *
* @param expandRatio
* the expand ratio of this column. {@code 0} to not have it
* expand at all. A negative number to clear the expand
@@ -5276,7 +5296,7 @@ public class Grid<T> extends ResizeComposite implements
* Clears the column's expand ratio.
* <p>
* Same as calling {@link #setExpandRatio(int) setExpandRatio(-1)}
- *
+ *
* @return this column
*/
public Column<C, T> clearExpandRatio() {
@@ -5285,7 +5305,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Gets the minimum width for this column.
- *
+ *
* @return the minimum width for this column
* @see #setMinimumWidth(double)
*/
@@ -5295,7 +5315,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Gets the maximum width for this column.
- *
+ *
* @return the maximum width for this column
* @see #setMaximumWidth(double)
*/
@@ -5305,7 +5325,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Gets the expand ratio for this column.
- *
+ *
* @return the expand ratio for this column
* @see #setExpandRatio(int)
*/
@@ -5316,15 +5336,15 @@ public class Grid<T> extends ResizeComposite implements
/**
* Sets whether the values in this column should be editable by the user
* when the row editor is active. By default columns are editable.
- *
+ *
* @param editable
* {@code true} to set this column editable, {@code false}
* otherwise
* @return this column
- *
+ *
* @throws IllegalStateException
* if the editor is currently active
- *
+ *
* @see Grid#editRow(int)
* @see Grid#isEditorActive()
*/
@@ -5340,10 +5360,10 @@ public class Grid<T> extends ResizeComposite implements
/**
* Returns whether the values in this column are editable by the user
* when the row editor is active.
- *
+ *
* @return {@code true} if this column is editable, {@code false}
* otherwise
- *
+ *
* @see #setEditable(boolean)
*/
public boolean isEditable() {
@@ -5356,7 +5376,7 @@ public class Grid<T> extends ResizeComposite implements
} else {
/*
* NOOP
- *
+ *
* Since setGrid() will call reapplyWidths as the colum is
* attached to a grid, it will call setWidth, which, in turn,
* will call this method again. Therefore, it's guaranteed that
@@ -5368,7 +5388,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Resets the default header cell contents to column header captions.
- *
+ *
* @since 7.5.1
* @param cell
* default header cell for this column
@@ -5389,16 +5409,17 @@ public class Grid<T> extends ResizeComposite implements
Renderer<?> renderer = findRenderer(cell);
if (renderer instanceof ComplexRenderer) {
try {
- Column<?, T> column = getVisibleColumn(cell.getColumn());
+ Column<?, T> column = getVisibleColumn(
+ cell.getColumn());
rendererCellReference.set(cell,
getColumns().indexOf(column), column);
((ComplexRenderer<?>) renderer)
.init(rendererCellReference);
} catch (RuntimeException e) {
- getLogger().log(
- Level.SEVERE,
+ getLogger().log(Level.SEVERE,
"Error initing cell in column "
- + cell.getColumn(), e);
+ + cell.getColumn(),
+ e);
}
}
}
@@ -5414,8 +5435,10 @@ public class Grid<T> extends ResizeComposite implements
Widget widget = widgetRenderer.createWidget();
assert widget != null : "WidgetRenderer.createWidget() returned null. It should return a widget.";
- assert widget.getParent() == null : "WidgetRenderer.createWidget() returned a widget which already is attached.";
- assert cell.getElement().getChildCount() == 0 : "Cell content should be empty when adding Widget";
+ assert widget
+ .getParent() == null : "WidgetRenderer.createWidget() returned a widget which already is attached.";
+ assert cell.getElement()
+ .getChildCount() == 0 : "Cell content should be empty when adding Widget";
// Physical attach
cell.getElement().appendChild(widget.getElement());
@@ -5423,10 +5446,10 @@ public class Grid<T> extends ResizeComposite implements
// Logical attach
setParent(widget, Grid.this);
} catch (RuntimeException e) {
- getLogger().log(
- Level.SEVERE,
+ getLogger().log(Level.SEVERE,
"Error attaching child widget in column "
- + cell.getColumn(), e);
+ + cell.getColumn(),
+ e);
}
}
}
@@ -5469,10 +5492,10 @@ public class Grid<T> extends ResizeComposite implements
.getStyle(rowReference);
setCustomStyleName(rowElement, rowStylename);
} catch (RuntimeException e) {
- getLogger().log(
- Level.SEVERE,
+ getLogger().log(Level.SEVERE,
"Error generating styles for row "
- + row.getRow(), e);
+ + row.getRow(),
+ e);
}
} else {
// Remove in case there was a generator previously
@@ -5498,16 +5521,16 @@ public class Grid<T> extends ResizeComposite implements
if (hasData && cellStyleGenerator != null) {
try {
- cellReference
- .set(cell.getColumn(), columnIndex, column);
+ cellReference.set(cell.getColumn(), columnIndex,
+ column);
String generatedStyle = cellStyleGenerator
.getStyle(cellReference);
setCustomStyleName(cell.getElement(), generatedStyle);
} catch (RuntimeException e) {
- getLogger().log(
- Level.SEVERE,
+ getLogger().log(Level.SEVERE,
"Error generating style for cell in column "
- + cell.getColumn(), e);
+ + cell.getColumn(),
+ e);
}
} else if (hasData || usedToHaveData) {
setCustomStyleName(cell.getElement(), null);
@@ -5532,8 +5555,8 @@ public class Grid<T> extends ResizeComposite implements
} else {
// Prepare cell for no data
- clxRenderer.setContentVisible(
- rendererCellReference, false);
+ clxRenderer.setContentVisible(rendererCellReference,
+ false);
}
} else if (hasData) {
@@ -5546,10 +5569,10 @@ public class Grid<T> extends ResizeComposite implements
cell.getElement().removeAllChildren();
}
} catch (RuntimeException e) {
- getLogger().log(
- Level.SEVERE,
+ getLogger().log(Level.SEVERE,
"Error rendering cell in column "
- + cell.getColumn(), e);
+ + cell.getColumn(),
+ e);
}
}
}
@@ -5560,8 +5583,8 @@ public class Grid<T> extends ResizeComposite implements
Renderer<?> renderer = findRenderer(cell);
if (renderer instanceof WidgetRenderer) {
try {
- Widget w = WidgetUtil.findWidget(cell.getElement()
- .getFirstChildElement(), null);
+ Widget w = WidgetUtil.findWidget(
+ cell.getElement().getFirstChildElement(), null);
if (w != null) {
// Logical detach
@@ -5571,10 +5594,10 @@ public class Grid<T> extends ResizeComposite implements
cell.getElement().removeChild(w.getElement());
}
} catch (RuntimeException e) {
- getLogger().log(
- Level.SEVERE,
+ getLogger().log(Level.SEVERE,
"Error detaching widget in column "
- + cell.getColumn(), e);
+ + cell.getColumn(),
+ e);
}
}
}
@@ -5590,16 +5613,17 @@ public class Grid<T> extends ResizeComposite implements
Renderer<?> renderer = findRenderer(cell);
if (renderer instanceof ComplexRenderer) {
try {
- Column<?, T> column = getVisibleColumn(cell.getColumn());
+ Column<?, T> column = getVisibleColumn(
+ cell.getColumn());
rendererCellReference.set(cell,
getColumns().indexOf(column), column);
((ComplexRenderer) renderer)
.destroy(rendererCellReference);
} catch (RuntimeException e) {
- getLogger().log(
- Level.SEVERE,
+ getLogger().log(Level.SEVERE,
"Error destroying cell in column "
- + cell.getColumn(), e);
+ + cell.getColumn(),
+ e);
}
}
}
@@ -5631,7 +5655,8 @@ public class Grid<T> extends ResizeComposite implements
// Decorate default row with sorting indicators
if (staticRow instanceof HeaderRow) {
- addSortingIndicatorsToHeaderRow((HeaderRow) staticRow, cell);
+ addSortingIndicatorsToHeaderRow((HeaderRow) staticRow,
+ cell);
}
// Assign colspan to cell before rendering
@@ -5660,10 +5685,8 @@ public class Grid<T> extends ResizeComposite implements
content.setClassName(getStylePrimaryName()
+ "-column-footer-content");
} else {
- getLogger().severe(
- "Unhandled static row type "
- + staticRow.getClass()
- .getCanonicalName());
+ getLogger().severe("Unhandled static row type "
+ + staticRow.getClass().getCanonicalName());
}
td.appendChild(content);
@@ -5693,11 +5716,12 @@ public class Grid<T> extends ResizeComposite implements
&& ((HeaderRow) staticRow).isDefault()) {
final int column = cell.getColumn();
- DragHandle dragger = new DragHandle(getStylePrimaryName()
- + "-column-resize-handle",
+ DragHandle dragger = new DragHandle(
+ getStylePrimaryName() + "-column-resize-handle",
new DragHandleCallback() {
- private Column<?, T> col = getVisibleColumn(column);
+ private Column<?, T> col = getVisibleColumn(
+ column);
private double initialWidth = 0;
private double minCellWidth;
@@ -5712,9 +5736,8 @@ public class Grid<T> extends ResizeComposite implements
public void onStart() {
initialWidth = col.getWidthActual();
- minCellWidth = escalator
- .getMinCellWidth(getVisibleColumns()
- .indexOf(col));
+ minCellWidth = escalator.getMinCellWidth(
+ getVisibleColumns().indexOf(col));
for (Column<?, T> c : getVisibleColumns()) {
if (selectionColumn == c) {
// Don't modify selection column.
@@ -5804,7 +5827,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Sort indicator requires a bit more space from the cell than normally.
* This method check that the now sorted column has enough width.
- *
+ *
* @param column
* sorted column
*/
@@ -5850,8 +5873,8 @@ public class Grid<T> extends ResizeComposite implements
List<Column<?, T>> columns = getVisibleColumns();
for (FlyweightCell cell : attachedCells) {
- StaticSection.StaticCell metadata = gridRow.getCell(columns
- .get(cell.getColumn()));
+ StaticSection.StaticCell metadata = gridRow
+ .getCell(columns.get(cell.getColumn()));
/*
* If the cell contains widgets that are not currently attached
* then attach them now.
@@ -5869,12 +5892,12 @@ public class Grid<T> extends ResizeComposite implements
@Override
public void preDetach(Row row, Iterable<FlyweightCell> cellsToDetach) {
if (section.getRowCount() > row.getRow()) {
- StaticSection.StaticRow<?> gridRow = section.getRow(row
- .getRow());
+ StaticSection.StaticRow<?> gridRow = section
+ .getRow(row.getRow());
List<Column<?, T>> columns = getVisibleColumns();
for (FlyweightCell cell : cellsToDetach) {
- StaticSection.StaticCell metadata = gridRow.getCell(columns
- .get(cell.getColumn()));
+ StaticSection.StaticCell metadata = gridRow
+ .getCell(columns.get(cell.getColumn()));
if (GridStaticCellType.WIDGET.equals(metadata.getType())
&& metadata.getWidget() != null
@@ -5928,8 +5951,8 @@ public class Grid<T> extends ResizeComposite implements
}
});
- escalator
- .addRowVisibilityChangeHandler(new RowVisibilityChangeHandler() {
+ escalator.addRowVisibilityChangeHandler(
+ new RowVisibilityChangeHandler() {
@Override
public void onRowVisibilityChange(
RowVisibilityChangeEvent event) {
@@ -6038,9 +6061,9 @@ public class Grid<T> extends ResizeComposite implements
* Creates the escalator updater used to update the header rows in this
* grid. The updater is invoked when header rows or columns are added or
* removed, or the content of existing header cells is changed.
- *
+ *
* @return the new header updater instance
- *
+ *
* @see GridHeader
* @see Grid#getHeader()
*/
@@ -6053,7 +6076,7 @@ public class Grid<T> extends ResizeComposite implements
* The updater is invoked when body rows or columns are added or removed,
* the content of body cells is changed, or the body is scrolled to expose
* previously hidden content.
- *
+ *
* @return the new body updater instance
*/
protected EscalatorUpdater createBodyUpdater() {
@@ -6064,9 +6087,9 @@ public class Grid<T> extends ResizeComposite implements
* Creates the escalator updater used to update the footer rows in this
* grid. The updater is invoked when header rows or columns are added or
* removed, or the content of existing header cells is changed.
- *
+ *
* @return the new footer updater instance
- *
+ *
* @see GridFooter
* @see #getFooter()
*/
@@ -6076,7 +6099,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Refreshes header or footer rows on demand
- *
+ *
* @param rows
* The row container
* @param firstRowIsVisible
@@ -6085,7 +6108,8 @@ public class Grid<T> extends ResizeComposite implements
* <code>true</code> if we refreshing the header, else assumed
* the footer
*/
- private void refreshRowContainer(RowContainer rows, StaticSection<?> section) {
+ private void refreshRowContainer(RowContainer rows,
+ StaticSection<?> section) {
// Add or Remove rows on demand
int rowDiff = section.getVisibleRowCount() - rows.getRowCount();
@@ -6103,7 +6127,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Focus a body cell by row and column index.
- *
+ *
* @param rowIndex
* index of row to focus
* @param columnIndex
@@ -6113,10 +6137,11 @@ public class Grid<T> extends ResizeComposite implements
final Range rowRange = Range.between(0, dataSource.size());
final Range columnRange = Range.between(0, getVisibleColumns().size());
- assert rowRange.contains(rowIndex) : "Illegal row index. Should be in range "
- + rowRange;
- assert columnRange.contains(columnIndex) : "Illegal column index. Should be in range "
- + columnRange;
+ assert rowRange.contains(
+ rowIndex) : "Illegal row index. Should be in range " + rowRange;
+ assert columnRange.contains(
+ columnIndex) : "Illegal column index. Should be in range "
+ + columnRange;
if (rowRange.contains(rowIndex) && columnRange.contains(columnIndex)) {
cellFocusHandler.setCellFocus(rowIndex, columnIndex,
@@ -6148,7 +6173,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Adds columns as the last columns in the grid.
- *
+ *
* @param columns
* the columns to add
*/
@@ -6161,7 +6186,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Adds a column as the last column in the grid.
- *
+ *
* @param column
* the column to add
* @return given column
@@ -6173,21 +6198,21 @@ public class Grid<T> extends ResizeComposite implements
/**
* Inserts a column into a specific position in the grid.
- *
+ *
* @param index
* the index where the column should be inserted into
* @param column
* the column to add
* @return given column
- *
+ *
* @throws IllegalStateException
* if Grid's current selection model renders a selection column,
* and {@code index} is 0.
*/
public <C extends Column<?, T>> C addColumn(C column, int index) {
if (column == selectionColumn) {
- throw new IllegalArgumentException("The selection column many "
- + "not be added manually");
+ throw new IllegalArgumentException(
+ "The selection column many " + "not be added manually");
} else if (selectionColumn != null && index == 0) {
throw new IllegalStateException("A column cannot be inserted "
+ "before the selection column");
@@ -6262,7 +6287,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Removes a column from the grid.
- *
+ *
* @param column
* the column to remove
*/
@@ -6279,8 +6304,8 @@ public class Grid<T> extends ResizeComposite implements
int columnIndex = columns.indexOf(column);
// Remove from column configuration
- escalator.getColumnConfiguration().removeColumns(
- getVisibleColumns().indexOf(column), 1);
+ escalator.getColumnConfiguration()
+ .removeColumns(getVisibleColumns().indexOf(column), 1);
updateFrozenColumns();
@@ -6301,7 +6326,7 @@ public class Grid<T> extends ResizeComposite implements
* Returns the amount of columns in the grid.
* <p>
* <em>NOTE:</em> this includes the hidden columns in the count.
- *
+ *
* @return The number of columns in the grid
*/
public int getColumnCount() {
@@ -6312,7 +6337,7 @@ public class Grid<T> extends ResizeComposite implements
* Returns a list columns in the grid, including hidden columns.
* <p>
* For currently visible columns, use {@link #getVisibleColumns()}.
- *
+ *
* @return A unmodifiable list of the columns in the grid
*/
public List<Column<?, T>> getColumns() {
@@ -6324,7 +6349,7 @@ public class Grid<T> extends ResizeComposite implements
* Returns a list of the currently visible columns in the grid.
* <p>
* No {@link Column#isHidden() hidden} columns included.
- *
+ *
* @since 7.5.0
* @return A unmodifiable list of the currently visible columns in the grid
*/
@@ -6342,7 +6367,7 @@ public class Grid<T> extends ResizeComposite implements
* Returns a column by its index in the grid.
* <p>
* <em>NOTE:</em> The indexing includes hidden columns.
- *
+ *
* @param index
* the index of the column
* @return The column in the given index
@@ -6368,7 +6393,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Returns the header section of this grid. The default header contains a
* single row displaying the column captions.
- *
+ *
* @return the header
*/
protected Header getHeader() {
@@ -6377,7 +6402,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Gets the header row at given index.
- *
+ *
* @param rowIndex
* 0 based index for row. Counted from top to bottom
* @return header row at given index
@@ -6392,11 +6417,11 @@ public class Grid<T> extends ResizeComposite implements
* Inserts a new row at the given position to the header section. Shifts the
* row currently at that position and any subsequent rows down (adds one to
* their indices).
- *
+ *
* @param index
* the position at which to insert the row
* @return the new row
- *
+ *
* @throws IllegalArgumentException
* if the index is less than 0 or greater than row count
* @see #appendHeaderRow()
@@ -6410,7 +6435,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Adds a new row at the bottom of the header section.
- *
+ *
* @return the new row
* @see #prependHeaderRow()
* @see #addHeaderRowAt(int)
@@ -6425,7 +6450,7 @@ public class Grid<T> extends ResizeComposite implements
* Returns the current default row of the header section. The default row is
* a special header row providing a user interface for sorting columns.
* Setting a header caption for column updates cells in the default header.
- *
+ *
* @return the default row or null if no default row set
*/
public HeaderRow getDefaultHeaderRow() {
@@ -6434,7 +6459,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Gets the row count for the header section.
- *
+ *
* @return row count
*/
public int getHeaderRowCount() {
@@ -6443,7 +6468,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Adds a new row at the top of the header section.
- *
+ *
* @return the new row
* @see #appendHeaderRow()
* @see #addHeaderRowAt(int)
@@ -6456,10 +6481,10 @@ public class Grid<T> extends ResizeComposite implements
/**
* Removes the given row from the header section.
- *
+ *
* @param row
* the row to be removed
- *
+ *
* @throws IllegalArgumentException
* if the row does not exist in this section
* @see #removeHeaderRow(int)
@@ -6473,10 +6498,10 @@ public class Grid<T> extends ResizeComposite implements
/**
* Removes the row at the given position from the header section.
- *
+ *
* @param index
* the position of the row
- *
+ *
* @throws IllegalArgumentException
* if no row exists at given index
* @see #removeHeaderRow(HeaderRow)
@@ -6494,10 +6519,10 @@ public class Grid<T> extends ResizeComposite implements
* <p>
* Note: Setting the default header row will reset all cell contents to
* Column defaults.
- *
+ *
* @param row
* the new default row, or null for no default row
- *
+ *
* @throws IllegalArgumentException
* header does not contain the row
*/
@@ -6507,7 +6532,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Sets the visibility of the header section.
- *
+ *
* @param visible
* true to show header section, false to hide
*/
@@ -6517,7 +6542,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Returns the visibility of the header section.
- *
+ *
* @return true if visible, false otherwise.
*/
public boolean isHeaderVisible() {
@@ -6528,7 +6553,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Returns the footer section of this grid. The default footer is empty.
- *
+ *
* @return the footer
*/
protected Footer getFooter() {
@@ -6537,7 +6562,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Gets the footer row at given index.
- *
+ *
* @param rowIndex
* 0 based index for row. Counted from top to bottom
* @return footer row at given index
@@ -6552,11 +6577,11 @@ public class Grid<T> extends ResizeComposite implements
* Inserts a new row at the given position to the footer section. Shifts the
* row currently at that position and any subsequent rows down (adds one to
* their indices).
- *
+ *
* @param index
* the position at which to insert the row
* @return the new row
- *
+ *
* @throws IllegalArgumentException
* if the index is less than 0 or greater than row count
* @see #appendFooterRow()
@@ -6570,7 +6595,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Adds a new row at the bottom of the footer section.
- *
+ *
* @return the new row
* @see #prependFooterRow()
* @see #addFooterRowAt(int)
@@ -6583,7 +6608,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Gets the row count for the footer.
- *
+ *
* @return row count
*/
public int getFooterRowCount() {
@@ -6592,7 +6617,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Adds a new row at the top of the footer section.
- *
+ *
* @return the new row
* @see #appendFooterRow()
* @see #addFooterRowAt(int)
@@ -6605,10 +6630,10 @@ public class Grid<T> extends ResizeComposite implements
/**
* Removes the given row from the footer section.
- *
+ *
* @param row
* the row to be removed
- *
+ *
* @throws IllegalArgumentException
* if the row does not exist in this section
* @see #removeFooterRow(int)
@@ -6622,10 +6647,10 @@ public class Grid<T> extends ResizeComposite implements
/**
* Removes the row at the given position from the footer section.
- *
+ *
* @param index
* the position of the row
- *
+ *
* @throws IllegalArgumentException
* if no row exists at given index
* @see #removeFooterRow(FooterRow)
@@ -6639,7 +6664,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Sets the visibility of the footer section.
- *
+ *
* @param visible
* true to show footer section, false to hide
*/
@@ -6649,7 +6674,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Returns the visibility of the footer section.
- *
+ *
* @return true if visible, false otherwise.
*/
public boolean isFooterVisible() {
@@ -6669,7 +6694,7 @@ public class Grid<T> extends ResizeComposite implements
* <p>
* <em>Note:</em> This method will change the widget's size in the browser
* only if {@link #getHeightMode()} returns {@link HeightMode#CSS}.
- *
+ *
* @see #setHeightMode(HeightMode)
*/
@Override
@@ -6684,7 +6709,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Sets the data source used by this grid.
- *
+ *
* @param dataSource
* the data source to use, not null
* @throws IllegalArgumentException
@@ -6743,12 +6768,12 @@ public class Grid<T> extends ResizeComposite implements
if (newSize > oldSize) {
body.insertRows(oldSize, newSize - oldSize);
- cellFocusHandler.rowsAddedToBody(Range.withLength(oldSize,
- newSize - oldSize));
+ cellFocusHandler.rowsAddedToBody(
+ Range.withLength(oldSize, newSize - oldSize));
} else if (newSize < oldSize) {
body.removeRows(newSize, oldSize - newSize);
- cellFocusHandler.rowsRemovedFromBody(Range.withLength(
- newSize, oldSize - newSize));
+ cellFocusHandler.rowsRemovedFromBody(
+ Range.withLength(newSize, oldSize - newSize));
}
if (newSize > 0) {
@@ -6790,7 +6815,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Gets the {@Link DataSource} for this Grid.
- *
+ *
* @return the data source used by this grid
*/
public DataSource<T> getDataSource() {
@@ -6804,10 +6829,10 @@ public class Grid<T> extends ResizeComposite implements
* -1 will also disable the selection column.
* <p>
* The default value is 0.
- *
+ *
* @param numberOfColumns
* the number of columns that should be frozen
- *
+ *
* @throws IllegalArgumentException
* if the column count is < -1 or > the number of visible
* columns
@@ -6824,8 +6849,8 @@ public class Grid<T> extends ResizeComposite implements
}
private void updateFrozenColumns() {
- escalator.getColumnConfiguration().setFrozenColumnCount(
- getVisibleFrozenColumnCount());
+ escalator.getColumnConfiguration()
+ .setFrozenColumnCount(getVisibleFrozenColumnCount());
}
private int getVisibleFrozenColumnCount() {
@@ -6855,7 +6880,7 @@ public class Grid<T> extends ResizeComposite implements
* <p>
* <em>NOTE:</em> This includes {@link Column#isHidden() hidden columns} in
* the count.
- *
+ *
* @return the number of frozen columns
*/
public int getFrozenColumnCount() {
@@ -6877,7 +6902,7 @@ public class Grid<T> extends ResizeComposite implements
* <p>
* If the details for that row are visible, those will be taken into account
* as well.
- *
+ *
* @param rowIndex
* zero-based index of the row to scroll to.
* @throws IllegalArgumentException
@@ -6894,7 +6919,7 @@ public class Grid<T> extends ResizeComposite implements
* <p>
* If the details for that row are visible, those will be taken into account
* as well.
- *
+ *
* @param rowIndex
* zero-based index of the row to scroll to.
* @param destination
@@ -6916,7 +6941,7 @@ public class Grid<T> extends ResizeComposite implements
* <p>
* If the details for that row are visible, those will be taken into account
* as well.
- *
+ *
* @param rowIndex
* zero-based index of the row to scroll to.
* @param destination
@@ -6936,8 +6961,8 @@ public class Grid<T> extends ResizeComposite implements
int maxsize = escalator.getBody().getRowCount() - 1;
if (rowIndex < 0) {
- throw new IllegalArgumentException("Row index (" + rowIndex
- + ") is below zero!");
+ throw new IllegalArgumentException(
+ "Row index (" + rowIndex + ") is below zero!");
}
if (rowIndex > maxsize) {
@@ -6965,7 +6990,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Sets the vertical scroll offset.
- *
+ *
* @param px
* the number of pixels this grid should be scrolled down
*/
@@ -6975,7 +7000,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Gets the vertical scroll offset
- *
+ *
* @return the number of pixels this grid is scrolled down
*/
public double getScrollTop() {
@@ -6984,7 +7009,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Sets the horizontal scroll offset
- *
+ *
* @since 7.5.0
* @param px
* the number of pixels this grid should be scrolled right
@@ -6995,7 +7020,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Gets the horizontal scroll offset
- *
+ *
* @return the number of pixels this grid is scrolled to the right
*/
public double getScrollLeft() {
@@ -7004,7 +7029,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Returns the height of the scrollable area in pixels.
- *
+ *
* @since 7.5.0
* @return the height of the scrollable area in pixels
*/
@@ -7014,7 +7039,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Returns the width of the scrollable area in pixels.
- *
+ *
* @since 7.5.0
* @return the width of the scrollable area in pixels.
*/
@@ -7032,7 +7057,7 @@ public class Grid<T> extends ResizeComposite implements
* <p>
* If Grid is currently not in {@link HeightMode#ROW}, the given value is
* remembered, and applied once the mode is applied.
- *
+ *
* @param rows
* The height in terms of number of rows displayed in Grid's
* body. If Grid doesn't contain enough rows, white space is
@@ -7044,7 +7069,7 @@ public class Grid<T> extends ResizeComposite implements
* infinite}
* @throws IllegalArgumentException
* if {@code rows} is {@link Double#isNaN(double) NaN}
- *
+ *
* @see #setHeightMode(HeightMode)
*/
public void setHeightByRows(double rows) throws IllegalArgumentException {
@@ -7056,7 +7081,7 @@ public class Grid<T> extends ResizeComposite implements
* {@link #getHeightMode()} is {@link HeightMode#ROW}.
* <p>
* By default, it is {@value Escalator#DEFAULT_HEIGHT_BY_ROWS}.
- *
+ *
* @return the amount of rows that should be shown in Grid's body, while in
* {@link HeightMode#ROW}.
* @see #setHeightByRows(double)
@@ -7076,7 +7101,7 @@ public class Grid<T> extends ResizeComposite implements
* <em>Note:</em> If headers/footers are inserted or removed, the widget
* will resize itself to still display the required amount of rows in its
* body. It also takes the horizontal scrollbar into account.
- *
+ *
* @param heightMode
* the mode in to which Grid should be set
*/
@@ -7086,7 +7111,7 @@ public class Grid<T> extends ResizeComposite implements
* widget dimensions (height/width) on each state change event. The
* original design was to have setHeight an setHeightByRow be equals,
* and whichever was called the latest was considered in effect.
- *
+ *
* But, because of Vaadin always calling setHeight on the widget, this
* approach doesn't work.
*/
@@ -7098,7 +7123,7 @@ public class Grid<T> extends ResizeComposite implements
* Returns the current {@link HeightMode} the Grid is in.
* <p>
* Defaults to {@link HeightMode#CSS}.
- *
+ *
* @return the current HeightMode
*/
public HeightMode getHeightMode() {
@@ -7296,7 +7321,8 @@ public class Grid<T> extends ResizeComposite implements
if (gridColumn.getRenderer() instanceof ComplexRenderer) {
ComplexRenderer<?> cplxRenderer = (ComplexRenderer<?>) gridColumn
.getRenderer();
- if (cplxRenderer.getConsumedEvents().contains(event.getType())) {
+ if (cplxRenderer.getConsumedEvents()
+ .contains(event.getType())) {
if (cplxRenderer.onBrowserEvent(eventCell, event)) {
return true;
}
@@ -7395,10 +7421,10 @@ public class Grid<T> extends ResizeComposite implements
event.preventDefault();
Touch touch = event.getChangedTouches().get(0);
- double diffX = Math.abs(touch.getClientX()
- - rowEventTouchStartingPoint.getX());
- double diffY = Math.abs(touch.getClientY()
- - rowEventTouchStartingPoint.getY());
+ double diffX = Math.abs(
+ touch.getClientX() - rowEventTouchStartingPoint.getX());
+ double diffY = Math.abs(
+ touch.getClientY() - rowEventTouchStartingPoint.getY());
// Cancel long tap if finger strays too far from
// starting point
@@ -7444,7 +7470,8 @@ public class Grid<T> extends ResizeComposite implements
@Override
@SuppressWarnings("deprecation")
- public com.google.gwt.user.client.Element getSubPartElement(String subPart) {
+ public com.google.gwt.user.client.Element getSubPartElement(
+ String subPart) {
/*
* handles details[] (translated to spacer[] for Escalator), cell[],
@@ -7452,17 +7479,16 @@ public class Grid<T> extends ResizeComposite implements
*/
// "#header[0][0]/DRAGhANDLE"
- Element escalatorElement = escalator.getSubPartElement(subPart
- .replaceFirst("^details\\[", "spacer["));
+ Element escalatorElement = escalator.getSubPartElement(
+ subPart.replaceFirst("^details\\[", "spacer["));
if (escalatorElement != null) {
int detailIdx = subPart.indexOf("/");
if (detailIdx > 0) {
String detail = subPart.substring(detailIdx + 1);
- getLogger().severe(
- "Looking up detail from index " + detailIdx
- + " onward: \"" + detail + "\"");
+ getLogger().severe("Looking up detail from index " + detailIdx
+ + " onward: \"" + detail + "\"");
if (detail.equalsIgnoreCase("content")) {
// XXX: Fix this to look up by class name!
return DOM.asOld(Element.as(escalatorElement.getChild(0)));
@@ -7516,7 +7542,8 @@ public class Grid<T> extends ResizeComposite implements
@Override
@SuppressWarnings("deprecation")
- public String getSubPartName(com.google.gwt.user.client.Element subElement) {
+ public String getSubPartName(
+ com.google.gwt.user.client.Element subElement) {
String escalatorStructureName = escalator.getSubPartName(subElement);
if (escalatorStructureName != null) {
@@ -7540,7 +7567,8 @@ public class Grid<T> extends ResizeComposite implements
int i = 0;
for (Column<?, T> column : columns) {
- if (editor.getWidget(column).getElement().isOrHasChild(subElement)) {
+ if (editor.getWidget(column).getElement()
+ .isOrHasChild(subElement)) {
return "editor[" + i + "]";
}
++i;
@@ -7591,7 +7619,7 @@ public class Grid<T> extends ResizeComposite implements
* Sets the current selection model.
* <p>
* This function will call {@link SelectionModel#setGrid(Grid)}.
- *
+ *
* @param selectionModel
* a selection model implementation.
* @throws IllegalArgumentException
@@ -7610,8 +7638,8 @@ public class Grid<T> extends ResizeComposite implements
this.selectionModel = selectionModel;
selectionModel.setGrid(this);
- setSelectColumnRenderer(this.selectionModel
- .getSelectionColumnRenderer());
+ setSelectColumnRenderer(
+ this.selectionModel.getSelectionColumnRenderer());
// Refresh rendered rows to update selection, if it has changed
refreshBody();
@@ -7619,7 +7647,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Gets a reference to the current selection model.
- *
+ *
* @return the currently used SelectionModel instance.
*/
public SelectionModel<T> getSelectionModel() {
@@ -7630,7 +7658,7 @@ public class Grid<T> extends ResizeComposite implements
* Sets current selection mode.
* <p>
* This is a shorthand method for {@link Grid#setSelectionModel}.
- *
+ *
* @param mode
* a selection mode value
* @see {@link SelectionMode}.
@@ -7642,7 +7670,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Test if a row is selected.
- *
+ *
* @param row
* a row object
* @return true, if the current selection model considers the provided row
@@ -7658,7 +7686,7 @@ public class Grid<T> extends ResizeComposite implements
* Only selection models implementing {@link SelectionModel.Single} and
* {@link SelectionModel.Multi} are supported; for anything else, an
* exception will be thrown.
- *
+ *
* @param row
* a row object
* @return <code>true</code> iff the current selection changed
@@ -7683,7 +7711,7 @@ public class Grid<T> extends ResizeComposite implements
* Only selection models implementing {@link SelectionModel.Single} and
* {@link SelectionModel.Multi} are supported; for anything else, an
* exception will be thrown.
- *
+ *
* @param row
* a row object
* @return <code>true</code> iff the current selection changed
@@ -7704,7 +7732,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Deselect all rows using the current selection model.
- *
+ *
* @param row
* a row object
* @return <code>true</code> iff the current selection changed
@@ -7733,7 +7761,7 @@ public class Grid<T> extends ResizeComposite implements
* Only selection models implementing {@link SelectionModel.Single} are
* valid for this method; for anything else, use the
* {@link Grid#getSelectedRows()} method.
- *
+ *
* @return a selected row reference, or null, if no row is selected
* @throws IllegalStateException
* if the current selection model is not an instance of
@@ -7750,7 +7778,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Gets currently selected rows from the current selection model.
- *
+ *
* @return a non-null collection containing all currently selected rows.
*/
public Collection<T> getSelectedRows() {
@@ -7766,7 +7794,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Sets the current sort order using the fluid Sort API. Read the
* documentation for {@link Sort} for more information.
- *
+ *
* @param s
* a sort instance
*/
@@ -7776,7 +7804,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Sorts the Grid data in ascending order along one column.
- *
+ *
* @param column
* a grid column reference
*/
@@ -7786,7 +7814,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Sorts the Grid data along one column.
- *
+ *
* @param column
* a grid column reference
* @param direction
@@ -7799,7 +7827,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Sets the sort order to use. Setting this causes the Grid to re-sort
* itself.
- *
+ *
* @param order
* a sort order list. If set to null, the sort order is cleared.
*/
@@ -7827,7 +7855,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Get a copy of the current sort order array.
- *
+ *
* @return a copy of the current sort order array
*/
public List<SortOrder> getSortOrder() {
@@ -7850,7 +7878,7 @@ public class Grid<T> extends ResizeComposite implements
* Register a GWT event handler for a sorting event. This handler gets
* called whenever this Grid needs its data source to provide data sorted in
* a specific order.
- *
+ *
* @param handler
* a sort event handler
* @return the registration for the event
@@ -7862,11 +7890,12 @@ public class Grid<T> extends ResizeComposite implements
/**
* Register a GWT event handler for a select all event. This handler gets
* called whenever Grid needs all rows selected.
- *
+ *
* @param handler
* a select all event handler
*/
- public HandlerRegistration addSelectAllHandler(SelectAllHandler<T> handler) {
+ public HandlerRegistration addSelectAllHandler(
+ SelectAllHandler<T> handler) {
return addHandler(handler, SelectAllEvent.getType());
}
@@ -7877,7 +7906,7 @@ public class Grid<T> extends ResizeComposite implements
* <p>
* This handle will be fired with the current available data after
* registration is done.
- *
+ *
* @param handler
* a data available event handler
* @return the registartion for the event
@@ -7889,8 +7918,8 @@ public class Grid<T> extends ResizeComposite implements
@Override
public void execute() {
if (!dataIsBeingFetched) {
- handler.onDataAvailable(new DataAvailableEvent(
- currentDataAvailable));
+ handler.onDataAvailable(
+ new DataAvailableEvent(currentDataAvailable));
}
}
});
@@ -7901,12 +7930,13 @@ public class Grid<T> extends ResizeComposite implements
* Register a BodyKeyDownHandler to this Grid. The event for this handler is
* fired when a KeyDown event occurs while cell focus is in the Body of this
* Grid.
- *
+ *
* @param handler
* the key handler to register
* @return the registration for the event
*/
- public HandlerRegistration addBodyKeyDownHandler(BodyKeyDownHandler handler) {
+ public HandlerRegistration addBodyKeyDownHandler(
+ BodyKeyDownHandler handler) {
return addHandler(handler, keyDown.getAssociatedType());
}
@@ -7914,7 +7944,7 @@ public class Grid<T> extends ResizeComposite implements
* Register a BodyKeyUpHandler to this Grid. The event for this handler is
* fired when a KeyUp event occurs while cell focus is in the Body of this
* Grid.
- *
+ *
* @param handler
* the key handler to register
* @return the registration for the event
@@ -7927,7 +7957,7 @@ public class Grid<T> extends ResizeComposite implements
* Register a BodyKeyPressHandler to this Grid. The event for this handler
* is fired when a KeyPress event occurs while cell focus is in the Body of
* this Grid.
- *
+ *
* @param handler
* the key handler to register
* @return the registration for the event
@@ -7941,7 +7971,7 @@ public class Grid<T> extends ResizeComposite implements
* Register a HeaderKeyDownHandler to this Grid. The event for this handler
* is fired when a KeyDown event occurs while cell focus is in the Header of
* this Grid.
- *
+ *
* @param handler
* the key handler to register
* @return the registration for the event
@@ -7955,12 +7985,13 @@ public class Grid<T> extends ResizeComposite implements
* Register a HeaderKeyUpHandler to this Grid. The event for this handler is
* fired when a KeyUp event occurs while cell focus is in the Header of this
* Grid.
- *
+ *
* @param handler
* the key handler to register
* @return the registration for the event
*/
- public HandlerRegistration addHeaderKeyUpHandler(HeaderKeyUpHandler handler) {
+ public HandlerRegistration addHeaderKeyUpHandler(
+ HeaderKeyUpHandler handler) {
return addHandler(handler, keyUp.getAssociatedType());
}
@@ -7968,7 +7999,7 @@ public class Grid<T> extends ResizeComposite implements
* Register a HeaderKeyPressHandler to this Grid. The event for this handler
* is fired when a KeyPress event occurs while cell focus is in the Header
* of this Grid.
- *
+ *
* @param handler
* the key handler to register
* @return the registration for the event
@@ -7982,7 +8013,7 @@ public class Grid<T> extends ResizeComposite implements
* Register a FooterKeyDownHandler to this Grid. The event for this handler
* is fired when a KeyDown event occurs while cell focus is in the Footer of
* this Grid.
- *
+ *
* @param handler
* the key handler to register
* @return the registration for the event
@@ -7996,12 +8027,13 @@ public class Grid<T> extends ResizeComposite implements
* Register a FooterKeyUpHandler to this Grid. The event for this handler is
* fired when a KeyUp event occurs while cell focus is in the Footer of this
* Grid.
- *
+ *
* @param handler
* the key handler to register
* @return the registration for the event
*/
- public HandlerRegistration addFooterKeyUpHandler(FooterKeyUpHandler handler) {
+ public HandlerRegistration addFooterKeyUpHandler(
+ FooterKeyUpHandler handler) {
return addHandler(handler, keyUp.getAssociatedType());
}
@@ -8009,7 +8041,7 @@ public class Grid<T> extends ResizeComposite implements
* Register a FooterKeyPressHandler to this Grid. The event for this handler
* is fired when a KeyPress event occurs while cell focus is in the Footer
* of this Grid.
- *
+ *
* @param handler
* the key handler to register
* @return the registration for the event
@@ -8022,7 +8054,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Register a BodyClickHandler to this Grid. The event for this handler is
* fired when a Click event occurs in the Body of this Grid.
- *
+ *
* @param handler
* the click handler to register
* @return the registration for the event
@@ -8034,24 +8066,26 @@ public class Grid<T> extends ResizeComposite implements
/**
* Register a HeaderClickHandler to this Grid. The event for this handler is
* fired when a Click event occurs in the Header of this Grid.
- *
+ *
* @param handler
* the click handler to register
* @return the registration for the event
*/
- public HandlerRegistration addHeaderClickHandler(HeaderClickHandler handler) {
+ public HandlerRegistration addHeaderClickHandler(
+ HeaderClickHandler handler) {
return addHandler(handler, clickEvent.getAssociatedType());
}
/**
* Register a FooterClickHandler to this Grid. The event for this handler is
* fired when a Click event occurs in the Footer of this Grid.
- *
+ *
* @param handler
* the click handler to register
* @return the registration for the event
*/
- public HandlerRegistration addFooterClickHandler(FooterClickHandler handler) {
+ public HandlerRegistration addFooterClickHandler(
+ FooterClickHandler handler) {
return addHandler(handler, clickEvent.getAssociatedType());
}
@@ -8059,7 +8093,7 @@ public class Grid<T> extends ResizeComposite implements
* Register a BodyDoubleClickHandler to this Grid. The event for this
* handler is fired when a double click event occurs in the Body of this
* Grid.
- *
+ *
* @param handler
* the double click handler to register
* @return the registration for the event
@@ -8073,7 +8107,7 @@ public class Grid<T> extends ResizeComposite implements
* Register a HeaderDoubleClickHandler to this Grid. The event for this
* handler is fired when a double click event occurs in the Header of this
* Grid.
- *
+ *
* @param handler
* the double click handler to register
* @return the registration for the event
@@ -8087,7 +8121,7 @@ public class Grid<T> extends ResizeComposite implements
* Register a FooterDoubleClickHandler to this Grid. The event for this
* handler is fired when a double click event occurs in the Footer of this
* Grid.
- *
+ *
* @param handler
* the double click handler to register
* @return the registration for the event
@@ -8100,7 +8134,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Register a column reorder handler to this Grid. The event for this
* handler is fired when the Grid's columns are reordered.
- *
+ *
* @since 7.5.0
* @param handler
* the handler for the event
@@ -8114,7 +8148,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Register a column visibility change handler to this Grid. The event for
* this handler is fired when the Grid's columns change visibility.
- *
+ *
* @since 7.5.0
* @param handler
* the handler for the event
@@ -8128,7 +8162,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Register a column resize handler to this Grid. The event for this handler
* is fired when the Grid's columns are resized.
- *
+ *
* @since 7.6
* @param handler
* the handler for the event
@@ -8140,10 +8174,12 @@ public class Grid<T> extends ResizeComposite implements
}
/**
- * Register a enabled status change handler to this Grid.
- * The event for this handler is fired when the Grid changes from disabled
- * to enabled and vice-versa.
- * @param handler the handler for the event
+ * Register a enabled status change handler to this Grid. The event for this
+ * handler is fired when the Grid changes from disabled to enabled and
+ * vice-versa.
+ *
+ * @param handler
+ * the handler for the event
* @return the registration for the event
*/
public HandlerRegistration addEnabledHandler(GridEnabledHandler handler) {
@@ -8191,7 +8227,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Adds a scroll handler to this grid
- *
+ *
* @param handler
* the scroll handler to add
* @return a handler registration for the registered scroll handler
@@ -8209,7 +8245,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Returns whether columns can be reordered with drag and drop.
- *
+ *
* @since 7.5.0
* @return <code>true</code> if columns can be reordered, false otherwise
*/
@@ -8219,7 +8255,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Sets whether column reordering with drag and drop is allowed or not.
- *
+ *
* @since 7.5.0
* @param columnReorderingAllowed
* specifies whether column reordering is allowed
@@ -8232,7 +8268,7 @@ public class Grid<T> extends ResizeComposite implements
* Sets a new column order for the grid. All columns which are not ordered
* here will remain in the order they were before as the last columns of
* grid.
- *
+ *
* @param orderedColumns
* array of columns in wanted order
*/
@@ -8292,19 +8328,20 @@ public class Grid<T> extends ResizeComposite implements
/**
* Sets the style generator that is used for generating styles for cells
- *
+ *
* @param cellStyleGenerator
* the cell style generator to set, or <code>null</code> to
* remove a previously set generator
*/
- public void setCellStyleGenerator(CellStyleGenerator<T> cellStyleGenerator) {
+ public void setCellStyleGenerator(
+ CellStyleGenerator<T> cellStyleGenerator) {
this.cellStyleGenerator = cellStyleGenerator;
refreshBody();
}
/**
* Gets the style generator that is used for generating styles for cells
- *
+ *
* @return the cell style generator, or <code>null</code> if no generator is
* set
*/
@@ -8314,7 +8351,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Sets the style generator that is used for generating styles for rows
- *
+ *
* @param rowStyleGenerator
* the row style generator to set, or <code>null</code> to remove
* a previously set generator
@@ -8326,7 +8363,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Gets the style generator that is used for generating styles for rows
- *
+ *
* @return the row style generator, or <code>null</code> if no generator is
* set
*/
@@ -8354,10 +8391,10 @@ public class Grid<T> extends ResizeComposite implements
/**
* Opens the editor over the row with the given index.
- *
+ *
* @param rowIndex
* the index of the row to be edited
- *
+ *
* @throws IllegalStateException
* if the editor is not enabled
* @throws IllegalStateException
@@ -8369,7 +8406,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Returns whether the editor is currently open on some row.
- *
+ *
* @return {@code true} if the editor is active, {@code false} otherwise.
*/
public boolean isEditorActive() {
@@ -8378,7 +8415,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Saves any unsaved changes in the editor to the data source.
- *
+ *
* @throws IllegalStateException
* if the editor is not enabled
* @throws IllegalStateException
@@ -8391,7 +8428,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Cancels the currently active edit and hides the editor. Any changes that
* are not {@link #saveEditor() saved} are lost.
- *
+ *
* @throws IllegalStateException
* if the editor is not enabled
* @throws IllegalStateException
@@ -8404,7 +8441,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Returns the handler responsible for binding data and editor widgets to
* the editor.
- *
+ *
* @return the editor handler or null if not set
*/
public EditorHandler<T> getEditorHandler() {
@@ -8414,10 +8451,10 @@ public class Grid<T> extends ResizeComposite implements
/**
* Sets the handler responsible for binding data and editor widgets to the
* editor.
- *
+ *
* @param rowHandler
* the new editor handler
- *
+ *
* @throws IllegalStateException
* if the editor is currently in edit mode
*/
@@ -8427,7 +8464,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Returns the enabled state of the editor.
- *
+ *
* @return true if editing is enabled, false otherwise
*/
public boolean isEditorEnabled() {
@@ -8436,10 +8473,10 @@ public class Grid<T> extends ResizeComposite implements
/**
* Sets the enabled state of the editor.
- *
+ *
* @param enabled
* true to enable editing, false to disable
- *
+ *
* @throws IllegalStateException
* if in edit mode and trying to disable
* @throws IllegalStateException
@@ -8452,7 +8489,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Returns the editor widget associated with the given column. If the editor
* is not active, returns null.
- *
+ *
* @param column
* the column
* @return the widget if the editor is open, null otherwise
@@ -8463,7 +8500,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Sets the caption on the save button in the Grid editor.
- *
+ *
* @param saveCaption
* the caption to set
* @throws IllegalArgumentException
@@ -8476,7 +8513,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Gets the current caption on the save button in the Grid editor.
- *
+ *
* @return the current caption on the save button
*/
public String getEditorSaveCaption() {
@@ -8485,7 +8522,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Sets the caption on the cancel button in the Grid editor.
- *
+ *
* @param cancelCaption
* the caption to set
* @throws IllegalArgumentException
@@ -8498,7 +8535,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Gets the caption on the cancel button in the Grid editor.
- *
+ *
* @return the current caption on the cancel button
*/
public String getEditorCancelCaption() {
@@ -8538,7 +8575,8 @@ public class Grid<T> extends ResizeComposite implements
@Override
public void execute() {
- if (escalator.getInnerWidth() != autoColumnWidthsRecalculator.lastCalculatedInnerWidth) {
+ if (escalator
+ .getInnerWidth() != autoColumnWidthsRecalculator.lastCalculatedInnerWidth) {
recalculateColumnWidths();
}
@@ -8561,7 +8599,7 @@ public class Grid<T> extends ResizeComposite implements
* <p>
* This method is implemented only because removing widgets from Grid (added
* via e.g. {@link Renderer}s) requires the {@link HasWidgets} interface.
- *
+ *
* @param w
* irrelevant
* @throws UnsupportedOperationException
@@ -8579,7 +8617,7 @@ public class Grid<T> extends ResizeComposite implements
* <p>
* This method is implemented only because removing widgets from Grid (added
* via e.g. {@link Renderer}s) requires the {@link HasWidgets} interface.
- *
+ *
* @throws UnsupportedOperationException
* always
*/
@@ -8595,7 +8633,7 @@ public class Grid<T> extends ResizeComposite implements
* <p>
* This method is implemented only because removing widgets from Grid (added
* via e.g. {@link Renderer}s) requires the {@link HasWidgets} interface.
- *
+ *
* @return never
* @throws UnsupportedOperationException
* always
@@ -8612,7 +8650,7 @@ public class Grid<T> extends ResizeComposite implements
* <p>
* This method is implemented only because removing widgets from Grid (added
* via e.g. {@link Renderer}s) requires the {@link HasWidgets} interface.
- *
+ *
* @return always <code>false</code>
*/
@Override
@@ -8624,7 +8662,7 @@ public class Grid<T> extends ResizeComposite implements
* corresponding Widget will call removeFromParent() on itself. GWT will
* check there that its parent (i.e. Grid) implements HasWidgets, and
* will call this remove(Widget) method.
- *
+ *
* tl;dr: all this song and dance to make sure GWT's sanity checks
* aren't triggered, even though they effectively do nothing interesting
* from Grid's perspective.
@@ -8634,7 +8672,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Accesses the package private method Widget#setParent()
- *
+ *
* @param widget
* The widget to access
* @param parent
@@ -8696,7 +8734,7 @@ public class Grid<T> extends ResizeComposite implements
* Sets a new details generator for row details.
* <p>
* The currently opened row details will be re-rendered.
- *
+ *
* @since 7.5.0
* @param detailsGenerator
* the details generator to set
@@ -8723,7 +8761,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Gets the current details generator for row details.
- *
+ *
* @since 7.5.0
* @return the detailsGenerator the current details generator
*/
@@ -8736,7 +8774,7 @@ public class Grid<T> extends ResizeComposite implements
* <p>
* This method does nothing if trying to set show already-visible details,
* or hide already-hidden details.
- *
+ *
* @since 7.5.0
* @param rowIndex
* the index of the affected row
@@ -8755,17 +8793,17 @@ public class Grid<T> extends ResizeComposite implements
/*
* We want to prevent opening a details row twice, so any subsequent
* openings (or closings) of details is a NOOP.
- *
+ *
* When a details row is opened, it is given an arbitrary height
* (because Escalator requires a height upon opening). Only when it's
* opened, Escalator will ask the generator to generate a widget, which
* we then can measure. When measured, we correct the initial height by
* the original height.
- *
+ *
* Without this check, we would override the measured height, and revert
* back to the initial, arbitrary, height which would most probably be
* wrong.
- *
+ *
* see GridSpacerUpdater.init for implementation details.
*/
@@ -8783,7 +8821,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Check whether the details for a row is visible or not.
- *
+ *
* @since 7.5.0
* @param rowIndex
* the index of the row for which to check details
@@ -8800,7 +8838,7 @@ public class Grid<T> extends ResizeComposite implements
* The actual recalculation is not necessarily done immediately so you
* cannot rely on the columns being the correct width after the call
* returns.
- *
+ *
* @since 7.4.1
*/
public void recalculateColumnWidths() {
@@ -8814,7 +8852,7 @@ public class Grid<T> extends ResizeComposite implements
* the items in the beginning of the menu that control the column hiding if
* any columns are marked as hidable. A toggle for opening the menu will be
* displayed whenever the menu contains at least one item.
- *
+ *
* @since 7.5.0
* @return the menu bar
*/
@@ -8824,7 +8862,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Tests whether the sidebar menu is currently open.
- *
+ *
* @since 7.5.0
* @see #getSidebarMenu()
* @return <code>true</code> if the sidebar is open; <code>false</code> if
@@ -8836,8 +8874,8 @@ public class Grid<T> extends ResizeComposite implements
/**
* Sets whether the sidebar menu is open.
- *
- *
+ *
+ *
* @since 7.5.0
* @see #getSidebarMenu()
* @see #isSidebarOpen()
@@ -8880,7 +8918,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Sets the buffered editor mode.
- *
+ *
* @since 7.6
* @param editorUnbuffered
* <code>true</code> to enable buffered editor,
@@ -8892,7 +8930,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Gets the buffered editor mode.
- *
+ *
* @since 7.6
* @return <code>true</code> if buffered editor is enabled,
* <code>false</code> otherwise
@@ -8906,7 +8944,7 @@ public class Grid<T> extends ResizeComposite implements
* this Grid.
* <p>
* Note: This cell reference will be updated when firing the next event.
- *
+ *
* @since 7.5
* @return event cell reference
*/
@@ -8917,7 +8955,7 @@ public class Grid<T> extends ResizeComposite implements
/**
* Returns a CellReference for the cell to which the given element belongs
* to.
- *
+ *
* @since 7.6
* @param element
* Element to find from the cell's content.
diff --git a/client/src/main/java/com/vaadin/client/widgets/Overlay.java b/client/src/main/java/com/vaadin/client/widgets/Overlay.java
index b10b1a1f3d..46a4f0bff5 100644
--- a/client/src/main/java/com/vaadin/client/widgets/Overlay.java
+++ b/client/src/main/java/com/vaadin/client/widgets/Overlay.java
@@ -50,7 +50,7 @@ import com.vaadin.client.WidgetUtil;
* <p>
* <b>Note:</b> This class should always be constructed with
* {@link GWT#create(Class)}.
- *
+ *
* <h3>Shadow</h3>
* <p>
* The separate shadow element underneath the main overlay element is <strong>
@@ -61,7 +61,7 @@ import com.vaadin.client.WidgetUtil;
* supports, add <code>-webkit-box-shadow</code> and the standard
* <code>box-shadow</code> properties.
* </p>
- *
+ *
* <p>
* For IE8, which doesn't support CSS box-shadow, you can use the proprietary
* DropShadow filter. It doesn't provide the exact same features as box-shadow,
@@ -69,13 +69,13 @@ import com.vaadin.client.WidgetUtil;
* border or a pseudo-element underneath the overlay which mimics a shadow, or
* any combination of these.
* </p>
- *
+ *
* <p>
- * Read more about the DropShadow filter from <a
- * href="http://msdn.microsoft.com/en-us/library/ms532985(v=vs.85).aspx"
+ * Read more about the DropShadow filter from
+ * <a href="http://msdn.microsoft.com/en-us/library/ms532985(v=vs.85).aspx"
* >Microsoft Developer Network</a>
* </p>
- *
+ *
* @since 7.6.1
*/
public class Overlay extends PopupPanel implements CloseHandler<PopupPanel> {
@@ -165,7 +165,7 @@ public class Overlay extends PopupPanel implements CloseHandler<PopupPanel> {
* Shadow element style. If an extending class wishes to use a different
* style of shadow, it can use setShadowStyle(String) to give the shadow
* element a new style name.
- *
+ *
* @deprecated See main JavaDoc for Overlay
*/
@Deprecated
@@ -188,9 +188,9 @@ public class Overlay extends PopupPanel implements CloseHandler<PopupPanel> {
/**
* The shadow element for this overlay.
- *
+ *
* @deprecated See main JavaDoc for Overlay
- *
+ *
*/
@Deprecated
private Element shadow;
@@ -210,7 +210,7 @@ public class Overlay extends PopupPanel implements CloseHandler<PopupPanel> {
/**
* The HTML snippet that is used to render the actual shadow. In consists of
* nine different DIV-elements with the following class names:
- *
+ *
* <pre>
* .v-shadow[-stylename]
* ----------------------------------------------
@@ -223,9 +223,9 @@ public class Overlay extends PopupPanel implements CloseHandler<PopupPanel> {
* | .bottom-left | .bottom | .bottom-right |
* ----------------------------------------------
* </pre>
- *
+ *
* See default theme 'shadow.css' for implementation example.
- *
+ *
* @deprecated See main JavaDoc for Overlay
*/
@Deprecated
@@ -274,7 +274,7 @@ public class Overlay extends PopupPanel implements CloseHandler<PopupPanel> {
* Return true if a separate shadow div should be used. Since Vaadin 7.3,
* shadows are implemented with CSS box-shadow. Thus, a shadow div is only
* used for IE8 by default.
- *
+ *
* @deprecated See main JavaDoc for Overlay
* @since 7.3
* @return true to use a shadow div
@@ -288,10 +288,10 @@ public class Overlay extends PopupPanel implements CloseHandler<PopupPanel> {
* Method to control whether DOM elements for shadow are added. With this
* method subclasses can control displaying of shadow also after the
* constructor.
- *
+ *
* @param enabled
* true if shadow should be displayed
- *
+ *
* @deprecated See main JavaDoc for Overlay
*/
@Deprecated
@@ -355,7 +355,7 @@ public class Overlay extends PopupPanel implements CloseHandler<PopupPanel> {
/**
* Set the z-index (visual stack position) for this overlay.
- *
+ *
* @param zIndex
* The new z-index
*/
@@ -526,7 +526,7 @@ public class Overlay extends PopupPanel implements CloseHandler<PopupPanel> {
* A "thread local" of sorts, set temporarily so that OverlayImpl knows
* which Overlay is using it, so that it can be attached to the correct
* overlay container.
- *
+ *
* TODO this is a strange pattern that we should get rid of when possible.
*/
protected static Overlay current;
@@ -575,17 +575,20 @@ public class Overlay extends PopupPanel implements CloseHandler<PopupPanel> {
if (animationName.contains(ADDITIONAL_CLASSNAME_ANIMATE_IN)) {
// Disable GWT PopupPanel animation if used
setAnimationEnabled(false);
- AnimationUtil.addAnimationEndListener(
- getElement(), new AnimationEndListener() {
+ AnimationUtil.addAnimationEndListener(getElement(),
+ new AnimationEndListener() {
@Override
public void onAnimationEnd(NativeEvent event) {
String animationName = AnimationUtil
.getAnimationName(event);
- if (animationName
- .contains(ADDITIONAL_CLASSNAME_ANIMATE_IN)) {
- boolean removed = AnimationUtil.removeAnimationEndListener(getElement(), this);
- assert removed: "Animation end listener was not removed";
- removeStyleDependentName(ADDITIONAL_CLASSNAME_ANIMATE_IN);
+ if (animationName.contains(
+ ADDITIONAL_CLASSNAME_ANIMATE_IN)) {
+ boolean removed = AnimationUtil
+ .removeAnimationEndListener(
+ getElement(), this);
+ assert removed : "Animation end listener was not removed";
+ removeStyleDependentName(
+ ADDITIONAL_CLASSNAME_ANIMATE_IN);
if (isShadowEnabled()) {
shadow.removeClassName(CLASSNAME_SHADOW
+ "-"
@@ -644,12 +647,12 @@ public class Overlay extends PopupPanel implements CloseHandler<PopupPanel> {
* Sets the shadow style for this overlay. Will override any previous style
* for the shadow. The default style name is defined by CLASSNAME_SHADOW.
* The given style will be prefixed with CLASSNAME_SHADOW.
- *
+ *
* @param style
* The new style name for the shadow element. Will be prefixed by
* CLASSNAME_SHADOW, e.g. style=='foobar' -> actual style
* name=='v-shadow-foobar'.
- *
+ *
* @deprecated See main JavaDoc for Overlay
*/
@Deprecated
@@ -663,7 +666,7 @@ public class Overlay extends PopupPanel implements CloseHandler<PopupPanel> {
* Extending classes should always call this method after they change the
* size of overlay without using normal 'setWidth(String)' and
* 'setHeight(String)' methods (if not calling super.setWidth/Height).
- *
+ *
*/
public void positionOrSizeUpdated() {
positionOrSizeUpdated(1.0);
@@ -682,7 +685,7 @@ public class Overlay extends PopupPanel implements CloseHandler<PopupPanel> {
* elements. Can be used to animate the related elements, using the
* 'progress' parameter (used to animate the shadow in sync with GWT
* PopupPanel's default animation 'PopupPanel.AnimationType.CENTER').
- *
+ *
* @param progress
* A value between 0.0 and 1.0, indicating the progress of the
* animation (0=start, 1=end).
@@ -768,18 +771,12 @@ public class Overlay extends PopupPanel implements CloseHandler<PopupPanel> {
// Opera fix, part 2 (ticket #2704)
if (BrowserInfo.get().isOpera()) {
// We'll fix the height of all the middle elements
- DOM.getChild(shadow, 3)
- .getStyle()
- .setPropertyPx("height",
- DOM.getChild(shadow, 3).getOffsetHeight());
- DOM.getChild(shadow, 4)
- .getStyle()
- .setPropertyPx("height",
- DOM.getChild(shadow, 4).getOffsetHeight());
- DOM.getChild(shadow, 5)
- .getStyle()
- .setPropertyPx("height",
- DOM.getChild(shadow, 5).getOffsetHeight());
+ DOM.getChild(shadow, 3).getStyle().setPropertyPx("height",
+ DOM.getChild(shadow, 3).getOffsetHeight());
+ DOM.getChild(shadow, 4).getStyle().setPropertyPx("height",
+ DOM.getChild(shadow, 4).getOffsetHeight());
+ DOM.getChild(shadow, 5).getStyle().setPropertyPx("height",
+ DOM.getChild(shadow, 5).getOffsetHeight());
}
}
@@ -791,7 +788,7 @@ public class Overlay extends PopupPanel implements CloseHandler<PopupPanel> {
* Returns true if we should add a shim iframe below the overlay to deal
* with zindex issues with PDFs and applets. Can be overriden to disable
* shim iframes if they are not needed.
- *
+ *
* @return true if a shim iframe should be added, false otherwise
*/
protected boolean needsShimElement() {
@@ -853,13 +850,13 @@ public class Overlay extends PopupPanel implements CloseHandler<PopupPanel> {
/**
* Enables or disables sinking the events of the shadow to the same
* onBrowserEvent as events to the actual overlay goes.
- *
+ *
* Please note, that if you enable this, you can't assume that e.g.
* event.getEventTarget returns an element inside the DOM structure of the
* overlay
- *
+ *
* @param sinkShadowEvents
- *
+ *
* @deprecated See main JavaDoc for Overlay
*/
@Deprecated
@@ -883,7 +880,7 @@ public class Overlay extends PopupPanel implements CloseHandler<PopupPanel> {
/**
* Get owner (Widget that made this Overlay, not the layout parent) of
* Overlay
- *
+ *
* @return Owner (creator) or null if not defined
*/
public Widget getOwner() {
@@ -893,7 +890,7 @@ public class Overlay extends PopupPanel implements CloseHandler<PopupPanel> {
/**
* Set owner (Widget that made this Overlay, not the layout parent) of
* Overlay
- *
+ *
* @param owner
* Owner (creator) of Overlay
*/
@@ -903,7 +900,7 @@ public class Overlay extends PopupPanel implements CloseHandler<PopupPanel> {
/**
* Gets the 'overlay container' element.
- *
+ *
* @return the overlay container element
*/
public com.google.gwt.user.client.Element getOverlayContainer() {
@@ -929,10 +926,10 @@ public class Overlay extends PopupPanel implements CloseHandler<PopupPanel> {
/**
* Gets the visual viewport width, which is useful for e.g iOS where the
* view can be zoomed in while keeping the layout viewport intact.
- *
+ *
* Falls back to layout viewport; for those browsers/devices the difference
* is that the scrollbar with is included (if there is a scrollbar).
- *
+ *
* @since 7.0.7
* @return
*/
@@ -948,10 +945,10 @@ public class Overlay extends PopupPanel implements CloseHandler<PopupPanel> {
/**
* Gets the visual viewport height, which is useful for e.g iOS where the
* view can be zoomed in while keeping the layout viewport intact.
- *
+ *
* Falls back to layout viewport; for those browsers/devices the difference
* is that the scrollbar with is included (if there is a scrollbar).
- *
+ *
* @since 7.0.7
* @return
*/
@@ -976,7 +973,7 @@ public class Overlay extends PopupPanel implements CloseHandler<PopupPanel> {
/*
* (non-Javadoc)
- *
+ *
* @see com.google.gwt.user.client.ui.PopupPanel#hide()
*/
@Override
@@ -986,7 +983,7 @@ public class Overlay extends PopupPanel implements CloseHandler<PopupPanel> {
/*
* (non-Javadoc)
- *
+ *
* @see com.google.gwt.user.client.ui.PopupPanel#hide(boolean)
*/
@Override
@@ -995,13 +992,13 @@ public class Overlay extends PopupPanel implements CloseHandler<PopupPanel> {
}
/**
- *
+ *
* Hides the popup and detaches it from the page. This has no effect if it
* is not currently showing. Animation-in, animation-out can be
* enable/disabled for different use cases.
- *
+ *
* @see com.google.gwt.user.client.ui.PopupPanel#hide(boolean)
- *
+ *
* @param autoClosed
* the value that will be passed to
* {@link CloseHandler#onClose(CloseEvent)} when the popup is
@@ -1017,18 +1014,19 @@ public class Overlay extends PopupPanel implements CloseHandler<PopupPanel> {
if (BrowserInfo.get().isIE8() || BrowserInfo.get().isIE9()) {
reallyHide(autoClosed);
} else {
- if (animateIn
- && getStyleName().contains(ADDITIONAL_CLASSNAME_ANIMATE_IN)) {
+ if (animateIn && getStyleName()
+ .contains(ADDITIONAL_CLASSNAME_ANIMATE_IN)) {
AnimationUtil.addAnimationEndListener(getElement(),
new AnimationEndListener() {
@Override
public void onAnimationEnd(NativeEvent event) {
- if (AnimationUtil
- .getAnimationName(event)
+ if (AnimationUtil.getAnimationName(event)
.contains(
ADDITIONAL_CLASSNAME_ANIMATE_IN)) {
- boolean removed = AnimationUtil.removeAnimationEndListener(getElement(), this);
- assert removed: "Animation end listener was not removed";
+ boolean removed = AnimationUtil
+ .removeAnimationEndListener(
+ getElement(), this);
+ assert removed : "Animation end listener was not removed";
reallyHide(autoClosed);
}
}
@@ -1046,9 +1044,8 @@ public class Overlay extends PopupPanel implements CloseHandler<PopupPanel> {
animationName = "";
}
- if (animateOut
- && animationName
- .contains(ADDITIONAL_CLASSNAME_ANIMATE_OUT)) {
+ if (animateOut && animationName
+ .contains(ADDITIONAL_CLASSNAME_ANIMATE_OUT)) {
// Disable GWT PopupPanel closing animation if used
setAnimationEnabled(false);
@@ -1058,21 +1055,25 @@ public class Overlay extends PopupPanel implements CloseHandler<PopupPanel> {
public void onAnimationEnd(NativeEvent event) {
String animationName = AnimationUtil
.getAnimationName(event);
- if (animationName
- .contains(ADDITIONAL_CLASSNAME_ANIMATE_OUT)) {
- boolean removed = AnimationUtil.removeAnimationEndListener(getElement(), this);
- assert removed: "Animation end listener was not removed";
+ if (animationName.contains(
+ ADDITIONAL_CLASSNAME_ANIMATE_OUT)) {
+ boolean removed = AnimationUtil
+ .removeAnimationEndListener(
+ getElement(), this);
+ assert removed : "Animation end listener was not removed";
// Remove both animation styles just in
// case
- removeStyleDependentName(ADDITIONAL_CLASSNAME_ANIMATE_IN);
- removeStyleDependentName(ADDITIONAL_CLASSNAME_ANIMATE_OUT);
+ removeStyleDependentName(
+ ADDITIONAL_CLASSNAME_ANIMATE_IN);
+ removeStyleDependentName(
+ ADDITIONAL_CLASSNAME_ANIMATE_OUT);
if (isShadowEnabled()) {
- shadow.removeClassName(CLASSNAME_SHADOW
- + "-"
- + ADDITIONAL_CLASSNAME_ANIMATE_IN);
- shadow.removeClassName(CLASSNAME_SHADOW
- + "-"
- + ADDITIONAL_CLASSNAME_ANIMATE_OUT);
+ shadow.removeClassName(
+ CLASSNAME_SHADOW + "-"
+ + ADDITIONAL_CLASSNAME_ANIMATE_IN);
+ shadow.removeClassName(
+ CLASSNAME_SHADOW + "-"
+ + ADDITIONAL_CLASSNAME_ANIMATE_OUT);
}
reallyHide(autoClosed);
}
@@ -1114,7 +1115,7 @@ public class Overlay extends PopupPanel implements CloseHandler<PopupPanel> {
* it does not fit on either side. If the popup is larger than the window,
* it will be shrunk to fit and assume that scrolling e.g. using
* <code>overflow:auto</code>, is taken care of by the overlay user.
- *
+ *
* @since 7.6.6
* @param fitInWindow
* <code>true</code> to ensure that no part of the popup is
@@ -1128,9 +1129,9 @@ public class Overlay extends PopupPanel implements CloseHandler<PopupPanel> {
/**
* Checks whether the overlay should be moved or shrunk to fit inside the
* window.
- *
+ *
* @see #setFitInWindow(boolean)
- *
+ *
* @since 7.6.6
* @return <code>true</code> if the popup will be moved and/or shrunk to fit
* inside the window, <code>false</code> otherwise
diff --git a/client/src/test/java/com/vaadin/client/ApplicationConnectionURLGenerationTest.java b/client/src/test/java/com/vaadin/client/ApplicationConnectionURLGenerationTest.java
index 4dd2ddbaa4..8a84208ea8 100644
--- a/client/src/test/java/com/vaadin/client/ApplicationConnectionURLGenerationTest.java
+++ b/client/src/test/java/com/vaadin/client/ApplicationConnectionURLGenerationTest.java
@@ -10,10 +10,8 @@ public class ApplicationConnectionURLGenerationTest {
private static final String[] URIS = new String[] {
"http://demo.vaadin.com/", //
- "https://demo.vaadin.com/",
- "http://demo.vaadin.com/foo",
- "http://demo.vaadin.com/foo?f",
- "http://demo.vaadin.com/foo?f=1",
+ "https://demo.vaadin.com/", "http://demo.vaadin.com/foo",
+ "http://demo.vaadin.com/foo?f", "http://demo.vaadin.com/foo?f=1",
"http://demo.vaadin.com:1234/foo?a",
"http://demo.vaadin.com:1234/foo#frag?fakeparam",
// Jetspeed
@@ -41,8 +39,7 @@ public class ApplicationConnectionURLGenerationTest {
"http://demo.vaadin.com/foo?a=b&c=d#fragment",
"http://demo.vaadin.com/foo?f&a=b&c=d#fragment",
"http://demo.vaadin.com/foo?f=1&a=b&c=d#fragment",
- "http://demo.vaadin.com:1234/foo?a&a=b&c=d#fragment",
- "",
+ "http://demo.vaadin.com:1234/foo?a&a=b&c=d#fragment", "",
"http://localhost:8080/jetspeed/portal/_ns:Z3RlbXBsYXRlLXRvcDJfX3BhZ2UtdGVtcGxhdGVfX2RwLTFfX1AtMTJjNTRkYjdlYjUtMTAwMDJ8YzB8ZDF8aVVJREx8Zg__?a=b&c=d#fragment",
"http://vaadin.com/directory?p_p_id=Directory_WAR_Directory&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view&p_p_resource_id=UIDL&p_p_cacheability=cacheLevelPage&p_p_col_id=row-1&p_p_col_count=1&a=b&c=d#fragment",
@@ -60,14 +57,14 @@ public class ApplicationConnectionURLGenerationTest {
// Fragments
if (URIS_WITH_ABCD_PARAM_AND_FRAGMENT[i].length() > 0) {
- assertEquals(URIS_WITH_ABCD_PARAM_AND_FRAGMENT[i],
- SharedUtil.addGetParameters(URIS[i] + "#fragment",
- "a=b&c=d"));
+ assertEquals(URIS_WITH_ABCD_PARAM_AND_FRAGMENT[i], SharedUtil
+ .addGetParameters(URIS[i] + "#fragment", "a=b&c=d"));
// Empty fragment
- assertEquals(URIS_WITH_ABCD_PARAM_AND_FRAGMENT[i].replace(
- "#fragment", "#"), SharedUtil.addGetParameters(URIS[i]
- + "#", "a=b&c=d"));
+ assertEquals(
+ URIS_WITH_ABCD_PARAM_AND_FRAGMENT[i]
+ .replace("#fragment", "#"),
+ SharedUtil.addGetParameters(URIS[i] + "#", "a=b&c=d"));
}
}
}
diff --git a/client/src/test/java/com/vaadin/client/DateTimeServiceTest.java b/client/src/test/java/com/vaadin/client/DateTimeServiceTest.java
index e5e6cbd7db..912abc412a 100755
--- a/client/src/test/java/com/vaadin/client/DateTimeServiceTest.java
+++ b/client/src/test/java/com/vaadin/client/DateTimeServiceTest.java
@@ -65,7 +65,7 @@ public class DateTimeServiceTest {
/**
* Test all dates from 1990-1992 + some more and see that {@link Calendar}
* calculates the ISO week number like we do.
- *
+ *
*/
@Test
public void testISOWeekNumbers() {
@@ -86,7 +86,7 @@ public class DateTimeServiceTest {
/**
* Verify that special cases are handled correctly by us (and
* {@link Calendar}).
- *
+ *
*/
@Test
public void testSampleISOWeekNumbers() {
@@ -94,9 +94,10 @@ public class DateTimeServiceTest {
// System.out.println("Sample: " + d);
int expected = isoWeekNumbers.get(d);
int calculated = DateTimeService.getISOWeekNumber(d);
- Assert.assertEquals(d + " should be week " + expected
- + " (Java Calendar is wrong?)", expected,
- getCalendarISOWeekNr(d));
+ Assert.assertEquals(
+ d + " should be week " + expected
+ + " (Java Calendar is wrong?)",
+ expected, getCalendarISOWeekNr(d));
Assert.assertEquals(d + " should be week " + expected, expected,
calculated);
diff --git a/client/src/test/java/com/vaadin/client/LocatorUtilTest.java b/client/src/test/java/com/vaadin/client/LocatorUtilTest.java
index 971688e1c5..64a783549a 100644
--- a/client/src/test/java/com/vaadin/client/LocatorUtilTest.java
+++ b/client/src/test/java/com/vaadin/client/LocatorUtilTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/client/src/test/java/com/vaadin/client/VBrowserDetailsUserAgentParserTest.java b/client/src/test/java/com/vaadin/client/VBrowserDetailsUserAgentParserTest.java
index 41e675cb3a..c7eaf306fe 100644
--- a/client/src/test/java/com/vaadin/client/VBrowserDetailsUserAgentParserTest.java
+++ b/client/src/test/java/com/vaadin/client/VBrowserDetailsUserAgentParserTest.java
@@ -415,7 +415,8 @@ public class VBrowserDetailsUserAgentParserTest {
@Test
public void testIE9InIE8CompatibilityMode() {
- VBrowserDetails bd = new VBrowserDetails(IE9_BETA_IN_IE8_MODE_WINDOWS_7);
+ VBrowserDetails bd = new VBrowserDetails(
+ IE9_BETA_IN_IE8_MODE_WINDOWS_7);
// bd.setIE8InCompatibilityMode();
/*
@@ -621,8 +622,8 @@ public class VBrowserDetailsUserAgentParserTest {
assertFalse(browserDetails.isAndroid());
}
- private void assertAndroid(VBrowserDetails browserDetails,
- int majorVersion, int minorVersion) {
+ private void assertAndroid(VBrowserDetails browserDetails, int majorVersion,
+ int minorVersion) {
assertFalse(browserDetails.isLinux());
assertFalse(browserDetails.isWindows());
assertFalse(browserDetails.isMacOSX());
diff --git a/client/src/test/java/com/vaadin/client/communication/ServerMessageHandlerTest.java b/client/src/test/java/com/vaadin/client/communication/ServerMessageHandlerTest.java
index 7b0d886c39..8aa70bc4e9 100644
--- a/client/src/test/java/com/vaadin/client/communication/ServerMessageHandlerTest.java
+++ b/client/src/test/java/com/vaadin/client/communication/ServerMessageHandlerTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import org.junit.Assert;
import org.junit.Test;
/**
- *
+ *
* @since 7.7
* @author Vaadin Ltd
*/
diff --git a/client/src/test/java/com/vaadin/client/ui/grid/ListDataSourceTest.java b/client/src/test/java/com/vaadin/client/ui/grid/ListDataSourceTest.java
index 24ccd6c57e..89a2e80679 100644
--- a/client/src/test/java/com/vaadin/client/ui/grid/ListDataSourceTest.java
+++ b/client/src/test/java/com/vaadin/client/ui/grid/ListDataSourceTest.java
@@ -185,8 +185,8 @@ public class ListDataSourceTest {
}
});
- assertTrue(Arrays.equals(ds.asList().toArray(), new Integer[] { 1, 2,
- 3, 3, 4 }));
+ assertTrue(Arrays.equals(ds.asList().toArray(),
+ new Integer[] { 1, 2, 3, 3, 4 }));
}
}
diff --git a/client/src/test/java/com/vaadin/client/ui/grid/PartitioningTest.java b/client/src/test/java/com/vaadin/client/ui/grid/PartitioningTest.java
index e97bb339e4..ac4d39006a 100644
--- a/client/src/test/java/com/vaadin/client/ui/grid/PartitioningTest.java
+++ b/client/src/test/java/com/vaadin/client/ui/grid/PartitioningTest.java
@@ -1,12 +1,12 @@
/*
* 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
diff --git a/server/src/main/java/com/vaadin/annotations/AutoGenerated.java b/server/src/main/java/com/vaadin/annotations/AutoGenerated.java
index 1ad9f67ad1..a20c9c99a7 100644
--- a/server/src/main/java/com/vaadin/annotations/AutoGenerated.java
+++ b/server/src/main/java/com/vaadin/annotations/AutoGenerated.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -17,9 +17,9 @@ package com.vaadin.annotations;
/**
* Marker annotation for automatically generated code elements.
- *
+ *
* These elements may be modified or removed by code generation.
- *
+ *
* @author Vaadin Ltd.
* @since 6.0
*/
diff --git a/server/src/main/java/com/vaadin/annotations/DesignRoot.java b/server/src/main/java/com/vaadin/annotations/DesignRoot.java
index a00a00dc0b..7a913be4fc 100644
--- a/server/src/main/java/com/vaadin/annotations/DesignRoot.java
+++ b/server/src/main/java/com/vaadin/annotations/DesignRoot.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,7 +30,7 @@ import com.vaadin.ui.declarative.Design;
* the same package as the annotated class and by default the design filename is
* derived from the class name. Using the {@link #value()} parameter you can
* specify another design file name.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
diff --git a/server/src/main/java/com/vaadin/annotations/JavaScript.java b/server/src/main/java/com/vaadin/annotations/JavaScript.java
index 445ef75ddf..e160357558 100644
--- a/server/src/main/java/com/vaadin/annotations/JavaScript.java
+++ b/server/src/main/java/com/vaadin/annotations/JavaScript.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -49,7 +49,7 @@ import com.vaadin.server.ClientConnector;
* http://host.com/file1.js as is and file2.js from /com/example/file2.js on the
* server's classpath using the ClassLoader that was used to load
* com.example.MyConnector.
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
@@ -58,7 +58,7 @@ import com.vaadin.server.ClientConnector;
public @interface JavaScript {
/**
* JavaScript files to load before initializing the client-side connector.
- *
+ *
* @return an array of JavaScript file urls
*/
public String[] value();
diff --git a/server/src/main/java/com/vaadin/annotations/PreserveOnRefresh.java b/server/src/main/java/com/vaadin/annotations/PreserveOnRefresh.java
index 86723b97fc..11f3f51d70 100644
--- a/server/src/main/java/com/vaadin/annotations/PreserveOnRefresh.java
+++ b/server/src/main/java/com/vaadin/annotations/PreserveOnRefresh.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -40,7 +40,7 @@ import com.vaadin.ui.UI;
* {@link UIProvider#isPreservedOnRefresh(com.vaadin.server.UICreateEvent)}, the
* decision can also be made dynamically based on other parameters than only
* whether this annotation is present on the UI class.
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
diff --git a/server/src/main/java/com/vaadin/annotations/Push.java b/server/src/main/java/com/vaadin/annotations/Push.java
index 736bc4488b..f382ced9d2 100644
--- a/server/src/main/java/com/vaadin/annotations/Push.java
+++ b/server/src/main/java/com/vaadin/annotations/Push.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,9 +31,9 @@ import com.vaadin.ui.UI;
* class configures the UI for automatic push. If some other push mode is
* desired, it can be passed as a parameter, e.g.
* <code>@Push(PushMode.MANUAL)</code>.
- *
+ *
* @see PushMode
- *
+ *
* @author Vaadin Ltd.
* @since 7.1
*/
@@ -44,7 +44,7 @@ public @interface Push {
/**
* Returns the {@link PushMode} to use for the annotated UI. The default
* push mode when this annotation is present is {@link PushMode#AUTOMATIC}.
- *
+ *
* @return the push mode to use
*/
public PushMode value() default PushMode.AUTOMATIC;
@@ -53,7 +53,7 @@ public @interface Push {
* Returns the transport type used for the push for the annotated UI. The
* default transport type when this annotation is present is
* {@link Transport#WEBSOCKET}.
- *
+ *
* @return the transport type to use
*/
public Transport transport() default Transport.WEBSOCKET;
diff --git a/server/src/main/java/com/vaadin/annotations/StyleSheet.java b/server/src/main/java/com/vaadin/annotations/StyleSheet.java
index 191e39ee24..a84504accc 100644
--- a/server/src/main/java/com/vaadin/annotations/StyleSheet.java
+++ b/server/src/main/java/com/vaadin/annotations/StyleSheet.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -54,7 +54,7 @@ import com.vaadin.server.ClientConnector;
* http://host.com/file1.css as is and file2.css from /com/example/file2.css on
* the server's classpath using the ClassLoader that was used to load
* com.example.MyConnector.
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
@@ -63,7 +63,7 @@ import com.vaadin.server.ClientConnector;
public @interface StyleSheet {
/**
* Style sheets to load before initializing the client-side connector.
- *
+ *
* @return an array of style sheet urls
*/
public String[] value();
diff --git a/server/src/main/java/com/vaadin/annotations/Theme.java b/server/src/main/java/com/vaadin/annotations/Theme.java
index 03fa1179bc..02b8ba4b40 100644
--- a/server/src/main/java/com/vaadin/annotations/Theme.java
+++ b/server/src/main/java/com/vaadin/annotations/Theme.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/main/java/com/vaadin/annotations/Title.java b/server/src/main/java/com/vaadin/annotations/Title.java
index 07eaf17e33..caf4cf2c5f 100644
--- a/server/src/main/java/com/vaadin/annotations/Title.java
+++ b/server/src/main/java/com/vaadin/annotations/Title.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -33,7 +33,7 @@ import com.vaadin.ui.UI;
public @interface Title {
/**
* Gets the HTML title that should be used if the UI is used on it's own.
- *
+ *
* @return a page title string
*/
public String value();
diff --git a/server/src/main/java/com/vaadin/annotations/VaadinServletConfiguration.java b/server/src/main/java/com/vaadin/annotations/VaadinServletConfiguration.java
index 907f2c3a0c..4cc51815a0 100644
--- a/server/src/main/java/com/vaadin/annotations/VaadinServletConfiguration.java
+++ b/server/src/main/java/com/vaadin/annotations/VaadinServletConfiguration.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -39,7 +39,7 @@ import com.vaadin.ui.UI;
* as well as from specific methods in {@link DeploymentConfiguration}. Init
* params defined in <code>web.xml</code> or the <code>@WebServlet</code>
* annotation take precedence over values defined in this annotation.
- *
+ *
* @since 7.1
* @author Vaadin Ltd
*/
@@ -50,7 +50,7 @@ public @interface VaadinServletConfiguration {
/**
* Defines the init parameter name for methods in
* {@link VaadinServletConfiguration}.
- *
+ *
* @since 7.1
* @author Vaadin Ltd
*/
@@ -60,7 +60,7 @@ public @interface VaadinServletConfiguration {
public @interface InitParameterName {
/**
* The name of the init parameter that the annotated method controls.
- *
+ *
* @return the parameter name
*/
public String value();
@@ -68,9 +68,9 @@ public @interface VaadinServletConfiguration {
/**
* Whether Vaadin is in production mode.
- *
+ *
* @return true if in production mode, false otherwise.
- *
+ *
* @see DeploymentConfiguration#isProductionMode()
*/
@InitParameterName(Constants.SERVLET_PARAMETER_PRODUCTION_MODE)
@@ -78,7 +78,7 @@ public @interface VaadinServletConfiguration {
/**
* Gets the default UI class to use for the servlet.
- *
+ *
* @return the default UI class
*/
@InitParameterName(VaadinSession.UI_PARAMETER)
@@ -87,9 +87,9 @@ public @interface VaadinServletConfiguration {
/**
* The time resources can be cached in the browser, in seconds. The default
* value is 3600 seconds, i.e. one hour.
- *
+ *
* @return the resource cache time
- *
+ *
* @see DeploymentConfiguration#getResourceCacheTime()
*/
@InitParameterName(Constants.SERVLET_PARAMETER_RESOURCE_CACHE_TIME)
@@ -99,9 +99,9 @@ public @interface VaadinServletConfiguration {
* The number of seconds between heartbeat requests of a UI, or a
* non-positive number if heartbeat is disabled. The default value is 300
* seconds, i.e. 5 minutes.
- *
+ *
* @return the time between heartbeats
- *
+ *
* @see DeploymentConfiguration#getHeartbeatInterval()
*/
@InitParameterName(Constants.SERVLET_PARAMETER_HEARTBEAT_INTERVAL)
@@ -111,11 +111,11 @@ public @interface VaadinServletConfiguration {
* Whether a session should be closed when all its open UIs have been idle
* for longer than its configured maximum inactivity time. The default value
* is <code>false</code>.
- *
+ *
* @return true if UIs and sessions receiving only heartbeat requests are
* eventually closed; false if heartbeat requests extend UI and
* session lifetime indefinitely
- *
+ *
* @see DeploymentConfiguration#isCloseIdleSessions()
*/
@InitParameterName(Constants.SERVLET_PARAMETER_CLOSE_IDLE_SESSIONS)
@@ -124,7 +124,7 @@ public @interface VaadinServletConfiguration {
/**
* The default widgetset to use for the servlet. The default value is
* <code>com.vaadin.DefaultWidgetSet</code>.
- *
+ *
* @return the default widgetset name
*/
@InitParameterName(VaadinServlet.PARAMETER_WIDGETSET)
@@ -133,9 +133,9 @@ public @interface VaadinServletConfiguration {
/**
* The legacy Property.toString() mode used. The default value is
* {@link LegacyProperyToStringMode#DISABLED}
- *
+ *
* @return The Property.toString() mode in use.
- *
+ *
* @deprecated as of 7.1, should only be used to ease migration
*/
@Deprecated
diff --git a/server/src/main/java/com/vaadin/annotations/Viewport.java b/server/src/main/java/com/vaadin/annotations/Viewport.java
index c5b0abd56f..e1d47a0170 100644
--- a/server/src/main/java/com/vaadin/annotations/Viewport.java
+++ b/server/src/main/java/com/vaadin/annotations/Viewport.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,9 +28,9 @@ import java.lang.annotation.Target;
* <p>
* If you want to dynamically provide different viewport values for different
* browser, you should use {@link ViewportGeneratorClass} instead.
- *
+ *
* @since 7.4
- *
+ *
* @author Vaadin Ltd
*/
@Target(ElementType.TYPE)
@@ -40,7 +40,7 @@ import java.lang.annotation.Target;
public @interface Viewport {
/**
* Gets the viewport tag content.
- *
+ *
* @return the viewport tag content
*/
public String value();
diff --git a/server/src/main/java/com/vaadin/annotations/ViewportGeneratorClass.java b/server/src/main/java/com/vaadin/annotations/ViewportGeneratorClass.java
index aec7ac07e6..6a989af9ea 100644
--- a/server/src/main/java/com/vaadin/annotations/ViewportGeneratorClass.java
+++ b/server/src/main/java/com/vaadin/annotations/ViewportGeneratorClass.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,11 +31,11 @@ import com.vaadin.server.ViewportGenerator;
* <p>
* If you want to use the same viewport values for all requests, you can use the
* simpler {@link Viewport} annotation instead.
- *
+ *
* @see ViewportGenerator
- *
+ *
* @since 7.4
- *
+ *
* @author Vaadin Ltd
*/
@Target(ElementType.TYPE)
@@ -47,7 +47,7 @@ public @interface ViewportGeneratorClass {
* Gets the viewport generator class to use. Please note that the class must
* be public and have a default constructor. It must additionally be
* declared as static if it's declared as an inner class.
- *
+ *
* @return the viewport generator class
*/
public Class<? extends ViewportGenerator> value();
diff --git a/server/src/main/java/com/vaadin/annotations/Widgetset.java b/server/src/main/java/com/vaadin/annotations/Widgetset.java
index 2dcf93af13..06e10f7f0f 100644
--- a/server/src/main/java/com/vaadin/annotations/Widgetset.java
+++ b/server/src/main/java/com/vaadin/annotations/Widgetset.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/main/java/com/vaadin/data/Buffered.java b/server/src/main/java/com/vaadin/data/Buffered.java
index 469f9987a4..0fe9f40cd7 100644
--- a/server/src/main/java/com/vaadin/data/Buffered.java
+++ b/server/src/main/java/com/vaadin/data/Buffered.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,20 +24,20 @@ import com.vaadin.data.Validator.InvalidValueException;
* <p>
* Defines the interface to commit and discard changes to an object, supporting
* buffering.
- *
+ *
* <p>
* In <i>buffered</i> mode the initial value is read from the data source and
* then buffered. Any subsequential writes or reads will be done on the buffered
* value. Calling {@link #commit()} will write the buffered value to the data
* source while calling {@link #discard()} while discard the buffered value and
* re-read the value from the data source.
- *
+ *
* <p>
* In <i>non-buffered</i> mode the value is always read directly from the data
* source. Any write is done directly to the data source with no buffering in
* between. Reads are also done directly from the data source. Calling
* {@link #commit()} or {@link #discard()} in this mode is efficiently a no-op.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -47,7 +47,7 @@ public interface Buffered extends Serializable {
* Updates all changes since the previous commit to the data source. The
* value stored in the object will always be updated into the data source
* when <code>commit</code> is called.
- *
+ *
* @throws SourceException
* if the operation fails because of an exception is thrown by
* the data source. The cause is included in the exception.
@@ -60,7 +60,7 @@ public interface Buffered extends Serializable {
/**
* Discards all changes since last commit. The object updates its value from
* the data source.
- *
+ *
* @throws SourceException
* if the operation fails because of an exception is thrown by
* the data source. The cause is included in the exception.
@@ -77,7 +77,7 @@ public interface Buffered extends Serializable {
* When in non-buffered mode both read and write operations will be done
* directly on the data source. In this mode the {@link #commit()} and
* {@link #discard()} methods serve no purpose.
- *
+ *
* @param buffered
* true if buffered mode should be turned on, false otherwise
* @since 7.0
@@ -86,7 +86,7 @@ public interface Buffered extends Serializable {
/**
* Checks the buffered mode
- *
+ *
* @return true if buffered mode is on, false otherwise
* @since 7.0
*/
@@ -95,7 +95,7 @@ public interface Buffered extends Serializable {
/**
* Tests if the value stored in the object has been modified since it was
* last updated from the data source.
- *
+ *
* @return <code>true</code> if the value in the object has been modified
* since the last data source update, <code>false</code> if not.
*/
@@ -105,13 +105,13 @@ public interface Buffered extends Serializable {
* An exception that signals that one or more exceptions occurred while a
* buffered object tried to access its data source or if there is a problem
* in processing a data source.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@SuppressWarnings("serial")
- public class SourceException extends RuntimeException implements
- Serializable {
+ public class SourceException extends RuntimeException
+ implements Serializable {
/** Source class implementing the buffered interface */
private final Buffered source;
@@ -121,7 +121,7 @@ public interface Buffered extends Serializable {
/**
* Creates a source exception that does not include a cause.
- *
+ *
* @param source
* the source object implementing the Buffered interface.
*/
@@ -131,7 +131,7 @@ public interface Buffered extends Serializable {
/**
* Creates a source exception from multiple causes.
- *
+ *
* @param source
* the source object implementing the Buffered interface.
* @param causes
@@ -144,7 +144,7 @@ public interface Buffered extends Serializable {
/**
* Gets the cause of the exception.
- *
+ *
* @return The (first) cause for the exception, null if no cause.
*/
@Override
@@ -157,7 +157,7 @@ public interface Buffered extends Serializable {
/**
* Gets all the causes for this exception.
- *
+ *
* @return throwables that caused this exception
*/
public final Throwable[] getCauses() {
@@ -166,7 +166,7 @@ public interface Buffered extends Serializable {
/**
* Gets a source of the exception.
- *
+ *
* @return the Buffered object which generated this exception.
*/
public Buffered getSource() {
diff --git a/server/src/main/java/com/vaadin/data/BufferedValidatable.java b/server/src/main/java/com/vaadin/data/BufferedValidatable.java
index 6f9d952d2f..1232a44b01 100644
--- a/server/src/main/java/com/vaadin/data/BufferedValidatable.java
+++ b/server/src/main/java/com/vaadin/data/BufferedValidatable.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,12 +24,12 @@ import java.io.Serializable;
* <code>Buffered</code> interfaces. The combination of the interfaces defines
* if the invalid data is committed to datasource.
* </p>
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
-public interface BufferedValidatable extends Buffered, Validatable,
- Serializable {
+public interface BufferedValidatable
+ extends Buffered, Validatable, Serializable {
/**
* Tests if the invalid data is committed to datasource. The default is
diff --git a/server/src/main/java/com/vaadin/data/Collapsible.java b/server/src/main/java/com/vaadin/data/Collapsible.java
index 0ef290312d..a189c2ece8 100644
--- a/server/src/main/java/com/vaadin/data/Collapsible.java
+++ b/server/src/main/java/com/vaadin/data/Collapsible.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -35,7 +35,7 @@ import com.vaadin.data.Container.Ordered;
* {@linkContainer.Indexed}. From the accessors point of view, items in
* collapsed subtrees don't exist.
* <p>
- *
+ *
*/
public interface Collapsible extends Hierarchical, Ordered {
@@ -44,11 +44,11 @@ public interface Collapsible extends Hierarchical, Ordered {
* Collapsing the {@link Item} indicated by <code>itemId</code> hides all
* children, and their respective children, from the {@link Container}.
* </p>
- *
+ *
* <p>
* If called on a leaf {@link Item}, this method does nothing.
* </p>
- *
+ *
* @param itemId
* the identifier of the collapsed {@link Item}
* @param collapsed
@@ -63,12 +63,12 @@ public interface Collapsible extends Hierarchical, Ordered {
* Checks whether the {@link Item}, identified by <code>itemId</code> is
* collapsed or not.
* </p>
- *
+ *
* <p>
* If an {@link Item} is "collapsed" its children are not included in
* methods used to list Items in this container.
* </p>
- *
+ *
* @param itemId
* The {@link Item}'s identifier that is to be checked.
* @return <code>true</code> iff the {@link Item} identified by
diff --git a/server/src/main/java/com/vaadin/data/Container.java b/server/src/main/java/com/vaadin/data/Container.java
index fb7a93e832..6832a57b06 100644
--- a/server/src/main/java/com/vaadin/data/Container.java
+++ b/server/src/main/java/com/vaadin/data/Container.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ import com.vaadin.data.util.filter.UnsupportedFilterException;
* {@link Item}s, but it imposes certain constraints on its contents. These
* constraints state the following:
* </p>
- *
+ *
* <ul>
* <li>All Items in the Container must have the same number of Properties.
* <li>All Items in the Container must have the same Property ID's (see
@@ -39,7 +39,7 @@ import com.vaadin.data.util.filter.UnsupportedFilterException;
* <li>All Items within a container are uniquely identified by their non-null
* IDs.
* </ul>
- *
+ *
* <p>
* The Container can be visualized as a representation of a relational database
* table. Each Item in the Container represents a row in the table, and all
@@ -47,18 +47,18 @@ import com.vaadin.data.util.filter.UnsupportedFilterException;
* that as with the cells in a database table, no Property in a Container may be
* empty, though they may contain <code>null</code> values.
* </p>
- *
+ *
* <p>
* Note that though uniquely identified, the Items in a Container are not
* necessarily {@link Container.Ordered ordered} or {@link Container.Indexed
* indexed}.
* </p>
- *
+ *
* <p>
* Containers can derive Item ID's from the item properties or use other,
* container specific or user specified identifiers.
* </p>
- *
+ *
* <p>
* If a container is {@link Filterable filtered} or {@link Sortable sorted},
* most of the the methods of the container interface and its subinterfaces
@@ -67,16 +67,16 @@ import com.vaadin.data.util.filter.UnsupportedFilterException;
* See individual method javadoc for exceptions to this (adding and removing
* items).
* </p>
- *
+ *
* <p>
* <img src=doc-files/Container_full.gif>
* </p>
- *
+ *
* <p>
* The Container interface is split to several subinterfaces so that a class can
* implement only the ones it needs.
* </p>
- *
+ *
* @author Vaadin Ltd
* @since 3.0
*/
@@ -88,7 +88,7 @@ public interface Container extends Serializable {
* returned.
* <p>
* Containers should not return Items that are filtered out.
- *
+ *
* @param itemId
* ID of the {@link Item} to retrieve
* @return the {@link Item} with the given ID or <code>null</code> if the
@@ -99,7 +99,7 @@ public interface Container extends Serializable {
/**
* Gets the ID's of all Properties stored in the Container. The ID's cannot
* be modified through the returned collection.
- *
+ *
* @return unmodifiable collection of Property IDs
*/
public Collection<?> getContainerPropertyIds();
@@ -115,7 +115,7 @@ public interface Container extends Serializable {
* <p>
* Calling this method for large lazy containers can be an expensive
* operation and should be avoided when practical.
- *
+ *
* @return unmodifiable collection of Item IDs
*/
public Collection<?> getItemIds();
@@ -125,7 +125,7 @@ public interface Container extends Serializable {
* Container. If the Container does not contain the item or it is filtered
* out, or the Container does not have the Property, <code>null</code> is
* returned.
- *
+ *
* @param itemId
* ID of the visible Item which contains the Property
* @param propertyId
@@ -136,7 +136,7 @@ public interface Container extends Serializable {
/**
* Gets the data type of all Properties identified by the given Property ID.
- *
+ *
* @param propertyId
* ID identifying the Properties
* @return data type of the Properties
@@ -148,7 +148,7 @@ public interface Container extends Serializable {
* <p>
* Filtering can hide items so that they will not be visible through the
* container API.
- *
+ *
* @return number of Items in the Container
*/
public int size();
@@ -160,7 +160,7 @@ public interface Container extends Serializable {
* container API, and this method should respect visibility of items (i.e.
* only indicate visible items as being in the container) if feasible for
* the container.
- *
+ *
* @param itemId
* ID the of Item to be tested
* @return boolean indicating if the Container holds the specified Item
@@ -169,17 +169,17 @@ public interface Container extends Serializable {
/**
* Creates a new Item with the given ID in the Container.
- *
+ *
* <p>
* The new Item is returned, and it is ready to have its Properties
* modified. Returns <code>null</code> if the operation fails or the
* Container already contains a Item with the given ID.
* </p>
- *
+ *
* <p>
* This functionality is optional.
* </p>
- *
+ *
* @param itemId
* ID of the Item to be created
* @return Created new Item, or <code>null</code> in case of a failure
@@ -191,17 +191,17 @@ public interface Container extends Serializable {
/**
* Creates a new Item into the Container, and assign it an automatic ID.
- *
+ *
* <p>
* The new ID is returned, or <code>null</code> if the operation fails.
* After a successful call you can use the {@link #getItem(Object ItemId)
* <code>getItem</code>}method to fetch the Item.
* </p>
- *
+ *
* <p>
* This functionality is optional.
* </p>
- *
+ *
* @return ID of the newly created Item, or <code>null</code> in case of a
* failure
* @throws UnsupportedOperationException
@@ -212,16 +212,16 @@ public interface Container extends Serializable {
/**
* Removes the Item identified by <code>ItemId</code> from the Container.
- *
+ *
* <p>
* Containers that support filtering should also allow removing an item that
* is currently filtered out.
* </p>
- *
+ *
* <p>
* This functionality is optional.
* </p>
- *
+ *
* @param itemId
* ID of the Item to remove
* @return <code>true</code> if the operation succeeded, <code>false</code>
@@ -237,7 +237,7 @@ public interface Container extends Serializable {
* type and default value of the new Property are given as parameters.
* <p>
* This functionality is optional.
- *
+ *
* @param propertyId
* ID of the Property
* @param type
@@ -258,7 +258,7 @@ public interface Container extends Serializable {
* Note that the Property will be removed from all Items in the Container.
* <p>
* This functionality is optional.
- *
+ *
* @param propertyId
* ID of the Property to remove
* @return <code>true</code> if the operation succeeded, <code>false</code>
@@ -272,12 +272,12 @@ public interface Container extends Serializable {
/**
* Removes all Items from the Container.
- *
+ *
* <p>
* Note that Property ID and type information is preserved. This
* functionality is optional.
* </p>
- *
+ *
* @return <code>true</code> if the operation succeeded, <code>false</code>
* if not
* @throws UnsupportedOperationException
@@ -288,7 +288,7 @@ public interface Container extends Serializable {
/**
* Interface for Container classes whose {@link Item}s can be traversed in
* order.
- *
+ *
* <p>
* If the container is filtered or sorted, the traversal applies to the
* filtered and sorted view.
@@ -307,7 +307,7 @@ public interface Container extends Serializable {
* Gets the ID of the Item following the Item that corresponds to
* <code>itemId</code>. If the given Item is the last or not found in
* the Container, <code>null</code> is returned.
- *
+ *
* @param itemId
* ID of a visible Item in the Container
* @return ID of the next visible Item or <code>null</code>
@@ -318,7 +318,7 @@ public interface Container extends Serializable {
* Gets the ID of the Item preceding the Item that corresponds to
* <code>itemId</code>. If the given Item is the first or not found in
* the Container, <code>null</code> is returned.
- *
+ *
* @param itemId
* ID of a visible Item in the Container
* @return ID of the previous visible Item or <code>null</code>
@@ -327,14 +327,14 @@ public interface Container extends Serializable {
/**
* Gets the ID of the first Item in the Container.
- *
+ *
* @return ID of the first visible Item in the Container
*/
public Object firstItemId();
/**
* Gets the ID of the last Item in the Container..
- *
+ *
* @return ID of the last visible Item in the Container
*/
public Object lastItemId();
@@ -342,7 +342,7 @@ public interface Container extends Serializable {
/**
* Tests if the Item corresponding to the given Item ID is the first
* Item in the Container.
- *
+ *
* @param itemId
* ID of an Item in the Container
* @return <code>true</code> if the Item is first visible item in the
@@ -353,7 +353,7 @@ public interface Container extends Serializable {
/**
* Tests if the Item corresponding to the given Item ID is the last Item
* in the Container.
- *
+ *
* @return <code>true</code> if the Item is last visible item in the
* Container, <code>false</code> if not
*/
@@ -365,9 +365,9 @@ public interface Container extends Serializable {
* Adding an item after null item adds the item as first item of the
* ordered container.
* </p>
- *
+ *
* @see Ordered Ordered: adding items in filtered or sorted containers
- *
+ *
* @param previousItemId
* Id of the visible item in ordered container after which to
* insert the new item.
@@ -385,9 +385,9 @@ public interface Container extends Serializable {
* Adding an item after null item adds the item as first item of the
* ordered container.
* </p>
- *
+ *
* @see Ordered Ordered: adding items in filtered or sorted containers
- *
+ *
* @param previousItemId
* Id of the visible item in ordered container after which to
* insert the new item.
@@ -431,7 +431,7 @@ public interface Container extends Serializable {
* <p>
* Sorting a container can irreversibly change the order of its items or
* only change the order temporarily, depending on the container.
- *
+ *
* @param propertyId
* Array of container property IDs, whose values are used to
* sort the items in container as primary, secondary, ...
@@ -450,7 +450,7 @@ public interface Container extends Serializable {
/**
* Gets the container property IDs which can be used to sort the items.
- *
+ *
* @return the IDs of the properties that can be used for sorting the
* container
*/
@@ -474,7 +474,7 @@ public interface Container extends Serializable {
* Gets the index of the Item corresponding to the itemId. The following
* is <code>true</code> for the returned index: 0 <= index < size(), or
* index = -1 if there is no visible item with that id in the container.
- *
+ *
* @param itemId
* ID of an Item in the Container
* @return index of the Item, or -1 if (the filtered and sorted view of)
@@ -486,7 +486,7 @@ public interface Container extends Serializable {
* Get the item id for the item at the position given by
* <code>index</code>.
* <p>
- *
+ *
* @param index
* the index of the requested item id
* @return the item id of the item at the given index
@@ -512,7 +512,7 @@ public interface Container extends Serializable {
* <p>
* For quick migration to new API see:
* {@link ContainerHelpers#getItemIdsUsingGetIdByIndex(int, int, Indexed)}
- *
+ *
* @param startIndex
* the index for the first item which id to include
* @param numberOfItems
@@ -520,7 +520,7 @@ public interface Container extends Serializable {
* start index, must be >= 0
* @return List containing the requested item ids or empty list if
* <code>numberOfItems</code> == 0; not null
- *
+ *
* @throws IllegalArgumentException
* if <code>numberOfItems</code> is < 0
* @throws IndexOutOfBoundsException
@@ -528,7 +528,7 @@ public interface Container extends Serializable {
* container. (i.e.
* <code>startIndex &lt; 0 || container.size()-1 &lt; startIndex</code>
* )
- *
+ *
* @since 7.0
*/
public List<?> getItemIds(int startIndex, int numberOfItems);
@@ -546,7 +546,7 @@ public interface Container extends Serializable {
* given position. See {@link Indexed}, {@link Ordered},
* {@link Filterable} and {@link Sortable} for more information.
* </p>
- *
+ *
* @param index
* Index (in the filtered and sorted view) to add the new
* item.
@@ -569,7 +569,7 @@ public interface Container extends Serializable {
* given position. See {@link Indexed}, {@link Filterable} and
* {@link Sortable} for more information.
* </p>
- *
+ *
* @param index
* Index (in the filtered and sorted view) at which to add
* the new item.
@@ -585,28 +585,28 @@ public interface Container extends Serializable {
/**
* An <code>Event</code> object specifying information about the added
* items.
- *
+ *
* @since 7.4
*/
public interface ItemAddEvent extends ItemSetChangeEvent {
/**
* Gets the item id of the first added item.
- *
+ *
* @return item id of the first added item
*/
public Object getFirstItemId();
/**
* Gets the index of the first added item.
- *
+ *
* @return index of the first added item
*/
public int getFirstIndex();
/**
* Gets the number of the added items.
- *
+ *
* @return the number of added items.
*/
public int getAddedItemsCount();
@@ -615,27 +615,27 @@ public interface Container extends Serializable {
/**
* An <code>Event</code> object specifying information about the removed
* items.
- *
+ *
* @since 7.4
*/
public interface ItemRemoveEvent extends ItemSetChangeEvent {
/**
* Gets the item id of the first removed item.
- *
+ *
* @return item id of the first removed item
*/
public Object getFirstItemId();
/**
* Gets the index of the first removed item.
- *
+ *
* @return index of the first removed item
*/
public int getFirstIndex();
/**
* Gets the number of the removed items.
- *
+ *
* @return the number of removed items
*/
public int getRemovedItemsCount();
@@ -648,7 +648,7 @@ public interface Container extends Serializable {
* hierarchically. This means that the Items in the container belong in a
* tree-like structure, with the following quirks:
* </p>
- *
+ *
* <ul>
* <li>The Item structure may have more than one root elements
* <li>The Items in the hierarchy can be declared explicitly to be able or
@@ -660,7 +660,7 @@ public interface Container extends Serializable {
/**
* Gets the IDs of all Items that are children of the specified Item.
* The returned collection is unmodifiable.
- *
+ *
* @param itemId
* ID of the Item whose children the caller is interested in
* @return An unmodifiable {@link java.util.Collection collection}
@@ -671,7 +671,7 @@ public interface Container extends Serializable {
/**
* Gets the ID of the parent Item of the specified Item.
- *
+ *
* @param itemId
* ID of the Item whose parent the caller wishes to find out.
* @return the ID of the parent Item. Will be <code>null</code> if the
@@ -683,7 +683,7 @@ public interface Container extends Serializable {
* Gets the IDs of all Items in the container that don't have a parent.
* Such items are called <code>root</code> Items. The returned
* collection is unmodifiable.
- *
+ *
* @return An unmodifiable {@link java.util.Collection collection}
* containing IDs of all root elements of the container
*/
@@ -697,11 +697,11 @@ public interface Container extends Serializable {
* also possible to detach a node from the hierarchy (and thus make it
* root) by setting the parent <code>null</code>.
* </p>
- *
+ *
* <p>
* This operation is optional.
* </p>
- *
+ *
* @param itemId
* ID of the item to be set as the child of the Item
* identified with <code>newParentId</code>
@@ -716,7 +716,7 @@ public interface Container extends Serializable {
/**
* Tests if the Item with given ID can have children.
- *
+ *
* @param itemId
* ID of the Item in the container whose child capability is
* to be tested
@@ -738,12 +738,12 @@ public interface Container extends Serializable {
* {@link #setParent(Object itemId, Object newParentId)}or
* {@link com.vaadin.data.Container#removeItem(Object itemId)}.
* </p>
- *
+ *
* <p>
* This operation is optional. If it is not implemented, the method
* always returns <code>false</code>.
* </p>
- *
+ *
* @param itemId
* ID of the Item in the container whose child capability is
* to be set
@@ -760,9 +760,10 @@ public interface Container extends Serializable {
/**
* Tests if the Item specified with <code>itemId</code> is a root Item.
* The hierarchical container can have more than one root and must have
- * at least one unless it is empty. The {@link #getParent(Object itemId)}
- * method always returns <code>null</code> for root Items.
- *
+ * at least one unless it is empty. The
+ * {@link #getParent(Object itemId)} method always returns
+ * <code>null</code> for root Items.
+ *
* @param itemId
* ID of the Item whose root status is to be tested
* @return <code>true</code> if the specified Item is a root,
@@ -776,12 +777,12 @@ public interface Container extends Serializable {
* or if it is a leaf. The {@link #getChildren(Object itemId)} method
* always returns <code>null</code> for leaf Items.
* </p>
- *
+ *
* <p>
* Note that being a leaf does not imply whether or not an Item is
* allowed to have children.
* </p>
- *
+ *
* @param itemId
* ID of the Item to be tested
* @return <code>true</code> if the specified Item has children,
@@ -794,11 +795,11 @@ public interface Container extends Serializable {
* Removes the Item identified by <code>ItemId</code> from the
* Container.
* </p>
- *
+ *
* <p>
* Note that this does not remove any children the item might have.
* </p>
- *
+ *
* @param itemId
* ID of the Item to remove
* @return <code>true</code> if the operation succeeded,
@@ -845,7 +846,7 @@ public interface Container extends Serializable {
* The functionality of SimpleFilterable can be implemented using the
* {@link Filterable} API and {@link SimpleStringFilter}.
* </p>
- *
+ *
* @since 5.0 (renamed from Filterable to SimpleFilterable in 6.6)
*/
public interface SimpleFilterable extends Container, Serializable {
@@ -863,7 +864,7 @@ public interface Container extends Serializable {
* <p>
* If a container has multiple filters, only items accepted by all
* filters are visible.
- *
+ *
* @param propertyId
* Property for which the filter is applied to.
* @param filterString
@@ -884,7 +885,7 @@ public interface Container extends Serializable {
/**
* Remove all filters from the given property.
- *
+ *
* @param propertyId
* for which to remove filters
*/
@@ -907,16 +908,16 @@ public interface Container extends Serializable {
* An {@link Filter} should implement {@link #equals(Object)} and
* {@link #hashCode()} correctly to avoid duplicate filter registrations
* etc.
- *
+ *
* @see Filterable
- *
+ *
* @since 6.6
*/
public interface Filter extends Serializable {
/**
* Check if an item passes the filter (in-memory filtering).
- *
+ *
* @param itemId
* identifier of the item being filtered; may be null when
* the item is being added to the container
@@ -932,10 +933,10 @@ public interface Container extends Serializable {
/**
* Check if a change in the value of a property can affect the filtering
* result. May always return true, at the cost of performance.
- *
+ *
* If the filter cannot determine whether it may depend on the property
* or not, should return true.
- *
+ *
* @param propertyId
* @return true if the filtering result may/does change based on changes
* to the property identified by propertyId
@@ -976,12 +977,12 @@ public interface Container extends Serializable {
* at index 0, at index {@link com.vaadin.data.Container#size()} or at an
* undefined position is up to the implementation.
* </p>
- *
+ *
* <p>
* This API replaces the old Filterable interface, renamed to
* {@link SimpleFilterable} in Vaadin 6.6.
* </p>
- *
+ *
* @since 6.6
*/
public interface Filterable extends Container, Serializable {
@@ -990,7 +991,7 @@ public interface Container extends Serializable {
* <p>
* If a container has multiple filters, only items accepted by all
* filters are visible.
- *
+ *
* @throws UnsupportedFilterException
* if the filter is not supported by the container
*/
@@ -1012,7 +1013,7 @@ public interface Container extends Serializable {
/**
* Returns the filters which have been applied to the container
- *
+ *
* @return A collection of filters which have been applied to the
* container. An empty collection if no filters have been
* applied.
@@ -1029,7 +1030,7 @@ public interface Container extends Serializable {
/**
* Sets the Container that serves as the data source of the viewer.
- *
+ *
* @param newDataSource
* The new data source Item
*/
@@ -1037,7 +1038,7 @@ public interface Container extends Serializable {
/**
* Gets the Container serving as the data source of the viewer.
- *
+ *
* @return data source Container
*/
public Container getContainerDataSource();
@@ -1065,14 +1066,14 @@ public interface Container extends Serializable {
/**
* An <code>Event</code> object specifying the Container whose Item set has
* changed (items added, removed or reordered).
- *
+ *
* A simple property value change is not an item set change.
*/
public interface ItemSetChangeEvent extends Serializable {
/**
* Gets the Property where the event occurred.
- *
+ *
* @return source of the event
*/
public Container getContainer();
@@ -1089,7 +1090,7 @@ public interface Container extends Serializable {
/**
* Lets the listener know a Containers visible (filtered and/or sorted,
* if applicable) Item set has changed.
- *
+ *
* @param event
* change event text
*/
@@ -1104,7 +1105,7 @@ public interface Container extends Serializable {
* <p>
* An item set change refers to addition, removal or reordering of items in
* the container. A simple property value change is not an item set change.
- *
+ *
* <p>
* Note: The general Java convention is not to explicitly declare that a
* class generates events, but to directly define the
@@ -1118,7 +1119,7 @@ public interface Container extends Serializable {
/**
* Adds an Item set change listener for the object.
- *
+ *
* @param listener
* listener to be added
*/
@@ -1134,7 +1135,7 @@ public interface Container extends Serializable {
/**
* Removes the Item set change listener from the object.
- *
+ *
* @param listener
* listener to be removed
*/
@@ -1164,7 +1165,7 @@ public interface Container extends Serializable {
/**
* Retrieves the Container whose contents have been modified.
- *
+ *
* @return Source Container of the event.
*/
public Container getContainer();
@@ -1184,7 +1185,7 @@ public interface Container extends Serializable {
/**
* Notifies this listener that the set of property IDs supported by the
* Container has changed.
- *
+ *
* @param event
* Change event.
*/
@@ -1199,14 +1200,14 @@ public interface Container extends Serializable {
* that it will generate a <code>PropertySetChangeEvent</code> when the set
* of property IDs supported by the container is modified.
* </p>
- *
+ *
* <p>
* A property set change means the addition, removal or other structural
* changes to the properties of a container. Changes concerning the set of
* items in the container and their property values are not property set
* changes.
* </p>
- *
+ *
* <p>
* Note that the general Java convention is not to explicitly declare that a
* class generates events, but to directly define the
@@ -1220,7 +1221,7 @@ public interface Container extends Serializable {
/**
* Registers a new Property set change listener for this Container.
- *
+ *
* @param listener
* The new Listener to be registered
*/
@@ -1236,7 +1237,7 @@ public interface Container extends Serializable {
/**
* Removes a previously registered Property set change listener.
- *
+ *
* @param listener
* Listener to be removed
*/
@@ -1248,6 +1249,7 @@ public interface Container extends Serializable {
* {@link #removePropertySetChangeListener(PropertySetChangeListener)}
**/
@Deprecated
- public void removeListener(Container.PropertySetChangeListener listener);
+ public void removeListener(
+ Container.PropertySetChangeListener listener);
}
}
diff --git a/server/src/main/java/com/vaadin/data/ContainerHelpers.java b/server/src/main/java/com/vaadin/data/ContainerHelpers.java
index 817bec9474..fcb5a78456 100644
--- a/server/src/main/java/com/vaadin/data/ContainerHelpers.java
+++ b/server/src/main/java/com/vaadin/data/ContainerHelpers.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.data.Container.Indexed;
/**
* Contains helper methods for containers that can be used to ease development
* of containers in Vaadin.
- *
+ *
* @since 7.0
*/
public class ContainerHelpers implements Serializable {
@@ -37,7 +37,7 @@ public class ContainerHelpers implements Serializable {
* during development. This should not be used in a "finished product"
* unless fetching an id for an index is very inexpensive because a separate
* request will be performed for each index in the range.
- *
+ *
* @param startIndex
* index of the first item id to get
* @param numberOfIds
@@ -88,8 +88,7 @@ public class ContainerHelpers implements Serializable {
Object idByIndex = container.getIdByIndex(i);
if (idByIndex == null) {
throw new RuntimeException(
- "Unable to get item id for index: "
- + i
+ "Unable to get item id for index: " + i
+ " from container using Container.Indexed#getIdByIndex() "
+ "even though container.size() > endIndex. "
+ "Returned item id was null. "
diff --git a/server/src/main/java/com/vaadin/data/Item.java b/server/src/main/java/com/vaadin/data/Item.java
index 13f965f098..dbffdaa0a2 100644
--- a/server/src/main/java/com/vaadin/data/Item.java
+++ b/server/src/main/java/com/vaadin/data/Item.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import java.util.Collection;
* locally unique non-null identifier. The interface is split into subinterfaces
* to enable a class to implement only the functionalities it needs.
* </p>
- *
+ *
* @author Vaadin Ltd
* @since 3.0
*/
@@ -35,7 +35,7 @@ public interface Item extends Serializable {
* Gets the Property corresponding to the given Property ID stored in the
* Item. If the Item does not contain the Property, <code>null</code> is
* returned.
- *
+ *
* @param id
* identifier of the Property to get
* @return the Property with the given ID or <code>null</code>
@@ -44,7 +44,7 @@ public interface Item extends Serializable {
/**
* Gets the collection of IDs of all Properties stored in the Item.
- *
+ *
* @return unmodifiable collection containing IDs of the Properties stored
* the Item
*/
@@ -52,11 +52,11 @@ public interface Item extends Serializable {
/**
* Tries to add a new Property into the Item.
- *
+ *
* <p>
* This functionality is optional.
* </p>
- *
+ *
* @param id
* ID of the new Property
* @param property
@@ -71,11 +71,11 @@ public interface Item extends Serializable {
/**
* Removes the Property identified by ID from the Item.
- *
+ *
* <p>
* This functionality is optional.
* </p>
- *
+ *
* @param id
* ID of the Property to be removed
* @return <code>true</code> if the operation succeeded
@@ -93,7 +93,7 @@ public interface Item extends Serializable {
/**
* Sets the Item that serves as the data source of the viewer.
- *
+ *
* @param newDataSource
* The new data source Item
*/
@@ -101,7 +101,7 @@ public interface Item extends Serializable {
/**
* Gets the Item serving as the data source of the viewer.
- *
+ *
* @return data source Item
*/
public Item getItemDataSource();
@@ -134,7 +134,7 @@ public interface Item extends Serializable {
/**
* Retrieves the Item whose contents has been modified.
- *
+ *
* @return source Item of the event
*/
public Item getItem();
@@ -148,7 +148,7 @@ public interface Item extends Serializable {
/**
* Notifies this listener that the Item's property set has changed.
- *
+ *
* @param event
* Property set change event object
*/
@@ -173,7 +173,7 @@ public interface Item extends Serializable {
/**
* Registers a new property set change listener for this Item.
- *
+ *
* @param listener
* The new Listener to be registered.
*/
@@ -189,7 +189,7 @@ public interface Item extends Serializable {
/**
* Removes a previously registered property set change listener.
- *
+ *
* @param listener
* Listener to be removed.
*/
diff --git a/server/src/main/java/com/vaadin/data/Property.java b/server/src/main/java/com/vaadin/data/Property.java
index 74ae1f86ec..ac19f27197 100644
--- a/server/src/main/java/com/vaadin/data/Property.java
+++ b/server/src/main/java/com/vaadin/data/Property.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,27 +24,27 @@ import java.io.Serializable;
* value. This interface contains methods to inspect and modify the stored value
* and its type, and the object's read-only state.
* </p>
- *
+ *
* <p>
* The <code>Property</code> also defines the events
* <code>ReadOnlyStatusChangeEvent</code> and <code>ValueChangeEvent</code>, and
* the associated <code>listener</code> and <code>notifier</code> interfaces.
* </p>
- *
+ *
* <p>
* The <code>Property.Viewer</code> interface should be used to attach the
* Property to an external data source. This way the value in the data source
* can be inspected using the <code>Property</code> interface.
* </p>
- *
+ *
* <p>
* The <code>Property.editor</code> interface should be implemented if the value
* needs to be changed through the implementing class.
* </p>
- *
+ *
* @param T
* type of values of the property
- *
+ *
* @author Vaadin Ltd
* @since 3.0
*/
@@ -53,7 +53,7 @@ public interface Property<T> extends Serializable {
/**
* Gets the value stored in the Property. The returned object is compatible
* with the class returned by getType().
- *
+ *
* @return the value stored in the Property
*/
public T getValue();
@@ -65,14 +65,14 @@ public interface Property<T> extends Serializable {
* missing, one should declare the Property to be in read-only mode and
* throw <code>Property.ReadOnlyException</code> in this function.
* </p>
- *
+ *
* Note : Since Vaadin 7.0, setting the value of a non-String property as a
* String is no longer supported.
- *
+ *
* @param newValue
* New value of the Property. This should be assignable to the
* type returned by getType
- *
+ *
* @throws Property.ReadOnlyException
* if the object is in read-only mode
*/
@@ -84,7 +84,7 @@ public interface Property<T> extends Serializable {
* to safely cast the value returned from <code>getValue</code> to the given
* type and pass any variable assignable to this type as an argument to
* <code>setValue</code>.
- *
+ *
* @return type of the Property
*/
public Class<? extends T> getType();
@@ -94,7 +94,7 @@ public interface Property<T> extends Serializable {
* the method <code>setValue</code> will throw
* <code>ReadOnlyException</code> and will not modify the value of the
* Property.
- *
+ *
* @return <code>true</code> if the Property is in read-only mode,
* <code>false</code> if it's not
*/
@@ -102,10 +102,10 @@ public interface Property<T> extends Serializable {
/**
* Sets the Property's read-only mode to the specified status.
- *
+ *
* This functionality is optional, but all properties must implement the
* <code>isReadOnly</code> mode query correctly.
- *
+ *
* @param newStatus
* new read-only status of the Property
*/
@@ -114,12 +114,12 @@ public interface Property<T> extends Serializable {
/**
* A Property that is capable of handle a transaction that can end in commit
* or rollback.
- *
+ *
* Note that this does not refer to e.g. database transactions but rather
* two-phase commit that allows resetting old field values (in e.g. a
* FieldGroup) if the commit of one of the properties fails after other
* properties have already been committed.
- *
+ *
* @param <T>
* The type of the property
* @author Vaadin Ltd
@@ -129,7 +129,7 @@ public interface Property<T> extends Serializable {
/**
* Starts a transaction.
- *
+ *
* <p>
* If the value is set during a transaction the value must not replace
* the original value until {@link #commit()} is called. Still,
@@ -173,7 +173,7 @@ public interface Property<T> extends Serializable {
/**
* <code>Exception</code> object that signals that a requested Property
* modification failed because it's in read-only mode.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -190,7 +190,7 @@ public interface Property<T> extends Serializable {
/**
* Constructs a new <code>ReadOnlyException</code> with the specified
* detail message.
- *
+ *
* @param msg
* the detail message
*/
@@ -202,7 +202,7 @@ public interface Property<T> extends Serializable {
/**
* Interface implemented by the viewer classes capable of using a Property
* as a data source.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -210,7 +210,7 @@ public interface Property<T> extends Serializable {
/**
* Sets the Property that serves as the data source of the viewer.
- *
+ *
* @param newDataSource
* the new data source Property
*/
@@ -218,7 +218,7 @@ public interface Property<T> extends Serializable {
/**
* Gets the Property serving as the data source of the viewer.
- *
+ *
* @return the Property serving as the viewers data source
*/
public Property getPropertyDataSource();
@@ -234,7 +234,7 @@ public interface Property<T> extends Serializable {
* Property is in a read-only mode, attempts to modify it will result in the
* <code>ReadOnlyException</code> being thrown.
* </p>
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -247,7 +247,7 @@ public interface Property<T> extends Serializable {
/**
* An <code>Event</code> object specifying the Property whose value has been
* changed.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -255,7 +255,7 @@ public interface Property<T> extends Serializable {
/**
* Retrieves the Property that has been modified.
- *
+ *
* @return source Property of the event
*/
public Property getProperty();
@@ -264,7 +264,7 @@ public interface Property<T> extends Serializable {
/**
* The <code>listener</code> interface for receiving
* <code>ValueChangeEvent</code> objects.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -272,7 +272,7 @@ public interface Property<T> extends Serializable {
/**
* Notifies this listener that the Property's value has changed.
- *
+ *
* @param event
* value change event object
*/
@@ -292,7 +292,7 @@ public interface Property<T> extends Serializable {
* class really will send the events, or if it just defines the methods to
* be able to implement an interface.
* </p>
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -300,11 +300,12 @@ public interface Property<T> extends Serializable {
/**
* Registers a new value change listener for this Property.
- *
+ *
* @param listener
* the new Listener to be registered
*/
- public void addValueChangeListener(Property.ValueChangeListener listener);
+ public void addValueChangeListener(
+ Property.ValueChangeListener listener);
/**
* @deprecated As of 7.0, replaced by
@@ -315,7 +316,7 @@ public interface Property<T> extends Serializable {
/**
* Removes a previously registered value change listener.
- *
+ *
* @param listener
* listener to be removed
*/
@@ -335,7 +336,7 @@ public interface Property<T> extends Serializable {
/**
* An <code>Event</code> object specifying the Property whose read-only
* status has been changed.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -343,7 +344,7 @@ public interface Property<T> extends Serializable {
/**
* Property whose read-only state has changed.
- *
+ *
* @return source Property of the event.
*/
public Property getProperty();
@@ -352,7 +353,7 @@ public interface Property<T> extends Serializable {
/**
* The listener interface for receiving
* <code>ReadOnlyStatusChangeEvent</code> objects.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -361,7 +362,7 @@ public interface Property<T> extends Serializable {
/**
* Notifies this listener that a Property's read-only status has
* changed.
- *
+ *
* @param event
* Read-only status change event object
*/
@@ -382,7 +383,7 @@ public interface Property<T> extends Serializable {
* class really will send the events, or if it just defines the methods to
* be able to implement an interface.
* </p>
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -390,7 +391,7 @@ public interface Property<T> extends Serializable {
/**
* Registers a new read-only status change listener for this Property.
- *
+ *
* @param listener
* the new Listener to be registered
*/
@@ -406,7 +407,7 @@ public interface Property<T> extends Serializable {
/**
* Removes a previously registered read-only status change listener.
- *
+ *
* @param listener
* listener to be removed
*/
diff --git a/server/src/main/java/com/vaadin/data/Validatable.java b/server/src/main/java/com/vaadin/data/Validatable.java
index 1ae7cd8cee..365f855299 100644
--- a/server/src/main/java/com/vaadin/data/Validatable.java
+++ b/server/src/main/java/com/vaadin/data/Validatable.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import java.util.Collection;
* value is valid or not, and to add, remove and list registered validators of
* the object.
* </p>
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
* @see com.vaadin.data.Validator
@@ -39,7 +39,7 @@ public interface Validatable extends Serializable {
* object's value needs to be verified, that is, when the {@link #isValid()}
* method is called. This usually happens when the object's value changes.
* </p>
- *
+ *
* @param validator
* the new validator
*/
@@ -51,7 +51,7 @@ public interface Validatable extends Serializable {
* validator is removed from the object and its <code>validate</code> method
* is no longer called in {@link #isValid()}.
* </p>
- *
+ *
* @param validator
* the validator to remove
*/
@@ -72,7 +72,7 @@ public interface Validatable extends Serializable {
* the collection may be unsafe (e.g. may throw
* <code>ConcurrentModificationException</code>.)
* </p>
- *
+ *
* @return A collection of validators
*/
public Collection<Validator> getValidators();
@@ -85,7 +85,7 @@ public interface Validatable extends Serializable {
* throws the {@link Validator.InvalidValueException} this method returns
* <code>false</code>.
* </p>
- *
+ *
* @return <code>true</code> if the registered validators concur that the
* value is valid, <code>false</code> otherwise
*/
@@ -97,7 +97,7 @@ public interface Validatable extends Serializable {
* method should do nothing, and if it's not valid, it should throw
* <code>Validator.InvalidValueException</code>
* </p>
- *
+ *
* @throws Validator.InvalidValueException
* if the value is not valid
*/
@@ -108,7 +108,7 @@ public interface Validatable extends Serializable {
* Checks the validabtable object accept invalid values.The default value is
* <code>true</code>.
* </p>
- *
+ *
*/
public boolean isInvalidAllowed();
@@ -118,9 +118,9 @@ public interface Validatable extends Serializable {
* configuration possibility is optional. By default invalid values are
* allowed.
* </p>
- *
+ *
* @param invalidValueAllowed
- *
+ *
* @throws UnsupportedOperationException
* if the setInvalidAllowed is not supported.
*/
diff --git a/server/src/main/java/com/vaadin/data/Validator.java b/server/src/main/java/com/vaadin/data/Validator.java
index d567267338..8929843874 100644
--- a/server/src/main/java/com/vaadin/data/Validator.java
+++ b/server/src/main/java/com/vaadin/data/Validator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -43,7 +43,7 @@ import com.vaadin.server.VaadinServlet;
* internally implement and use isValid(Object) for convenience or to ease
* migration from earlier Vaadin versions.
* </p>
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -53,7 +53,7 @@ public interface Validator extends Serializable {
* Checks the given value against this validator. If the value is valid the
* method does nothing. If the value is invalid, an
* {@link InvalidValueException} is thrown.
- *
+ *
* @param value
* the value to check
* @throws Validator.InvalidValueException
@@ -63,13 +63,13 @@ public interface Validator extends Serializable {
/**
* Exception that is thrown by a {@link Validator} when a value is invalid.
- *
+ *
* <p>
* The default implementation of InvalidValueException does not support HTML
* in error messages. To enable HTML support, override
* {@link #getHtmlMessage()} and use the subclass in validators.
* </p>
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -85,7 +85,7 @@ public interface Validator extends Serializable {
/**
* Constructs a new {@code InvalidValueException} with the specified
* message.
- *
+ *
* @param message
* The detail message of the problem.
*/
@@ -97,7 +97,7 @@ public interface Validator extends Serializable {
* Constructs a new {@code InvalidValueException} with a set of causing
* validation exceptions. The causing validation exceptions are included
* when the exception is painted to the client.
- *
+ *
* @param message
* The detail message of the problem.
* @param causes
@@ -117,10 +117,10 @@ public interface Validator extends Serializable {
/**
* Check if the error message should be hidden.
- *
+ *
* An empty (null or "") message is invisible unless it contains nested
* exceptions that are visible.
- *
+ *
* @return true if the error message should be hidden, false otherwise
*/
public boolean isInvisible() {
@@ -140,7 +140,7 @@ public interface Validator extends Serializable {
/**
* Returns the message of the error in HTML.
- *
+ *
* Note that this API may change in future versions.
*/
public String getHtmlMessage() {
@@ -150,7 +150,7 @@ public interface Validator extends Serializable {
/**
* Returns the {@code InvalidValueExceptions} that caused this
* exception.
- *
+ *
* @return An array containing the {@code InvalidValueExceptions} that
* caused this exception. Returns an empty array if this
* exception was not caused by other exceptions.
@@ -165,7 +165,7 @@ public interface Validator extends Serializable {
* A specific type of {@link InvalidValueException} that indicates that
* validation failed because the value was empty. What empty means is up to
* the thrower.
- *
+ *
* @author Vaadin Ltd.
* @since 5.3.0
*/
diff --git a/server/src/main/java/com/vaadin/data/fieldgroup/BeanFieldGroup.java b/server/src/main/java/com/vaadin/data/fieldgroup/BeanFieldGroup.java
index 0a92c00cad..a86035fdc0 100644
--- a/server/src/main/java/com/vaadin/data/fieldgroup/BeanFieldGroup.java
+++ b/server/src/main/java/com/vaadin/data/fieldgroup/BeanFieldGroup.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -54,15 +54,15 @@ public class BeanFieldGroup<T> extends FieldGroup {
propertyId.toString());
if (type == null) {
throw new BindException(
- "Cannot determine type of propertyId '"
- + propertyId
+ "Cannot determine type of propertyId '" + propertyId
+ "'. The propertyId was not found in "
+ beanType.getName());
}
return type;
} catch (IntrospectionException e) {
throw new BindException("Cannot determine type of propertyId '"
- + propertyId + "'. Unable to introspect " + beanType, e);
+ + propertyId + "'. Unable to introspect " + beanType,
+ e);
}
}
}
@@ -71,7 +71,8 @@ public class BeanFieldGroup<T> extends FieldGroup {
protected Object findPropertyId(java.lang.reflect.Field memberField) {
String fieldName = memberField.getName();
Item dataSource = getItemDataSource();
- if (dataSource != null && dataSource.getItemProperty(fieldName) != null) {
+ if (dataSource != null
+ && dataSource.getItemProperty(fieldName) != null) {
return fieldName;
} else {
String minifiedFieldName = minifyFieldName(fieldName);
@@ -107,7 +108,7 @@ public class BeanFieldGroup<T> extends FieldGroup {
* <p>
* For null values, a null item is passed to
* {@link #setItemDataSource(Item)} to be properly clear fields.
- *
+ *
* @param bean
* The bean to use as data source.
*/
@@ -190,9 +191,9 @@ public class BeanFieldGroup<T> extends FieldGroup {
/**
* Checks whether a bean validation implementation (e.g. Hibernate Validator
* or Apache Bean Validation) is available.
- *
+ *
* TODO move this method to some more generic location
- *
+ *
* @return true if a JSR-303 bean validation implementation is available
*/
protected static boolean isBeanValidationImplementationAvailable() {
@@ -219,7 +220,7 @@ public class BeanFieldGroup<T> extends FieldGroup {
* <p>
* The returned {@link BeanFieldGroup} can be used for further
* configuration.
- *
+ *
* @see #bindFieldsBuffered(Object, Object)
* @see #bindMemberFields(Object)
* @since 7.2
@@ -240,7 +241,7 @@ public class BeanFieldGroup<T> extends FieldGroup {
* <p>
* The returned {@link BeanFieldGroup} can be used for further
* configuration.
- *
+ *
* @see #bindFieldsUnbuffered(Object, Object)
* @see #bindMemberFields(Object)
* @since 7.2
diff --git a/server/src/main/java/com/vaadin/data/fieldgroup/Caption.java b/server/src/main/java/com/vaadin/data/fieldgroup/Caption.java
index efe6f99d9a..75056fbe5c 100644
--- a/server/src/main/java/com/vaadin/data/fieldgroup/Caption.java
+++ b/server/src/main/java/com/vaadin/data/fieldgroup/Caption.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/main/java/com/vaadin/data/fieldgroup/DefaultFieldGroupFieldFactory.java b/server/src/main/java/com/vaadin/data/fieldgroup/DefaultFieldGroupFieldFactory.java
index b6bf97e68e..14b92ff850 100644
--- a/server/src/main/java/com/vaadin/data/fieldgroup/DefaultFieldGroupFieldFactory.java
+++ b/server/src/main/java/com/vaadin/data/fieldgroup/DefaultFieldGroupFieldFactory.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -40,7 +40,7 @@ import com.vaadin.ui.TextField;
* This class contains a basic implementation for {@link FieldGroupFieldFactory}
* .The class is singleton, use {@link #get()} method to get reference to the
* instance.
- *
+ *
* @author Vaadin Ltd
*/
public class DefaultFieldGroupFieldFactory implements FieldGroupFieldFactory {
@@ -54,9 +54,9 @@ public class DefaultFieldGroupFieldFactory implements FieldGroupFieldFactory {
/**
* Gets the singleton instance.
- *
+ *
* @since 7.4
- *
+ *
* @return the singleton instance
*/
public static DefaultFieldGroupFieldFactory get() {
@@ -74,8 +74,8 @@ public class DefaultFieldGroupFieldFactory implements FieldGroupFieldFactory {
return createBooleanField(fieldType);
}
if (AbstractTextField.class.isAssignableFrom(fieldType)) {
- return fieldType.cast(createAbstractTextField(fieldType
- .asSubclass(AbstractTextField.class)));
+ return fieldType.cast(createAbstractTextField(
+ fieldType.asSubclass(AbstractTextField.class)));
} else if (fieldType == RichTextArea.class) {
return fieldType.cast(createRichTextArea());
}
@@ -104,7 +104,8 @@ public class DefaultFieldGroupFieldFactory implements FieldGroupFieldFactory {
populateWithEnumData(s, (Class<? extends Enum>) type);
return (T) s;
} else if (AbstractTextField.class.isAssignableFrom(fieldType)) {
- return (T) createAbstractTextField((Class<? extends AbstractTextField>) fieldType);
+ return (T) createAbstractTextField(
+ (Class<? extends AbstractTextField>) fieldType);
}
return null;
@@ -120,7 +121,8 @@ public class DefaultFieldGroupFieldFactory implements FieldGroupFieldFactory {
|| DateField.class.isAssignableFrom(fieldType)) {
field = new PopupDateField();
} else if (AbstractTextField.class.isAssignableFrom(fieldType)) {
- field = createAbstractTextField((Class<? extends AbstractTextField>) fieldType);
+ field = createAbstractTextField(
+ (Class<? extends AbstractTextField>) fieldType);
} else {
return null;
}
@@ -179,7 +181,8 @@ public class DefaultFieldGroupFieldFactory implements FieldGroupFieldFactory {
cb.setImmediate(true);
return (T) cb;
} else if (AbstractTextField.class.isAssignableFrom(fieldType)) {
- return (T) createAbstractTextField((Class<? extends AbstractTextField>) fieldType);
+ return (T) createAbstractTextField(
+ (Class<? extends AbstractTextField>) fieldType);
}
return null;
@@ -195,15 +198,15 @@ public class DefaultFieldGroupFieldFactory implements FieldGroupFieldFactory {
field.setImmediate(true);
return field;
} catch (Exception e) {
- throw new BindException("Could not create a field of type "
- + fieldType, e);
+ throw new BindException(
+ "Could not create a field of type " + fieldType, e);
}
}
/**
* Fallback when no specific field has been created. Typically returns a
* TextField.
- *
+ *
* @param <T>
* The type of field to create
* @param type
@@ -224,7 +227,7 @@ public class DefaultFieldGroupFieldFactory implements FieldGroupFieldFactory {
/**
* Populates the given select with all the enums in the given {@link Enum}
* class. Uses {@link Enum}.toString() for caption.
- *
+ *
* @param select
* The select to populate
* @param enumClass
diff --git a/server/src/main/java/com/vaadin/data/fieldgroup/FieldGroup.java b/server/src/main/java/com/vaadin/data/fieldgroup/FieldGroup.java
index aaaae9e4f7..85db78f50e 100644
--- a/server/src/main/java/com/vaadin/data/fieldgroup/FieldGroup.java
+++ b/server/src/main/java/com/vaadin/data/fieldgroup/FieldGroup.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -50,7 +50,7 @@ import com.vaadin.util.ReflectTools;
* using a FieldGroupFieldFactory but you still have to add them to the correct
* position in your layout.
* </p>
- *
+ *
* @author Vaadin Ltd
* @since 7.0
*/
@@ -75,7 +75,7 @@ public class FieldGroup implements Serializable {
/**
* Constructs a field binder. Use {@link #setItemDataSource(Item)} to set a
* data source for the field binder.
- *
+ *
*/
public FieldGroup() {
@@ -83,7 +83,7 @@ public class FieldGroup implements Serializable {
/**
* Constructs a field binder that uses the given data source.
- *
+ *
* @param itemDataSource
* The data source to bind the fields to
*/
@@ -94,7 +94,7 @@ public class FieldGroup implements Serializable {
/**
* Updates the item that is used by this FieldBinder. Rebinds all fields to
* the properties in the new item.
- *
+ *
* @param itemDataSource
* The new item to use
*/
@@ -110,10 +110,10 @@ public class FieldGroup implements Serializable {
* Gets the item used by this FieldBinder. Note that you must call
* {@link #commit()} for the item to be updated unless buffered mode has
* been switched off.
- *
+ *
* @see #setBuffered(boolean)
* @see #commit()
- *
+ *
* @return The item used by this FieldBinder
*/
public Item getItemDataSource() {
@@ -123,12 +123,12 @@ public class FieldGroup implements Serializable {
/**
* Checks the buffered mode for the bound fields.
* <p>
- *
+ *
* @see #setBuffered(boolean) for more details on buffered mode
- *
+ *
* @see Field#isBuffered()
* @return true if buffered mode is on, false otherwise
- *
+ *
*/
public boolean isBuffered() {
return buffered;
@@ -144,7 +144,7 @@ public class FieldGroup implements Serializable {
* <p>
* The default is to use buffered mode.
* </p>
- *
+ *
* @see Field#setBuffered(boolean)
* @param buffered
* true to turn on buffered mode, false otherwise
@@ -166,7 +166,7 @@ public class FieldGroup implements Serializable {
* Note that this will not accurately represent the enabled status of all
* fields if you change the enabled status of the fields through some other
* method than {@link #setEnabled(boolean)}.
- *
+ *
* @return true if the fields are enabled, false otherwise
*/
public boolean isEnabled() {
@@ -175,7 +175,7 @@ public class FieldGroup implements Serializable {
/**
* Updates the enabled state of all bound fields.
- *
+ *
* @param fieldsEnabled
* true to enable all bound fields, false to disable them
*/
@@ -193,7 +193,7 @@ public class FieldGroup implements Serializable {
* Note that this will not accurately represent the read only status of all
* fields if you change the read only status of the fields through some
* other method than {@link #setReadOnly(boolean)}.
- *
+ *
* @return true if the fields are set to read only, false otherwise
*/
public boolean isReadOnly() {
@@ -204,7 +204,7 @@ public class FieldGroup implements Serializable {
* Sets the read only state to the given value for all fields with writable
* data source. Fields with read only data source will always be set to read
* only.
- *
+ *
* @param fieldsReadOnly
* true to set the fields with writable data source to read only,
* false to set them to read write
@@ -226,7 +226,7 @@ public class FieldGroup implements Serializable {
* <p>
* The fields are not returned in any specific order.
* </p>
- *
+ *
* @return A collection with all bound Fields
*/
public Collection<Field<?>> getFields() {
@@ -240,7 +240,7 @@ public class FieldGroup implements Serializable {
* <p>
* This method also adds validators when applicable.
* </p>
- *
+ *
* @param field
* The field to bind
* @param propertyId
@@ -275,7 +275,8 @@ public class FieldGroup implements Serializable {
return;
}
- field.setPropertyDataSource(wrapInTransactionalProperty(getItemProperty(propertyId)));
+ field.setPropertyDataSource(
+ wrapInTransactionalProperty(getItemProperty(propertyId)));
configureField(field);
}
@@ -289,14 +290,14 @@ public class FieldGroup implements Serializable {
private void throwIfFieldIsNull(Field<?> field, Object propertyId) {
if (field == null) {
- throw new BindException(
- String.format(
- "Cannot bind property id '%s' to a null field.",
- propertyId));
+ throw new BindException(String.format(
+ "Cannot bind property id '%s' to a null field.",
+ propertyId));
}
}
- private void throwIfPropertyIdAlreadyBound(Field<?> field, Object propertyId) {
+ private void throwIfPropertyIdAlreadyBound(Field<?> field,
+ Object propertyId) {
if (propertyIdToField.containsKey(propertyId)
&& propertyIdToField.get(propertyId) != field) {
throw new BindException("Property id " + propertyId
@@ -306,7 +307,7 @@ public class FieldGroup implements Serializable {
/**
* Gets the property with the given property id from the item.
- *
+ *
* @param propertyId
* The id if the property to find
* @return The property with the given id from the item
@@ -335,7 +336,7 @@ public class FieldGroup implements Serializable {
* Note that the field is not detached from its property data source if it
* is no longer connected to the same property id it was bound to using this
* FieldBinder.
- *
+ *
* @param field
* The field to detach
* @throws BindException
@@ -374,7 +375,7 @@ public class FieldGroup implements Serializable {
* By default this updates the buffered, read only and enabled state of the
* field. Also adds validators when applicable. Fields with read only data
* source are always configured as read only.
- *
+ *
* @param field
* The field to update
*/
@@ -392,24 +393,20 @@ public class FieldGroup implements Serializable {
/**
* Gets the type of the property with the given property id.
- *
+ *
* @param propertyId
* The propertyId. Must be find
* @return The type of the property
*/
protected Class<?> getPropertyType(Object propertyId) throws BindException {
if (getItemDataSource() == null) {
- throw new BindException(
- "Property type for '"
- + propertyId
- + "' could not be determined. No item data source has been set.");
+ throw new BindException("Property type for '" + propertyId
+ + "' could not be determined. No item data source has been set.");
}
Property<?> p = getItemDataSource().getItemProperty(propertyId);
if (p == null) {
- throw new BindException(
- "Property type for '"
- + propertyId
- + "' could not be determined. No property with that id was found.");
+ throw new BindException("Property type for '" + propertyId
+ + "' could not be determined. No property with that id was found.");
}
return p.getType();
@@ -425,7 +422,7 @@ public class FieldGroup implements Serializable {
* <p>
* No guarantee is given for the order of the property ids
* </p>
- *
+ *
* @return A collection of bound property ids
*/
public Collection<Object> getBoundPropertyIds() {
@@ -442,7 +439,7 @@ public class FieldGroup implements Serializable {
* <p>
* No guarantee is given for the order of the property ids
* </p>
- *
+ *
* @return A collection of property ids that have not been bound to fields
*/
public Collection<Object> getUnboundPropertyIds() {
@@ -463,7 +460,7 @@ public class FieldGroup implements Serializable {
* restored to what it was before commit was called if any
* {@link CommitHandler} throws a CommitException or there is a problem
* committing the fields
- *
+ *
* @throws CommitException
* If the commit was aborted
*/
@@ -497,7 +494,7 @@ public class FieldGroup implements Serializable {
/**
* Tries to commit all bound fields one by one and gathers any validation
* exceptions in a map, which is returned to the caller
- *
+ *
* @return a propertyId to validation exception map which is empty if all
* commits succeeded
*/
@@ -518,16 +515,16 @@ public class FieldGroup implements Serializable {
/**
* Exception which wraps InvalidValueExceptions from all invalid fields in a
* FieldGroup
- *
+ *
* @since 7.4
*/
- public static class FieldGroupInvalidValueException extends
- InvalidValueException {
+ public static class FieldGroupInvalidValueException
+ extends InvalidValueException {
private Map<Field<?>, InvalidValueException> invalidValueExceptions;
/**
* Constructs a new exception with the specified validation exceptions.
- *
+ *
* @param invalidValueExceptions
* a property id to exception map
*/
@@ -554,9 +551,9 @@ public class FieldGroup implements Serializable {
Property.Transactional<?> property = (Property.Transactional<?>) f
.getPropertyDataSource();
if (property == null) {
- throw new CommitException("Property \""
- + fieldToPropertyId.get(f)
- + "\" not bound to datasource.");
+ throw new CommitException(
+ "Property \"" + fieldToPropertyId.get(f)
+ + "\" not bound to datasource.");
}
property.startTransaction();
}
@@ -581,7 +578,7 @@ public class FieldGroup implements Serializable {
/**
* Sends a preCommit event to all registered commit handlers
- *
+ *
* @throws CommitException
* If the commit should be aborted
*/
@@ -596,7 +593,7 @@ public class FieldGroup implements Serializable {
/**
* Sends a postCommit event to all registered commit handlers
- *
+ *
* @throws CommitException
* If the commit should be aborted
*/
@@ -613,7 +610,7 @@ public class FieldGroup implements Serializable {
* Discards all changes done to the bound fields.
* <p>
* Only has effect if buffered mode is used.
- *
+ *
*/
public void discard() {
for (Field<?> f : fieldToPropertyId.keySet()) {
@@ -629,7 +626,7 @@ public class FieldGroup implements Serializable {
/**
* Returns the field that is bound to the given property id
- *
+ *
* @param propertyId
* The property id to use to lookup the field
* @return The field that is bound to the property id or null if no field is
@@ -641,7 +638,7 @@ public class FieldGroup implements Serializable {
/**
* Returns the property id that is bound to the given field
- *
+ *
* @param field
* The field to use to lookup the property id
* @return The property id that is bound to the field or null if the field
@@ -659,7 +656,7 @@ public class FieldGroup implements Serializable {
* has been updated ({@link CommitHandler#postCommit(CommitEvent)}). If a
* {@link CommitHandler} throws a CommitException the whole commit is
* aborted and the fields retain their old values.
- *
+ *
* @param commitHandler
* The commit handler to add
*/
@@ -669,9 +666,9 @@ public class FieldGroup implements Serializable {
/**
* Removes the given commit handler.
- *
+ *
* @see #addCommitHandler(CommitHandler)
- *
+ *
* @param commitHandler
* The commit handler to remove
*/
@@ -685,7 +682,7 @@ public class FieldGroup implements Serializable {
* Use {@link #addCommitHandler(CommitHandler)} and
* {@link #removeCommitHandler(CommitHandler)} to register or unregister a
* commit handler.
- *
+ *
* @return A collection of commit handlers
*/
protected Collection<CommitHandler> getCommitHandlers() {
@@ -704,7 +701,7 @@ public class FieldGroup implements Serializable {
* updated.
* <p>
* Throw a {@link CommitException} to abort the commit.
- *
+ *
* @param commitEvent
* An event containing information regarding the commit
* @throws CommitException
@@ -717,7 +714,7 @@ public class FieldGroup implements Serializable {
* updated.
* <p>
* Throw a {@link CommitException} to abort the commit.
- *
+ *
* @param commitEvent
* An event containing information regarding the commit
* @throws CommitException
@@ -728,7 +725,7 @@ public class FieldGroup implements Serializable {
/**
* FIXME javadoc
- *
+ *
*/
public static class CommitEvent implements Serializable {
private FieldGroup fieldBinder;
@@ -739,7 +736,7 @@ public class FieldGroup implements Serializable {
/**
* Returns the field binder that this commit relates to
- *
+ *
* @return The FieldBinder that is being committed.
*/
public FieldGroup getFieldBinder() {
@@ -753,7 +750,7 @@ public class FieldGroup implements Serializable {
* <p>
* Call the {@link Field#validate()} for the fields to get the individual
* error messages.
- *
+ *
* @return true if all bound fields are valid, false otherwise.
*/
public boolean isValid() {
@@ -769,7 +766,7 @@ public class FieldGroup implements Serializable {
/**
* Checks if any bound field has been modified.
- *
+ *
* @return true if at least one field has been modified, false otherwise
*/
public boolean isModified() {
@@ -784,9 +781,9 @@ public class FieldGroup implements Serializable {
/**
* Gets the field factory for the {@link FieldGroup}. The field factory is
* only used when {@link FieldGroup} creates a new field.
- *
+ *
* @return The field factory in use
- *
+ *
*/
public FieldGroupFieldFactory getFieldFactory() {
return fieldFactory;
@@ -795,7 +792,7 @@ public class FieldGroup implements Serializable {
/**
* Sets the field factory for the {@link FieldGroup}. The field factory is
* only used when {@link FieldGroup} creates a new field.
- *
+ *
* @param fieldFactory
* The field factory to use
*/
@@ -814,24 +811,24 @@ public class FieldGroup implements Serializable {
* </p>
* <p>
* For example:
- *
+ *
* <pre>
* public class MyForm extends VerticalLayout {
* private TextField firstName = new TextField("First name");
- * @PropertyId("last")
+ * &#64;PropertyId("last")
* private TextField lastName = new TextField("Last name");
* private TextField age = new TextField("Age"); ... }
- *
+ *
* MyForm myForm = new MyForm();
* ...
* fieldGroup.bindMemberFields(myForm);
* </pre>
- *
+ *
* </p>
* This binds the firstName TextField to a "firstName" property in the item,
* lastName TextField to a "last" property and the age TextField to a "age"
* property.
- *
+ *
* @param objectWithMemberFields
* The object that contains (Java) member fields to bind
* @throws BindException
@@ -856,26 +853,26 @@ public class FieldGroup implements Serializable {
* </p>
* <p>
* For example:
- *
+ *
* <pre>
* public class MyForm extends VerticalLayout {
* private TextField firstName = new TextField("First name");
- * @PropertyId("last")
+ * &#64;PropertyId("last")
* private TextField lastName = new TextField("Last name");
* private TextField age;
- *
+ *
* MyForm myForm = new MyForm();
* ...
* fieldGroup.buildAndBindMemberFields(myForm);
* </pre>
- *
+ *
* </p>
* <p>
* This binds the firstName TextField to a "firstName" property in the item,
* lastName TextField to a "last" property and builds an age TextField using
* the field factory and then binds it to the "age" property.
* </p>
- *
+ *
* @param objectWithMemberFields
* The object that contains (Java) member fields to build and
* bind
@@ -899,7 +896,7 @@ public class FieldGroup implements Serializable {
* field factory is buildFields is true. All non-null fields for which a
* property id can be determined are bound to the property id.
* </p>
- *
+ *
* @param objectWithMemberFields
* The object that contains (Java) member fields to build and
* bind
@@ -910,7 +907,8 @@ public class FieldGroup implements Serializable {
boolean buildFields) throws BindException {
Class<?> objectClass = objectWithMemberFields.getClass();
- for (java.lang.reflect.Field memberField : getFieldsInDeclareOrder(objectClass)) {
+ for (java.lang.reflect.Field memberField : getFieldsInDeclareOrder(
+ objectClass)) {
if (!Field.class.isAssignableFrom(memberField.getType())) {
// Process next field
@@ -1012,7 +1010,7 @@ public class FieldGroup implements Serializable {
* buildAndBindMemberFields} can easily be customized by overriding this
* method. No other changes are needed.
* </p>
- *
+ *
* @param memberField
* The field an object id is searched for
* @return
@@ -1020,10 +1018,8 @@ public class FieldGroup implements Serializable {
protected Object findPropertyId(java.lang.reflect.Field memberField) {
String fieldName = memberField.getName();
if (getItemDataSource() == null) {
- throw new SearchException(
- "Property id type for field '"
- + fieldName
- + "' could not be determined. No item data source has been set.");
+ throw new SearchException("Property id type for field '" + fieldName
+ + "' could not be determined. No item data source has been set.");
}
Item dataSource = getItemDataSource();
if (dataSource.getItemProperty(fieldName) != null) {
@@ -1049,11 +1045,11 @@ public class FieldGroup implements Serializable {
/**
* Exception thrown by a FieldGroup when the commit operation fails.
- *
+ *
* Provides information about validation errors through
* {@link #getInvalidFields()} if the cause of the failure is that all bound
* fields did not pass validation
- *
+ *
*/
public static class CommitException extends Exception {
@@ -1099,7 +1095,7 @@ public class FieldGroup implements Serializable {
/**
* Returns the field group where the exception occurred
- *
+ *
* @since 7.4
* @return the field group
*/
@@ -1136,7 +1132,7 @@ public class FieldGroup implements Serializable {
/**
* Builds a field and binds it to the given property id using the field
* binder.
- *
+ *
* @param propertyId
* The property id to bind to. Must be present in the field
* finder.
@@ -1153,7 +1149,7 @@ public class FieldGroup implements Serializable {
/**
* Builds a field using the given caption and binds it to the given property
* id using the field binder.
- *
+ *
* @param caption
* The caption for the field
* @param propertyId
@@ -1171,7 +1167,7 @@ public class FieldGroup implements Serializable {
/**
* Builds a field using the given caption and binds it to the given property
* id using the field binder. Ensures the new field is of the given type.
- *
+ *
* @param caption
* The caption for the field
* @param propertyId
@@ -1199,7 +1195,7 @@ public class FieldGroup implements Serializable {
* type is the type of field we want to create, can be {@link Field} if any
* Field is good.
* </p>
- *
+ *
* @param caption
* The caption for the new field
* @param dataType
@@ -1214,9 +1210,9 @@ public class FieldGroup implements Serializable {
Class<T> fieldType) throws BindException {
T field = getFieldFactory().createField(dataType, fieldType);
if (field == null) {
- throw new BindException("Unable to build a field of type "
- + fieldType.getName() + " for editing "
- + dataType.getName());
+ throw new BindException(
+ "Unable to build a field of type " + fieldType.getName()
+ + " for editing " + dataType.getName());
}
field.setCaption(caption);
@@ -1228,7 +1224,7 @@ public class FieldGroup implements Serializable {
* the class or interface represented by this Class object. The elements in
* the array returned are sorted in declare order from sub class to super
* class.
- *
+ *
* @param searchClass
* @return
*/
@@ -1248,7 +1244,7 @@ public class FieldGroup implements Serializable {
/**
* Clears the value of all fields.
- *
+ *
* @since 7.4
*/
public void clear() {
diff --git a/server/src/main/java/com/vaadin/data/fieldgroup/FieldGroupFieldFactory.java b/server/src/main/java/com/vaadin/data/fieldgroup/FieldGroupFieldFactory.java
index 4aad08ba8d..59782f145f 100644
--- a/server/src/main/java/com/vaadin/data/fieldgroup/FieldGroupFieldFactory.java
+++ b/server/src/main/java/com/vaadin/data/fieldgroup/FieldGroupFieldFactory.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,14 +22,14 @@ import com.vaadin.ui.Field;
/**
* Factory interface for creating new Field-instances based on the data type
* that should be edited.
- *
+ *
* @author Vaadin Ltd.
* @since 7.0
*/
public interface FieldGroupFieldFactory extends Serializable {
/**
* Creates a field based on the data type that we want to edit
- *
+ *
* @param dataType
* The type that we want to edit using the field
* @param fieldType
diff --git a/server/src/main/java/com/vaadin/data/fieldgroup/PropertyId.java b/server/src/main/java/com/vaadin/data/fieldgroup/PropertyId.java
index e7fe50305e..cde2c2c1bd 100644
--- a/server/src/main/java/com/vaadin/data/fieldgroup/PropertyId.java
+++ b/server/src/main/java/com/vaadin/data/fieldgroup/PropertyId.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -38,18 +38,18 @@ import java.lang.annotation.Target;
&#64;PropertyId("foo")
TextField myField = new TextField();
}
-
+
class Entity {
String foo;
}
-
+
{
Editor e = new Editor();
BeanFieldGroup.bindFieldsUnbuffered(new Entity(), e);
}
</pre>
* </code>
- *
+ *
* @since 7.0
* @author Vaadin Ltd
*/
diff --git a/server/src/main/java/com/vaadin/data/sort/Sort.java b/server/src/main/java/com/vaadin/data/sort/Sort.java
index 81e0d08c73..6daa7f16f5 100644
--- a/server/src/main/java/com/vaadin/data/sort/Sort.java
+++ b/server/src/main/java/com/vaadin/data/sort/Sort.java
@@ -24,7 +24,7 @@ import com.vaadin.shared.data.sort.SortDirection;
/**
* Fluid Sort API. Provides a convenient, human-readable way of specifying
* multi-column sort order.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -35,7 +35,7 @@ public class Sort implements Serializable {
/**
* Initial constructor, called by the static by() methods.
- *
+ *
* @param propertyId
* a property ID, corresponding to a property in the data source
* @param direction
@@ -49,7 +49,7 @@ public class Sort implements Serializable {
/**
* Chaining constructor, called by the non-static then() methods. This
* constructor links to the previous Sort object.
- *
+ *
* @param previous
* the sort marker that comes before this one
* @param propertyId
@@ -76,7 +76,7 @@ public class Sort implements Serializable {
/**
* Start building a Sort order by sorting a provided column in ascending
* order.
- *
+ *
* @param propertyId
* a property id, corresponding to a data source property
* @return a sort object
@@ -87,7 +87,7 @@ public class Sort implements Serializable {
/**
* Start building a Sort order by sorting a provided column.
- *
+ *
* @param propertyId
* a property id, corresponding to a data source property
* @param direction
@@ -102,7 +102,7 @@ public class Sort implements Serializable {
* Continue building a Sort order. The provided property is sorted in
* ascending order if the previously added properties have been evaluated as
* equals.
- *
+ *
* @param propertyId
* a property id, corresponding to a data source property
* @return a sort object
@@ -115,7 +115,7 @@ public class Sort implements Serializable {
* Continue building a Sort order. The provided property is sorted in
* specified order if the previously added properties have been evaluated as
* equals.
- *
+ *
* @param propertyId
* a property id, corresponding to a data source property
* @param direction
@@ -128,7 +128,7 @@ public class Sort implements Serializable {
/**
* Build a sort order list, ready to be passed to Grid
- *
+ *
* @return a sort order list.
*/
public List<SortOrder> build() {
diff --git a/server/src/main/java/com/vaadin/data/sort/SortOrder.java b/server/src/main/java/com/vaadin/data/sort/SortOrder.java
index 2c419f88b7..12080f0063 100644
--- a/server/src/main/java/com/vaadin/data/sort/SortOrder.java
+++ b/server/src/main/java/com/vaadin/data/sort/SortOrder.java
@@ -22,7 +22,7 @@ import com.vaadin.shared.data.sort.SortDirection;
/**
* Sort order descriptor. Links together a {@link SortDirection} value and a
* Vaadin container property ID.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -33,7 +33,7 @@ public class SortOrder implements Serializable {
/**
* Create a SortOrder object. Both arguments must be non-null.
- *
+ *
* @param propertyId
* id of the data source property to sort by
* @param direction
@@ -54,7 +54,7 @@ public class SortOrder implements Serializable {
/**
* Returns the property ID.
- *
+ *
* @return a property ID
*/
public Object getPropertyId() {
@@ -63,7 +63,7 @@ public class SortOrder implements Serializable {
/**
* Returns the {@link SortDirection} value.
- *
+ *
* @return a sort direction value
*/
public SortDirection getDirection() {
diff --git a/server/src/main/java/com/vaadin/data/util/AbstractBeanContainer.java b/server/src/main/java/com/vaadin/data/util/AbstractBeanContainer.java
index 6dcfbb2b84..8599e7c900 100644
--- a/server/src/main/java/com/vaadin/data/util/AbstractBeanContainer.java
+++ b/server/src/main/java/com/vaadin/data/util/AbstractBeanContainer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -39,50 +39,50 @@ import com.vaadin.data.util.filter.UnsupportedFilterException;
/**
* An abstract base class for in-memory containers for JavaBeans.
- *
+ *
* <p>
* The properties of the container are determined automatically by introspecting
* the used JavaBean class and explicitly adding or removing properties is not
* supported. Only beans of the same type can be added to the container.
* </p>
- *
+ *
* <p>
* Subclasses should implement any public methods adding items to the container,
* typically calling the protected methods {@link #addItem(Object, Object)},
* {@link #addItemAfter(Object, Object, Object)} and
* {@link #addItemAt(int, Object, Object)}.
* </p>
- *
+ *
* @param <IDTYPE>
* The type of the item identifier
* @param <BEANTYPE>
* The type of the Bean
- *
+ *
* @since 6.5
*/
-public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
- AbstractInMemoryContainer<IDTYPE, String, BeanItem<BEANTYPE>> implements
- Filterable, SimpleFilterable, Sortable, ValueChangeListener,
+public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE>
+ extends AbstractInMemoryContainer<IDTYPE, String, BeanItem<BEANTYPE>>
+ implements Filterable, SimpleFilterable, Sortable, ValueChangeListener,
PropertySetChangeNotifier {
/**
* Resolver that maps beans to their (item) identifiers, removing the need
* to explicitly specify item identifiers when there is no need to customize
* this.
- *
+ *
* Note that beans can also be added with an explicit id even if a resolver
* has been set.
- *
+ *
* @param <IDTYPE>
* @param <BEANTYPE>
- *
+ *
* @since 6.5
*/
- public static interface BeanIdResolver<IDTYPE, BEANTYPE> extends
- Serializable {
+ public static interface BeanIdResolver<IDTYPE, BEANTYPE>
+ extends Serializable {
/**
* Return the item identifier for a bean.
- *
+ *
* @param bean
* @return
*/
@@ -91,12 +91,12 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
/**
* A item identifier resolver that returns the value of a bean property.
- *
+ *
* The bean must have a getter for the property, and the getter must return
* an object of type IDTYPE.
*/
- protected class PropertyBasedBeanIdResolver implements
- BeanIdResolver<IDTYPE, BEANTYPE> {
+ protected class PropertyBasedBeanIdResolver
+ implements BeanIdResolver<IDTYPE, BEANTYPE> {
private final Object propertyId;
@@ -114,8 +114,8 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
throws IllegalArgumentException {
VaadinPropertyDescriptor<BEANTYPE> pd = model.get(propertyId);
if (null == pd) {
- throw new IllegalStateException("Property " + propertyId
- + " not found");
+ throw new IllegalStateException(
+ "Property " + propertyId + " not found");
}
try {
Property<IDTYPE> property = (Property<IDTYPE>) pd
@@ -131,7 +131,7 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
/**
* The resolver that finds the item ID for a bean, or null not to use
* automatic resolving.
- *
+ *
* Methods that add a bean without specifying an ID must not be called if no
* resolver has been set.
*/
@@ -156,7 +156,7 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
/**
* Constructs a {@code AbstractBeanContainer} for beans of the given type.
- *
+ *
* @param type
* the type of the beans that will be added to the container.
* @throws IllegalArgumentException
@@ -173,7 +173,7 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container#getType(java.lang.Object)
*/
@Override
@@ -188,7 +188,7 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
/**
* Create a BeanItem for a bean using pre-parsed bean metadata (based on
* {@link #getBeanType()}).
- *
+ *
* @param bean
* @return created {@link BeanItem} or null if bean is null
*/
@@ -198,10 +198,10 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
/**
* Returns the type of beans this Container can contain.
- *
+ *
* This comes from the bean type constructor parameter, and bean metadata
* (including container properties) is based on this.
- *
+ *
* @return
*/
public Class<? super BEANTYPE> getBeanType() {
@@ -210,7 +210,7 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container#getContainerPropertyIds()
*/
@Override
@@ -220,7 +220,7 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container#removeAllItems()
*/
@Override
@@ -247,7 +247,7 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container#getItem(java.lang.Object)
*/
@Override
@@ -263,7 +263,7 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container#getItemIds()
*/
@Override
@@ -274,7 +274,7 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container#getContainerProperty(java.lang.Object,
* java.lang.Object)
*/
@@ -289,7 +289,7 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container#removeItem(java.lang.Object)
*/
@Override
@@ -329,7 +329,7 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.data.Container.Filterable#addContainerFilter(java.lang.Object,
* java.lang.String, boolean, boolean)
@@ -348,7 +348,7 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container.Filterable#removeAllContainerFilters()
*/
@Override
@@ -363,7 +363,7 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.data.Container.Filterable#removeContainerFilters(java.lang
* .Object)
@@ -392,7 +392,7 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.util.AbstractInMemoryContainer#hasContainerFilters()
*/
@Override
@@ -402,7 +402,7 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.util.AbstractInMemoryContainer#getContainerFilters()
*/
@Override
@@ -413,7 +413,7 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
/**
* Make this container listen to the given property provided it notifies
* when its value changes.
- *
+ *
* @param item
* The {@link Item} that contains the property
* @param propertyId
@@ -432,7 +432,7 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
/**
* Remove this container as a listener for the given property.
- *
+ *
* @param item
* The {@link Item} that contains the property
* @param propertyId
@@ -448,7 +448,7 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
/**
* Remove this contains as a listener for all the properties in the given
* {@link Item}.
- *
+ *
* @param item
* The {@link Item} that contains the properties
*/
@@ -460,7 +460,7 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container.Sortable#getSortableContainerPropertyIds()
*/
@Override
@@ -470,7 +470,7 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container.Sortable#sort(java.lang.Object[],
* boolean[])
*/
@@ -509,7 +509,7 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
/**
* Check that a bean can be added to the container (is of the correct type
* for the container).
- *
+ *
* @param bean
* @return
*/
@@ -519,11 +519,11 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
/**
* Adds the bean to the Container.
- *
+ *
* Note: the behavior of this method changed in Vaadin 6.6 - now items are
* added at the very end of the unfiltered container and not after the last
* visible item if filtering is used.
- *
+ *
* @see com.vaadin.data.Container#addItem(Object)
*/
protected BeanItem<BEANTYPE> addItem(IDTYPE itemId, BEANTYPE bean) {
@@ -535,7 +535,7 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
/**
* Adds the bean after the given bean.
- *
+ *
* @see com.vaadin.data.Container.Ordered#addItemAfter(Object, Object)
*/
protected BeanItem<BEANTYPE> addItemAfter(IDTYPE previousItemId,
@@ -549,16 +549,16 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
/**
* Adds a new bean at the given index.
- *
+ *
* The bean is used both as the item contents and as the item identifier.
- *
+ *
* @param index
* Index at which the bean should be added.
* @param newItemId
* The item id for the bean to add to the container.
* @param bean
* The bean to add to the container.
- *
+ *
* @return Returns the new BeanItem or null if the operation fails.
*/
protected BeanItem<BEANTYPE> addItemAt(int index, IDTYPE newItemId,
@@ -572,11 +572,11 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
/**
* Adds a bean to the container using the bean item id resolver to find its
* identifier.
- *
+ *
* A bean id resolver must be set before calling this method.
- *
+ *
* @see #addItem(Object, Object)
- *
+ *
* @param bean
* the bean to add
* @return BeanItem<BEANTYPE> item added or null
@@ -601,11 +601,11 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
/**
* Adds a bean to the container after a specified item identifier, using the
* bean item id resolver to find its identifier.
- *
+ *
* A bean id resolver must be set before calling this method.
- *
+ *
* @see #addItemAfter(Object, Object, Object)
- *
+ *
* @param previousItemId
* the identifier of the bean after which this bean should be
* added, null to add to the beginning
@@ -618,8 +618,8 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
* if an identifier cannot be resolved for the bean
*/
protected BeanItem<BEANTYPE> addBeanAfter(IDTYPE previousItemId,
- BEANTYPE bean) throws IllegalStateException,
- IllegalArgumentException {
+ BEANTYPE bean)
+ throws IllegalStateException, IllegalArgumentException {
if (bean == null) {
return null;
}
@@ -634,11 +634,11 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
/**
* Adds a bean at a specified (filtered view) position in the container
* using the bean item id resolver to find its identifier.
- *
+ *
* A bean id resolver must be set before calling this method.
- *
+ *
* @see #addItemAfter(Object, Object, Object)
- *
+ *
* @param index
* the index (in the filtered view) at which to add the item
* @param bean
@@ -666,13 +666,13 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
* Adds all the beans from a {@link Collection} in one operation using the
* bean item identifier resolver. More efficient than adding them one by
* one.
- *
+ *
* A bean id resolver must be set before calling this method.
- *
+ *
* Note: the behavior of this method changed in Vaadin 6.6 - now items are
* added at the very end of the unfiltered container and not after the last
* visible item if filtering is used.
- *
+ *
* @param collection
* The collection of beans to add. Must not be null.
* @throws IllegalStateException
@@ -698,7 +698,8 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
"Resolved identifier for a bean must not be null");
}
- if (internalAddItemAtEnd(itemId, createBeanItem(bean), false) != null) {
+ if (internalAddItemAtEnd(itemId, createBeanItem(bean),
+ false) != null) {
modified = true;
}
}
@@ -724,7 +725,7 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
/**
* Use the bean resolver to get the identifier for a bean.
- *
+ *
* @param bean
* @return resolved bean identifier, null if could not be resolved
* @throws IllegalStateException
@@ -741,13 +742,13 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
/**
* Sets the resolver that finds the item id for a bean, or null not to use
* automatic resolving.
- *
+ *
* Methods that add a bean without specifying an id must not be called if no
* resolver has been set.
- *
+ *
* Note that methods taking an explicit id can be used whether a resolver
* has been defined or not.
- *
+ *
* @param beanIdResolver
* to use or null to disable automatic id resolution
*/
@@ -758,7 +759,7 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
/**
* Returns the resolver that finds the item ID for a bean.
- *
+ *
* @return resolver used or null if automatic item id resolving is disabled
*/
public BeanIdResolver<IDTYPE, BEANTYPE> getBeanIdResolver() {
@@ -767,7 +768,7 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
/**
* Create an item identifier resolver using a named bean property.
- *
+ *
* @param propertyId
* property identifier, which must map to a getter in BEANTYPE
* @return created resolver
@@ -818,9 +819,9 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
/**
* Adds a property for the container and all its items.
- *
+ *
* Primarily for internal use, may change in future versions.
- *
+ *
* @param propertyId
* @param propertyDescriptor
* @return true if the property was added
@@ -851,33 +852,33 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
/**
* Adds a nested container property for the container, e.g.
* "manager.address.street".
- *
+ *
* All intermediate getters must exist and should return non-null values
* when the property value is accessed. If an intermediate getter returns
* null, a null value will be returned.
- *
+ *
* @see NestedMethodProperty
- *
+ *
* @param propertyId
* @return true if the property was added
*/
public boolean addNestedContainerProperty(String propertyId) {
- return addContainerProperty(propertyId, new NestedPropertyDescriptor(
- propertyId, type));
+ return addContainerProperty(propertyId,
+ new NestedPropertyDescriptor(propertyId, type));
}
/**
* Adds a nested container properties for all sub-properties of a named
* property to the container. The named property itself is removed from the
* model as its subproperties are added.
- *
+ *
* All intermediate getters must exist and should return non-null values
* when the property value is accessed. If an intermediate getter returns
* null, a null value will be returned.
- *
+ *
* @see NestedMethodProperty
* @see #addNestedContainerProperty(String)
- *
+ *
* @param propertyId
*/
@SuppressWarnings("unchecked")
@@ -914,7 +915,8 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends
model.remove(propertyId);
// If remove the Property from all Items
- for (final Iterator<IDTYPE> i = getAllItemIds().iterator(); i.hasNext();) {
+ for (final Iterator<IDTYPE> i = getAllItemIds().iterator(); i
+ .hasNext();) {
getUnfilteredItem(i.next()).removeItemProperty(propertyId);
}
diff --git a/server/src/main/java/com/vaadin/data/util/AbstractContainer.java b/server/src/main/java/com/vaadin/data/util/AbstractContainer.java
index dafdd15b06..c95ddf0061 100644
--- a/server/src/main/java/com/vaadin/data/util/AbstractContainer.java
+++ b/server/src/main/java/com/vaadin/data/util/AbstractContainer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ import com.vaadin.data.Container;
/**
* Abstract container class that manages event listeners and sending events to
* them ({@link PropertySetChangeNotifier}, {@link ItemSetChangeNotifier}).
- *
+ *
* Note that this class provides the internal implementations for both types of
* events and notifiers as protected methods, but does not implement the
* {@link PropertySetChangeNotifier} and {@link ItemSetChangeNotifier}
@@ -34,7 +34,7 @@ import com.vaadin.data.Container;
* Subclasses implementing those interfaces should also override the
* corresponding {@link #addListener()} and {@link #removeListener()} methods to
* make them public.
- *
+ *
* @since 6.6
*/
public abstract class AbstractContainer implements Container {
@@ -52,7 +52,7 @@ public abstract class AbstractContainer implements Container {
/**
* An <code>event</code> object specifying the container whose Property set
* has changed.
- *
+ *
* This class does not provide information about which properties were
* concerned by the change, but subclasses can provide additional
* information about the changes.
@@ -73,13 +73,13 @@ public abstract class AbstractContainer implements Container {
/**
* An <code>event</code> object specifying the container whose Item set has
* changed.
- *
+ *
* This class does not provide information about the exact changes
* performed, but subclasses can add provide additional information about
* the changes.
*/
- protected static class BaseItemSetChangeEvent extends EventObject implements
- Container.ItemSetChangeEvent, Serializable {
+ protected static class BaseItemSetChangeEvent extends EventObject
+ implements Container.ItemSetChangeEvent, Serializable {
protected BaseItemSetChangeEvent(Container source) {
super(source);
@@ -97,13 +97,14 @@ public abstract class AbstractContainer implements Container {
* Implementation of the corresponding method in
* {@link PropertySetChangeNotifier}, override with the corresponding public
* method and implement the interface to use this.
- *
+ *
* @see PropertySetChangeNotifier#addListener(com.vaadin.data.Container.PropertySetChangeListener)
*/
protected void addPropertySetChangeListener(
Container.PropertySetChangeListener listener) {
if (getPropertySetChangeListeners() == null) {
- setPropertySetChangeListeners(new LinkedList<Container.PropertySetChangeListener>());
+ setPropertySetChangeListeners(
+ new LinkedList<Container.PropertySetChangeListener>());
}
getPropertySetChangeListeners().add(listener);
}
@@ -121,7 +122,7 @@ public abstract class AbstractContainer implements Container {
* Implementation of the corresponding method in
* {@link PropertySetChangeNotifier}, override with the corresponding public
* method and implement the interface to use this.
- *
+ *
* @see PropertySetChangeNotifier#removeListener(com.vaadin.data.Container.
* PropertySetChangeListener)
*/
@@ -137,7 +138,8 @@ public abstract class AbstractContainer implements Container {
* {@link #removePropertySetChangeListener(com.vaadin.data.Container.PropertySetChangeListener)}
**/
@Deprecated
- protected void removeListener(Container.PropertySetChangeListener listener) {
+ protected void removeListener(
+ Container.PropertySetChangeListener listener) {
removePropertySetChangeListener(listener);
}
@@ -147,13 +149,14 @@ public abstract class AbstractContainer implements Container {
* Implementation of the corresponding method in
* {@link ItemSetChangeNotifier}, override with the corresponding public
* method and implement the interface to use this.
- *
+ *
* @see ItemSetChangeNotifier#addListener(com.vaadin.data.Container.ItemSetChangeListener)
*/
protected void addItemSetChangeListener(
Container.ItemSetChangeListener listener) {
if (getItemSetChangeListeners() == null) {
- setItemSetChangeListeners(new LinkedList<Container.ItemSetChangeListener>());
+ setItemSetChangeListeners(
+ new LinkedList<Container.ItemSetChangeListener>());
}
getItemSetChangeListeners().add(listener);
}
@@ -171,7 +174,7 @@ public abstract class AbstractContainer implements Container {
* Implementation of the corresponding method in
* {@link ItemSetChangeNotifier}, override with the corresponding public
* method and implement the interface to use this.
- *
+ *
* @see ItemSetChangeNotifier#removeListener(com.vaadin.data.Container.ItemSetChangeListener)
*/
protected void removeItemSetChangeListener(
@@ -199,11 +202,11 @@ public abstract class AbstractContainer implements Container {
/**
* Sends a Property set change event to all interested listeners.
- *
+ *
* Use {@link #fireContainerPropertySetChange()} instead of this method
* unless additional information about the exact changes is available and
* should be included in the event.
- *
+ *
* @param event
* the property change event to send, optionally with additional
* information
@@ -230,7 +233,7 @@ public abstract class AbstractContainer implements Container {
/**
* Sends an Item set change event to all registered interested listeners.
- *
+ *
* @param event
* the item set change event to send, optionally with additional
* information
@@ -247,7 +250,7 @@ public abstract class AbstractContainer implements Container {
/**
* Sets the property set change listener collection. For internal use only.
- *
+ *
* @param propertySetChangeListeners
*/
protected void setPropertySetChangeListeners(
@@ -265,7 +268,7 @@ public abstract class AbstractContainer implements Container {
/**
* Sets the item set change listener collection. For internal use only.
- *
+ *
* @param itemSetChangeListeners
*/
protected void setItemSetChangeListeners(
@@ -281,7 +284,8 @@ public abstract class AbstractContainer implements Container {
}
public Collection<?> getListeners(Class<?> eventType) {
- if (Container.PropertySetChangeEvent.class.isAssignableFrom(eventType)) {
+ if (Container.PropertySetChangeEvent.class
+ .isAssignableFrom(eventType)) {
if (propertySetChangeListeners == null) {
return Collections.EMPTY_LIST;
} else {
diff --git a/server/src/main/java/com/vaadin/data/util/AbstractInMemoryContainer.java b/server/src/main/java/com/vaadin/data/util/AbstractInMemoryContainer.java
index f7b1a4b0d8..44803613d6 100644
--- a/server/src/main/java/com/vaadin/data/util/AbstractInMemoryContainer.java
+++ b/server/src/main/java/com/vaadin/data/util/AbstractInMemoryContainer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -36,7 +36,7 @@ import com.vaadin.data.util.filter.UnsupportedFilterException;
* in-memory containers. Concrete in-memory container classes can either inherit
* this class, inherit {@link AbstractContainer}, or implement the
* {@link Container} interface directly.
- *
+ *
* Adding and removing items (if desired) must be implemented in subclasses by
* overriding the appropriate add*Item() and remove*Item() and removeAllItems()
* methods, calling the corresponding
@@ -45,27 +45,27 @@ import com.vaadin.data.util.filter.UnsupportedFilterException;
* {@link #internalAddItemAtEnd(Object, Item, boolean)},
* {@link #internalRemoveItem(Object)} and {@link #internalRemoveAllItems()}
* methods.
- *
+ *
* By default, adding and removing container properties is not supported, and
* subclasses need to implement {@link #getContainerPropertyIds()}. Optionally,
* subclasses can override {@link #addContainerProperty(Object, Class, Object)}
* and {@link #removeContainerProperty(Object)} to implement them.
- *
+ *
* Features:
* <ul>
- * <li> {@link Container.Ordered}
- * <li> {@link Container.Indexed}
- * <li> {@link Filterable} and {@link SimpleFilterable} (internal implementation,
+ * <li>{@link Container.Ordered}
+ * <li>{@link Container.Indexed}
+ * <li>{@link Filterable} and {@link SimpleFilterable} (internal implementation,
* does not implement the interface directly)
- * <li> {@link Sortable} (internal implementation, does not implement the
+ * <li>{@link Sortable} (internal implementation, does not implement the
* interface directly)
* </ul>
- *
+ *
* To implement {@link Sortable}, subclasses need to implement
* {@link #getSortablePropertyIds()} and call the superclass method
* {@link #sortContainer(Object[], boolean[])} in the method
* <code>sort(Object[], boolean[])</code>.
- *
+ *
* To implement {@link Filterable}, subclasses need to implement the methods
* {@link Filterable#addContainerFilter(com.vaadin.data.Container.Filter)}
* (calling {@link #addFilter(Filter)}),
@@ -73,14 +73,14 @@ import com.vaadin.data.util.filter.UnsupportedFilterException;
* {@link #removeAllFilters()}) and
* {@link Filterable#removeContainerFilter(com.vaadin.data.Container.Filter)}
* (calling {@link #removeFilter(com.vaadin.data.Container.Filter)}).
- *
+ *
* To implement {@link SimpleFilterable}, subclasses also need to implement the
* methods
* {@link SimpleFilterable#addContainerFilter(Object, String, boolean, boolean)}
* and {@link SimpleFilterable#removeContainerFilters(Object)} calling
* {@link #addFilter(com.vaadin.data.Container.Filter)} and
* {@link #removeFilters(Object)} respectively.
- *
+ *
* @param <ITEMIDTYPE>
* the class of item identifiers in the container, use Object if can
* be any class
@@ -90,17 +90,17 @@ import com.vaadin.data.util.filter.UnsupportedFilterException;
* @param <ITEMCLASS>
* the (base) class of the Item instances in the container, use
* {@link Item} if unknown
- *
+ *
* @since 6.6
*/
public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITEMCLASS extends Item>
- extends AbstractContainer implements ItemSetChangeNotifier,
- Container.Indexed {
+ extends AbstractContainer
+ implements ItemSetChangeNotifier, Container.Indexed {
/**
* An ordered {@link List} of all item identifiers in the container,
* including those that have been filtered out.
- *
+ *
* Must not be null.
*/
private List<ITEMIDTYPE> allItemIds;
@@ -108,10 +108,10 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
/**
* An ordered {@link List} of item identifiers in the container after
* filtering, excluding those that have been filtered out.
- *
+ *
* This is what the external API of the {@link Container} interface and its
* subinterfaces shows (e.g. {@link #size()}, {@link #nextItemId(Object)}).
- *
+ *
* If null, the full item id list is used instead.
*/
private List<ITEMIDTYPE> filteredItemIds;
@@ -182,12 +182,12 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
/**
* An <code>Event</code> object specifying information about the added
* items.
- *
+ *
* <p>
* This class provides information about the first added item and the number
* of added items.
* </p>
- *
+ *
* @since 7.4
*/
protected static class BaseItemAddEvent extends BaseItemAddOrRemoveEvent
@@ -207,12 +207,12 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
/**
* An <code>Event</code> object specifying information about the removed
* items.
- *
+ *
* <p>
* This class provides information about the first removed item and the
* number of removed items.
* </p>
- *
+ *
* @since 7.4
*/
protected static class BaseItemRemoveEvent extends BaseItemAddOrRemoveEvent
@@ -231,9 +231,9 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
/**
* Get an item even if filtered out.
- *
+ *
* For internal use only.
- *
+ *
* @param itemId
* @return
*/
@@ -363,8 +363,8 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
endIndex = getVisibleItemIds().size();
}
- return Collections.unmodifiableList(getVisibleItemIds().subList(
- startIndex, endIndex));
+ return Collections.unmodifiableList(
+ getVisibleItemIds().subList(startIndex, endIndex));
}
@@ -494,7 +494,7 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
* This method should reset any internal data structures and then repopulate
* them so {@link #getItemIds()} and other methods only return the filtered
* items.
- *
+ *
* @param hasFilters
* true if filters has been set for the container, false
* otherwise
@@ -538,7 +538,7 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
* Checks if the given itemId passes the filters set for the container. The
* caller should make sure the itemId exists in the container. For
* non-existing itemIds the behavior is undefined.
- *
+ *
* @param itemId
* An itemId that exists in the container.
* @return true if the itemId passes all filters or no filters are set,
@@ -561,20 +561,20 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
/**
* Adds a container filter and re-filter the view.
- *
+ *
* The filter must implement Filter and its sub-filters (if any) must also
* be in-memory filterable.
- *
+ *
* This can be used to implement
* {@link Filterable#addContainerFilter(com.vaadin.data.Container.Filter)}
* and optionally also
* {@link SimpleFilterable#addContainerFilter(Object, String, boolean, boolean)}
* (with {@link SimpleStringFilter}).
- *
+ *
* Note that in some cases, incompatible filters cannot be detected when
* added and an {@link UnsupportedFilterException} may occur when performing
* filtering.
- *
+ *
* @throws UnsupportedFilterException
* if the filter is detected as not supported by the container
*/
@@ -585,7 +585,7 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
/**
* Returns true if any filters have been applied to the container.
- *
+ *
* @return true if the container has filters applied, false otherwise
* @since 7.1
*/
@@ -595,7 +595,7 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container.Filterable#getContainerFilters()
*/
protected Collection<Filter> getContainerFilters() {
@@ -604,7 +604,7 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
/**
* Remove a specific container filter and re-filter the view (if necessary).
- *
+ *
* This can be used to implement
* {@link Filterable#removeContainerFilter(com.vaadin.data.Container.Filter)}
* .
@@ -623,7 +623,7 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
/**
* Remove all container filters for all properties and re-filter the view.
- *
+ *
* This can be used to implement
* {@link Filterable#removeAllContainerFilters()}.
*/
@@ -637,7 +637,7 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
/**
* Checks if there is a filter that applies to a given property.
- *
+ *
* @param propertyId
* @return true if there is an active filter for the property
*/
@@ -659,10 +659,10 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
* Remove all container filters for a given property identifier and
* re-filter the view. This also removes filters applying to multiple
* properties including the one identified by propertyId.
- *
+ *
* This can be used to implement
* {@link Filterable#removeContainerFilters(Object)}.
- *
+ *
* @param propertyId
* @return Collection<Filter> removed filters
*/
@@ -691,7 +691,7 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
/**
* Returns the ItemSorter used for comparing items in a sort. See
* {@link #setItemSorter(ItemSorter)} for more information.
- *
+ *
* @return The ItemSorter used for comparing two items in a sort.
*/
protected ItemSorter getItemSorter() {
@@ -703,7 +703,7 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
* {@link ItemSorter#compare(Object, Object)} method is called with item ids
* to perform the sorting. A default ItemSorter is used if this is not
* explicitly set.
- *
+ *
* @param itemSorter
* The ItemSorter used for comparing two items in a sort (not
* null).
@@ -714,10 +714,10 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
/**
* Sort base implementation to be used to implement {@link Sortable}.
- *
+ *
* Subclasses should call this from a public
* {@link #sort(Object[], boolean[])} method when implementing Sortable.
- *
+ *
* @see com.vaadin.data.Container.Sortable#sort(java.lang.Object[],
* boolean[])
*/
@@ -749,7 +749,7 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
* operation. Typically this method calls
* <code>Collections.sort(aCollection, getItemSorter())</code> on all arrays
* (containing item ids) that need to be sorted.
- *
+ *
*/
protected void doSort() {
Collections.sort(getAllItemIds(), getItemSorter());
@@ -776,7 +776,7 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
/**
* Removes all items from the internal data structures of this class. This
* can be used to implement {@link #removeAllItems()} in subclasses.
- *
+ *
* No notification is sent, the caller has to fire a suitable item set
* change notification.
*/
@@ -791,10 +791,10 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
/**
* Removes a single item from the internal data structures of this class.
* This can be used to implement {@link #removeItem(Object)} in subclasses.
- *
+ *
* No notification is sent, the caller has to fire a suitable item set
* change notification.
- *
+ *
* @param itemId
* the identifier of the item to remove
* @return true if an item was successfully removed, false if failed to
@@ -819,16 +819,16 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
* Adds the bean to all internal data structures at the given position.
* Fails if an item with itemId is already in the container. Returns a the
* item if it was added successfully, null otherwise.
- *
+ *
* <p>
* Caller should initiate filtering after calling this method.
* </p>
- *
+ *
* For internal use only - subclasses should use
* {@link #internalAddItemAtEnd(Object, Item, boolean)},
* {@link #internalAddItemAt(int, Object, Item, boolean)} and
* {@link #internalAddItemAfter(Object, Object, Item, boolean)} instead.
- *
+ *
* @param position
* The position at which the item should be inserted in the
* unfiltered collection of items
@@ -836,7 +836,7 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
* The item identifier for the item to insert
* @param item
* The item to insert
- *
+ *
* @return ITEMCLASS if the item was added successfully, null otherwise
*/
private ITEMCLASS internalAddAt(int position, ITEMIDTYPE itemId,
@@ -861,7 +861,7 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
/**
* Add an item at the end of the container, and perform filtering if
* necessary. An event is fired if the filtered view changes.
- *
+ *
* @param newItemId
* @param item
* new item to add
@@ -890,9 +890,9 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
/**
* Add an item after a given (visible) item, and perform filtering. An event
* is fired if the filtered view changes.
- *
+ *
* The new item is added at the beginning if previousItemId is null.
- *
+ *
* @param previousItemId
* item id of a visible item after which to add the new item, or
* null to add at the beginning
@@ -913,9 +913,8 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
if (previousItemId == null) {
newItem = internalAddAt(0, newItemId, item);
} else if (containsId(previousItemId)) {
- newItem = internalAddAt(
- getAllItemIds().indexOf(previousItemId) + 1, newItemId,
- item);
+ newItem = internalAddAt(getAllItemIds().indexOf(previousItemId) + 1,
+ newItemId, item);
}
if (newItem != null && filter) {
// TODO filter only this item, use fireItemAdded()
@@ -931,7 +930,7 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
/**
* Add an item at a given (visible after filtering) item index, and perform
* filtering. An event is fired if the filtered view changes.
- *
+ *
* @param index
* position where to add the item (visible/view index)
* @param newItemId
@@ -963,10 +962,10 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
* involve storing the item or any relevant information about it in internal
* container-specific collections if necessary, as well as registering
* listeners etc.
- *
+ *
* The full identifier list in {@link AbstractInMemoryContainer} has already
* been updated to reflect the new item when this method is called.
- *
+ *
* @param position
* @param itemId
* @param item
@@ -980,9 +979,9 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
/**
* Notify item set change listeners that an item has been added to the
* container.
- *
+ *
* @since 7.4
- *
+ *
* @param position
* position of the added item in the view
* @param itemId
@@ -990,14 +989,15 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
* @param item
* the added item
*/
- protected void fireItemAdded(int position, ITEMIDTYPE itemId, ITEMCLASS item) {
+ protected void fireItemAdded(int position, ITEMIDTYPE itemId,
+ ITEMCLASS item) {
fireItemsAdded(position, itemId, 1);
}
/**
* Notify item set change listeners that items has been added to the
* container.
- *
+ *
* @param firstPosition
* position of the first visible added item in the view
* @param firstItemId
@@ -1015,9 +1015,9 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
/**
* Notify item set change listeners that an item has been removed from the
* container.
- *
+ *
* @since 7.4
- *
+ *
* @param position
* position of the removed item in the view prior to removal (if
* was visible)
@@ -1032,7 +1032,7 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
/**
* Notify item set change listeners that items has been removed from the
* container.
- *
+ *
* @param firstPosition
* position of the first visible removed item in the view prior
* to removal
@@ -1041,7 +1041,7 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
* to satisfy {@link Container#removeItem(Object)} API
* @param numberOfItems
* the number of removed visible items
- *
+ *
*/
protected void fireItemsRemoved(int firstPosition, Object firstItemId,
int numberOfItems) {
@@ -1054,7 +1054,7 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
/**
* Returns the internal list of visible item identifiers after filtering.
- *
+ *
* For internal use only.
*/
protected List<ITEMIDTYPE> getVisibleItemIds() {
@@ -1070,9 +1070,9 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
* returned if there is no visible items.
* <p>
* For internal use only.
- *
+ *
* @since 7.4
- *
+ *
* @return item id of the first visible item
*/
protected ITEMIDTYPE getFirstVisibleItem() {
@@ -1084,7 +1084,7 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
/**
* Returns true is the container has active filters.
- *
+ *
* @return true if the container is currently filtered
*/
protected boolean isFiltered() {
@@ -1095,7 +1095,7 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
* Internal helper method to set the internal list of filtered item
* identifiers. Should not be used outside this class except for
* implementing clone(), may disappear from future versions.
- *
+ *
* @param filteredItemIds
*/
@Deprecated
@@ -1108,7 +1108,7 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
* identifiers. Should not be used outside this class except for
* implementing clone(), may disappear from future versions - use
* {@link #getVisibleItemIds()} in other contexts.
- *
+ *
* @return List<ITEMIDTYPE>
*/
protected List<ITEMIDTYPE> getFilteredItemIds() {
@@ -1119,7 +1119,7 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
* Internal helper method to set the internal list of all item identifiers.
* Should not be used outside this class except for implementing clone(),
* may disappear from future versions.
- *
+ *
* @param allItemIds
*/
@Deprecated
@@ -1131,7 +1131,7 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
* Internal helper method to get the internal list of all item identifiers.
* Avoid using this method outside this class, may disappear in future
* versions.
- *
+ *
* @return List<ITEMIDTYPE>
*/
protected List<ITEMIDTYPE> getAllItemIds() {
@@ -1140,12 +1140,12 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
/**
* Set the internal collection of filters without performing filtering.
- *
+ *
* This method is mostly for internal use, use
* {@link #addFilter(com.vaadin.data.Container.Filter)} and
* <code>remove*Filter*</code> (which also re-filter the container) instead
* when possible.
- *
+ *
* @param filters
*/
protected void setFilters(Set<Filter> filters) {
@@ -1155,7 +1155,7 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
/**
* Returns the internal collection of filters. The returned collection
* should not be modified by callers outside this class.
- *
+ *
* @return Set<Filter>
*/
protected Set<Filter> getFilters() {
diff --git a/server/src/main/java/com/vaadin/data/util/AbstractProperty.java b/server/src/main/java/com/vaadin/data/util/AbstractProperty.java
index ee79fcd91e..bd1fcbf3fb 100644
--- a/server/src/main/java/com/vaadin/data/util/AbstractProperty.java
+++ b/server/src/main/java/com/vaadin/data/util/AbstractProperty.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,10 +24,10 @@ import com.vaadin.data.Property;
/**
* Abstract base class for {@link Property} implementations.
- *
+ *
* Handles listener management for {@link ValueChangeListener}s and
* {@link ReadOnlyStatusChangeListener}s.
- *
+ *
* @since 6.6
*/
public abstract class AbstractProperty<T> implements Property<T>,
@@ -51,7 +51,7 @@ public abstract class AbstractProperty<T> implements Property<T>,
/**
* {@inheritDoc}
- *
+ *
* Override for additional restrictions on what is considered a read-only
* property.
*/
@@ -81,9 +81,9 @@ public abstract class AbstractProperty<T> implements Property<T>,
* If legacy Property toString mode is disabled, the string representation
* has no special meaning
* </p>
- *
+ *
* @see LegacyPropertyHelper#isLegacyToStringEnabled()
- *
+ *
* @return A string representation of the value value stored in the Property
* or a string representation of the Property object.
* @deprecated As of 7.0. To get the property value, use {@link #getValue()}
@@ -105,12 +105,13 @@ public abstract class AbstractProperty<T> implements Property<T>,
* An <code>Event</code> object specifying the Property whose read-only
* status has been changed.
*/
- protected static class ReadOnlyStatusChangeEvent extends
- java.util.EventObject implements Property.ReadOnlyStatusChangeEvent {
+ protected static class ReadOnlyStatusChangeEvent
+ extends java.util.EventObject
+ implements Property.ReadOnlyStatusChangeEvent {
/**
* Constructs a new read-only status change event for this object.
- *
+ *
* @param source
* source object of the event.
*/
@@ -120,7 +121,7 @@ public abstract class AbstractProperty<T> implements Property<T>,
/**
* Gets the Property whose read-only state has changed.
- *
+ *
* @return source Property of the event.
*/
@Override
@@ -132,7 +133,7 @@ public abstract class AbstractProperty<T> implements Property<T>,
/**
* Registers a new read-only status change listener for this Property.
- *
+ *
* @param listener
* the new Listener to be registered.
*/
@@ -157,7 +158,7 @@ public abstract class AbstractProperty<T> implements Property<T>,
/**
* Removes a previously registered read-only status change listener.
- *
+ *
* @param listener
* the listener to be removed.
*/
@@ -203,7 +204,7 @@ public abstract class AbstractProperty<T> implements Property<T>,
/**
* Constructs a new value change event for this object.
- *
+ *
* @param source
* source object of the event.
*/
@@ -213,7 +214,7 @@ public abstract class AbstractProperty<T> implements Property<T>,
/**
* Gets the Property whose value has changed.
- *
+ *
* @return source Property of the event.
*/
@Override
diff --git a/server/src/main/java/com/vaadin/data/util/BeanContainer.java b/server/src/main/java/com/vaadin/data/util/BeanContainer.java
index 9b878d627e..a2a07c977c 100644
--- a/server/src/main/java/com/vaadin/data/util/BeanContainer.java
+++ b/server/src/main/java/com/vaadin/data/util/BeanContainer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,25 +19,25 @@ import java.util.Collection;
/**
* An in-memory container for JavaBeans.
- *
+ *
* <p>
* The properties of the container are determined automatically by introspecting
* the used JavaBean class. Only beans of the same type can be added to the
* container.
* </p>
- *
+ *
* <p>
* In BeanContainer (unlike {@link BeanItemContainer}), the item IDs do not have
* to be the beans themselves. The container can be used either with explicit
* item IDs or the item IDs can be generated when adding beans.
* </p>
- *
+ *
* <p>
* To use explicit item IDs, use the methods {@link #addItem(Object, Object)},
* {@link #addItemAfter(Object, Object, Object)} and
* {@link #addItemAt(int, Object, Object)}.
* </p>
- *
+ *
* <p>
* If a bean id resolver is set using
* {@link #setBeanIdResolver(com.vaadin.data.util.AbstractBeanContainer.BeanIdResolver)}
@@ -47,29 +47,29 @@ import java.util.Collection;
* container. If one of these methods is called, the resolver is used to
* generate an identifier for the item (must not return null).
* </p>
- *
+ *
* <p>
* Note that explicit item identifiers can also be used when a resolver has been
* set by calling the addItem*() methods - the resolver is only used when adding
* beans using the addBean*() or {@link #addAll(Collection)} methods.
* </p>
- *
+ *
* <p>
* It is not possible to add additional properties to the container.
* </p>
- *
+ *
* @param <IDTYPE>
* The type of the item identifier
* @param <BEANTYPE>
* The type of the Bean
- *
+ *
* @see AbstractBeanContainer
* @see BeanItemContainer
- *
+ *
* @since 6.5
*/
-public class BeanContainer<IDTYPE, BEANTYPE> extends
- AbstractBeanContainer<IDTYPE, BEANTYPE> {
+public class BeanContainer<IDTYPE, BEANTYPE>
+ extends AbstractBeanContainer<IDTYPE, BEANTYPE> {
public BeanContainer(Class<? super BEANTYPE> type) {
super(type);
@@ -77,7 +77,7 @@ public class BeanContainer<IDTYPE, BEANTYPE> extends
/**
* Adds the bean to the Container.
- *
+ *
* @see com.vaadin.data.Container#addItem(Object)
*/
@Override
@@ -91,7 +91,7 @@ public class BeanContainer<IDTYPE, BEANTYPE> extends
/**
* Adds the bean after the given item id.
- *
+ *
* @see com.vaadin.data.Container.Ordered#addItemAfter(Object, Object)
*/
@Override
@@ -106,16 +106,16 @@ public class BeanContainer<IDTYPE, BEANTYPE> extends
/**
* Adds a new bean at the given index.
- *
+ *
* The bean is used both as the item contents and as the item identifier.
- *
+ *
* @param index
* Index at which the bean should be added.
* @param newItemId
* The item id for the bean to add to the container.
* @param bean
* The bean to add to the container.
- *
+ *
* @return Returns the new BeanItem or null if the operation fails.
*/
@Override
@@ -133,7 +133,7 @@ public class BeanContainer<IDTYPE, BEANTYPE> extends
/**
* Sets the bean id resolver to use a property of the beans as the
* identifier.
- *
+ *
* @param propertyId
* the identifier of the property to use to find item identifiers
*/
diff --git a/server/src/main/java/com/vaadin/data/util/BeanItem.java b/server/src/main/java/com/vaadin/data/util/BeanItem.java
index 71f51c3feb..78010a14c0 100644
--- a/server/src/main/java/com/vaadin/data/util/BeanItem.java
+++ b/server/src/main/java/com/vaadin/data/util/BeanItem.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import java.util.Set;
/**
* A wrapper class for adding the Item interface to any Java Bean.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -46,16 +46,16 @@ public class BeanItem<BT> extends PropertysetItem {
* of a Java Bean to it. The properties are identified by their respective
* bean names.
* </p>
- *
+ *
* <p>
* Note : This version only supports introspectable bean properties and
* their getter and setter methods. Stand-alone <code>is</code> and
* <code>are</code> methods are not supported.
* </p>
- *
+ *
* @param bean
* the Java Bean to copy properties from.
- *
+ *
*/
public BeanItem(BT bean) {
this(bean, (Class<BT>) bean.getClass());
@@ -67,20 +67,20 @@ public class BeanItem<BT> extends PropertysetItem {
* of a Java Bean to it. The properties are identified by their respective
* bean names.
* </p>
- *
+ *
* <p>
* Note : This version only supports introspectable bean properties and
* their getter and setter methods. Stand-alone <code>is</code> and
* <code>are</code> methods are not supported.
* </p>
- *
+ *
* @since 7.4
- *
+ *
* @param bean
* the Java Bean to copy properties from.
* @param beanClass
* class of the {@code bean}
- *
+ *
*/
public BeanItem(BT bean, Class<BT> beanClass) {
this(bean, getPropertyDescriptors(beanClass));
@@ -92,7 +92,7 @@ public class BeanItem<BT> extends PropertysetItem {
* of properties. The properties are identified by their respective bean
* names.
* </p>
- *
+ *
* @param bean
* the Java Bean to copy properties from.
* @param propertyDescriptors
@@ -114,13 +114,13 @@ public class BeanItem<BT> extends PropertysetItem {
* properties of a Java Bean to it - in specified order. The properties are
* identified by their respective bean names.
* </p>
- *
+ *
* <p>
* Note : This version only supports introspectable bean properties and
* their getter and setter methods. Stand-alone <code>is</code> and
* <code>are</code> methods are not supported.
* </p>
- *
+ *
* @param bean
* the Java Bean to copy properties from.
* @param propertyIds
@@ -131,8 +131,8 @@ public class BeanItem<BT> extends PropertysetItem {
this.bean = bean;
// Create bean information
- LinkedHashMap<String, VaadinPropertyDescriptor<BT>> pds = getPropertyDescriptors((Class<BT>) bean
- .getClass());
+ LinkedHashMap<String, VaadinPropertyDescriptor<BT>> pds = getPropertyDescriptors(
+ (Class<BT>) bean.getClass());
// Add all the bean properties as MethodProperties to this Item
for (Object id : propertyIds) {
@@ -150,13 +150,13 @@ public class BeanItem<BT> extends PropertysetItem {
* properties of a Java Bean to it - in specified order. The properties are
* identified by their respective bean names.
* </p>
- *
+ *
* <p>
* Note : This version only supports introspectable bean properties and
* their getter and setter methods. Stand-alone <code>is</code> and
* <code>are</code> methods are not supported.
* </p>
- *
+ *
* @param bean
* the Java Bean to copy properties from.
* @param propertyIds
@@ -170,13 +170,13 @@ public class BeanItem<BT> extends PropertysetItem {
* <p>
* Perform introspection on a Java Bean class to find its properties.
* </p>
- *
+ *
* <p>
* Note : This version only supports introspectable bean properties and
* their getter and setter methods. Stand-alone <code>is</code> and
* <code>are</code> methods are not supported.
* </p>
- *
+ *
* @param beanClass
* the Java Bean class to get properties for.
* @return an ordered map from property names to property descriptors
@@ -211,7 +211,7 @@ public class BeanItem<BT> extends PropertysetItem {
/**
* Expands nested bean properties by replacing a top-level property with
* some or all of its sub-properties. The expansion is not recursive.
- *
+ *
* @param propertyId
* property id for the property whose sub-properties are to be
* expanded,
@@ -243,18 +243,18 @@ public class BeanItem<BT> extends PropertysetItem {
* item already and must of form "field1.field2" where field2 is a field in
* the object referenced to by field1. If an intermediate property returns
* null, the property will return a null value
- *
+ *
* @param nestedPropertyId
* property id to add.
*/
public void addNestedProperty(String nestedPropertyId) {
- addItemProperty(nestedPropertyId, new NestedMethodProperty<Object>(
- getBean(), nestedPropertyId));
+ addItemProperty(nestedPropertyId,
+ new NestedMethodProperty<Object>(getBean(), nestedPropertyId));
}
/**
* Gets the underlying JavaBean object.
- *
+ *
* @return the bean object.
*/
public BT getBean() {
diff --git a/server/src/main/java/com/vaadin/data/util/BeanItemContainer.java b/server/src/main/java/com/vaadin/data/util/BeanItemContainer.java
index d5d399f0f8..62cb71885c 100644
--- a/server/src/main/java/com/vaadin/data/util/BeanItemContainer.java
+++ b/server/src/main/java/com/vaadin/data/util/BeanItemContainer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,13 +19,13 @@ import java.util.Collection;
/**
* An in-memory container for JavaBeans.
- *
+ *
* <p>
* The properties of the container are determined automatically by introspecting
* the used JavaBean class. Only beans of the same type can be added to the
* container.
* </p>
- *
+ *
* <p>
* BeanItemContainer uses the beans themselves as identifiers. The
* {@link Object#hashCode()} of a bean is used when storing and looking up beans
@@ -34,41 +34,41 @@ import java.util.Collection;
* implementation of {@link Object#equals(Object)} as well in order for it to
* fulfill the contract between {@code equals()} and {@code hashCode()}.
* </p>
- *
+ *
* <p>
* To add items to the container, use the methods {@link #addBean(Object)},
* {@link #addBeanAfter(Object, Object)} and {@link #addBeanAt(int, Object)}.
* Also {@link #addItem(Object)}, {@link #addItemAfter(Object, Object)} and
* {@link #addItemAt(int, Object)} can be used as synonyms for them.
* </p>
- *
+ *
* <p>
* It is not possible to add additional properties to the container.
* </p>
- *
+ *
* @param <BEANTYPE>
* The type of the Bean
- *
+ *
* @since 5.4
*/
@SuppressWarnings("serial")
-public class BeanItemContainer<BEANTYPE> extends
- AbstractBeanContainer<BEANTYPE, BEANTYPE> {
+public class BeanItemContainer<BEANTYPE>
+ extends AbstractBeanContainer<BEANTYPE, BEANTYPE> {
/**
* Bean identity resolver that returns the bean itself as its item
* identifier.
- *
+ *
* This corresponds to the old behavior of {@link BeanItemContainer}, and
* requires suitable (identity-based) equals() and hashCode() methods on the
* beans.
- *
+ *
* @param <BT>
- *
+ *
* @since 6.5
*/
- private static class IdentityBeanIdResolver<BT> implements
- BeanIdResolver<BT, BT> {
+ private static class IdentityBeanIdResolver<BT>
+ implements BeanIdResolver<BT, BT> {
@Override
public BT getIdForBean(BT bean) {
@@ -79,7 +79,7 @@ public class BeanItemContainer<BEANTYPE> extends
/**
* Constructs a {@code BeanItemContainer} for beans of the given type.
- *
+ *
* @param type
* the type of the beans that will be added to the container.
* @throws IllegalArgumentException
@@ -96,19 +96,19 @@ public class BeanItemContainer<BEANTYPE> extends
* The collection must not be empty.
* {@link BeanItemContainer#BeanItemContainer(Class)} can be used for
* creating an initially empty {@code BeanItemContainer}.
- *
+ *
* Note that when using this constructor, the actual class of the first item
* in the collection is used to determine the bean properties supported by
* the container instance, and only beans of that class or its subclasses
* can be added to the collection. If this is problematic or empty
* collections need to be supported, use {@link #BeanItemContainer(Class)}
* and {@link #addAll(Collection)} instead.
- *
+ *
* @param collection
* a non empty {@link Collection} of beans.
* @throws IllegalArgumentException
* If the collection is null or empty.
- *
+ *
* @deprecated As of 6.5, use {@link #BeanItemContainer(Class, Collection)}
* instead
*/
@@ -125,7 +125,7 @@ public class BeanItemContainer<BEANTYPE> extends
/**
* Internal helper method to support the deprecated {@link Collection}
* container.
- *
+ *
* @param <BT>
* @param collection
* @return
@@ -145,7 +145,7 @@ public class BeanItemContainer<BEANTYPE> extends
/**
* Constructs a {@code BeanItemContainer} and adds the given beans to it.
- *
+ *
* @param type
* the type of the beans that will be added to the container.
* @param collection
@@ -167,7 +167,7 @@ public class BeanItemContainer<BEANTYPE> extends
/**
* Adds all the beans from a {@link Collection} in one go. More efficient
* than adding them one by one.
- *
+ *
* @param collection
* The collection of beans to add. Must not be null.
*/
@@ -178,14 +178,14 @@ public class BeanItemContainer<BEANTYPE> extends
/**
* Adds the bean after the given bean.
- *
+ *
* The bean is used both as the item contents and as the item identifier.
- *
+ *
* @param previousItemId
* the bean (of type BT) after which to add newItemId
* @param newItemId
* the bean (of type BT) to add (not null)
- *
+ *
* @see com.vaadin.data.Container.Ordered#addItemAfter(Object, Object)
*/
@Override
@@ -198,9 +198,9 @@ public class BeanItemContainer<BEANTYPE> extends
/**
* Adds a new bean at the given index.
- *
+ *
* The bean is used both as the item contents and as the item identifier.
- *
+ *
* @param index
* Index at which the bean should be added.
* @param newItemId
@@ -216,9 +216,9 @@ public class BeanItemContainer<BEANTYPE> extends
/**
* Adds the bean to the Container.
- *
+ *
* The bean is used both as the item contents and as the item identifier.
- *
+ *
* @see com.vaadin.data.Container#addItem(Object)
*/
@Override
@@ -229,9 +229,9 @@ public class BeanItemContainer<BEANTYPE> extends
/**
* Adds the bean to the Container.
- *
+ *
* The bean is used both as the item contents and as the item identifier.
- *
+ *
* @see com.vaadin.data.Container#addItem(Object)
*/
@Override
diff --git a/server/src/main/java/com/vaadin/data/util/BeanUtil.java b/server/src/main/java/com/vaadin/data/util/BeanUtil.java
index 1356cf5359..e50ca97d67 100644
--- a/server/src/main/java/com/vaadin/data/util/BeanUtil.java
+++ b/server/src/main/java/com/vaadin/data/util/BeanUtil.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,9 +26,9 @@ import java.util.List;
/**
* Utility class for Java Beans information access.
- *
+ *
* @since 7.4
- *
+ *
* @author Vaadin Ltd
*/
public final class BeanUtil implements Serializable {
@@ -38,21 +38,21 @@ public final class BeanUtil implements Serializable {
/**
* Returns the property descriptors of a class or an interface.
- *
+ *
* For an interface, superinterfaces are also iterated as Introspector does
* not take them into account (Oracle Java bug 4275879), but in that case,
* both the setter and the getter for a property must be in the same
* interface and should not be overridden in subinterfaces for the discovery
* to work correctly.
- *
+ *
* NOTE : This utility method relies on introspection (and returns
* PropertyDescriptor) which is a part of java.beans package. The latter
* package could require bigger JDK in the future (with Java 9+). So it may
* be changed in the future.
- *
+ *
* For interfaces, the iteration is depth first and the properties of
* superinterfaces are returned before those of their subinterfaces.
- *
+ *
* @param beanClass
* @return
* @throws IntrospectionException
@@ -82,7 +82,7 @@ public final class BeanUtil implements Serializable {
* Returns {@code propertyId} class for property declared in {@code clazz}.
* Property could be of form "property.subProperty[.subProperty2]" i.e.
* refer to some nested property.
- *
+ *
* @param clazz
* class where property is declared
* @param propertyId
@@ -100,12 +100,12 @@ public final class BeanUtil implements Serializable {
// Find the rest from the sub type
return getPropertyType(propertyBean, parts[1]);
} else {
- List<PropertyDescriptor> descriptors = getBeanPropertyDescriptor(clazz);
+ List<PropertyDescriptor> descriptors = getBeanPropertyDescriptor(
+ clazz);
for (PropertyDescriptor descriptor : descriptors) {
final Method getMethod = descriptor.getReadMethod();
- if (descriptor.getName().equals(propertyId)
- && getMethod != null
+ if (descriptor.getName().equals(propertyId) && getMethod != null
&& getMethod.getDeclaringClass() != Object.class) {
return descriptor.getPropertyType();
}
@@ -122,8 +122,8 @@ public final class BeanUtil implements Serializable {
descriptors.length);
for (PropertyDescriptor descriptor : descriptors) {
try {
- Method readMethod = getMethodFromBridge(descriptor
- .getReadMethod());
+ Method readMethod = getMethodFromBridge(
+ descriptor.getReadMethod());
if (readMethod != null) {
Method writeMethod = getMethodFromBridge(
descriptor.getWriteMethod(),
@@ -170,8 +170,8 @@ public final class BeanUtil implements Serializable {
return null;
}
try {
- return bridgeMethod.getDeclaringClass().getMethod(
- bridgeMethod.getName(), paramTypes);
+ return bridgeMethod.getDeclaringClass()
+ .getMethod(bridgeMethod.getName(), paramTypes);
} catch (NoSuchMethodException e) {
return null;
}
diff --git a/server/src/main/java/com/vaadin/data/util/ContainerHierarchicalWrapper.java b/server/src/main/java/com/vaadin/data/util/ContainerHierarchicalWrapper.java
index 8590528f43..fe768e677b 100644
--- a/server/src/main/java/com/vaadin/data/util/ContainerHierarchicalWrapper.java
+++ b/server/src/main/java/com/vaadin/data/util/ContainerHierarchicalWrapper.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -36,14 +36,14 @@ import com.vaadin.data.Property;
* A wrapper class for adding external hierarchy to containers not implementing
* the {@link com.vaadin.data.Container.Hierarchical} interface.
* </p>
- *
+ *
* <p>
* If the wrapped container is changed directly (that is, not through the
* wrapper), and does not implement Container.ItemSetChangeNotifier and/or
* Container.PropertySetChangeNotifier the hierarchy information must be updated
* with the {@link #updateHierarchicalWrapper()} method.
* </p>
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -73,8 +73,8 @@ public class ContainerHierarchicalWrapper implements Container.Hierarchical,
* A comparator that sorts the listed items before other items. Otherwise,
* the order is undefined.
*/
- private static class ListedItemsFirstComparator implements
- Comparator<Object>, Serializable {
+ private static class ListedItemsFirstComparator
+ implements Comparator<Object>, Serializable {
private final Collection<?> itemIds;
private ListedItemsFirstComparator(Collection<?> itemIds) {
@@ -101,7 +101,7 @@ public class ContainerHierarchicalWrapper implements Container.Hierarchical,
* Constructs a new hierarchical wrapper for an existing Container. Works
* even if the to-be-wrapped container already implements the
* <code>Container.Hierarchical</code> interface.
- *
+ *
* @param toBeWrapped
* the container that needs to be accessed hierarchically
* @see #updateHierarchicalWrapper()
@@ -201,7 +201,7 @@ public class ContainerHierarchicalWrapper implements Container.Hierarchical,
* <p>
* Note : The Item is not removed from the underlying Container.
* </p>
- *
+ *
* @param itemId
* the ID of the item to remove from the hierarchy.
*/
@@ -231,7 +231,7 @@ public class ContainerHierarchicalWrapper implements Container.Hierarchical,
* Adds the specified Item specified to the internal hierarchy structure.
* The new item is added as a root Item. The underlying container is not
* modified.
- *
+ *
* @param itemId
* the ID of the item to add to the hierarchy.
*/
@@ -358,7 +358,7 @@ public class ContainerHierarchicalWrapper implements Container.Hierarchical,
* {@link #setParent(Object itemId, Object newParentId)} or
* {@link com.vaadin.data.Container#removeItem(Object itemId)}.
* </p>
- *
+ *
* @param itemId
* the ID of the Item in the container whose child capability is
* to be set.
@@ -373,8 +373,8 @@ public class ContainerHierarchicalWrapper implements Container.Hierarchical,
// If the wrapped container implements the method directly, use it
if (hierarchical) {
- return ((Container.Hierarchical) container).setChildrenAllowed(
- itemId, childrenAllowed);
+ return ((Container.Hierarchical) container)
+ .setChildrenAllowed(itemId, childrenAllowed);
}
// Check that the item is in the container
@@ -399,7 +399,7 @@ public class ContainerHierarchicalWrapper implements Container.Hierarchical,
* also possible to detach a node from the hierarchy (and thus make it root)
* by setting the parent <code>null</code>.
* </p>
- *
+ *
* @param itemId
* the ID of the item to be set as the child of the Item
* identified with newParentId.
@@ -457,7 +457,8 @@ public class ContainerHierarchicalWrapper implements Container.Hierarchical,
// Check that the new parent exists in container and can have
// children
- if (!containsId(newParentId) || noChildrenAllowed.contains(newParentId)) {
+ if (!containsId(newParentId)
+ || noChildrenAllowed.contains(newParentId)) {
return false;
}
@@ -510,7 +511,7 @@ public class ContainerHierarchicalWrapper implements Container.Hierarchical,
/**
* Creates a new Item into the Container, assigns it an automatic ID, and
* adds it to the hierarchy.
- *
+ *
* @return the autogenerated ID of the new Item or <code>null</code> if the
* operation failed
* @throws UnsupportedOperationException
@@ -529,7 +530,7 @@ public class ContainerHierarchicalWrapper implements Container.Hierarchical,
/**
* Adds a new Item by its ID to the underlying container and to the
* hierarchy.
- *
+ *
* @param itemId
* the ID of the Item to be created.
* @return the added Item or <code>null</code> if the operation failed.
@@ -552,7 +553,7 @@ public class ContainerHierarchicalWrapper implements Container.Hierarchical,
/**
* Removes all items from the underlying container and from the hierarcy.
- *
+ *
* @return <code>true</code> if the operation succeeded, <code>false</code>
* if not
* @throws UnsupportedOperationException
@@ -575,7 +576,7 @@ public class ContainerHierarchicalWrapper implements Container.Hierarchical,
/**
* Removes an Item specified by the itemId from the underlying container and
* from the hierarchy.
- *
+ *
* @param itemId
* the ID of the Item to be removed.
* @return <code>true</code> if the operation succeeded, <code>false</code>
@@ -598,7 +599,7 @@ public class ContainerHierarchicalWrapper implements Container.Hierarchical,
/**
* Removes the Item identified by given itemId and all its children.
- *
+ *
* @see #removeItem(Object)
* @param itemId
* the identifier of the Item to be removed
@@ -610,7 +611,7 @@ public class ContainerHierarchicalWrapper implements Container.Hierarchical,
/**
* Adds a new Property to all Items in the Container.
- *
+ *
* @param propertyId
* the ID of the new Property.
* @param type
@@ -635,7 +636,7 @@ public class ContainerHierarchicalWrapper implements Container.Hierarchical,
* <p>
* Note : The Property will be removed from all Items in the Container.
* </p>
- *
+ *
* @param propertyId
* the ID of the Property to remove.
* @return <code>true</code> if the operation succeeded, <code>false</code>
@@ -753,7 +754,8 @@ public class ContainerHierarchicalWrapper implements Container.Hierarchical,
Container.ItemSetChangeListener listener) {
if (container instanceof Container.ItemSetChangeNotifier) {
((Container.ItemSetChangeNotifier) container)
- .removeItemSetChangeListener(new PiggybackListener(listener));
+ .removeItemSetChangeListener(
+ new PiggybackListener(listener));
}
}
@@ -777,8 +779,8 @@ public class ContainerHierarchicalWrapper implements Container.Hierarchical,
Container.PropertySetChangeListener listener) {
if (container instanceof Container.PropertySetChangeNotifier) {
((Container.PropertySetChangeNotifier) container)
- .addPropertySetChangeListener(new PiggybackListener(
- listener));
+ .addPropertySetChangeListener(
+ new PiggybackListener(listener));
}
}
@@ -802,8 +804,8 @@ public class ContainerHierarchicalWrapper implements Container.Hierarchical,
Container.PropertySetChangeListener listener) {
if (container instanceof Container.PropertySetChangeNotifier) {
((Container.PropertySetChangeNotifier) container)
- .removePropertySetChangeListener(new PiggybackListener(
- listener));
+ .removePropertySetChangeListener(
+ new PiggybackListener(listener));
}
}
@@ -821,10 +823,10 @@ public class ContainerHierarchicalWrapper implements Container.Hierarchical,
* This listener 'piggybacks' on the real listener in order to update the
* wrapper when needed. It proxies equals() and hashCode() to the real
* listener so that the correct listener gets removed.
- *
+ *
*/
- private class PiggybackListener implements
- Container.PropertySetChangeListener,
+ private class PiggybackListener
+ implements Container.PropertySetChangeListener,
Container.ItemSetChangeListener {
Object listener;
diff --git a/server/src/main/java/com/vaadin/data/util/ContainerOrderedWrapper.java b/server/src/main/java/com/vaadin/data/util/ContainerOrderedWrapper.java
index 53f4840322..fef43caf17 100644
--- a/server/src/main/java/com/vaadin/data/util/ContainerOrderedWrapper.java
+++ b/server/src/main/java/com/vaadin/data/util/ContainerOrderedWrapper.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,14 +32,14 @@ import com.vaadin.data.Property;
* A wrapper class for adding external ordering to containers not implementing
* the {@link com.vaadin.data.Container.Ordered} interface.
* </p>
- *
+ *
* <p>
* If the wrapped container is changed directly (that is, not through the
* wrapper), and does not implement Container.ItemSetChangeNotifier and/or
* Container.PropertySetChangeNotifier the hierarchy information must be updated
* with the {@link #updateOrderWrapper()} method.
* </p>
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -92,7 +92,7 @@ public class ContainerOrderedWrapper implements Container.Ordered,
* Constructs a new ordered wrapper for an existing Container. Works even if
* the to-be-wrapped container already implements the Container.Ordered
* interface.
- *
+ *
* @param toBeWrapped
* the container whose contents need to be ordered.
*/
@@ -116,7 +116,7 @@ public class ContainerOrderedWrapper implements Container.Ordered,
* <p>
* Note : The Item is not removed from the underlying Container.
* </p>
- *
+ *
* @param id
* the ID of the Item to be removed from the ordering.
*/
@@ -152,7 +152,7 @@ public class ContainerOrderedWrapper implements Container.Ordered,
/**
* Registers the specified Item to the last position in the wrapper's
* internal ordering. The underlying container is not modified.
- *
+ *
* @param id
* the ID of the Item to be added to the ordering.
*/
@@ -172,7 +172,7 @@ public class ContainerOrderedWrapper implements Container.Ordered,
* Registers the specified Item after the specified itemId in the wrapper's
* internal ordering. The underlying container is not modified. Given item
* id must be in the container, or must be null.
- *
+ *
* @param id
* the ID of the Item to be added to the ordering.
* @param previousItemId
@@ -324,7 +324,7 @@ public class ContainerOrderedWrapper implements Container.Ordered,
/**
* Registers a new Property to all Items in the Container.
- *
+ *
* @param propertyId
* the ID of the new Property.
* @param type
@@ -344,7 +344,7 @@ public class ContainerOrderedWrapper implements Container.Ordered,
/**
* Creates a new Item into the Container, assigns it an automatic ID, and
* adds it to the ordering.
- *
+ *
* @return the autogenerated ID of the new Item or <code>null</code> if the
* operation failed
* @throws UnsupportedOperationException
@@ -363,7 +363,7 @@ public class ContainerOrderedWrapper implements Container.Ordered,
/**
* Registers a new Item by its ID to the underlying container and to the
* ordering.
- *
+ *
* @param itemId
* the ID of the Item to be created.
* @return the added Item or <code>null</code> if the operation failed
@@ -381,7 +381,7 @@ public class ContainerOrderedWrapper implements Container.Ordered,
/**
* Removes all items from the underlying container and from the ordering.
- *
+ *
* @return <code>true</code> if the operation succeeded, otherwise
* <code>false</code>
* @throws UnsupportedOperationException
@@ -401,7 +401,7 @@ public class ContainerOrderedWrapper implements Container.Ordered,
/**
* Removes an Item specified by the itemId from the underlying container and
* from the ordering.
- *
+ *
* @param itemId
* the ID of the Item to be removed.
* @return <code>true</code> if the operation succeeded, <code>false</code>
@@ -426,7 +426,7 @@ public class ContainerOrderedWrapper implements Container.Ordered,
* <p>
* Note : The Property will be removed from all the Items in the Container.
* </p>
- *
+ *
* @param propertyId
* the ID of the Property to remove.
* @return <code>true</code> if the operation succeeded, <code>false</code>
@@ -565,7 +565,8 @@ public class ContainerOrderedWrapper implements Container.Ordered,
Container.ItemSetChangeListener listener) {
if (container instanceof Container.ItemSetChangeNotifier) {
((Container.ItemSetChangeNotifier) container)
- .removeItemSetChangeListener(new PiggybackListener(listener));
+ .removeItemSetChangeListener(
+ new PiggybackListener(listener));
}
}
@@ -589,8 +590,8 @@ public class ContainerOrderedWrapper implements Container.Ordered,
Container.PropertySetChangeListener listener) {
if (container instanceof Container.PropertySetChangeNotifier) {
((Container.PropertySetChangeNotifier) container)
- .addPropertySetChangeListener(new PiggybackListener(
- listener));
+ .addPropertySetChangeListener(
+ new PiggybackListener(listener));
}
}
@@ -614,8 +615,8 @@ public class ContainerOrderedWrapper implements Container.Ordered,
Container.PropertySetChangeListener listener) {
if (container instanceof Container.PropertySetChangeNotifier) {
((Container.PropertySetChangeNotifier) container)
- .removePropertySetChangeListener(new PiggybackListener(
- listener));
+ .removePropertySetChangeListener(
+ new PiggybackListener(listener));
}
}
@@ -631,7 +632,7 @@ public class ContainerOrderedWrapper implements Container.Ordered,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container.Ordered#addItemAfter(java.lang.Object,
* java.lang.Object)
*/
@@ -657,7 +658,7 @@ public class ContainerOrderedWrapper implements Container.Ordered,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container.Ordered#addItemAfter(java.lang.Object)
*/
@Override
@@ -684,10 +685,10 @@ public class ContainerOrderedWrapper implements Container.Ordered,
* This listener 'piggybacks' on the real listener in order to update the
* wrapper when needed. It proxies equals() and hashCode() to the real
* listener so that the correct listener gets removed.
- *
+ *
*/
- private class PiggybackListener implements
- Container.PropertySetChangeListener,
+ private class PiggybackListener
+ implements Container.PropertySetChangeListener,
Container.ItemSetChangeListener {
Object listener;
diff --git a/server/src/main/java/com/vaadin/data/util/DefaultItemSorter.java b/server/src/main/java/com/vaadin/data/util/DefaultItemSorter.java
index 9728ccbd51..c35a3a6325 100644
--- a/server/src/main/java/com/vaadin/data/util/DefaultItemSorter.java
+++ b/server/src/main/java/com/vaadin/data/util/DefaultItemSorter.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -36,7 +36,7 @@ import com.vaadin.data.Property;
* A Comparator is used for comparing the individual <code>Property</code>
* values. The comparator can be set using the constructor. If no comparator is
* provided a default comparator is used.
- *
+ *
*/
public class DefaultItemSorter implements ItemSorter {
@@ -48,7 +48,7 @@ public class DefaultItemSorter implements ItemSorter {
/**
* Constructs a DefaultItemSorter using the default <code>Comparator</code>
* for comparing <code>Property</code>values.
- *
+ *
*/
public DefaultItemSorter() {
this(new DefaultPropertyValueComparator());
@@ -58,7 +58,7 @@ public class DefaultItemSorter implements ItemSorter {
* Constructs a DefaultItemSorter which uses the <code>Comparator</code>
* indicated by the <code>propertyValueComparator</code> parameter for
* comparing <code>Property</code>values.
- *
+ *
* @param propertyValueComparator
* The comparator to use when comparing individual
* <code>Property</code> values
@@ -69,7 +69,7 @@ public class DefaultItemSorter implements ItemSorter {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.util.ItemSorter#compare(java.lang.Object,
* java.lang.Object)
*/
@@ -117,7 +117,7 @@ public class DefaultItemSorter implements ItemSorter {
* <p>
* The comparator set for this <code>DefaultItemSorter</code> is used for
* comparing the two property values.
- *
+ *
* @param propertyId
* The property id for the property that is used for comparison.
* @param sortDirection
@@ -155,10 +155,9 @@ public class DefaultItemSorter implements ItemSorter {
/*
* (non-Javadoc)
- *
- * @see
- * com.vaadin.data.util.ItemSorter#setSortProperties(com.vaadin.data.Container
- * .Sortable, java.lang.Object[], boolean[])
+ *
+ * @see com.vaadin.data.util.ItemSorter#setSortProperties(com.vaadin.data.
+ * Container .Sortable, java.lang.Object[], boolean[])
*/
@Override
public void setSortProperties(Container.Sortable container,
@@ -173,8 +172,8 @@ public class DefaultItemSorter implements ItemSorter {
for (int i = 0; i < propertyId.length; i++) {
if (sortable.contains(propertyId[i])) {
ids.add(propertyId[i]);
- orders.add(Boolean.valueOf(i < ascending.length ? ascending[i]
- : true));
+ orders.add(Boolean
+ .valueOf(i < ascending.length ? ascending[i] : true));
}
}
@@ -190,10 +189,10 @@ public class DefaultItemSorter implements ItemSorter {
* Provides a default comparator used for comparing {@link Property} values.
* The <code>DefaultPropertyValueComparator</code> assumes all objects it
* compares can be cast to Comparable.
- *
+ *
*/
- public static class DefaultPropertyValueComparator implements
- Comparator<Object>, Serializable {
+ public static class DefaultPropertyValueComparator
+ implements Comparator<Object>, Serializable {
@Override
@SuppressWarnings("unchecked")
diff --git a/server/src/main/java/com/vaadin/data/util/FilesystemContainer.java b/server/src/main/java/com/vaadin/data/util/FilesystemContainer.java
index 7ceda49918..d6e24fd02e 100644
--- a/server/src/main/java/com/vaadin/data/util/FilesystemContainer.java
+++ b/server/src/main/java/com/vaadin/data/util/FilesystemContainer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -38,7 +38,7 @@ import com.vaadin.util.FileTypeResolver;
/**
* A hierarchical container wrapper for a filesystem.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -107,7 +107,7 @@ public class FilesystemContainer implements Container.Hierarchical {
/**
* Constructs a new <code>FileSystemContainer</code> with the specified file
* as the root of the filesystem. The files are included recursively.
- *
+ *
* @param root
* the root file for the new file-system container. Null values
* are ignored.
@@ -121,7 +121,7 @@ public class FilesystemContainer implements Container.Hierarchical {
/**
* Constructs a new <code>FileSystemContainer</code> with the specified file
* as the root of the filesystem. The files are included recursively.
- *
+ *
* @param root
* the root file for the new file-system container.
* @param recursive
@@ -135,7 +135,7 @@ public class FilesystemContainer implements Container.Hierarchical {
/**
* Constructs a new <code>FileSystemContainer</code> with the specified file
* as the root of the filesystem.
- *
+ *
* @param root
* the root file for the new file-system container.
* @param extension
@@ -153,7 +153,7 @@ public class FilesystemContainer implements Container.Hierarchical {
/**
* Constructs a new <code>FileSystemContainer</code> with the specified root
* and recursivity status.
- *
+ *
* @param root
* the root file for the new file-system container.
* @param filter
@@ -171,7 +171,7 @@ public class FilesystemContainer implements Container.Hierarchical {
/**
* Adds new root file directory. Adds a file to be included as root file
* directory in the <code>FilesystemContainer</code>.
- *
+ *
* @param root
* the File to be added as root directory. Null values are
* ignored.
@@ -191,7 +191,7 @@ public class FilesystemContainer implements Container.Hierarchical {
* Tests if the specified Item in the container may have children. Since a
* <code>FileSystemContainer</code> contains files and directories, this
* method returns <code>true</code> for directory Items only.
- *
+ *
* @param itemId
* the id of the item.
* @return <code>true</code> if the specified Item is a directory,
@@ -316,7 +316,7 @@ public class FilesystemContainer implements Container.Hierarchical {
/**
* Returns <code>false</code> when conversion from files to directories is
* not supported.
- *
+ *
* @param itemId
* the ID of the item.
* @param areChildrenAllowed
@@ -338,7 +338,7 @@ public class FilesystemContainer implements Container.Hierarchical {
/**
* Returns <code>false</code> when moving files around in the filesystem is
* not supported.
- *
+ *
* @param itemId
* the ID of the item.
* @param newParentId
@@ -372,8 +372,8 @@ public class FilesystemContainer implements Container.Hierarchical {
// Try to match all roots
for (int i = 0; i < roots.length; i++) {
try {
- val |= ((File) itemId).getCanonicalPath().startsWith(
- roots[i].getCanonicalPath());
+ val |= ((File) itemId).getCanonicalPath()
+ .startsWith(roots[i].getCanonicalPath());
} catch (final IOException e) {
// Exception ignored
}
@@ -402,7 +402,7 @@ public class FilesystemContainer implements Container.Hierarchical {
/**
* Internal recursive method to add the files under the specified directory
* to the collection.
- *
+ *
* @param col
* the collection where the found items are added
* @param f
@@ -473,7 +473,7 @@ public class FilesystemContainer implements Container.Hierarchical {
* Gets the specified property of the specified file Item. The available
* file properties are "Name", "Size" and "Last Modified". If propertyId is
* not one of those, <code>null</code> is returned.
- *
+ *
* @param itemId
* the ID of the file whose property is requested.
* @param propertyId
@@ -512,7 +512,7 @@ public class FilesystemContainer implements Container.Hierarchical {
/**
* Gets the collection of available file properties.
- *
+ *
* @return Unmodifiable collection containing all available file properties.
*/
@Override
@@ -524,7 +524,7 @@ public class FilesystemContainer implements Container.Hierarchical {
* Gets the specified property's data type. "Name" is a <code>String</code>,
* "Size" is a <code>Long</code>, "Last Modified" is a <code>Date</code>. If
* propertyId is not one of those, <code>null</code> is returned.
- *
+ *
* @param propertyId
* the ID of the property whose type is requested.
* @return data type of the requested property, or <code>null</code>
@@ -550,7 +550,7 @@ public class FilesystemContainer implements Container.Hierarchical {
/**
* Internal method to recursively calculate the number of files under a root
* directory.
- *
+ *
* @param f
* the root to start counting from.
*/
@@ -577,7 +577,7 @@ public class FilesystemContainer implements Container.Hierarchical {
/**
* Gets the number of Items in the container. In effect, this is the
* combined amount of files and directories.
- *
+ *
* @return Number of Items in the container.
*/
@Override
@@ -610,7 +610,7 @@ public class FilesystemContainer implements Container.Hierarchical {
/**
* A Item wrapper for files in a filesystem.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -653,7 +653,7 @@ public class FilesystemContainer implements Container.Hierarchical {
* same Item contained in the same list always have different
* hash-codes, though Properties in different Items may have identical
* hash-codes.
- *
+ *
* @return A locally unique hash-code as integer
*/
@Override
@@ -664,7 +664,7 @@ public class FilesystemContainer implements Container.Hierarchical {
/**
* Tests if the given object is the same as the this object. Two
* Properties got from an Item with the same ID are equal.
- *
+ *
* @param obj
* an object to compare with this object.
* @return <code>true</code> if the given object is the same as this
@@ -688,7 +688,7 @@ public class FilesystemContainer implements Container.Hierarchical {
/**
* Gets the last modified date of this file.
- *
+ *
* @return Date
*/
public Date lastModified() {
@@ -697,7 +697,7 @@ public class FilesystemContainer implements Container.Hierarchical {
/**
* Gets the name of this file.
- *
+ *
* @return file name of this file.
*/
public String getName() {
@@ -706,7 +706,7 @@ public class FilesystemContainer implements Container.Hierarchical {
/**
* Gets the icon of this file.
- *
+ *
* @return the icon of this file.
*/
public Resource getIcon() {
@@ -715,7 +715,7 @@ public class FilesystemContainer implements Container.Hierarchical {
/**
* Gets the size of this file.
- *
+ *
* @return size
*/
public long getSize() {
@@ -738,7 +738,7 @@ public class FilesystemContainer implements Container.Hierarchical {
/**
* Filesystem container does not support adding new properties.
- *
+ *
* @see com.vaadin.data.Item#addItemProperty(Object, Property)
*/
@Override
@@ -750,7 +750,7 @@ public class FilesystemContainer implements Container.Hierarchical {
/**
* Filesystem container does not support removing properties.
- *
+ *
* @see com.vaadin.data.Item#removeItemProperty(Object)
*/
@Override
@@ -765,7 +765,7 @@ public class FilesystemContainer implements Container.Hierarchical {
/**
* Generic file extension filter for displaying only files having certain
* extension.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -775,7 +775,7 @@ public class FilesystemContainer implements Container.Hierarchical {
/**
* Constructs a new FileExtensionFilter using given extension.
- *
+ *
* @param fileExtension
* the File extension without the separator (dot).
*/
@@ -785,7 +785,7 @@ public class FilesystemContainer implements Container.Hierarchical {
/**
* Allows only files with the extension and directories.
- *
+ *
* @see java.io.FilenameFilter#accept(File, String)
*/
@Override
@@ -800,7 +800,7 @@ public class FilesystemContainer implements Container.Hierarchical {
/**
* Returns the file filter used to limit the files in this container.
- *
+ *
* @return Used filter instance or null if no filter is assigned.
*/
public FilenameFilter getFilter() {
@@ -809,7 +809,7 @@ public class FilesystemContainer implements Container.Hierarchical {
/**
* Sets the file filter used to limit the files in this container.
- *
+ *
* @param filter
* The filter to set. <code>null</code> disables filtering.
*/
@@ -819,7 +819,7 @@ public class FilesystemContainer implements Container.Hierarchical {
/**
* Sets the file filter used to limit the files in this container.
- *
+ *
* @param extension
* the Filename extension (w/o separator) to limit the files in
* container.
@@ -830,7 +830,7 @@ public class FilesystemContainer implements Container.Hierarchical {
/**
* Is this container recursive filesystem.
- *
+ *
* @return <code>true</code> if container is recursive, <code>false</code>
* otherwise.
*/
@@ -844,7 +844,7 @@ public class FilesystemContainer implements Container.Hierarchical {
* <p>
* Note : This is meaningful only if the root really is a directory.
* </p>
- *
+ *
* @param recursive
* the New value for recursive property.
*/
@@ -854,7 +854,7 @@ public class FilesystemContainer implements Container.Hierarchical {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container#addContainerProperty(java.lang.Object,
* java.lang.Class, java.lang.Object)
*/
@@ -867,7 +867,7 @@ public class FilesystemContainer implements Container.Hierarchical {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container#addItem()
*/
@Override
@@ -878,7 +878,7 @@ public class FilesystemContainer implements Container.Hierarchical {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container#addItem(java.lang.Object)
*/
@Override
@@ -889,7 +889,7 @@ public class FilesystemContainer implements Container.Hierarchical {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container#removeAllItems()
*/
@Override
@@ -900,7 +900,7 @@ public class FilesystemContainer implements Container.Hierarchical {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container#removeItem(java.lang.Object)
*/
@Override
@@ -912,7 +912,7 @@ public class FilesystemContainer implements Container.Hierarchical {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container#removeContainerProperty(java.lang.Object )
*/
@Override
diff --git a/server/src/main/java/com/vaadin/data/util/GeneratedPropertyContainer.java b/server/src/main/java/com/vaadin/data/util/GeneratedPropertyContainer.java
index 1fbca5f817..3dae54ff27 100644
--- a/server/src/main/java/com/vaadin/data/util/GeneratedPropertyContainer.java
+++ b/server/src/main/java/com/vaadin/data/util/GeneratedPropertyContainer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -38,29 +38,29 @@ import com.vaadin.shared.data.sort.SortDirection;
* Container wrapper that adds support for generated properties. This container
* only supports adding new generated properties. Adding new normal properties
* should be done for the wrapped container.
- *
+ *
* <p>
* Removing properties from this container does not remove anything from the
* wrapped container but instead only hides them from the results. These
* properties can be returned to this container by calling
* {@link #addContainerProperty(Object, Class, Object)} with same property id
* which was removed.
- *
+ *
* <p>
* If wrapped container is Filterable and/or Sortable it should only be handled
* through this container as generated properties need to be handled in a
* specific way when sorting/filtering.
- *
+ *
* <p>
* Items returned by this container do not support adding or removing
* properties. Generated properties are always read-only. Trying to make them
* editable throws an exception.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
-public class GeneratedPropertyContainer extends AbstractContainer implements
- Container.Indexed, Container.Sortable, Container.Filterable,
+public class GeneratedPropertyContainer extends AbstractContainer
+ implements Container.Indexed, Container.Sortable, Container.Filterable,
Container.PropertySetChangeNotifier, Container.ItemSetChangeNotifier {
private final Container.Indexed wrappedContainer;
@@ -171,7 +171,7 @@ public class GeneratedPropertyContainer extends AbstractContainer implements
/**
* Tests if the given object is the same as the this object. Two Items
* from the same container with the same ID are equal.
- *
+ *
* @param obj
* an object to compare with this object
* @return <code>true</code> if the given object is the same as this
@@ -203,7 +203,7 @@ public class GeneratedPropertyContainer extends AbstractContainer implements
/**
* Returns the wrapped Item that belongs to the wrapped container
- *
+ *
* @return wrapped item.
* @since 7.6.8
*/
@@ -217,8 +217,8 @@ public class GeneratedPropertyContainer extends AbstractContainer implements
* event is fired from wrapped container and needs to be reconstructed to
* act like it actually came from this container.
*/
- protected abstract class GeneratedItemAddOrRemoveEvent implements
- Serializable {
+ protected abstract class GeneratedItemAddOrRemoveEvent
+ implements Serializable {
private Object firstItemId;
private int firstIndex;
@@ -248,12 +248,12 @@ public class GeneratedPropertyContainer extends AbstractContainer implements
}
};
- protected class GeneratedItemRemoveEvent extends
- GeneratedItemAddOrRemoveEvent implements ItemRemoveEvent {
+ protected class GeneratedItemRemoveEvent
+ extends GeneratedItemAddOrRemoveEvent implements ItemRemoveEvent {
protected GeneratedItemRemoveEvent(ItemRemoveEvent event) {
- super(event.getFirstItemId(), event.getFirstIndex(), event
- .getRemovedItemsCount());
+ super(event.getFirstItemId(), event.getFirstIndex(),
+ event.getRemovedItemsCount());
}
@Override
@@ -266,8 +266,8 @@ public class GeneratedPropertyContainer extends AbstractContainer implements
implements ItemAddEvent {
protected GeneratedItemAddEvent(ItemAddEvent event) {
- super(event.getFirstItemId(), event.getFirstIndex(), event
- .getAddedItemsCount());
+ super(event.getFirstItemId(), event.getFirstIndex(),
+ event.getAddedItemsCount());
}
@Override
@@ -279,7 +279,7 @@ public class GeneratedPropertyContainer extends AbstractContainer implements
/**
* Constructor for GeneratedPropertyContainer.
- *
+ *
* @param container
* underlying indexed container
*/
@@ -308,8 +308,8 @@ public class GeneratedPropertyContainer extends AbstractContainer implements
ItemSetChangeEvent event) {
if (event instanceof ItemAddEvent) {
final ItemAddEvent addEvent = (ItemAddEvent) event;
- fireItemSetChange(new GeneratedItemAddEvent(
- addEvent));
+ fireItemSetChange(
+ new GeneratedItemAddEvent(addEvent));
} else if (event instanceof ItemRemoveEvent) {
final ItemRemoveEvent removeEvent = (ItemRemoveEvent) event;
fireItemSetChange(new GeneratedItemRemoveEvent(
@@ -324,14 +324,15 @@ public class GeneratedPropertyContainer extends AbstractContainer implements
// PropertySetChangeEvents
if (wrappedContainer instanceof PropertySetChangeNotifier) {
((PropertySetChangeNotifier) wrappedContainer)
- .addPropertySetChangeListener(new PropertySetChangeListener() {
+ .addPropertySetChangeListener(
+ new PropertySetChangeListener() {
- @Override
- public void containerPropertySetChange(
- PropertySetChangeEvent event) {
- fireContainerPropertySetChange();
- }
- });
+ @Override
+ public void containerPropertySetChange(
+ PropertySetChangeEvent event) {
+ fireContainerPropertySetChange();
+ }
+ });
}
}
@@ -341,7 +342,7 @@ public class GeneratedPropertyContainer extends AbstractContainer implements
* Add a new PropertyValueGenerator with given property id. This will
* override any existing properties with the same property id. Fires a
* PropertySetChangeEvent.
- *
+ *
* @param propertyId
* property id
* @param generator
@@ -356,7 +357,7 @@ public class GeneratedPropertyContainer extends AbstractContainer implements
/**
* Removes any possible PropertyValueGenerator with given property id. Fires
* a PropertySetChangeEvent.
- *
+ *
* @param propertyId
* property id
*/
@@ -401,7 +402,8 @@ public class GeneratedPropertyContainer extends AbstractContainer implements
}
@Override
- public void addPropertySetChangeListener(PropertySetChangeListener listener) {
+ public void addPropertySetChangeListener(
+ PropertySetChangeListener listener) {
super.addPropertySetChangeListener(listener);
}
@@ -520,7 +522,8 @@ public class GeneratedPropertyContainer extends AbstractContainer implements
// modify sort orders to work with original properties in the
// container.
for (SortOrder s : propertyGenerators.get(property)
- .getSortProperties(new SortOrder(property, direction))) {
+ .getSortProperties(
+ new SortOrder(property, direction))) {
actualSortProperties.add(s.getPropertyId());
actualSortDirections
.add(s.getDirection() == SortDirection.ASCENDING);
@@ -764,7 +767,7 @@ public class GeneratedPropertyContainer extends AbstractContainer implements
/**
* Returns the original underlying container.
- *
+ *
* @return the original underlying container
*/
public Container.Indexed getWrappedContainer() {
diff --git a/server/src/main/java/com/vaadin/data/util/HierarchicalContainer.java b/server/src/main/java/com/vaadin/data/util/HierarchicalContainer.java
index 2235e77b34..0615f41b2b 100644
--- a/server/src/main/java/com/vaadin/data/util/HierarchicalContainer.java
+++ b/server/src/main/java/com/vaadin/data/util/HierarchicalContainer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,13 +32,13 @@ import com.vaadin.data.Item;
/**
* A specialized Container whose contents can be accessed like it was a
* tree-like structure.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@SuppressWarnings("serial")
-public class HierarchicalContainer extends IndexedContainer implements
- Container.Hierarchical {
+public class HierarchicalContainer extends IndexedContainer
+ implements Container.Hierarchical {
/**
* Set of IDs of those contained Items that can't have children.
@@ -83,7 +83,7 @@ public class HierarchicalContainer extends IndexedContainer implements
/**
* Counts how many nested contents change disable calls are in progress.
- *
+ *
* Pending events are only fired when the counter reaches zero again.
*/
private int contentChangedEventsDisabledCount = 0;
@@ -196,7 +196,7 @@ public class HierarchicalContainer extends IndexedContainer implements
* {@link #setParent(Object itemId, Object newParentId)} or
* {@link com.vaadin.data.Container#removeItem(Object itemId)}.
* </p>
- *
+ *
* @param itemId
* the ID of the Item in the container whose child capability is
* to be set.
@@ -231,7 +231,7 @@ public class HierarchicalContainer extends IndexedContainer implements
* also possible to detach a node from the hierarchy (and thus make it root)
* by setting the parent <code>null</code>.
* </p>
- *
+ *
* @param itemId
* the ID of the item to be set as the child of the Item
* identified with newParentId.
@@ -304,7 +304,8 @@ public class HierarchicalContainer extends IndexedContainer implements
// Checks that the new parent exists in container and can have
// children
- if (!containsId(newParentId) || noChildrenAllowed.contains(newParentId)) {
+ if (!containsId(newParentId)
+ || noChildrenAllowed.contains(newParentId)) {
return false;
}
@@ -360,7 +361,7 @@ public class HierarchicalContainer extends IndexedContainer implements
/**
* Moves a node (an Item) in the container immediately after a sibling node.
* The two nodes must have the same parent in the container.
- *
+ *
* @param itemId
* the identifier of the moved node (Item)
* @param siblingId
@@ -402,7 +403,7 @@ public class HierarchicalContainer extends IndexedContainer implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.util.IndexedContainer#addItem()
*/
@Override
@@ -448,9 +449,8 @@ public class HierarchicalContainer extends IndexedContainer implements
private void enableAndFireContentsChangeEvents() {
if (contentChangedEventsDisabledCount <= 0) {
- getLogger()
- .log(Level.WARNING,
- "Mismatched calls to disable and enable contents change events in HierarchicalContainer");
+ getLogger().log(Level.WARNING,
+ "Mismatched calls to disable and enable contents change events in HierarchicalContainer");
contentChangedEventsDisabledCount = 0;
} else {
contentChangedEventsDisabledCount--;
@@ -465,7 +465,7 @@ public class HierarchicalContainer extends IndexedContainer implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.util.IndexedContainer#addItem(java.lang.Object)
*/
@Override
@@ -492,7 +492,7 @@ public class HierarchicalContainer extends IndexedContainer implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.util.IndexedContainer#removeAllItems()
*/
@Override
@@ -524,7 +524,7 @@ public class HierarchicalContainer extends IndexedContainer implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.util.IndexedContainer#removeItem(java.lang.Object )
*/
@Override
@@ -599,7 +599,7 @@ public class HierarchicalContainer extends IndexedContainer implements
/**
* Removes the Item identified by given itemId and all its children.
- *
+ *
* @see #removeItem(Object)
* @param itemId
* the identifier of the Item to be removed
@@ -618,7 +618,7 @@ public class HierarchicalContainer extends IndexedContainer implements
/**
* Removes the Item identified by given itemId and all its children from the
* given Container.
- *
+ *
* @param container
* the container where the item is to be removed
* @param itemId
@@ -632,8 +632,8 @@ public class HierarchicalContainer extends IndexedContainer implements
if (children2 != null) {
Object[] array = children2.toArray();
for (int i = 0; i < array.length; i++) {
- boolean removeItemRecursively = removeItemRecursively(
- container, array[i]);
+ boolean removeItemRecursively = removeItemRecursively(container,
+ array[i]);
if (!removeItemRecursively) {
success = false;
}
@@ -649,7 +649,7 @@ public class HierarchicalContainer extends IndexedContainer implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.util.IndexedContainer#doSort()
*/
@Override
@@ -665,7 +665,7 @@ public class HierarchicalContainer extends IndexedContainer implements
/**
* Used to control how filtering works. @see
* {@link #setIncludeParentsWhenFiltering(boolean)} for more information.
- *
+ *
* @return true if all parents for items that match the filter are included
* when filtering, false if only the matching items are included
*/
@@ -679,7 +679,7 @@ public class HierarchicalContainer extends IndexedContainer implements
* items themselves. Setting this to false causes the filtering to only
* include the matching items and make items with excluded parents into root
* items.
- *
+ *
* @param includeParentsWhenFiltering
* true to include all parents for items that match the filter,
* false to only include the matching items
@@ -695,9 +695,9 @@ public class HierarchicalContainer extends IndexedContainer implements
/*
* Overridden to provide filtering for root & children items.
- *
+ *
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.util.IndexedContainer#updateContainerFiltering()
*/
@Override
@@ -746,7 +746,8 @@ public class HierarchicalContainer extends IndexedContainer implements
for (Object itemId : filteredItemIds) {
Object itemParent = parent.get(itemId);
- if (itemParent == null || !filteredItemIds.contains(itemParent)) {
+ if (itemParent == null
+ || !filteredItemIds.contains(itemParent)) {
// Parent is not included or this was a root, in both cases
// this should be a filtered root
filteredRoots.add(itemId);
@@ -764,7 +765,7 @@ public class HierarchicalContainer extends IndexedContainer implements
/**
* Adds the given childItemId as a filteredChildren for the parentItemId and
* sets it filteredParent.
- *
+ *
* @param parentItemId
* @param childItemId
*/
@@ -785,7 +786,7 @@ public class HierarchicalContainer extends IndexedContainer implements
* filteredChildren map in the same order as they are in the children map.
* Starts from parentItemId and recurses down as long as child items that
* should be included are found.
- *
+ *
* @param parentItemId
* The item id to start recurse from. Not added to a
* filteredChildren list
@@ -813,7 +814,7 @@ public class HierarchicalContainer extends IndexedContainer implements
* when filtering. All items which passes the filters are included.
* Additionally all items that have a child node that should be included are
* also themselves included.
- *
+ *
* @param itemId
* @param includedItems
* @return true if the itemId should be included in the filtered container.
@@ -840,7 +841,7 @@ public class HierarchicalContainer extends IndexedContainer implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.data.util.IndexedContainer#passesFilters(java.lang.Object)
*/
diff --git a/server/src/main/java/com/vaadin/data/util/HierarchicalContainerOrderedWrapper.java b/server/src/main/java/com/vaadin/data/util/HierarchicalContainerOrderedWrapper.java
index 1c7960f954..d02c7e49c4 100644
--- a/server/src/main/java/com/vaadin/data/util/HierarchicalContainerOrderedWrapper.java
+++ b/server/src/main/java/com/vaadin/data/util/HierarchicalContainerOrderedWrapper.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,12 +23,12 @@ import com.vaadin.data.Container.Hierarchical;
* A wrapper class for adding external ordering to containers not implementing
* the {@link com.vaadin.data.Container.Ordered} interface while retaining
* {@link Hierarchical} features.
- *
+ *
* @see ContainerOrderedWrapper
*/
@SuppressWarnings({ "serial" })
-public class HierarchicalContainerOrderedWrapper extends
- ContainerOrderedWrapper implements Hierarchical {
+public class HierarchicalContainerOrderedWrapper extends ContainerOrderedWrapper
+ implements Hierarchical {
private Hierarchical hierarchical;
diff --git a/server/src/main/java/com/vaadin/data/util/IndexedContainer.java b/server/src/main/java/com/vaadin/data/util/IndexedContainer.java
index c281fb35c1..c41319a79d 100644
--- a/server/src/main/java/com/vaadin/data/util/IndexedContainer.java
+++ b/server/src/main/java/com/vaadin/data/util/IndexedContainer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -38,20 +38,21 @@ import com.vaadin.data.util.filter.UnsupportedFilterException;
/**
* An implementation of the <code>{@link Container.Indexed}</code> interface
- * with all important features.</p>
- *
+ * with all important features.
+ * </p>
+ *
* Features:
* <ul>
- * <li> {@link Container.Indexed}
- * <li> {@link Container.Ordered}
- * <li> {@link Container.Sortable}
- * <li> {@link Container.Filterable}
- * <li> {@link Cloneable} (deprecated, might be removed in the future)
+ * <li>{@link Container.Indexed}
+ * <li>{@link Container.Ordered}
+ * <li>{@link Container.Sortable}
+ * <li>{@link Container.Filterable}
+ * <li>{@link Cloneable} (deprecated, might be removed in the future)
* <li>Sends all needed events on content changes.
* </ul>
- *
+ *
* @see com.vaadin.data.Container
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -59,11 +60,11 @@ import com.vaadin.data.util.filter.UnsupportedFilterException;
@SuppressWarnings("serial")
// item type is really IndexedContainerItem, but using Item not to show it in
// public API
-public class IndexedContainer extends
- AbstractInMemoryContainer<Object, Object, Item> implements
- Container.PropertySetChangeNotifier, Property.ValueChangeNotifier,
- Container.Sortable, Cloneable, Container.Filterable,
- Container.SimpleFilterable {
+public class IndexedContainer
+ extends AbstractInMemoryContainer<Object, Object, Item>
+ implements Container.PropertySetChangeNotifier,
+ Property.ValueChangeNotifier, Container.Sortable, Cloneable,
+ Container.Filterable, Container.SimpleFilterable {
/* Internal structure */
@@ -136,7 +137,7 @@ public class IndexedContainer extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container#getContainerPropertyIds()
*/
@Override
@@ -146,7 +147,7 @@ public class IndexedContainer extends
/**
* Gets the type of a Property stored in the list.
- *
+ *
* @param id
* the ID of the Property.
* @return Type of the requested Property
@@ -158,7 +159,7 @@ public class IndexedContainer extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container#getContainerProperty(java.lang.Object,
* java.lang.Object)
*/
@@ -176,7 +177,7 @@ public class IndexedContainer extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container#addContainerProperty(java.lang.Object,
* java.lang.Class, java.lang.Object)
*/
@@ -201,9 +202,10 @@ public class IndexedContainer extends
// If default value is given, set it
if (defaultValue != null) {
// for existing rows
- for (final Iterator<?> i = getAllItemIds().iterator(); i.hasNext();) {
- getItem(i.next()).getItemProperty(propertyId).setValue(
- defaultValue);
+ for (final Iterator<?> i = getAllItemIds().iterator(); i
+ .hasNext();) {
+ getItem(i.next()).getItemProperty(propertyId)
+ .setValue(defaultValue);
}
// store for next rows
if (defaultPropertyValues == null) {
@@ -220,7 +222,7 @@ public class IndexedContainer extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container#removeAllItems()
*/
@Override
@@ -262,13 +264,13 @@ public class IndexedContainer extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container#addItem(java.lang.Object)
*/
@Override
public Item addItem(Object itemId) {
- Item item = internalAddItemAtEnd(itemId, new IndexedContainerItem(
- itemId), false);
+ Item item = internalAddItemAtEnd(itemId,
+ new IndexedContainerItem(itemId), false);
if (item == null) {
return null;
} else if (!isFiltered()) {
@@ -284,7 +286,7 @@ public class IndexedContainer extends
/**
* Helper method to add default values for items if available
- *
+ *
* @param t
* data table of added item
*/
@@ -298,7 +300,7 @@ public class IndexedContainer extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container#removeItem(java.lang.Object)
*/
@Override
@@ -323,7 +325,7 @@ public class IndexedContainer extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container#removeContainerProperty(java.lang.Object )
*/
@Override
@@ -342,7 +344,8 @@ public class IndexedContainer extends
}
// If remove the Property from all Items
- for (final Iterator<Object> i = getAllItemIds().iterator(); i.hasNext();) {
+ for (final Iterator<Object> i = getAllItemIds().iterator(); i
+ .hasNext();) {
items.get(i.next()).remove(propertyId);
}
@@ -356,7 +359,7 @@ public class IndexedContainer extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container.Ordered#addItemAfter(java.lang.Object,
* java.lang.Object)
*/
@@ -387,13 +390,13 @@ public class IndexedContainer extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container.Indexed#addItemAt(int, java.lang.Object)
*/
@Override
public Item addItemAt(int index, Object newItemId) {
- return internalAddItemAt(index, newItemId, new IndexedContainerItem(
- newItemId), true);
+ return internalAddItemAt(index, newItemId,
+ new IndexedContainerItem(newItemId), true);
}
/**
@@ -417,7 +420,7 @@ public class IndexedContainer extends
/**
* Generates an unique identifier for use as an item id. Guarantees that the
* generated id is not currently used as an id.
- *
+ *
* @return
*/
private Serializable generateId() {
@@ -441,7 +444,7 @@ public class IndexedContainer extends
/**
* An <code>event</code> object specifying the list whose Item set has
* changed.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -449,14 +452,15 @@ public class IndexedContainer extends
private final int addedItemIndex;
- private ItemSetChangeEvent(IndexedContainer source, int addedItemIndex) {
+ private ItemSetChangeEvent(IndexedContainer source,
+ int addedItemIndex) {
super(source);
this.addedItemIndex = addedItemIndex;
}
/**
* Iff one item is added, gives its index.
- *
+ *
* @return -1 if either multiple items are changed or some other change
* than add is done.
*/
@@ -469,12 +473,12 @@ public class IndexedContainer extends
/**
* An <code>event</code> object specifying the Property in a list whose
* value has changed.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
- private static class PropertyValueChangeEvent extends EventObject implements
- Property.ValueChangeEvent, Serializable {
+ private static class PropertyValueChangeEvent extends EventObject
+ implements Property.ValueChangeEvent, Serializable {
private PropertyValueChangeEvent(Property source) {
super(source);
@@ -482,7 +486,7 @@ public class IndexedContainer extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Property.ValueChangeEvent#getProperty()
*/
@Override
@@ -526,7 +530,7 @@ public class IndexedContainer extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Property.ValueChangeNotifier#addListener(com.
* vaadin.data.Property.ValueChangeListener)
*/
@@ -550,12 +554,13 @@ public class IndexedContainer extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Property.ValueChangeNotifier#removeListener(com
* .vaadin.data.Property.ValueChangeListener)
*/
@Override
- public void removeValueChangeListener(Property.ValueChangeListener listener) {
+ public void removeValueChangeListener(
+ Property.ValueChangeListener listener) {
if (propertyValueChangeListeners != null) {
propertyValueChangeListeners.remove(listener);
}
@@ -573,7 +578,7 @@ public class IndexedContainer extends
/**
* Sends a Property value change event to all interested listeners.
- *
+ *
* @param source
* the IndexedContainerProperty object.
*/
@@ -637,7 +642,7 @@ public class IndexedContainer extends
/**
* Adds new single Property change listener.
- *
+ *
* @param propertyId
* the ID of the Property to add.
* @param itemId
@@ -670,7 +675,7 @@ public class IndexedContainer extends
/**
* Removes a previously registered single Property change listener.
- *
+ *
* @param propertyId
* the ID of the Property to remove.
* @param itemId
@@ -707,10 +712,10 @@ public class IndexedContainer extends
/*
* A class implementing the com.vaadin.data.Item interface to be contained
* in the list.
- *
+ *
* @author Vaadin Ltd.
- *
- *
+ *
+ *
* @since 3.0
*/
class IndexedContainerItem implements Item {
@@ -723,7 +728,7 @@ public class IndexedContainer extends
/**
* Constructs a new ListItem instance and connects it to a host
* container.
- *
+ *
* @param itemId
* the Item ID of the new Item.
*/
@@ -733,7 +738,7 @@ public class IndexedContainer extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Item#getItemProperty(java.lang.Object)
*/
@Override
@@ -755,7 +760,7 @@ public class IndexedContainer extends
* Item. The format of the string is a space separated catenation of the
* <code>String</code> representations of the values of the Properties
* contained by the Item.
- *
+ *
* @return <code>String</code> representation of the Item contents
*/
@Override
@@ -778,7 +783,7 @@ public class IndexedContainer extends
* list. Two Items inside the same list have always different
* hash-codes, though Items in different lists may have identical
* hash-codes.
- *
+ *
* @return A locally unique hash-code as integer
*/
@Override
@@ -789,7 +794,7 @@ public class IndexedContainer extends
/**
* Tests if the given object is the same as the this object. Two Items
* got from a list container with the same ID are equal.
- *
+ *
* @param obj
* an object to compare with this object
* @return <code>true</code> if the given object is the same as this
@@ -813,7 +818,7 @@ public class IndexedContainer extends
* IndexedContainerItem does not support adding new properties. Add
* properties at container level. See
* {@link IndexedContainer#addContainerProperty(Object, Class, Object)}
- *
+ *
* @see com.vaadin.data.Item#addProperty(Object, Property)
*/
@Override
@@ -827,7 +832,7 @@ public class IndexedContainer extends
* Indexed container does not support removing properties. Remove
* properties at container level. See
* {@link IndexedContainer#removeContainerProperty(Object)}
- *
+ *
* @see com.vaadin.data.Item#removeProperty(Object)
*/
@Override
@@ -843,13 +848,13 @@ public class IndexedContainer extends
* A class implementing the {@link Property} interface to be contained in
* the {@link IndexedContainerItem} contained in the
* {@link IndexedContainer}.
- *
+ *
* @author Vaadin Ltd.
- *
+ *
* @since 3.0
*/
- private class IndexedContainerProperty<T> implements Property<T>,
- Property.ValueChangeNotifier {
+ private class IndexedContainerProperty<T>
+ implements Property<T>, Property.ValueChangeNotifier {
/**
* ID of the Item, where this property resides.
@@ -863,7 +868,7 @@ public class IndexedContainer extends
/**
* Constructs a new {@link IndexedContainerProperty} object.
- *
+ *
* @param itemId
* the ID of the Item to connect the new Property to.
* @param propertyId
@@ -884,7 +889,7 @@ public class IndexedContainer extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Property#getType()
*/
@Override
@@ -894,7 +899,7 @@ public class IndexedContainer extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Property#getValue()
*/
@Override
@@ -904,7 +909,7 @@ public class IndexedContainer extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Property#isReadOnly()
*/
@Override
@@ -914,7 +919,7 @@ public class IndexedContainer extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Property#setReadOnly(boolean)
*/
@Override
@@ -928,11 +933,12 @@ public class IndexedContainer extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Property#setValue(java.lang.Object)
*/
@Override
- public void setValue(Object newValue) throws Property.ReadOnlyException {
+ public void setValue(Object newValue)
+ throws Property.ReadOnlyException {
// Gets the Property set
final Map<Object, Object> propertySet = items.get(itemId);
@@ -968,7 +974,7 @@ public class IndexedContainer extends
* If legacy Property toString mode is disabled, the string
* representation has no special meaning
* </p>
- *
+ *
* @return A string representation of the value value stored in the
* Property or a string representation of the Property object.
* @deprecated As of 7.0. To get the property value, use
@@ -995,7 +1001,7 @@ public class IndexedContainer extends
* same Item contained in the same list always have different
* hash-codes, though Properties in different Items may have identical
* hash-codes.
- *
+ *
* @return A locally unique hash-code as integer
*/
@Override
@@ -1006,7 +1012,7 @@ public class IndexedContainer extends
/**
* Tests if the given object is the same as the this object. Two
* Properties got from an Item with the same ID are equal.
- *
+ *
* @param obj
* an object to compare with this object
* @return <code>true</code> if the given object is the same as this
@@ -1019,19 +1025,19 @@ public class IndexedContainer extends
return false;
}
final IndexedContainerProperty lp = (IndexedContainerProperty) obj;
- return lp.getHost() == getHost()
- && lp.propertyId.equals(propertyId)
+ return lp.getHost() == getHost() && lp.propertyId.equals(propertyId)
&& lp.itemId.equals(itemId);
}
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Property.ValueChangeNotifier#addListener(
* com.vaadin.data.Property.ValueChangeListener)
*/
@Override
- public void addValueChangeListener(Property.ValueChangeListener listener) {
+ public void addValueChangeListener(
+ Property.ValueChangeListener listener) {
addSinglePropertyChangeListener(propertyId, itemId, listener);
}
@@ -1047,7 +1053,7 @@ public class IndexedContainer extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Property.ValueChangeNotifier#removeListener
* (com.vaadin.data.Property.ValueChangeListener)
*/
@@ -1075,7 +1081,7 @@ public class IndexedContainer extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container.Sortable#sort(java.lang.Object[],
* boolean[])
*/
@@ -1086,7 +1092,7 @@ public class IndexedContainer extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container.Sortable#getSortableContainerPropertyIds
* ()
*/
@@ -1107,10 +1113,10 @@ public class IndexedContainer extends
/**
* Supports cloning of the IndexedContainer cleanly.
- *
+ *
* @throws CloneNotSupportedException
* if an object cannot be cloned. .
- *
+ *
* @deprecated As of 6.6. Cloning support might be removed from
* IndexedContainer in the future
*/
@@ -1122,26 +1128,35 @@ public class IndexedContainer extends
final IndexedContainer nc = new IndexedContainer();
// Clone the shallow properties
- nc.setAllItemIds(getAllItemIds() != null ? (ListSet<Object>) ((ListSet<Object>) getAllItemIds())
- .clone() : null);
- nc.setItemSetChangeListeners(getItemSetChangeListeners() != null ? new LinkedList<Container.ItemSetChangeListener>(
- getItemSetChangeListeners()) : null);
- nc.propertyIds = propertyIds != null ? (ArrayList<Object>) propertyIds
- .clone() : null;
- nc.setPropertySetChangeListeners(getPropertySetChangeListeners() != null ? new LinkedList<Container.PropertySetChangeListener>(
- getPropertySetChangeListeners()) : null);
- nc.propertyValueChangeListeners = propertyValueChangeListeners != null ? (LinkedList<Property.ValueChangeListener>) propertyValueChangeListeners
- .clone() : null;
- nc.readOnlyProperties = readOnlyProperties != null ? (HashSet<Property<?>>) readOnlyProperties
- .clone() : null;
- nc.singlePropertyValueChangeListeners = singlePropertyValueChangeListeners != null ? (Hashtable<Object, Map<Object, List<Property.ValueChangeListener>>>) singlePropertyValueChangeListeners
- .clone() : null;
+ nc.setAllItemIds(getAllItemIds() != null
+ ? (ListSet<Object>) ((ListSet<Object>) getAllItemIds()).clone()
+ : null);
+ nc.setItemSetChangeListeners(getItemSetChangeListeners() != null
+ ? new LinkedList<Container.ItemSetChangeListener>(
+ getItemSetChangeListeners())
+ : null);
+ nc.propertyIds = propertyIds != null
+ ? (ArrayList<Object>) propertyIds.clone() : null;
+ nc.setPropertySetChangeListeners(getPropertySetChangeListeners() != null
+ ? new LinkedList<Container.PropertySetChangeListener>(
+ getPropertySetChangeListeners())
+ : null);
+ nc.propertyValueChangeListeners = propertyValueChangeListeners != null
+ ? (LinkedList<Property.ValueChangeListener>) propertyValueChangeListeners
+ .clone()
+ : null;
+ nc.readOnlyProperties = readOnlyProperties != null
+ ? (HashSet<Property<?>>) readOnlyProperties.clone() : null;
+ nc.singlePropertyValueChangeListeners = singlePropertyValueChangeListeners != null
+ ? (Hashtable<Object, Map<Object, List<Property.ValueChangeListener>>>) singlePropertyValueChangeListeners
+ .clone()
+ : null;
nc.types = types != null ? (Hashtable<Object, Class<?>>) types.clone()
: null;
- nc.setFilters((HashSet<Filter>) ((HashSet<Filter>) getFilters())
- .clone());
+ nc.setFilters(
+ (HashSet<Filter>) ((HashSet<Filter>) getFilters()).clone());
nc.setFilteredItemIds(getFilteredItemIds() == null ? null
: (ListSet<Object>) ((ListSet<Object>) getFilteredItemIds())
@@ -1152,7 +1167,8 @@ public class IndexedContainer extends
nc.items = null;
} else {
nc.items = new Hashtable<Object, Map<Object, Object>>();
- for (final Iterator<?> i = items.keySet().iterator(); i.hasNext();) {
+ for (final Iterator<?> i = items.keySet().iterator(); i
+ .hasNext();) {
final Object id = i.next();
final Hashtable<Object, Object> it = (Hashtable<Object, Object>) items
.get(id);
@@ -1198,7 +1214,7 @@ public class IndexedContainer extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.util.AbstractInMemoryContainer#getContainerFilters()
*/
@Override
@@ -1208,7 +1224,7 @@ public class IndexedContainer extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.util.AbstractInMemoryContainer#getContainerFilters()
*/
@Override
diff --git a/server/src/main/java/com/vaadin/data/util/ItemSorter.java b/server/src/main/java/com/vaadin/data/util/ItemSorter.java
index 141f84ad43..b3a1b63417 100644
--- a/server/src/main/java/com/vaadin/data/util/ItemSorter.java
+++ b/server/src/main/java/com/vaadin/data/util/ItemSorter.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,13 +26,14 @@ import com.vaadin.data.Container.Sortable;
* The <code>ItemSorter</code> interface can be used in <code>Sortable</code>
* implementations to provide a custom sorting method.
*/
-public interface ItemSorter extends Comparator<Object>, Cloneable, Serializable {
+public interface ItemSorter
+ extends Comparator<Object>, Cloneable, Serializable {
/**
* Sets the parameters for an upcoming sort operation. The parameters
* determine what container to sort and how the <code>ItemSorter</code>
* sorts the container.
- *
+ *
* @param container
* The container that will be sorted. The container must contain
* the propertyIds given in the <code>propertyId</code>
@@ -60,7 +61,7 @@ public interface ItemSorter extends Comparator<Object>, Cloneable, Serializable
* The parameters for the <code>ItemSorter</code> <code>compare()</code>
* method must always be item ids which exist in the container set using
* {@link #setSortProperties(Sortable, Object[], boolean[])}.
- *
+ *
* @see Comparator#compare(Object, Object)
*/
@Override
diff --git a/server/src/main/java/com/vaadin/data/util/LegacyPropertyHelper.java b/server/src/main/java/com/vaadin/data/util/LegacyPropertyHelper.java
index 7432d036fb..795d2039af 100644
--- a/server/src/main/java/com/vaadin/data/util/LegacyPropertyHelper.java
+++ b/server/src/main/java/com/vaadin/data/util/LegacyPropertyHelper.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,7 +27,7 @@ import com.vaadin.server.VaadinService;
/**
* Helper class which provides methods for handling Property.toString in a
* Vaadin 6 compatible way
- *
+ *
* @author Vaadin Ltd
* @since 7.1
* @deprecated This is only used internally for backwards compatibility
@@ -37,7 +37,7 @@ public class LegacyPropertyHelper implements Serializable {
/**
* Returns the property value converted to a String.
- *
+ *
* @param p
* The property
* @return A string representation of the property value, compatible with
@@ -76,7 +76,7 @@ public class LegacyPropertyHelper implements Serializable {
* The legacy toString mode can be toggled using the
* "legacyPropertyToString" init parameter
* </p>
- *
+ *
* @return true if legacy Property.toString() mode is enabled, false
* otherwise
*/
diff --git a/server/src/main/java/com/vaadin/data/util/ListSet.java b/server/src/main/java/com/vaadin/data/util/ListSet.java
index ccc9e0dbfd..b03a0422f3 100644
--- a/server/src/main/java/com/vaadin/data/util/ListSet.java
+++ b/server/src/main/java/com/vaadin/data/util/ListSet.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ import java.util.Iterator;
* specified by {@link #equals(Object)}). The {@link #set(int, Object)} method
* allows duplicates because of the way {@link Collections#sort(java.util.List)}
* works.
- *
+ *
* This class is subject to change and should not be used outside Vaadin core.
*/
public class ListSet<E> extends ArrayList<E> {
@@ -220,7 +220,7 @@ public class ListSet<E> extends ArrayList<E> {
/**
* Removes "e" from the set if it no longer exists in the list.
- *
+ *
* @param e
*/
private void removeFromSet(E e) {
@@ -245,7 +245,7 @@ public class ListSet<E> extends ArrayList<E> {
/**
* Marks the "element" can be found more than once from the list. Allowed in
* {@link #set(int, Object)} to make sorting work.
- *
+ *
* @param element
*/
private void addDuplicate(E element) {
diff --git a/server/src/main/java/com/vaadin/data/util/MethodProperty.java b/server/src/main/java/com/vaadin/data/util/MethodProperty.java
index 83279afa53..70ee735d96 100644
--- a/server/src/main/java/com/vaadin/data/util/MethodProperty.java
+++ b/server/src/main/java/com/vaadin/data/util/MethodProperty.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -36,26 +36,26 @@ import com.vaadin.util.SerializerHelper;
* attached to a field of an object. Accessing the object through the Property
* interface directly manipulates the underlying field.
* </p>
- *
+ *
* <p>
* It's assumed that the return value returned by the getter method is
* assignable to the type of the property, and the setter method parameter is
* assignable to that value.
* </p>
- *
+ *
* <p>
* A valid getter method must always be available, but instance of this class
* can be constructed with a <code>null</code> setter method in which case the
* resulting MethodProperty is read-only.
* </p>
- *
+ *
* <p>
* MethodProperty implements Property.ValueChangeNotifier, but does not
* automatically know whether or not the getter method will actually return a
* new value - value change listeners are always notified when setValue is
* called, without verifying what the getter returns.
* </p>
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -94,7 +94,8 @@ public class MethodProperty<T> extends AbstractProperty<T> {
private static final Object[] DEFAULT_SET_ARGS = new Object[1];
/* Special serialization to handle method references */
- private void writeObject(java.io.ObjectOutputStream out) throws IOException {
+ private void writeObject(java.io.ObjectOutputStream out)
+ throws IOException {
out.defaultWriteObject();
SerializerHelper.writeClass(out, type);
out.writeObject(instance);
@@ -102,16 +103,16 @@ public class MethodProperty<T> extends AbstractProperty<T> {
out.writeObject(getArgs);
if (setMethod != null) {
out.writeObject(setMethod.getName());
- SerializerHelper
- .writeClassArray(out, setMethod.getParameterTypes());
+ SerializerHelper.writeClassArray(out,
+ setMethod.getParameterTypes());
} else {
out.writeObject(null);
out.writeObject(null);
}
if (getMethod != null) {
out.writeObject(getMethod.getName());
- SerializerHelper
- .writeClassArray(out, getMethod.getParameterTypes());
+ SerializerHelper.writeClassArray(out,
+ getMethod.getParameterTypes());
} else {
out.writeObject(null);
out.writeObject(null);
@@ -119,8 +120,8 @@ public class MethodProperty<T> extends AbstractProperty<T> {
}
/* Special serialization to handle method references */
- private void readObject(java.io.ObjectInputStream in) throws IOException,
- ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in)
+ throws IOException, ClassNotFoundException {
in.defaultReadObject();
try {
@SuppressWarnings("unchecked")
@@ -165,19 +166,19 @@ public class MethodProperty<T> extends AbstractProperty<T> {
* constructor will be called with no arguments, and the setter method with
* only the new value as the sole argument.
* </p>
- *
+ *
* <p>
* If the setter method is unavailable, the resulting
* <code>MethodProperty</code> will be read-only, otherwise it will be
* read-write.
* </p>
- *
+ *
* <p>
* Method names are constructed from the bean property by adding
* get/is/are/set prefix and capitalising the first character in the name of
* the given bean property.
* </p>
- *
+ *
* @param instance
* the object that includes the property.
* @param beanPropertyName
@@ -197,8 +198,8 @@ public class MethodProperty<T> extends AbstractProperty<T> {
try {
getMethod = initGetterMethod(beanPropertyName, beanClass);
} catch (final java.lang.NoSuchMethodException ignored) {
- throw new MethodException(this, "Bean property " + beanPropertyName
- + " can not be found");
+ throw new MethodException(this,
+ "Bean property " + beanPropertyName + " can not be found");
}
// In case the get method is found, resolve the type
@@ -216,9 +217,9 @@ public class MethodProperty<T> extends AbstractProperty<T> {
if (returnType.isPrimitive()) {
type = (Class<T>) convertPrimitiveType(returnType);
if (type.isPrimitive()) {
- throw new MethodException(this, "Bean property "
- + beanPropertyName
- + " getter return type must not be void");
+ throw new MethodException(this,
+ "Bean property " + beanPropertyName
+ + " getter return type must not be void");
}
} else {
type = (Class<T>) returnType;
@@ -235,13 +236,13 @@ public class MethodProperty<T> extends AbstractProperty<T> {
* instantiated with this constructor will be called with no arguments, and
* the setter method with only the new value as the sole argument.
* </p>
- *
+ *
* <p>
* If the setter method is <code>null</code>, the resulting
* <code>MethodProperty</code> will be read-only, otherwise it will be
* read-write.
* </p>
- *
+ *
* @param type
* the type of the property.
* @param instance
@@ -250,7 +251,7 @@ public class MethodProperty<T> extends AbstractProperty<T> {
* the name of the getter method.
* @param setMethodName
* the name of the setter method.
- *
+ *
*/
public MethodProperty(Class<? extends T> type, Object instance,
String getMethodName, String setMethodName) {
@@ -265,13 +266,13 @@ public class MethodProperty<T> extends AbstractProperty<T> {
* instantiated with this constructor will be called with no arguments, and
* the setter method with only the new value as the sole argument.
* </p>
- *
+ *
* <p>
* If the setter method is <code>null</code>, the resulting
* <code>MethodProperty</code> will be read-only, otherwise it will be
* read-write.
* </p>
- *
+ *
* @param type
* the type of the property.
* @param instance
@@ -297,7 +298,7 @@ public class MethodProperty<T> extends AbstractProperty<T> {
* setArgumentIndex will be replaced with the argument passed to the
* {@link #setValue(Object newValue)} method.
* </p>
- *
+ *
* <p>
* For example, if the <code>setArgs</code> contains <code>A</code>,
* <code>B</code> and <code>C</code>, and <code>setArgumentIndex =
@@ -305,7 +306,7 @@ public class MethodProperty<T> extends AbstractProperty<T> {
* in the setter method to be called with the parameter set of
* <code>{A, X, C}</code>
* </p>
- *
+ *
* @param type
* the type of the property.
* @param instance
@@ -332,8 +333,8 @@ public class MethodProperty<T> extends AbstractProperty<T> {
if (setMethodName != null && setArgs == null) {
throw new IndexOutOfBoundsException("The setArgs can not be null");
}
- if (setMethodName != null
- && (setArgumentIndex < 0 || setArgumentIndex >= setArgs.length)) {
+ if (setMethodName != null && (setArgumentIndex < 0
+ || setArgumentIndex >= setArgs.length)) {
throw new IndexOutOfBoundsException(
"The setArgumentIndex must be >= 0 and < setArgs.length");
}
@@ -391,8 +392,8 @@ public class MethodProperty<T> extends AbstractProperty<T> {
}
}
if (found != true) {
- throw new MethodException(this, "Could not find " + getMethodName
- + "-method");
+ throw new MethodException(this,
+ "Could not find " + getMethodName + "-method");
}
// Finds set method
@@ -444,8 +445,8 @@ public class MethodProperty<T> extends AbstractProperty<T> {
}
}
if (found != true) {
- throw new MethodException(this, "Could not identify "
- + setMethodName + "-method");
+ throw new MethodException(this,
+ "Could not identify " + setMethodName + "-method");
}
}
@@ -467,7 +468,7 @@ public class MethodProperty<T> extends AbstractProperty<T> {
* except that instead of names of the getter and setter methods this
* constructor is given the actual methods themselves.
* </p>
- *
+ *
* @param type
* the type of the property.
* @param instance
@@ -509,7 +510,8 @@ public class MethodProperty<T> extends AbstractProperty<T> {
}
// Gets the return type from get method
- Class<? extends T> convertedType = (Class<? extends T>) convertPrimitiveType(type);
+ Class<? extends T> convertedType = (Class<? extends T>) convertPrimitiveType(
+ type);
this.getMethod = getMethod;
this.setMethod = setMethod;
@@ -520,7 +522,7 @@ public class MethodProperty<T> extends AbstractProperty<T> {
/**
* Find a getter method for a property (getXyz(), isXyz() or areXyz()).
- *
+ *
* @param propertyName
* name of the property
* @param beanClass
@@ -529,8 +531,8 @@ public class MethodProperty<T> extends AbstractProperty<T> {
* @throws NoSuchMethodException
* if no getter found
*/
- static Method initGetterMethod(String propertyName, final Class<?> beanClass)
- throws NoSuchMethodException {
+ static Method initGetterMethod(String propertyName,
+ final Class<?> beanClass) throws NoSuchMethodException {
propertyName = SharedUtil.capitalize(propertyName);
Method getMethod = null;
@@ -555,7 +557,7 @@ public class MethodProperty<T> extends AbstractProperty<T> {
* to safely cast the value returned from <code>getValue</code> to the given
* type and pass any variable assignable to this type as an argument to
* <code>setValue</code>.
- *
+ *
* @return type of the Property
*/
@Override
@@ -567,7 +569,7 @@ public class MethodProperty<T> extends AbstractProperty<T> {
* Tests if the object is in read-only mode. In read-only mode calls to
* <code>setValue</code> will throw <code>ReadOnlyException</code> and will
* not modify the value of the Property.
- *
+ *
* @return <code>true</code> if the object is in read-only mode,
* <code>false</code> if it's not
*/
@@ -579,7 +581,7 @@ public class MethodProperty<T> extends AbstractProperty<T> {
/**
* Gets the value stored in the Property. The value is resolved by calling
* the specified getter method with the argument specified at instantiation.
- *
+ *
* @return the value of the Property
*/
@Override
@@ -599,7 +601,7 @@ public class MethodProperty<T> extends AbstractProperty<T> {
* <p>
* Sets the setter method and getter method argument lists.
* </p>
- *
+ *
* @param getArgs
* the fixed argument list to be passed to the getter method.
* @param setArgs
@@ -626,14 +628,14 @@ public class MethodProperty<T> extends AbstractProperty<T> {
/**
* Sets the value of the property.
- *
+ *
* Note that since Vaadin 7, no conversions are performed and the value must
* be of the correct type.
- *
+ *
* @param newValue
* the New value of the property.
- * @throws <code>Property.ReadOnlyException</code> if the object is in
- * read-only mode.
+ * @throws <code>Property.ReadOnlyException</code>
+ * if the object is in read-only mode.
* @see #invokeSetMethod(Object)
*/
@Override
@@ -651,7 +653,7 @@ public class MethodProperty<T> extends AbstractProperty<T> {
/**
* Internal method to actually call the setter method of the wrapped
* property.
- *
+ *
* @param value
*/
protected void invokeSetMethod(T value) {
@@ -681,7 +683,7 @@ public class MethodProperty<T> extends AbstractProperty<T> {
* <code>Exception</code> object that signals that there were problems
* calling or finding the specified getter or setter methods of the
* property.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -702,7 +704,7 @@ public class MethodProperty<T> extends AbstractProperty<T> {
/**
* Constructs a new <code>MethodException</code> with the specified
* detail message.
- *
+ *
* @param property
* the property.
* @param msg
@@ -715,7 +717,7 @@ public class MethodProperty<T> extends AbstractProperty<T> {
/**
* Constructs a new <code>MethodException</code> from another exception.
- *
+ *
* @param property
* the property.
* @param cause
@@ -736,17 +738,17 @@ public class MethodProperty<T> extends AbstractProperty<T> {
/**
* Gets the method property this exception originates from.
- *
+ *
* @return MethodProperty or null if not a valid MethodProperty
*/
public MethodProperty getMethodProperty() {
- return (property instanceof MethodProperty) ? (MethodProperty) property
- : null;
+ return (property instanceof MethodProperty)
+ ? (MethodProperty) property : null;
}
/**
* Gets the method property this exception originates from.
- *
+ *
* @return Property from which the exception originates
*/
public Property getProperty() {
@@ -756,7 +758,7 @@ public class MethodProperty<T> extends AbstractProperty<T> {
/**
* Sends a value change event to all registered listeners.
- *
+ *
* Public for backwards compatibility, visibility may be reduced in future
* versions.
*/
diff --git a/server/src/main/java/com/vaadin/data/util/MethodPropertyDescriptor.java b/server/src/main/java/com/vaadin/data/util/MethodPropertyDescriptor.java
index f94ee75ac3..8c5c028a86 100644
--- a/server/src/main/java/com/vaadin/data/util/MethodPropertyDescriptor.java
+++ b/server/src/main/java/com/vaadin/data/util/MethodPropertyDescriptor.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,14 +27,14 @@ import com.vaadin.util.SerializerHelper;
/**
* Property descriptor that is able to create simple {@link MethodProperty}
* instances for a bean, using given accessors.
- *
+ *
* @param <BT>
* bean type
- *
+ *
* @since 6.6
*/
-public class MethodPropertyDescriptor<BT> implements
- VaadinPropertyDescriptor<BT> {
+public class MethodPropertyDescriptor<BT>
+ implements VaadinPropertyDescriptor<BT> {
private final String name;
private Class<?> propertyType;
@@ -44,7 +44,7 @@ public class MethodPropertyDescriptor<BT> implements
/**
* Creates a property descriptor that can create MethodProperty instances to
* access the underlying bean property.
- *
+ *
* @param name
* of the property
* @param propertyType
@@ -64,7 +64,8 @@ public class MethodPropertyDescriptor<BT> implements
}
/* Special serialization to handle method references */
- private void writeObject(java.io.ObjectOutputStream out) throws IOException {
+ private void writeObject(java.io.ObjectOutputStream out)
+ throws IOException {
out.defaultWriteObject();
SerializerHelper.writeClass(out, propertyType);
@@ -92,8 +93,8 @@ public class MethodPropertyDescriptor<BT> implements
}
/* Special serialization to handle method references */
- private void readObject(java.io.ObjectInputStream in) throws IOException,
- ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in)
+ throws IOException, ClassNotFoundException {
in.defaultReadObject();
try {
@SuppressWarnings("unchecked")
diff --git a/server/src/main/java/com/vaadin/data/util/NestedMethodProperty.java b/server/src/main/java/com/vaadin/data/util/NestedMethodProperty.java
index 29fe62f845..0b39efef5c 100644
--- a/server/src/main/java/com/vaadin/data/util/NestedMethodProperty.java
+++ b/server/src/main/java/com/vaadin/data/util/NestedMethodProperty.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,16 +30,16 @@ import com.vaadin.shared.util.SharedUtil;
/**
* Nested accessor based property for a bean.
- *
+ *
* The property is specified in the dotted notation, e.g. "address.street", and
* can contain multiple levels of nesting.
- *
+ *
* When accessing the property value, all intermediate getters must exist and
* should return non-null values when the property value is accessed. If an
* intermediate getter returns null, a null value will be returned.
- *
+ *
* @see MethodProperty
- *
+ *
* @since 6.6
*/
public class NestedMethodProperty<T> extends AbstractProperty<T> {
@@ -62,15 +62,16 @@ public class NestedMethodProperty<T> extends AbstractProperty<T> {
private Class<? extends T> type;
/* Special serialization to handle method references */
- private void writeObject(java.io.ObjectOutputStream out) throws IOException {
+ private void writeObject(java.io.ObjectOutputStream out)
+ throws IOException {
out.defaultWriteObject();
// getMethods and setMethod are reconstructed on read based on
// propertyName
}
/* Special serialization to handle method references */
- private void readObject(java.io.ObjectInputStream in) throws IOException,
- ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in)
+ throws IOException, ClassNotFoundException {
in.defaultReadObject();
initialize(instance.getClass(), propertyName);
@@ -82,7 +83,7 @@ public class NestedMethodProperty<T> extends AbstractProperty<T> {
* e.g. "manager.address.street".
* <p>
* Calling getValue will return null if any intermediate getter returns null
- *
+ *
* @param instance
* top-level bean to which the property applies
* @param propertyName
@@ -99,7 +100,7 @@ public class NestedMethodProperty<T> extends AbstractProperty<T> {
* For internal use to deduce property type etc. without a bean instance.
* Calling {@link #setValue(Object)} or {@link #getValue()} on properties
* constructed this way is not supported.
- *
+ *
* @param instanceClass
* class of the top-level bean
* @param propertyName
@@ -112,7 +113,7 @@ public class NestedMethodProperty<T> extends AbstractProperty<T> {
/**
* Initializes most of the internal fields based on the top-level bean
* instance and property name (dot-separated string).
- *
+ *
* @param beanClass
* class of the top-level bean to which the property applies
* @param propertyName
@@ -132,8 +133,8 @@ public class NestedMethodProperty<T> extends AbstractProperty<T> {
Class<?> propertyClass = beanClass;
String[] simplePropertyNames = propertyName.split("\\.");
if (propertyName.endsWith(".") || 0 == simplePropertyNames.length) {
- throw new IllegalArgumentException("Invalid property name '"
- + propertyName + "'");
+ throw new IllegalArgumentException(
+ "Invalid property name '" + propertyName + "'");
}
for (int i = 0; i < simplePropertyNames.length; i++) {
String simplePropertyName = simplePropertyNames[i].trim();
@@ -192,7 +193,7 @@ public class NestedMethodProperty<T> extends AbstractProperty<T> {
/**
* Gets the value stored in the Property. The value is resolved by calling
* the specified getter method with the argument specified at instantiation.
- *
+ *
* @return the value of the Property
*/
@Override
@@ -214,11 +215,11 @@ public class NestedMethodProperty<T> extends AbstractProperty<T> {
/**
* Sets the value of the property. The new value must be assignable to the
* type of this property.
- *
+ *
* @param newValue
* the New value of the property.
- * @throws <code>Property.ReadOnlyException</code> if the object is in
- * read-only mode.
+ * @throws <code>Property.ReadOnlyException</code>
+ * if the object is in read-only mode.
* @see #invokeSetMethod(Object)
*/
@Override
@@ -235,7 +236,7 @@ public class NestedMethodProperty<T> extends AbstractProperty<T> {
/**
* Internal method to actually call the setter method of the wrapped
* property.
- *
+ *
* @param value
*/
protected void invokeSetMethod(T value) {
@@ -255,9 +256,9 @@ public class NestedMethodProperty<T> extends AbstractProperty<T> {
/**
* Returns an unmodifiable list of getter methods to call in sequence to get
* the property value.
- *
+ *
* This API may change in future versions.
- *
+ *
* @return unmodifiable list of getter methods corresponding to each segment
* of the property name
*/
diff --git a/server/src/main/java/com/vaadin/data/util/NestedPropertyDescriptor.java b/server/src/main/java/com/vaadin/data/util/NestedPropertyDescriptor.java
index ca423b34ed..cbe38a922d 100644
--- a/server/src/main/java/com/vaadin/data/util/NestedPropertyDescriptor.java
+++ b/server/src/main/java/com/vaadin/data/util/NestedPropertyDescriptor.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,17 +20,17 @@ import com.vaadin.data.Property;
/**
* Property descriptor that is able to create nested property instances for a
* bean.
- *
+ *
* The property is specified in the dotted notation, e.g. "address.street", and
* can contain multiple levels of nesting.
- *
+ *
* @param <BT>
* bean type
- *
+ *
* @since 6.6
*/
-public class NestedPropertyDescriptor<BT> implements
- VaadinPropertyDescriptor<BT> {
+public class NestedPropertyDescriptor<BT>
+ implements VaadinPropertyDescriptor<BT> {
private final String name;
private final Class<?> propertyType;
@@ -38,7 +38,7 @@ public class NestedPropertyDescriptor<BT> implements
/**
* Creates a property descriptor that can create MethodProperty instances to
* access the underlying bean property.
- *
+ *
* @param name
* of the property in a dotted path format, e.g. "address.street"
* @param beanType
diff --git a/server/src/main/java/com/vaadin/data/util/ObjectProperty.java b/server/src/main/java/com/vaadin/data/util/ObjectProperty.java
index 8a2daa443c..2a87956a97 100644
--- a/server/src/main/java/com/vaadin/data/util/ObjectProperty.java
+++ b/server/src/main/java/com/vaadin/data/util/ObjectProperty.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ import com.vaadin.data.Property;
* A simple data object containing one typed value. This class is a
* straightforward implementation of the the {@link com.vaadin.data.Property}
* interface.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -43,7 +43,7 @@ public class ObjectProperty<T> extends AbstractProperty<T> {
* Creates a new instance of ObjectProperty with the given value. The type
* of the property is automatically initialized to be the type of the given
* value.
- *
+ *
* @param value
* the Initial value of the Property.
*/
@@ -55,10 +55,10 @@ public class ObjectProperty<T> extends AbstractProperty<T> {
/**
* Creates a new instance of ObjectProperty with the given value and type.
- *
+ *
* Since Vaadin 7, only values of the correct type are accepted, and no
* automatic conversions are performed.
- *
+ *
* @param value
* the Initial value of the Property.
* @param type
@@ -75,10 +75,10 @@ public class ObjectProperty<T> extends AbstractProperty<T> {
/**
* Creates a new instance of ObjectProperty with the given value, type and
* read-only mode status.
- *
+ *
* Since Vaadin 7, only the correct type of values is accepted, see
* {@link #ObjectProperty(Object, Class)}.
- *
+ *
* @param value
* the Initial value of the property.
* @param type
@@ -98,7 +98,7 @@ public class ObjectProperty<T> extends AbstractProperty<T> {
* able to safely cast the value returned from <code>getValue</code> to the
* given type and pass any variable assignable to this type as an argument
* to <code>setValue</code>.
- *
+ *
* @return type of the Property
*/
@Override
@@ -108,7 +108,7 @@ public class ObjectProperty<T> extends AbstractProperty<T> {
/**
* Gets the value stored in the Property.
- *
+ *
* @return the value stored in the Property
*/
@Override
@@ -118,14 +118,14 @@ public class ObjectProperty<T> extends AbstractProperty<T> {
/**
* Sets the value of the property.
- *
+ *
* Note that since Vaadin 7, no conversions are performed and the value must
* be of the correct type.
- *
+ *
* @param newValue
* the New value of the property.
- * @throws <code>Property.ReadOnlyException</code> if the object is in
- * read-only mode
+ * @throws <code>Property.ReadOnlyException</code>
+ * if the object is in read-only mode
*/
@Override
public void setValue(T newValue) throws Property.ReadOnlyException {
diff --git a/server/src/main/java/com/vaadin/data/util/PropertyFormatter.java b/server/src/main/java/com/vaadin/data/util/PropertyFormatter.java
index e188ce8bc3..6fa502300b 100644
--- a/server/src/main/java/com/vaadin/data/util/PropertyFormatter.java
+++ b/server/src/main/java/com/vaadin/data/util/PropertyFormatter.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,13 +20,13 @@ import com.vaadin.data.util.converter.Converter;
/**
* Formatting proxy for a {@link Property}.
- *
+ *
* <p>
* This class can be used to implement formatting for any type of Property
* datasources. The idea is to connect this as proxy between UI component and
* the original datasource.
* </p>
- *
+ *
* <p>
* For example <code>
* <pre>textfield.setPropertyDataSource(new PropertyFormatter(property) {
@@ -41,11 +41,11 @@ import com.vaadin.data.util.converter.Converter;
});</pre></code> adds formatter for Double-typed property that extends
* standard "1.0" notation with more zeroes.
* </p>
- *
+ *
* @param T
* type of the underlying property (a PropertyFormatter is always a
* Property&lt;String&gt;)
- *
+ *
* @deprecated As of 7.0, replaced by {@link Converter}
* @author Vaadin Ltd.
* @since 5.3.0
@@ -63,7 +63,7 @@ public abstract class PropertyFormatter<T> extends AbstractProperty<String>
* Construct a new {@code PropertyFormatter} that is not connected to any
* data source. Call {@link #setPropertyDataSource(Property)} later on to
* attach it to a property.
- *
+ *
*/
protected PropertyFormatter() {
}
@@ -72,7 +72,7 @@ public abstract class PropertyFormatter<T> extends AbstractProperty<String>
* Construct a new formatter that is connected to given data source. Calls
* {@link #format(Object)} which can be a problem if the formatter has not
* yet been initialized.
- *
+ *
* @param propertyDataSource
* to connect this property to.
*/
@@ -83,7 +83,7 @@ public abstract class PropertyFormatter<T> extends AbstractProperty<String>
/**
* Gets the current data source of the formatter, if any.
- *
+ *
* @return the current data source as a Property, or <code>null</code> if
* none defined.
*/
@@ -94,13 +94,13 @@ public abstract class PropertyFormatter<T> extends AbstractProperty<String>
/**
* Sets the specified Property as the data source for the formatter.
- *
- *
+ *
+ *
* <p>
* Remember that new data sources getValue() must return objects that are
* compatible with parse() and format() methods.
* </p>
- *
+ *
* @param newDataSource
* the new data source Property.
*/
@@ -153,7 +153,7 @@ public abstract class PropertyFormatter<T> extends AbstractProperty<String>
/**
* Get the formatted value.
- *
+ *
* @return If the datasource returns null, this is null. Otherwise this is
* String given by format().
*/
@@ -175,7 +175,7 @@ public abstract class PropertyFormatter<T> extends AbstractProperty<String>
/**
* This method must be implemented to format the values received from
* DataSource.
- *
+ *
* @param value
* Value object got from the datasource. This is guaranteed to be
* non-null and of the type compatible with getType() of the
@@ -186,9 +186,9 @@ public abstract class PropertyFormatter<T> extends AbstractProperty<String>
/**
* Parse string and convert it to format compatible with datasource.
- *
+ *
* The method is required to assure that parse(format(x)) equals x.
- *
+ *
* @param formattedValue
* This is guaranteed to be non-null string.
* @return Non-null value compatible with datasource.
@@ -200,7 +200,7 @@ public abstract class PropertyFormatter<T> extends AbstractProperty<String>
/**
* Sets the Property's read-only mode to the specified status.
- *
+ *
* @param newStatus
* the new read-only status of the Property.
*/
@@ -235,7 +235,7 @@ public abstract class PropertyFormatter<T> extends AbstractProperty<String>
/**
* Listens for changes in the datasource.
- *
+ *
* This should not be called directly.
*/
@Override
@@ -245,7 +245,7 @@ public abstract class PropertyFormatter<T> extends AbstractProperty<String>
/**
* Listens for changes in the datasource.
- *
+ *
* This should not be called directly.
*/
@Override
diff --git a/server/src/main/java/com/vaadin/data/util/PropertyValueGenerator.java b/server/src/main/java/com/vaadin/data/util/PropertyValueGenerator.java
index a09ab33d2d..e4b678d9a7 100644
--- a/server/src/main/java/com/vaadin/data/util/PropertyValueGenerator.java
+++ b/server/src/main/java/com/vaadin/data/util/PropertyValueGenerator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.data.util.filter.UnsupportedFilterException;
/**
* PropertyValueGenerator for GeneratedPropertyContainer.
- *
+ *
* @param <T>
* Property data type
* @since 7.4
@@ -36,7 +36,7 @@ public abstract class PropertyValueGenerator<T> implements Serializable {
/**
* Returns value for given Item. Used by GeneratedPropertyContainer when
* generating new properties.
- *
+ *
* @param item
* currently handled item
* @param itemId
@@ -50,7 +50,7 @@ public abstract class PropertyValueGenerator<T> implements Serializable {
/**
* Return Property type for this generator. This function is called when
* {@link Property#getType()} is called for generated property.
- *
+ *
* @return type of generated property
*/
public abstract Class<T> getType();
@@ -66,9 +66,9 @@ public abstract class PropertyValueGenerator<T> implements Serializable {
* means that the property will not be included in
* getSortableContainerPropertyIds(). Attempting to sort by that column
* throws UnsupportedOperationException.
- *
+ *
* Returning null is not allowed.
- *
+ *
* @param order
* a sort order for this property
* @return an array of sort orders describing how this property is sorted
@@ -86,7 +86,7 @@ public abstract class PropertyValueGenerator<T> implements Serializable {
* GeneratedPropertyContainer to discard the filter and not use it.
* <p>
* By default this function throws UnsupportedFilterException.
- *
+ *
* @param filter
* original filter for this property
* @return modified filter that is compatible with the underlying container
@@ -94,9 +94,10 @@ public abstract class PropertyValueGenerator<T> implements Serializable {
* if the implementation doesn't support modifying the provided
* filter
*/
- public Filter modifyFilter(Filter filter) throws UnsupportedFilterException {
- throw new UnsupportedFilterException("Filter" + filter
- + " is not supported");
+ public Filter modifyFilter(Filter filter)
+ throws UnsupportedFilterException {
+ throw new UnsupportedFilterException(
+ "Filter" + filter + " is not supported");
}
}
diff --git a/server/src/main/java/com/vaadin/data/util/PropertysetItem.java b/server/src/main/java/com/vaadin/data/util/PropertysetItem.java
index f463a52f54..92b6f5eccd 100644
--- a/server/src/main/java/com/vaadin/data/util/PropertysetItem.java
+++ b/server/src/main/java/com/vaadin/data/util/PropertysetItem.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,13 +31,13 @@ import com.vaadin.data.Property;
* a </code>MapItem</code> can be referenced using locally unique identifiers.
* The class supports listeners who are interested in changes to the Property
* set managed by the class.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@SuppressWarnings("serial")
-public class PropertysetItem implements Item, Item.PropertySetChangeNotifier,
- Cloneable {
+public class PropertysetItem
+ implements Item, Item.PropertySetChangeNotifier, Cloneable {
/* Private representation of the item */
@@ -62,7 +62,7 @@ public class PropertysetItem implements Item, Item.PropertySetChangeNotifier,
* Gets the Property corresponding to the given Property ID stored in the
* Item. If the Item does not contain the Property, <code>null</code> is
* returned.
- *
+ *
* @param id
* the identifier of the Property to get.
* @return the Property with the given ID or <code>null</code>
@@ -74,7 +74,7 @@ public class PropertysetItem implements Item, Item.PropertySetChangeNotifier,
/**
* Gets the collection of IDs of all Properties stored in the Item.
- *
+ *
* @return unmodifiable collection containing IDs of the Properties stored
* the Item
*/
@@ -89,7 +89,7 @@ public class PropertysetItem implements Item, Item.PropertySetChangeNotifier,
* Removes the Property identified by ID from the Item. This functionality
* is optional. If the method is not implemented, the method always returns
* <code>false</code>.
- *
+ *
* @param id
* the ID of the Property to be removed.
* @return <code>true</code> if the operation succeeded <code>false</code>
@@ -112,7 +112,7 @@ public class PropertysetItem implements Item, Item.PropertySetChangeNotifier,
/**
* Tries to add a new Property into the Item.
- *
+ *
* @param id
* the ID of the new Property.
* @param property
@@ -148,14 +148,15 @@ public class PropertysetItem implements Item, Item.PropertySetChangeNotifier,
* The format of the string is a space separated catenation of the
* <code>String</code> representations of the Properties contained by the
* Item.
- *
+ *
* @return <code>String</code> representation of the Item contents
*/
@Override
public String toString() {
String retValue = "";
- for (final Iterator<?> i = getItemPropertyIds().iterator(); i.hasNext();) {
+ for (final Iterator<?> i = getItemPropertyIds().iterator(); i
+ .hasNext();) {
final Object propertyId = i.next();
retValue += getItemProperty(propertyId).getValue();
if (i.hasNext()) {
@@ -171,12 +172,12 @@ public class PropertysetItem implements Item, Item.PropertySetChangeNotifier,
/**
* An <code>event</code> object specifying an Item whose Property set has
* changed.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
- private static class PropertySetChangeEvent extends EventObject implements
- Item.PropertySetChangeEvent {
+ private static class PropertySetChangeEvent extends EventObject
+ implements Item.PropertySetChangeEvent {
private PropertySetChangeEvent(Item source) {
super(source);
@@ -184,7 +185,7 @@ public class PropertysetItem implements Item, Item.PropertySetChangeNotifier,
/**
* Gets the Item whose Property set has changed.
- *
+ *
* @return source object of the event as an <code>Item</code>
*/
@Override
@@ -195,7 +196,7 @@ public class PropertysetItem implements Item, Item.PropertySetChangeNotifier,
/**
* Registers a new property set change listener for this Item.
- *
+ *
* @param listener
* the new Listener to be registered.
*/
@@ -220,7 +221,7 @@ public class PropertysetItem implements Item, Item.PropertySetChangeNotifier,
/**
* Removes a previously registered property set change listener.
- *
+ *
* @param listener
* the Listener to be removed.
*/
@@ -284,11 +285,11 @@ public class PropertysetItem implements Item, Item.PropertySetChangeNotifier,
* the fields are not themselves cloned. Thus, this method performs a
* "shallow copy" of this object, not a "deep copy" operation.
* </p>
- *
+ *
* @throws CloneNotSupportedException
* if the object's class does not support the Cloneable
* interface.
- *
+ *
* @see java.lang.Object#clone()
*/
@Override
@@ -297,8 +298,10 @@ public class PropertysetItem implements Item, Item.PropertySetChangeNotifier,
final PropertysetItem npsi = new PropertysetItem();
npsi.list = list != null ? (LinkedList<Object>) list.clone() : null;
- npsi.propertySetChangeListeners = propertySetChangeListeners != null ? (LinkedList<PropertySetChangeListener>) propertySetChangeListeners
- .clone() : null;
+ npsi.propertySetChangeListeners = propertySetChangeListeners != null
+ ? (LinkedList<PropertySetChangeListener>) propertySetChangeListeners
+ .clone()
+ : null;
npsi.map = (HashMap<Object, Property<?>>) map.clone();
return npsi;
@@ -306,7 +309,7 @@ public class PropertysetItem implements Item, Item.PropertySetChangeNotifier,
/*
* (non-Javadoc)
- *
+ *
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
@@ -335,10 +338,10 @@ public class PropertysetItem implements Item, Item.PropertySetChangeNotifier,
}
}
if (other.propertySetChangeListeners != propertySetChangeListeners) {
- boolean thisEmpty = (propertySetChangeListeners == null || propertySetChangeListeners
- .isEmpty());
- boolean otherEmpty = (other.propertySetChangeListeners == null || other.propertySetChangeListeners
- .isEmpty());
+ boolean thisEmpty = (propertySetChangeListeners == null
+ || propertySetChangeListeners.isEmpty());
+ boolean otherEmpty = (other.propertySetChangeListeners == null
+ || other.propertySetChangeListeners.isEmpty());
if (thisEmpty && otherEmpty) {
return true;
}
@@ -356,7 +359,7 @@ public class PropertysetItem implements Item, Item.PropertySetChangeNotifier,
/*
* (non-Javadoc)
- *
+ *
* @see java.lang.Object#hashCode()
*/
@Override
@@ -364,7 +367,8 @@ public class PropertysetItem implements Item, Item.PropertySetChangeNotifier,
return (list == null ? 0 : list.hashCode())
^ (map == null ? 0 : map.hashCode())
- ^ ((propertySetChangeListeners == null || propertySetChangeListeners
- .isEmpty()) ? 0 : propertySetChangeListeners.hashCode());
+ ^ ((propertySetChangeListeners == null
+ || propertySetChangeListeners.isEmpty()) ? 0
+ : propertySetChangeListeners.hashCode());
}
}
diff --git a/server/src/main/java/com/vaadin/data/util/TextFileProperty.java b/server/src/main/java/com/vaadin/data/util/TextFileProperty.java
index 22fd8168a1..1ce1262350 100644
--- a/server/src/main/java/com/vaadin/data/util/TextFileProperty.java
+++ b/server/src/main/java/com/vaadin/data/util/TextFileProperty.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,13 +29,13 @@ import java.nio.charset.Charset;
/**
* Property implementation for wrapping a text file.
- *
+ *
* Supports reading and writing of a File from/to String.
- *
+ *
* {@link ValueChangeListener}s are supported, but only fire when
* setValue(Object) is explicitly called. {@link ReadOnlyStatusChangeListener}s
* are supported but only fire when setReadOnly(boolean) is explicitly called.
- *
+ *
*/
@SuppressWarnings("serial")
public class TextFileProperty extends AbstractProperty<String> {
@@ -45,9 +45,9 @@ public class TextFileProperty extends AbstractProperty<String> {
/**
* Wrap given file with property interface.
- *
+ *
* Setting the file to null works, but getValue() will return null.
- *
+ *
* @param file
* File to be wrapped.
*/
@@ -58,9 +58,9 @@ public class TextFileProperty extends AbstractProperty<String> {
/**
* Wrap the given file with the property interface and specify character
* set.
- *
+ *
* Setting the file to null works, but getValue() will return null.
- *
+ *
* @param file
* File to be wrapped.
* @param charset
@@ -73,7 +73,7 @@ public class TextFileProperty extends AbstractProperty<String> {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Property#getType()
*/
@Override
@@ -83,7 +83,7 @@ public class TextFileProperty extends AbstractProperty<String> {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Property#getValue()
*/
@Override
@@ -115,7 +115,7 @@ public class TextFileProperty extends AbstractProperty<String> {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Property#isReadOnly()
*/
@Override
@@ -125,7 +125,7 @@ public class TextFileProperty extends AbstractProperty<String> {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Property#setValue(java.lang.Object)
*/
@Override
@@ -139,8 +139,9 @@ public class TextFileProperty extends AbstractProperty<String> {
try {
FileOutputStream fos = new FileOutputStream(file);
- OutputStreamWriter osw = charset == null ? new OutputStreamWriter(
- fos) : new OutputStreamWriter(fos, charset);
+ OutputStreamWriter osw = charset == null
+ ? new OutputStreamWriter(fos)
+ : new OutputStreamWriter(fos, charset);
BufferedWriter w = new BufferedWriter(osw);
w.append(newValue.toString());
w.flush();
diff --git a/server/src/main/java/com/vaadin/data/util/TransactionalPropertyWrapper.java b/server/src/main/java/com/vaadin/data/util/TransactionalPropertyWrapper.java
index c3cef6a0ec..dbfbee5e12 100644
--- a/server/src/main/java/com/vaadin/data/util/TransactionalPropertyWrapper.java
+++ b/server/src/main/java/com/vaadin/data/util/TransactionalPropertyWrapper.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,23 +22,23 @@ import com.vaadin.data.Property.ValueChangeNotifier;
/**
* Wrapper class that helps implement two-phase commit for a non-transactional
* property.
- *
+ *
* When accessing the property through the wrapper, getting and setting the
* property value take place immediately. However, the wrapper keeps track of
* the old value of the property so that it can be set for the property in case
* of a roll-back. This can result in the underlying property value changing
* multiple times (first based on modifications made by the application, then
* back upon roll-back).
- *
+ *
* Value change events on the {@link TransactionalPropertyWrapper} are only
* fired at the end of a successful transaction, whereas listeners attached to
* the underlying property may receive multiple value change events.
- *
+ *
* @see com.vaadin.data.Property.Transactional
- *
+ *
* @author Vaadin Ltd
* @since 7.0
- *
+ *
* @param <T>
*/
public class TransactionalPropertyWrapper<T> extends AbstractProperty<T>
@@ -67,7 +67,7 @@ public class TransactionalPropertyWrapper<T> extends AbstractProperty<T>
/**
* Removes the ValueChangeListener from wrapped Property that was added by
* TransactionalPropertyWrapper.
- *
+ *
* @since 7.1.15
*/
public void detachFromProperty() {
diff --git a/server/src/main/java/com/vaadin/data/util/VaadinPropertyDescriptor.java b/server/src/main/java/com/vaadin/data/util/VaadinPropertyDescriptor.java
index 51084d9115..e5f1a474eb 100644
--- a/server/src/main/java/com/vaadin/data/util/VaadinPropertyDescriptor.java
+++ b/server/src/main/java/com/vaadin/data/util/VaadinPropertyDescriptor.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,33 +21,33 @@ import com.vaadin.data.Property;
/**
* Property descriptor that can create a property instance for a bean.
- *
+ *
* Used by {@link BeanItem} and {@link AbstractBeanContainer} to keep track of
* the set of properties of items.
- *
+ *
* @param <BT>
* bean type
- *
+ *
* @since 6.6
*/
public interface VaadinPropertyDescriptor<BT> extends Serializable {
/**
* Returns the name of the property.
- *
+ *
* @return
*/
public String getName();
/**
* Returns the type of the property.
- *
+ *
* @return Class<?>
*/
public Class<?> getPropertyType();
/**
* Creates a new {@link Property} instance for this property for a bean.
- *
+ *
* @param bean
* @return
*/
diff --git a/server/src/main/java/com/vaadin/data/util/converter/AbstractStringToNumberConverter.java b/server/src/main/java/com/vaadin/data/util/converter/AbstractStringToNumberConverter.java
index 81f1a85f89..a2c726d7b7 100644
--- a/server/src/main/java/com/vaadin/data/util/converter/AbstractStringToNumberConverter.java
+++ b/server/src/main/java/com/vaadin/data/util/converter/AbstractStringToNumberConverter.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,17 +28,17 @@ import java.util.Locale;
* <p>
* Override and overwrite {@link #getFormat(Locale)} to use a different format.
* </p>
- *
+ *
* @author Vaadin Ltd
* @since 7.1
*/
-public abstract class AbstractStringToNumberConverter<T> implements
- Converter<String, T> {
+public abstract class AbstractStringToNumberConverter<T>
+ implements Converter<String, T> {
/**
* Returns the format used by {@link #convertToPresentation(Object, Locale)}
* and {@link #convertToModel(Object, Locale)}.
- *
+ *
* @param locale
* The locale to use
* @return A NumberFormat instance
@@ -55,7 +55,7 @@ public abstract class AbstractStringToNumberConverter<T> implements
/**
* Convert the value to a Number using the given locale and
* {@link #getFormat(Locale)}.
- *
+ *
* @param value
* The value to convert
* @param locale
@@ -94,7 +94,7 @@ public abstract class AbstractStringToNumberConverter<T> implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.data.util.converter.Converter#convertToPresentation(java.lang
* .Object, java.util.Locale)
@@ -112,7 +112,7 @@ public abstract class AbstractStringToNumberConverter<T> implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.util.converter.Converter#getPresentationType()
*/
@Override
diff --git a/server/src/main/java/com/vaadin/data/util/converter/Converter.java b/server/src/main/java/com/vaadin/data/util/converter/Converter.java
index a7188ebb33..26abb4f47d 100644
--- a/server/src/main/java/com/vaadin/data/util/converter/Converter.java
+++ b/server/src/main/java/com/vaadin/data/util/converter/Converter.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -37,7 +37,7 @@ import java.util.Locale;
* <p>
* If conversion of a value fails, a {@link ConversionException} is thrown.
* </p>
- *
+ *
* @param <PRESENTATION>
* The presentation type. Must be compatible with what
* {@link #getPresentationType()} returns.
@@ -58,7 +58,7 @@ public interface Converter<PRESENTATION, MODEL> extends Serializable {
* {@link #convertToPresentation(Object, Class, Locale)} and
* {@link #convertToModel(Object, Class, Locale)} should return the original
* value.
- *
+ *
* @param value
* The value to convert, compatible with the target type. Can be
* null
@@ -83,7 +83,7 @@ public interface Converter<PRESENTATION, MODEL> extends Serializable {
* {@link #convertToPresentation(Object, Class, Locale)} and
* {@link #convertToModel(Object, Class, Locale)} should return the original
* value.
- *
+ *
* @param value
* The value to convert, compatible with the target type. Can be
* null
@@ -101,20 +101,20 @@ public interface Converter<PRESENTATION, MODEL> extends Serializable {
/**
* The source type of the converter.
- *
+ *
* Values of this type can be passed to
* {@link #convertToPresentation(Object, Class, Locale)}.
- *
+ *
* @return The source type
*/
public Class<MODEL> getModelType();
/**
* The target type of the converter.
- *
+ *
* Values of this type can be passed to
* {@link #convertToModel(Object, Class, Locale)}.
- *
+ *
* @return The target type
*/
public Class<PRESENTATION> getPresentationType();
@@ -124,7 +124,7 @@ public interface Converter<PRESENTATION, MODEL> extends Serializable {
* {@link Converter#convertToPresentation(Object, Class, Locale)} or
* {@link Converter#convertToModel(Object, Class, Locale)} could not be
* converted.
- *
+ *
* @author Vaadin Ltd
* @since 7.0
*/
@@ -140,7 +140,7 @@ public interface Converter<PRESENTATION, MODEL> extends Serializable {
/**
* Constructs a new <code>ConversionException</code> with the specified
* detail message.
- *
+ *
* @param msg
* the detail message
*/
@@ -151,7 +151,7 @@ public interface Converter<PRESENTATION, MODEL> extends Serializable {
/**
* Constructs a new {@code ConversionException} with the specified
* cause.
- *
+ *
* @param cause
* The cause of the the exception
*/
@@ -162,7 +162,7 @@ public interface Converter<PRESENTATION, MODEL> extends Serializable {
/**
* Constructs a new <code>ConversionException</code> with the specified
* detail message and cause.
- *
+ *
* @param message
* the detail message
* @param cause
diff --git a/server/src/main/java/com/vaadin/data/util/converter/ConverterFactory.java b/server/src/main/java/com/vaadin/data/util/converter/ConverterFactory.java
index 0280be4a73..637ee303cb 100644
--- a/server/src/main/java/com/vaadin/data/util/converter/ConverterFactory.java
+++ b/server/src/main/java/com/vaadin/data/util/converter/ConverterFactory.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,10 +21,10 @@ import java.io.Serializable;
/**
* Factory interface for providing Converters based on a presentation type and a
* model type.
- *
+ *
* @author Vaadin Ltd.
* @since 7.0
- *
+ *
*/
public interface ConverterFactory extends Serializable {
public <PRESENTATION, MODEL> Converter<PRESENTATION, MODEL> createConverter(
diff --git a/server/src/main/java/com/vaadin/data/util/converter/ConverterUtil.java b/server/src/main/java/com/vaadin/data/util/converter/ConverterUtil.java
index 91e11a6222..f7a1e6d5d3 100644
--- a/server/src/main/java/com/vaadin/data/util/converter/ConverterUtil.java
+++ b/server/src/main/java/com/vaadin/data/util/converter/ConverterUtil.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,7 +27,7 @@ public class ConverterUtil implements Serializable {
* the given model type and back. Uses the given application to find a
* {@link ConverterFactory} or, if application is null, uses the
* {@link VaadinSession#getCurrent()}.
- *
+ *
* @param <PRESENTATIONTYPE>
* the presentation type
* @param <MODELTYPE>
@@ -60,7 +60,7 @@ public class ConverterUtil implements Serializable {
/**
* Convert the given value from the data source type to the UI type.
- *
+ *
* @param modelValue
* the model value to convert
* @param presentationType
@@ -73,7 +73,7 @@ public class ConverterUtil implements Serializable {
* the presentation type
* @param <MODELTYPE>
* the model type
- *
+ *
* @return the converted value, compatible with the presentation type, or
* the original value if its type is compatible and no converter is
* set.
@@ -116,8 +116,7 @@ public class ConverterUtil implements Serializable {
throw new Converter.ConversionException(
"Unable to convert value of type "
+ modelValue.getClass().getName()
- + " to presentation type "
- + presentationType
+ + " to presentation type " + presentationType
+ ". No converter is set and the types are not compatible.");
}
}
@@ -125,7 +124,7 @@ public class ConverterUtil implements Serializable {
/**
* Convert the given value from the presentation (UI) type to model (data
* source) type.
- *
+ *
* @param presentationValue
* the presentation value to convert
* @param modelType
@@ -138,7 +137,7 @@ public class ConverterUtil implements Serializable {
* the presentation type
* @param <MODELTYPE>
* the model type
- *
+ *
* @return the converted value, compatible with the model type, or the
* original value if its type is compatible and no converter is set.
* @throws Converter.ConversionException
@@ -181,8 +180,7 @@ public class ConverterUtil implements Serializable {
throw new Converter.ConversionException(
"Unable to convert value of type "
+ presentationValue.getClass().getName()
- + " to model type "
- + modelType
+ + " to model type " + modelType
+ ". No converter is set and the types are not compatible.");
}
@@ -192,9 +190,9 @@ public class ConverterUtil implements Serializable {
* Checks if the given converter can handle conversion between the given
* presentation and model type. Does strict type checking and only returns
* true if the converter claims it can handle exactly the given types.
- *
+ *
* @see #canConverterPossiblyHandle(Converter, Class, Class)
- *
+ *
* @param converter
* The converter to check. If this is null the result is always
* false.
@@ -224,7 +222,7 @@ public class ConverterUtil implements Serializable {
/**
* Checks if it possible that the given converter can handle conversion
* between the given presentation and model type somehow.
- *
+ *
* @param converter
* The converter to check. If this is null the result is always
* false.
diff --git a/server/src/main/java/com/vaadin/data/util/converter/DateToLongConverter.java b/server/src/main/java/com/vaadin/data/util/converter/DateToLongConverter.java
index fffe80352e..6282554a62 100644
--- a/server/src/main/java/com/vaadin/data/util/converter/DateToLongConverter.java
+++ b/server/src/main/java/com/vaadin/data/util/converter/DateToLongConverter.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ import java.util.Locale;
/**
* A converter that converts from {@link Long} to {@link Date} and back.
- *
+ *
* @author Vaadin Ltd
* @since 7.0
*/
@@ -29,7 +29,7 @@ public class DateToLongConverter implements Converter<Date, Long> {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.data.util.converter.Converter#convertToModel(java.lang.Object,
* java.lang.Class, java.util.Locale)
@@ -46,7 +46,7 @@ public class DateToLongConverter implements Converter<Date, Long> {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.data.util.converter.Converter#convertToPresentation(java.lang
* .Object, java.lang.Class, java.util.Locale)
@@ -55,9 +55,9 @@ public class DateToLongConverter implements Converter<Date, Long> {
public Date convertToPresentation(Long value,
Class<? extends Date> targetType, Locale locale) {
if (targetType != getPresentationType()) {
- throw new ConversionException("Converter only supports "
- + getPresentationType().getName() + " (targetType was "
- + targetType.getName() + ")");
+ throw new ConversionException(
+ "Converter only supports " + getPresentationType().getName()
+ + " (targetType was " + targetType.getName() + ")");
}
if (value == null) {
return null;
@@ -68,7 +68,7 @@ public class DateToLongConverter implements Converter<Date, Long> {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.util.converter.Converter#getModelType()
*/
@Override
@@ -78,7 +78,7 @@ public class DateToLongConverter implements Converter<Date, Long> {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.util.converter.Converter#getPresentationType()
*/
@Override
diff --git a/server/src/main/java/com/vaadin/data/util/converter/DateToSqlDateConverter.java b/server/src/main/java/com/vaadin/data/util/converter/DateToSqlDateConverter.java
index 6a7e8327a1..de40ac5216 100644
--- a/server/src/main/java/com/vaadin/data/util/converter/DateToSqlDateConverter.java
+++ b/server/src/main/java/com/vaadin/data/util/converter/DateToSqlDateConverter.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -15,7 +15,7 @@
*/
/**
- *
+ *
*/
package com.vaadin.data.util.converter;
@@ -28,7 +28,7 @@ import java.util.Locale;
* is connected to a java.sql.Date property, typically through a JPAContainer or
* SQLContainer. Note that information (time information) is lost when
* converting from {@link java.util.Date} to {@link java.sql.Date}.
- *
+ *
* @since 7.1
* @author Vaadin Ltd
*/
@@ -39,9 +39,9 @@ public class DateToSqlDateConverter implements Converter<Date, java.sql.Date> {
Class<? extends java.sql.Date> targetType, Locale locale)
throws ConversionException {
if (targetType != getModelType()) {
- throw new ConversionException("Converter only supports "
- + getModelType().getName() + " (targetType was "
- + targetType.getName() + ")");
+ throw new ConversionException(
+ "Converter only supports " + getModelType().getName()
+ + " (targetType was " + targetType.getName() + ")");
}
if (value == null) {
@@ -56,9 +56,9 @@ public class DateToSqlDateConverter implements Converter<Date, java.sql.Date> {
Class<? extends Date> targetType, Locale locale)
throws ConversionException {
if (targetType != getPresentationType()) {
- throw new ConversionException("Converter only supports "
- + getPresentationType().getName() + " (targetType was "
- + targetType.getName() + ")");
+ throw new ConversionException(
+ "Converter only supports " + getPresentationType().getName()
+ + " (targetType was " + targetType.getName() + ")");
}
if (value == null) {
diff --git a/server/src/main/java/com/vaadin/data/util/converter/DefaultConverterFactory.java b/server/src/main/java/com/vaadin/data/util/converter/DefaultConverterFactory.java
index 3a1f1a4252..e2f75a67d2 100644
--- a/server/src/main/java/com/vaadin/data/util/converter/DefaultConverterFactory.java
+++ b/server/src/main/java/com/vaadin/data/util/converter/DefaultConverterFactory.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,12 +25,13 @@ import com.vaadin.server.VaadinSession;
/**
* Default implementation of {@link ConverterFactory}. Provides converters for
- * standard types like {@link String}, {@link Double} and {@link Date}. </p>
+ * standard types like {@link String}, {@link Double} and {@link Date}.
+ * </p>
* <p>
* Custom converters can be provided by extending this class and using
* {@link VaadinSession#setConverterFactory(ConverterFactory)}.
* </p>
- *
+ *
* @author Vaadin Ltd
* @since 7.0
*/
@@ -70,13 +71,15 @@ public class DefaultConverterFactory implements ConverterFactory {
Class<PRESENTATION> presentationType, Class<MODEL> modelType) {
if (presentationType == String.class) {
// TextField converters and more
- Converter<PRESENTATION, MODEL> converter = (Converter<PRESENTATION, MODEL>) createStringConverter(modelType);
+ Converter<PRESENTATION, MODEL> converter = (Converter<PRESENTATION, MODEL>) createStringConverter(
+ modelType);
if (converter != null) {
return converter;
}
} else if (presentationType == Date.class) {
// DateField converters and more
- Converter<PRESENTATION, MODEL> converter = (Converter<PRESENTATION, MODEL>) createDateConverter(modelType);
+ Converter<PRESENTATION, MODEL> converter = (Converter<PRESENTATION, MODEL>) createDateConverter(
+ modelType);
if (converter != null) {
return converter;
}
diff --git a/server/src/main/java/com/vaadin/data/util/converter/ReverseConverter.java b/server/src/main/java/com/vaadin/data/util/converter/ReverseConverter.java
index 2495dc631a..0e8741e242 100644
--- a/server/src/main/java/com/vaadin/data/util/converter/ReverseConverter.java
+++ b/server/src/main/java/com/vaadin/data/util/converter/ReverseConverter.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,24 +21,24 @@ import java.util.Locale;
/**
* A converter that wraps another {@link Converter} and reverses source and
* target types.
- *
+ *
* @param <MODEL>
* The source type
* @param <PRESENTATION>
* The target type
- *
+ *
* @author Vaadin Ltd
* @since 7.0
*/
-public class ReverseConverter<PRESENTATION, MODEL> implements
- Converter<PRESENTATION, MODEL> {
+public class ReverseConverter<PRESENTATION, MODEL>
+ implements Converter<PRESENTATION, MODEL> {
private Converter<MODEL, PRESENTATION> realConverter;
/**
* Creates a converter from source to target based on a converter that
* converts from target to source.
- *
+ *
* @param converter
* The converter to use in a reverse fashion
*/
@@ -48,7 +48,7 @@ public class ReverseConverter<PRESENTATION, MODEL> implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.util.converter.Converter#convertToModel(java
* .lang.Object, java.util.Locale)
*/
@@ -61,7 +61,7 @@ public class ReverseConverter<PRESENTATION, MODEL> implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.data.util.converter.Converter#convertToPresentation(java.lang
* .Object, java.util.Locale)
@@ -75,7 +75,7 @@ public class ReverseConverter<PRESENTATION, MODEL> implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.util.converter.Converter#getSourceType()
*/
@Override
@@ -85,7 +85,7 @@ public class ReverseConverter<PRESENTATION, MODEL> implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.util.converter.Converter#getTargetType()
*/
@Override
diff --git a/server/src/main/java/com/vaadin/data/util/converter/StringToBigDecimalConverter.java b/server/src/main/java/com/vaadin/data/util/converter/StringToBigDecimalConverter.java
index 549f156f61..a5dd5c9ae0 100644
--- a/server/src/main/java/com/vaadin/data/util/converter/StringToBigDecimalConverter.java
+++ b/server/src/main/java/com/vaadin/data/util/converter/StringToBigDecimalConverter.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,12 +30,12 @@ import java.util.Locale;
* <p>
* Override and overwrite {@link #getFormat(Locale)} to use a different format.
* </p>
- *
+ *
* @author Vaadin Ltd
* @since 7.2
*/
-public class StringToBigDecimalConverter extends
- AbstractStringToNumberConverter<BigDecimal> {
+public class StringToBigDecimalConverter
+ extends AbstractStringToNumberConverter<BigDecimal> {
@Override
protected NumberFormat getFormat(Locale locale) {
NumberFormat numberFormat = super.getFormat(locale);
diff --git a/server/src/main/java/com/vaadin/data/util/converter/StringToBigIntegerConverter.java b/server/src/main/java/com/vaadin/data/util/converter/StringToBigIntegerConverter.java
index adaa8c6111..1b5f88a4d6 100644
--- a/server/src/main/java/com/vaadin/data/util/converter/StringToBigIntegerConverter.java
+++ b/server/src/main/java/com/vaadin/data/util/converter/StringToBigIntegerConverter.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,12 +31,12 @@ import java.util.Locale;
* <p>
* Override and overwrite {@link #getFormat(Locale)} to use a different format.
* </p>
- *
+ *
* @author Vaadin Ltd
* @since 7.4
*/
-public class StringToBigIntegerConverter extends
- AbstractStringToNumberConverter<BigInteger> {
+public class StringToBigIntegerConverter
+ extends AbstractStringToNumberConverter<BigInteger> {
@Override
protected NumberFormat getFormat(Locale locale) {
diff --git a/server/src/main/java/com/vaadin/data/util/converter/StringToBooleanConverter.java b/server/src/main/java/com/vaadin/data/util/converter/StringToBooleanConverter.java
index f965cfcc6a..4061591c0f 100644
--- a/server/src/main/java/com/vaadin/data/util/converter/StringToBooleanConverter.java
+++ b/server/src/main/java/com/vaadin/data/util/converter/StringToBooleanConverter.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,10 +19,16 @@ package com.vaadin.data.util.converter;
import java.util.Locale;
/**
- * A converter that converts from {@link String} to {@link Boolean} and back. The String representation is given by
- * {@link Boolean#toString()} or provided in constructor {@link #StringToBooleanConverter(String, String)}.
- * <p> Leading and trailing white spaces are ignored when converting from a String. </p>
- * <p> For language-dependent representation, subclasses should overwrite {@link #getFalseString(Locale)} and {@link #getTrueString(Locale)}</p>
+ * A converter that converts from {@link String} to {@link Boolean} and back.
+ * The String representation is given by {@link Boolean#toString()} or provided
+ * in constructor {@link #StringToBooleanConverter(String, String)}.
+ * <p>
+ * Leading and trailing white spaces are ignored when converting from a String.
+ * </p>
+ * <p>
+ * For language-dependent representation, subclasses should overwrite
+ * {@link #getFalseString(Locale)} and {@link #getTrueString(Locale)}
+ * </p>
*
* @author Vaadin Ltd
* @since 7.0
@@ -34,7 +40,8 @@ public class StringToBooleanConverter implements Converter<String, Boolean> {
private final String falseString;
/**
- * Creates converter with default string representations - "true" and "false"
+ * Creates converter with default string representations - "true" and
+ * "false"
*
*/
public StringToBooleanConverter() {
@@ -45,8 +52,10 @@ public class StringToBooleanConverter implements Converter<String, Boolean> {
* Creates converter with custom string representation.
*
* @since 7.5.4
- * @param falseString string representation for <code>false</code>
- * @param trueString string representation for <code>true</code>
+ * @param falseString
+ * string representation for <code>false</code>
+ * @param trueString
+ * string representation for <code>true</code>
*/
public StringToBooleanConverter(String trueString, String falseString) {
this.trueString = trueString;
@@ -82,7 +91,8 @@ public class StringToBooleanConverter implements Converter<String, Boolean> {
}
/**
- * Gets the string representation for true. Default is "true", if not set in constructor.
+ * Gets the string representation for true. Default is "true", if not set in
+ * constructor.
*
* @return the string representation for true
*/
@@ -91,7 +101,8 @@ public class StringToBooleanConverter implements Converter<String, Boolean> {
}
/**
- * Gets the string representation for false. Default is "false", if not set in constructor.
+ * Gets the string representation for false. Default is "false", if not set
+ * in constructor.
*
* @return the string representation for false
*/
@@ -121,11 +132,12 @@ public class StringToBooleanConverter implements Converter<String, Boolean> {
}
/**
- * Gets the locale-depended string representation for false.
- * Default is locale-independent value provided by {@link #getFalseString()}
+ * Gets the locale-depended string representation for false. Default is
+ * locale-independent value provided by {@link #getFalseString()}
*
* @since 7.5.4
- * @param locale to be used
+ * @param locale
+ * to be used
* @return the string representation for false
*/
protected String getFalseString(Locale locale) {
@@ -133,11 +145,12 @@ public class StringToBooleanConverter implements Converter<String, Boolean> {
}
/**
- * Gets the locale-depended string representation for true.
- * Default is locale-independent value provided by {@link #getTrueString()}
+ * Gets the locale-depended string representation for true. Default is
+ * locale-independent value provided by {@link #getTrueString()}
*
* @since 7.5.4
- * @param locale to be used
+ * @param locale
+ * to be used
* @return the string representation for true
*/
protected String getTrueString(Locale locale) {
diff --git a/server/src/main/java/com/vaadin/data/util/converter/StringToByteConverter.java b/server/src/main/java/com/vaadin/data/util/converter/StringToByteConverter.java
index 719fced0ed..1e8767daf0 100644
--- a/server/src/main/java/com/vaadin/data/util/converter/StringToByteConverter.java
+++ b/server/src/main/java/com/vaadin/data/util/converter/StringToByteConverter.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,18 +26,18 @@ import java.util.Locale;
* <p>
* Override and overwrite {@link #getFormat(Locale)} to use a different format.
* </p>
- *
+ *
* @author Vaadin Ltd
* @since 7.4
*/
-public class StringToByteConverter extends
- AbstractStringToNumberConverter<Byte> {
+public class StringToByteConverter
+ extends AbstractStringToNumberConverter<Byte> {
/**
* Returns the format used by
* {@link #convertToPresentation(Byte, Class, Locale)} and
* {@link #convertToModel(String, Class, Locale)}
- *
+ *
* @param locale
* The locale to use
* @return A NumberFormat instance
@@ -52,7 +52,7 @@ public class StringToByteConverter extends
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.data.util.converter.Converter#convertToModel(java.lang.Object,
* java.lang.Class, java.util.Locale)
@@ -78,7 +78,7 @@ public class StringToByteConverter extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.util.converter.Converter#getModelType()
*/
@Override
diff --git a/server/src/main/java/com/vaadin/data/util/converter/StringToCollectionConverter.java b/server/src/main/java/com/vaadin/data/util/converter/StringToCollectionConverter.java
index 6930b6da06..89699a2f2c 100644
--- a/server/src/main/java/com/vaadin/data/util/converter/StringToCollectionConverter.java
+++ b/server/src/main/java/com/vaadin/data/util/converter/StringToCollectionConverter.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -33,13 +33,13 @@ import java.util.Locale;
* Default constructor uses <code>", "</code> as delimiter string and
* {@link String} for token types. Other constructors allow to configure
* delimiter and token types.
- *
+ *
* @since 7.5.0
- *
+ *
* @author Vaadin Ltd
*/
-public class StringToCollectionConverter implements
- Converter<String, Collection> {
+public class StringToCollectionConverter
+ implements Converter<String, Collection> {
private final String delimiter;
private final Converter<String, ?> tokenConverter;
@@ -57,7 +57,7 @@ public class StringToCollectionConverter implements
/**
* Creates converter with given {@code delimiter} and {@link String} as
* token model type in collection.
- *
+ *
* @param delimiter
* custom delimiter
*/
@@ -71,7 +71,7 @@ public class StringToCollectionConverter implements
* <p>
* If {@code tokenConverter} is null then no conversation is done and
* {@link String} is used as token type in resulting model collection.
- *
+ *
* @param tokenConverter
* converter for token
* @param tokenType
@@ -88,7 +88,7 @@ public class StringToCollectionConverter implements
* <p>
* If {@code tokenConverter} is null then no conversation is done and
* {@link String} is used as token type in resulting model collection.
- *
+ *
* @param tokenConverter
* converter for token
* @param tokenType
@@ -108,7 +108,7 @@ public class StringToCollectionConverter implements
* <p>
* If {@code tokenConverter} is null then no conversation is done and
* {@link String} is used as token type in resulting model collection.
- *
+ *
* @param tokenConverter
* converter for token
* @param tokenType
@@ -199,13 +199,14 @@ public class StringToCollectionConverter implements
/**
* Default collection factory implementation.
- *
+ *
* @author Vaadin Ltd
*/
public static class DefaultCollectionFactory implements CollectionFactory {
@Override
- public Collection<?> createCollection(Class<? extends Collection> type) {
+ public Collection<?> createCollection(
+ Class<? extends Collection> type) {
if (type.isAssignableFrom(ArrayList.class)) {
return new ArrayList();
} else if (type.isAssignableFrom(HashSet.class)) {
@@ -226,14 +227,14 @@ public class StringToCollectionConverter implements
/**
* Collection factory. Defines a strategy to create collection by collection
* class.
- *
+ *
* @author Vaadin Ltd
*/
public interface CollectionFactory extends Serializable {
/**
* Create collection by its {@code type}.
- *
+ *
* @param type
* collection type
* @return instantiated collection with given {@code type}
diff --git a/server/src/main/java/com/vaadin/data/util/converter/StringToDateConverter.java b/server/src/main/java/com/vaadin/data/util/converter/StringToDateConverter.java
index 8f0db24caf..6060a17a16 100644
--- a/server/src/main/java/com/vaadin/data/util/converter/StringToDateConverter.java
+++ b/server/src/main/java/com/vaadin/data/util/converter/StringToDateConverter.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,7 +30,7 @@ import java.util.Locale;
* <p>
* Override and overwrite {@link #getFormat(Locale)} to use a different format.
* </p>
- *
+ *
* @author Vaadin Ltd
* @since 7.0
*/
@@ -40,7 +40,7 @@ public class StringToDateConverter implements Converter<String, Date> {
* Returns the format used by
* {@link #convertToPresentation(Date, Class,Locale)} and
* {@link #convertToModel(String, Class, Locale)}.
- *
+ *
* @param locale
* The locale to use
* @return A DateFormat instance
@@ -58,7 +58,7 @@ public class StringToDateConverter implements Converter<String, Date> {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.data.util.converter.Converter#convertToModel(java.lang.Object,
* java.lang.Class, java.util.Locale)
@@ -68,9 +68,9 @@ public class StringToDateConverter implements Converter<String, Date> {
Locale locale)
throws com.vaadin.data.util.converter.Converter.ConversionException {
if (targetType != getModelType()) {
- throw new ConversionException("Converter only supports "
- + getModelType().getName() + " (targetType was "
- + targetType.getName() + ")");
+ throw new ConversionException(
+ "Converter only supports " + getModelType().getName()
+ + " (targetType was " + targetType.getName() + ")");
}
if (value == null) {
@@ -92,7 +92,7 @@ public class StringToDateConverter implements Converter<String, Date> {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.data.util.converter.Converter#convertToPresentation(java.lang
* .Object, java.lang.Class, java.util.Locale)
@@ -110,7 +110,7 @@ public class StringToDateConverter implements Converter<String, Date> {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.util.converter.Converter#getModelType()
*/
@Override
@@ -120,7 +120,7 @@ public class StringToDateConverter implements Converter<String, Date> {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.util.converter.Converter#getPresentationType()
*/
@Override
diff --git a/server/src/main/java/com/vaadin/data/util/converter/StringToDoubleConverter.java b/server/src/main/java/com/vaadin/data/util/converter/StringToDoubleConverter.java
index f514eac648..990b74a3ca 100644
--- a/server/src/main/java/com/vaadin/data/util/converter/StringToDoubleConverter.java
+++ b/server/src/main/java/com/vaadin/data/util/converter/StringToDoubleConverter.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,16 +29,16 @@ import java.util.Locale;
* <p>
* Override and overwrite {@link #getFormat(Locale)} to use a different format.
* </p>
- *
+ *
* @author Vaadin Ltd
* @since 7.0
*/
-public class StringToDoubleConverter extends
- AbstractStringToNumberConverter<Double> {
+public class StringToDoubleConverter
+ extends AbstractStringToNumberConverter<Double> {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.data.util.converter.Converter#convertToModel(java.lang.Object,
* java.util.Locale)
@@ -53,7 +53,7 @@ public class StringToDoubleConverter extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.util.converter.Converter#getModelType()
*/
@Override
diff --git a/server/src/main/java/com/vaadin/data/util/converter/StringToEnumConverter.java b/server/src/main/java/com/vaadin/data/util/converter/StringToEnumConverter.java
index 7b2f43f972..c4d61a9c54 100644
--- a/server/src/main/java/com/vaadin/data/util/converter/StringToEnumConverter.java
+++ b/server/src/main/java/com/vaadin/data/util/converter/StringToEnumConverter.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,7 +32,7 @@ import java.util.Locale;
* </ul>
* Will not necessarily work correctly for other cases.
* </p>
- *
+ *
* @author Vaadin Ltd
* @since 7.4
*/
@@ -52,7 +52,7 @@ public class StringToEnumConverter implements Converter<String, Enum> {
* Converts the given string to the given enum type using the given locale
* <p>
* Compatible with {@link #enumToString(Enum, Locale)}
- *
+ *
* @param value
* The string value to convert
* @param enumType
@@ -71,8 +71,8 @@ public class StringToEnumConverter implements Converter<String, Enum> {
}
if (!enumType.isEnum()) {
- throw new ConversionException(enumType.getName()
- + " is not an enum type");
+ throw new ConversionException(
+ enumType.getName() + " is not an enum type");
}
// First test for the human-readable value since that's the more likely
@@ -107,7 +107,7 @@ public class StringToEnumConverter implements Converter<String, Enum> {
* Converts the given enum to a human readable string using the given locale
* <p>
* Compatible with {@link #stringToEnum(String, Class, Locale)}
- *
+ *
* @param value
* The enum value to convert
* @param locale
@@ -128,8 +128,8 @@ public class StringToEnumConverter implements Converter<String, Enum> {
// FOO_BAR -> Foo bar
// _FOO -> _foo
String result = enumString.substring(0, 1).toUpperCase(locale);
- result += enumString.substring(1).toLowerCase(locale)
- .replace('_', ' ');
+ result += enumString.substring(1).toLowerCase(locale).replace('_',
+ ' ');
return result;
} else {
return enumString;
diff --git a/server/src/main/java/com/vaadin/data/util/converter/StringToFloatConverter.java b/server/src/main/java/com/vaadin/data/util/converter/StringToFloatConverter.java
index f4d7f97853..d49decf1f1 100644
--- a/server/src/main/java/com/vaadin/data/util/converter/StringToFloatConverter.java
+++ b/server/src/main/java/com/vaadin/data/util/converter/StringToFloatConverter.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,31 +29,30 @@ import java.util.Locale;
* <p>
* Override and overwrite {@link #getFormat(Locale)} to use a different format.
* </p>
- *
+ *
* @author Vaadin Ltd
* @since 7.0
*/
-public class StringToFloatConverter extends
- AbstractStringToNumberConverter<Float> {
+public class StringToFloatConverter
+ extends AbstractStringToNumberConverter<Float> {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.data.util.converter.Converter#convertToModel(java.lang.Object,
* java.util.Locale)
*/
@Override
- public Float convertToModel(String value,
- Class<? extends Float> targetType, Locale locale)
- throws ConversionException {
+ public Float convertToModel(String value, Class<? extends Float> targetType,
+ Locale locale) throws ConversionException {
Number n = convertToNumber(value, targetType, locale);
return n == null ? null : n.floatValue();
}
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.util.converter.Converter#getModelType()
*/
@Override
diff --git a/server/src/main/java/com/vaadin/data/util/converter/StringToIntegerConverter.java b/server/src/main/java/com/vaadin/data/util/converter/StringToIntegerConverter.java
index 59a46babe1..1936cc9c9b 100644
--- a/server/src/main/java/com/vaadin/data/util/converter/StringToIntegerConverter.java
+++ b/server/src/main/java/com/vaadin/data/util/converter/StringToIntegerConverter.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,18 +26,18 @@ import java.util.Locale;
* <p>
* Override and overwrite {@link #getFormat(Locale)} to use a different format.
* </p>
- *
+ *
* @author Vaadin Ltd
* @since 7.0
*/
-public class StringToIntegerConverter extends
- AbstractStringToNumberConverter<Integer> {
+public class StringToIntegerConverter
+ extends AbstractStringToNumberConverter<Integer> {
/**
* Returns the format used by
* {@link #convertToPresentation(Integer, Class, Locale)} and
* {@link #convertToModel(String, Class, Locale)}
- *
+ *
* @param locale
* The locale to use
* @return A NumberFormat instance
@@ -52,7 +52,7 @@ public class StringToIntegerConverter extends
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.data.util.converter.Converter#convertToModel(java.lang.Object,
* java.lang.Class, java.util.Locale)
@@ -83,7 +83,7 @@ public class StringToIntegerConverter extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.util.converter.Converter#getModelType()
*/
@Override
diff --git a/server/src/main/java/com/vaadin/data/util/converter/StringToLongConverter.java b/server/src/main/java/com/vaadin/data/util/converter/StringToLongConverter.java
index cd7cf49042..91cfd65835 100644
--- a/server/src/main/java/com/vaadin/data/util/converter/StringToLongConverter.java
+++ b/server/src/main/java/com/vaadin/data/util/converter/StringToLongConverter.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,18 +26,18 @@ import java.util.Locale;
* <p>
* Override and overwrite {@link #getFormat(Locale)} to use a different format.
* </p>
- *
+ *
* @author Vaadin Ltd
* @since 7.2
*/
-public class StringToLongConverter extends
- AbstractStringToNumberConverter<Long> {
+public class StringToLongConverter
+ extends AbstractStringToNumberConverter<Long> {
/**
* Returns the format used by
* {@link #convertToPresentation(Long, Class, Locale)} and
* {@link #convertToModel(String, Class, Locale)}
- *
+ *
* @param locale
* The locale to use
* @return A NumberFormat instance
@@ -52,7 +52,7 @@ public class StringToLongConverter extends
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.data.util.converter.Converter#convertToModel(java.lang.Object,
* java.lang.Class, java.util.Locale)
@@ -67,7 +67,7 @@ public class StringToLongConverter extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.util.converter.Converter#getModelType()
*/
@Override
diff --git a/server/src/main/java/com/vaadin/data/util/converter/StringToShortConverter.java b/server/src/main/java/com/vaadin/data/util/converter/StringToShortConverter.java
index 554b958ee0..5637326e4d 100644
--- a/server/src/main/java/com/vaadin/data/util/converter/StringToShortConverter.java
+++ b/server/src/main/java/com/vaadin/data/util/converter/StringToShortConverter.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,18 +26,18 @@ import java.util.Locale;
* <p>
* Override and overwrite {@link #getFormat(Locale)} to use a different format.
* </p>
- *
+ *
* @author Vaadin Ltd
* @since 7.4
*/
-public class StringToShortConverter extends
- AbstractStringToNumberConverter<Short> {
+public class StringToShortConverter
+ extends AbstractStringToNumberConverter<Short> {
/**
* Returns the format used by
* {@link #convertToPresentation(Short, Class, Locale)} and
* {@link #convertToModel(String, Class, Locale)}
- *
+ *
* @param locale
* The locale to use
* @return A NumberFormat instance
@@ -52,15 +52,14 @@ public class StringToShortConverter extends
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.data.util.converter.Converter#convertToModel(java.lang.Object,
* java.lang.Class, java.util.Locale)
*/
@Override
- public Short convertToModel(String value,
- Class<? extends Short> targetType, Locale locale)
- throws ConversionException {
+ public Short convertToModel(String value, Class<? extends Short> targetType,
+ Locale locale) throws ConversionException {
Number n = convertToNumber(value, targetType, locale);
if (n == null) {
@@ -79,7 +78,7 @@ public class StringToShortConverter extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.util.converter.Converter#getModelType()
*/
@Override
diff --git a/server/src/main/java/com/vaadin/data/util/filter/AbstractJunctionFilter.java b/server/src/main/java/com/vaadin/data/util/filter/AbstractJunctionFilter.java
index 28e6cda34e..9c43a3853d 100644
--- a/server/src/main/java/com/vaadin/data/util/filter/AbstractJunctionFilter.java
+++ b/server/src/main/java/com/vaadin/data/util/filter/AbstractJunctionFilter.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,10 +23,10 @@ import com.vaadin.data.Container.Filter;
/**
* Abstract base class for filters that are composed of multiple sub-filters.
- *
+ *
* The method {@link #appliesToProperty(Object)} is provided to help
* implementing {@link Filter} for in-memory filters.
- *
+ *
* @since 6.6
*/
public abstract class AbstractJunctionFilter implements Filter {
@@ -34,14 +34,14 @@ public abstract class AbstractJunctionFilter implements Filter {
protected final Collection<Filter> filters;
public AbstractJunctionFilter(Filter... filters) {
- this.filters = Collections.unmodifiableCollection(Arrays
- .asList(filters));
+ this.filters = Collections
+ .unmodifiableCollection(Arrays.asList(filters));
}
/**
* Returns an unmodifiable collection of the sub-filters of this composite
* filter.
- *
+ *
* @return
*/
public Collection<Filter> getFilters() {
@@ -52,7 +52,7 @@ public abstract class AbstractJunctionFilter implements Filter {
* Returns true if a change in the named property may affect the filtering
* result. If some of the sub-filters are not in-memory filters, true is
* returned.
- *
+ *
* By default, all sub-filters are iterated to check if any of them applies.
* If there are no sub-filters, false is returned - override in subclasses
* to change this behavior.
diff --git a/server/src/main/java/com/vaadin/data/util/filter/And.java b/server/src/main/java/com/vaadin/data/util/filter/And.java
index 938aedae95..86202db393 100644
--- a/server/src/main/java/com/vaadin/data/util/filter/And.java
+++ b/server/src/main/java/com/vaadin/data/util/filter/And.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,20 +21,20 @@ import com.vaadin.data.Item;
/**
* A compound {@link Filter} that accepts an item if all of its filters accept
* the item.
- *
+ *
* If no filters are given, the filter should accept all items.
- *
+ *
* This filter also directly supports in-memory filtering when all sub-filters
* do so.
- *
+ *
* @see Or
- *
+ *
* @since 6.6
*/
public final class And extends AbstractJunctionFilter {
/**
- *
+ *
* @param filters
* filters of which the And filter will be composed
*/
diff --git a/server/src/main/java/com/vaadin/data/util/filter/Between.java b/server/src/main/java/com/vaadin/data/util/filter/Between.java
index c50488c521..2874026cb7 100644
--- a/server/src/main/java/com/vaadin/data/util/filter/Between.java
+++ b/server/src/main/java/com/vaadin/data/util/filter/Between.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/main/java/com/vaadin/data/util/filter/Compare.java b/server/src/main/java/com/vaadin/data/util/filter/Compare.java
index 60523f2d42..baab7fb2b8 100644
--- a/server/src/main/java/com/vaadin/data/util/filter/Compare.java
+++ b/server/src/main/java/com/vaadin/data/util/filter/Compare.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,13 +24,13 @@ import com.vaadin.data.Property;
* constant value. Use the nested classes {@link Equal}, {@link Greater},
* {@link Less}, {@link GreaterOrEqual} and {@link LessOrEqual} instead of this
* class directly.
- *
+ *
* This filter also directly supports in-memory filtering.
- *
+ *
* The reference and actual values must implement {@link Comparable} and the
* class of the actual property value must be assignable from the class of the
* reference value.
- *
+ *
* @since 6.6
*/
public abstract class Compare implements Filter {
@@ -46,23 +46,23 @@ public abstract class Compare implements Filter {
/**
* A {@link Compare} filter that accepts items for which the identified
* property value is equal to <code>value</code>.
- *
+ *
* For in-memory filters, {@link Comparable#compareTo(Object)} or, if not
* Comparable, {@link #equals(Object)} is used for the comparison. For other
* containers, the comparison implementation is container dependent and may
* use e.g. database comparison operations.
- *
+ *
* @since 6.6
*/
public static final class Equal extends Compare {
/**
* Construct a filter that accepts items for which the identified
* property value is equal to <code>value</code>.
- *
+ *
* For in-memory filters, equals() is used for the comparison. For other
* containers, the comparison implementation is container dependent and
* may use e.g. database comparison operations.
- *
+ *
* @param propertyId
* the identifier of the property whose value to compare
* against value, not null
@@ -78,24 +78,24 @@ public abstract class Compare implements Filter {
/**
* A {@link Compare} filter that accepts items for which the identified
* property value is greater than <code>value</code>.
- *
+ *
* For in-memory filters, the values must implement {@link Comparable} and
* {@link Comparable#compareTo(Object)} is used for the comparison. For
* other containers, the comparison implementation is container dependent
* and may use e.g. database comparison operations.
- *
+ *
* @since 6.6
*/
public static final class Greater extends Compare {
/**
* Construct a filter that accepts items for which the identified
* property value is greater than <code>value</code>.
- *
+ *
* For in-memory filters, the values must implement {@link Comparable}
* and {@link Comparable#compareTo(Object)} is used for the comparison.
* For other containers, the comparison implementation is container
* dependent and may use e.g. database comparison operations.
- *
+ *
* @param propertyId
* the identifier of the property whose value to compare
* against value, not null
@@ -111,24 +111,24 @@ public abstract class Compare implements Filter {
/**
* A {@link Compare} filter that accepts items for which the identified
* property value is less than <code>value</code>.
- *
+ *
* For in-memory filters, the values must implement {@link Comparable} and
* {@link Comparable#compareTo(Object)} is used for the comparison. For
* other containers, the comparison implementation is container dependent
* and may use e.g. database comparison operations.
- *
+ *
* @since 6.6
*/
public static final class Less extends Compare {
/**
* Construct a filter that accepts items for which the identified
* property value is less than <code>value</code>.
- *
+ *
* For in-memory filters, the values must implement {@link Comparable}
* and {@link Comparable#compareTo(Object)} is used for the comparison.
* For other containers, the comparison implementation is container
* dependent and may use e.g. database comparison operations.
- *
+ *
* @param propertyId
* the identifier of the property whose value to compare
* against value, not null
@@ -144,24 +144,24 @@ public abstract class Compare implements Filter {
/**
* A {@link Compare} filter that accepts items for which the identified
* property value is greater than or equal to <code>value</code>.
- *
+ *
* For in-memory filters, the values must implement {@link Comparable} and
* {@link Comparable#compareTo(Object)} is used for the comparison. For
* other containers, the comparison implementation is container dependent
* and may use e.g. database comparison operations.
- *
+ *
* @since 6.6
*/
public static final class GreaterOrEqual extends Compare {
/**
* Construct a filter that accepts items for which the identified
* property value is greater than or equal to <code>value</code>.
- *
+ *
* For in-memory filters, the values must implement {@link Comparable}
* and {@link Comparable#compareTo(Object)} is used for the comparison.
* For other containers, the comparison implementation is container
* dependent and may use e.g. database comparison operations.
- *
+ *
* @param propertyId
* the identifier of the property whose value to compare
* against value, not null
@@ -177,24 +177,24 @@ public abstract class Compare implements Filter {
/**
* A {@link Compare} filter that accepts items for which the identified
* property value is less than or equal to <code>value</code>.
- *
+ *
* For in-memory filters, the values must implement {@link Comparable} and
* {@link Comparable#compareTo(Object)} is used for the comparison. For
* other containers, the comparison implementation is container dependent
* and may use e.g. database comparison operations.
- *
+ *
* @since 6.6
*/
public static final class LessOrEqual extends Compare {
/**
* Construct a filter that accepts items for which the identified
* property value is less than or equal to <code>value</code>.
- *
+ *
* For in-memory filters, the values must implement {@link Comparable}
* and {@link Comparable#compareTo(Object)} is used for the comparison.
* For other containers, the comparison implementation is container
* dependent and may use e.g. database comparison operations.
- *
+ *
* @param propertyId
* the identifier of the property whose value to compare
* against value, not null
@@ -210,21 +210,21 @@ public abstract class Compare implements Filter {
/**
* Constructor for a {@link Compare} filter that compares the value of an
* item property with the given constant <code>value</code>.
- *
+ *
* This constructor is intended to be used by the nested static classes only
* ({@link Equal}, {@link Greater}, {@link Less}, {@link GreaterOrEqual},
* {@link LessOrEqual}).
- *
+ *
* For in-memory filtering, comparisons except EQUAL require that the values
* implement {@link Comparable} and {@link Comparable#compareTo(Object)} is
* used for the comparison. The equality comparison is performed using
* {@link Object#equals(Object)}.
- *
+ *
* For other containers, the comparison implementation is container
* dependent and may use e.g. database comparison operations. Therefore, the
* behavior of comparisons might differ in some cases between in-memory and
* other containers.
- *
+ *
* @param propertyId
* the identifier of the property whose value to compare against
* value, not null
@@ -267,7 +267,7 @@ public abstract class Compare implements Filter {
* Checks if the this value equals the given value. Favors Comparable over
* equals to better support e.g. BigDecimal where equals is stricter than
* compareTo.
- *
+ *
* @param otherValue
* The value to compare to
* @return true if the values are equal, false otherwise
@@ -277,9 +277,8 @@ public abstract class Compare implements Filter {
return (otherValue == value);
} else if (value == otherValue) {
return true;
- } else if (value instanceof Comparable
- && otherValue.getClass()
- .isAssignableFrom(getValue().getClass())) {
+ } else if (value instanceof Comparable && otherValue.getClass()
+ .isAssignableFrom(getValue().getClass())) {
return ((Comparable) value).compareTo(otherValue) == 0;
} else {
return value.equals(otherValue);
@@ -331,8 +330,8 @@ public abstract class Compare implements Filter {
if (getOperation() != o.getOperation()) {
return false;
}
- return (null == getValue()) ? null == o.getValue() : getValue().equals(
- o.getValue());
+ return (null == getValue()) ? null == o.getValue()
+ : getValue().equals(o.getValue());
}
@Override
@@ -344,7 +343,7 @@ public abstract class Compare implements Filter {
/**
* Returns the property id of the property to compare against the fixed
* value.
- *
+ *
* @return property id (not null)
*/
public Object getPropertyId() {
@@ -353,7 +352,7 @@ public abstract class Compare implements Filter {
/**
* Returns the comparison operation.
- *
+ *
* @return {@link Operation}
*/
public Operation getOperation() {
@@ -362,7 +361,7 @@ public abstract class Compare implements Filter {
/**
* Returns the value to compare the property against.
- *
+ *
* @return comparison reference value
*/
public Object getValue() {
diff --git a/server/src/main/java/com/vaadin/data/util/filter/IsNull.java b/server/src/main/java/com/vaadin/data/util/filter/IsNull.java
index 9bcfe40c03..39e15536c1 100644
--- a/server/src/main/java/com/vaadin/data/util/filter/IsNull.java
+++ b/server/src/main/java/com/vaadin/data/util/filter/IsNull.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,9 +21,9 @@ import com.vaadin.data.Property;
/**
* Simple container filter checking whether an item property value is null.
- *
+ *
* This filter also directly supports in-memory filtering.
- *
+ *
* @since 6.6
*/
public final class IsNull implements Filter {
@@ -33,11 +33,11 @@ public final class IsNull implements Filter {
/**
* Constructor for a filter that compares the value of an item property with
* null.
- *
+ *
* For in-memory filtering, a simple == check is performed. For other
* containers, the comparison implementation is container dependent but
* should correspond to the in-memory null check.
- *
+ *
* @param propertyId
* the identifier (not null) of the property whose value to check
*/
@@ -73,8 +73,9 @@ public final class IsNull implements Filter {
final IsNull o = (IsNull) obj;
// Checks the properties one by one
- return (null != getPropertyId()) ? getPropertyId().equals(
- o.getPropertyId()) : null == o.getPropertyId();
+ return (null != getPropertyId())
+ ? getPropertyId().equals(o.getPropertyId())
+ : null == o.getPropertyId();
}
@Override
@@ -85,7 +86,7 @@ public final class IsNull implements Filter {
/**
* Returns the property id of the property tested by the filter, not null
* for valid filters.
- *
+ *
* @return property id (not null)
*/
public Object getPropertyId() {
diff --git a/server/src/main/java/com/vaadin/data/util/filter/Like.java b/server/src/main/java/com/vaadin/data/util/filter/Like.java
index 9b7b2af292..81bdf74e04 100644
--- a/server/src/main/java/com/vaadin/data/util/filter/Like.java
+++ b/server/src/main/java/com/vaadin/data/util/filter/Like.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -95,10 +95,11 @@ public class Like implements Filter {
final Like o = (Like) obj;
// Checks the properties one by one
- boolean propertyIdEqual = (null != getPropertyId()) ? getPropertyId()
- .equals(o.getPropertyId()) : null == o.getPropertyId();
- boolean valueEqual = (null != getValue()) ? getValue().equals(
- o.getValue()) : null == o.getValue();
+ boolean propertyIdEqual = (null != getPropertyId())
+ ? getPropertyId().equals(o.getPropertyId())
+ : null == o.getPropertyId();
+ boolean valueEqual = (null != getValue())
+ ? getValue().equals(o.getValue()) : null == o.getValue();
return propertyIdEqual && valueEqual;
}
}
diff --git a/server/src/main/java/com/vaadin/data/util/filter/Not.java b/server/src/main/java/com/vaadin/data/util/filter/Not.java
index a677e7f752..eba7a6c417 100644
--- a/server/src/main/java/com/vaadin/data/util/filter/Not.java
+++ b/server/src/main/java/com/vaadin/data/util/filter/Not.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,10 +20,10 @@ import com.vaadin.data.Item;
/**
* Negating filter that accepts the items rejected by another filter.
- *
+ *
* This filter directly supports in-memory filtering when the negated filter
* does so.
- *
+ *
* @since 6.6
*/
public final class Not implements Filter {
@@ -31,7 +31,7 @@ public final class Not implements Filter {
/**
* Constructs a filter that negates a filter.
- *
+ *
* @param filter
* {@link Filter} to negate, not-null
*/
@@ -41,7 +41,7 @@ public final class Not implements Filter {
/**
* Returns the negated filter.
- *
+ *
* @return Filter
*/
public Filter getFilter() {
@@ -58,7 +58,7 @@ public final class Not implements Filter {
* Returns true if a change in the named property may affect the filtering
* result. Return value is the same as {@link #appliesToProperty(Object)}
* for the negated filter.
- *
+ *
* @return boolean
*/
@Override
diff --git a/server/src/main/java/com/vaadin/data/util/filter/Or.java b/server/src/main/java/com/vaadin/data/util/filter/Or.java
index 69d20513a2..df5b89e991 100644
--- a/server/src/main/java/com/vaadin/data/util/filter/Or.java
+++ b/server/src/main/java/com/vaadin/data/util/filter/Or.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,20 +21,20 @@ import com.vaadin.data.Item;
/**
* A compound {@link Filter} that accepts an item if any of its filters accept
* the item.
- *
+ *
* If no filters are given, the filter should reject all items.
- *
+ *
* This filter also directly supports in-memory filtering when all sub-filters
* do so.
- *
+ *
* @see And
- *
+ *
* @since 6.6
*/
public final class Or extends AbstractJunctionFilter {
/**
- *
+ *
* @param filters
* filters of which the Or filter will be composed
*/
@@ -57,7 +57,7 @@ public final class Or extends AbstractJunctionFilter {
* Returns true if a change in the named property may affect the filtering
* result. If some of the sub-filters are not in-memory filters, true is
* returned.
- *
+ *
* By default, all sub-filters are iterated to check if any of them applies.
* If there are no sub-filters, true is returned as an empty Or rejects all
* items.
diff --git a/server/src/main/java/com/vaadin/data/util/filter/SimpleStringFilter.java b/server/src/main/java/com/vaadin/data/util/filter/SimpleStringFilter.java
index ea5e93277e..d7be64f9a6 100644
--- a/server/src/main/java/com/vaadin/data/util/filter/SimpleStringFilter.java
+++ b/server/src/main/java/com/vaadin/data/util/filter/SimpleStringFilter.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,17 +22,17 @@ import com.vaadin.data.Property;
/**
* Simple string filter for matching items that start with or contain a
* specified string. The matching can be case-sensitive or case-insensitive.
- *
+ *
* This filter also directly supports in-memory filtering. When performing
* in-memory filtering, values of other types are converted using toString(),
* but other (lazy container) implementations do not need to perform such
* conversions and might not support values of different types.
- *
+ *
* Note that this filter is modeled after the pre-6.6 filtering mechanisms, and
* might not be very efficient e.g. for database filtering.
- *
+ *
* TODO this might still change
- *
+ *
* @since 6.6
*/
public final class SimpleStringFilter implements Filter {
@@ -61,8 +61,8 @@ public final class SimpleStringFilter implements Filter {
if (propertyValue == null) {
return false;
}
- final String value = ignoreCase ? propertyValue.toString()
- .toLowerCase() : propertyValue.toString();
+ final String value = ignoreCase ? propertyValue.toString().toLowerCase()
+ : propertyValue.toString();
if (onlyMatchPrefix) {
if (!value.startsWith(filterString)) {
return false;
@@ -119,7 +119,7 @@ public final class SimpleStringFilter implements Filter {
/**
* Returns the property identifier to which this filter applies.
- *
+ *
* @return property id
*/
public Object getPropertyId() {
@@ -128,10 +128,10 @@ public final class SimpleStringFilter implements Filter {
/**
* Returns the filter string.
- *
+ *
* Note: this method is intended only for implementations of lazy string
* filters and may change in the future.
- *
+ *
* @return filter string given to the constructor
*/
public String getFilterString() {
@@ -140,10 +140,10 @@ public final class SimpleStringFilter implements Filter {
/**
* Returns whether the filter is case-insensitive or case-sensitive.
- *
+ *
* Note: this method is intended only for implementations of lazy string
* filters and may change in the future.
- *
+ *
* @return true if performing case-insensitive filtering, false for
* case-sensitive
*/
@@ -154,10 +154,10 @@ public final class SimpleStringFilter implements Filter {
/**
* Returns true if the filter only applies to the beginning of the value
* string, false for any location in the value.
- *
+ *
* Note: this method is intended only for implementations of lazy string
* filters and may change in the future.
- *
+ *
* @return true if checking for matches at the beginning of the value only,
* false if matching any part of value
*/
diff --git a/server/src/main/java/com/vaadin/data/util/filter/UnsupportedFilterException.java b/server/src/main/java/com/vaadin/data/util/filter/UnsupportedFilterException.java
index 42a7784da8..1257977136 100644
--- a/server/src/main/java/com/vaadin/data/util/filter/UnsupportedFilterException.java
+++ b/server/src/main/java/com/vaadin/data/util/filter/UnsupportedFilterException.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,16 +20,16 @@ import java.io.Serializable;
/**
* Exception for cases where a container does not support a specific type of
* filters.
- *
+ *
* If possible, this should be thrown already when adding a filter to a
* container. If a problem is not detected at that point, an
* {@link UnsupportedOperationException} can be throws when attempting to
* perform filtering.
- *
+ *
* @since 6.6
*/
-public class UnsupportedFilterException extends RuntimeException implements
- Serializable {
+public class UnsupportedFilterException extends RuntimeException
+ implements Serializable {
public UnsupportedFilterException() {
}
diff --git a/server/src/main/java/com/vaadin/data/util/sqlcontainer/CacheFlushNotifier.java b/server/src/main/java/com/vaadin/data/util/sqlcontainer/CacheFlushNotifier.java
index 12d806a8d5..f0a41ed288 100644
--- a/server/src/main/java/com/vaadin/data/util/sqlcontainer/CacheFlushNotifier.java
+++ b/server/src/main/java/com/vaadin/data/util/sqlcontainer/CacheFlushNotifier.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -39,7 +39,7 @@ class CacheFlushNotifier implements Serializable {
/**
* Adds the given SQLContainer to the cache flush notification receiver list
- *
+ *
* @param c
* Container to add
*/
@@ -65,7 +65,7 @@ class CacheFlushNotifier implements Serializable {
/**
* Iterates through the instances and notifies containers which are
* connected to the same table or are using the same query string.
- *
+ *
* @param c
* SQLContainer that issued the cache flush notification
*/
@@ -87,10 +87,9 @@ class CacheFlushNotifier implements Serializable {
/* Compare QueryDelegate types and tableName/queryString */
QueryDelegate wrQd = wrc.getQueryDelegate();
QueryDelegate qd = c.getQueryDelegate();
- if (wrQd instanceof TableQuery
- && qd instanceof TableQuery
- && ((TableQuery) wrQd).getTableName().equals(
- ((TableQuery) qd).getTableName())) {
+ if (wrQd instanceof TableQuery && qd instanceof TableQuery
+ && ((TableQuery) wrQd).getTableName()
+ .equals(((TableQuery) qd).getTableName())) {
wrc.refresh();
} else if (wrQd instanceof FreeformQuery
&& qd instanceof FreeformQuery
diff --git a/server/src/main/java/com/vaadin/data/util/sqlcontainer/CacheMap.java b/server/src/main/java/com/vaadin/data/util/sqlcontainer/CacheMap.java
index cdeff873d0..846abf68b0 100644
--- a/server/src/main/java/com/vaadin/data/util/sqlcontainer/CacheMap.java
+++ b/server/src/main/java/com/vaadin/data/util/sqlcontainer/CacheMap.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/main/java/com/vaadin/data/util/sqlcontainer/ColumnProperty.java b/server/src/main/java/com/vaadin/data/util/sqlcontainer/ColumnProperty.java
index e89b8c02a8..9ee94647bc 100644
--- a/server/src/main/java/com/vaadin/data/util/sqlcontainer/ColumnProperty.java
+++ b/server/src/main/java/com/vaadin/data/util/sqlcontainer/ColumnProperty.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import com.vaadin.data.util.converter.Converter.ConversionException;
* ColumnProperty represents the value of one column in a RowItem. In addition
* to the value, ColumnProperty also contains some basic column attributes such
* as nullability status, read-only status and data type.
- *
+ *
* Note that depending on the QueryDelegate in use this does not necessarily map
* into an actual column in a database table.
*/
@@ -63,14 +63,14 @@ final public class ColumnProperty implements Property {
* Deprecated constructor for ColumnProperty. If this is used the primary
* keys are not identified correctly in some cases for some databases (i.e.
* Oracle). See http://dev.vaadin.com/ticket/9145.
- *
+ *
* @param propertyId
* @param readOnly
* @param allowReadOnlyChange
* @param nullable
* @param value
* @param type
- *
+ *
* @deprecated As of 7.0. Use
* {@link #ColumnProperty(String, boolean, boolean, boolean, boolean, Object, Class)
* instead
@@ -85,7 +85,7 @@ final public class ColumnProperty implements Property {
/**
* Creates a new ColumnProperty instance.
- *
+ *
* @param propertyId
* The ID of this property.
* @param readOnly
@@ -124,7 +124,7 @@ final public class ColumnProperty implements Property {
/**
* Returns the current value for this property. To get the previous value
* (if one exists) for a modified property use {@link #getOldValue()}.
- *
+ *
* @return
*/
@Override
@@ -138,7 +138,7 @@ final public class ColumnProperty implements Property {
/**
* Returns the original non-modified value of this property if it has been
* modified.
- *
+ *
* @return The original value if <code>isModified()</code> is true,
* <code>getValue()</code> otherwise.
*/
@@ -147,8 +147,8 @@ final public class ColumnProperty implements Property {
}
@Override
- public void setValue(Object newValue) throws ReadOnlyException,
- ConversionException {
+ public void setValue(Object newValue)
+ throws ReadOnlyException, ConversionException {
if (newValue == null && !nullable) {
throw new NotNullableException(
"Null values are not allowed for this property.");
@@ -232,7 +232,7 @@ final public class ColumnProperty implements Property {
* to be written by the underlying database. Also used for values like
* VERSION and AUTO_INCREMENT fields that might be set to read-only by the
* container but the database still allows writes.
- *
+ *
* @return true if the read-only status can be changed, false otherwise.
*/
public boolean isReadOnlyChangeAllowed() {
@@ -266,9 +266,9 @@ final public class ColumnProperty implements Property {
* If legacy Property toString mode is disabled, the string representation
* has no special meaning
* </p>
- *
+ *
* @see LegacyPropertyHelper#isLegacyToStringEnabled()
- *
+ *
* @return A string representation of the value value stored in the Property
* or a string representation of the Property object.
* @deprecated As of 7.0. To get the property value, use {@link #getValue()}
@@ -318,7 +318,7 @@ final public class ColumnProperty implements Property {
/**
* Return whether the value of this property should be persisted to the
* database.
- *
+ *
* @return true if the value should be written to the database, false
* otherwise.
*/
@@ -334,7 +334,7 @@ final public class ColumnProperty implements Property {
/**
* Returns whether or not this property is used as a row identifier.
- *
+ *
* @return true if the property is a row identifier, false otherwise.
*/
public boolean isRowIdentifier() {
@@ -359,7 +359,7 @@ final public class ColumnProperty implements Property {
/**
* Constructs a new <code>NotNullableException</code> with the specified
* detail message.
- *
+ *
* @param msg
* the detail message
*/
@@ -370,7 +370,7 @@ final public class ColumnProperty implements Property {
/**
* Constructs a new <code>NotNullableException</code> from another
* exception.
- *
+ *
* @param cause
* The cause of the failure
*/
diff --git a/server/src/main/java/com/vaadin/data/util/sqlcontainer/OptimisticLockException.java b/server/src/main/java/com/vaadin/data/util/sqlcontainer/OptimisticLockException.java
index ed8eb3c0ff..3c918a2e7b 100644
--- a/server/src/main/java/com/vaadin/data/util/sqlcontainer/OptimisticLockException.java
+++ b/server/src/main/java/com/vaadin/data/util/sqlcontainer/OptimisticLockException.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,14 +20,14 @@ import com.vaadin.data.util.sqlcontainer.query.TableQuery;
/**
* An OptimisticLockException is thrown when trying to update or delete a row
* that has been changed since last read from the database.
- *
+ *
* OptimisticLockException is a runtime exception because optimistic locking is
* turned off by default, and as such will never be thrown in a default
* configuration. In order to turn on optimistic locking, you need to specify
* the version column in your TableQuery instance.
- *
+ *
* @see TableQuery#setVersionColumn(String)
- *
+ *
* @author Jonatan Kronqvist / Vaadin Ltd
*/
public class OptimisticLockException extends RuntimeException {
diff --git a/server/src/main/java/com/vaadin/data/util/sqlcontainer/ReadOnlyRowId.java b/server/src/main/java/com/vaadin/data/util/sqlcontainer/ReadOnlyRowId.java
index c845cadc7a..4f3ec470de 100644
--- a/server/src/main/java/com/vaadin/data/util/sqlcontainer/ReadOnlyRowId.java
+++ b/server/src/main/java/com/vaadin/data/util/sqlcontainer/ReadOnlyRowId.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/main/java/com/vaadin/data/util/sqlcontainer/Reference.java b/server/src/main/java/com/vaadin/data/util/sqlcontainer/Reference.java
index e82f63ad2f..933f70fbe7 100644
--- a/server/src/main/java/com/vaadin/data/util/sqlcontainer/Reference.java
+++ b/server/src/main/java/com/vaadin/data/util/sqlcontainer/Reference.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/main/java/com/vaadin/data/util/sqlcontainer/RowId.java b/server/src/main/java/com/vaadin/data/util/sqlcontainer/RowId.java
index 79c16b0f60..571bb48711 100644
--- a/server/src/main/java/com/vaadin/data/util/sqlcontainer/RowId.java
+++ b/server/src/main/java/com/vaadin/data/util/sqlcontainer/RowId.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import java.util.Arrays;
/**
* RowId represents identifiers of a single database result set row.
- *
+ *
* The data structure of a RowId is an Object array which contains the values of
* the primary key columns of the identified row. This allows easy equals()
* -comparison of RowItems.
@@ -37,7 +37,8 @@ public class RowId implements Serializable {
public RowId(Object... id) {
if (id == null) {
- throw new IllegalArgumentException("id parameter must not be null!");
+ throw new IllegalArgumentException(
+ "id parameter must not be null!");
}
this.id = id;
}
diff --git a/server/src/main/java/com/vaadin/data/util/sqlcontainer/RowItem.java b/server/src/main/java/com/vaadin/data/util/sqlcontainer/RowItem.java
index ddb5de1d31..e0d07f2ab1 100644
--- a/server/src/main/java/com/vaadin/data/util/sqlcontainer/RowItem.java
+++ b/server/src/main/java/com/vaadin/data/util/sqlcontainer/RowItem.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.data.Property;
/**
* RowItem represents one row of a result set obtained from a QueryDelegate.
- *
+ *
* Note that depending on the QueryDelegate in use this does not necessarily map
* into an actual row in a database table.
*/
diff --git a/server/src/main/java/com/vaadin/data/util/sqlcontainer/SQLContainer.java b/server/src/main/java/com/vaadin/data/util/sqlcontainer/SQLContainer.java
index 86e9069e90..189e77abb5 100644
--- a/server/src/main/java/com/vaadin/data/util/sqlcontainer/SQLContainer.java
+++ b/server/src/main/java/com/vaadin/data/util/sqlcontainer/SQLContainer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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,7 +100,9 @@ public class SQLContainer implements Container, Container.Filterable,
/** ItemSetChangeListeners */
private LinkedList<Container.ItemSetChangeListener> itemSetChangeListeners;
- /** Temporary storage for modified items and items to be removed and added */
+ /**
+ * Temporary storage for modified items and items to be removed and added
+ */
private final Map<RowId, RowItem> removedItems = new HashMap<RowId, RowItem>();
private final List<RowItem> addedItems = new ArrayList<RowItem>();
private final List<RowItem> modifiedItems = new ArrayList<RowItem>();
@@ -120,7 +122,7 @@ public class SQLContainer implements Container, Container.Filterable,
/**
* Creates and initializes SQLContainer using the given QueryDelegate
- *
+ *
* @param delegate
* QueryDelegate implementation
* @throws SQLException
@@ -144,7 +146,7 @@ public class SQLContainer implements Container, Container.Filterable,
* temporary row ID assigned for the item. Implement
* QueryDelegate.RowIdChangeListener to receive the actual Row ID value
* after the addition has been committed.
- *
+ *
* {@inheritDoc}
*/
@@ -205,7 +207,7 @@ public class SQLContainer implements Container, Container.Filterable,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container#containsId(java.lang.Object)
*/
@@ -235,8 +237,8 @@ public class SQLContainer implements Container, Container.Filterable,
if (itemId instanceof RowId && !(itemId instanceof TemporaryRowId)) {
try {
- return queryDelegate.containsRowWithKey(((RowId) itemId)
- .getId());
+ return queryDelegate
+ .containsRowWithKey(((RowId) itemId).getId());
} catch (Exception e) {
/* Query failed, just return false. */
getLogger().log(Level.WARNING, "containsId query failed", e);
@@ -247,7 +249,7 @@ public class SQLContainer implements Container, Container.Filterable,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container#getContainerProperty(java.lang.Object,
* java.lang.Object)
*/
@@ -263,7 +265,7 @@ public class SQLContainer implements Container, Container.Filterable,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container#getContainerPropertyIds()
*/
@@ -274,7 +276,7 @@ public class SQLContainer implements Container, Container.Filterable,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container#getItem(java.lang.Object)
*/
@@ -302,7 +304,7 @@ public class SQLContainer implements Container, Container.Filterable,
/**
* Bypasses in-memory filtering to return items that are cached in memory.
* <em>NOTE</em>: This does not bypass database-level filtering.
- *
+ *
* @param itemId
* the id of the item to retrieve.
* @return the item represented by itemId.
@@ -322,7 +324,7 @@ public class SQLContainer implements Container, Container.Filterable,
* NOTE! Do not use this method if in any way avoidable. This method doesn't
* (and cannot) use lazy loading, which means that all rows in the database
* will be loaded into memory.
- *
+ *
* {@inheritDoc}
*/
@@ -357,8 +359,8 @@ public class SQLContainer implements Container, Container.Filterable,
rs.close();
queryDelegate.commit();
} catch (SQLException e) {
- getLogger().log(Level.WARNING,
- "getItemIds() failed, rolling back.", e);
+ getLogger().log(Level.WARNING, "getItemIds() failed, rolling back.",
+ e);
try {
queryDelegate.rollback();
} catch (SQLException e1) {
@@ -380,7 +382,7 @@ public class SQLContainer implements Container, Container.Filterable,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container#getType(java.lang.Object)
*/
@@ -394,7 +396,7 @@ public class SQLContainer implements Container, Container.Filterable,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container#size()
*/
@@ -406,7 +408,7 @@ public class SQLContainer implements Container, Container.Filterable,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container#removeItem(java.lang.Object)
*/
@@ -475,7 +477,7 @@ public class SQLContainer implements Container, Container.Filterable,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container#removeAllItems()
*/
@@ -570,8 +572,8 @@ public class SQLContainer implements Container, Container.Filterable,
}
/* Generate Filter -object */
- String likeStr = onlyMatchPrefix ? filterString + "%" : "%"
- + filterString + "%";
+ String likeStr = onlyMatchPrefix ? filterString + "%"
+ : "%" + filterString + "%";
Like like = new Like(propertyId.toString(), likeStr);
like.setCaseSensitive(!ignoreCase);
filters.add(like);
@@ -603,7 +605,7 @@ public class SQLContainer implements Container, Container.Filterable,
/**
* Returns true if any filters have been applied to the container.
- *
+ *
* @return true if the container has filters applied, false otherwise
* @since 7.1
*/
@@ -613,7 +615,7 @@ public class SQLContainer implements Container, Container.Filterable,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container.Filterable#getContainerFilters()
*/
@Override
@@ -627,7 +629,7 @@ public class SQLContainer implements Container, Container.Filterable,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container.Indexed#indexOfId(java.lang.Object)
*/
@@ -686,15 +688,15 @@ public class SQLContainer implements Container, Container.Filterable,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container.Indexed#getIdByIndex(int)
*/
@Override
public Object getIdByIndex(int index) {
if (index < 0) {
- throw new IndexOutOfBoundsException("Index is negative! index="
- + index);
+ throw new IndexOutOfBoundsException(
+ "Index is negative! index=" + index);
}
// make sure the size field is valid
updateCount();
@@ -716,8 +718,8 @@ public class SQLContainer implements Container, Container.Filterable,
@Override
public List<Object> getItemIds(int startIndex, int numberOfIds) {
// TODO create a better implementation
- return (List<Object>) ContainerHelpers.getItemIdsUsingGetIdByIndex(
- startIndex, numberOfIds, this);
+ return (List<Object>) ContainerHelpers
+ .getItemIdsUsingGetIdByIndex(startIndex, numberOfIds, this);
}
/**********************************************/
@@ -726,7 +728,7 @@ public class SQLContainer implements Container, Container.Filterable,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container.Ordered#nextItemId(java.lang.Object)
*/
@@ -742,7 +744,7 @@ public class SQLContainer implements Container, Container.Filterable,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container.Ordered#prevItemId(java.lang.Object)
*/
@@ -758,7 +760,7 @@ public class SQLContainer implements Container, Container.Filterable,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container.Ordered#firstItemId()
*/
@@ -787,7 +789,7 @@ public class SQLContainer implements Container, Container.Filterable,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container.Ordered#lastItemId()
*/
@@ -814,7 +816,7 @@ public class SQLContainer implements Container, Container.Filterable,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container.Ordered#isFirstId(java.lang.Object)
*/
@@ -825,7 +827,7 @@ public class SQLContainer implements Container, Container.Filterable,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container.Ordered#isLastId(java.lang.Object)
*/
@@ -840,7 +842,7 @@ public class SQLContainer implements Container, Container.Filterable,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container.Sortable#sort(java.lang.Object[],
* boolean[])
*/
@@ -871,7 +873,7 @@ public class SQLContainer implements Container, Container.Filterable,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container.Sortable#getSortableContainerPropertyIds()
*/
@@ -897,7 +899,7 @@ public class SQLContainer implements Container, Container.Filterable,
* <code>false</code>, assumes that the current size is up to date. This is
* used in {@link #updateCount()} to refresh the contents when we know the
* size was just updated.
- *
+ *
* @param setSizeDirty
*/
private void refresh(boolean setSizeDirty) {
@@ -912,7 +914,7 @@ public class SQLContainer implements Container, Container.Filterable,
/**
* Returns modify state of the container.
- *
+ *
* @return true if contents of this container have been modified
*/
public boolean isModified() {
@@ -924,7 +926,7 @@ public class SQLContainer implements Container, Container.Filterable,
* Set auto commit mode enabled or disabled. Auto commit mode means that all
* changes made to items of this container will be immediately written to
* the underlying data source.
- *
+ *
* @param autoCommitEnabled
* true to enable auto commit mode
*/
@@ -934,7 +936,7 @@ public class SQLContainer implements Container, Container.Filterable,
/**
* Returns status of the auto commit mode.
- *
+ *
* @return true if auto commit mode is enabled
*/
public boolean isAutoCommit() {
@@ -943,7 +945,7 @@ public class SQLContainer implements Container, Container.Filterable,
/**
* Returns the currently set page length.
- *
+ *
* @return current page length
*/
public int getPageLength() {
@@ -953,9 +955,9 @@ public class SQLContainer implements Container, Container.Filterable,
/**
* Sets the page length used in lazy fetching of items from the data source.
* Also resets the cache size to match the new page length.
- *
+ *
* As a side effect the container will be refreshed.
- *
+ *
* @param pageLength
* new page length
*/
@@ -966,7 +968,7 @@ public class SQLContainer implements Container, Container.Filterable,
/**
* Sets the page length internally, without refreshing the container.
- *
+ *
* @param pageLength
* the new page length
*/
@@ -979,10 +981,10 @@ public class SQLContainer implements Container, Container.Filterable,
/**
* Adds the given OrderBy to this container and refreshes the container
* contents with the new sorting rules.
- *
+ *
* Note that orderBy.getColumn() must return a column name that exists in
* this container.
- *
+ *
* @param orderBy
* OrderBy to be added to the container sorting rules
*/
@@ -1001,7 +1003,7 @@ public class SQLContainer implements Container, Container.Filterable,
/**
* Commits all the changes, additions and removals made to the items of this
* container.
- *
+ *
* @throws UnsupportedOperationException
* @throws SQLException
*/
@@ -1019,8 +1021,9 @@ public class SQLContainer implements Container, Container.Filterable,
+ item.getId());
}
} catch (IllegalArgumentException e) {
- throw new SQLException("Removal failed for row with ID: "
- + item.getId(), e);
+ throw new SQLException(
+ "Removal failed for row with ID: " + item.getId(),
+ e);
}
}
/* Perform buffered modifications */
@@ -1065,7 +1068,7 @@ public class SQLContainer implements Container, Container.Filterable,
/**
* Rolls back all the changes, additions and removals made to the items of
* this container.
- *
+ *
* @throws UnsupportedOperationException
* @throws SQLException
*/
@@ -1081,7 +1084,7 @@ public class SQLContainer implements Container, Container.Filterable,
* Notifies this container that a property in the given item has been
* modified. The change will be buffered or made instantaneously depending
* on auto commit mode.
- *
+ *
* @param changedItem
* item that has a modified property
*/
@@ -1124,7 +1127,7 @@ public class SQLContainer implements Container, Container.Filterable,
* Determines a new offset for updating the row cache. The offset is
* calculated from the given index, and will be fixed to match the start of
* a page, based on the value of pageLength.
- *
+ *
* @param index
* Index of the item that was requested, but not found in cache
*/
@@ -1149,9 +1152,8 @@ public class SQLContainer implements Container, Container.Filterable,
* Fetches new count of rows from the data source, if needed.
*/
private void updateCount() {
- if (!sizeDirty
- && new Date().getTime() < sizeUpdated.getTime()
- + sizeValidMilliSeconds) {
+ if (!sizeDirty && new Date().getTime() < sizeUpdated.getTime()
+ + sizeValidMilliSeconds) {
return;
}
try {
@@ -1175,8 +1177,8 @@ public class SQLContainer implements Container, Container.Filterable,
// Size is up to date so don't set it back to dirty in refresh()
refresh(false);
}
- getLogger().log(Level.FINER,
- "Updated row count. New count is: {0}", size);
+ getLogger().log(Level.FINER, "Updated row count. New count is: {0}",
+ size);
} catch (SQLException e) {
throw new RuntimeException("Failed to update item set size.", e);
}
@@ -1185,7 +1187,7 @@ public class SQLContainer implements Container, Container.Filterable,
/**
* Fetches property id's (column names and their types) from the data
* source.
- *
+ *
* @throws SQLException
*/
private void getPropertyIds() throws SQLException {
@@ -1247,9 +1249,9 @@ public class SQLContainer implements Container, Container.Filterable,
propertyPersistable.put(colName, persistable);
propertyNullable.put(colName,
rsmd.isNullable(i) == ResultSetMetaData.columnNullable);
- propertyPrimaryKey.put(colName, queryDelegate
- .getPrimaryKeyColumns()
- .contains(rsmd.getColumnLabel(i)));
+ propertyPrimaryKey.put(colName,
+ queryDelegate.getPrimaryKeyColumns()
+ .contains(rsmd.getColumnLabel(i)));
propertyTypes.put(colName, type);
}
rs.getStatement().close();
@@ -1371,8 +1373,8 @@ public class SQLContainer implements Container, Container.Filterable,
if (modifiedIndex != -1) {
cachedItems.put(id, modifiedItems.get(modifiedIndex));
} else {
- cachedItems.put(id, new RowItem(this, id,
- itemProperties));
+ cachedItems.put(id,
+ new RowItem(this, id, itemProperties));
}
rowCount++;
@@ -1384,8 +1386,8 @@ public class SQLContainer implements Container, Container.Filterable,
getLogger().log(Level.FINER, "Fetched {0} rows starting from {1}",
new Object[] { fetchedRows, currentOffset });
} catch (SQLException e) {
- getLogger().log(Level.WARNING,
- "Failed to fetch rows, rolling back", e);
+ getLogger().log(Level.WARNING, "Failed to fetch rows, rolling back",
+ e);
try {
queryDelegate.rollback();
} catch (SQLException e1) {
@@ -1408,7 +1410,7 @@ public class SQLContainer implements Container, Container.Filterable,
/**
* Returns the index of the item with the given itemId for the modified
* cache.
- *
+ *
* @param itemId
* @return the index of the item with the itemId in the modified cache. Or
* -1 if not found.
@@ -1453,7 +1455,7 @@ public class SQLContainer implements Container, Container.Filterable,
* Currently the only non-valid identifier is "rownum" when MSSQL or Oracle
* is used. This is due to the way the SELECT queries are constructed in
* order to implement paging in these databases.
- *
+ *
* @param identifier
* Column identifier
* @return true if the identifier is valid
@@ -1472,7 +1474,7 @@ public class SQLContainer implements Container, Container.Filterable,
/**
* Returns the QueryDelegate set for this SQLContainer.
- *
+ *
* @return current querydelegate
*/
protected QueryDelegate getQueryDelegate() {
@@ -1485,7 +1487,7 @@ public class SQLContainer implements Container, Container.Filterable,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container#addContainerProperty(java.lang.Object,
* java.lang.Class, java.lang.Object)
*/
@@ -1498,7 +1500,7 @@ public class SQLContainer implements Container, Container.Filterable,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container#removeContainerProperty(java.lang.Object)
*/
@@ -1510,7 +1512,7 @@ public class SQLContainer implements Container, Container.Filterable,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container#addItem(java.lang.Object)
*/
@@ -1521,7 +1523,7 @@ public class SQLContainer implements Container, Container.Filterable,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container.Ordered#addItemAfter(java.lang.Object,
* java.lang.Object)
*/
@@ -1534,7 +1536,7 @@ public class SQLContainer implements Container, Container.Filterable,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container.Indexed#addItemAt(int, java.lang.Object)
*/
@@ -1546,7 +1548,7 @@ public class SQLContainer implements Container, Container.Filterable,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container.Indexed#addItemAt(int)
*/
@@ -1557,7 +1559,7 @@ public class SQLContainer implements Container, Container.Filterable,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container.Ordered#addItemAfter(java.lang.Object)
*/
@@ -1573,7 +1575,7 @@ public class SQLContainer implements Container, Container.Filterable,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.data.Container.ItemSetChangeNotifier#addListener(com.vaadin
* .data.Container.ItemSetChangeListener)
@@ -1600,7 +1602,7 @@ public class SQLContainer implements Container, Container.Filterable,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.data.Container.ItemSetChangeNotifier#removeListener(com.vaadin
* .data.Container.ItemSetChangeListener)
@@ -1640,8 +1642,8 @@ public class SQLContainer implements Container, Container.Filterable,
* Simple ItemSetChangeEvent implementation.
*/
@SuppressWarnings("serial")
- public static class ItemSetChangeEvent extends EventObject implements
- Container.ItemSetChangeEvent {
+ public static class ItemSetChangeEvent extends EventObject
+ implements Container.ItemSetChangeEvent {
private ItemSetChangeEvent(SQLContainer source) {
super(source);
@@ -1659,7 +1661,7 @@ public class SQLContainer implements Container, Container.Filterable,
/**
* Adds a RowIdChangeListener to the QueryDelegate
- *
+ *
* @param listener
*/
public void addRowIdChangeListener(RowIdChangeListener listener) {
@@ -1680,7 +1682,7 @@ public class SQLContainer implements Container, Container.Filterable,
/**
* Removes a RowIdChangeListener from the QueryDelegate
- *
+ *
* @param listener
*/
public void removeRowIdChangeListener(RowIdChangeListener listener) {
@@ -1718,10 +1720,10 @@ public class SQLContainer implements Container, Container.Filterable,
* Adds a new reference to the given SQLContainer. In addition to the
* container you must provide the column (property) names used for the
* reference in both this and the referenced SQLContainer.
- *
+ *
* Note that multiple references pointing to the same SQLContainer are not
* supported.
- *
+ *
* @param refdCont
* Target SQLContainer of the new reference
* @param refingCol
@@ -1758,7 +1760,7 @@ public class SQLContainer implements Container, Container.Filterable,
/**
* Removes the reference pointing to the given SQLContainer.
- *
+ *
* @param refdCont
* Target SQLContainer of the reference
* @return true if successful, false if the reference did not exist
@@ -1774,7 +1776,7 @@ public class SQLContainer implements Container, Container.Filterable,
/**
* Sets the referenced item. The referencing column of the item in this
* container is updated accordingly.
- *
+ *
* @param itemId
* Item Id of the reference source (from this container)
* @param refdItemId
@@ -1796,20 +1798,20 @@ public class SQLContainer implements Container, Container.Filterable,
"Reference to the given SQLContainer not defined.");
}
try {
- getContainerProperty(itemId, r.getReferencingColumn()).setValue(
- refdCont.getContainerProperty(refdItemId,
+ getContainerProperty(itemId, r.getReferencingColumn())
+ .setValue(refdCont.getContainerProperty(refdItemId,
r.getReferencedColumn()));
return true;
} catch (Exception e) {
- getLogger()
- .log(Level.WARNING, "Setting referenced item failed.", e);
+ getLogger().log(Level.WARNING, "Setting referenced item failed.",
+ e);
return false;
}
}
/**
* Fetches the Item Id of the referenced item from the target SQLContainer.
- *
+ *
* @param itemId
* Item Id of the reference source (from this container)
* @param refdCont
@@ -1838,7 +1840,7 @@ public class SQLContainer implements Container, Container.Filterable,
/**
* Fetches the referenced item from the target SQLContainer.
- *
+ *
* @param itemId
* Item Id of the reference source (from this container)
* @param refdCont
@@ -1849,12 +1851,13 @@ public class SQLContainer implements Container, Container.Filterable,
return refdCont.getItem(getReferencedItemId(itemId, refdCont));
}
- private void writeObject(java.io.ObjectOutputStream out) throws IOException {
+ private void writeObject(java.io.ObjectOutputStream out)
+ throws IOException {
out.defaultWriteObject();
}
- private void readObject(java.io.ObjectInputStream in) throws IOException,
- ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in)
+ throws IOException, ClassNotFoundException {
in.defaultReadObject();
if (notificationsEnabled) {
/*
diff --git a/server/src/main/java/com/vaadin/data/util/sqlcontainer/SQLUtil.java b/server/src/main/java/com/vaadin/data/util/sqlcontainer/SQLUtil.java
index e5282c867a..1058828002 100644
--- a/server/src/main/java/com/vaadin/data/util/sqlcontainer/SQLUtil.java
+++ b/server/src/main/java/com/vaadin/data/util/sqlcontainer/SQLUtil.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,15 +21,18 @@ public class SQLUtil implements Serializable {
/**
* Escapes different special characters in strings that are passed to SQL.
* Replaces the following:
- *
- * <list> <li>' is replaced with ''</li> <li>\x00 is removed</li> <li>\ is
- * replaced with \\</li> <li>" is replaced with \"</li> <li>
- * \x1a is removed</li> </list>
- *
+ *
+ * <list>
+ * <li>' is replaced with ''</li>
+ * <li>\x00 is removed</li>
+ * <li>\ is replaced with \\</li>
+ * <li>" is replaced with \"</li>
+ * <li>\x1a is removed</li> </list>
+ *
* Also note! The escaping done here may or may not be enough to prevent any
* and all SQL injections so it is recommended to check user input before
* giving it to the SQLContainer/TableQuery.
- *
+ *
* @param constant
* @return \\\'\'
*/
diff --git a/server/src/main/java/com/vaadin/data/util/sqlcontainer/TemporaryRowId.java b/server/src/main/java/com/vaadin/data/util/sqlcontainer/TemporaryRowId.java
index ca2f25963e..3781451b9f 100644
--- a/server/src/main/java/com/vaadin/data/util/sqlcontainer/TemporaryRowId.java
+++ b/server/src/main/java/com/vaadin/data/util/sqlcontainer/TemporaryRowId.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/main/java/com/vaadin/data/util/sqlcontainer/connection/J2EEConnectionPool.java b/server/src/main/java/com/vaadin/data/util/sqlcontainer/connection/J2EEConnectionPool.java
index acad5beed9..b4c63cabc0 100644
--- a/server/src/main/java/com/vaadin/data/util/sqlcontainer/connection/J2EEConnectionPool.java
+++ b/server/src/main/java/com/vaadin/data/util/sqlcontainer/connection/J2EEConnectionPool.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -70,8 +70,8 @@ public class J2EEConnectionPool implements JDBCConnectionPool {
try {
conn.close();
} catch (SQLException e) {
- Logger.getLogger(J2EEConnectionPool.class.getName()).log(
- Level.FINE, "Could not release SQL connection", e);
+ Logger.getLogger(J2EEConnectionPool.class.getName())
+ .log(Level.FINE, "Could not release SQL connection", e);
}
}
}
diff --git a/server/src/main/java/com/vaadin/data/util/sqlcontainer/connection/JDBCConnectionPool.java b/server/src/main/java/com/vaadin/data/util/sqlcontainer/connection/JDBCConnectionPool.java
index 11669075a3..969aa35eca 100644
--- a/server/src/main/java/com/vaadin/data/util/sqlcontainer/connection/JDBCConnectionPool.java
+++ b/server/src/main/java/com/vaadin/data/util/sqlcontainer/connection/JDBCConnectionPool.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import java.sql.SQLException;
public interface JDBCConnectionPool extends Serializable {
/**
* Retrieves a connection.
- *
+ *
* @return a usable connection to the database
* @throws SQLException
*/
@@ -33,10 +33,10 @@ public interface JDBCConnectionPool extends Serializable {
/**
* Releases a connection that was retrieved earlier.
- *
+ *
* Note that depending on implementation, the transaction possibly open in
* the connection may or may not be rolled back.
- *
+ *
* @param conn
* Connection to be released
*/
@@ -45,7 +45,7 @@ public interface JDBCConnectionPool extends Serializable {
/**
* Destroys the connection pool: close() is called an all the connections in
* the pool, whether available or reserved.
- *
+ *
* This method was added to fix PostgreSQL -related issues with connections
* that were left hanging 'idle'.
*/
diff --git a/server/src/main/java/com/vaadin/data/util/sqlcontainer/connection/SimpleJDBCConnectionPool.java b/server/src/main/java/com/vaadin/data/util/sqlcontainer/connection/SimpleJDBCConnectionPool.java
index 57ea188cb4..da797f98ef 100644
--- a/server/src/main/java/com/vaadin/data/util/sqlcontainer/connection/SimpleJDBCConnectionPool.java
+++ b/server/src/main/java/com/vaadin/data/util/sqlcontainer/connection/SimpleJDBCConnectionPool.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -172,7 +172,8 @@ public class SimpleJDBCConnectionPool implements JDBCConnectionPool {
}
- private void writeObject(java.io.ObjectOutputStream out) throws IOException {
+ private void writeObject(java.io.ObjectOutputStream out)
+ throws IOException {
initialized = false;
out.defaultWriteObject();
}
diff --git a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/AbstractTransactionalQuery.java b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/AbstractTransactionalQuery.java
index e7fd9f4aa4..9094feec4f 100644
--- a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/AbstractTransactionalQuery.java
+++ b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/AbstractTransactionalQuery.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,7 +27,7 @@ import com.vaadin.data.util.sqlcontainer.connection.JDBCConnectionPool;
/**
* Common base class for database query classes that handle connections and
* transactions.
- *
+ *
* @author Vaadin Ltd
* @since 6.8.9
*/
@@ -46,14 +46,14 @@ public abstract class AbstractTransactionalQuery implements Serializable {
/**
* Reserves a connection with auto-commit off if no transaction is in
* progress.
- *
+ *
* @throws IllegalStateException
* if a transaction is already open
* @throws SQLException
* if a connection could not be obtained or configured
*/
- public void beginTransaction() throws UnsupportedOperationException,
- SQLException {
+ public void beginTransaction()
+ throws UnsupportedOperationException, SQLException {
if (isInTransaction()) {
throw new IllegalStateException("A transaction is already active!");
}
@@ -63,7 +63,7 @@ public abstract class AbstractTransactionalQuery implements Serializable {
/**
* Commits (if not in auto-commit mode) and releases the active connection.
- *
+ *
* @throws SQLException
* if not in a transaction managed by this query
*/
@@ -80,7 +80,7 @@ public abstract class AbstractTransactionalQuery implements Serializable {
/**
* Rolls back and releases the active connection.
- *
+ *
* @throws SQLException
* if not in a transaction managed by this query
*/
@@ -95,7 +95,7 @@ public abstract class AbstractTransactionalQuery implements Serializable {
/**
* Check that a transaction is active.
- *
+ *
* @throws SQLException
* if no active transaction
*/
@@ -109,17 +109,17 @@ public abstract class AbstractTransactionalQuery implements Serializable {
* Closes a statement and a resultset, then releases the connection if it is
* not part of an active transaction. A failure in closing one of the
* parameters does not prevent closing the rest.
- *
+ *
* If the statement is a {@link PreparedStatement}, its parameters are
* cleared prior to closing the statement.
- *
+ *
* Although JDBC specification does state that closing a statement closes
* its result set and closing a connection closes statements and result
* sets, this method does try to close the result set and statement
* explicitly whenever not null. This can guard against bugs in certain JDBC
* drivers and reduce leaks in case e.g. closing the result set succeeds but
* closing the statement or connection fails.
- *
+ *
* @param conn
* the connection to release
* @param statement
@@ -156,7 +156,7 @@ public abstract class AbstractTransactionalQuery implements Serializable {
/**
* Returns the currently active connection, reserves and returns a new
* connection if no active connection.
- *
+ *
* @return previously active or newly reserved connection
* @throws SQLException
*/
@@ -173,7 +173,7 @@ public abstract class AbstractTransactionalQuery implements Serializable {
/**
* Releases the connection if it is not part of an active transaction.
- *
+ *
* @param conn
* the connection to release
*/
diff --git a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/FreeformQuery.java b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/FreeformQuery.java
index 6b800cb965..a86aacaee7 100644
--- a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/FreeformQuery.java
+++ b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/FreeformQuery.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -34,8 +34,8 @@ import com.vaadin.data.util.sqlcontainer.query.generator.StatementHelper;
import com.vaadin.data.util.sqlcontainer.query.generator.filter.QueryBuilder;
@SuppressWarnings("serial")
-public class FreeformQuery extends AbstractTransactionalQuery implements
- QueryDelegate {
+public class FreeformQuery extends AbstractTransactionalQuery
+ implements QueryDelegate {
FreeformQueryDelegate delegate = null;
private String queryString;
@@ -51,7 +51,7 @@ public class FreeformQuery extends AbstractTransactionalQuery implements
/**
* Creates a new freeform query delegate to be used with the
* {@link SQLContainer}.
- *
+ *
* @param queryString
* The actual query to perform.
* @param primaryKeyColumns
@@ -88,7 +88,7 @@ public class FreeformQuery extends AbstractTransactionalQuery implements
/**
* Creates a new freeform query delegate to be used with the
* {@link SQLContainer}.
- *
+ *
* @param queryString
* The actual query to perform.
* @param connectionPool
@@ -107,7 +107,7 @@ public class FreeformQuery extends AbstractTransactionalQuery implements
* This implementation of getCount() actually fetches all records from the
* database, which might be a performance issue. Override this method with a
* SELECT COUNT(*) ... query if this is too slow for your needs.
- *
+ *
* {@inheritDoc}
*/
@Override
@@ -204,14 +204,15 @@ public class FreeformQuery extends AbstractTransactionalQuery implements
* order to support lazy loading of records, you must supply a
* FreeformQueryDelegate that implements the
* FreeformQueryDelegate.getQueryString(int,int) method.
- *
+ *
* @throws SQLException
- *
+ *
* @see FreeformQueryDelegate#getQueryString(int, int)
*/
@Override
@SuppressWarnings({ "deprecation", "finally" })
- public ResultSet getResults(int offset, int pagelength) throws SQLException {
+ public ResultSet getResults(int offset, int pagelength)
+ throws SQLException {
ensureTransaction();
String query = queryString;
if (delegate != null) {
@@ -220,8 +221,8 @@ public class FreeformQuery extends AbstractTransactionalQuery implements
try {
StatementHelper sh = ((FreeformStatementDelegate) delegate)
.getQueryStatement(offset, pagelength);
- PreparedStatement pstmt = getConnection().prepareStatement(
- sh.getQueryString());
+ PreparedStatement pstmt = getConnection()
+ .prepareStatement(sh.getQueryString());
sh.setParameterValuesToStatement(pstmt);
return pstmt.executeQuery();
} catch (UnsupportedOperationException e) {
@@ -279,7 +280,7 @@ public class FreeformQuery extends AbstractTransactionalQuery implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.data.util.sqlcontainer.query.QueryDelegate#setFilters(java
* .util.List)
@@ -297,7 +298,7 @@ public class FreeformQuery extends AbstractTransactionalQuery implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.data.util.sqlcontainer.query.QueryDelegate#setOrderBy(java
* .util.List)
@@ -315,7 +316,7 @@ public class FreeformQuery extends AbstractTransactionalQuery implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.data.util.sqlcontainer.query.QueryDelegate#storeRow(com.vaadin
* .data.util.sqlcontainer.RowItem)
@@ -338,10 +339,9 @@ public class FreeformQuery extends AbstractTransactionalQuery implements
/*
* (non-Javadoc)
- *
- * @see
- * com.vaadin.data.util.sqlcontainer.query.QueryDelegate#removeRow(com.vaadin
- * .data.util.sqlcontainer.RowItem)
+ *
+ * @see com.vaadin.data.util.sqlcontainer.query.QueryDelegate#removeRow(com.
+ * vaadin .data.util.sqlcontainer.RowItem)
*/
@Override
public boolean removeRow(RowItem row) throws SQLException {
@@ -366,23 +366,22 @@ public class FreeformQuery extends AbstractTransactionalQuery implements
}
@Override
- public synchronized void commit() throws UnsupportedOperationException,
- SQLException {
+ public synchronized void commit()
+ throws UnsupportedOperationException, SQLException {
super.commit();
}
@Override
- public synchronized void rollback() throws UnsupportedOperationException,
- SQLException {
+ public synchronized void rollback()
+ throws UnsupportedOperationException, SQLException {
super.rollback();
}
/*
* (non-Javadoc)
- *
- * @see
- * com.vaadin.data.util.sqlcontainer.query.QueryDelegate#getPrimaryKeyColumns
- * ()
+ *
+ * @see com.vaadin.data.util.sqlcontainer.query.QueryDelegate#
+ * getPrimaryKeyColumns ()
*/
@Override
public List<String> getPrimaryKeyColumns() {
@@ -408,9 +407,9 @@ public class FreeformQuery extends AbstractTransactionalQuery implements
* situations where this logic is not enough, you can implement the
* getContainsRowQueryString method in FreeformQueryDelegate and this will
* be used instead of the logic.
- *
+ *
* @see FreeformQueryDelegate#getContainsRowQueryString(Object...)
- *
+ *
*/
@Override
@SuppressWarnings("deprecation")
@@ -485,7 +484,8 @@ public class FreeformQuery extends AbstractTransactionalQuery implements
return queryString + " WHERE " + where;
}
- private void writeObject(java.io.ObjectOutputStream out) throws IOException {
+ private void writeObject(java.io.ObjectOutputStream out)
+ throws IOException {
try {
rollback();
} catch (SQLException ignored) {
diff --git a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/FreeformQueryDelegate.java b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/FreeformQueryDelegate.java
index b6fa56055d..3830170eba 100644
--- a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/FreeformQueryDelegate.java
+++ b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/FreeformQueryDelegate.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ public interface FreeformQueryDelegate extends Serializable {
* Should return the SQL query string to be performed. This method is
* responsible for gluing together the select query from the filters and the
* order by conditions if these are supported.
- *
+ *
* @param offset
* the first record (row) to fetch.
* @param pagelength
@@ -45,7 +45,7 @@ public interface FreeformQueryDelegate extends Serializable {
* Generates and executes a query to determine the current row count from
* the DB. Row count will be fetched using filters that are currently set to
* the QueryDelegate.
- *
+ *
* @return row count
* @throws SQLException
* @deprecated As of 6.7. Implement {@link FreeformStatementDelegate}
@@ -57,7 +57,7 @@ public interface FreeformQueryDelegate extends Serializable {
/**
* Sets the filters to apply when performing the SQL query. These are
* translated into a WHERE clause. Default filtering mode will be used.
- *
+ *
* @param filters
* The filters to apply.
* @throws UnsupportedOperationException
@@ -71,7 +71,7 @@ public interface FreeformQueryDelegate extends Serializable {
* can be ordered by zero or more columns and each column can be in
* ascending or descending order. These are translated into an ORDER BY
* clause in the SQL query.
- *
+ *
* @param orderBys
* A list of the OrderBy conditions.
* @throws UnsupportedOperationException
@@ -84,7 +84,7 @@ public interface FreeformQueryDelegate extends Serializable {
* Stores a row in the database. The implementation of this interface
* decides how to identify whether to store a new row or update an existing
* one.
- *
+ *
* @param conn
* the JDBC connection to use
* @param row
@@ -98,7 +98,7 @@ public interface FreeformQueryDelegate extends Serializable {
/**
* Removes the given RowItem from the database.
- *
+ *
* @param conn
* the JDBC connection to use
* @param row
@@ -116,7 +116,7 @@ public interface FreeformQueryDelegate extends Serializable {
* FreeformQuery.containsRowWithKeys() method. This is useful for cases when
* the logic in the containsRowWithKeys method is not enough to support more
* complex free form queries.
- *
+ *
* @param keys
* the values of the primary keys
* @throws UnsupportedOperationException
diff --git a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/FreeformStatementDelegate.java b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/FreeformStatementDelegate.java
index 9df72f5b98..1c666dd259 100644
--- a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/FreeformStatementDelegate.java
+++ b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/FreeformStatementDelegate.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ import com.vaadin.data.util.sqlcontainer.query.generator.StatementHelper;
* provides definitions for methods that produce StatementHelper objects instead
* of basic query strings. This allows the FreeformQuery query delegate to use
* PreparedStatements instead of regular Statement when accessing the database.
- *
+ *
* Due to the injection protection and other benefits of prepared statements, it
* is advisable to implement this interface instead of the FreeformQueryDelegate
* whenever possible.
@@ -33,7 +33,7 @@ public interface FreeformStatementDelegate extends FreeformQueryDelegate {
* string and parameter values required to create a PreparedStatement. This
* method is responsible for gluing together the select query from the
* filters and the order by conditions if these are supported.
- *
+ *
* @param offset
* the first record (row) to fetch.
* @param pagelength
@@ -58,7 +58,7 @@ public interface FreeformStatementDelegate extends FreeformQueryDelegate {
* by the FreeformQuery.containsRowWithKeys() method. This is useful for
* cases when the default logic in said method is not enough to support more
* complex free form queries.
- *
+ *
* @param keys
* the values of the primary keys
* @throws UnsupportedOperationException
diff --git a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/OrderBy.java b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/OrderBy.java
index 2bafa5dc0c..1b014bdda1 100644
--- a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/OrderBy.java
+++ b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/OrderBy.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import java.io.Serializable;
/**
* OrderBy represents a sorting rule to be applied to a query made by the
* SQLContainer's QueryDelegate.
- *
+ *
* The sorting rule is simple and contains only the affected column's name and
* the direction of the sort.
*/
diff --git a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/QueryDelegate.java b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/QueryDelegate.java
index 413dd55ab9..ab4cf0cd90 100644
--- a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/QueryDelegate.java
+++ b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/QueryDelegate.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ public interface QueryDelegate extends Serializable {
* Generates and executes a query to determine the current row count from
* the DB. Row count will be fetched using filters that are currently set to
* the QueryDelegate.
- *
+ *
* @return row count
* @throws SQLException
*/
@@ -38,7 +38,7 @@ public interface QueryDelegate extends Serializable {
/**
* Executes a paged SQL query and returns the ResultSet. The query is
* defined through implementations of this QueryDelegate interface.
- *
+ *
* @param offset
* the first item of the page to load
* @param pagelength
@@ -52,9 +52,9 @@ public interface QueryDelegate extends Serializable {
/**
* Allows the SQLContainer implementation to check whether the QueryDelegate
* implementation implements paging in the getResults method.
- *
+ *
* @see QueryDelegate#getResults(int, int)
- *
+ *
* @return true if the delegate implements paging
*/
public boolean implementationRespectsPagingLimits();
@@ -62,7 +62,7 @@ public interface QueryDelegate extends Serializable {
/**
* Sets the filters to apply when performing the SQL query. These are
* translated into a WHERE clause. Default filtering mode will be used.
- *
+ *
* @param filters
* The filters to apply.
* @throws UnsupportedOperationException
@@ -76,7 +76,7 @@ public interface QueryDelegate extends Serializable {
* can be ordered by zero or more columns and each column can be in
* ascending or descending order. These are translated into an ORDER BY
* clause in the SQL query.
- *
+ *
* @param orderBys
* A list of the OrderBy conditions.
* @throws UnsupportedOperationException
@@ -89,7 +89,7 @@ public interface QueryDelegate extends Serializable {
* Stores a row in the database. The implementation of this interface
* decides how to identify whether to store a new row or update an existing
* one.
- *
+ *
* @param columnToValueMap
* A map containing the values for all columns to be stored or
* updated.
@@ -97,27 +97,27 @@ public interface QueryDelegate extends Serializable {
* @throws UnsupportedOperationException
* if the implementation is read only.
*/
- public int storeRow(RowItem row) throws UnsupportedOperationException,
- SQLException;
+ public int storeRow(RowItem row)
+ throws UnsupportedOperationException, SQLException;
/**
* Removes the given RowItem from the database.
- *
+ *
* @param row
* RowItem to be removed
* @return true on success
* @throws UnsupportedOperationException
* @throws SQLException
*/
- public boolean removeRow(RowItem row) throws UnsupportedOperationException,
- SQLException;
+ public boolean removeRow(RowItem row)
+ throws UnsupportedOperationException, SQLException;
/**
* Starts a new database transaction. Used when storing multiple changes.
- *
+ *
* Note that if a transaction is already open, it will be rolled back when a
* new transaction is started.
- *
+ *
* @throws SQLException
* if the database access fails.
*/
@@ -126,7 +126,7 @@ public interface QueryDelegate extends Serializable {
/**
* Commits a transaction. If a transaction is not open nothing should
* happen.
- *
+ *
* @throws SQLException
* if the database access fails.
*/
@@ -135,7 +135,7 @@ public interface QueryDelegate extends Serializable {
/**
* Rolls a transaction back. If a transaction is not open nothing should
* happen.
- *
+ *
* @throws SQLException
* if the database access fails.
*/
@@ -145,7 +145,7 @@ public interface QueryDelegate extends Serializable {
* Returns a list of primary key column names. The list is either fetched
* from the database (TableQuery) or given as an argument depending on
* implementation.
- *
+ *
* @return
*/
public List<String> getPrimaryKeyColumns();
@@ -153,7 +153,7 @@ public interface QueryDelegate extends Serializable {
/**
* Performs a query to find out whether the SQL table contains a row with
* the given set of primary keys.
- *
+ *
* @param keys
* the primary keys
* @return true if the SQL table contains a row with the provided keys
@@ -173,7 +173,7 @@ public interface QueryDelegate extends Serializable {
/**
* Gets the old (temporary) RowId of the added row that raised this
* event.
- *
+ *
* @return old RowId
*/
public RowId getOldRowId();
@@ -181,7 +181,7 @@ public interface QueryDelegate extends Serializable {
/**
* Gets the new, possibly database assigned RowId of the added row that
* raised this event.
- *
+ *
* @return new RowId
*/
public RowId getNewRowId();
@@ -191,7 +191,7 @@ public interface QueryDelegate extends Serializable {
public interface RowIdChangeListener extends Serializable {
/**
* Lets the listener know that a RowId has been changed.
- *
+ *
* @param event
*/
public void rowIdChange(QueryDelegate.RowIdChangeEvent event);
@@ -206,7 +206,7 @@ public interface QueryDelegate extends Serializable {
public interface RowIdChangeNotifier extends Serializable {
/**
* Adds a RowIdChangeListener for the object.
- *
+ *
* @param listener
* listener to be added
*/
@@ -222,7 +222,7 @@ public interface QueryDelegate extends Serializable {
/**
* Removes the specified RowIdChangeListener from the object.
- *
+ *
* @param listener
* listener to be removed
*/
diff --git a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/TableQuery.java b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/TableQuery.java
index 9a41766a31..4e28b5d4e4 100644
--- a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/TableQuery.java
+++ b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/TableQuery.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -47,8 +47,8 @@ import com.vaadin.data.util.sqlcontainer.query.generator.SQLGenerator;
import com.vaadin.data.util.sqlcontainer.query.generator.StatementHelper;
@SuppressWarnings("serial")
-public class TableQuery extends AbstractTransactionalQuery implements
- QueryDelegate, QueryDelegate.RowIdChangeNotifier {
+public class TableQuery extends AbstractTransactionalQuery
+ implements QueryDelegate, QueryDelegate.RowIdChangeNotifier {
/**
* Table name (without catalog or schema information).
@@ -87,12 +87,12 @@ public class TableQuery extends AbstractTransactionalQuery implements
/**
* Creates a new TableQuery using the given connection pool, SQL generator
* and table name to fetch the data from. All parameters must be non-null.
- *
+ *
* The table name must be a simple name with no catalog or schema
* information. If those are needed, use
* {@link #TableQuery(String, String, String, JDBCConnectionPool, SQLGenerator)}
* .
- *
+ *
* @param tableName
* Name of the database table to connect to
* @param connectionPool
@@ -109,7 +109,7 @@ public class TableQuery extends AbstractTransactionalQuery implements
* Creates a new TableQuery using the given connection pool, SQL generator
* and table name to fetch the data from. Catalog and schema names can be
* null, all other parameters must be non-null.
- *
+ *
* @param catalogName
* Name of the database catalog (can be null)
* @param schemaName
@@ -132,12 +132,12 @@ public class TableQuery extends AbstractTransactionalQuery implements
* Creates a new TableQuery using the given connection pool and table name
* to fetch the data from. All parameters must be non-null. The default SQL
* generator will be used for queries.
- *
+ *
* The table name must be a simple name with no catalog or schema
* information. If those are needed, use
* {@link #TableQuery(String, String, String, JDBCConnectionPool, SQLGenerator)}
* .
- *
+ *
* @param tableName
* Name of the database table to connect to
* @param connectionPool
@@ -151,7 +151,7 @@ public class TableQuery extends AbstractTransactionalQuery implements
* Creates a new TableQuery using the given connection pool, SQL generator
* and table name to fetch the data from. Catalog and schema names can be
* null, all other parameters must be non-null.
- *
+ *
* @param catalogName
* Name of the database catalog (can be null)
* @param schemaName
@@ -191,7 +191,7 @@ public class TableQuery extends AbstractTransactionalQuery implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.addon.sqlcontainer.query.QueryDelegate#getCount()
*/
@Override
@@ -227,12 +227,13 @@ public class TableQuery extends AbstractTransactionalQuery implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.addon.sqlcontainer.query.QueryDelegate#getResults(int,
* int)
*/
@Override
- public ResultSet getResults(int offset, int pagelength) throws SQLException {
+ public ResultSet getResults(int offset, int pagelength)
+ throws SQLException {
StatementHelper sh;
/*
* If no ordering is explicitly set, results will be ordered by the
@@ -254,7 +255,7 @@ public class TableQuery extends AbstractTransactionalQuery implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.addon.sqlcontainer.query.QueryDelegate#
* implementationRespectsPagingLimits()
*/
@@ -265,16 +266,17 @@ public class TableQuery extends AbstractTransactionalQuery implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.addon.sqlcontainer.query.QueryDelegate#storeRow(com.vaadin
* .addon.sqlcontainer.RowItem)
*/
@Override
- public int storeRow(RowItem row) throws UnsupportedOperationException,
- SQLException {
+ public int storeRow(RowItem row)
+ throws UnsupportedOperationException, SQLException {
if (row == null) {
- throw new IllegalArgumentException("Row argument must be non-null.");
+ throw new IllegalArgumentException(
+ "Row argument must be non-null.");
}
StatementHelper sh;
int result = 0;
@@ -309,7 +311,7 @@ public class TableQuery extends AbstractTransactionalQuery implements
* solve the problem of returning the final RowId immediately on the
* SQLContainer.addItem() call when auto commit mode is enabled in the
* SQLContainer.
- *
+ *
* @param row
* RowItem to add to the database
* @return Final RowId of the added row
@@ -320,8 +322,8 @@ public class TableQuery extends AbstractTransactionalQuery implements
/* Set version column, if one is provided */
setVersionColumnFlagInProperty(row);
/* Generate query */
- StatementHelper sh = sqlGenerator.generateInsertQuery(
- getFullTableName(), row);
+ StatementHelper sh = sqlGenerator
+ .generateInsertQuery(getFullTableName(), row);
Connection connection = null;
PreparedStatement pstmt = null;
ResultSet generatedKeys = null;
@@ -351,7 +353,7 @@ public class TableQuery extends AbstractTransactionalQuery implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.addon.sqlcontainer.query.QueryDelegate#setFilters(java.util
* .List)
@@ -368,7 +370,7 @@ public class TableQuery extends AbstractTransactionalQuery implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.addon.sqlcontainer.query.QueryDelegate#setOrderBy(java.util
* .List)
@@ -385,19 +387,19 @@ public class TableQuery extends AbstractTransactionalQuery implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.addon.sqlcontainer.query.QueryDelegate#beginTransaction()
*/
@Override
- public void beginTransaction() throws UnsupportedOperationException,
- SQLException {
+ public void beginTransaction()
+ throws UnsupportedOperationException, SQLException {
getLogger().log(Level.FINE, "DB -> begin transaction");
super.beginTransaction();
}
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.addon.sqlcontainer.query.QueryDelegate#commit()
*/
@Override
@@ -420,7 +422,7 @@ public class TableQuery extends AbstractTransactionalQuery implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.addon.sqlcontainer.query.QueryDelegate#rollback()
*/
@Override
@@ -431,7 +433,7 @@ public class TableQuery extends AbstractTransactionalQuery implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.addon.sqlcontainer.query.QueryDelegate#getPrimaryKeyColumns()
*/
@@ -451,7 +453,7 @@ public class TableQuery extends AbstractTransactionalQuery implements
/**
* Returns the table name for the query without catalog and schema
* information.
- *
+ *
* @return table name, not null
*/
public String getTableName() {
@@ -460,7 +462,7 @@ public class TableQuery extends AbstractTransactionalQuery implements
/**
* Returns the catalog name for the query.
- *
+ *
* @return catalog name, can be null
* @since 7.1
*/
@@ -470,7 +472,7 @@ public class TableQuery extends AbstractTransactionalQuery implements
/**
* Returns the catalog name for the query.
- *
+ *
* @return catalog name, can be null
* @since 7.1
*/
@@ -481,9 +483,9 @@ public class TableQuery extends AbstractTransactionalQuery implements
/**
* Returns the complete table name obtained by concatenation of the catalog
* and schema names (if any) and the table name.
- *
+ *
* This method can be overridden if customization is needed.
- *
+ *
* @return table name in the form it should be used in query and update
* statements
* @since 7.1
@@ -511,7 +513,7 @@ public class TableQuery extends AbstractTransactionalQuery implements
* Executes the given query string using either the active connection if a
* transaction is already open, or a new connection from this query's
* connection pool.
- *
+ *
* @param sh
* an instance of StatementHelper, containing the query string
* and parameter values.
@@ -537,7 +539,7 @@ public class TableQuery extends AbstractTransactionalQuery implements
* Executes the given update query string using either the active connection
* if a transaction is already open, or a new connection from this query's
* connection pool.
- *
+ *
* @param sh
* an instance of StatementHelper, containing the query string
* and parameter values.
@@ -563,9 +565,9 @@ public class TableQuery extends AbstractTransactionalQuery implements
* Executes the given update query string using either the active connection
* if a transaction is already open, or a new connection from this query's
* connection pool.
- *
+ *
* Additionally adds a new RowIdChangeEvent to the event buffer.
- *
+ *
* @param sh
* an instance of StatementHelper, containing the query string
* and parameter values.
@@ -597,7 +599,7 @@ public class TableQuery extends AbstractTransactionalQuery implements
/**
* Fetches name(s) of primary key column(s) from DB metadata.
- *
+ *
* Also tries to get the escape string to be used in search strings.
*/
private void fetchMetaData() {
@@ -611,16 +613,15 @@ public class TableQuery extends AbstractTransactionalQuery implements
tables = dbmd.getTables(catalogName, schemaName, tableName,
null);
if (!tables.next()) {
- String catalog = (catalogName != null) ? catalogName
- .toUpperCase() : null;
- String schema = (schemaName != null) ? schemaName
- .toUpperCase() : null;
+ String catalog = (catalogName != null)
+ ? catalogName.toUpperCase() : null;
+ String schema = (schemaName != null)
+ ? schemaName.toUpperCase() : null;
tables = dbmd.getTables(catalog, schema,
tableName.toUpperCase(), null);
if (!tables.next()) {
throw new IllegalArgumentException(
- "Table with the name \""
- + getFullTableName()
+ "Table with the name \"" + getFullTableName()
+ "\" was not found. Check your database contents.");
} else {
catalogName = catalog;
@@ -692,8 +693,8 @@ public class TableQuery extends AbstractTransactionalQuery implements
for (String s : primaryKeyColumns) {
if (!((ColumnProperty) row.getItemProperty(s))
.isReadOnlyChangeAllowed()) {
- newRowId.add(values.get(values.keySet().iterator()
- .next()));
+ newRowId.add(values
+ .get(values.keySet().iterator().next()));
} else {
newRowId.add(values.get(s));
}
@@ -706,24 +707,23 @@ public class TableQuery extends AbstractTransactionalQuery implements
}
return new RowId(newRowId.toArray());
} catch (Exception e) {
- getLogger()
- .log(Level.FINE,
- "Failed to fetch key values on insert: {0}",
- e.getMessage());
+ getLogger().log(Level.FINE,
+ "Failed to fetch key values on insert: {0}",
+ e.getMessage());
return null;
}
}
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.addon.sqlcontainer.query.QueryDelegate#removeRow(com.vaadin
* .addon.sqlcontainer.RowItem)
*/
@Override
- public boolean removeRow(RowItem row) throws UnsupportedOperationException,
- SQLException {
+ public boolean removeRow(RowItem row)
+ throws UnsupportedOperationException, SQLException {
if (getLogger().isLoggable(Level.FINE)) {
getLogger().log(Level.FINE, "Removing row with id: {0}",
row.getId().getId()[0]);
@@ -742,7 +742,7 @@ public class TableQuery extends AbstractTransactionalQuery implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.addon.sqlcontainer.query.QueryDelegate#containsRowWithKey(
* java.lang.Object[])
@@ -788,7 +788,8 @@ public class TableQuery extends AbstractTransactionalQuery implements
/**
* Custom writeObject to call rollback() if object is serialized.
*/
- private void writeObject(java.io.ObjectOutputStream out) throws IOException {
+ private void writeObject(java.io.ObjectOutputStream out)
+ throws IOException {
try {
rollback();
} catch (SQLException ignored) {
@@ -799,8 +800,8 @@ public class TableQuery extends AbstractTransactionalQuery implements
/**
* Simple RowIdChangeEvent implementation.
*/
- public static class RowIdChangeEvent extends EventObject implements
- QueryDelegate.RowIdChangeEvent {
+ public static class RowIdChangeEvent extends EventObject
+ implements QueryDelegate.RowIdChangeEvent {
private final RowId oldId;
private final RowId newId;
diff --git a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/DefaultSQLGenerator.java b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/DefaultSQLGenerator.java
index 2fc7ebd544..95e772b2f2 100644
--- a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/DefaultSQLGenerator.java
+++ b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/DefaultSQLGenerator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,7 +30,7 @@ import com.vaadin.data.util.sqlcontainer.query.generator.filter.StringDecorator;
/**
* Generates generic SQL that is supported by HSQLDB, MySQL and PostgreSQL.
- *
+ *
* @author Jonatan Kronqvist / Vaadin Ltd
*/
@SuppressWarnings("serial")
@@ -45,7 +45,7 @@ public class DefaultSQLGenerator implements SQLGenerator {
/**
* Create a new DefaultSqlGenerator instance that uses the given
* implementation of {@link StatementHelper}
- *
+ *
* @param statementHelper
*/
public DefaultSQLGenerator(
@@ -58,7 +58,7 @@ public class DefaultSQLGenerator implements SQLGenerator {
* Construct a DefaultSQLGenerator with the specified identifiers for start
* and end of quoted strings. The identifiers may be different depending on
* the database engine and it's settings.
- *
+ *
* @param quoteStart
* the identifier (character) denoting the start of a quoted
* string
@@ -66,14 +66,14 @@ public class DefaultSQLGenerator implements SQLGenerator {
* the identifier (character) denoting the end of a quoted string
*/
public DefaultSQLGenerator(String quoteStart, String quoteEnd) {
- QueryBuilder.setStringDecorator(new StringDecorator(quoteStart,
- quoteEnd));
+ QueryBuilder
+ .setStringDecorator(new StringDecorator(quoteStart, quoteEnd));
}
/**
* Same as {@link #DefaultSQLGenerator(String, String)} but with support for
* custom {@link StatementHelper} implementation.
- *
+ *
* @param quoteStart
* @param quoteEnd
* @param statementHelperClazz
@@ -86,7 +86,7 @@ public class DefaultSQLGenerator implements SQLGenerator {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.addon.sqlcontainer.query.generator.SQLGenerator#
* generateSelectQuery(java.lang.String, java.util.List, java.util.List,
* int, int, java.lang.String)
@@ -101,8 +101,8 @@ public class DefaultSQLGenerator implements SQLGenerator {
toSelect = toSelect == null ? "*" : toSelect;
StatementHelper sh = getStatementHelper();
StringBuffer query = new StringBuffer();
- query.append("SELECT " + toSelect + " FROM ").append(
- SQLUtil.escapeSQL(tableName));
+ query.append("SELECT " + toSelect + " FROM ")
+ .append(SQLUtil.escapeSQL(tableName));
if (filters != null) {
query.append(QueryBuilder.getWhereStringForFilters(filters, sh));
}
@@ -120,7 +120,7 @@ public class DefaultSQLGenerator implements SQLGenerator {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.addon.sqlcontainer.query.generator.SQLGenerator#
* generateUpdateQuery(java.lang.String,
* com.vaadin.addon.sqlcontainer.RowItem)
@@ -148,8 +148,8 @@ public class DefaultSQLGenerator implements SQLGenerator {
} else {
query.append(", " + QueryBuilder.quote(column) + " = ?");
}
- sh.addParameterValue(columnToValueMap.get(column), item
- .getItemProperty(column).getType());
+ sh.addParameterValue(columnToValueMap.get(column),
+ item.getItemProperty(column).getType());
first = false;
}
/* Generate identifiers for the row to be updated */
@@ -160,8 +160,8 @@ public class DefaultSQLGenerator implements SQLGenerator {
} else {
query.append(" AND " + QueryBuilder.quote(column) + " = ?");
}
- sh.addParameterValue(rowIdentifiers.get(column), item
- .getItemProperty(column).getType());
+ sh.addParameterValue(rowIdentifiers.get(column),
+ item.getItemProperty(column).getType());
first = false;
}
sh.setQueryString(query.toString());
@@ -170,7 +170,7 @@ public class DefaultSQLGenerator implements SQLGenerator {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.addon.sqlcontainer.query.generator.SQLGenerator#
* generateInsertQuery(java.lang.String,
* com.vaadin.addon.sqlcontainer.RowItem)
@@ -211,8 +211,8 @@ public class DefaultSQLGenerator implements SQLGenerator {
query.append(", ");
}
query.append("?");
- sh.addParameterValue(columnToValueMap.get(column), item
- .getItemProperty(column).getType());
+ sh.addParameterValue(columnToValueMap.get(column),
+ item.getItemProperty(column).getType());
first = false;
}
query.append(")");
@@ -222,14 +222,15 @@ public class DefaultSQLGenerator implements SQLGenerator {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.addon.sqlcontainer.query.generator.SQLGenerator#
* generateDeleteQuery(java.lang.String,
* com.vaadin.addon.sqlcontainer.RowItem)
*/
@Override
public StatementHelper generateDeleteQuery(String tableName,
- List<String> primaryKeyColumns, String versionColumn, RowItem item) {
+ List<String> primaryKeyColumns, String versionColumn,
+ RowItem item) {
if (tableName == null || tableName.trim().equals("")) {
throw new IllegalArgumentException("Table name must be given.");
}
@@ -246,7 +247,8 @@ public class DefaultSQLGenerator implements SQLGenerator {
query.append("DELETE FROM ").append(tableName).append(" WHERE ");
int count = 1;
for (String keyColName : primaryKeyColumns) {
- if ((this instanceof MSSQLGenerator || this instanceof OracleGenerator)
+ if ((this instanceof MSSQLGenerator
+ || this instanceof OracleGenerator)
&& keyColName.equalsIgnoreCase("rownum")) {
count++;
continue;
@@ -256,8 +258,9 @@ public class DefaultSQLGenerator implements SQLGenerator {
}
if (item.getItemProperty(keyColName).getValue() != null) {
query.append(QueryBuilder.quote(keyColName) + " = ?");
- sh.addParameterValue(item.getItemProperty(keyColName)
- .getValue(), item.getItemProperty(keyColName).getType());
+ sh.addParameterValue(
+ item.getItemProperty(keyColName).getValue(),
+ item.getItemProperty(keyColName).getType());
}
count++;
}
@@ -270,9 +273,8 @@ public class DefaultSQLGenerator implements SQLGenerator {
query.append(String.format(" AND %s = ?",
QueryBuilder.quote(versionColumn)));
- sh.addParameterValue(
- item.getItemProperty(versionColumn).getValue(), item
- .getItemProperty(versionColumn).getType());
+ sh.addParameterValue(item.getItemProperty(versionColumn).getValue(),
+ item.getItemProperty(versionColumn).getType());
}
sh.setQueryString(query.toString());
@@ -281,7 +283,7 @@ public class DefaultSQLGenerator implements SQLGenerator {
/**
* Generates sorting rules as an ORDER BY -clause
- *
+ *
* @param sb
* StringBuffer to which the clause is appended.
* @param o
@@ -308,7 +310,7 @@ public class DefaultSQLGenerator implements SQLGenerator {
/**
* Generates the LIMIT and OFFSET clause.
- *
+ *
* @param sb
* StringBuffer to which the clause is appended.
* @param offset
@@ -329,7 +331,8 @@ public class DefaultSQLGenerator implements SQLGenerator {
for (Object id : item.getItemPropertyIds()) {
ColumnProperty cp = (ColumnProperty) item.getItemProperty(id);
/* Prevent "rownum" usage as a column name if MSSQL or ORACLE */
- if ((this instanceof MSSQLGenerator || this instanceof OracleGenerator)
+ if ((this instanceof MSSQLGenerator
+ || this instanceof OracleGenerator)
&& cp.getPropertyId().equalsIgnoreCase("rownum")) {
continue;
}
@@ -345,7 +348,8 @@ public class DefaultSQLGenerator implements SQLGenerator {
for (Object id : item.getItemPropertyIds()) {
ColumnProperty cp = (ColumnProperty) item.getItemProperty(id);
/* Prevent "rownum" usage as a column name if MSSQL or ORACLE */
- if ((this instanceof MSSQLGenerator || this instanceof OracleGenerator)
+ if ((this instanceof MSSQLGenerator
+ || this instanceof OracleGenerator)
&& cp.getPropertyId().equalsIgnoreCase("rownum")) {
continue;
}
@@ -368,7 +372,7 @@ public class DefaultSQLGenerator implements SQLGenerator {
/**
* Returns the statement helper for the generator. Override this to handle
* platform specific data types.
- *
+ *
* @see http://dev.vaadin.com/ticket/9148
* @return a new instance of the statement helper
*/
diff --git a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/MSSQLGenerator.java b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/MSSQLGenerator.java
index 5a1f2003cd..754aa08689 100644
--- a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/MSSQLGenerator.java
+++ b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/MSSQLGenerator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,7 +32,7 @@ public class MSSQLGenerator extends DefaultSQLGenerator {
* Construct a MSSQLGenerator with the specified identifiers for start and
* end of quoted strings. The identifiers may be different depending on the
* database engine and it's settings.
- *
+ *
* @param quoteStart
* the identifier (character) denoting the start of a quoted
* string
@@ -45,7 +45,7 @@ public class MSSQLGenerator extends DefaultSQLGenerator {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.addon.sqlcontainer.query.generator.DefaultSQLGenerator#
* generateSelectQuery(java.lang.String, java.util.List,
* com.vaadin.addon.sqlcontainer.query.FilteringMode, java.util.List, int,
@@ -71,7 +71,8 @@ public class MSSQLGenerator extends DefaultSQLGenerator {
"SELECT COUNT(*) AS %s FROM (SELECT * FROM %s",
QueryBuilder.quote("rowcount"), tableName));
if (filters != null && !filters.isEmpty()) {
- query.append(QueryBuilder.getWhereStringForFilters(filters, sh));
+ query.append(
+ QueryBuilder.getWhereStringForFilters(filters, sh));
}
query.append(") AS t");
sh.setQueryString(query.toString());
@@ -83,7 +84,8 @@ public class MSSQLGenerator extends DefaultSQLGenerator {
query.append("SELECT ").append(toSelect).append(" FROM ")
.append(tableName);
if (filters != null) {
- query.append(QueryBuilder.getWhereStringForFilters(filters, sh));
+ query.append(
+ QueryBuilder.getWhereStringForFilters(filters, sh));
}
if (orderBys != null) {
for (OrderBy o : orderBys) {
diff --git a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/OracleGenerator.java b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/OracleGenerator.java
index 86508d37c4..a9a98d98a7 100644
--- a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/OracleGenerator.java
+++ b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/OracleGenerator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,8 @@ public class OracleGenerator extends DefaultSQLGenerator {
}
- public OracleGenerator(Class<? extends StatementHelper> statementHelperClazz) {
+ public OracleGenerator(
+ Class<? extends StatementHelper> statementHelperClazz) {
super(statementHelperClazz);
}
@@ -36,7 +37,7 @@ public class OracleGenerator extends DefaultSQLGenerator {
* Construct an OracleSQLGenerator with the specified identifiers for start
* and end of quoted strings. The identifiers may be different depending on
* the database engine and it's settings.
- *
+ *
* @param quoteStart
* the identifier (character) denoting the start of a quoted
* string
@@ -54,7 +55,7 @@ public class OracleGenerator extends DefaultSQLGenerator {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.addon.sqlcontainer.query.generator.DefaultSQLGenerator#
* generateSelectQuery(java.lang.String, java.util.List,
* com.vaadin.addon.sqlcontainer.query.FilteringMode, java.util.List, int,
@@ -80,7 +81,8 @@ public class OracleGenerator extends DefaultSQLGenerator {
"SELECT COUNT(*) AS %s FROM (SELECT * FROM %s",
QueryBuilder.quote("rowcount"), tableName));
if (filters != null && !filters.isEmpty()) {
- query.append(QueryBuilder.getWhereStringForFilters(filters, sh));
+ query.append(
+ QueryBuilder.getWhereStringForFilters(filters, sh));
}
query.append(")");
sh.setQueryString(query.toString());
@@ -92,7 +94,8 @@ public class OracleGenerator extends DefaultSQLGenerator {
query.append("SELECT ").append(toSelect).append(" FROM ")
.append(tableName);
if (filters != null) {
- query.append(QueryBuilder.getWhereStringForFilters(filters, sh));
+ query.append(
+ QueryBuilder.getWhereStringForFilters(filters, sh));
}
if (orderBys != null) {
for (OrderBy o : orderBys) {
@@ -104,9 +107,9 @@ public class OracleGenerator extends DefaultSQLGenerator {
}
/* Remaining SELECT cases are handled here */
- query.append(String
- .format("SELECT * FROM (SELECT x.*, ROWNUM AS %s FROM (SELECT %s FROM %s",
- QueryBuilder.quote("rownum"), toSelect, tableName));
+ query.append(String.format(
+ "SELECT * FROM (SELECT x.*, ROWNUM AS %s FROM (SELECT %s FROM %s",
+ QueryBuilder.quote("rownum"), toSelect, tableName));
if (filters != null) {
query.append(QueryBuilder.getWhereStringForFilters(filters, sh));
}
diff --git a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/SQLGenerator.java b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/SQLGenerator.java
index 53ff924a36..bdc3d1fdf1 100644
--- a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/SQLGenerator.java
+++ b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/SQLGenerator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,14 +26,14 @@ import com.vaadin.data.util.sqlcontainer.query.OrderBy;
* The SQLGenerator interface is meant to be implemented for each different SQL
* syntax that is to be supported. By default there are implementations for
* HSQLDB, MySQL, PostgreSQL, MSSQL and Oracle syntaxes.
- *
+ *
* @author Jonatan Kronqvist / Vaadin Ltd
*/
public interface SQLGenerator extends Serializable {
/**
* Generates a SELECT query with the provided parameters. Uses default
* filtering mode (INCLUSIVE).
- *
+ *
* @param tableName
* Name of the table queried
* @param filters
@@ -55,7 +55,7 @@ public interface SQLGenerator extends Serializable {
/**
* Generates an UPDATE query with the provided parameters.
- *
+ *
* @param tableName
* Name of the table queried
* @param item
@@ -68,7 +68,7 @@ public interface SQLGenerator extends Serializable {
/**
* Generates an INSERT query for inserting a new row with the provided
* values.
- *
+ *
* @param tableName
* Name of the table queried
* @param item
@@ -81,7 +81,7 @@ public interface SQLGenerator extends Serializable {
/**
* Generates a DELETE query for deleting data related to the given RowItem
* from the database.
- *
+ *
* @param tableName
* Name of the table queried
* @param primaryKeyColumns
diff --git a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/StatementHelper.java b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/StatementHelper.java
index 5a9fcb17c0..78371f31ce 100644
--- a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/StatementHelper.java
+++ b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/StatementHelper.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -33,7 +33,7 @@ import java.util.Map;
* query generators in filling a PreparedStatement. The actual statement is
* generated by the query generator methods, but the resulting statement and all
* the parameter values are stored in an instance of StatementHelper.
- *
+ *
* This class will also fill the values with correct setters into the
* PreparedStatement on request.
*/
@@ -84,35 +84,35 @@ public class StatementHelper implements Serializable {
/*
* The following list contains the data types supported by
* PreparedStatement but not supported by SQLContainer:
- *
+ *
* [The list is provided as PreparedStatement method signatures]
- *
+ *
* setNCharacterStream(int parameterIndex, Reader value)
- *
+ *
* setNClob(int parameterIndex, NClob value)
- *
+ *
* setNString(int parameterIndex, String value)
- *
+ *
* setRef(int parameterIndex, Ref x)
- *
+ *
* setRowId(int parameterIndex, RowId x)
- *
+ *
* setSQLXML(int parameterIndex, SQLXML xmlObject)
- *
+ *
* setBytes(int parameterIndex, byte[] x)
- *
+ *
* setCharacterStream(int parameterIndex, Reader reader)
- *
+ *
* setClob(int parameterIndex, Clob x)
- *
+ *
* setURL(int parameterIndex, URL x)
- *
+ *
* setArray(int parameterIndex, Array x)
- *
+ *
* setAsciiStream(int parameterIndex, InputStream x)
- *
+ *
* setBinaryStream(int parameterIndex, InputStream x)
- *
+ *
* setBlob(int parameterIndex, Blob x)
*/
}
@@ -162,13 +162,13 @@ public class StatementHelper implements Serializable {
* Handle unrecognized null values. Override this to handle null values for
* platform specific data types that are not handled by the default
* implementation of the {@link StatementHelper}.
- *
+ *
* @param i
* @param pstmt
* @param dataTypes2
- *
+ *
* @return true if handled, false otherwise
- *
+ *
* @see {@link http://dev.vaadin.com/ticket/9148}
*/
protected boolean handleUnrecognizedTypeNullValue(int i,
diff --git a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/AndTranslator.java b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/AndTranslator.java
index a3d9b90705..325764f563 100644
--- a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/AndTranslator.java
+++ b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/AndTranslator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,8 +28,8 @@ public class AndTranslator implements FilterTranslator {
@Override
public String getWhereStringForFilter(Filter filter, StatementHelper sh) {
- return QueryBuilder.group(QueryBuilder.getJoinedFilterString(
- ((And) filter).getFilters(), "AND", sh));
+ return QueryBuilder.group(QueryBuilder
+ .getJoinedFilterString(((And) filter).getFilters(), "AND", sh));
}
}
diff --git a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/BetweenTranslator.java b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/BetweenTranslator.java
index 13d3553742..40c04e60d7 100644
--- a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/BetweenTranslator.java
+++ b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/BetweenTranslator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/CompareTranslator.java b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/CompareTranslator.java
index d8d5cc61fb..d3e408f938 100644
--- a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/CompareTranslator.java
+++ b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/CompareTranslator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/FilterTranslator.java b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/FilterTranslator.java
index 0ece263ef4..3dda38a8a4 100644
--- a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/FilterTranslator.java
+++ b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/FilterTranslator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/IsNullTranslator.java b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/IsNullTranslator.java
index 764a04eece..a371be454e 100644
--- a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/IsNullTranslator.java
+++ b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/IsNullTranslator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/LikeTranslator.java b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/LikeTranslator.java
index 07e544d40b..0250589621 100644
--- a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/LikeTranslator.java
+++ b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/LikeTranslator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/NotTranslator.java b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/NotTranslator.java
index 1bbc2a8e7e..cf50618bf4 100644
--- a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/NotTranslator.java
+++ b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/NotTranslator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/OrTranslator.java b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/OrTranslator.java
index 00b4d5421b..17d27f7dbe 100644
--- a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/OrTranslator.java
+++ b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/OrTranslator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,8 +28,8 @@ public class OrTranslator implements FilterTranslator {
@Override
public String getWhereStringForFilter(Filter filter, StatementHelper sh) {
- return QueryBuilder.group(QueryBuilder.getJoinedFilterString(
- ((Or) filter).getFilters(), "OR", sh));
+ return QueryBuilder.group(QueryBuilder
+ .getJoinedFilterString(((Or) filter).getFilters(), "OR", sh));
}
}
diff --git a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/QueryBuilder.java b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/QueryBuilder.java
index b277551209..38843e9497 100644
--- a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/QueryBuilder.java
+++ b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/QueryBuilder.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -49,7 +49,7 @@ public class QueryBuilder implements Serializable {
/**
* Allows specification of a custom ColumnQuoter instance that handles
* quoting of column names for the current DB dialect.
- *
+ *
* @param decorator
* the ColumnQuoter instance to use.
*/
@@ -68,7 +68,7 @@ public class QueryBuilder implements Serializable {
/**
* Constructs and returns a string representing the filter that can be used
* in a WHERE clause.
- *
+ *
* @param filter
* the filter to translate
* @param sh
diff --git a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/SimpleStringTranslator.java b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/SimpleStringTranslator.java
index 9bfda5fb34..7084c82bbd 100644
--- a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/SimpleStringTranslator.java
+++ b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/SimpleStringTranslator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/StringDecorator.java b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/StringDecorator.java
index 0132260a0c..210bcffa29 100644
--- a/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/StringDecorator.java
+++ b/server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/filter/StringDecorator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,10 +21,10 @@ import java.io.Serializable;
* The StringDecorator knows how to produce a quoted string using the specified
* quote start and quote end characters. It also handles grouping of a string
* (surrounding it in parenthesis).
- *
+ *
* Extend this class if you need to support special characters for grouping
* (parenthesis).
- *
+ *
* @author Vaadin Ltd
*/
public class StringDecorator implements Serializable {
@@ -35,7 +35,7 @@ public class StringDecorator implements Serializable {
/**
* Constructs a StringDecorator that uses the quoteStart and quoteEnd
* characters to create quoted strings.
- *
+ *
* @param quoteStart
* the character denoting the start of a quote.
* @param quoteEnd
@@ -48,7 +48,7 @@ public class StringDecorator implements Serializable {
/**
* Surround a string with quote characters.
- *
+ *
* @param str
* the string to quote
* @return the quoted string
@@ -59,7 +59,7 @@ public class StringDecorator implements Serializable {
/**
* Groups a string by surrounding it in parenthesis
- *
+ *
* @param str
* the string to group
* @return the grouped string
diff --git a/server/src/main/java/com/vaadin/data/validator/AbstractStringValidator.java b/server/src/main/java/com/vaadin/data/validator/AbstractStringValidator.java
index 70227afa67..997e322545 100644
--- a/server/src/main/java/com/vaadin/data/validator/AbstractStringValidator.java
+++ b/server/src/main/java/com/vaadin/data/validator/AbstractStringValidator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,25 +23,26 @@ package com.vaadin.data.validator;
* (converted to string using {@link #toString()}) or "null" if the value is
* null.
* </p>
- *
+ *
* @author Vaadin Ltd.
* @since 5.4
*/
@SuppressWarnings("serial")
-public abstract class AbstractStringValidator extends AbstractValidator<String> {
+public abstract class AbstractStringValidator
+ extends AbstractValidator<String> {
/**
* Constructs a validator for strings.
- *
+ *
* <p>
* Null and empty string values are always accepted. To reject empty values,
* set the field being validated as required.
* </p>
- *
+ *
* @param errorMessage
* the message to be included in an {@link InvalidValueException}
* (with "{0}" replaced by the value that failed validation).
- * */
+ */
public AbstractStringValidator(String errorMessage) {
super(errorMessage);
}
diff --git a/server/src/main/java/com/vaadin/data/validator/AbstractValidator.java b/server/src/main/java/com/vaadin/data/validator/AbstractValidator.java
index b0894bbdbf..10e122bff5 100644
--- a/server/src/main/java/com/vaadin/data/validator/AbstractValidator.java
+++ b/server/src/main/java/com/vaadin/data/validator/AbstractValidator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -38,7 +38,7 @@ import com.vaadin.data.Validator;
* directly or implement {@link #isValidValue(Object)} when migrating legacy
* applications. To check validity, {@link #validate(Object)} should be used.
* </p>
- *
+ *
* @param <T>
* The type
* @author Vaadin Ltd.
@@ -54,7 +54,7 @@ public abstract class AbstractValidator<T> implements Validator {
/**
* Constructs a validator with the given error message.
- *
+ *
* @param errorMessage
* the message to be included in an {@link InvalidValueException}
* (with "{0}" replaced by the value that failed validation).
@@ -68,7 +68,7 @@ public abstract class AbstractValidator<T> implements Validator {
* {@link #isValidValue(Object)} or {@link #validate(Object)} instead of
* {@link #isValid(Object)}. {@link #validate(Object)} should normally be
* used to check values.
- *
+ *
* @param value
* @return true if the value is valid
*/
@@ -86,9 +86,9 @@ public abstract class AbstractValidator<T> implements Validator {
* perform validation in subclasses if customization of the error message is
* not needed. Otherwise, subclasses should override
* {@link #validate(Object)} and the return value of this method is ignored.
- *
+ *
* This method should not be called from outside the validator class itself.
- *
+ *
* @param value
* @return
*/
@@ -108,7 +108,7 @@ public abstract class AbstractValidator<T> implements Validator {
* Checks the type of the value to validate to ensure it conforms with
* getType. Enables sub classes to handle the specific type instead of
* Object.
- *
+ *
* @param value
* The value to check
* @return true if the value can safely be cast to the type specified by
@@ -125,7 +125,7 @@ public abstract class AbstractValidator<T> implements Validator {
/**
* Returns the message to be included in the exception in case the value
* does not validate.
- *
+ *
* @return the error message provided in the constructor or using
* {@link #setErrorMessage(String)}.
*/
@@ -136,7 +136,7 @@ public abstract class AbstractValidator<T> implements Validator {
/**
* Sets the message to be included in the exception in case the value does
* not validate. The exception message is typically shown to the end user.
- *
+ *
* @param errorMessage
* the error message. "{0}" is automatically replaced by the
* value that did not validate.
diff --git a/server/src/main/java/com/vaadin/data/validator/BeanValidator.java b/server/src/main/java/com/vaadin/data/validator/BeanValidator.java
index b25f7e687c..9336a7bdfb 100644
--- a/server/src/main/java/com/vaadin/data/validator/BeanValidator.java
+++ b/server/src/main/java/com/vaadin/data/validator/BeanValidator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,16 +31,16 @@ import com.vaadin.data.Validator;
/**
* Vaadin {@link Validator} using the JSR-303 (javax.validation)
* annotation-based bean validation.
- *
+ *
* The annotations of the fields of the beans are used to determine the
* validation to perform.
- *
+ *
* Note that a JSR-303 implementation (e.g. Hibernate Validator or Apache Bean
* Validation - formerly agimatec validation) must be present on the project
* classpath when using bean validation.
- *
+ *
* @since 7.0
- *
+ *
* @author Petri Hakala
* @author Henri Sara
*/
@@ -65,7 +65,7 @@ public class BeanValidator implements Validator {
/**
* Create a simple immutable message interpolator context.
- *
+ *
* @param value
* value being validated
* @param descriptor
@@ -91,7 +91,7 @@ public class BeanValidator implements Validator {
/**
* Creates a Vaadin {@link Validator} utilizing JSR-303 bean validation.
- *
+ *
* @param beanClass
* bean class based on which the validation should be performed
* @param propertyName
@@ -105,7 +105,7 @@ public class BeanValidator implements Validator {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Validator#validate(java.lang.Object)
*/
@Override
@@ -119,10 +119,11 @@ public class BeanValidator implements Validator {
for (Object v : violations) {
final ConstraintViolation<?> violation = (ConstraintViolation<?>) v;
String msg = getJavaxBeanValidatorFactory()
- .getMessageInterpolator().interpolate(
- violation.getMessageTemplate(),
- new SimpleContext(value, violation
- .getConstraintDescriptor()), locale);
+ .getMessageInterpolator()
+ .interpolate(violation.getMessageTemplate(),
+ new SimpleContext(value,
+ violation.getConstraintDescriptor()),
+ locale);
causes[i] = new InvalidValueException(msg);
++i;
}
@@ -133,9 +134,9 @@ public class BeanValidator implements Validator {
/**
* Sets the locale used for validation error messages.
- *
+ *
* Revalidation is not automatically triggered by setting the locale.
- *
+ *
* @param locale
*/
public void setLocale(Locale locale) {
@@ -144,7 +145,7 @@ public class BeanValidator implements Validator {
/**
* Gets the locale used for validation error messages.
- *
+ *
* @return locale used for validation
*/
public Locale getLocale() {
@@ -154,7 +155,7 @@ public class BeanValidator implements Validator {
/**
* Returns the underlying JSR-303 bean validator factory used. A factory is
* created using {@link Validation} if necessary.
- *
+ *
* @return {@link ValidatorFactory} to use
*/
protected static ValidatorFactory getJavaxBeanValidatorFactory() {
@@ -169,7 +170,7 @@ public class BeanValidator implements Validator {
* Returns a shared Validator instance to use. An instance is created using
* the validator factory if necessary and thereafter reused by the
* {@link BeanValidator} instance.
- *
+ *
* @return the JSR-303 {@link javax.validation.Validator} to use
*/
protected javax.validation.Validator getJavaxBeanValidator() {
diff --git a/server/src/main/java/com/vaadin/data/validator/BigDecimalRangeValidator.java b/server/src/main/java/com/vaadin/data/validator/BigDecimalRangeValidator.java
index 1363d230f6..54daa45625 100644
--- a/server/src/main/java/com/vaadin/data/validator/BigDecimalRangeValidator.java
+++ b/server/src/main/java/com/vaadin/data/validator/BigDecimalRangeValidator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import java.math.BigDecimal;
/**
* Validator for validating that an {@link BigDecimal} is inside a given range.
- *
+ *
* @author Vaadin Ltd.
* @since 7.4
*/
@@ -29,12 +29,12 @@ public class BigDecimalRangeValidator extends RangeValidator<BigDecimal> {
/**
* Creates a validator for checking that an BigDecimal is within a given
* range.
- *
+ *
* By default the range is inclusive i.e. both minValue and maxValue are
* valid values. Use {@link #setMinValueIncluded(boolean)} or
* {@link #setMaxValueIncluded(boolean)} to change it.
- *
- *
+ *
+ *
* @param errorMessage
* the message to display in case the value does not validate.
* @param minValue
diff --git a/server/src/main/java/com/vaadin/data/validator/BigIntegerRangeValidator.java b/server/src/main/java/com/vaadin/data/validator/BigIntegerRangeValidator.java
index ecf1990192..cd1934e14a 100644
--- a/server/src/main/java/com/vaadin/data/validator/BigIntegerRangeValidator.java
+++ b/server/src/main/java/com/vaadin/data/validator/BigIntegerRangeValidator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import java.math.BigInteger;
/**
* Validator for validating that an {@link BigInteger} is inside a given range.
- *
+ *
* @author Vaadin Ltd.
* @since 7.4
*/
@@ -29,12 +29,12 @@ public class BigIntegerRangeValidator extends RangeValidator<BigInteger> {
/**
* Creates a validator for checking that an BigInteger is within a given
* range.
- *
+ *
* By default the range is inclusive i.e. both minValue and maxValue are
* valid values. Use {@link #setMinValueIncluded(boolean)} or
* {@link #setMaxValueIncluded(boolean)} to change it.
- *
- *
+ *
+ *
* @param errorMessage
* the message to display in case the value does not validate.
* @param minValue
diff --git a/server/src/main/java/com/vaadin/data/validator/ByteRangeValidator.java b/server/src/main/java/com/vaadin/data/validator/ByteRangeValidator.java
index b147212c06..0211aa32d5 100644
--- a/server/src/main/java/com/vaadin/data/validator/ByteRangeValidator.java
+++ b/server/src/main/java/com/vaadin/data/validator/ByteRangeValidator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -17,7 +17,7 @@ package com.vaadin.data.validator;
/**
* Validator for validating that an {@link Byte} is inside a given range.
- *
+ *
* @author Vaadin Ltd.
* @since 7.4
*/
@@ -26,12 +26,12 @@ public class ByteRangeValidator extends RangeValidator<Byte> {
/**
* Creates a validator for checking that an Byte is within a given range.
- *
+ *
* By default the range is inclusive i.e. both minValue and maxValue are
* valid values. Use {@link #setMinValueIncluded(boolean)} or
* {@link #setMaxValueIncluded(boolean)} to change it.
- *
- *
+ *
+ *
* @param errorMessage
* the message to display in case the value does not validate.
* @param minValue
@@ -39,7 +39,8 @@ public class ByteRangeValidator extends RangeValidator<Byte> {
* @param maxValue
* The maximum value to accept or null for no limit
*/
- public ByteRangeValidator(String errorMessage, Byte minValue, Byte maxValue) {
+ public ByteRangeValidator(String errorMessage, Byte minValue,
+ Byte maxValue) {
super(errorMessage, Byte.class, minValue, maxValue);
}
diff --git a/server/src/main/java/com/vaadin/data/validator/CompositeValidator.java b/server/src/main/java/com/vaadin/data/validator/CompositeValidator.java
index f3b7133b9d..e5ccbccab7 100644
--- a/server/src/main/java/com/vaadin/data/validator/CompositeValidator.java
+++ b/server/src/main/java/com/vaadin/data/validator/CompositeValidator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ import com.vaadin.data.Validator;
* all validate the value to validate or it may be enough that one contained
* validator validates the value. This behaviour is controlled by the modes
* <code>AND</code> and <code>OR</code>.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -84,7 +84,7 @@ public class CompositeValidator implements Validator {
/**
* Constructs a composite validator in given mode.
- *
+ *
* @param mode
* @param errorMessage
*/
@@ -101,12 +101,12 @@ public class CompositeValidator implements Validator {
* <li><code>MODE_AND</code>: All of the sub-validators are valid
* <li><code>MODE_OR</code>: Any of the sub-validators are valid
* </ul>
- *
+ *
* If the value is invalid, validation error is thrown. If the error message
* is set (non-null), it is used. If the error message has not been set, the
* first error occurred is thrown.
* </p>
- *
+ *
* @param value
* the value to check.
* @throws Validator.InvalidValueException
@@ -147,7 +147,7 @@ public class CompositeValidator implements Validator {
/**
* Gets the mode of the validator.
- *
+ *
* @return Operation mode of the validator: {@link CombinationMode#AND} or
* {@link CombinationMode#OR}.
*/
@@ -161,7 +161,7 @@ public class CompositeValidator implements Validator {
* <li>{@link CombinationMode#AND} (default)
* <li>{@link CombinationMode#OR}
* </ul>
- *
+ *
* @param mode
* the mode to set.
*/
@@ -189,7 +189,7 @@ public class CompositeValidator implements Validator {
/**
* Adds validator to the interface.
- *
+ *
* @param validator
* the Validator object which performs validation checks on this
* set of data field values.
@@ -203,7 +203,7 @@ public class CompositeValidator implements Validator {
/**
* Removes a validator from the composite.
- *
+ *
* @param validator
* the Validator object which performs validation checks on this
* set of data field values.
@@ -214,22 +214,22 @@ public class CompositeValidator implements Validator {
/**
* Gets sub-validators by class.
- *
+ *
* <p>
* If the component contains directly or recursively (it contains another
* composite containing the validator) validators compatible with given type
* they are returned. This only applies to <code>AND</code> mode composite
* validators.
* </p>
- *
+ *
* <p>
* If the validator is in <code>OR</code> mode or does not contain any
* validators of given type null is returned.
* </p>
- *
+ *
* @param validatorType
* The type of validators to return
- *
+ *
* @return Collection<Validator> of validators compatible with given type
* that must apply or null if none found.
*/
@@ -259,7 +259,7 @@ public class CompositeValidator implements Validator {
/**
* Sets the message to be included in the exception in case the value does
* not validate. The exception message is typically shown to the end user.
- *
+ *
* @param errorMessage
* the error message.
*/
diff --git a/server/src/main/java/com/vaadin/data/validator/DateRangeValidator.java b/server/src/main/java/com/vaadin/data/validator/DateRangeValidator.java
index 3add69c207..aba28f5f42 100644
--- a/server/src/main/java/com/vaadin/data/validator/DateRangeValidator.java
+++ b/server/src/main/java/com/vaadin/data/validator/DateRangeValidator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,13 +21,13 @@ import com.vaadin.shared.ui.datefield.Resolution;
/**
* Validator for validating that a Date is inside a given range.
- *
+ *
* <p>
* Note that the comparison is done directly on the Date object so take care
* that the hours/minutes/seconds/milliseconds of the min/max values are
* properly set.
* </p>
- *
+ *
* @author Vaadin Ltd.
* @since 7.0
*/
@@ -45,7 +45,7 @@ public class DateRangeValidator extends RangeValidator<Date> {
* that the hours/minutes/seconds/milliseconds of the min/max values are
* properly set.
* </p>
- *
+ *
* @param errorMessage
* the message to display in case the value does not validate.
* @param minValue
@@ -53,8 +53,8 @@ public class DateRangeValidator extends RangeValidator<Date> {
* @param maxValue
* The maximum value to accept or null for no limit
*/
- public DateRangeValidator(String errorMessage, Date minValue,
- Date maxValue, Resolution resolution) {
+ public DateRangeValidator(String errorMessage, Date minValue, Date maxValue,
+ Resolution resolution) {
super(errorMessage, Date.class, minValue, maxValue);
}
diff --git a/server/src/main/java/com/vaadin/data/validator/DoubleRangeValidator.java b/server/src/main/java/com/vaadin/data/validator/DoubleRangeValidator.java
index 8992e2644a..dc61286499 100644
--- a/server/src/main/java/com/vaadin/data/validator/DoubleRangeValidator.java
+++ b/server/src/main/java/com/vaadin/data/validator/DoubleRangeValidator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -17,7 +17,7 @@ package com.vaadin.data.validator;
/**
* Validator for validating that a {@link Double} is inside a given range.
- *
+ *
* @author Vaadin Ltd.
* @since 7.0
*/
@@ -26,12 +26,12 @@ public class DoubleRangeValidator extends RangeValidator<Double> {
/**
* Creates a validator for checking that an Double is within a given range.
- *
+ *
* By default the range is inclusive i.e. both minValue and maxValue are
* valid values. Use {@link #setMinValueIncluded(boolean)} or
* {@link #setMaxValueIncluded(boolean)} to change it.
- *
- *
+ *
+ *
* @param errorMessage
* the message to display in case the value does not validate.
* @param minValue
diff --git a/server/src/main/java/com/vaadin/data/validator/DoubleValidator.java b/server/src/main/java/com/vaadin/data/validator/DoubleValidator.java
index e40cf3eecf..2f5a3e8127 100644
--- a/server/src/main/java/com/vaadin/data/validator/DoubleValidator.java
+++ b/server/src/main/java/com/vaadin/data/validator/DoubleValidator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ import com.vaadin.data.util.converter.StringToDoubleConverter;
* String validator for a double precision floating point number. See
* {@link com.vaadin.data.validator.AbstractStringValidator} for more
* information.
- *
+ *
* @author Vaadin Ltd.
* @since 5.4
* @deprecated As of 7.0. Use a {@link StringToDoubleConverter} converter on the
@@ -36,7 +36,7 @@ public class DoubleValidator extends AbstractStringValidator {
/**
* Creates a validator for checking that a string can be parsed as an
* double.
- *
+ *
* @param errorMessage
* the message to display in case the value does not validate.
* @deprecated As of 7.0. Use a Double converter on the field instead and/or
diff --git a/server/src/main/java/com/vaadin/data/validator/EmailValidator.java b/server/src/main/java/com/vaadin/data/validator/EmailValidator.java
index 853c855a37..54ff2984b7 100644
--- a/server/src/main/java/com/vaadin/data/validator/EmailValidator.java
+++ b/server/src/main/java/com/vaadin/data/validator/EmailValidator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,16 +19,16 @@ package com.vaadin.data.validator;
* String validator for e-mail addresses. The e-mail address syntax is not
* complete according to RFC 822 but handles the vast majority of valid e-mail
* addresses correctly.
- *
+ *
* See {@link com.vaadin.data.validator.AbstractStringValidator} for more
* information.
- *
+ *
* <p>
* An empty string or a null is always accepted - use the required flag on
* fields or a separate validator (or override {@link #isValidValue(String)}) to
* fail on empty values.
* </p>
- *
+ *
* @author Vaadin Ltd.
* @since 5.4
*/
@@ -38,13 +38,12 @@ public class EmailValidator extends RegexpValidator {
/**
* Creates a validator for checking that a string is a syntactically valid
* e-mail address.
- *
+ *
* @param errorMessage
* the message to display in case the value does not validate.
*/
public EmailValidator(String errorMessage) {
- super(
- "^([a-zA-Z0-9_\\.\\-+])+@(([a-zA-Z0-9-])+\\.)+([a-zA-Z0-9]{2,4})+$",
+ super("^([a-zA-Z0-9_\\.\\-+])+@(([a-zA-Z0-9-])+\\.)+([a-zA-Z0-9]{2,4})+$",
true, errorMessage);
}
}
diff --git a/server/src/main/java/com/vaadin/data/validator/FloatRangeValidator.java b/server/src/main/java/com/vaadin/data/validator/FloatRangeValidator.java
index ee29cf16b1..d509a47799 100644
--- a/server/src/main/java/com/vaadin/data/validator/FloatRangeValidator.java
+++ b/server/src/main/java/com/vaadin/data/validator/FloatRangeValidator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -17,7 +17,7 @@ package com.vaadin.data.validator;
/**
* Validator for validating that a {@link Float} is inside a given range.
- *
+ *
* @author Vaadin Ltd.
* @since 7.4
*/
@@ -26,12 +26,12 @@ public class FloatRangeValidator extends RangeValidator<Float> {
/**
* Creates a validator for checking that an Float is within a given range.
- *
+ *
* By default the range is inclusive i.e. both minValue and maxValue are
* valid values. Use {@link #setMinValueIncluded(boolean)} or
* {@link #setMaxValueIncluded(boolean)} to change it.
- *
- *
+ *
+ *
* @param errorMessage
* the message to display in case the value does not validate.
* @param minValue
diff --git a/server/src/main/java/com/vaadin/data/validator/IntegerRangeValidator.java b/server/src/main/java/com/vaadin/data/validator/IntegerRangeValidator.java
index 6ef848bed3..c63ee1f627 100644
--- a/server/src/main/java/com/vaadin/data/validator/IntegerRangeValidator.java
+++ b/server/src/main/java/com/vaadin/data/validator/IntegerRangeValidator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -17,7 +17,7 @@ package com.vaadin.data.validator;
/**
* Validator for validating that an {@link Integer} is inside a given range.
- *
+ *
* @author Vaadin Ltd.
* @since 5.4
*/
@@ -26,12 +26,12 @@ public class IntegerRangeValidator extends RangeValidator<Integer> {
/**
* Creates a validator for checking that an Integer is within a given range.
- *
+ *
* By default the range is inclusive i.e. both minValue and maxValue are
* valid values. Use {@link #setMinValueIncluded(boolean)} or
* {@link #setMaxValueIncluded(boolean)} to change it.
- *
- *
+ *
+ *
* @param errorMessage
* the message to display in case the value does not validate.
* @param minValue
diff --git a/server/src/main/java/com/vaadin/data/validator/IntegerValidator.java b/server/src/main/java/com/vaadin/data/validator/IntegerValidator.java
index f52ba0ab3a..fddeef6dec 100644
--- a/server/src/main/java/com/vaadin/data/validator/IntegerValidator.java
+++ b/server/src/main/java/com/vaadin/data/validator/IntegerValidator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ import com.vaadin.data.util.converter.StringToIntegerConverter;
* String validator for integers. See
* {@link com.vaadin.data.validator.AbstractStringValidator} for more
* information.
- *
+ *
* @author Vaadin Ltd.
* @since 5.4
* @deprecated As of 7.0. Use a {@link StringToIntegerConverter} converter on
@@ -36,7 +36,7 @@ public class IntegerValidator extends AbstractStringValidator {
/**
* Creates a validator for checking that a string can be parsed as an
* integer.
- *
+ *
* @param errorMessage
* the message to display in case the value does not validate.
* @deprecated As of 7.0. Use an Integer converter on the field instead
diff --git a/server/src/main/java/com/vaadin/data/validator/LongRangeValidator.java b/server/src/main/java/com/vaadin/data/validator/LongRangeValidator.java
index c4d8a9c9ca..a4ddd96d14 100644
--- a/server/src/main/java/com/vaadin/data/validator/LongRangeValidator.java
+++ b/server/src/main/java/com/vaadin/data/validator/LongRangeValidator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -17,7 +17,7 @@ package com.vaadin.data.validator;
/**
* Validator for validating that an {@link Long} is inside a given range.
- *
+ *
* @author Vaadin Ltd.
* @since 7.4
*/
@@ -26,12 +26,12 @@ public class LongRangeValidator extends RangeValidator<Long> {
/**
* Creates a validator for checking that an Long is within a given range.
- *
+ *
* By default the range is inclusive i.e. both minValue and maxValue are
* valid values. Use {@link #setMinValueIncluded(boolean)} or
* {@link #setMaxValueIncluded(boolean)} to change it.
- *
- *
+ *
+ *
* @param errorMessage
* the message to display in case the value does not validate.
* @param minValue
@@ -39,7 +39,8 @@ public class LongRangeValidator extends RangeValidator<Long> {
* @param maxValue
* The maximum value to accept or null for no limit
*/
- public LongRangeValidator(String errorMessage, Long minValue, Long maxValue) {
+ public LongRangeValidator(String errorMessage, Long minValue,
+ Long maxValue) {
super(errorMessage, Long.class, minValue, maxValue);
}
diff --git a/server/src/main/java/com/vaadin/data/validator/NullValidator.java b/server/src/main/java/com/vaadin/data/validator/NullValidator.java
index 42cf419973..0253c3d75e 100644
--- a/server/src/main/java/com/vaadin/data/validator/NullValidator.java
+++ b/server/src/main/java/com/vaadin/data/validator/NullValidator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ import com.vaadin.data.Validator;
/**
* This validator is used for validating properties that do or do not allow null
* values. By default, nulls are not allowed.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -34,7 +34,7 @@ public class NullValidator implements Validator {
/**
* Creates a new NullValidator.
- *
+ *
* @param errorMessage
* the error message to display on invalidation.
* @param onlyNullAllowed
@@ -47,7 +47,7 @@ public class NullValidator implements Validator {
/**
* Validates the data given in value.
- *
+ *
* @param value
* the value to validate.
* @throws Validator.InvalidValueException
@@ -71,7 +71,7 @@ public class NullValidator implements Validator {
/**
* Sets if nulls (and only nulls) are to be allowed.
- *
+ *
* @param onlyNullAllowed
* If true, only nulls are allowed. If false only non-nulls are
* allowed. Do we allow nulls?
@@ -82,7 +82,7 @@ public class NullValidator implements Validator {
/**
* Gets the error message that is displayed in case the value is invalid.
- *
+ *
* @return the Error Message.
*/
public String getErrorMessage() {
@@ -91,7 +91,7 @@ public class NullValidator implements Validator {
/**
* Sets the error message to be displayed on invalid value.
- *
+ *
* @param errorMessage
* the Error Message to set.
*/
diff --git a/server/src/main/java/com/vaadin/data/validator/RangeValidator.java b/server/src/main/java/com/vaadin/data/validator/RangeValidator.java
index 5ba3aef363..8bd52c477b 100644
--- a/server/src/main/java/com/vaadin/data/validator/RangeValidator.java
+++ b/server/src/main/java/com/vaadin/data/validator/RangeValidator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -18,7 +18,7 @@ package com.vaadin.data.validator;
/**
* An base implementation for validating any objects that implement
* {@link Comparable}.
- *
+ *
* Verifies that the value is of the given type and within the (optionally)
* given limits. Typically you want to use a sub class of this like
* {@link IntegerRangeValidator}, {@link DoubleRangeValidator} or
@@ -28,7 +28,7 @@ package com.vaadin.data.validator;
* required to ensure that no empty values are accepted or override
* {@link #isValidValue(Comparable)}.
* </p>
- *
+ *
* @param <T>
* The type of Number to validate. Must implement Comparable so that
* minimum and maximum checks work.
@@ -45,7 +45,7 @@ public class RangeValidator<T extends Comparable> extends AbstractValidator<T> {
/**
* Creates a new range validator of the given type.
- *
+ *
* @param errorMessage
* The error message to use if validation fails
* @param type
@@ -65,7 +65,7 @@ public class RangeValidator<T extends Comparable> extends AbstractValidator<T> {
/**
* Checks if the minimum value is part of the accepted range
- *
+ *
* @return true if the minimum value is part of the range, false otherwise
*/
public boolean isMinValueIncluded() {
@@ -74,7 +74,7 @@ public class RangeValidator<T extends Comparable> extends AbstractValidator<T> {
/**
* Sets if the minimum value is part of the accepted range
- *
+ *
* @param minValueIncluded
* true if the minimum value should be part of the range, false
* otherwise
@@ -85,7 +85,7 @@ public class RangeValidator<T extends Comparable> extends AbstractValidator<T> {
/**
* Checks if the maximum value is part of the accepted range
- *
+ *
* @return true if the maximum value is part of the range, false otherwise
*/
public boolean isMaxValueIncluded() {
@@ -94,7 +94,7 @@ public class RangeValidator<T extends Comparable> extends AbstractValidator<T> {
/**
* Sets if the maximum value is part of the accepted range
- *
+ *
* @param maxValueIncluded
* true if the maximum value should be part of the range, false
* otherwise
@@ -105,7 +105,7 @@ public class RangeValidator<T extends Comparable> extends AbstractValidator<T> {
/**
* Gets the minimum value of the range
- *
+ *
* @return the minimum value
*/
public T getMinValue() {
@@ -116,7 +116,7 @@ public class RangeValidator<T extends Comparable> extends AbstractValidator<T> {
* Sets the minimum value of the range. Use
* {@link #setMinValueIncluded(boolean)} to control whether this value is
* part of the range or not.
- *
+ *
* @param minValue
* the minimum value
*/
@@ -126,7 +126,7 @@ public class RangeValidator<T extends Comparable> extends AbstractValidator<T> {
/**
* Gets the maximum value of the range
- *
+ *
* @return the maximum value
*/
public T getMaxValue() {
@@ -137,7 +137,7 @@ public class RangeValidator<T extends Comparable> extends AbstractValidator<T> {
* Sets the maximum value of the range. Use
* {@link #setMaxValueIncluded(boolean)} to control whether this value is
* part of the range or not.
- *
+ *
* @param maxValue
* the maximum value
*/
@@ -147,7 +147,7 @@ public class RangeValidator<T extends Comparable> extends AbstractValidator<T> {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.data.validator.AbstractValidator#isValidValue(java.lang.Object
* )
@@ -186,7 +186,7 @@ public class RangeValidator<T extends Comparable> extends AbstractValidator<T> {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.validator.AbstractValidator#getType()
*/
@Override
diff --git a/server/src/main/java/com/vaadin/data/validator/RegexpValidator.java b/server/src/main/java/com/vaadin/data/validator/RegexpValidator.java
index 74e1f89253..43c8ad49b1 100644
--- a/server/src/main/java/com/vaadin/data/validator/RegexpValidator.java
+++ b/server/src/main/java/com/vaadin/data/validator/RegexpValidator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ import java.util.regex.Pattern;
/**
* String validator comparing the string against a Java regular expression. Both
* complete matches and substring matches are supported.
- *
+ *
* <p>
* For the Java regular expression syntax, see
* {@link java.util.regex.Pattern#sum}
@@ -35,7 +35,7 @@ import java.util.regex.Pattern;
* fields or a separate validator (or override {@link #isValidValue(String)}) to
* fail on empty values.
* </p>
- *
+ *
* @author Vaadin Ltd.
* @since 5.4
*/
@@ -49,7 +49,7 @@ public class RegexpValidator extends AbstractStringValidator {
/**
* Creates a validator for checking that the regular expression matches the
* complete string to validate.
- *
+ *
* @param regexp
* a Java regular expression
* @param errorMessage
@@ -62,7 +62,7 @@ public class RegexpValidator extends AbstractStringValidator {
/**
* Creates a validator for checking that the regular expression matches the
* string to validate.
- *
+ *
* @param regexp
* a Java regular expression
* @param complete
@@ -71,7 +71,8 @@ public class RegexpValidator extends AbstractStringValidator {
* @param errorMessage
* the message to display in case the value does not validate.
*/
- public RegexpValidator(String regexp, boolean complete, String errorMessage) {
+ public RegexpValidator(String regexp, boolean complete,
+ String errorMessage) {
super(errorMessage);
pattern = Pattern.compile(regexp);
this.complete = complete;
@@ -79,7 +80,7 @@ public class RegexpValidator extends AbstractStringValidator {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.data.validator.AbstractValidator#isValidValue(java.lang.Object
* )
@@ -98,7 +99,7 @@ public class RegexpValidator extends AbstractStringValidator {
/**
* Get a new or reused matcher for the pattern
- *
+ *
* @param value
* the string to find matches in
* @return Matcher for the string
diff --git a/server/src/main/java/com/vaadin/data/validator/ShortRangeValidator.java b/server/src/main/java/com/vaadin/data/validator/ShortRangeValidator.java
index a8b0d3aeb4..5027efa2c6 100644
--- a/server/src/main/java/com/vaadin/data/validator/ShortRangeValidator.java
+++ b/server/src/main/java/com/vaadin/data/validator/ShortRangeValidator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -17,7 +17,7 @@ package com.vaadin.data.validator;
/**
* Validator for validating that an {@link Short} is inside a given range.
- *
+ *
* @author Vaadin Ltd.
* @since 7.4
*/
@@ -26,12 +26,12 @@ public class ShortRangeValidator extends RangeValidator<Short> {
/**
* Creates a validator for checking that an Short is within a given range.
- *
+ *
* By default the range is inclusive i.e. both minValue and maxValue are
* valid values. Use {@link #setMinValueIncluded(boolean)} or
* {@link #setMaxValueIncluded(boolean)} to change it.
- *
- *
+ *
+ *
* @param errorMessage
* the message to display in case the value does not validate.
* @param minValue
diff --git a/server/src/main/java/com/vaadin/data/validator/StringLengthValidator.java b/server/src/main/java/com/vaadin/data/validator/StringLengthValidator.java
index efb551c614..c036422476 100644
--- a/server/src/main/java/com/vaadin/data/validator/StringLengthValidator.java
+++ b/server/src/main/java/com/vaadin/data/validator/StringLengthValidator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ package com.vaadin.data.validator;
/**
* This <code>StringLengthValidator</code> is used to validate the length of
* strings.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -34,7 +34,7 @@ public class StringLengthValidator extends AbstractStringValidator {
/**
* Creates a new StringLengthValidator with a given error message.
- *
+ *
* @param errorMessage
* the message to display in case the value does not validate.
*/
@@ -45,7 +45,7 @@ public class StringLengthValidator extends AbstractStringValidator {
/**
* Creates a new StringLengthValidator with a given error message and
* minimum and maximum length limits.
- *
+ *
* @param errorMessage
* the message to display in case the value does not validate.
* @param minLength
@@ -70,7 +70,7 @@ public class StringLengthValidator extends AbstractStringValidator {
/**
* Checks if the given value is valid.
- *
+ *
* @param value
* the value to validate.
* @return <code>true</code> for valid value, otherwise <code>false</code>.
@@ -90,7 +90,7 @@ public class StringLengthValidator extends AbstractStringValidator {
/**
* Returns <code>true</code> if null strings are allowed.
- *
+ *
* @return <code>true</code> if allows null string, otherwise
* <code>false</code>.
*/
@@ -101,7 +101,7 @@ public class StringLengthValidator extends AbstractStringValidator {
/**
* Gets the maximum permissible length of the string.
- *
+ *
* @return the maximum length of the string or null if there is no limit
*/
public Integer getMaxLength() {
@@ -110,7 +110,7 @@ public class StringLengthValidator extends AbstractStringValidator {
/**
* Gets the minimum permissible length of the string.
- *
+ *
* @return the minimum length of the string or null if there is no limit
*/
public Integer getMinLength() {
@@ -128,7 +128,7 @@ public class StringLengthValidator extends AbstractStringValidator {
/**
* Sets the maximum permissible length of the string.
- *
+ *
* @param maxLength
* the maximum length to accept or null for no limit
*/
@@ -138,7 +138,7 @@ public class StringLengthValidator extends AbstractStringValidator {
/**
* Sets the minimum permissible length.
- *
+ *
* @param minLength
* the minimum length to accept or null for no limit
*/
diff --git a/server/src/main/java/com/vaadin/event/Action.java b/server/src/main/java/com/vaadin/event/Action.java
index 1af1de6e6d..95b2a896f1 100644
--- a/server/src/main/java/com/vaadin/event/Action.java
+++ b/server/src/main/java/com/vaadin/event/Action.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.server.Resource;
* Implements the action framework. This class contains subinterfaces for action
* handling and listing, and for action handler registrations and
* unregistration.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -43,7 +43,7 @@ public class Action implements Serializable {
/**
* Constructs a new action with the given caption.
- *
+ *
* @param caption
* the caption for the new action.
*/
@@ -53,7 +53,7 @@ public class Action implements Serializable {
/**
* Constructs a new action with the given caption string and icon.
- *
+ *
* @param caption
* the caption for the new action.
* @param icon
@@ -66,7 +66,7 @@ public class Action implements Serializable {
/**
* Returns the action's caption.
- *
+ *
* @return the action's caption as a <code>String</code>.
*/
public String getCaption() {
@@ -75,7 +75,7 @@ public class Action implements Serializable {
/**
* Returns the action's icon.
- *
+ *
* @return the action's Icon.
*/
public Resource getIcon() {
@@ -87,7 +87,7 @@ public class Action implements Serializable {
* Action.Notifier (or NotifierProxy) via the <code>addAction()</code>
* -method, which in many cases is easier than implementing the
* Action.Handler interface.<br/>
- *
+ *
*/
public interface Listener extends Serializable {
public void handleAction(Object sender, Object target);
@@ -97,7 +97,7 @@ public class Action implements Serializable {
* Action.Containers implementing this support an easier way of adding
* single Actions than the more involved Action.Handler. The added actions
* must be Action.Listeners, thus handling the action themselves.
- *
+ *
*/
public interface Notifier extends Container {
public <T extends Action & Action.Listener> void addAction(T action);
@@ -113,7 +113,7 @@ public class Action implements Serializable {
/**
* Interface implemented by classes who wish to handle actions.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -121,7 +121,7 @@ public class Action implements Serializable {
/**
* Gets the list of actions applicable to this handler.
- *
+ *
* @param target
* the target handler to list actions for. For item
* containers this is the item id.
@@ -135,7 +135,7 @@ public class Action implements Serializable {
/**
* Handles an action for the given target. The handler method may just
* discard the action if it's not suitable.
- *
+ *
* @param action
* the action to be handled.
* @param sender
@@ -154,7 +154,7 @@ public class Action implements Serializable {
* to it. When the component receives an action targeting its contents it
* should loop all action handlers registered to it and let them handle the
* action.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -162,7 +162,7 @@ public class Action implements Serializable {
/**
* Registers a new action handler for this container
- *
+ *
* @param actionHandler
* the new handler to be added.
*/
@@ -171,7 +171,7 @@ public class Action implements Serializable {
/**
* Removes a previously registered action handler for the contents of
* this container.
- *
+ *
* @param actionHandler
* the handler to be removed.
*/
@@ -180,7 +180,7 @@ public class Action implements Serializable {
/**
* Sets the caption.
- *
+ *
* @param caption
* the caption to set.
*/
@@ -190,7 +190,7 @@ public class Action implements Serializable {
/**
* Sets the icon.
- *
+ *
* @param icon
* the icon to set.
*/
diff --git a/server/src/main/java/com/vaadin/event/ActionManager.java b/server/src/main/java/com/vaadin/event/ActionManager.java
index 6eb698d08a..85355cb653 100644
--- a/server/src/main/java/com/vaadin/event/ActionManager.java
+++ b/server/src/main/java/com/vaadin/event/ActionManager.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,18 +29,18 @@ import com.vaadin.ui.Component;
/**
* Javadoc TODO
- *
+ *
* Notes:
* <p>
* Empties the keymapper for each repaint to avoid leaks; can cause problems in
* the future if the client assumes key don't change. (if lazyloading, one must
* not cache results)
* </p>
- *
- *
+ *
+ *
*/
-public class ActionManager implements Action.Container, Action.Handler,
- Action.Notifier {
+public class ActionManager
+ implements Action.Container, Action.Handler, Action.Notifier {
private static final long serialVersionUID = 1641868163608066491L;
@@ -227,8 +227,8 @@ public class ActionManager implements Action.Container, Action.Handler,
@Override
public void handleAction(Action action, Object sender, Object target) {
if (actionHandlers != null) {
- Handler[] array = actionHandlers.toArray(new Handler[actionHandlers
- .size()]);
+ Handler[] array = actionHandlers
+ .toArray(new Handler[actionHandlers.size()]);
for (Handler handler : array) {
handler.handleAction(action, sender, target);
}
diff --git a/server/src/main/java/com/vaadin/event/ConnectorActionManager.java b/server/src/main/java/com/vaadin/event/ConnectorActionManager.java
index 0816ba48df..8bed286d24 100644
--- a/server/src/main/java/com/vaadin/event/ConnectorActionManager.java
+++ b/server/src/main/java/com/vaadin/event/ConnectorActionManager.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ import com.vaadin.ui.Component;
* <p>
* This is mostly a workaround until shortcut actions are re-implemented in a
* more sensible way.
- *
+ *
* @since 7.1.8
* @author Vaadin Ltd
*/
@@ -39,7 +39,7 @@ public class ConnectorActionManager extends ActionManager {
/**
* Initialize an action manager for the given connector.
- *
+ *
* @param connector
* the owner of this action manager
*/
@@ -51,7 +51,7 @@ public class ConnectorActionManager extends ActionManager {
/**
* Initialize an action manager for the given connector using the given
* viewer.
- *
+ *
* @param connector
* the owner of this action manager
* @param viewer
@@ -65,16 +65,15 @@ public class ConnectorActionManager extends ActionManager {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.event.ActionManager#handleAction(com.vaadin.event.Action,
* java.lang.Object, java.lang.Object)
*/
@Override
public void handleAction(Action action, Object sender, Object target) {
if (!connector.isConnectorEnabled()) {
- getLogger().warning(
- ServerRpcHandler.getIgnoredDisabledError("action",
- connector));
+ getLogger().warning(ServerRpcHandler
+ .getIgnoredDisabledError("action", connector));
return;
}
diff --git a/server/src/main/java/com/vaadin/event/ConnectorEvent.java b/server/src/main/java/com/vaadin/event/ConnectorEvent.java
index 3dc73b864a..5c27bc7517 100644
--- a/server/src/main/java/com/vaadin/event/ConnectorEvent.java
+++ b/server/src/main/java/com/vaadin/event/ConnectorEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/main/java/com/vaadin/event/ConnectorEventListener.java b/server/src/main/java/com/vaadin/event/ConnectorEventListener.java
index e3cb9c283b..06e99fc204 100644
--- a/server/src/main/java/com/vaadin/event/ConnectorEventListener.java
+++ b/server/src/main/java/com/vaadin/event/ConnectorEventListener.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/main/java/com/vaadin/event/ContextClickEvent.java b/server/src/main/java/com/vaadin/event/ContextClickEvent.java
index 5b15634105..4b88aad50e 100644
--- a/server/src/main/java/com/vaadin/event/ContextClickEvent.java
+++ b/server/src/main/java/com/vaadin/event/ContextClickEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,15 +26,15 @@ import com.vaadin.util.ReflectTools;
/**
* Context click event fired by a {@link Component}. ContextClickEvent happens
* when context click happens on the client-side inside the Component.
- *
+ *
* @since 7.6
* @author Vaadin Ltd
*/
public class ContextClickEvent extends ClickEvent {
- public static final Method CONTEXT_CLICK_METHOD = ReflectTools
- .findMethod(ContextClickListener.class, "contextClick",
- ContextClickEvent.class);
+ public static final Method CONTEXT_CLICK_METHOD = ReflectTools.findMethod(
+ ContextClickListener.class, "contextClick",
+ ContextClickEvent.class);
public ContextClickEvent(Component source,
MouseEventDetails mouseEventDetails) {
@@ -48,7 +48,7 @@ public class ContextClickEvent extends ClickEvent {
/**
* Called when the context click happens.
- *
+ *
* @param event
* the context click event
*/
@@ -63,7 +63,7 @@ public class ContextClickEvent extends ClickEvent {
/**
* Adds a context click listener that gets notified when a context click
* happens.
- *
+ *
* @param listener
* the context click listener to add
*/
@@ -72,7 +72,7 @@ public class ContextClickEvent extends ClickEvent {
/**
* Removes a context click listener that was previously added with
* {@link #addContextClickListener(ContextClickListener)}.
- *
+ *
* @param listener
* the context click listener to remove
*/
diff --git a/server/src/main/java/com/vaadin/event/DataBoundTransferable.java b/server/src/main/java/com/vaadin/event/DataBoundTransferable.java
index d461692b2e..c11c38a381 100644
--- a/server/src/main/java/com/vaadin/event/DataBoundTransferable.java
+++ b/server/src/main/java/com/vaadin/event/DataBoundTransferable.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,13 +25,13 @@ import com.vaadin.ui.Component;
* container as a data source. The transfer is associated with an item
* (identified by its Id) and optionally also a property identifier (e.g. a
* table column identifier when transferring a single table cell).
- *
+ *
* The component must implement the interface
* {@link com.vaadin.data.Container.Viewer}.
- *
+ *
* In most cases, receivers of data transfers should depend on this class
* instead of its concrete subclasses.
- *
+ *
* @since 6.3
*/
public abstract class DataBoundTransferable extends TransferableImpl {
@@ -43,26 +43,26 @@ public abstract class DataBoundTransferable extends TransferableImpl {
/**
* Returns the identifier of the item being transferred.
- *
+ *
* @return item identifier
*/
public abstract Object getItemId();
/**
* Returns the optional property identifier that the transfer concerns.
- *
+ *
* This can be e.g. the table column from which a drag operation originated.
- *
+ *
* @return property identifier
*/
public abstract Object getPropertyId();
/**
* Returns the container data source from which the transfer occurs.
- *
+ *
* {@link com.vaadin.data.Container.Viewer#getContainerDataSource()} is used
* to obtain the underlying container of the source component.
- *
+ *
* @return Container
*/
public Container getSourceContainer() {
diff --git a/server/src/main/java/com/vaadin/event/EventRouter.java b/server/src/main/java/com/vaadin/event/EventRouter.java
index b662dfcb36..2ca65a61ec 100644
--- a/server/src/main/java/com/vaadin/event/EventRouter.java
+++ b/server/src/main/java/com/vaadin/event/EventRouter.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,7 +32,7 @@ import com.vaadin.server.ErrorHandler;
* <code>EventRouter</code> class implementing the inheritable event listening
* model. For more information on the event model see the
* {@link com.vaadin.event package documentation}.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -63,7 +63,8 @@ public class EventRouter implements MethodEventSource {
* here, we use the default documentation from implemented interface.
*/
@Override
- public void addListener(Class<?> eventType, Object object, String methodName) {
+ public void addListener(Class<?> eventType, Object object,
+ String methodName) {
if (listenerList == null) {
listenerList = new LinkedHashSet<ListenerMethod>();
}
@@ -95,7 +96,8 @@ public class EventRouter implements MethodEventSource {
* implemented interface.
*/
@Override
- public void removeListener(Class<?> eventType, Object target, Method method) {
+ public void removeListener(Class<?> eventType, Object target,
+ Method method) {
if (listenerList != null) {
final Iterator<ListenerMethod> i = listenerList.iterator();
while (i.hasNext()) {
@@ -153,7 +155,7 @@ public class EventRouter implements MethodEventSource {
/**
* Sends an event to all registered listeners. The listeners will decide if
* the activation method should be called or not.
- *
+ *
* @param event
* the Event to be sent to all listeners.
*/
@@ -168,7 +170,7 @@ public class EventRouter implements MethodEventSource {
* If an error handler is set, the processing of other listeners will
* continue after the error handler method call unless the error handler
* itself throws an exception.
- *
+ *
* @param event
* the Event to be sent to all listeners.
* @param errorHandler
@@ -205,7 +207,7 @@ public class EventRouter implements MethodEventSource {
/**
* Checks if the given Event type is listened by a listener registered to
* this router.
- *
+ *
* @param eventType
* the event type to be checked
* @return true if a listener is registered for the given event type
@@ -223,7 +225,7 @@ public class EventRouter implements MethodEventSource {
/**
* Returns all listeners that match or extend the given event type.
- *
+ *
* @param eventType
* The type of event to return listeners for.
* @return A collection with all registered listeners. Empty if no listeners
diff --git a/server/src/main/java/com/vaadin/event/FieldEvents.java b/server/src/main/java/com/vaadin/event/FieldEvents.java
index 364ac76ffd..cebd8ba077 100644
--- a/server/src/main/java/com/vaadin/event/FieldEvents.java
+++ b/server/src/main/java/com/vaadin/event/FieldEvents.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -45,7 +45,7 @@ public interface FieldEvents {
* class really will send the events, or if it just defines the methods to
* be able to implement an interface.
* </p>
- *
+ *
* @since 6.2
* @see FocusListener
* @see FocusEvent
@@ -54,7 +54,7 @@ public interface FieldEvents {
/**
* Adds a <code>FocusListener</code> to the Component which gets fired
* when a <code>Field</code> receives keyboard focus.
- *
+ *
* @param listener
* @see FocusListener
* @since 6.2
@@ -70,7 +70,7 @@ public interface FieldEvents {
/**
* Removes a <code>FocusListener</code> from the Component.
- *
+ *
* @param listener
* @see FocusListener
* @since 6.2
@@ -97,7 +97,7 @@ public interface FieldEvents {
* class really will send the events, or if it just defines the methods to
* be able to implement an interface.
* </p>
- *
+ *
* @since 6.2
* @see BlurListener
* @see BlurEvent
@@ -106,7 +106,7 @@ public interface FieldEvents {
/**
* Adds a <code>BlurListener</code> to the Component which gets fired
* when a <code>Field</code> loses keyboard focus.
- *
+ *
* @param listener
* @see BlurListener
* @since 6.2
@@ -122,7 +122,7 @@ public interface FieldEvents {
/**
* Removes a <code>BlurListener</code> from the Component.
- *
+ *
* @param listener
* @see BlurListener
* @since 6.2
@@ -140,7 +140,7 @@ public interface FieldEvents {
/**
* <code>FocusEvent</code> class for holding additional event information.
* Fired when a <code>Field</code> receives keyboard focus.
- *
+ *
* @since 6.2
*/
@SuppressWarnings("serial")
@@ -159,18 +159,18 @@ public interface FieldEvents {
/**
* <code>FocusListener</code> interface for listening for
* <code>FocusEvent</code> fired by a <code>Field</code>.
- *
+ *
* @see FocusEvent
* @since 6.2
*/
public interface FocusListener extends ConnectorEventListener {
- public static final Method focusMethod = ReflectTools.findMethod(
- FocusListener.class, "focus", FocusEvent.class);
+ public static final Method focusMethod = ReflectTools
+ .findMethod(FocusListener.class, "focus", FocusEvent.class);
/**
* Component has been focused
- *
+ *
* @param event
* Component focus event.
*/
@@ -180,7 +180,7 @@ public interface FieldEvents {
/**
* <code>BlurEvent</code> class for holding additional event information.
* Fired when a <code>Field</code> loses keyboard focus.
- *
+ *
* @since 6.2
*/
@SuppressWarnings("serial")
@@ -199,18 +199,18 @@ public interface FieldEvents {
/**
* <code>BlurListener</code> interface for listening for
* <code>BlurEvent</code> fired by a <code>Field</code>.
- *
+ *
* @see BlurEvent
* @since 6.2
*/
public interface BlurListener extends ConnectorEventListener {
- public static final Method blurMethod = ReflectTools.findMethod(
- BlurListener.class, "blur", BlurEvent.class);
+ public static final Method blurMethod = ReflectTools
+ .findMethod(BlurListener.class, "blur", BlurEvent.class);
/**
* Component has been blurred
- *
+ *
* @param event
* Component blur event.
*/
@@ -236,7 +236,7 @@ public interface FieldEvents {
* example on each key press, but buffered with a small delay. The
* {@link TextField} component supports different modes for triggering
* TextChangeEvents.
- *
+ *
* @see TextChangeListener
* @see TextChangeNotifier
* @see TextField#setTextChangeEventMode(com.vaadin.ui.TextField.TextChangeEventMode)
@@ -262,7 +262,7 @@ public interface FieldEvents {
/**
* A listener for {@link TextChangeEvent}s.
- *
+ *
* @since 6.5
*/
public interface TextChangeListener extends ConnectorEventListener {
@@ -273,7 +273,7 @@ public interface FieldEvents {
/**
* This method is called repeatedly while the text is edited by a user.
- *
+ *
* @param event
* the event providing details of the text change
*/
@@ -305,8 +305,8 @@ public interface FieldEvents {
public void removeListener(TextChangeListener listener);
}
- public static abstract class FocusAndBlurServerRpcImpl implements
- FocusAndBlurServerRpc {
+ public static abstract class FocusAndBlurServerRpcImpl
+ implements FocusAndBlurServerRpc {
private Component component;
diff --git a/server/src/main/java/com/vaadin/event/ItemClickEvent.java b/server/src/main/java/com/vaadin/event/ItemClickEvent.java
index 1280c16872..ebcae610f3 100644
--- a/server/src/main/java/com/vaadin/event/ItemClickEvent.java
+++ b/server/src/main/java/com/vaadin/event/ItemClickEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,14 +25,14 @@ import com.vaadin.shared.MouseEventDetails;
import com.vaadin.ui.Component;
/**
- *
+ *
* Click event fired by a {@link Component} implementing
* {@link com.vaadin.data.Container} interface. ItemClickEvents happens on an
* {@link Item} rendered somehow on terminal. Event may also contain a specific
* {@link Property} on which the click event happened.
- *
+ *
* @since 5.3
- *
+ *
*/
@SuppressWarnings("serial")
public class ItemClickEvent extends ClickEvent implements Serializable {
@@ -50,7 +50,7 @@ public class ItemClickEvent extends ClickEvent implements Serializable {
/**
* Gets the item on which the click event occurred.
- *
+ *
* @return item which was clicked
*/
public Item getItem() {
@@ -59,7 +59,7 @@ public class ItemClickEvent extends ClickEvent implements Serializable {
/**
* Gets a possible identifier in source for clicked Item
- *
+ *
* @return
*/
public Object getItemId() {
@@ -70,7 +70,7 @@ public class ItemClickEvent extends ClickEvent implements Serializable {
* Returns property on which click event occurred. Returns null if source
* cannot be resolved at property level. For example if clicked a cell in
* table, the "column id" is returned.
- *
+ *
* @return a property id of clicked property or null if click didn't occur
* on any distinct property.
*/
@@ -107,7 +107,7 @@ public class ItemClickEvent extends ClickEvent implements Serializable {
* class really will send the events, or if it just defines the methods to
* be able to implement an interface.
* </p>
- *
+ *
* @since 6.5
* @see ItemClickListener
* @see ItemClickEvent
@@ -115,7 +115,7 @@ public class ItemClickEvent extends ClickEvent implements Serializable {
public interface ItemClickNotifier extends Serializable {
/**
* Register a listener to handle {@link ItemClickEvent}s.
- *
+ *
* @param listener
* ItemClickListener to be registered
*/
@@ -130,7 +130,7 @@ public class ItemClickEvent extends ClickEvent implements Serializable {
/**
* Removes an ItemClickListener.
- *
+ *
* @param listener
* ItemClickListener to be removed
*/
diff --git a/server/src/main/java/com/vaadin/event/LayoutEvents.java b/server/src/main/java/com/vaadin/event/LayoutEvents.java
index e4432b7c7a..d3894ad617 100644
--- a/server/src/main/java/com/vaadin/event/LayoutEvents.java
+++ b/server/src/main/java/com/vaadin/event/LayoutEvents.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -35,7 +35,7 @@ public interface LayoutEvents {
/**
* Layout has been clicked
- *
+ *
* @param event
* Component click event.
*/
@@ -56,7 +56,7 @@ public interface LayoutEvents {
* class really will send the events, or if it just defines the methods to
* be able to implement an interface.
* </p>
- *
+ *
* @since 6.5.2
* @see LayoutClickListener
* @see LayoutClickEvent
@@ -68,13 +68,13 @@ public interface LayoutEvents {
* the click targets a component inside a nested layout or Panel,
* provided the targeted component does not prevent the click event from
* propagating. A caption is not considered part of a component.
- *
+ *
* The child component that was clicked is included in the
* {@link LayoutClickEvent}.
- *
+ *
* Use {@link #removeListener(LayoutClickListener)} to remove the
* listener.
- *
+ *
* @param listener
* The listener to add
*/
@@ -89,7 +89,7 @@ public interface LayoutEvents {
/**
* Removes an LayoutClickListener.
- *
+ *
* @param listener
* LayoutClickListener to be removed
*/
@@ -114,8 +114,8 @@ public interface LayoutEvents {
private final Component childComponent;
public LayoutClickEvent(Component source,
- MouseEventDetails mouseEventDetails,
- Component clickedComponent, Component childComponent) {
+ MouseEventDetails mouseEventDetails, Component clickedComponent,
+ Component childComponent) {
super(source, mouseEventDetails);
this.clickedComponent = clickedComponent;
this.childComponent = childComponent;
@@ -124,10 +124,10 @@ public interface LayoutEvents {
/**
* Returns the component that was clicked, which is somewhere inside the
* parent layout on which the listener was registered.
- *
+ *
* For the direct child component of the layout, see
* {@link #getChildComponent()}.
- *
+ *
* @return clicked {@link Component}, null if none found
*/
public Component getClickedComponent() {
@@ -137,10 +137,10 @@ public interface LayoutEvents {
/**
* Returns the direct child component of the layout which contains the
* clicked component.
- *
+ *
* For the clicked component inside that child component of the layout,
* see {@link #getClickedComponent()}.
- *
+ *
* @return direct child {@link Component} of the layout which contains
* the clicked Component, null if none found
*/
diff --git a/server/src/main/java/com/vaadin/event/ListenerMethod.java b/server/src/main/java/com/vaadin/event/ListenerMethod.java
index 3311ed705e..478690b652 100644
--- a/server/src/main/java/com/vaadin/event/ListenerMethod.java
+++ b/server/src/main/java/com/vaadin/event/ListenerMethod.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -33,20 +33,20 @@ import java.util.logging.Logger;
* fires, and the optional argument list to pass to the method and the index of
* the argument to replace with the event object.
* </p>
- *
+ *
* <p>
* This Class provides several constructors that allow omission of the optional
* arguments, and giving the listener method directly, or having the constructor
* to reflect it using merely the name of the method.
* </p>
- *
+ *
* <p>
* It should be pointed out that the method
* {@link #receiveEvent(EventObject event)} is the one that filters out the
* events that do not match with the given event type and thus do not result in
* calling of the trigger method.
* </p>
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -83,7 +83,8 @@ public class ListenerMethod implements EventListener, Serializable {
private int eventArgumentIndex;
/* Special serialization to handle method references */
- private void writeObject(java.io.ObjectOutputStream out) throws IOException {
+ private void writeObject(java.io.ObjectOutputStream out)
+ throws IOException {
try {
out.defaultWriteObject();
String name = method.getName();
@@ -91,18 +92,17 @@ public class ListenerMethod implements EventListener, Serializable {
out.writeObject(name);
out.writeObject(paramTypes);
} catch (NotSerializableException e) {
- getLogger()
- .log(Level.WARNING,
- "Error in serialization of the application: Class {0} must implement serialization.",
- target.getClass().getName());
+ getLogger().log(Level.WARNING,
+ "Error in serialization of the application: Class {0} must implement serialization.",
+ target.getClass().getName());
throw e;
}
}
/* Special serialization to handle method references */
- private void readObject(java.io.ObjectInputStream in) throws IOException,
- ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in)
+ throws IOException, ClassNotFoundException {
in.defaultReadObject();
try {
String name = (String) in.readObject();
@@ -126,8 +126,8 @@ public class ListenerMethod implements EventListener, Serializable {
}
}
if (cls.getSuperclass() != null) {
- Method parentMethod = findHighestMethod(cls.getSuperclass(),
- method, paramTypes);
+ Method parentMethod = findHighestMethod(cls.getSuperclass(), method,
+ paramTypes);
if (parentMethod != null) {
return parentMethod;
}
@@ -148,12 +148,12 @@ public class ListenerMethod implements EventListener, Serializable {
* the argument index specifying which one is replaced with the event object
* when the trigger method is called.
* </p>
- *
+ *
* <p>
* This constructor gets the trigger method as a parameter so it does not
* need to reflect to find it out.
* </p>
- *
+ *
* @param eventType
* the event type that is listener listens to. All events of this
* kind (or its subclasses) result in calling the trigger method.
@@ -180,26 +180,26 @@ public class ListenerMethod implements EventListener, Serializable {
// Checks that the object is of correct type
if (!method.getDeclaringClass().isAssignableFrom(target.getClass())) {
- throw new java.lang.IllegalArgumentException("The method "
- + method.getName()
- + " cannot be used for the given target: "
- + target.getClass().getName());
+ throw new java.lang.IllegalArgumentException(
+ "The method " + method.getName()
+ + " cannot be used for the given target: "
+ + target.getClass().getName());
}
// Checks that the event argument is null
if (eventArgumentIndex >= 0 && arguments[eventArgumentIndex] != null) {
- throw new java.lang.IllegalArgumentException("argument["
- + eventArgumentIndex + "] must be null");
+ throw new java.lang.IllegalArgumentException(
+ "argument[" + eventArgumentIndex + "] must be null");
}
// Checks the event type is supported by the method
if (eventArgumentIndex >= 0
&& !method.getParameterTypes()[eventArgumentIndex]
.isAssignableFrom(eventType)) {
- throw new java.lang.IllegalArgumentException("The method "
- + method.getName()
- + " does not accept the given eventType: "
- + eventType.getName());
+ throw new java.lang.IllegalArgumentException(
+ "The method " + method.getName()
+ + " does not accept the given eventType: "
+ + eventType.getName());
}
this.eventType = eventType;
@@ -217,7 +217,7 @@ public class ListenerMethod implements EventListener, Serializable {
* <code>object</code>, and <code>java.lang.IllegalArgumentException</code>
* is thrown unless exactly one match is found.
* </p>
- *
+ *
* @param eventType
* the event type that is listener listens to. All events of this
* kind (or its subclasses) result in calling the trigger method.
@@ -259,18 +259,18 @@ public class ListenerMethod implements EventListener, Serializable {
// Checks that the event argument is null
if (eventArgumentIndex >= 0 && arguments[eventArgumentIndex] != null) {
- throw new java.lang.IllegalArgumentException("argument["
- + eventArgumentIndex + "] must be null");
+ throw new java.lang.IllegalArgumentException(
+ "argument[" + eventArgumentIndex + "] must be null");
}
// Checks the event type is supported by the method
if (eventArgumentIndex >= 0
&& !method.getParameterTypes()[eventArgumentIndex]
.isAssignableFrom(eventType)) {
- throw new java.lang.IllegalArgumentException("The method "
- + method.getName()
- + " does not accept the given eventType: "
- + eventType.getName());
+ throw new java.lang.IllegalArgumentException(
+ "The method " + method.getName()
+ + " does not accept the given eventType: "
+ + eventType.getName());
}
this.eventType = eventType;
@@ -287,12 +287,12 @@ public class ListenerMethod implements EventListener, Serializable {
* the event triggering this listener will not be passed to the trigger
* method.
* </p>
- *
+ *
* <p>
* This constructor gets the trigger method as a parameter so it does not
* need to reflect to find it out.
* </p>
- *
+ *
* @param eventType
* the event type that is listener listens to. All events of this
* kind (or its subclasses) result in calling the trigger method.
@@ -311,10 +311,10 @@ public class ListenerMethod implements EventListener, Serializable {
// Check that the object is of correct type
if (!method.getDeclaringClass().isAssignableFrom(target.getClass())) {
- throw new java.lang.IllegalArgumentException("The method "
- + method.getName()
- + " cannot be used for the given target: "
- + target.getClass().getName());
+ throw new java.lang.IllegalArgumentException(
+ "The method " + method.getName()
+ + " cannot be used for the given target: "
+ + target.getClass().getName());
}
this.eventType = eventType;
@@ -331,13 +331,13 @@ public class ListenerMethod implements EventListener, Serializable {
* the event triggering this listener will not be passed to the trigger
* method.
* </p>
- *
+ *
* <p>
* The actual trigger method is reflected from <code>target</code>, and
* <code>java.lang.IllegalArgumentException</code> is thrown unless exactly
* one match is found.
* </p>
- *
+ *
* @param eventType
* the event type that is listener listens to. All events of this
* kind (or its subclasses) result in calling the trigger method.
@@ -382,12 +382,12 @@ public class ListenerMethod implements EventListener, Serializable {
* list is unspecified no parameters are passed to the trigger method when
* the listener is triggered.
* </p>
- *
+ *
* <p>
* This constructor gets the trigger method as a parameter so it does not
* need to reflect to find it out.
* </p>
- *
+ *
* @param eventType
* the event type that is listener listens to. All events of this
* kind (or its subclasses) result in calling the trigger method.
@@ -404,10 +404,10 @@ public class ListenerMethod implements EventListener, Serializable {
// Checks that the object is of correct type
if (!method.getDeclaringClass().isAssignableFrom(target.getClass())) {
- throw new java.lang.IllegalArgumentException("The method "
- + method.getName()
- + " cannot be used for the given target: "
- + target.getClass().getName());
+ throw new java.lang.IllegalArgumentException(
+ "The method " + method.getName()
+ + " cannot be used for the given target: "
+ + target.getClass().getName());
}
this.eventType = eventType;
@@ -419,7 +419,8 @@ public class ListenerMethod implements EventListener, Serializable {
if (params.length == 0) {
arguments = new Object[0];
- } else if (params.length == 1 && params[0].isAssignableFrom(eventType)) {
+ } else if (params.length == 1
+ && params[0].isAssignableFrom(eventType)) {
arguments = new Object[] { null };
eventArgumentIndex = 0;
} else {
@@ -434,13 +435,13 @@ public class ListenerMethod implements EventListener, Serializable {
* argument list is unspecified no parameters are passed to the trigger
* method when the listener is triggered.
* </p>
- *
+ *
* <p>
* The actual trigger method is reflected from <code>object</code>, and
* <code>java.lang.IllegalArgumentException</code> is thrown unless exactly
* one match is found.
* </p>
- *
+ *
* @param eventType
* the event type that is listener listens to. All events of this
* kind (or its subclasses) result in calling the trigger method.
@@ -479,7 +480,8 @@ public class ListenerMethod implements EventListener, Serializable {
if (params.length == 0) {
arguments = new Object[0];
- } else if (params.length == 1 && params[0].isAssignableFrom(eventType)) {
+ } else if (params.length == 1
+ && params[0].isAssignableFrom(eventType)) {
arguments = new Object[] { null };
eventArgumentIndex = 0;
} else {
@@ -493,7 +495,7 @@ public class ListenerMethod implements EventListener, Serializable {
* trigger method if it matches with the criteria defined for the listener.
* Only the events of the same or subclass of the specified event class
* result in the trigger method to be called.
- *
+ *
* @param event
* the fired event. Unless the trigger method's argument list and
* the index to the to be replaced argument is specified, this
@@ -525,9 +527,9 @@ public class ListenerMethod implements EventListener, Serializable {
} catch (final java.lang.reflect.InvocationTargetException e) {
// An exception was thrown by the invocation target. Throw it
// forwards.
- throw new MethodException("Invocation of method "
- + method.getName() + " in "
- + target.getClass().getName() + " failed.",
+ throw new MethodException(
+ "Invocation of method " + method.getName() + " in "
+ + target.getClass().getName() + " failed.",
e.getTargetException());
}
}
@@ -536,7 +538,7 @@ public class ListenerMethod implements EventListener, Serializable {
/**
* Checks if the given object and event match with the ones stored in this
* listener.
- *
+ *
* @param target
* the object to be matched against the object stored by this
* listener.
@@ -554,7 +556,7 @@ public class ListenerMethod implements EventListener, Serializable {
/**
* Checks if the given object, event and method match with the ones stored
* in this listener.
- *
+ *
* @param target
* the object to be matched against the object stored by this
* listener.
@@ -570,9 +572,8 @@ public class ListenerMethod implements EventListener, Serializable {
* equals with the method stored in this object
*/
public boolean matches(Class<?> eventType, Object target, Method method) {
- return (this.target == target)
- && (eventType.equals(this.eventType) && method
- .equals(this.method));
+ return (this.target == target) && (eventType.equals(this.eventType)
+ && method.equals(this.method));
}
@Override
@@ -603,14 +604,14 @@ public class ListenerMethod implements EventListener, Serializable {
ListenerMethod t = (ListenerMethod) obj;
return eventArgumentIndex == t.eventArgumentIndex
- && (eventType == t.eventType || (eventType != null && eventType
- .equals(t.eventType)))
- && (target == t.target || (target != null && target
- .equals(t.target)))
- && (method == t.method || (method != null && method
- .equals(t.method)))
- && (arguments == t.arguments || (Arrays.equals(arguments,
- t.arguments)));
+ && (eventType == t.eventType
+ || (eventType != null && eventType.equals(t.eventType)))
+ && (target == t.target
+ || (target != null && target.equals(t.target)))
+ && (method == t.method
+ || (method != null && method.equals(t.method)))
+ && (arguments == t.arguments
+ || (Arrays.equals(arguments, t.arguments)));
}
/**
@@ -618,12 +619,12 @@ public class ListenerMethod implements EventListener, Serializable {
* <code>ListenerMethod</code> invokes the target method, it may throw
* arbitrary exception. The original exception is wrapped into
* MethodException instance and rethrown by the <code>ListenerMethod</code>.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
- public class MethodException extends RuntimeException implements
- Serializable {
+ public class MethodException extends RuntimeException
+ implements Serializable {
private MethodException(String message, Throwable cause) {
super(message, cause);
@@ -633,7 +634,7 @@ public class ListenerMethod implements EventListener, Serializable {
/**
* Compares the type of this ListenerMethod to the given type
- *
+ *
* @param eventType
* The type to compare with
* @return true if this type of this ListenerMethod matches the given type,
@@ -645,7 +646,7 @@ public class ListenerMethod implements EventListener, Serializable {
/**
* Compares the type of this ListenerMethod to the given type
- *
+ *
* @param eventType
* The type to compare with
* @return true if this event type can be assigned to the given type, false
@@ -657,7 +658,7 @@ public class ListenerMethod implements EventListener, Serializable {
/**
* Returns the target object which contains the trigger method.
- *
+ *
* @return The target object
*/
public Object getTarget() {
diff --git a/server/src/main/java/com/vaadin/event/MethodEventSource.java b/server/src/main/java/com/vaadin/event/MethodEventSource.java
index ddfc87ca8c..b1aaa29670 100644
--- a/server/src/main/java/com/vaadin/event/MethodEventSource.java
+++ b/server/src/main/java/com/vaadin/event/MethodEventSource.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,12 +23,12 @@ import java.lang.reflect.Method;
* <p>
* Interface for classes supporting registration of methods as event receivers.
* </p>
- *
+ *
* <p>
* For more information on the inheritable event mechanism see the
* {@link com.vaadin.event com.vaadin.event package documentation}.
* </p>
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -41,12 +41,12 @@ public interface MethodEventSource extends Serializable {
* not have any arguments the event object will not be passed to it when
* it's called.
* </p>
- *
+ *
* <p>
* For more information on the inheritable event mechanism see the
* {@link com.vaadin.event com.vaadin.event package documentation}.
* </p>
- *
+ *
* @param eventType
* the type of the listened event. Events of this type or its
* subclasses activate the listener.
@@ -67,19 +67,19 @@ public interface MethodEventSource extends Serializable {
* have any arguments the event object will not be passed to it when it's
* called.
* </p>
- *
+ *
* <p>
* This version of <code>addListener</code> gets the name of the activation
* method as a parameter. The actual method is reflected from
* <code>object</code>, and unless exactly one match is found,
* <code>java.lang.IllegalArgumentException</code> is thrown.
* </p>
- *
+ *
* <p>
* For more information on the inheritable event mechanism see the
* {@link com.vaadin.event com.vaadin.event package documentation}.
* </p>
- *
+ *
* @param eventType
* the type of the listened event. Events of this type or its
* subclasses activate the listener.
@@ -91,7 +91,8 @@ public interface MethodEventSource extends Serializable {
* unless <code>method</code> has exactly one match in
* <code>object</code>
*/
- public void addListener(Class<?> eventType, Object object, String methodName);
+ public void addListener(Class<?> eventType, Object object,
+ String methodName);
/**
* Removes all registered listeners matching the given parameters. Since
@@ -99,12 +100,12 @@ public interface MethodEventSource extends Serializable {
* parameters, it will unregister all <code>object</code>'s methods that are
* registered to listen to events of type <code>eventType</code> generated
* by this component.
- *
+ *
* <p>
* For more information on the inheritable event mechanism see the
* {@link com.vaadin.event com.vaadin.event package documentation}.
* </p>
- *
+ *
* @param eventType
* the exact event type the <code>object</code> listens to.
* @param target
@@ -117,12 +118,12 @@ public interface MethodEventSource extends Serializable {
* Removes one registered listener method. The given method owned by the
* given object will no longer be called when the specified events are
* generated by this component.
- *
+ *
* <p>
* For more information on the inheritable event mechanism see the
* {@link com.vaadin.event com.vaadin.event package documentation}.
* </p>
- *
+ *
* @param eventType
* the exact event type the <code>object</code> listens to.
* @param target
@@ -132,7 +133,8 @@ public interface MethodEventSource extends Serializable {
* the method owned by the target that's registered to listen to
* events of type eventType.
*/
- public void removeListener(Class<?> eventType, Object target, Method method);
+ public void removeListener(Class<?> eventType, Object target,
+ Method method);
/**
* <p>
@@ -140,19 +142,19 @@ public interface MethodEventSource extends Serializable {
* given object will no longer be called when the specified events are
* generated by this component.
* </p>
- *
+ *
* <p>
* This version of <code>removeListener</code> gets the name of the
* activation method as a parameter. The actual method is reflected from the
* target, and unless exactly one match is found,
* <code>java.lang.IllegalArgumentException</code> is thrown.
* </p>
- *
+ *
* <p>
* For more information on the inheritable event mechanism see the
* {@link com.vaadin.event com.vaadin.event package documentation}.
* </p>
- *
+ *
* @param eventType
* the exact event type the <code>object</code> listens to.
* @param target
diff --git a/server/src/main/java/com/vaadin/event/MouseEvents.java b/server/src/main/java/com/vaadin/event/MouseEvents.java
index b32ce06587..49bbc0d9d8 100644
--- a/server/src/main/java/com/vaadin/event/MouseEvents.java
+++ b/server/src/main/java/com/vaadin/event/MouseEvents.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.util.ReflectTools;
/**
* Interface that serves as a wrapper for mouse related events.
- *
+ *
* @author Vaadin Ltd.
* @see ClickListener
* @since 6.2
@@ -36,10 +36,10 @@ public interface MouseEvents {
* Class for holding information about a mouse click event. A
* {@link ClickEvent} is fired when the user clicks on a
* <code>Component</code>.
- *
+ *
* The information available for click events are terminal dependent.
* Correct values for all event details cannot be guaranteed.
- *
+ *
* @author Vaadin Ltd.
* @see ClickListener
* @since 6.2
@@ -62,7 +62,8 @@ public interface MouseEvents {
public static final MouseButton BUTTON_RIGHT = MouseButton.RIGHT;
private MouseEventDetails details;
- public ClickEvent(Component source, MouseEventDetails mouseEventDetails) {
+ public ClickEvent(Component source,
+ MouseEventDetails mouseEventDetails) {
super(source);
details = mouseEventDetails;
}
@@ -71,7 +72,7 @@ public interface MouseEvents {
* Returns an identifier describing which mouse button the user pushed.
* Compare with {@link MouseButton#LEFT},{@link MouseButton#MIDDLE},
* {@link Button#RIGHT} to find out which button it is.
- *
+ *
* @return one of {@link MouseButton#LEFT}, {@link MouseButton#MIDDLE},
* {@link MouseButton#RIGHT}.
*/
@@ -82,7 +83,7 @@ public interface MouseEvents {
/**
* Returns the mouse position (x coordinate) when the click took place.
* The position is relative to the browser client area.
- *
+ *
* @return The mouse cursor x position
*/
public int getClientX() {
@@ -92,7 +93,7 @@ public interface MouseEvents {
/**
* Returns the mouse position (y coordinate) when the click took place.
* The position is relative to the browser client area.
- *
+ *
* @return The mouse cursor y position
*/
public int getClientY() {
@@ -102,7 +103,7 @@ public interface MouseEvents {
/**
* Returns the relative mouse position (x coordinate) when the click
* took place. The position is relative to the clicked component.
- *
+ *
* @return The mouse cursor x position relative to the clicked layout
* component or -1 if no x coordinate available
*/
@@ -113,7 +114,7 @@ public interface MouseEvents {
/**
* Returns the relative mouse position (y coordinate) when the click
* took place. The position is relative to the clicked component.
- *
+ *
* @return The mouse cursor y position relative to the clicked layout
* component or -1 if no y coordinate available
*/
@@ -123,7 +124,7 @@ public interface MouseEvents {
/**
* Checks if the event is a double click event.
- *
+ *
* @return true if the event is a double click event, false otherwise
*/
public boolean isDoubleClick() {
@@ -132,7 +133,7 @@ public interface MouseEvents {
/**
* Checks if the Alt key was down when the mouse event took place.
- *
+ *
* @return true if Alt was down when the event occured, false otherwise
*/
public boolean isAltKey() {
@@ -141,7 +142,7 @@ public interface MouseEvents {
/**
* Checks if the Ctrl key was down when the mouse event took place.
- *
+ *
* @return true if Ctrl was pressed when the event occured, false
* otherwise
*/
@@ -151,7 +152,7 @@ public interface MouseEvents {
/**
* Checks if the Meta key was down when the mouse event took place.
- *
+ *
* @return true if Meta was pressed when the event occured, false
* otherwise
*/
@@ -161,7 +162,7 @@ public interface MouseEvents {
/**
* Checks if the Shift key was down when the mouse event took place.
- *
+ *
* @return true if Shift was pressed when the event occured, false
* otherwise
*/
@@ -174,7 +175,7 @@ public interface MouseEvents {
* pushed. This is meant for debug purposes only and the string returned
* could change. Use {@link #getButton()} to check which button was
* pressed.
- *
+ *
* @since 6.3
* @return A string representation of which button was pushed.
*/
@@ -186,20 +187,20 @@ public interface MouseEvents {
/**
* Interface for listening for a {@link ClickEvent} fired by a
* {@link Component}.
- *
+ *
* @see ClickEvent
* @author Vaadin Ltd.
* @since 6.2
*/
public interface ClickListener extends ConnectorEventListener {
- public static final Method clickMethod = ReflectTools.findMethod(
- ClickListener.class, "click", ClickEvent.class);
+ public static final Method clickMethod = ReflectTools
+ .findMethod(ClickListener.class, "click", ClickEvent.class);
/**
* Called when a {@link Component} has been clicked. A reference to the
* component is given by {@link ClickEvent#getComponent()}.
- *
+ *
* @param event
* An event containing information about the click.
*/
@@ -209,7 +210,7 @@ public interface MouseEvents {
/**
* Class for holding additional event information for DoubleClick events.
* Fired when the user double-clicks on a <code>Component</code>.
- *
+ *
* @see ClickEvent
* @author Vaadin Ltd.
* @since 6.2
@@ -224,7 +225,7 @@ public interface MouseEvents {
/**
* Interface for listening for a {@link DoubleClickEvent} fired by a
* {@link Component}.
- *
+ *
* @see DoubleClickEvent
* @author Vaadin Ltd.
* @since 6.2
@@ -238,7 +239,7 @@ public interface MouseEvents {
/**
* Called when a {@link Component} has been double clicked. A reference
* to the component is given by {@link DoubleClickEvent#getComponent()}.
- *
+ *
* @param event
* An event containing information about the double click.
*/
diff --git a/server/src/main/java/com/vaadin/event/SelectionEvent.java b/server/src/main/java/com/vaadin/event/SelectionEvent.java
index 09cf57167f..b8fdbeec14 100644
--- a/server/src/main/java/com/vaadin/event/SelectionEvent.java
+++ b/server/src/main/java/com/vaadin/event/SelectionEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import java.util.Set;
/**
* An event that specifies what in a selection has changed, and where the
* selection took place.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -46,7 +46,7 @@ public class SelectionEvent extends EventObject {
* <p>
* <em>Note:</em> this excludes all itemIds that might have been previously
* selected.
- *
+ *
* @return a Collection of the itemIds that became selected
*/
public Set<Object> getAdded() {
@@ -58,7 +58,7 @@ public class SelectionEvent extends EventObject {
* <p>
* <em>Note:</em> this excludes all itemIds that might have been previously
* deselected.
- *
+ *
* @return a Collection of the itemIds that became deselected
*/
public Set<Object> getRemoved() {
@@ -87,7 +87,7 @@ public class SelectionEvent extends EventObject {
/**
* A {@link Collection} of all the itemIds that are currently selected.
- *
+ *
* @return a Collection of the itemIds that are currently selected
*/
public Set<Object> getSelected() {
@@ -101,7 +101,7 @@ public class SelectionEvent extends EventObject {
public interface SelectionListener extends Serializable {
/**
* Notifies the listener that the selection state has changed.
- *
+ *
* @param event
* the selection change event
*/
@@ -109,13 +109,13 @@ public class SelectionEvent extends EventObject {
}
/**
- * The interface for adding and removing listeners for
- * {@link SelectionEvent SelectionEvents}.
+ * The interface for adding and removing listeners for {@link SelectionEvent
+ * SelectionEvents}.
*/
public interface SelectionNotifier extends Serializable {
/**
* Registers a new selection listener
- *
+ *
* @param listener
* the listener to register
*/
@@ -123,7 +123,7 @@ public class SelectionEvent extends EventObject {
/**
* Removes a previously registered selection change listener
- *
+ *
* @param listener
* the listener to remove
*/
diff --git a/server/src/main/java/com/vaadin/event/ShortcutAction.java b/server/src/main/java/com/vaadin/event/ShortcutAction.java
index dd511c23c0..15b5056f9a 100644
--- a/server/src/main/java/com/vaadin/event/ShortcutAction.java
+++ b/server/src/main/java/com/vaadin/event/ShortcutAction.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -47,7 +47,7 @@ import com.vaadin.ui.Window;
* very well supported yet, but it might still be a good idea to give a caption
* to the shortcut.
* </p>
- *
+ *
* @author Vaadin Ltd.
* @since 4.0.1
*/
@@ -63,7 +63,7 @@ public class ShortcutAction extends Action {
* (optionally) {@link ModifierKey}s. <br/>
* The shortcut might be shown in the UI (e.g context menu), in which case
* the caption will be used.
- *
+ *
* @param caption
* used when displaying the shortcut visually
* @param kc
@@ -82,7 +82,7 @@ public class ShortcutAction extends Action {
* (optionally) {@link ModifierKey}s. <br/>
* The shortcut might be shown in the UI (e.g context menu), in which case
* the caption and icon will be used.
- *
+ *
* @param caption
* used when displaying the shortcut visually
* @param icon
@@ -112,21 +112,21 @@ public class ShortcutAction extends Action {
public static final char SHORTHAND_CHAR_CTRL = '^';
// regex-quote (escape) the characters
- private static final String SHORTHAND_ALT = Pattern.quote(Character
- .toString(SHORTHAND_CHAR_ALT));
- private static final String SHORTHAND_SHIFT = Pattern.quote(Character
- .toString(SHORTHAND_CHAR_SHIFT));
- private static final String SHORTHAND_CTRL = Pattern.quote(Character
- .toString(SHORTHAND_CHAR_CTRL));
+ private static final String SHORTHAND_ALT = Pattern
+ .quote(Character.toString(SHORTHAND_CHAR_ALT));
+ private static final String SHORTHAND_SHIFT = Pattern
+ .quote(Character.toString(SHORTHAND_CHAR_SHIFT));
+ private static final String SHORTHAND_CTRL = Pattern
+ .quote(Character.toString(SHORTHAND_CHAR_CTRL));
// Used for replacing escaped chars, e.g && with &
- private static final Pattern SHORTHAND_ESCAPE = Pattern.compile("("
- + SHORTHAND_ALT + "?)" + SHORTHAND_ALT + "|(" + SHORTHAND_SHIFT
- + "?)" + SHORTHAND_SHIFT + "|(" + SHORTHAND_CTRL + "?)"
- + SHORTHAND_CTRL);
+ private static final Pattern SHORTHAND_ESCAPE = Pattern
+ .compile("(" + SHORTHAND_ALT + "?)" + SHORTHAND_ALT + "|("
+ + SHORTHAND_SHIFT + "?)" + SHORTHAND_SHIFT + "|("
+ + SHORTHAND_CTRL + "?)" + SHORTHAND_CTRL);
// Used for removing escaped chars, only leaving real shorthands
- private static final Pattern SHORTHAND_REMOVE = Pattern.compile("(["
- + SHORTHAND_ALT + "|" + SHORTHAND_SHIFT + "|" + SHORTHAND_CTRL
- + "])\\1");
+ private static final Pattern SHORTHAND_REMOVE = Pattern
+ .compile("([" + SHORTHAND_ALT + "|" + SHORTHAND_SHIFT + "|"
+ + SHORTHAND_CTRL + "])\\1");
// Mnemonic char, optionally followed by another, and optionally a third
private static final Pattern SHORTHANDS = Pattern.compile("("
+ SHORTHAND_ALT + "|" + SHORTHAND_SHIFT + "|" + SHORTHAND_CTRL
@@ -151,7 +151,7 @@ public class ShortcutAction extends Action {
* <code>"Save&&&close"</code> will respond to ALT-C, and the caption will
* say "Save&close".
* </p>
- *
+ *
* @param shorthandCaption
* the caption in modifier shorthand
*/
@@ -171,7 +171,7 @@ public class ShortcutAction extends Action {
* <code>new ShortcutAction("Do &stuff", new int[]{ShortcutAction.ModifierKey.CTRL}));</code>
* will respond to CTRL-S.
* </p>
- *
+ *
* @param shorthandCaption
* @param modifierKeys
*/
@@ -186,8 +186,8 @@ public class ShortcutAction extends Action {
String match = matcher.group();
// KeyCode from last char in match, uppercase
- keyCode = Character.toUpperCase(matcher.group().charAt(
- match.length() - 1));
+ keyCode = Character
+ .toUpperCase(matcher.group().charAt(match.length() - 1));
// Given modifiers override this indicated in the caption
if (modifierKeys != null) {
@@ -222,7 +222,7 @@ public class ShortcutAction extends Action {
/**
* When setting modifiers, make sure that modifiers is a valid array AND
* that it's sorted.
- *
+ *
* @param modifiers
* the modifier keys for this shortcut
*/
@@ -238,7 +238,7 @@ public class ShortcutAction extends Action {
/**
* Get the {@link KeyCode} that this shortcut reacts to (in combination with
* the {@link ModifierKey}s).
- *
+ *
* @return keycode for this shortcut
*/
public int getKeyCode() {
@@ -247,7 +247,7 @@ public class ShortcutAction extends Action {
/**
* Get the {@link ModifierKey}s required for the shortcut to react.
- *
+ *
* @return modifier keys for this shortcut
*/
public int[] getModifiers() {
@@ -256,7 +256,7 @@ public class ShortcutAction extends Action {
/**
* Key codes that can be used for shortcuts
- *
+ *
*/
public interface KeyCode extends Serializable {
public static final int ENTER = 13;
@@ -388,7 +388,7 @@ public class ShortcutAction extends Action {
/**
* Modifier key constants
- *
+ *
*/
public interface ModifierKey extends Serializable {
public static final int SHIFT = 16;
diff --git a/server/src/main/java/com/vaadin/event/ShortcutListener.java b/server/src/main/java/com/vaadin/event/ShortcutListener.java
index ccfe68d6fb..2c9fb97d9e 100644
--- a/server/src/main/java/com/vaadin/event/ShortcutListener.java
+++ b/server/src/main/java/com/vaadin/event/ShortcutListener.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -18,8 +18,8 @@ package com.vaadin.event;
import com.vaadin.event.Action.Listener;
import com.vaadin.server.Resource;
-public abstract class ShortcutListener extends ShortcutAction implements
- Listener {
+public abstract class ShortcutListener extends ShortcutAction
+ implements Listener {
private static final long serialVersionUID = 1L;
diff --git a/server/src/main/java/com/vaadin/event/SortEvent.java b/server/src/main/java/com/vaadin/event/SortEvent.java
index f303e47781..645ae18c17 100644
--- a/server/src/main/java/com/vaadin/event/SortEvent.java
+++ b/server/src/main/java/com/vaadin/event/SortEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,9 +24,9 @@ import com.vaadin.ui.Component;
/**
* Event describing a change in sorting of a {@link Container}. Fired by
* {@link SortNotifier SortNotifiers}.
- *
+ *
* @see SortListener
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -37,7 +37,7 @@ public class SortEvent extends Component.Event {
/**
* Creates a new sort order change event with a sort order list.
- *
+ *
* @param source
* the component from which the event originates
* @param sortOrder
@@ -55,7 +55,7 @@ public class SortEvent extends Component.Event {
/**
* Gets the sort order list.
- *
+ *
* @return the sort order list
*/
public List<SortOrder> getSortOrder() {
@@ -64,7 +64,7 @@ public class SortEvent extends Component.Event {
/**
* Returns whether this event originated from actions done by the user.
- *
+ *
* @return true if sort event originated from user interaction
*/
public boolean isUserOriginated() {
@@ -77,7 +77,7 @@ public class SortEvent extends Component.Event {
public interface SortListener extends Serializable {
/**
* Called when the sort order has changed.
- *
+ *
* @param event
* the sort order change event
*/
@@ -92,7 +92,7 @@ public class SortEvent extends Component.Event {
/**
* Adds a sort order change listener that gets notified when the sort
* order changes.
- *
+ *
* @param listener
* the sort order change listener to add
*/
@@ -101,7 +101,7 @@ public class SortEvent extends Component.Event {
/**
* Removes a sort order change listener previously added using
* {@link #addSortListener(SortListener)}.
- *
+ *
* @param listener
* the sort order change listener to remove
*/
diff --git a/server/src/main/java/com/vaadin/event/Transferable.java b/server/src/main/java/com/vaadin/event/Transferable.java
index 9cfbba5161..a0361e0bbb 100644
--- a/server/src/main/java/com/vaadin/event/Transferable.java
+++ b/server/src/main/java/com/vaadin/event/Transferable.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.ui.Component;
/**
* Transferable wraps the data that is to be imported into another component.
* Currently Transferable is only used for drag and drop.
- *
+ *
* @since 6.3
*/
public interface Transferable extends Serializable {
@@ -35,7 +35,7 @@ public interface Transferable extends Serializable {
* <p>
* Note, implementations of {@link Transferable} often provide a better
* typed API for accessing data.
- *
+ *
* @param dataFlavor
* the data flavor to be returned from Transferable
* @return the data stored in the Transferable or null if Transferable
@@ -46,7 +46,7 @@ public interface Transferable extends Serializable {
/**
* Stores data of given data flavor to Transferable. Possibly existing value
* of the same data flavor will be replaced.
- *
+ *
* @param dataFlavor
* the data flavor
* @param value
diff --git a/server/src/main/java/com/vaadin/event/TransferableImpl.java b/server/src/main/java/com/vaadin/event/TransferableImpl.java
index 9c8e79f1bf..6ec867daf0 100644
--- a/server/src/main/java/com/vaadin/event/TransferableImpl.java
+++ b/server/src/main/java/com/vaadin/event/TransferableImpl.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.ui.Component;
/**
* TODO Javadoc!
- *
+ *
* @since 6.3
*/
public class TransferableImpl implements Transferable {
diff --git a/server/src/main/java/com/vaadin/event/UIEvents.java b/server/src/main/java/com/vaadin/event/UIEvents.java
index e986386da8..83e24887f7 100644
--- a/server/src/main/java/com/vaadin/event/UIEvents.java
+++ b/server/src/main/java/com/vaadin/event/UIEvents.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.util.ReflectTools;
/**
* A class that contains events, listeners and handlers specific to the
* {@link UI} class.
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
@@ -34,17 +34,17 @@ public interface UIEvents {
/**
* A {@link PollListener} receives and handles {@link PollEvent PollEvents}
* fired by {@link PollNotifier PollNotifiers}.
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
public interface PollListener extends Serializable {
- public static final Method POLL_METHOD = ReflectTools.findMethod(
- PollListener.class, "poll", PollEvent.class);
+ public static final Method POLL_METHOD = ReflectTools
+ .findMethod(PollListener.class, "poll", PollEvent.class);
/**
* A poll request has been received by the server.
- *
+ *
* @param event
* poll event
*/
@@ -54,7 +54,7 @@ public interface UIEvents {
/**
* An event that is fired whenever a client polls the server for
* asynchronous UI updates.
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
@@ -65,7 +65,7 @@ public interface UIEvents {
/**
* Get the {@link UI} instance that received the poll request.
- *
+ *
* @return the {@link UI} that received the poll request. Never
* <code>null</code>.
*/
@@ -85,7 +85,7 @@ public interface UIEvents {
* able to send {@link PollEvent PollEvents} whenever the client sends a
* periodic poll message to the client, to check for asynchronous
* server-side modifications.
- *
+ *
* @since 7.2
* @see UI#setPollInterval(int)
*/
@@ -95,7 +95,7 @@ public interface UIEvents {
* <p>
* The listener is called whenever the client polls the server for
* asynchronous UI updates.
- *
+ *
* @see UI#setPollInterval(int)
* @see #removePollListener(PollListener)
* @param listener
@@ -105,7 +105,7 @@ public interface UIEvents {
/**
* Remove a poll listener.
- *
+ *
* @see #addPollListener(PollListener)
* @param listener
* the listener to be removed
diff --git a/server/src/main/java/com/vaadin/event/dd/DragAndDropEvent.java b/server/src/main/java/com/vaadin/event/dd/DragAndDropEvent.java
index 661c7ed1cc..a2668b67b6 100644
--- a/server/src/main/java/com/vaadin/event/dd/DragAndDropEvent.java
+++ b/server/src/main/java/com/vaadin/event/dd/DragAndDropEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,9 +29,9 @@ import com.vaadin.event.dd.acceptcriteria.AcceptCriterion;
* DragAndDropEvent instances contains both the dragged data in
* {@link Transferable} (generated by {@link DragSource} and details about the
* current drop event in {@link TargetDetails} (generated by {@link DropTarget}.
- *
+ *
* @since 6.3
- *
+ *
*/
public class DragAndDropEvent implements Serializable {
private Transferable transferable;
diff --git a/server/src/main/java/com/vaadin/event/dd/DragSource.java b/server/src/main/java/com/vaadin/event/dd/DragSource.java
index 8e4d43bfc4..db576906e7 100644
--- a/server/src/main/java/com/vaadin/event/dd/DragSource.java
+++ b/server/src/main/java/com/vaadin/event/dd/DragSource.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -33,16 +33,16 @@ import com.vaadin.ui.Tree;
* implementation lets it create the {@link Transferable} instance from the raw
* client side "seed data". This way server side implementation may translate or
* extend the data that will be available for {@link DropHandler}.
- *
+ *
* @since 6.3
- *
+ *
*/
public interface DragSource extends Component {
/**
* DragSource may convert data added by client side component to meaningful
* values for server side developer or add other data based on it.
- *
+ *
* <p>
* For example Tree converts item identifiers to generated string keys for
* the client side. Vaadin developer don't and can't know anything about
@@ -51,7 +51,7 @@ public interface DragSource extends Component {
* counterpart. In {@link Tree#getTransferable(Map)} the key is converted
* back to item identifier that the server side developer can use.
* <p>
- *
+ *
* @since 6.3
* @param rawVariables
* the data that client side initially included in
diff --git a/server/src/main/java/com/vaadin/event/dd/DropHandler.java b/server/src/main/java/com/vaadin/event/dd/DropHandler.java
index c45ae7e7d3..0e0387741a 100644
--- a/server/src/main/java/com/vaadin/event/dd/DropHandler.java
+++ b/server/src/main/java/com/vaadin/event/dd/DropHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,9 +29,9 @@ import com.vaadin.event.dd.acceptcriteria.ServerSideCriterion;
* data and the {@link #getAcceptCriterion()} method contains the (possibly
* client side verifiable) criterion whether the dragged data will be handled at
* all.
- *
+ *
* @since 6.3
- *
+ *
*/
public interface DropHandler extends Serializable {
@@ -41,7 +41,7 @@ public interface DropHandler extends Serializable {
* {@link AcceptCriterion} defined by {@link #getAcceptCriterion()} method.
* The actual business logic of drag and drop operation is implemented into
* this method.
- *
+ *
* @param event
* the event related to this drop
*/
@@ -65,7 +65,7 @@ public interface DropHandler extends Serializable {
* If developer wants to handle everything in the
* {@link #drop(DragAndDropEvent)} method, {@link AcceptAll} instance can be
* returned.
- *
+ *
* @return the {@link AcceptCriterion}
*/
public AcceptCriterion getAcceptCriterion();
diff --git a/server/src/main/java/com/vaadin/event/dd/DropTarget.java b/server/src/main/java/com/vaadin/event/dd/DropTarget.java
index f96170cf98..41e2c10b99 100644
--- a/server/src/main/java/com/vaadin/event/dd/DropTarget.java
+++ b/server/src/main/java/com/vaadin/event/dd/DropTarget.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.ui.Component;
* DropTarget is an interface for components supporting drop operations. A
* component that wants to receive drop events should implement this interface
* and provide a {@link DropHandler} which will handle the actual drop event.
- *
+ *
* @since 6.3
*/
public interface DropTarget extends Component {
@@ -40,9 +40,9 @@ public interface DropTarget extends Component {
* target details provided by the client side (drop target) to meaningful
* server side values. If null is returned the terminal implementation will
* automatically create a {@link TargetDetails} with raw client side data.
- *
+ *
* @see DragSource#getTransferable(Map)
- *
+ *
* @param clientVariables
* data passed from the DropTargets client side counterpart.
* @return A DropTargetDetails object with the translated data or null to
diff --git a/server/src/main/java/com/vaadin/event/dd/TargetDetails.java b/server/src/main/java/com/vaadin/event/dd/TargetDetails.java
index b5635bc2a8..0e1b07b7c9 100644
--- a/server/src/main/java/com/vaadin/event/dd/TargetDetails.java
+++ b/server/src/main/java/com/vaadin/event/dd/TargetDetails.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,15 +27,15 @@ import com.vaadin.ui.Tree.TreeTargetDetails;
* preferable to cast the TargetDetails to an implementation provided by
* DropTarget like {@link TreeTargetDetails}. They often provide a better typed,
* drop target specific API.
- *
+ *
* @since 6.3
- *
+ *
*/
public interface TargetDetails extends Serializable {
/**
* Gets target data associated with the given string key
- *
+ *
* @param key
* @return The data associated with the key
*/
diff --git a/server/src/main/java/com/vaadin/event/dd/TargetDetailsImpl.java b/server/src/main/java/com/vaadin/event/dd/TargetDetailsImpl.java
index 8a6ec506ba..26ca938cac 100644
--- a/server/src/main/java/com/vaadin/event/dd/TargetDetailsImpl.java
+++ b/server/src/main/java/com/vaadin/event/dd/TargetDetailsImpl.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,9 +23,9 @@ import com.vaadin.shared.MouseEventDetails;
/**
* A HashMap backed implementation of {@link TargetDetails} for terminal
* implementation and for extension.
- *
+ *
* @since 6.3
- *
+ *
*/
@SuppressWarnings("serial")
public class TargetDetailsImpl implements TargetDetails {
diff --git a/server/src/main/java/com/vaadin/event/dd/acceptcriteria/AcceptAll.java b/server/src/main/java/com/vaadin/event/dd/acceptcriteria/AcceptAll.java
index fa6a4c2b9a..f698a64652 100644
--- a/server/src/main/java/com/vaadin/event/dd/acceptcriteria/AcceptAll.java
+++ b/server/src/main/java/com/vaadin/event/dd/acceptcriteria/AcceptAll.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -14,7 +14,7 @@
* the License.
*/
/**
- *
+ *
*/
package com.vaadin.event.dd.acceptcriteria;
@@ -24,10 +24,10 @@ import com.vaadin.event.dd.DragAndDropEvent;
* Criterion that accepts all drops anywhere on the component.
* <p>
* Note! Class is singleton, use {@link #get()} method to get the instance.
- *
- *
+ *
+ *
* @since 6.3
- *
+ *
*/
public final class AcceptAll extends ClientSideCriterion {
diff --git a/server/src/main/java/com/vaadin/event/dd/acceptcriteria/AcceptCriterion.java b/server/src/main/java/com/vaadin/event/dd/acceptcriteria/AcceptCriterion.java
index a968cd8741..a5ef7fc896 100644
--- a/server/src/main/java/com/vaadin/event/dd/acceptcriteria/AcceptCriterion.java
+++ b/server/src/main/java/com/vaadin/event/dd/acceptcriteria/AcceptCriterion.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -14,7 +14,7 @@
* the License.
*/
/**
- *
+ *
*/
package com.vaadin.event.dd.acceptcriteria;
@@ -29,23 +29,23 @@ import com.vaadin.server.PaintTarget;
/**
* Criterion that can be used create policy to accept/discard dragged content
* (presented by {@link Transferable}).
- *
+ *
* The drag and drop mechanism will verify the criteria returned by
* {@link DropHandler#getAcceptCriterion()} before calling
* {@link DropHandler#drop(DragAndDropEvent)}.
- *
+ *
* The criteria can be evaluated either on the client (browser - see
* {@link ClientSideCriterion}) or on the server (see
* {@link ServerSideCriterion}). If no constraints are needed, an
* {@link AcceptAll} can be used.
- *
+ *
* In addition to accepting or rejecting a possible drop, criteria can provide
* additional hints for client side painting.
- *
+ *
* @see DropHandler
* @see ClientSideCriterion
* @see ServerSideCriterion
- *
+ *
* @since 6.3
*/
public interface AcceptCriterion extends Serializable {
@@ -53,7 +53,7 @@ public interface AcceptCriterion extends Serializable {
/**
* Returns whether the criteria can be checked on the client or whether a
* server request is needed to check the criteria.
- *
+ *
* This requirement may depend on the state of the criterion (e.g. logical
* operations between criteria), so this cannot be based on a marker
* interface.
@@ -67,7 +67,7 @@ public interface AcceptCriterion extends Serializable {
* initialization. The UIDL painted in this method will be passed to client
* side drop handler implementation. Implementation can assume that
* {@link #accept(DragAndDropEvent)} is called before this method.
- *
+ *
* @param target
* @throws PaintException
*/
@@ -79,7 +79,7 @@ public interface AcceptCriterion extends Serializable {
* <p>
* Note that even if your criterion is validated on client side, you should
* always validate the data on server side too.
- *
+ *
* @param dragEvent
* @return
*/
diff --git a/server/src/main/java/com/vaadin/event/dd/acceptcriteria/And.java b/server/src/main/java/com/vaadin/event/dd/acceptcriteria/And.java
index b2fc1b1b94..01bc354ae8 100644
--- a/server/src/main/java/com/vaadin/event/dd/acceptcriteria/And.java
+++ b/server/src/main/java/com/vaadin/event/dd/acceptcriteria/And.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -14,7 +14,7 @@
* the License.
*/
/**
- *
+ *
*/
package com.vaadin.event.dd.acceptcriteria;
@@ -25,11 +25,11 @@ import com.vaadin.server.PaintTarget;
/**
* A compound criterion that accepts the drag if all of its criteria accepts the
* drag.
- *
+ *
* @see Or
- *
+ *
* @since 6.3
- *
+ *
*/
public class And extends ClientSideCriterion {
@@ -37,7 +37,7 @@ public class And extends ClientSideCriterion {
protected ClientSideCriterion[] criteria;
/**
- *
+ *
* @param criteria
* criteria of which the And criterion will be composed
*/
diff --git a/server/src/main/java/com/vaadin/event/dd/acceptcriteria/ClientSideCriterion.java b/server/src/main/java/com/vaadin/event/dd/acceptcriteria/ClientSideCriterion.java
index 6bb227a95e..8ce8f04773 100644
--- a/server/src/main/java/com/vaadin/event/dd/acceptcriteria/ClientSideCriterion.java
+++ b/server/src/main/java/com/vaadin/event/dd/acceptcriteria/ClientSideCriterion.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,23 +24,23 @@ import com.vaadin.server.PaintTarget;
* Parent class for criteria that can be completely validated on client side.
* All classes that provide criteria that can be completely validated on client
* side should extend this class.
- *
+ *
* It is recommended that subclasses of ClientSideCriterion re-validate the
* condition on the server side in
* {@link AcceptCriterion#accept(com.vaadin.event.dd.DragAndDropEvent)} after
* the client side validation has accepted a transfer.
- *
+ *
* @since 6.3
*/
-public abstract class ClientSideCriterion implements Serializable,
- AcceptCriterion {
+public abstract class ClientSideCriterion
+ implements Serializable, AcceptCriterion {
/*
* All criteria that extend this must be completely validatable on client
* side.
- *
+ *
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.event.dd.acceptCriteria.AcceptCriterion#isClientSideVerifiable
* ()
diff --git a/server/src/main/java/com/vaadin/event/dd/acceptcriteria/ContainsDataFlavor.java b/server/src/main/java/com/vaadin/event/dd/acceptcriteria/ContainsDataFlavor.java
index 57f4d8253b..28285647ca 100644
--- a/server/src/main/java/com/vaadin/event/dd/acceptcriteria/ContainsDataFlavor.java
+++ b/server/src/main/java/com/vaadin/event/dd/acceptcriteria/ContainsDataFlavor.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -14,7 +14,7 @@
* the License.
*/
/**
- *
+ *
*/
package com.vaadin.event.dd.acceptcriteria;
@@ -27,7 +27,7 @@ import com.vaadin.server.PaintTarget;
* A Criterion that checks whether {@link Transferable} contains given data
* flavor. The developer might for example accept the incoming data only if it
* contains "Url" or "Text".
- *
+ *
* @since 6.3
*/
public class ContainsDataFlavor extends ClientSideCriterion {
@@ -36,7 +36,7 @@ public class ContainsDataFlavor extends ClientSideCriterion {
/**
* Constructs a new instance of {@link ContainsDataFlavor}.
- *
+ *
* @param dataFlawor
* the type of data that will be checked from
* {@link Transferable}
diff --git a/server/src/main/java/com/vaadin/event/dd/acceptcriteria/Not.java b/server/src/main/java/com/vaadin/event/dd/acceptcriteria/Not.java
index 95f96bbf08..da50d7f3e3 100644
--- a/server/src/main/java/com/vaadin/event/dd/acceptcriteria/Not.java
+++ b/server/src/main/java/com/vaadin/event/dd/acceptcriteria/Not.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -14,7 +14,7 @@
* the License.
*/
/**
- *
+ *
*/
package com.vaadin.event.dd.acceptcriteria;
@@ -24,9 +24,9 @@ import com.vaadin.server.PaintTarget;
/**
* Criterion that wraps another criterion and inverts its return value.
- *
+ *
* @since 6.3
- *
+ *
*/
public class Not extends ClientSideCriterion {
diff --git a/server/src/main/java/com/vaadin/event/dd/acceptcriteria/Or.java b/server/src/main/java/com/vaadin/event/dd/acceptcriteria/Or.java
index e300606464..842df2ca20 100644
--- a/server/src/main/java/com/vaadin/event/dd/acceptcriteria/Or.java
+++ b/server/src/main/java/com/vaadin/event/dd/acceptcriteria/Or.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -14,7 +14,7 @@
* the License.
*/
/**
- *
+ *
*/
package com.vaadin.event.dd.acceptcriteria;
@@ -25,11 +25,11 @@ import com.vaadin.server.PaintTarget;
/**
* A compound criterion that accepts the drag if any of its criterion accepts
* it.
- *
+ *
* @see And
- *
+ *
* @since 6.3
- *
+ *
*/
public class Or extends ClientSideCriterion {
private static final long serialVersionUID = 1L;
diff --git a/server/src/main/java/com/vaadin/event/dd/acceptcriteria/ServerSideCriterion.java b/server/src/main/java/com/vaadin/event/dd/acceptcriteria/ServerSideCriterion.java
index 8b769ee031..dc54231f87 100644
--- a/server/src/main/java/com/vaadin/event/dd/acceptcriteria/ServerSideCriterion.java
+++ b/server/src/main/java/com/vaadin/event/dd/acceptcriteria/ServerSideCriterion.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,14 +32,14 @@ import com.vaadin.server.PaintTarget;
* As all server side state can be used to make a decision, this is more
* flexible than {@link ClientSideCriterion}. However, this does require
* additional requests from the browser to the server during a drag operation.
- *
+ *
* @see AcceptCriterion
* @see ClientSideCriterion
- *
+ *
* @since 6.3
*/
-public abstract class ServerSideCriterion implements Serializable,
- AcceptCriterion {
+public abstract class ServerSideCriterion
+ implements Serializable, AcceptCriterion {
private static final long serialVersionUID = 2128510128911628902L;
diff --git a/server/src/main/java/com/vaadin/event/dd/acceptcriteria/SourceIs.java b/server/src/main/java/com/vaadin/event/dd/acceptcriteria/SourceIs.java
index 8e9fdecdae..c7da61739b 100644
--- a/server/src/main/java/com/vaadin/event/dd/acceptcriteria/SourceIs.java
+++ b/server/src/main/java/com/vaadin/event/dd/acceptcriteria/SourceIs.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -14,7 +14,7 @@
* the License.
*/
/**
- *
+ *
*/
package com.vaadin.event.dd.acceptcriteria;
@@ -30,7 +30,7 @@ import com.vaadin.ui.Component;
/**
* Client side criteria that checks if the drag source is one of the given
* components.
- *
+ *
* @since 6.3
*/
@SuppressWarnings("serial")
@@ -51,11 +51,10 @@ public class SourceIs extends ClientSideCriterion {
if (c.isAttached()) {
target.addAttribute("component" + paintedComponents++, c);
} else {
- Logger.getLogger(SourceIs.class.getName())
- .log(Level.WARNING,
- "SourceIs component {0} at index {1} is not attached to the component hierachy and will thus be ignored",
- new Object[] { c.getClass().getName(),
- Integer.valueOf(i) });
+ Logger.getLogger(SourceIs.class.getName()).log(Level.WARNING,
+ "SourceIs component {0} at index {1} is not attached to the component hierachy and will thus be ignored",
+ new Object[] { c.getClass().getName(),
+ Integer.valueOf(i) });
}
}
target.addAttribute("c", paintedComponents);
diff --git a/server/src/main/java/com/vaadin/event/dd/acceptcriteria/SourceIsTarget.java b/server/src/main/java/com/vaadin/event/dd/acceptcriteria/SourceIsTarget.java
index c49f126941..07199ab7d5 100644
--- a/server/src/main/java/com/vaadin/event/dd/acceptcriteria/SourceIsTarget.java
+++ b/server/src/main/java/com/vaadin/event/dd/acceptcriteria/SourceIsTarget.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -14,7 +14,7 @@
* the License.
*/
/**
- *
+ *
*/
package com.vaadin.event.dd.acceptcriteria;
@@ -27,15 +27,15 @@ import com.vaadin.ui.Table;
import com.vaadin.ui.Tree;
/**
- *
+ *
* A criterion that ensures the drag source is the same as drop target. Eg.
* {@link Tree} or {@link Table} could support only re-ordering of items, but no
* {@link Transferable}s coming outside.
* <p>
* Note! Class is singleton, use {@link #get()} method to get the instance.
- *
+ *
* @since 6.3
- *
+ *
*/
public class SourceIsTarget extends ClientSideCriterion {
diff --git a/server/src/main/java/com/vaadin/event/dd/acceptcriteria/TargetDetailIs.java b/server/src/main/java/com/vaadin/event/dd/acceptcriteria/TargetDetailIs.java
index 42fb5dfa11..289db3f1e3 100644
--- a/server/src/main/java/com/vaadin/event/dd/acceptcriteria/TargetDetailIs.java
+++ b/server/src/main/java/com/vaadin/event/dd/acceptcriteria/TargetDetailIs.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -14,7 +14,7 @@
* the License.
*/
/**
- *
+ *
*/
package com.vaadin.event.dd.acceptcriteria;
@@ -26,11 +26,11 @@ import com.vaadin.server.PaintTarget;
/**
* Criterion for checking if drop target details contains the specific property
* with the specific value. Currently only String values are supported.
- *
+ *
* @since 6.3
- *
+ *
* TODO add support for other basic data types that we support in UIDL.
- *
+ *
*/
public class TargetDetailIs extends ClientSideCriterion {
@@ -41,7 +41,7 @@ public class TargetDetailIs extends ClientSideCriterion {
/**
* Constructs a criterion which ensures that the value there is a value in
* {@link TargetDetails} that equals the reference value.
- *
+ *
* @param dataFlavor
* the type of data to be checked
* @param value
diff --git a/server/src/main/java/com/vaadin/navigator/NavigationStateManager.java b/server/src/main/java/com/vaadin/navigator/NavigationStateManager.java
index 3e9c54c961..cb0996b7fc 100644
--- a/server/src/main/java/com/vaadin/navigator/NavigationStateManager.java
+++ b/server/src/main/java/com/vaadin/navigator/NavigationStateManager.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import java.io.Serializable;
* portlet URL navigation and other similar systems.
* <p>
* This interface is mostly for internal use by Navigator.
- *
+ *
* @author Vaadin Ltd
* @since 7.0
*/
@@ -36,7 +36,7 @@ public interface NavigationStateManager extends Serializable {
/**
* Returns the current navigation state including view name and any optional
* parameters.
- *
+ *
* @return current view and parameter string, not null
*/
public String getState();
@@ -46,7 +46,7 @@ public interface NavigationStateManager extends Serializable {
* location, including view name and any optional parameters.
* <p>
* This method should be only called by a Navigator.
- *
+ *
* @param fragment
* new view and parameter string, not null
*/
diff --git a/server/src/main/java/com/vaadin/navigator/Navigator.java b/server/src/main/java/com/vaadin/navigator/Navigator.java
index 1fb18adde1..88f25d112b 100644
--- a/server/src/main/java/com/vaadin/navigator/Navigator.java
+++ b/server/src/main/java/com/vaadin/navigator/Navigator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -17,13 +17,13 @@ package com.vaadin.navigator;
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -62,7 +62,7 @@ import com.vaadin.ui.UI;
* <p>
* Note that {@link Navigator} is not a component itself but uses a
* {@link ViewDisplay} to update contents based on the state.
- *
+ *
* @author Vaadin Ltd
* @since 7.0
*/
@@ -100,15 +100,15 @@ public class Navigator implements Serializable {
* This class is mostly for internal use by Navigator, and is only public
* and static to enable testing.
*/
- public static class UriFragmentManager implements NavigationStateManager,
- UriFragmentChangedListener {
+ public static class UriFragmentManager
+ implements NavigationStateManager, UriFragmentChangedListener {
private final Page page;
private Navigator navigator;
/**
* Creates a new URIFragmentManager and attach it to listen to URI
* fragment changes of a {@link Page}.
- *
+ *
* @param page
* page whose URI fragment to get and modify
*/
@@ -148,7 +148,7 @@ public class Navigator implements Serializable {
/**
* Returns the current URI fragment tracked by this UriFragentManager.
- *
+ *
* @return The URI fragment.
*/
protected String getFragment() {
@@ -157,7 +157,7 @@ public class Navigator implements Serializable {
/**
* Sets the URI fragment to the given string.
- *
+ *
* @param fragment
* The new URI fragment.
*/
@@ -195,8 +195,8 @@ public class Navigator implements Serializable {
container.removeAllComponents();
container.addComponent((Component) view);
} else {
- throw new IllegalArgumentException("View is not a component: "
- + view);
+ throw new IllegalArgumentException(
+ "View is not a component: " + view);
}
}
}
@@ -209,8 +209,8 @@ public class Navigator implements Serializable {
* Attempting to display a view that is not a component causes an exception
* to be thrown.
*/
- public static class SingleComponentContainerViewDisplay implements
- ViewDisplay {
+ public static class SingleComponentContainerViewDisplay
+ implements ViewDisplay {
private final SingleComponentContainer container;
@@ -228,8 +228,8 @@ public class Navigator implements Serializable {
if (view instanceof Component) {
container.setContent((Component) view);
} else {
- throw new IllegalArgumentException("View is not a component: "
- + view);
+ throw new IllegalArgumentException(
+ "View is not a component: " + view);
}
}
}
@@ -237,7 +237,7 @@ public class Navigator implements Serializable {
/**
* A ViewProvider which supports mapping a single view name to a single
* pre-initialized view instance.
- *
+ *
* For most cases, ClassBasedViewProvider should be used instead of this.
*/
public static class StaticViewProvider implements ViewProvider {
@@ -247,7 +247,7 @@ public class Navigator implements Serializable {
/**
* Creates a new view provider which returns a pre-created view
* instance.
- *
+ *
* @param viewName
* name of the view (not null)
* @param view
@@ -281,7 +281,7 @@ public class Navigator implements Serializable {
/**
* Get the view name for this provider.
- *
+ *
* @return view name for this provider
*/
public String getViewName() {
@@ -306,7 +306,7 @@ public class Navigator implements Serializable {
/**
* Create a new view provider which creates new view instances based on
* a view class.
- *
+ *
* @param viewName
* name of the views to create (not null)
* @param viewClass
@@ -353,7 +353,7 @@ public class Navigator implements Serializable {
/**
* Get the view name for this provider.
- *
+ *
* @return view name for this provider
*/
public String getViewName() {
@@ -362,7 +362,7 @@ public class Navigator implements Serializable {
/**
* Get the view class for this provider.
- *
+ *
* @return {@link View} class
*/
public Class<? extends View> getViewClass() {
@@ -393,7 +393,7 @@ public class Navigator implements Serializable {
* navigator, {@code navigator.navigateTo(navigator.getState())} may need to
* be explicitly called to ensure the current view matches the navigation
* state.
- *
+ *
* @param ui
* The UI to which this Navigator is attached.
* @param container
@@ -416,7 +416,7 @@ public class Navigator implements Serializable {
* navigator, {@code navigator.navigateTo(navigator.getState())} may need to
* be explicitly called to ensure the current view matches the navigation
* state.
- *
+ *
* @param ui
* The UI to which this Navigator is attached.
* @param container
@@ -436,7 +436,7 @@ public class Navigator implements Serializable {
* navigator, {@code navigator.navigateTo(navigator.getState())} may need to
* be explicitly called to ensure the current view matches the navigation
* state.
- *
+ *
* @param ui
* The UI to which this Navigator is attached.
* @param display
@@ -457,7 +457,7 @@ public class Navigator implements Serializable {
* navigator, {@code navigator.navigateTo(navigator.getState())} may need to
* be explicitly called to ensure the current view matches the navigation
* state.
- *
+ *
* @param ui
* The UI to which this Navigator is attached.
* @param stateManager
@@ -477,7 +477,7 @@ public class Navigator implements Serializable {
* Creates a navigator. This method is for use by dependency injection
* frameworks etc. and must be followed by a call to
* {@link #init(UI, NavigationStateManager, ViewDisplay)} before use.
- *
+ *
* @since 7.6
*/
protected Navigator() {
@@ -535,10 +535,10 @@ public class Navigator implements Serializable {
* <p>
* Registered {@link ViewChangeListener}s are called upon successful view
* change.
- *
+ *
* @param navigationState
* view name and parameters
- *
+ *
* @throws IllegalArgumentException
* if <code>navigationState</code> does not map to a known view
* and no error view is registered
@@ -561,8 +561,7 @@ public class Navigator implements Serializable {
if (viewWithLongestName == null) {
throw new IllegalArgumentException(
- "Trying to navigate to an unknown state '"
- + navigationState
+ "Trying to navigate to an unknown state '" + navigationState
+ "' and an error view provider not present");
}
@@ -576,7 +575,8 @@ public class Navigator implements Serializable {
}
if (getCurrentView() == null
|| !SharedUtil.equals(getCurrentView(), viewWithLongestName)
- || !SharedUtil.equals(currentNavigationState, navigationState)) {
+ || !SharedUtil.equals(currentNavigationState,
+ navigationState)) {
navigateTo(viewWithLongestName, longestViewName, parameters);
} else {
updateNavigationState(new ViewChangeEvent(this, getCurrentView(),
@@ -590,7 +590,7 @@ public class Navigator implements Serializable {
* <p>
* This method also verifies that the user is allowed to perform the
* navigation operation.
- *
+ *
* @param view
* view to activate
* @param viewName
@@ -626,10 +626,10 @@ public class Navigator implements Serializable {
/**
* Check whether view change is allowed by view change listeners (
* {@link ViewChangeListener#beforeViewChange(ViewChangeEvent)}).
- *
+ *
* This method can be overridden to extend the behavior, and should not be
* called directly except by {@link #navigateTo(View, String, String)}.
- *
+ *
* @since 7.6
* @param event
* the event to fire as the before view change event
@@ -644,12 +644,12 @@ public class Navigator implements Serializable {
* method can be called by {@link #navigateTo(View, String, String)} to
* revert the URL fragment to point to the previous view to which navigation
* succeeded.
- *
+ *
* This method should only be called by
* {@link #navigateTo(View, String, String)}. Normally it should not be
* overridden, but can be by frameworks that need to hook into view change
* cancellations of this type.
- *
+ *
* @since 7.6
*/
protected void revertNavigation() {
@@ -661,11 +661,11 @@ public class Navigator implements Serializable {
/**
* Update the internal state of the navigator (parameters, previous
* successful URL fragment navigated to) when navigation succeeds.
- *
+ *
* Normally this method should not be overridden nor called directly from
* application code, but it can be called by a custom implementation of
* {@link #navigateTo(View, String, String)}.
- *
+ *
* @since 7.6
* @param event
* a view change event with details of the change
@@ -688,12 +688,12 @@ public class Navigator implements Serializable {
/**
* Update the internal state of the navigator to reflect the actual
* switching of views.
- *
+ *
* This method should only be called by
* {@link #navigateTo(View, String, String)} between showing the view and
* calling {@link View#enter(ViewChangeEvent)}. If this method is
* overridden, the overriding version must call the super method.
- *
+ *
* @since 7.6
* @param event
* a view change event with details of the change
@@ -712,7 +712,7 @@ public class Navigator implements Serializable {
* The view change listeners may also e.g. open a warning or question dialog
* and save the parameters to re-initiate the navigation operation upon user
* action.
- *
+ *
* @param event
* view change event (not null, view change not yet performed)
* @return true if the view change should be allowed, false to silently
@@ -722,7 +722,8 @@ public class Navigator implements Serializable {
// a copy of the listener list is needed to avoid
// ConcurrentModificationException as a listener can add/remove
// listeners
- for (ViewChangeListener l : new ArrayList<ViewChangeListener>(listeners)) {
+ for (ViewChangeListener l : new ArrayList<ViewChangeListener>(
+ listeners)) {
if (!l.beforeViewChange(event)) {
return false;
}
@@ -733,7 +734,7 @@ public class Navigator implements Serializable {
/**
* Returns the {@link NavigationStateManager} that is used to get, listen to
* and manipulate the navigation state used by this Navigator.
- *
+ *
* @return NavigationStateManager in use
*/
protected NavigationStateManager getStateManager() {
@@ -743,7 +744,7 @@ public class Navigator implements Serializable {
/**
* Returns the current navigation state reported by this Navigator's
* {@link NavigationStateManager}.
- *
+ *
* @return The navigation state.
*/
public String getState() {
@@ -752,7 +753,7 @@ public class Navigator implements Serializable {
/**
* Return the {@link ViewDisplay} used by the navigator.
- *
+ *
* @return the ViewDisplay used for displaying views
*/
public ViewDisplay getDisplay() {
@@ -777,7 +778,7 @@ public class Navigator implements Serializable {
* Fires an event after the current view has changed.
* <p>
* Listeners are called in registration order.
- *
+ *
* @param event
* view change event (not null)
*/
@@ -785,7 +786,8 @@ public class Navigator implements Serializable {
// a copy of the listener list is needed to avoid
// ConcurrentModificationException as a listener can add/remove
// listeners
- for (ViewChangeListener l : new ArrayList<ViewChangeListener>(listeners)) {
+ for (ViewChangeListener l : new ArrayList<ViewChangeListener>(
+ listeners)) {
l.afterViewChange(event);
}
}
@@ -798,7 +800,7 @@ public class Navigator implements Serializable {
* <p>
* Note that a view should not be shared between UIs (for instance, it
* should not be a static field in a UI subclass).
- *
+ *
* @param viewName
* String that identifies a view (not null nor empty string)
* @param view
@@ -823,7 +825,7 @@ public class Navigator implements Serializable {
* overwrites the old registration of the same type.
* <p>
* A new view instance is created every time a view is requested.
- *
+ *
* @param viewName
* String that identifies a view (not null nor empty string)
* @param viewClass
@@ -847,7 +849,7 @@ public class Navigator implements Serializable {
* <p>
* This method only applies to views registered using
* {@link #addView(String, View)} or {@link #addView(String, Class)}.
- *
+ *
* @param viewName
* name of the view to remove
*/
@@ -874,7 +876,7 @@ public class Navigator implements Serializable {
* <p>
* Providers are called in order of registration until one that can handle
* the requested view name is found.
- *
+ *
* @param provider
* provider to register, not <code>null</code>
* @throws IllegalArgumentException
@@ -890,7 +892,7 @@ public class Navigator implements Serializable {
/**
* Unregister a view provider (factory).
- *
+ *
* @param provider
* provider to unregister
*/
@@ -906,7 +908,7 @@ public class Navigator implements Serializable {
* <p>
* Note that an error view should not be shared between UIs (for instance,
* it should not be a static field in a UI subclass).
- *
+ *
* @param viewClass
* The View class whose instance should be used as the error
* view.
@@ -933,7 +935,7 @@ public class Navigator implements Serializable {
* Registers a view that is displayed when no other view matches the
* navigation state. This implicitly sets an appropriate error view provider
* and overrides any previous {@link #setErrorProvider(ViewProvider)} call.
- *
+ *
* @param view
* The View that should be used as the error view.
*/
@@ -957,7 +959,7 @@ public class Navigator implements Serializable {
* navigation state, but could return different views for different states.
* Its <code>getViewName(String navigationState)</code> should return
* <code>navigationState</code>.
- *
+ *
* @param provider
*/
public void setErrorProvider(ViewProvider provider) {
@@ -972,7 +974,7 @@ public class Navigator implements Serializable {
* beforeViewChange()}) and after (
* {@link ViewChangeListener#afterViewChange(ViewChangeEvent)
* afterViewChange()}) a view change occurs.
- *
+ *
* @param listener
* Listener to invoke during a view change.
*/
@@ -982,7 +984,7 @@ public class Navigator implements Serializable {
/**
* Removes a view change listener.
- *
+ *
* @param listener
* Listener to remove.
*/
@@ -992,7 +994,7 @@ public class Navigator implements Serializable {
/**
* Get view provider that handles the given {@code state}.
- *
+ *
* @param state
* state string
* @return suitable provider
@@ -1002,9 +1004,8 @@ public class Navigator implements Serializable {
ViewProvider longestViewNameProvider = null;
for (ViewProvider provider : providers) {
String viewName = provider.getViewName(state);
- if (null != viewName
- && (longestViewName == null || viewName.length() > longestViewName
- .length())) {
+ if (null != viewName && (longestViewName == null
+ || viewName.length() > longestViewName.length())) {
longestViewName = viewName;
longestViewNameProvider = provider;
}
@@ -1015,7 +1016,7 @@ public class Navigator implements Serializable {
/**
* Creates view change event for given {@code view}, {@code viewName} and
* {@code parameters}.
- *
+ *
* @since 7.6.7
* @return view change event
*/
diff --git a/server/src/main/java/com/vaadin/navigator/View.java b/server/src/main/java/com/vaadin/navigator/View.java
index 76b76f5520..826a199fc3 100644
--- a/server/src/main/java/com/vaadin/navigator/View.java
+++ b/server/src/main/java/com/vaadin/navigator/View.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,10 +23,10 @@ import com.vaadin.ui.Component;
/**
* Interface for all views controlled by the navigator.
- *
+ *
* Each view added to the navigator must implement this interface. Typically, a
* view is a {@link Component}.
- *
+ *
* @author Vaadin Ltd
* @since 7.0
*/
@@ -34,16 +34,16 @@ public interface View extends Serializable {
/**
* This view is navigated to.
- *
+ *
* This method is always called before the view is shown on screen.
* {@link ViewChangeEvent#getParameters() event.getParameters()} may contain
* extra parameters relevant to the view.
- *
+ *
* @param event
* ViewChangeEvent representing the view change that is
* occurring. {@link ViewChangeEvent#getNewView()
* event.getNewView()} returns <code>this</code>.
- *
+ *
*/
public void enter(ViewChangeEvent event);
}
diff --git a/server/src/main/java/com/vaadin/navigator/ViewChangeListener.java b/server/src/main/java/com/vaadin/navigator/ViewChangeListener.java
index 7d3f2b6044..18859d8c9e 100644
--- a/server/src/main/java/com/vaadin/navigator/ViewChangeListener.java
+++ b/server/src/main/java/com/vaadin/navigator/ViewChangeListener.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,10 +21,10 @@ import java.util.EventObject;
/**
* Interface for listening to View changes before and after they occur.
- *
+ *
* Implementations of this interface can also block navigation between views
* before it is performed.
- *
+ *
* @author Vaadin Ltd
* @since 7.0
*/
@@ -41,7 +41,7 @@ public interface ViewChangeListener extends Serializable {
/**
* Create a new view change event.
- *
+ *
* @param navigator
* Navigator that triggered the event, not null
*/
@@ -56,7 +56,7 @@ public interface ViewChangeListener extends Serializable {
/**
* Returns the navigator that triggered this event.
- *
+ *
* @return Navigator (not null)
*/
public Navigator getNavigator() {
@@ -65,7 +65,7 @@ public interface ViewChangeListener extends Serializable {
/**
* Returns the view being deactivated.
- *
+ *
* @return old View
*/
public View getOldView() {
@@ -74,7 +74,7 @@ public interface ViewChangeListener extends Serializable {
/**
* Returns the view being activated.
- *
+ *
* @return new View
*/
public View getNewView() {
@@ -83,7 +83,7 @@ public interface ViewChangeListener extends Serializable {
/**
* Returns the view name of the view being activated.
- *
+ *
* @return view name of the new View
*/
public String getViewName() {
@@ -92,7 +92,7 @@ public interface ViewChangeListener extends Serializable {
/**
* Returns the parameters for the view being activated.
- *
+ *
* @return navigation parameters (potentially bookmarkable) for the new
* view
*/
@@ -111,7 +111,7 @@ public interface ViewChangeListener extends Serializable {
* know the view in question), it should return true. If any listener
* returns false, the view change is not allowed and
* <code>afterViewChange()</code> methods are not called.
- *
+ *
* @param event
* view change event
* @return true if the view change should be allowed or this listener does
@@ -124,7 +124,7 @@ public interface ViewChangeListener extends Serializable {
* method blocked the view change, this method is not called. Be careful of
* unbounded recursion if you decide to change the view again in the
* listener.
- *
+ *
* @param event
* view change event
*/
diff --git a/server/src/main/java/com/vaadin/navigator/ViewDisplay.java b/server/src/main/java/com/vaadin/navigator/ViewDisplay.java
index 36aa5dadc2..a5700ebbdd 100644
--- a/server/src/main/java/com/vaadin/navigator/ViewDisplay.java
+++ b/server/src/main/java/com/vaadin/navigator/ViewDisplay.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,10 +20,10 @@ import java.io.Serializable;
/**
* Interface for displaying a view in an appropriate location.
- *
+ *
* The view display can be a component/layout itself or can modify a separate
* layout.
- *
+ *
* @author Vaadin Ltd
* @since 7.0
*/
@@ -31,9 +31,9 @@ public interface ViewDisplay extends Serializable {
/**
* Remove previously shown view and show the newly selected view in its
* place.
- *
+ *
* The parameters for the view have been set before this method is called.
- *
+ *
* @param view
* new view to show
*/
diff --git a/server/src/main/java/com/vaadin/navigator/ViewProvider.java b/server/src/main/java/com/vaadin/navigator/ViewProvider.java
index ecf4e51073..6846e63b60 100644
--- a/server/src/main/java/com/vaadin/navigator/ViewProvider.java
+++ b/server/src/main/java/com/vaadin/navigator/ViewProvider.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,11 +21,11 @@ import java.io.Serializable;
/**
* A provider for view instances that can return pre-registered views or
* dynamically create new views.
- *
+ *
* If multiple providers are used, {@link #getViewName(String)} of each is
* called (in registration order) until one of them returns a non-null value.
* The {@link #getView(String)} method of that provider is then used.
- *
+ *
* @author Vaadin Ltd
* @since 7.0
*/
@@ -34,7 +34,7 @@ public interface ViewProvider extends Serializable {
* Extract the view name from a combined view name and parameter string.
* This method should return a view name if and only if this provider
* handles creation of such views.
- *
+ *
* @param viewAndParameters
* string with view name and its fragment parameters (if given),
* not null
@@ -44,10 +44,10 @@ public interface ViewProvider extends Serializable {
/**
* Create or return a pre-created instance of a view.
- *
+ *
* The parameters for the view are set separately by the navigator when the
* view is activated.
- *
+ *
* @param viewName
* name of the view, not null
* @return newly created view (null if none available for the view name)
diff --git a/server/src/main/java/com/vaadin/server/AbstractClientConnector.java b/server/src/main/java/com/vaadin/server/AbstractClientConnector.java
index c624663d50..ca850e4a66 100644
--- a/server/src/main/java/com/vaadin/server/AbstractClientConnector.java
+++ b/server/src/main/java/com/vaadin/server/AbstractClientConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -50,12 +50,12 @@ import elemental.json.JsonObject;
/**
* An abstract base class for ClientConnector implementations. This class
* provides all the basic functionality required for connectors.
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
-public abstract class AbstractClientConnector implements ClientConnector,
- MethodEventSource {
+public abstract class AbstractClientConnector
+ implements ClientConnector, MethodEventSource {
/**
* A map from client to server RPC interface class name to the RPC call
* manager that handles incoming RPC calls for that interface.
@@ -135,7 +135,9 @@ public abstract class AbstractClientConnector implements ClientConnector,
/* Documentation copied from interface */
@Override
public void markAsDirty() {
- assert getSession() == null || getSession().hasLock() : buildLockAssertMessage("markAsDirty()");
+ assert getSession() == null
+ || getSession().hasLock() : buildLockAssertMessage(
+ "markAsDirty()");
UI uI = getUI();
if (uI != null) {
uI.getConnectorTracker().markDirty(this);
@@ -153,12 +155,12 @@ public abstract class AbstractClientConnector implements ClientConnector,
/**
* Registers an RPC interface implementation for this component.
- *
+ *
* A component can listen to multiple RPC interfaces, and subclasses can
* register additional implementations.
- *
+ *
* @since 7.0
- *
+ *
* @param implementation
* RPC interface implementation
* @param rpcInterfaceType
@@ -167,18 +169,18 @@ public abstract class AbstractClientConnector implements ClientConnector,
*/
protected <T extends ServerRpc> void registerRpc(T implementation,
Class<T> rpcInterfaceType) {
- rpcManagerMap.put(rpcInterfaceType.getName(), new ServerRpcManager<T>(
- implementation, rpcInterfaceType));
+ rpcManagerMap.put(rpcInterfaceType.getName(),
+ new ServerRpcManager<T>(implementation, rpcInterfaceType));
}
/**
* Registers an RPC interface implementation for this component.
- *
+ *
* A component can listen to multiple RPC interfaces, and subclasses can
* register additional implementations.
- *
+ *
* @since 7.0
- *
+ *
* @param implementation
* RPC interface implementation. Also used to deduce the type.
*/
@@ -202,7 +204,8 @@ public abstract class AbstractClientConnector implements ClientConnector,
}
@SuppressWarnings("unchecked")
- private Class<ServerRpc> getServerRpcInterface(Class<?> implementationClass) {
+ private Class<ServerRpc> getServerRpcInterface(
+ Class<?> implementationClass) {
Class<ServerRpc> serverRpcClass = null;
if (implementationClass != null) {
for (Class<?> candidateInterface : implementationClass
@@ -229,7 +232,7 @@ public abstract class AbstractClientConnector implements ClientConnector,
* state will be sent to the client. Use {@code getState(false)} to avoid
* marking the connector as dirty.
* </p>
- *
+ *
* @return The shared state for this connector. Never null.
*/
protected SharedState getState() {
@@ -238,16 +241,18 @@ public abstract class AbstractClientConnector implements ClientConnector,
/**
* Returns the shared state for this connector.
- *
+ *
* @param markAsDirty
* true if the connector should automatically be marked dirty,
* false otherwise
- *
+ *
* @return The shared state for this connector. Never null.
* @see #getState()
*/
protected SharedState getState(boolean markAsDirty) {
- assert getSession() == null || getSession().hasLock() : buildLockAssertMessage("getState()");
+ assert getSession() == null
+ || getSession().hasLock() : buildLockAssertMessage(
+ "getState()");
if (null == sharedState) {
sharedState = createState();
@@ -279,18 +284,18 @@ public abstract class AbstractClientConnector implements ClientConnector,
* <p>
* No configuration of the values of the state should be performed in
* {@link #createState()}.
- *
+ *
* @since 7.0
- *
+ *
* @return new shared state object
*/
protected SharedState createState() {
try {
return getStateType().newInstance();
} catch (Exception e) {
- throw new RuntimeException(
- "Error creating state of type " + getStateType().getName()
- + " for " + getClass().getName(), e);
+ throw new RuntimeException("Error creating state of type "
+ + getStateType().getName() + " for " + getClass().getName(),
+ e);
}
}
@@ -326,23 +331,23 @@ public abstract class AbstractClientConnector implements ClientConnector,
// Try in superclass instead
class1 = class1.getSuperclass();
}
- throw new NoSuchMethodException(getClass().getCanonicalName()
- + ".getState()");
+ throw new NoSuchMethodException(
+ getClass().getCanonicalName() + ".getState()");
} catch (Exception e) {
- throw new RuntimeException("Error finding state type for "
- + getClass().getName(), e);
+ throw new RuntimeException(
+ "Error finding state type for " + getClass().getName(), e);
}
}
/**
* Returns an RPC proxy for a given server to client RPC interface for this
* component.
- *
+ *
* TODO more javadoc, subclasses, ...
- *
+ *
* @param rpcInterface
* RPC interface type
- *
+ *
* @since 7.0
*/
protected <T extends ClientRpc> T getRpcProxy(final Class<T> rpcInterface) {
@@ -365,8 +370,8 @@ public abstract class AbstractClientConnector implements ClientConnector,
}
}
- private class RpcInvocationHandler implements InvocationHandler,
- Serializable {
+ private class RpcInvocationHandler
+ implements InvocationHandler, Serializable {
private String rpcInterfaceName;
@@ -390,14 +395,14 @@ public abstract class AbstractClientConnector implements ClientConnector,
/**
* For internal use: adds a method invocation to the pending RPC call queue.
- *
+ *
* @param interfaceName
* RPC interface name
* @param method
* RPC method
* @param parameters
* RPC all parameters
- *
+ *
* @since 7.0
*/
protected void addMethodInvocationToQueue(String interfaceName,
@@ -440,7 +445,7 @@ public abstract class AbstractClientConnector implements ClientConnector,
/**
* Finds the {@link VaadinSession} to which this connector belongs. If the
* connector has not been attached, <code>null</code> is returned.
- *
+ *
* @return The connector's session, or <code>null</code> if not attached
*/
protected VaadinSession getSession() {
@@ -456,7 +461,7 @@ public abstract class AbstractClientConnector implements ClientConnector,
* Finds a UI ancestor of this connector. <code>null</code> is returned if
* no UI ancestor is found (typically because the connector is not attached
* to a proper hierarchy).
- *
+ *
* @return the UI ancestor of this connector, or <code>null</code> if none
* is found.
*/
@@ -497,7 +502,7 @@ public abstract class AbstractClientConnector implements ClientConnector,
/**
* Get an Iterable for iterating over all child connectors, including both
* extensions and child components.
- *
+ *
* @param connector
* the connector to get children for
* @return an Iterable giving all child connectors.
@@ -568,7 +573,7 @@ public abstract class AbstractClientConnector implements ClientConnector,
/**
* Add an extension to this connector. This method is protected to allow
* extensions to select which targets they can extend.
- *
+ *
* @param extension
* the extension to add
*/
@@ -601,7 +606,7 @@ public abstract class AbstractClientConnector implements ClientConnector,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.server.ClientConnector#isAttached()
*/
@Override
@@ -624,7 +629,7 @@ public abstract class AbstractClientConnector implements ClientConnector,
/**
* {@inheritDoc}
- *
+ *
* <p>
* The {@link #getSession()} and {@link #getUI()} methods might return
* <code>null</code> after this method is called.
@@ -681,12 +686,12 @@ public abstract class AbstractClientConnector implements ClientConnector,
/**
* Gets a resource defined using {@link #setResource(String, Resource)} with
* the corresponding key.
- *
+ *
* @param key
* the string identifier of the resource
* @return a resource, or <code>null</code> if there's no resource
* associated with the given key
- *
+ *
* @see #setResource(String, Resource)
*/
protected Resource getResource(String key) {
@@ -700,7 +705,7 @@ public abstract class AbstractClientConnector implements ClientConnector,
* connector using
* {@link com.vaadin.terminal.gwt.client.ui.AbstractConnector#getResourceUrl(String)}
* with the same key.
- *
+ *
* @param key
* the string key to associate the resource with
* @param resource
@@ -708,8 +713,8 @@ public abstract class AbstractClientConnector implements ClientConnector,
* association.
*/
protected void setResource(String key, Resource resource) {
- ResourceReference resourceReference = ResourceReference.create(
- resource, this, key);
+ ResourceReference resourceReference = ResourceReference.create(resource,
+ this, key);
if (resourceReference == null) {
getState().resources.remove(key);
@@ -727,17 +732,17 @@ public abstract class AbstractClientConnector implements ClientConnector,
* have any arguments the event object will not be passed to it when it's
* called.
* </p>
- *
+ *
* <p>
* This method additionally informs the event-api to route events with the
* given eventIdentifier to the components handleEvent function call.
* </p>
- *
+ *
* <p>
* For more information on the inheritable event mechanism see the
* {@link com.vaadin.event com.vaadin.event package documentation}.
* </p>
- *
+ *
* @param eventIdentifier
* the identifier of the event to listen for
* @param eventType
@@ -747,7 +752,7 @@ public abstract class AbstractClientConnector implements ClientConnector,
* the object instance who owns the activation method.
* @param method
* the activation method.
- *
+ *
* @since 6.2
*/
protected void addListener(String eventIdentifier, Class<?> eventType,
@@ -766,7 +771,7 @@ public abstract class AbstractClientConnector implements ClientConnector,
/**
* Checks if the given {@link Event} type is listened for this component.
- *
+ *
* @param eventType
* the event type to be checked
* @return true if a listener is registered for the given event type
@@ -781,18 +786,18 @@ public abstract class AbstractClientConnector implements ClientConnector,
* parameters, it will unregister all <code>object</code>'s methods that are
* registered to listen to events of type <code>eventType</code> generated
* by this component.
- *
+ *
* <p>
* This method additionally informs the event-api to stop routing events
* with the given eventIdentifier to the components handleEvent function
* call.
* </p>
- *
+ *
* <p>
* For more information on the inheritable event mechanism see the
* {@link com.vaadin.event com.vaadin.event package documentation}.
* </p>
- *
+ *
* @param eventIdentifier
* the identifier of the event to stop listening for
* @param eventType
@@ -800,7 +805,7 @@ public abstract class AbstractClientConnector implements ClientConnector,
* @param target
* the target object that has registered to listen to events of
* type <code>eventType</code> with one or more methods.
- *
+ *
* @since 6.2
*/
protected void removeListener(String eventIdentifier, Class<?> eventType,
@@ -821,12 +826,12 @@ public abstract class AbstractClientConnector implements ClientConnector,
* have any arguments the event object will not be passed to it when it's
* called.
* </p>
- *
+ *
* <p>
* For more information on the inheritable event mechanism see the
* {@link com.vaadin.event com.vaadin.event package documentation}.
* </p>
- *
+ *
* @param eventType
* the type of the listened event. Events of this type or its
* subclasses activate the listener.
@@ -834,7 +839,7 @@ public abstract class AbstractClientConnector implements ClientConnector,
* the object instance who owns the activation method.
* @param method
* the activation method.
- *
+ *
*/
@Override
public void addListener(Class<?> eventType, Object target, Method method) {
@@ -851,25 +856,25 @@ public abstract class AbstractClientConnector implements ClientConnector,
* activation method does not have any arguments the event object will not
* be passed to it when it's called.
* </p>
- *
+ *
* <p>
* This version of <code>addListener</code> gets the name of the activation
* method as a parameter. The actual method is reflected from
* <code>object</code>, and unless exactly one match is found,
* <code>java.lang.IllegalArgumentException</code> is thrown.
* </p>
- *
+ *
* <p>
* For more information on the inheritable event mechanism see the
* {@link com.vaadin.event com.vaadin.event package documentation}.
* </p>
- *
+ *
* <p>
* Note: Using this method is discouraged because it cannot be checked
* during compilation. Use {@link #addListener(Class, Object, Method)} or
* {@link #addListener(com.vaadin.ui.Component.Listener)} instead.
* </p>
- *
+ *
* @param eventType
* the type of the listened event. Events of this type or its
* subclasses activate the listener.
@@ -883,7 +888,8 @@ public abstract class AbstractClientConnector implements ClientConnector,
*/
@Override
@Deprecated
- public void addListener(Class<?> eventType, Object target, String methodName) {
+ public void addListener(Class<?> eventType, Object target,
+ String methodName) {
if (eventRouter == null) {
eventRouter = new EventRouter();
}
@@ -896,12 +902,12 @@ public abstract class AbstractClientConnector implements ClientConnector,
* parameters, it will unregister all <code>object</code>'s methods that are
* registered to listen to events of type <code>eventType</code> generated
* by this component.
- *
+ *
* <p>
* For more information on the inheritable event mechanism see the
* {@link com.vaadin.event com.vaadin.event package documentation}.
* </p>
- *
+ *
* @param eventType
* the exact event type the <code>object</code> listens to.
* @param target
@@ -919,12 +925,12 @@ public abstract class AbstractClientConnector implements ClientConnector,
* Removes one registered listener method. The given method owned by the
* given object will no longer be called when the specified events are
* generated by this component.
- *
+ *
* <p>
* For more information on the inheritable event mechanism see the
* {@link com.vaadin.event com.vaadin.event package documentation}.
* </p>
- *
+ *
* @param eventType
* the exact event type the <code>object</code> listens to.
* @param target
@@ -935,7 +941,8 @@ public abstract class AbstractClientConnector implements ClientConnector,
* listen to events of type <code>eventType</code>.
*/
@Override
- public void removeListener(Class<?> eventType, Object target, Method method) {
+ public void removeListener(Class<?> eventType, Object target,
+ Method method) {
if (eventRouter != null) {
eventRouter.removeListener(eventType, target, method);
}
@@ -947,19 +954,19 @@ public abstract class AbstractClientConnector implements ClientConnector,
* given object will no longer be called when the specified events are
* generated by this component.
* </p>
- *
+ *
* <p>
* This version of <code>removeListener</code> gets the name of the
* activation method as a parameter. The actual method is reflected from
* <code>target</code>, and unless exactly one match is found,
* <code>java.lang.IllegalArgumentException</code> is thrown.
* </p>
- *
+ *
* <p>
* For more information on the inheritable event mechanism see the
* {@link com.vaadin.event com.vaadin.event package documentation}.
* </p>
- *
+ *
* @param eventType
* the exact event type the <code>object</code> listens to.
* @param target
@@ -983,7 +990,7 @@ public abstract class AbstractClientConnector implements ClientConnector,
/**
* Returns all listeners that are registered for the given event type or one
* of its subclasses.
- *
+ *
* @param eventType
* The type of event to return listeners for.
* @return A collection with all registered listeners. Empty if no listeners
@@ -999,7 +1006,7 @@ public abstract class AbstractClientConnector implements ClientConnector,
/**
* Sends the event to all listeners.
- *
+ *
* @param event
* the Event to be sent to all listeners.
*/
@@ -1011,7 +1018,7 @@ public abstract class AbstractClientConnector implements ClientConnector,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.server.ClientConnector#getErrorHandler()
*/
@Override
@@ -1021,7 +1028,7 @@ public abstract class AbstractClientConnector implements ClientConnector,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.server.ClientConnector#setErrorHandler(com.vaadin.server.
* ErrorHandler)
*/
@@ -1032,7 +1039,7 @@ public abstract class AbstractClientConnector implements ClientConnector,
/*
* (non-Javadoc)
- *
+ *
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
@@ -1059,7 +1066,7 @@ public abstract class AbstractClientConnector implements ClientConnector,
* by the proxy to actually be called on the underlying instance.
* <p>
* See #14639
- *
+ *
* @deprecated only defined for framework hacks, do not use.
*/
@Deprecated
@@ -1069,7 +1076,7 @@ public abstract class AbstractClientConnector implements ClientConnector,
/*
* (non-Javadoc)
- *
+ *
* @see java.lang.Object#hashCode()
*/
@Override
diff --git a/server/src/main/java/com/vaadin/server/AbstractDeploymentConfiguration.java b/server/src/main/java/com/vaadin/server/AbstractDeploymentConfiguration.java
index 2554e421c8..b1e4413508 100644
--- a/server/src/main/java/com/vaadin/server/AbstractDeploymentConfiguration.java
+++ b/server/src/main/java/com/vaadin/server/AbstractDeploymentConfiguration.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -18,13 +18,13 @@ package com.vaadin.server;
/**
* An abstract base class for DeploymentConfiguration implementations. This
* class provides default implementation for common config properties.
- *
+ *
* @since 7.4
- *
+ *
* @author Vaadin Ltd
*/
-public abstract class AbstractDeploymentConfiguration implements
- DeploymentConfiguration {
+public abstract class AbstractDeploymentConfiguration
+ implements DeploymentConfiguration {
@Override
public String getUIClassName() {
diff --git a/server/src/main/java/com/vaadin/server/AbstractErrorMessage.java b/server/src/main/java/com/vaadin/server/AbstractErrorMessage.java
index b56521993a..bbf0fa7240 100644
--- a/server/src/main/java/com/vaadin/server/AbstractErrorMessage.java
+++ b/server/src/main/java/com/vaadin/server/AbstractErrorMessage.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,10 +26,10 @@ import com.vaadin.data.Validator;
/**
* Base class for component error messages.
- *
+ *
* This class is used on the server side to construct the error messages to send
* to the client.
- *
+ *
* @since 7.0
*/
public abstract class AbstractErrorMessage implements ErrorMessage {
@@ -46,7 +46,7 @@ public abstract class AbstractErrorMessage implements ErrorMessage {
/**
* Content mode, where the error contains HTML.
- *
+ *
*/
HTML,
}
diff --git a/server/src/main/java/com/vaadin/server/AbstractExtension.java b/server/src/main/java/com/vaadin/server/AbstractExtension.java
index c72cc9cb39..513084c179 100644
--- a/server/src/main/java/com/vaadin/server/AbstractExtension.java
+++ b/server/src/main/java/com/vaadin/server/AbstractExtension.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ package com.vaadin.server;
* AbstractExtension adds a mechanism for adding the extension to any Connector
* (extend). To let the Extension determine what kind target it can be added to,
* the extend method is declared as protected.
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
@@ -44,9 +44,9 @@ public abstract class AbstractExtension extends AbstractClientConnector
/**
* Creates a new extension instance that extends the provided connector.
- *
+ *
* @since 7.4
- *
+ *
* @param target
* the connector to extend
*/
@@ -59,7 +59,7 @@ public abstract class AbstractExtension extends AbstractClientConnector
* Gets a type that the parent must be an instance of. Override this if the
* extension only support certain targets, e.g. if only TextFields can be
* extended.
- *
+ *
* @return a type that the parent must be an instance of
*/
protected Class<? extends ClientConnector> getSupportedParentType() {
@@ -69,7 +69,7 @@ public abstract class AbstractExtension extends AbstractClientConnector
/**
* Add this extension to the target connector. This method is protected to
* allow subclasses to require a more specific type of target.
- *
+ *
* @param target
* the connector to attach this extension to
*/
@@ -103,7 +103,7 @@ public abstract class AbstractExtension extends AbstractClientConnector
/**
* Actually sets the parent and calls required listeners.
- *
+ *
* @since 7.1
* @param parent
* The parent to set
diff --git a/server/src/main/java/com/vaadin/server/AbstractJavaScriptExtension.java b/server/src/main/java/com/vaadin/server/AbstractJavaScriptExtension.java
index 0bfee4c20f..56e258ded8 100644
--- a/server/src/main/java/com/vaadin/server/AbstractJavaScriptExtension.java
+++ b/server/src/main/java/com/vaadin/server/AbstractJavaScriptExtension.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -39,7 +39,7 @@ import elemental.json.JsonValue;
* , then <code>com_example_SuperExtension</code> will also be attempted if
* <code>com_example_MyExtension</code> has not been defined.
* <p>
- *
+ *
* The initialization function will be called with <code>this</code> pointing to
* a connector wrapper object providing integration to Vaadin. Please note that
* in JavaScript, <code>this</code> is not necessarily defined inside callback
@@ -92,16 +92,18 @@ import elemental.json.JsonValue;
* the field, that function is called whenever the contents of the shared state
* is changed.</li>
* <li><code>onUnregister</code> - If the JavaScript code assigns a function to
- * the field, that function is called when the connector has been unregistered.</li>
+ * the field, that function is called when the connector has been
+ * unregistered.</li>
* <li>Any field name corresponding to a call to
* {@link #addFunction(String, JavaScriptFunction)} on the server will
* automatically be present as a function that triggers the registered function
* on the server.</li>
* <li>Any field name referred to using {@link #callFunction(String, Object...)}
- * on the server will be called if a function has been assigned to the field.</li>
+ * on the server will be called if a function has been assigned to the
+ * field.</li>
* </ul>
* <p>
- *
+ *
* Values in the Shared State and in RPC calls are converted between Java and
* JavaScript using the following conventions:
* <ul>
@@ -113,7 +115,8 @@ import elemental.json.JsonValue;
* <li>Java Strings are represented by JavaScript strings.</li>
* <li>Java Dates are represented by JavaScript numbers containing the timestamp
* </li>
- * <li>List, Set and all arrays in Java are represented by JavaScript arrays.</li>
+ * <li>List, Set and all arrays in Java are represented by JavaScript
+ * arrays.</li>
* <li>Map&lt;String, ?&gt; in Java is represented by JavaScript object with
* fields corresponding to the map keys.</li>
* <li>Any other Java Map is represented by a JavaScript array containing two
@@ -127,7 +130,7 @@ import elemental.json.JsonValue;
* here. Please refer to the documentation for specific types for serialization
* information.</li>
* </ul>
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
@@ -145,9 +148,9 @@ public abstract class AbstractJavaScriptExtension extends AbstractExtension {
/**
* Creates a new JavaScript extension extending the provided connector.
- *
+ *
* @since 7.4
- *
+ *
* @param target
* the connector to extend
*/
@@ -170,14 +173,15 @@ public abstract class AbstractJavaScriptExtension extends AbstractExtension {
* available as <code>this</code>). Calling that JavaScript function will
* cause the call method in the registered {@link JavaScriptFunction} to be
* invoked with the same arguments.
- *
+ *
* @param functionName
* the name that should be used for client-side callback
* @param function
* the {@link JavaScriptFunction} object that will be invoked
* when the JavaScript function is called
*/
- protected void addFunction(String functionName, JavaScriptFunction function) {
+ protected void addFunction(String functionName,
+ JavaScriptFunction function) {
callbackHelper.registerCallback(functionName, function);
}
@@ -190,7 +194,7 @@ public abstract class AbstractJavaScriptExtension extends AbstractExtension {
* before sending. This can be done either with
* {@link JsonCodec#encode(Object, JsonValue, java.lang.reflect.Type, com.vaadin.ui.ConnectorTracker)}
* or using the factory methods in {@link Json}.
- *
+ *
* @param name
* the name of the function
* @param arguments
diff --git a/server/src/main/java/com/vaadin/server/BootstrapFragmentResponse.java b/server/src/main/java/com/vaadin/server/BootstrapFragmentResponse.java
index 14a12a20ec..050645f524 100644
--- a/server/src/main/java/com/vaadin/server/BootstrapFragmentResponse.java
+++ b/server/src/main/java/com/vaadin/server/BootstrapFragmentResponse.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ import com.vaadin.ui.UI;
* A representation of a bootstrap fragment being generated. The bootstrap
* fragment is the HTML code that will make up the actual application. This also
* includes the JavaScript that initializes the application.
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
@@ -35,10 +35,10 @@ public class BootstrapFragmentResponse extends BootstrapResponse {
/**
* Crate a new bootstrap fragment response.
- *
+ *
* @see BootstrapResponse#BootstrapResponse(BootstrapHandler, VaadinRequest,
* VaadinSession, Class)
- *
+ *
* @param handler
* the bootstrap handler that is firing the event
* @param request
@@ -67,7 +67,7 @@ public class BootstrapFragmentResponse extends BootstrapResponse {
* Gets the list of DOM nodes that will be used to generate the fragment
* HTML. Changes to the returned list will be reflected in the generated
* HTML.
- *
+ *
* @return the current list of DOM nodes that makes up the application
* fragment
*/
diff --git a/server/src/main/java/com/vaadin/server/BootstrapHandler.java b/server/src/main/java/com/vaadin/server/BootstrapHandler.java
index c139d5443c..74707842d8 100644
--- a/server/src/main/java/com/vaadin/server/BootstrapHandler.java
+++ b/server/src/main/java/com/vaadin/server/BootstrapHandler.java
@@ -134,8 +134,8 @@ public abstract class BootstrapHandler extends SynchronizedRequestHandler {
UICreateEvent event = new UICreateEvent(getRequest(),
getUIClass());
- pushMode = getBootstrapResponse().getUIProvider().getPushMode(
- event);
+ pushMode = getBootstrapResponse().getUIProvider()
+ .getPushMode(event);
if (pushMode == null) {
pushMode = getRequest().getService()
.getDeploymentConfiguration().getPushMode();
@@ -192,8 +192,8 @@ public abstract class BootstrapHandler extends SynchronizedRequestHandler {
@Override
protected String getVaadinDirUrl() {
- return context.getApplicationParameters().getString(
- ApplicationConstants.VAADIN_DIR_URL);
+ return context.getApplicationParameters()
+ .getString(ApplicationConstants.VAADIN_DIR_URL);
}
@Override
@@ -203,12 +203,14 @@ public abstract class BootstrapHandler extends SynchronizedRequestHandler {
@Override
protected String getServiceUrlParameterName() {
- return getConfigOrNull(ApplicationConstants.SERVICE_URL_PARAMETER_NAME);
+ return getConfigOrNull(
+ ApplicationConstants.SERVICE_URL_PARAMETER_NAME);
}
@Override
protected String getServiceUrl() {
- String serviceUrl = getConfigOrNull(ApplicationConstants.SERVICE_URL);
+ String serviceUrl = getConfigOrNull(
+ ApplicationConstants.SERVICE_URL);
if (serviceUrl == null) {
return "./";
} else if (!serviceUrl.endsWith("/")) {
@@ -303,8 +305,8 @@ public abstract class BootstrapHandler extends SynchronizedRequestHandler {
if (vaadinService.isStandalone(request)) {
Map<String, Object> headers = new LinkedHashMap<String, Object>();
Document document = Document.createShell("");
- BootstrapPageResponse pageResponse = new BootstrapPageResponse(
- this, request, context.getSession(), context.getUIClass(),
+ BootstrapPageResponse pageResponse = new BootstrapPageResponse(this,
+ request, context.getSession(), context.getUIClass(),
document, headers, fragmentResponse.getUIProvider());
List<Node> fragmentNodes = fragmentResponse.getFragmentNodes();
Element body = document.body();
@@ -342,7 +344,8 @@ public abstract class BootstrapHandler extends SynchronizedRequestHandler {
response.setDateHeader(header.getKey(),
((Long) value).longValue());
} else {
- throw new RuntimeException("Unsupported header value: " + value);
+ throw new RuntimeException(
+ "Unsupported header value: " + value);
}
}
}
@@ -350,8 +353,8 @@ public abstract class BootstrapHandler extends SynchronizedRequestHandler {
private void writeBootstrapPage(VaadinResponse response, String html)
throws IOException {
response.setContentType("text/html");
- BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(
- response.getOutputStream(), "UTF-8"));
+ BufferedWriter writer = new BufferedWriter(
+ new OutputStreamWriter(response.getOutputStream(), "UTF-8"));
writer.append(html);
writer.close();
}
@@ -403,13 +406,14 @@ public abstract class BootstrapHandler extends SynchronizedRequestHandler {
} catch (Exception e) {
throw new RuntimeException(
"Error processing viewport generator "
- + viewportGeneratorClass.getCanonicalName(), e);
+ + viewportGeneratorClass.getCanonicalName(),
+ e);
}
}
if (viewportContent != null) {
- head.appendElement("meta").attr("name", "viewport")
- .attr("content", viewportContent);
+ head.appendElement("meta").attr("name", "viewport").attr("content",
+ viewportContent);
}
String title = response.getUIProvider().getPageTitle(
@@ -477,12 +481,12 @@ public abstract class BootstrapHandler extends SynchronizedRequestHandler {
UICreateEvent event = new UICreateEvent(context.getRequest(),
context.getUIClass());
- WidgetsetInfo widgetset = context.getBootstrapResponse()
- .getUIProvider().getWidgetsetInfo(event);
+ WidgetsetInfo widgetset = context.getBootstrapResponse().getUIProvider()
+ .getWidgetsetInfo(event);
if (widgetset == null) {
// TODO do we want to move WidgetsetInfoImpl elsewhere?
- widgetset = new WidgetsetInfoImpl(request.getService()
- .getConfiguredWidgetset(request));
+ widgetset = new WidgetsetInfoImpl(
+ request.getService().getConfiguredWidgetset(request));
}
return widgetset;
@@ -523,8 +527,8 @@ public abstract class BootstrapHandler extends SynchronizedRequestHandler {
mainDiv.attr("style", style);
}
mainDiv.appendElement("div").addClass("v-app-loading");
- mainDiv.appendElement("noscript")
- .append("You have to enable javascript in your browser to use an application built with Vaadin.");
+ mainDiv.appendElement("noscript").append(
+ "You have to enable javascript in your browser to use an application built with Vaadin.");
fragmentNodes.add(mainDiv);
VaadinRequest request = context.getRequest();
@@ -548,28 +552,29 @@ public abstract class BootstrapHandler extends SynchronizedRequestHandler {
pushJS += versionQueryParam;
- fragmentNodes.add(new Element(Tag.valueOf("script"), "").attr(
- "type", "text/javascript").attr("src", pushJS));
+ fragmentNodes.add(new Element(Tag.valueOf("script"), "")
+ .attr("type", "text/javascript").attr("src", pushJS));
}
String bootstrapLocation = vaadinLocation
+ ApplicationConstants.VAADIN_BOOTSTRAP_JS + versionQueryParam;
- fragmentNodes.add(new Element(Tag.valueOf("script"), "").attr("type",
- "text/javascript").attr("src", bootstrapLocation));
- Element mainScriptTag = new Element(Tag.valueOf("script"), "").attr(
- "type", "text/javascript");
+ fragmentNodes.add(new Element(Tag.valueOf("script"), "")
+ .attr("type", "text/javascript")
+ .attr("src", bootstrapLocation));
+ Element mainScriptTag = new Element(Tag.valueOf("script"), "")
+ .attr("type", "text/javascript");
StringBuilder builder = new StringBuilder();
builder.append("//<![CDATA[\n");
- builder.append("if (!window.vaadin) alert("
- + JsonUtil.quote("Failed to load the bootstrap javascript: "
- + bootstrapLocation) + ");\n");
+ builder.append("if (!window.vaadin) alert(" + JsonUtil.quote(
+ "Failed to load the bootstrap javascript: " + bootstrapLocation)
+ + ");\n");
appendMainScriptTagContents(context, builder);
builder.append("//]]>");
- mainScriptTag.appendChild(new DataNode(builder.toString(),
- mainScriptTag.baseUri()));
+ mainScriptTag.appendChild(
+ new DataNode(builder.toString(), mainScriptTag.baseUri()));
fragmentNodes.add(mainScriptTag);
}
@@ -587,9 +592,11 @@ public abstract class BootstrapHandler extends SynchronizedRequestHandler {
* side Profiler if another implementation hasn't already been
* added.
*/
- builder.append("if (typeof window.__gwtStatsEvent != 'function') {\n");
+ builder.append(
+ "if (typeof window.__gwtStatsEvent != 'function') {\n");
builder.append("vaadin.gwtStatsEvents = [];\n");
- builder.append("window.__gwtStatsEvent = function(event) {vaadin.gwtStatsEvents.push(event); return true;};\n");
+ builder.append(
+ "window.__gwtStatsEvent = function(event) {vaadin.gwtStatsEvents.push(event); return true;};\n");
builder.append("}\n");
}
@@ -622,8 +629,8 @@ public abstract class BootstrapHandler extends SynchronizedRequestHandler {
}
// Ignore restartApplication that might be passed to UI init
- if (request
- .getParameter(VaadinService.URL_PARAMETER_RESTART_APPLICATION) != null) {
+ if (request.getParameter(
+ VaadinService.URL_PARAMETER_RESTART_APPLICATION) != null) {
appConfig.put("extraParams", "&" + IGNORE_RESTART_PARAM + "=1");
}
diff --git a/server/src/main/java/com/vaadin/server/BootstrapListener.java b/server/src/main/java/com/vaadin/server/BootstrapListener.java
index 374268dbdc..fbd1357632 100644
--- a/server/src/main/java/com/vaadin/server/BootstrapListener.java
+++ b/server/src/main/java/com/vaadin/server/BootstrapListener.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ import javax.portlet.RenderResponse;
* send to the client. The bootstrap HTML is first constructed as an in-memory
* DOM representation which registered listeners can modify before the final
* HTML is generated.
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
@@ -36,7 +36,7 @@ public interface BootstrapListener extends EventListener, Serializable {
* Vaadin application. In a typical Servlet deployment, this is the contents
* of the HTML body tag. In a typical Portlet deployment, this is the HTML
* that will be returned in a {@link RenderResponse}.
- *
+ *
* @param response
* the bootstrap response that can modified to cause changes in
* the generated HTML.
@@ -52,7 +52,7 @@ public interface BootstrapListener extends EventListener, Serializable {
* If a full page is being generated, this method is invoked after
* {@link #modifyBootstrapFragment(BootstrapFragmentResponse)} has been
* invoked for all registered listeners.
- *
+ *
* @param response
* the bootstrap response that can be modified to cause change in
* the generate HTML and in the HTTP headers of the response.
diff --git a/server/src/main/java/com/vaadin/server/BootstrapPageResponse.java b/server/src/main/java/com/vaadin/server/BootstrapPageResponse.java
index e57ed413f0..9583783fd1 100644
--- a/server/src/main/java/com/vaadin/server/BootstrapPageResponse.java
+++ b/server/src/main/java/com/vaadin/server/BootstrapPageResponse.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ import com.vaadin.ui.UI;
* A representation of a bootstrap page being generated. The bootstrap page
* contains of the full DOM of the HTML document as well as the HTTP headers
* that will be included in the corresponding HTTP response.
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
@@ -37,10 +37,10 @@ public class BootstrapPageResponse extends BootstrapResponse {
/**
* Crate a new bootstrap page response.
- *
+ *
* @see BootstrapResponse#BootstrapResponse(BootstrapHandler, VaadinRequest,
* VaadinSession, Class)
- *
+ *
* @param handler
* the bootstrap handler that is firing the event
* @param request
@@ -70,9 +70,9 @@ public class BootstrapPageResponse extends BootstrapResponse {
/**
* Sets a header value that will be added to the HTTP response. If the
* header had already been set, the new value overwrites the previous one.
- *
+ *
* @see VaadinResponse#setHeader(String, String)
- *
+ *
* @param name
* the name of the header
* @param value
@@ -86,10 +86,10 @@ public class BootstrapPageResponse extends BootstrapResponse {
* Properly formats a timestamp as a date in a header that will be included
* in the HTTP response. If the header had already been set, the new value
* overwrites the previous one.
- *
+ *
* @see #setHeader(String, String)
* @see VaadinResponse#setDateHeader(String, long)
- *
+ *
* @param name
* the name of the header
* @param timestamp
@@ -103,7 +103,7 @@ public class BootstrapPageResponse extends BootstrapResponse {
* Gets the document node representing the root of the DOM hierarchy that
* will be used to generate the HTML page. Changes to the document will be
* reflected in the HTML.
- *
+ *
* @return the document node
*/
public Document getDocument() {
diff --git a/server/src/main/java/com/vaadin/server/BootstrapResponse.java b/server/src/main/java/com/vaadin/server/BootstrapResponse.java
index 59e18d4c8a..84c395d003 100644
--- a/server/src/main/java/com/vaadin/server/BootstrapResponse.java
+++ b/server/src/main/java/com/vaadin/server/BootstrapResponse.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.ui.UI;
/**
* Base class providing common functionality used in different bootstrap
* modification events.
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
@@ -35,7 +35,7 @@ public abstract class BootstrapResponse extends EventObject {
/**
* Creates a new bootstrap event.
- *
+ *
* @param handler
* the bootstrap handler that is firing the event
* @param request
@@ -60,7 +60,7 @@ public abstract class BootstrapResponse extends EventObject {
/**
* Gets the bootstrap handler that fired this event
- *
+ *
* @return the bootstrap handler that fired this event
*/
public BootstrapHandler getBootstrapHandler() {
@@ -74,7 +74,7 @@ public abstract class BootstrapResponse extends EventObject {
* will not be available because the bootstrap page is generated before the
* bootstrap javascript has had a chance to send any information back to the
* server.
- *
+ *
* @return the Vaadin request that is being handled
*/
public VaadinRequest getRequest() {
@@ -83,7 +83,7 @@ public abstract class BootstrapResponse extends EventObject {
/**
* Gets the service session to which the rendered view belongs.
- *
+ *
* @return the Vaadin service session
*/
public VaadinSession getSession() {
@@ -93,7 +93,7 @@ public abstract class BootstrapResponse extends EventObject {
/**
* Gets the class of the UI that will be displayed on the generated
* bootstrap page.
- *
+ *
* @return the class of the UI
*/
public Class<? extends UI> getUiClass() {
@@ -103,7 +103,7 @@ public abstract class BootstrapResponse extends EventObject {
/**
* Gets the UI provider that is used to provide information about the
* bootstapped UI.
- *
+ *
* @return the UI provider
*/
public UIProvider getUIProvider() {
diff --git a/server/src/main/java/com/vaadin/server/BrowserWindowOpener.java b/server/src/main/java/com/vaadin/server/BrowserWindowOpener.java
index c1b8cbe91e..df490cfd74 100644
--- a/server/src/main/java/com/vaadin/server/BrowserWindowOpener.java
+++ b/server/src/main/java/com/vaadin/server/BrowserWindowOpener.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,7 +27,7 @@ import com.vaadin.ui.UI;
/**
* Component extension that opens a browser popup window when the extended
* component is clicked.
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
@@ -70,7 +70,7 @@ public class BrowserWindowOpener extends AbstractExtension {
/**
* Creates a window opener that will open windows containing the provided UI
* class
- *
+ *
* @param uiClass
* the UI class that should be opened when the extended component
* is clicked
@@ -82,7 +82,7 @@ public class BrowserWindowOpener extends AbstractExtension {
/**
* Creates a window opener that will open windows containing the provided UI
* using the provided path
- *
+ *
* @param uiClass
* the UI class that should be opened when the extended component
* is clicked
@@ -91,13 +91,14 @@ public class BrowserWindowOpener extends AbstractExtension {
*/
public BrowserWindowOpener(Class<? extends UI> uiClass, String path) {
// Create a Resource with a translated URL going to the VaadinService
- this(new ExternalResource(ApplicationConstants.APP_PROTOCOL_PREFIX
- + path), new BrowserWindowOpenerUIProvider(uiClass, path));
+ this(new ExternalResource(
+ ApplicationConstants.APP_PROTOCOL_PREFIX + path),
+ new BrowserWindowOpenerUIProvider(uiClass, path));
}
/**
* Creates a window opener that will open windows to the provided URL
- *
+ *
* @param url
* the URL to open in the window
*/
@@ -107,7 +108,7 @@ public class BrowserWindowOpener extends AbstractExtension {
/**
* Creates a window opener that will open window to the provided resource
- *
+ *
* @param resource
* the resource to open in the window
*/
@@ -129,9 +130,9 @@ public class BrowserWindowOpener extends AbstractExtension {
* Sets the provided URL {@code url} for this instance. The {@code url} will
* be opened in a new browser window/tab when the extended component is
* clicked.
- *
+ *
* @since 7.4
- *
+ *
* @param url
* URL to open
*/
@@ -143,9 +144,9 @@ public class BrowserWindowOpener extends AbstractExtension {
* Sets the provided {@code resource} for this instance. The
* {@code resource} will be opened in a new browser window/tab when the
* extended component is clicked.
- *
+ *
* @since 7.4
- *
+ *
* @param resource
* resource to open
*/
@@ -155,9 +156,9 @@ public class BrowserWindowOpener extends AbstractExtension {
/**
* Returns the resource for this instance.
- *
+ *
* @since 7.4
- *
+ *
* @return resource to open browser window
*/
public Resource getResource() {
@@ -168,9 +169,9 @@ public class BrowserWindowOpener extends AbstractExtension {
* Returns the URL for this BrowserWindowOpener instance. Returns
* {@code null} if this instance is not URL resource based (a non URL based
* resource has been set for it).
- *
+ *
* @since 7.4
- *
+ *
* @return URL to open in the new browser window/tab when the extended
* component is clicked
*/
@@ -188,7 +189,7 @@ public class BrowserWindowOpener extends AbstractExtension {
* replaced instead of opening a new window. If the name is
* <code>null</code> or <code>"_blank"</code>, a new window will always be
* opened.
- *
+ *
* @param windowName
* the target name for the window
*/
@@ -198,9 +199,9 @@ public class BrowserWindowOpener extends AbstractExtension {
/**
* Gets the target window name.
- *
+ *
* @see #setWindowName(String)
- *
+ *
* @return the window target string
*/
public String getWindowName() {
@@ -213,7 +214,7 @@ public class BrowserWindowOpener extends AbstractExtension {
* Sets the features for opening the window. See e.g.
* {@link https://developer.mozilla.org/en-US/docs/DOM/window.open#Position_and_size_features}
* for a description of the commonly supported features.
- *
+ *
* @param features a string with window features, or <code>null</code> to use the default features.
*/
// @formatter:on
@@ -223,7 +224,7 @@ public class BrowserWindowOpener extends AbstractExtension {
/**
* Gets the window features.
- *
+ *
* @see #setFeatures(String)
* @return
*/
@@ -269,7 +270,7 @@ public class BrowserWindowOpener extends AbstractExtension {
* new UI.
* <p>
* The default value is <code>null</code>.
- *
+ *
* @param uriFragment
* the URI fragment string that should be included in the opened
* URI, or <code>null</code> to preserve the original fragment of
@@ -281,10 +282,10 @@ public class BrowserWindowOpener extends AbstractExtension {
/**
* Gets that URI fragment configured for opened windows.
- *
+ *
* @return the URI fragment string, or <code>null</code> if no fragment is
* configured.
- *
+ *
* @see #setUriFragment(String)
*/
public String getUriFragment() {
@@ -299,12 +300,12 @@ public class BrowserWindowOpener extends AbstractExtension {
* <p>
* Setting a parameter with the same name as a previously set parameter will
* replace the previous value.
- *
+ *
* @param name
* the name of the parameter to add, not <code>null</code>
* @param value
* the value of the parameter to add, not <code>null</code>
- *
+ *
* @see #removeParameter(String)
* @see #getParameterNames()
* @see #getParameter(String)
@@ -320,10 +321,10 @@ public class BrowserWindowOpener extends AbstractExtension {
* Removes a parameter that has been set using
* {@link #setParameter(String, String)}. Removing a parameter that has not
* been set has no effect.
- *
+ *
* @param name
* the name of the parameter to remove, not <code>null</code>
- *
+ *
* @see #setParameter(String, String)
*/
public void removeParameter(String name) {
@@ -336,9 +337,9 @@ public class BrowserWindowOpener extends AbstractExtension {
/**
* Gets the names of all parameters set using
* {@link #setParameter(String, String)}.
- *
+ *
* @return an unmodifiable set of parameter names
- *
+ *
* @see #setParameter(String, String)
* @see #getParameter(String)
*/
@@ -350,12 +351,12 @@ public class BrowserWindowOpener extends AbstractExtension {
* Gets the value of a parameter set using
* {@link #setParameter(String, String)}. If there is no parameter with the
* given name, <code>null</code> is returned.
- *
+ *
* @param name
* the name of the parameter to get, not <code>null</code>
* @return the value of the parameter, or <code>null</code> there is no
* parameter
- *
+ *
* @see #setParameter(String, String)
* @see #getParameter(String)
*/
diff --git a/server/src/main/java/com/vaadin/server/ClassResource.java b/server/src/main/java/com/vaadin/server/ClassResource.java
index 5fb30095ed..86d66eade8 100644
--- a/server/src/main/java/com/vaadin/server/ClassResource.java
+++ b/server/src/main/java/com/vaadin/server/ClassResource.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,11 +25,11 @@ import com.vaadin.util.FileTypeResolver;
/**
* <code>ClassResource</code> is a named resource accessed with the class
* loader.
- *
+ *
* This can be used to access resources such as icons, files, etc.
- *
+ *
* @see java.lang.Class#getResource(java.lang.String)
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -60,7 +60,7 @@ public class ClassResource implements ConnectorResource, Serializable {
* Creates a new application resource instance. The resource id is relative
* to the location of the UI of the component using this resource (or the
* Application if using LegacyWindow).
- *
+ *
* @param resourceName
* the Unique identifier of the resource within the application.
*/
@@ -70,7 +70,7 @@ public class ClassResource implements ConnectorResource, Serializable {
/**
* Creates a new application resource instance.
- *
+ *
* @param associatedClass
* the class of the which the resource is associated.
* @param resourceName
@@ -86,7 +86,7 @@ public class ClassResource implements ConnectorResource, Serializable {
/**
* Gets the MIME type of this resource.
- *
+ *
* @see com.vaadin.server.Resource#getMIMEType()
*/
@Override
@@ -102,9 +102,9 @@ public class ClassResource implements ConnectorResource, Serializable {
@Override
public DownloadStream getStream() {
- final DownloadStream ds = new DownloadStream(getAssociatedClass()
- .getResourceAsStream(resourceName), getMIMEType(),
- getFilename());
+ final DownloadStream ds = new DownloadStream(
+ getAssociatedClass().getResourceAsStream(resourceName),
+ getMIMEType(), getFilename());
ds.setBufferSize(getBufferSize());
ds.setCacheTime(getCacheTime());
return ds;
@@ -125,12 +125,12 @@ public class ClassResource implements ConnectorResource, Serializable {
/**
* Gets the size of the download buffer used for this resource.
- *
+ *
* <p>
* If the buffer size is 0, the buffer size is decided by the terminal
* adapter. The default value is 0.
* </p>
- *
+ *
* @return the size of the buffer in bytes.
*/
public int getBufferSize() {
@@ -139,10 +139,10 @@ public class ClassResource implements ConnectorResource, Serializable {
/**
* Sets the size of the download buffer used for this resource.
- *
+ *
* @param bufferSize
* the size of the buffer in bytes.
- *
+ *
* @see #getBufferSize()
*/
public void setBufferSize(int bufferSize) {
@@ -151,13 +151,13 @@ public class ClassResource implements ConnectorResource, Serializable {
/**
* Gets the length of cache expiration time.
- *
+ *
* <p>
* This gives the adapter the possibility cache streams sent to the client.
* The caching may be made in adapter or at the client if the client
* supports caching. Default is {@link DownloadStream#DEFAULT_CACHETIME}.
* </p>
- *
+ *
* @return Cache time in milliseconds
*/
public long getCacheTime() {
@@ -166,17 +166,17 @@ public class ClassResource implements ConnectorResource, Serializable {
/**
* Sets the length of cache expiration time.
- *
+ *
* <p>
* This gives the adapter the possibility cache streams sent to the client.
* The caching may be made in adapter or at the client if the client
* supports caching. Zero or negative value disables the caching of this
* stream.
* </p>
- *
+ *
* @param cacheTime
* the cache time in milliseconds.
- *
+ *
*/
public void setCacheTime(long cacheTime) {
this.cacheTime = cacheTime;
diff --git a/server/src/main/java/com/vaadin/server/ClientConnector.java b/server/src/main/java/com/vaadin/server/ClientConnector.java
index ae988457c0..d357d85624 100644
--- a/server/src/main/java/com/vaadin/server/ClientConnector.java
+++ b/server/src/main/java/com/vaadin/server/ClientConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,10 +32,10 @@ import elemental.json.JsonObject;
/**
* Interface implemented by all connectors that are capable of communicating
* with the client side
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
- *
+ *
*/
public interface ClientConnector extends Connector {
@@ -52,15 +52,15 @@ public interface ClientConnector extends Connector {
/**
* Interface for listening {@link AttachEvent connector attach events}.
- *
+ *
*/
public static interface AttachListener extends ConnectorEventListener {
- public static final Method attachMethod = ReflectTools.findMethod(
- AttachListener.class, "attach", AttachEvent.class);
+ public static final Method attachMethod = ReflectTools
+ .findMethod(AttachListener.class, "attach", AttachEvent.class);
/**
* Called when a AttachListener is notified of a AttachEvent.
- *
+ *
* @param event
* The attach event that was fired.
*/
@@ -80,15 +80,15 @@ public interface ClientConnector extends Connector {
/**
* Interface for listening {@link DetachEvent connector detach events}.
- *
+ *
*/
public static interface DetachListener extends ConnectorEventListener {
- public static final Method detachMethod = ReflectTools.findMethod(
- DetachListener.class, "detach", DetachEvent.class);
+ public static final Method detachMethod = ReflectTools
+ .findMethod(DetachListener.class, "detach", DetachEvent.class);
/**
* Called when a DetachListener is notified of a DetachEvent.
- *
+ *
* @param event
* The detach event that was fired.
*/
@@ -108,8 +108,8 @@ public interface ClientConnector extends Connector {
* to find the connector where the error occurred or {@link #getComponent()}
* to find the nearest parent component.
*/
- public static class ConnectorErrorEvent extends
- com.vaadin.server.ErrorEvent {
+ public static class ConnectorErrorEvent
+ extends com.vaadin.server.ErrorEvent {
private Connector connector;
@@ -120,7 +120,7 @@ public interface ClientConnector extends Connector {
/**
* Gets the connector for which this error occurred.
- *
+ *
* @return The connector for which the error occurred
*/
public Connector getConnector() {
@@ -132,7 +132,7 @@ public interface ClientConnector extends Connector {
/**
* Returns the list of pending server to client RPC calls and clears the
* list.
- *
+ *
* @return an unmodifiable ordered list of pending server to client method
* calls (not null)
*/
@@ -141,14 +141,14 @@ public interface ClientConnector extends Connector {
/**
* Checks if the communicator is enabled. An enabled communicator is allowed
* to receive messages from its counter-part.
- *
+ *
* @return true if the connector can receive messages, false otherwise
*/
public boolean isConnectorEnabled();
/**
* Returns the type of the shared state for this connector
- *
+ *
* @return The type of the state. Must never return null.
*/
public Class<? extends SharedState> getStateType();
@@ -168,7 +168,7 @@ public interface ClientConnector extends Connector {
* {@link #beforeClientResponse(boolean)} followed by {@link #encodeState()}
* for all connectors that are marked as dirty and send any updated state
* info to the client.
- *
+ *
* @since 7.0.0
*/
public void markAsDirty();
@@ -184,16 +184,16 @@ public interface ClientConnector extends Connector {
* <p>
* This should only be used in special cases, e.g when the state of a
* descendant depends on the state of an ancestor.
- *
+ *
* @see #markAsDirty()
- *
+ *
* @since 7.0.0
*/
public void markAsDirtyRecursive();
/**
* Checks if the connector is attached to a VaadinSession.
- *
+ *
* @since 7.1
* @return true if the connector is attached to a session, false otherwise
*/
@@ -209,7 +209,7 @@ public interface ClientConnector extends Connector {
* the session. This method is always called before the connector's data is
* sent to the client-side for the first time.
* </p>
- *
+ *
* <p>
* The attachment logic is implemented in {@link AbstractClientConnector}.
* </p>
@@ -218,26 +218,26 @@ public interface ClientConnector extends Connector {
/**
* Notifies the connector that it is detached from its VaadinSession.
- *
+ *
* <p>
* The caller of this method is {@link #setParent(ClientConnector)} if the
* parent is in the session. When the parent is detached from the session it
* is its responsibility to call {@link #detach()} for each of its children.
- *
+ *
* </p>
*/
public void detach();
/**
* Get a read-only collection of all extensions attached to this connector.
- *
+ *
* @return a collection of extensions
*/
public Collection<Extension> getExtensions();
/**
* Remove an extension from this connector.
- *
+ *
* @param extension
* the extension to remove.
*/
@@ -245,7 +245,7 @@ public interface ClientConnector extends Connector {
/**
* Returns the UI this connector is attached to
- *
+ *
* @return The UI this connector is attached to or null if it is not
* attached to any UI
*/
@@ -256,13 +256,13 @@ public interface ClientConnector extends Connector {
* client. Gives the connector an opportunity to set computed/dynamic state
* values or to invoke last minute RPC methods depending on other component
* features.
- *
+ *
* @param initial
* <code>true</code> if the client-side connector will be created
* and initialized after this method has been invoked.
* <code>false</code> if there is already an initialized
* client-side connector.
- *
+ *
* @since 7.0
*/
public void beforeClientResponse(boolean initial);
@@ -272,7 +272,7 @@ public interface ClientConnector extends Connector {
* typically done by calling the static method
* {@link LegacyCommunicationManager#encodeState(ClientConnector, SharedState)}
* .
- *
+ *
* @return a JSON object with the encoded connector state
*/
public JsonObject encodeState();
@@ -292,7 +292,7 @@ public interface ClientConnector extends Connector {
* the session should be unlocked before writing a large response to the
* client.
* </p>
- *
+ *
* @param request
* the request that should be handled
* @param response
@@ -310,7 +310,7 @@ public interface ClientConnector extends Connector {
/**
* Returns the RPC manager instance to use when receiving calls for an RPC
* interface.
- *
+ *
* @param rpcInterfaceName
* name of the interface for which the call was made
* @return ServerRpcManager or null if none found for the interface
@@ -319,20 +319,20 @@ public interface ClientConnector extends Connector {
/**
* Gets the error handler for the connector.
- *
+ *
* The error handler is dispatched whenever there is an error processing the
* data coming from the client to this connector.
- *
+ *
* @return The error handler or null if not set
*/
public ErrorHandler getErrorHandler();
/**
* Sets the error handler for the connector.
- *
+ *
* The error handler is dispatched whenever there is an error processing the
* data coming from the client for this connector.
- *
+ *
* @param errorHandler
* The error handler for this connector
*/
diff --git a/server/src/main/java/com/vaadin/server/ClientMethodInvocation.java b/server/src/main/java/com/vaadin/server/ClientMethodInvocation.java
index 77849c83df..67bac57300 100644
--- a/server/src/main/java/com/vaadin/server/ClientMethodInvocation.java
+++ b/server/src/main/java/com/vaadin/server/ClientMethodInvocation.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,11 +30,11 @@ import elemental.json.impl.JsonUtil;
/**
* Internal class for keeping track of pending server to client method
* invocations for a Connector.
- *
+ *
* @since 7.0
*/
-public class ClientMethodInvocation implements Serializable,
- Comparable<ClientMethodInvocation> {
+public class ClientMethodInvocation
+ implements Serializable, Comparable<ClientMethodInvocation> {
private final ClientConnector connector;
private final String interfaceName;
private final String methodName;
@@ -121,8 +121,8 @@ public class ClientMethodInvocation implements Serializable,
stream.writeObject(serializedParameters);
}
- private void readObject(ObjectInputStream stream) throws IOException,
- ClassNotFoundException {
+ private void readObject(ObjectInputStream stream)
+ throws IOException, ClassNotFoundException {
// Reverses the serialization done in writeObject. Basically just
// parsing the serialized type back to the non-serializable type.
stream.defaultReadObject();
diff --git a/server/src/main/java/com/vaadin/server/ComponentSizeValidator.java b/server/src/main/java/com/vaadin/server/ComponentSizeValidator.java
index b8b06c780f..14839a62ba 100644
--- a/server/src/main/java/com/vaadin/server/ComponentSizeValidator.java
+++ b/server/src/main/java/com/vaadin/server/ComponentSizeValidator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -52,7 +52,7 @@ public class ComponentSizeValidator implements Serializable {
/**
* Recursively checks given component and its subtree for invalid layout
* setups. Prints errors to std err stream.
- *
+ *
* @param component
* component to check
* @return set of first level errors found
@@ -127,7 +127,8 @@ public class ComponentSizeValidator implements Serializable {
err.append("Layout problem detected: ");
err.append(msg);
err.append("\n");
- err.append("Relative sizes were replaced by undefined sizes, components may not render as expected.\n");
+ err.append(
+ "Relative sizes were replaced by undefined sizes, components may not render as expected.\n");
errorStream.println(err);
}
@@ -181,7 +182,8 @@ public class ComponentSizeValidator implements Serializable {
private final Vector<InvalidLayout> subErrors = new Vector<InvalidLayout>();
- public InvalidLayout(Component component, boolean height, boolean width) {
+ public InvalidLayout(Component component, boolean height,
+ boolean width) {
this.component = component;
invalidHeight = height;
invalidWidth = width;
@@ -289,7 +291,8 @@ public class ComponentSizeValidator implements Serializable {
}
- private static Stack<ComponentInfo> getHeightAttributes(Component component) {
+ private static Stack<ComponentInfo> getHeightAttributes(
+ Component component) {
Stack<ComponentInfo> attributes = new Stack<ComponentInfo>();
attributes
.add(new ComponentInfo(component, getHeightString(component)));
@@ -303,7 +306,8 @@ public class ComponentSizeValidator implements Serializable {
return attributes;
}
- private static Stack<ComponentInfo> getWidthAttributes(Component component) {
+ private static Stack<ComponentInfo> getWidthAttributes(
+ Component component) {
Stack<ComponentInfo> attributes = new Stack<ComponentInfo>();
attributes.add(new ComponentInfo(component, getWidthString(component)));
Component parent = component.getParent();
@@ -320,7 +324,8 @@ public class ComponentSizeValidator implements Serializable {
String width = "width: ";
if (hasRelativeWidth(component)) {
width += "RELATIVE, " + component.getWidth() + " %";
- } else if (component instanceof Window && component.getParent() == null) {
+ } else if (component instanceof Window
+ && component.getParent() == null) {
width += "MAIN WINDOW";
} else if (component.getWidth() >= 0) {
width += "ABSOLUTE, " + component.getWidth() + " "
@@ -336,7 +341,8 @@ public class ComponentSizeValidator implements Serializable {
String height = "height: ";
if (hasRelativeHeight(component)) {
height += "RELATIVE, " + component.getHeight() + " %";
- } else if (component instanceof Window && component.getParent() == null) {
+ } else if (component instanceof Window
+ && component.getParent() == null) {
height += "MAIN WINDOW";
} else if (component.getHeight() > 0) {
height += "ABSOLUTE, " + component.getHeight() + " "
@@ -427,8 +433,8 @@ public class ComponentSizeValidator implements Serializable {
if (parent instanceof VerticalLayout) {
horizontal = false;
}
- if (horizontal
- && hasNonRelativeHeightComponent((AbstractOrderedLayout) parent)) {
+ if (horizontal && hasNonRelativeHeightComponent(
+ (AbstractOrderedLayout) parent)) {
return true;
} else {
return false;
@@ -484,11 +490,12 @@ public class ComponentSizeValidator implements Serializable {
}
private static boolean hasRelativeHeight(Component component) {
- return (component.getHeightUnits() == Unit.PERCENTAGE && component
- .getHeight() > 0);
+ return (component.getHeightUnits() == Unit.PERCENTAGE
+ && component.getHeight() > 0);
}
- private static boolean hasNonRelativeWidthComponent(AbstractOrderedLayout ol) {
+ private static boolean hasNonRelativeWidthComponent(
+ AbstractOrderedLayout ol) {
Iterator<Component> it = ol.getComponentIterator();
while (it.hasNext()) {
if (!hasRelativeWidth(it.next())) {
@@ -536,7 +543,8 @@ public class ComponentSizeValidator implements Serializable {
boolean columnHasWidth = false;
for (int col = componentArea.getColumn1(); !columnHasWidth
&& col <= componentArea.getColumn2(); col++) {
- for (int row = 0; !columnHasWidth && row < gl.getRows(); row++) {
+ for (int row = 0; !columnHasWidth
+ && row < gl.getRows(); row++) {
Component c = gl.getComponent(col, row);
if (c != null) {
columnHasWidth = !hasRelativeWidth(c);
@@ -638,7 +646,8 @@ public class ComponentSizeValidator implements Serializable {
setLocation(heightLocations, object);
}
- private static void setLocation(Map<Object, FileLocation> map, Object object) {
+ private static void setLocation(Map<Object, FileLocation> map,
+ Object object) {
StackTraceElement[] traceLines = Thread.currentThread().getStackTrace();
for (StackTraceElement traceElement : traceLines) {
Class<?> cls;
@@ -650,7 +659,8 @@ public class ComponentSizeValidator implements Serializable {
}
cls = Class.forName(className);
- if (cls == ComponentSizeValidator.class || cls == Thread.class) {
+ if (cls == ComponentSizeValidator.class
+ || cls == Thread.class) {
continue;
}
@@ -675,7 +685,7 @@ public class ComponentSizeValidator implements Serializable {
/**
* Validates the layout and returns a collection of errors
- *
+ *
* @since 7.1
* @param ui
* The UI to validate
diff --git a/server/src/main/java/com/vaadin/server/CompositeErrorMessage.java b/server/src/main/java/com/vaadin/server/CompositeErrorMessage.java
index ee2af74994..de5b932d0e 100644
--- a/server/src/main/java/com/vaadin/server/CompositeErrorMessage.java
+++ b/server/src/main/java/com/vaadin/server/CompositeErrorMessage.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ import java.util.Iterator;
/**
* Class for combining multiple error messages together.
- *
+ *
* @author Vaadin Ltd
* @since 3.0
*/
@@ -30,7 +30,7 @@ public class CompositeErrorMessage extends AbstractErrorMessage {
/**
* Constructor for CompositeErrorMessage.
- *
+ *
* @param errorMessages
* the array of error messages that are listed together. Nulls
* are ignored, but at least one message is required.
@@ -52,7 +52,7 @@ public class CompositeErrorMessage extends AbstractErrorMessage {
/**
* Constructor for CompositeErrorMessage.
- *
+ *
* @param errorMessages
* the Collection of error messages that are listed together. At
* least one message is required.
@@ -76,7 +76,7 @@ public class CompositeErrorMessage extends AbstractErrorMessage {
/**
* Adds a error message into this composite message. Updates the level
* field.
- *
+ *
* @param error
* the error message to be added. Duplicate errors are ignored.
*/
@@ -91,7 +91,7 @@ public class CompositeErrorMessage extends AbstractErrorMessage {
/**
* Gets Error Iterator.
- *
+ *
* @return the error iterator.
*/
public Iterator<ErrorMessage> iterator() {
@@ -100,7 +100,7 @@ public class CompositeErrorMessage extends AbstractErrorMessage {
/**
* Returns a comma separated list of the error messages.
- *
+ *
* @return String, comma separated list of error messages.
*/
@Override
diff --git a/server/src/main/java/com/vaadin/server/ConnectorResource.java b/server/src/main/java/com/vaadin/server/ConnectorResource.java
index 3c4fb1955f..53225087d6 100644
--- a/server/src/main/java/com/vaadin/server/ConnectorResource.java
+++ b/server/src/main/java/com/vaadin/server/ConnectorResource.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -18,9 +18,9 @@ package com.vaadin.server;
/**
* A resource that is served through the Connector that is using the resource.
- *
+ *
* @see AbstractClientConnector#setResource(String, Resource)
- *
+ *
* @author Vaadin Ltd
* @version @VERSION@
* @since 7.0.0
@@ -37,14 +37,14 @@ public interface ConnectorResource extends Resource {
* holding session locks (to prevent locking the session during long file
* downloads).
* </p>
- *
+ *
* @return A download stream which produces the resource content
*/
public DownloadStream getStream();
/**
* Gets the virtual filename for this resource.
- *
+ *
* @return the file name associated to this resource.
*/
public String getFilename();
diff --git a/server/src/main/java/com/vaadin/server/ConnectorResourceHandler.java b/server/src/main/java/com/vaadin/server/ConnectorResourceHandler.java
index 8715134773..a07380a521 100644
--- a/server/src/main/java/com/vaadin/server/ConnectorResourceHandler.java
+++ b/server/src/main/java/com/vaadin/server/ConnectorResourceHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -88,11 +88,11 @@ public class ConnectorResourceHandler implements RequestHandler {
.setCurrent(ui);
try {
if (!connector.handleConnectorRequest(request, response, key)) {
- return error(request, response, connector.getClass()
- .getSimpleName()
- + " ("
- + connector.getConnectorId()
- + ") did not handle connector request for " + key);
+ return error(request, response,
+ connector.getClass().getSimpleName() + " ("
+ + connector.getConnectorId()
+ + ") did not handle connector request for "
+ + key);
}
} catch (Exception e) {
session.lock();
@@ -120,16 +120,15 @@ public class ConnectorResourceHandler implements RequestHandler {
if (!loggedDecodingWarning) {
loggedDecodingWarning = true;
- getLogger()
- .warning(
- "Request path contains a new line character. This typically means that the server is incorrectly configured to use something else than UTF-8 for URL decoding (requestPath: "
- + requestPath + ")");
+ getLogger().warning(
+ "Request path contains a new line character. This typically means that the server is incorrectly configured to use something else than UTF-8 for URL decoding (requestPath: "
+ + requestPath + ")");
}
}
}
- private static boolean error(VaadinRequest request,
- VaadinResponse response, String logMessage) throws IOException {
+ private static boolean error(VaadinRequest request, VaadinResponse response,
+ String logMessage) throws IOException {
getLogger().log(Level.WARNING, logMessage);
response.sendError(HttpServletResponse.SC_NOT_FOUND,
request.getPathInfo() + " can not be found");
diff --git a/server/src/main/java/com/vaadin/server/Constants.java b/server/src/main/java/com/vaadin/server/Constants.java
index 5efe6accb1..77653b8bec 100644
--- a/server/src/main/java/com/vaadin/server/Constants.java
+++ b/server/src/main/java/com/vaadin/server/Constants.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,9 +20,9 @@ import com.vaadin.ui.declarative.DesignContext;
/**
* Internal constants used by both the client and the server side framework
- *
+ *
* @since 6.2
- *
+ *
*/
public interface Constants {
@@ -62,8 +62,7 @@ public interface Constants {
+ "The widgetset in use does not seem to be built for the Vaadin\n"
+ "version in use. This might cause strange problems - a\n"
+ "recompile/deploy is strongly recommended.\n"
- + " Vaadin version: %s\n"
- + " Widgetset version: %s\n"
+ + " Vaadin version: %s\n" + " Widgetset version: %s\n"
+ "=================================================================";
// Keep the version number in sync with pom.xml
@@ -83,21 +82,15 @@ public interface Constants {
+ "to vaadin-push.\n"
+ "If managing dependencies manually, please make sure Atmosphere\n"
+ REQUIRED_ATMOSPHERE_RUNTIME_VERSION
- + " is included on the classpath.\n"
- + "Will fall back to using "
- + PushMode.class.getSimpleName()
- + "."
- + PushMode.DISABLED.name()
+ + " is included on the classpath.\n" + "Will fall back to using "
+ + PushMode.class.getSimpleName() + "." + PushMode.DISABLED.name()
+ ".\n"
+ "=================================================================";
static final String PUSH_NOT_SUPPORTED_ERROR = "\n"
+ "=================================================================\n"
- + "Push is not supported for {0}\n"
- + "Will fall back to using "
- + PushMode.class.getSimpleName()
- + "."
- + PushMode.DISABLED.name()
+ + "Push is not supported for {0}\n" + "Will fall back to using "
+ + PushMode.class.getSimpleName() + "." + PushMode.DISABLED.name()
+ ".\n"
+ "=================================================================";
@@ -142,7 +135,7 @@ public interface Constants {
* Name of system or context property to write declarative syntax with the
* old "v-" prefix or with the new "vaadin-" prefix. The default value
* depends on the Vaadin branch used.
- *
+ *
* @see DesignContext
* @since 7.5.7
*/
diff --git a/server/src/main/java/com/vaadin/server/CustomizedSystemMessages.java b/server/src/main/java/com/vaadin/server/CustomizedSystemMessages.java
index 0a7f864f40..0c1da79ec4 100644
--- a/server/src/main/java/com/vaadin/server/CustomizedSystemMessages.java
+++ b/server/src/main/java/com/vaadin/server/CustomizedSystemMessages.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -49,12 +49,12 @@ import java.io.Serializable;
* </p>
*/
-public class CustomizedSystemMessages extends SystemMessages implements
- Serializable {
+public class CustomizedSystemMessages extends SystemMessages
+ implements Serializable {
/**
* Sets the URL to go to when the session has expired.
- *
+ *
* @param sessionExpiredURL
* the URL to go to, or null to reload current
*/
@@ -66,7 +66,7 @@ public class CustomizedSystemMessages extends SystemMessages implements
* Enables or disables the notification. If disabled, the set URL (or
* current) is loaded directly when next transaction between server and
* client happens.
- *
+ *
* @param sessionExpiredNotificationEnabled
* true = enabled, false = disabled
*/
@@ -80,7 +80,7 @@ public class CustomizedSystemMessages extends SystemMessages implements
* caption and message are null, client automatically forwards to
* sessionExpiredUrl after timeout timer expires. Timer uses value read from
* HTTPSession.getMaxInactiveInterval()
- *
+ *
* @param sessionExpiredCaption
* the caption
*/
@@ -93,7 +93,7 @@ public class CustomizedSystemMessages extends SystemMessages implements
* caption and message are null, client automatically forwards to
* sessionExpiredUrl after timeout timer expires. Timer uses value read from
* HTTPSession.getMaxInactiveInterval()
- *
+ *
* @param sessionExpiredMessage
* the message
*/
@@ -103,7 +103,7 @@ public class CustomizedSystemMessages extends SystemMessages implements
/**
* Sets the URL to go to when there is a authentication error.
- *
+ *
* @param authenticationErrorURL
* the URL to go to, or null to reload current
*/
@@ -114,7 +114,7 @@ public class CustomizedSystemMessages extends SystemMessages implements
/**
* Enables or disables the notification. If disabled, the set URL (or
* current) is loaded directly.
- *
+ *
* @param authenticationErrorNotificationEnabled
* true = enabled, false = disabled
*/
@@ -126,28 +126,30 @@ public class CustomizedSystemMessages extends SystemMessages implements
/**
* Sets the caption of the notification. Set to null for no caption. If both
* caption and message is null, the notification is disabled;
- *
+ *
* @param authenticationErrorCaption
* the caption
*/
- public void setAuthenticationErrorCaption(String authenticationErrorCaption) {
+ public void setAuthenticationErrorCaption(
+ String authenticationErrorCaption) {
this.authenticationErrorCaption = authenticationErrorCaption;
}
/**
* Sets the message of the notification. Set to null for no message. If both
* caption and message is null, the notification is disabled;
- *
+ *
* @param authenticationErrorMessage
* the message
*/
- public void setAuthenticationErrorMessage(String authenticationErrorMessage) {
+ public void setAuthenticationErrorMessage(
+ String authenticationErrorMessage) {
this.authenticationErrorMessage = authenticationErrorMessage;
}
/**
* Sets the URL to go to when there is a communication error.
- *
+ *
* @param communicationErrorURL
* the URL to go to, or null to reload current
*/
@@ -158,7 +160,7 @@ public class CustomizedSystemMessages extends SystemMessages implements
/**
* Enables or disables the notification. If disabled, the set URL (or
* current) is loaded directly.
- *
+ *
* @param communicationErrorNotificationEnabled
* true = enabled, false = disabled
*/
@@ -170,7 +172,7 @@ public class CustomizedSystemMessages extends SystemMessages implements
/**
* Sets the caption of the notification. Set to null for no caption. If both
* caption and message is null, the notification is disabled;
- *
+ *
* @param communicationErrorCaption
* the caption
*/
@@ -181,7 +183,7 @@ public class CustomizedSystemMessages extends SystemMessages implements
/**
* Sets the message of the notification. Set to null for no message. If both
* caption and message is null, the notification is disabled;
- *
+ *
* @param communicationErrorMessage
* the message
*/
@@ -191,7 +193,7 @@ public class CustomizedSystemMessages extends SystemMessages implements
/**
* Sets the URL to go to when an internal error occurs.
- *
+ *
* @param internalErrorURL
* the URL to go to, or null to reload current
*/
@@ -202,7 +204,7 @@ public class CustomizedSystemMessages extends SystemMessages implements
/**
* Enables or disables the notification. If disabled, the set URL (or
* current) is loaded directly.
- *
+ *
* @param internalErrorNotificationEnabled
* true = enabled, false = disabled
*/
@@ -214,7 +216,7 @@ public class CustomizedSystemMessages extends SystemMessages implements
/**
* Sets the caption of the notification. Set to null for no caption. If both
* caption and message is null, the notification is disabled;
- *
+ *
* @param internalErrorCaption
* the caption
*/
@@ -225,7 +227,7 @@ public class CustomizedSystemMessages extends SystemMessages implements
/**
* Sets the message of the notification. Set to null for no message. If both
* caption and message is null, the notification is disabled;
- *
+ *
* @param internalErrorMessage
* the message
*/
@@ -235,7 +237,7 @@ public class CustomizedSystemMessages extends SystemMessages implements
/**
* Sets the URL to redirect to when the browser has cookies disabled.
- *
+ *
* @param cookiesDisabledURL
* the URL to redirect to, or null to reload the current URL
*/
@@ -247,7 +249,7 @@ public class CustomizedSystemMessages extends SystemMessages implements
* Enables or disables the notification for "cookies disabled" messages. If
* disabled, the URL returned by {@link #getCookiesDisabledURL()} is loaded
* directly.
- *
+ *
* @param cookiesDisabledNotificationEnabled
* true to enable "cookies disabled" messages, false otherwise
*/
@@ -260,7 +262,7 @@ public class CustomizedSystemMessages extends SystemMessages implements
* Sets the caption of the "cookies disabled" notification. Set to null for
* no caption. If both caption and message is null, the notification is
* disabled.
- *
+ *
* @param cookiesDisabledCaption
* the caption for the "cookies disabled" notification
*/
@@ -272,7 +274,7 @@ public class CustomizedSystemMessages extends SystemMessages implements
* Sets the message of the "cookies disabled" notification. Set to null for
* no message. If both caption and message is null, the notification is
* disabled.
- *
+ *
* @param cookiesDisabledMessage
* the message for the "cookies disabled" notification
*/
diff --git a/server/src/main/java/com/vaadin/server/DefaultDeploymentConfiguration.java b/server/src/main/java/com/vaadin/server/DefaultDeploymentConfiguration.java
index 1f22a9e33d..d4014d9289 100644
--- a/server/src/main/java/com/vaadin/server/DefaultDeploymentConfiguration.java
+++ b/server/src/main/java/com/vaadin/server/DefaultDeploymentConfiguration.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,12 +25,12 @@ import com.vaadin.shared.communication.PushMode;
/**
* The default implementation of {@link DeploymentConfiguration} based on a base
* class for resolving system properties and a set of init parameters.
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
-public class DefaultDeploymentConfiguration extends
- AbstractDeploymentConfiguration {
+public class DefaultDeploymentConfiguration
+ extends AbstractDeploymentConfiguration {
/**
* Default value for {@link #getResourceCacheTime()} = {@value} .
*/
@@ -54,7 +54,7 @@ public class DefaultDeploymentConfiguration extends
/**
* Default value for {@link #isSyncIdCheckEnabled()} = {@value} .
- *
+ *
* @since 7.3
*/
public static final boolean DEFAULT_SYNC_ID_CHECK = true;
@@ -75,7 +75,7 @@ public class DefaultDeploymentConfiguration extends
/**
* Create a new deployment configuration instance.
- *
+ *
* @param systemPropertyBaseClass
* the class that should be used as a basis when reading system
* properties
@@ -112,10 +112,9 @@ public class DefaultDeploymentConfiguration extends
}
}
- getLogger()
- .log(Level.WARNING,
- Constants.WARNING_UNKNOWN_LEGACY_PROPERTY_TOSTRING_VALUE,
- param);
+ getLogger().log(Level.WARNING,
+ Constants.WARNING_UNKNOWN_LEGACY_PROPERTY_TOSTRING_VALUE,
+ param);
legacyPropertyToStringMode = DEFAULT_LEGACY_PROPERTY_TO_STRING;
}
@@ -142,7 +141,7 @@ public class DefaultDeploymentConfiguration extends
/**
* Gets an system property value.
- *
+ *
* @param parameterName
* the Name or the parameter.
* @return String value or null if not found
@@ -186,7 +185,7 @@ public class DefaultDeploymentConfiguration extends
/**
* Gets an application property value.
- *
+ *
* @param parameterName
* the Name or the parameter.
* @return String value or null if not found
@@ -207,7 +206,7 @@ public class DefaultDeploymentConfiguration extends
/**
* {@inheritDoc}
- *
+ *
* The default is false.
*/
@Override
@@ -295,8 +294,8 @@ public class DefaultDeploymentConfiguration extends
*/
private void checkProductionMode() {
productionMode = getApplicationOrSystemProperty(
- Constants.SERVLET_PARAMETER_PRODUCTION_MODE, "false").equals(
- "true");
+ Constants.SERVLET_PARAMETER_PRODUCTION_MODE, "false")
+ .equals("true");
if (!productionMode) {
getLogger().warning(Constants.NOT_PRODUCTION_MODE_INFO);
}
@@ -308,7 +307,7 @@ public class DefaultDeploymentConfiguration extends
private void checkXsrfProtection() {
xsrfProtectionEnabled = !getApplicationOrSystemProperty(
Constants.SERVLET_PARAMETER_DISABLE_XSRF_PROTECTION, "false")
- .equals("true");
+ .equals("true");
if (!xsrfProtectionEnabled) {
getLogger().warning(Constants.WARNING_XSRF_PROTECTION_DISABLED);
}
@@ -319,10 +318,9 @@ public class DefaultDeploymentConfiguration extends
*/
private void checkResourceCacheTime() {
try {
- resourceCacheTime = Integer
- .parseInt(getApplicationOrSystemProperty(
- Constants.SERVLET_PARAMETER_RESOURCE_CACHE_TIME,
- Integer.toString(DEFAULT_RESOURCE_CACHE_TIME)));
+ resourceCacheTime = Integer.parseInt(getApplicationOrSystemProperty(
+ Constants.SERVLET_PARAMETER_RESOURCE_CACHE_TIME,
+ Integer.toString(DEFAULT_RESOURCE_CACHE_TIME)));
} catch (NumberFormatException e) {
getLogger().warning(
Constants.WARNING_RESOURCE_CACHING_TIME_NOT_NUMERIC);
@@ -332,13 +330,12 @@ public class DefaultDeploymentConfiguration extends
private void checkHeartbeatInterval() {
try {
- heartbeatInterval = Integer
- .parseInt(getApplicationOrSystemProperty(
- Constants.SERVLET_PARAMETER_HEARTBEAT_INTERVAL,
- Integer.toString(DEFAULT_HEARTBEAT_INTERVAL)));
+ heartbeatInterval = Integer.parseInt(getApplicationOrSystemProperty(
+ Constants.SERVLET_PARAMETER_HEARTBEAT_INTERVAL,
+ Integer.toString(DEFAULT_HEARTBEAT_INTERVAL)));
} catch (NumberFormatException e) {
- getLogger().warning(
- Constants.WARNING_HEARTBEAT_INTERVAL_NOT_NUMERIC);
+ getLogger()
+ .warning(Constants.WARNING_HEARTBEAT_INTERVAL_NOT_NUMERIC);
heartbeatInterval = DEFAULT_HEARTBEAT_INTERVAL;
}
}
@@ -370,8 +367,8 @@ public class DefaultDeploymentConfiguration extends
private void checkSendUrlsAsParameters() {
sendUrlsAsParameters = getApplicationOrSystemProperty(
Constants.SERVLET_PARAMETER_SENDURLSASPARAMETERS,
- Boolean.toString(DEFAULT_SEND_URLS_AS_PARAMETERS)).equals(
- "true");
+ Boolean.toString(DEFAULT_SEND_URLS_AS_PARAMETERS))
+ .equals("true");
}
private Logger getLogger() {
diff --git a/server/src/main/java/com/vaadin/server/DefaultErrorHandler.java b/server/src/main/java/com/vaadin/server/DefaultErrorHandler.java
index fa0729e011..ad0234c4e8 100644
--- a/server/src/main/java/com/vaadin/server/DefaultErrorHandler.java
+++ b/server/src/main/java/com/vaadin/server/DefaultErrorHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -38,9 +38,8 @@ public class DefaultErrorHandler implements ErrorHandler {
Throwable t = event.getThrowable();
if (t instanceof SocketException) {
// Most likely client browser closed socket
- getLogger().info(
- "SocketException in CommunicationManager."
- + " Most likely client (browser) closed socket.");
+ getLogger().info("SocketException in CommunicationManager."
+ + " Most likely client (browser) closed socket.");
return;
}
@@ -64,7 +63,7 @@ public class DefaultErrorHandler implements ErrorHandler {
* might be also other irrelevant exceptions that make no sense for Vaadin
* users (~developers using Vaadin). This method tries to choose the
* relevant one to be reported.
- *
+ *
* @since 7.2
* @param t
* a throwable passed to ErrorHandler
@@ -100,7 +99,7 @@ public class DefaultErrorHandler implements ErrorHandler {
/**
* Returns the AbstractComponent associated with the given error if such can
* be found
- *
+ *
* @param event
* The error to investigate
* @return The {@link AbstractComponent} to error relates to or null if
@@ -110,8 +109,8 @@ public class DefaultErrorHandler implements ErrorHandler {
public static AbstractComponent findAbstractComponent(
com.vaadin.server.ErrorEvent event) {
if (event instanceof ConnectorErrorEvent) {
- Component c = findComponent(((ConnectorErrorEvent) event)
- .getConnector());
+ Component c = findComponent(
+ ((ConnectorErrorEvent) event).getConnector());
if (c instanceof AbstractComponent) {
return (AbstractComponent) c;
}
@@ -124,7 +123,7 @@ public class DefaultErrorHandler implements ErrorHandler {
* Finds the nearest component by traversing upwards in the hierarchy. If
* connector is a Component, that Component is returned. Otherwise, looks
* upwards in the hierarchy until it finds a {@link Component}.
- *
+ *
* @return A Component or null if no component was found
*/
public static Component findComponent(Connector connector) {
diff --git a/server/src/main/java/com/vaadin/server/DefaultSystemMessagesProvider.java b/server/src/main/java/com/vaadin/server/DefaultSystemMessagesProvider.java
index 17177c36ca..9bd6e1232f 100644
--- a/server/src/main/java/com/vaadin/server/DefaultSystemMessagesProvider.java
+++ b/server/src/main/java/com/vaadin/server/DefaultSystemMessagesProvider.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ package com.vaadin.server;
/**
* System messages provider using the built-in default system messages. This
* singleton is accessed using {@link #get()}.
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
@@ -39,7 +39,7 @@ public class DefaultSystemMessagesProvider implements SystemMessagesProvider {
/**
* Gets the instance.
- *
+ *
* @return the default system messages provider.
*/
public static SystemMessagesProvider get() {
diff --git a/server/src/main/java/com/vaadin/server/DefaultUIProvider.java b/server/src/main/java/com/vaadin/server/DefaultUIProvider.java
index 38525fc020..e264a053e5 100644
--- a/server/src/main/java/com/vaadin/server/DefaultUIProvider.java
+++ b/server/src/main/java/com/vaadin/server/DefaultUIProvider.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,8 +29,9 @@ public class DefaultUIProvider extends UIProvider {
if (uiClassName != null) {
ClassLoader classLoader = request.getService().getClassLoader();
try {
- Class<? extends UI> uiClass = Class.forName(uiClassName, true,
- classLoader).asSubclass(UI.class);
+ Class<? extends UI> uiClass = Class
+ .forName(uiClassName, true, classLoader)
+ .asSubclass(UI.class);
return uiClass;
} catch (ClassNotFoundException e) {
diff --git a/server/src/main/java/com/vaadin/server/DeploymentConfiguration.java b/server/src/main/java/com/vaadin/server/DeploymentConfiguration.java
index 968ec7c0c3..ad4d3db577 100644
--- a/server/src/main/java/com/vaadin/server/DeploymentConfiguration.java
+++ b/server/src/main/java/com/vaadin/server/DeploymentConfiguration.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.shared.communication.PushMode;
/**
* A collection of properties configured at deploy time as well as a way of
* accessing third party properties not explicitly supported by this class.
- *
+ *
* @author Vaadin Ltd
* @version @VERSION@
* @since 7.0.0
@@ -34,7 +34,7 @@ public interface DeploymentConfiguration extends Serializable {
/**
* Determines the mode of the "legacyPropertyToString" parameter.
- *
+ *
* @author Vaadin Ltd
* @since 7.1
*/
@@ -51,7 +51,7 @@ public interface DeploymentConfiguration extends Serializable {
/**
* Gets the string that should be used in e.g. web.xml for selecting
* this mode.
- *
+ *
* @return the property value
*/
public String getPropertyString() {
@@ -72,14 +72,14 @@ public interface DeploymentConfiguration extends Serializable {
/**
* Returns whether Vaadin is in production mode.
- *
+ *
* @return true if in production mode, false otherwise.
*/
public boolean isProductionMode();
/**
* Returns whether cross-site request forgery protection is enabled.
- *
+ *
* @return true if XSRF protection is enabled, false otherwise.
*/
public boolean isXsrfProtectionEnabled();
@@ -88,7 +88,7 @@ public interface DeploymentConfiguration extends Serializable {
* Returns whether sync id checking is enabled. The sync id is used to
* gracefully handle situations when the client sends a message to a
* connector that has recently been removed on the server.
- *
+ *
* @since 7.3
* @return <code>true</code> if sync id checking is enabled;
* <code>false</code> otherwise
@@ -97,7 +97,7 @@ public interface DeploymentConfiguration extends Serializable {
/**
* Returns the time resources can be cached in the browsers, in seconds.
- *
+ *
* @return The resource cache time.
*/
public int getResourceCacheTime();
@@ -105,7 +105,7 @@ public interface DeploymentConfiguration extends Serializable {
/**
* Returns the number of seconds between heartbeat requests of a UI, or a
* non-positive number if heartbeat is disabled.
- *
+ *
* @return The time between heartbeats.
*/
public int getHeartbeatInterval();
@@ -114,7 +114,7 @@ public interface DeploymentConfiguration extends Serializable {
* Returns whether the sending of URL's as GET and POST parameters in
* requests with content-type <code>application/x-www-form-urlencoded</code>
* is enabled or not.
- *
+ *
* @return <code>false</code> if set to false or <code>true</code> otherwise
*/
public boolean isSendUrlsAsParameters();
@@ -128,11 +128,11 @@ public interface DeploymentConfiguration extends Serializable {
* heartbeat requests cause the session to stay open for as long as there
* are open UIs on the client side. If it is {@code true}, the session is
* eventually closed if the open UIs do not have any user interaction.
- *
+ *
* @see WrappedSession#getMaxInactiveInterval()
- *
+ *
* @since 7.0.0
- *
+ *
* @return True if UIs and sessions receiving only heartbeat requests are
* eventually closed; false if heartbeat requests extend UI and
* session lifetime indefinitely.
@@ -142,7 +142,7 @@ public interface DeploymentConfiguration extends Serializable {
/**
* Returns the mode of bidirectional ("push") client-server communication
* that should be used.
- *
+ *
* @return The push mode in use.
*/
public PushMode getPushMode();
@@ -150,7 +150,7 @@ public interface DeploymentConfiguration extends Serializable {
/**
* Gets the properties configured for the deployment, e.g. as init
* parameters to the servlet or portlet.
- *
+ *
* @return properties for the application.
*/
public Properties getInitParameters();
@@ -158,7 +158,7 @@ public interface DeploymentConfiguration extends Serializable {
/**
* Gets a configured property. The properties are typically read from e.g.
* web.xml or from system properties of the JVM.
- *
+ *
* @param propertyName
* The simple of the property, in some contexts, lookup might be
* performed using variations of the provided name.
@@ -173,18 +173,18 @@ public interface DeploymentConfiguration extends Serializable {
/**
* Gets UI class configuration option value.
- *
+ *
* @return UI class name
- *
+ *
* @since 7.4
*/
public String getUIClassName();
/**
* Gets UI provider class configuration option value.
- *
+ *
* @since 7.4
- *
+ *
* @return UI class name
*/
public String getUIProviderClassName();
@@ -192,23 +192,23 @@ public interface DeploymentConfiguration extends Serializable {
/**
* Gets Widgetset configuration option value. {@code defaultValue} is
* returned if widgetset parameter is not configured.
- *
+ *
* @since 7.4
- *
+ *
* @return UI class name
*/
public String getWidgetset(String defaultValue);
/**
* Gets resources path configuration option value.
- *
+ *
* @since 7.4
*/
public String getResourcesPath();
/**
* Gets class loader configuration option value.
- *
+ *
* @since 7.4
*/
public String getClassLoaderName();
@@ -216,7 +216,7 @@ public interface DeploymentConfiguration extends Serializable {
/**
* Returns to legacy Property.toString() mode used. See
* {@link AbstractProperty#isLegacyToStringEnabled()} for more information.
- *
+ *
* @return The Property.toString() mode in use.
*/
@Deprecated
diff --git a/server/src/main/java/com/vaadin/server/DownloadStream.java b/server/src/main/java/com/vaadin/server/DownloadStream.java
index 65ef560974..fdc757bd5e 100644
--- a/server/src/main/java/com/vaadin/server/DownloadStream.java
+++ b/server/src/main/java/com/vaadin/server/DownloadStream.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -35,7 +35,7 @@ import javax.servlet.http.HttpServletResponse;
* session to prevent locking the session during long file downloads. If your
* DownloadStream uses anything from the session, you must handle the locking.
* </p>
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -78,7 +78,7 @@ public class DownloadStream implements Serializable {
/**
* Gets downloadable stream.
- *
+ *
* @return output stream.
*/
public InputStream getStream() {
@@ -87,7 +87,7 @@ public class DownloadStream implements Serializable {
/**
* Sets the stream.
- *
+ *
* @param stream
* The stream to set
*/
@@ -97,7 +97,7 @@ public class DownloadStream implements Serializable {
/**
* Gets stream content type.
- *
+ *
* @return type of the stream content.
*/
public String getContentType() {
@@ -106,7 +106,7 @@ public class DownloadStream implements Serializable {
/**
* Sets stream content type.
- *
+ *
* @param contentType
* the contentType to set
*/
@@ -116,7 +116,7 @@ public class DownloadStream implements Serializable {
/**
* Returns the file name.
- *
+ *
* @return the name of the file.
*/
public String getFileName() {
@@ -125,7 +125,7 @@ public class DownloadStream implements Serializable {
/**
* Sets the file name.
- *
+ *
* @param fileName
* the file name to set.
*/
@@ -138,9 +138,9 @@ public class DownloadStream implements Serializable {
* about the downloadable stream and their meaning depends on the used
* adapter. For example in WebAdapter they are interpreted as HTTP response
* headers.
- *
+ *
* If the parameters by this name exists, the old value is replaced.
- *
+ *
* @param name
* the Name of the parameter to set.
* @param value
@@ -158,7 +158,7 @@ public class DownloadStream implements Serializable {
* about the downloadable stream and their meaning depends on the used
* adapter. For example in WebAdapter they are interpreted as HTTP response
* headers.
- *
+ *
* @param name
* the Name of the parameter to set.
* @return Value of the parameter or null if the parameter does not exist.
@@ -172,7 +172,7 @@ public class DownloadStream implements Serializable {
/**
* Gets the names of the parameters.
- *
+ *
* @return Iterator of names or null if no parameters are set.
*/
public Iterator<String> getParameterNames() {
@@ -187,7 +187,7 @@ public class DownloadStream implements Serializable {
* possibility cache streams sent to the client. The caching may be made in
* adapter or at the client if the client supports caching. Default is
* <code>DEFAULT_CACHETIME</code>.
- *
+ *
* @return Cache time in milliseconds
*/
public long getCacheTime() {
@@ -199,7 +199,7 @@ public class DownloadStream implements Serializable {
* possibility cache streams sent to the client. The caching may be made in
* adapter or at the client if the client supports caching. Zero or negavive
* value disbales the caching of this stream.
- *
+ *
* @param cacheTime
* the cache time in milliseconds.
*/
@@ -209,7 +209,7 @@ public class DownloadStream implements Serializable {
/**
* Gets the size of the download buffer.
- *
+ *
* @return int The size of the buffer in bytes.
*/
public int getBufferSize() {
@@ -218,10 +218,10 @@ public class DownloadStream implements Serializable {
/**
* Sets the size of the download buffer.
- *
+ *
* @param bufferSize
* the size of the buffer in bytes.
- *
+ *
* @since 7.0
*/
public void setBufferSize(int bufferSize) {
@@ -238,15 +238,15 @@ public class DownloadStream implements Serializable {
* response. If there's is a parameter named <code>Location</code>, a
* redirect (302 Moved temporarily) is sent instead of the contents of this
* stream.
- *
+ *
* @param request
* the request for which the response should be written
* @param response
* the Vaadin response to write this download stream to
- *
+ *
* @throws IOException
* passed through from the Vaadin response
- *
+ *
* @since 7.0
*/
public void writeResponse(VaadinRequest request, VaadinResponse response)
@@ -287,7 +287,8 @@ public class DownloadStream implements Serializable {
// Content-Disposition: attachment generally forces download
String contentDisposition = getParameter(CONTENT_DISPOSITION);
if (contentDisposition == null) {
- contentDisposition = getContentDispositionFilename(getFileName());
+ contentDisposition = getContentDispositionFilename(
+ getFileName());
}
response.setHeader(CONTENT_DISPOSITION, contentDisposition);
@@ -321,7 +322,7 @@ public class DownloadStream implements Serializable {
/**
* Returns the filename formatted for inclusion in a Content-Disposition
* header. Includes both a plain version of the name and a UTF-8 version
- *
+ *
* @since 7.4.8
* @param filename
* The filename to include
@@ -340,7 +341,7 @@ public class DownloadStream implements Serializable {
/**
* Helper method that tries to close an output stream and ignores any
* exceptions.
- *
+ *
* @param out
* the output stream to close, <code>null</code> is also
* supported
@@ -359,7 +360,7 @@ public class DownloadStream implements Serializable {
/**
* Helper method that tries to close an input stream and ignores any
* exceptions.
- *
+ *
* @param in
* the input stream to close, <code>null</code> is also supported
*/
diff --git a/server/src/main/java/com/vaadin/server/DragAndDropService.java b/server/src/main/java/com/vaadin/server/DragAndDropService.java
index 4a894b3bff..61fd1fefbd 100644
--- a/server/src/main/java/com/vaadin/server/DragAndDropService.java
+++ b/server/src/main/java/com/vaadin/server/DragAndDropService.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -67,17 +67,15 @@ public class DragAndDropService implements VariableOwner, ClientConnector {
.get("component");
if (sourceComponent != null && !sourceComponent.isConnectorEnabled()) {
// source component not supposed to be enabled
- getLogger().warning(
- "Client dropped from " + sourceComponent
- + " even though it's disabled");
+ getLogger().warning("Client dropped from " + sourceComponent
+ + " even though it's disabled");
return;
}
// Validate drop handler owner
if (!(owner instanceof DropTarget)) {
- getLogger()
- .severe("DropHandler owner " + owner
- + " must implement DropTarget");
+ getLogger().severe("DropHandler owner " + owner
+ + " must implement DropTarget");
return;
}
// owner cannot be null here
@@ -85,10 +83,8 @@ public class DragAndDropService implements VariableOwner, ClientConnector {
DropTarget dropTarget = (DropTarget) owner;
if (!dropTarget.isConnectorEnabled()) {
- getLogger()
- .warning(
- "Client dropped on " + owner
- + " even though it's disabled");
+ getLogger().warning("Client dropped on " + owner
+ + " even though it's disabled");
return;
}
@@ -107,7 +103,7 @@ public class DragAndDropService implements VariableOwner, ClientConnector {
/**
* Handles a drop request from the VDragAndDropManager.
- *
+ *
* @param dropTarget
* @param variables
*/
@@ -127,8 +123,10 @@ public class DragAndDropService implements VariableOwner, ClientConnector {
* operation based on the info passed from the client widgets (drag
* source for Transferable, drop target for DragDropDetails).
*/
- Transferable transferable = constructTransferable(dropTarget, variables);
- TargetDetails dropData = constructDragDropDetails(dropTarget, variables);
+ Transferable transferable = constructTransferable(dropTarget,
+ variables);
+ TargetDetails dropData = constructDragDropDetails(dropTarget,
+ variables);
DragAndDropEvent dropEvent = new DragAndDropEvent(transferable,
dropData);
if (dropHandler.getAcceptCriterion().accept(dropEvent)) {
@@ -138,7 +136,7 @@ public class DragAndDropService implements VariableOwner, ClientConnector {
/**
* Handles a drag/move request from the VDragAndDropManager.
- *
+ *
* @param dropTarget
* @param variables
*/
@@ -153,7 +151,8 @@ public class DragAndDropService implements VariableOwner, ClientConnector {
* operation based on the info passed from the client widgets (drag
* source for Transferable, current target for DragDropDetails).
*/
- Transferable transferable = constructTransferable(dropTarget, variables);
+ Transferable transferable = constructTransferable(dropTarget,
+ variables);
TargetDetails dragDropDetails = constructDragDropDetails(dropTarget,
variables);
@@ -166,7 +165,7 @@ public class DragAndDropService implements VariableOwner, ClientConnector {
* Construct DragDropDetails based on variables from client drop target.
* Uses DragDropDetailsTranslator if available, otherwise a default
* DragDropDetails implementation is used.
- *
+ *
* @param dropTarget
* @param variables
* @return
@@ -378,7 +377,7 @@ public class DragAndDropService implements VariableOwner, ClientConnector {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.server.ClientConnector#isAttached()
*/
@Override
diff --git a/server/src/main/java/com/vaadin/server/EncodeResult.java b/server/src/main/java/com/vaadin/server/EncodeResult.java
index bf4fd48438..a6647b1c5a 100644
--- a/server/src/main/java/com/vaadin/server/EncodeResult.java
+++ b/server/src/main/java/com/vaadin/server/EncodeResult.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/main/java/com/vaadin/server/ErrorEvent.java b/server/src/main/java/com/vaadin/server/ErrorEvent.java
index 5f8cb4eaca..b886c30afb 100644
--- a/server/src/main/java/com/vaadin/server/ErrorEvent.java
+++ b/server/src/main/java/com/vaadin/server/ErrorEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.ui.UI;
* Typically handled by {@link VaadinSession#getErrorHandler()} but can also be
* handled by a {@link Connector} specific handler, set using
* {@link ClientConnector#setErrorHandler(ErrorHandler)}.
- *
+ *
*/
public class ErrorEvent implements Serializable {
@@ -37,7 +37,7 @@ public class ErrorEvent implements Serializable {
/**
* Gets the contained throwable, the cause of the error.
- *
+ *
* @return
*/
public Throwable getThrowable() {
@@ -56,7 +56,7 @@ public class ErrorEvent implements Serializable {
* <p>
* Returns a {@link DefaultErrorHandler} if no error handler was found
* </p>
- *
+ *
* @param connector
* The target connector
* @return An ErrorHandler for the connector
@@ -108,10 +108,10 @@ public class ErrorEvent implements Serializable {
/**
* Method for finding the error handler for the given session.
- *
+ *
* @param connector
* The target connector
- *
+ *
* @return An ErrorHandler for the session or null if none was found
*/
public static ErrorHandler findErrorHandler(VaadinSession session) {
diff --git a/server/src/main/java/com/vaadin/server/ErrorHandler.java b/server/src/main/java/com/vaadin/server/ErrorHandler.java
index 9c3af4c999..dc58348db1 100644
--- a/server/src/main/java/com/vaadin/server/ErrorHandler.java
+++ b/server/src/main/java/com/vaadin/server/ErrorHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ public interface ErrorHandler extends Serializable {
/**
* Invoked when an error occurs.
- *
+ *
* @param event
* the fired event.
*/
diff --git a/server/src/main/java/com/vaadin/server/ErrorHandlingRunnable.java b/server/src/main/java/com/vaadin/server/ErrorHandlingRunnable.java
index 8ec24c0bcb..0b8f21c008 100644
--- a/server/src/main/java/com/vaadin/server/ErrorHandlingRunnable.java
+++ b/server/src/main/java/com/vaadin/server/ErrorHandlingRunnable.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import java.io.Serializable;
/**
* Defines the interface to handle exceptions thrown during the execution of a
* FutureAccess.
- *
+ *
* @since 7.1.8
* @author Vaadin Ltd
*/
@@ -28,7 +28,7 @@ public interface ErrorHandlingRunnable extends Runnable, Serializable {
/**
* Handles exceptions thrown during the execution of a FutureAccess.
- *
+ *
* @since 7.1.8
* @param exception
* the thrown exception.
diff --git a/server/src/main/java/com/vaadin/server/ErrorMessage.java b/server/src/main/java/com/vaadin/server/ErrorMessage.java
index 0171b95e54..26bdb123ef 100644
--- a/server/src/main/java/com/vaadin/server/ErrorMessage.java
+++ b/server/src/main/java/com/vaadin/server/ErrorMessage.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ import java.io.Serializable;
/**
* Interface for rendering error messages to terminal. All the visible errors
* shown to user must implement this interface.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -59,7 +59,7 @@ public interface ErrorMessage extends Serializable {
/**
* Textual representation for server-client communication of level
- *
+ *
* @return String for error severity
*/
public String getText() {
@@ -68,7 +68,7 @@ public interface ErrorMessage extends Serializable {
/**
* Integer representation of error severity for comparison
- *
+ *
* @return integer for error severity
*/
public int intValue() {
@@ -115,7 +115,7 @@ public interface ErrorMessage extends Serializable {
/**
* Gets the errors level.
- *
+ *
* @return the level of error as an integer.
*/
public ErrorLevel getErrorLevel();
@@ -123,11 +123,11 @@ public interface ErrorMessage extends Serializable {
/**
* Returns the HTML formatted message to show in as the error message on the
* client.
- *
+ *
* This method should perform any necessary escaping to avoid XSS attacks.
- *
+ *
* TODO this API may still change to use a separate data transfer object
- *
+ *
* @return HTML formatted string for the error message
* @since 7.0
*/
diff --git a/server/src/main/java/com/vaadin/server/Extension.java b/server/src/main/java/com/vaadin/server/Extension.java
index b27c58b4bc..ca6c048d91 100644
--- a/server/src/main/java/com/vaadin/server/Extension.java
+++ b/server/src/main/java/com/vaadin/server/Extension.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ package com.vaadin.server;
* extension from one target to another.
* <p>
* Extensions can use shared state and RPC in the same way as components.
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
@@ -38,7 +38,7 @@ public interface Extension extends ClientConnector {
/**
* Sets the parent connector of the connector.
- *
+ *
* This method automatically calls {@link #attach()} if the connector
* becomes attached to the session.
* <p>
@@ -47,7 +47,7 @@ public interface Extension extends ClientConnector {
* for adding extensions to a parent and it will call this method
* implicitly.
* </p>
- *
+ *
* @param parent
* the parent connector
* @throws IllegalStateException
diff --git a/server/src/main/java/com/vaadin/server/ExternalResource.java b/server/src/main/java/com/vaadin/server/ExternalResource.java
index e3b026dde8..2eed5b7ab5 100644
--- a/server/src/main/java/com/vaadin/server/ExternalResource.java
+++ b/server/src/main/java/com/vaadin/server/ExternalResource.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.util.FileTypeResolver;
* <code>ExternalResource</code> implements source for resources fetched from
* location specified by URL:s. The resources are fetched directly by the client
* terminal and are not fetched trough the terminal adapter.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -44,7 +44,7 @@ public class ExternalResource implements Resource, Serializable {
/**
* Creates a new download component for downloading directly from given URL.
- *
+ *
* @param sourceURL
* the source URL.
*/
@@ -58,7 +58,7 @@ public class ExternalResource implements Resource, Serializable {
/**
* Creates a new download component for downloading directly from given URL.
- *
+ *
* @param sourceURL
* the source URL.
* @param mimeType
@@ -71,7 +71,7 @@ public class ExternalResource implements Resource, Serializable {
/**
* Creates a new download component for downloading directly from given URL.
- *
+ *
* @param sourceURL
* the source URL.
*/
@@ -85,7 +85,7 @@ public class ExternalResource implements Resource, Serializable {
/**
* Creates a new download component for downloading directly from given URL.
- *
+ *
* @param sourceURL
* the source URL.
* @param mimeType
@@ -98,7 +98,7 @@ public class ExternalResource implements Resource, Serializable {
/**
* Gets the URL of the external resource.
- *
+ *
* @return the URL of the external resource.
*/
public String getURL() {
@@ -107,7 +107,7 @@ public class ExternalResource implements Resource, Serializable {
/**
* Gets the MIME type of the resource.
- *
+ *
* @see com.vaadin.server.Resource#getMIMEType()
*/
@Override
diff --git a/server/src/main/java/com/vaadin/server/FileDownloader.java b/server/src/main/java/com/vaadin/server/FileDownloader.java
index b0c3bb1120..adb526219b 100644
--- a/server/src/main/java/com/vaadin/server/FileDownloader.java
+++ b/server/src/main/java/com/vaadin/server/FileDownloader.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -41,7 +41,7 @@ import com.vaadin.ui.AbstractComponent;
* while files served in other ways, (e.g. {@link ExternalResource} or
* {@link ThemeResource}) will not automatically get this treatment.
* </p>
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
@@ -53,7 +53,7 @@ public class FileDownloader extends AbstractExtension {
* Creates a new file downloader for the given resource. To use the
* downloader, you should also {@link #extend(AbstractClientConnector)} the
* component.
- *
+ *
* @param resource
* the resource to download when the user clicks the extended
* component.
@@ -71,7 +71,7 @@ public class FileDownloader extends AbstractExtension {
/**
* Gets the resource set for download.
- *
+ *
* @return the resource that will be downloaded if clicking the extended
* component
*/
@@ -82,7 +82,7 @@ public class FileDownloader extends AbstractExtension {
/**
* Sets the resource that is downloaded when the extended component is
* clicked.
- *
+ *
* @param resource
* the resource to download
*/
@@ -100,7 +100,7 @@ public class FileDownloader extends AbstractExtension {
* {@link FileResource} and {@link ClassResource}) but not other resource
* types (e.g. {@link ExternalResource} or {@link ThemeResource}).
* </p>
- *
+ *
* @param overrideContentType
* <code>true</code> to override the content type if possible;
* <code>false</code> to use the original content type.
@@ -111,9 +111,9 @@ public class FileDownloader extends AbstractExtension {
/**
* Checks whether the content type should be overridden.
- *
+ *
* @see #setOverrideContentType(boolean)
- *
+ *
* @return <code>true</code> if the content type will be overridden when
* possible; <code>false</code> if the original content type will be
* used.
@@ -144,9 +144,8 @@ public class FileDownloader extends AbstractExtension {
String contentDisposition = stream
.getParameter(DownloadStream.CONTENT_DISPOSITION);
if (contentDisposition == null) {
- contentDisposition = "attachment; "
- + DownloadStream.getContentDispositionFilename(stream
- .getFileName());
+ contentDisposition = "attachment; " + DownloadStream
+ .getContentDispositionFilename(stream.getFileName());
}
stream.setParameter(DownloadStream.CONTENT_DISPOSITION,
diff --git a/server/src/main/java/com/vaadin/server/FileResource.java b/server/src/main/java/com/vaadin/server/FileResource.java
index 28de124fe9..ff74ab9dca 100644
--- a/server/src/main/java/com/vaadin/server/FileResource.java
+++ b/server/src/main/java/com/vaadin/server/FileResource.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,7 +27,7 @@ import com.vaadin.util.FileTypeResolver;
* files and directories are served through URI:s to the client terminal and
* thus must be registered to an URI context before they can be used. The
* resource is automatically registered to the application when it is created.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -52,7 +52,7 @@ public class FileResource implements ConnectorResource {
/**
* Creates a new file resource for providing given file for client
* terminals.
- *
+ *
* @param sourceFile
* the file that should be served.
*/
@@ -66,22 +66,23 @@ public class FileResource implements ConnectorResource {
@Override
public DownloadStream getStream() {
try {
- final DownloadStream ds = new DownloadStream(new FileInputStream(
- sourceFile), getMIMEType(), getFilename());
+ final DownloadStream ds = new DownloadStream(
+ new FileInputStream(sourceFile), getMIMEType(),
+ getFilename());
ds.setParameter("Content-Length",
String.valueOf(sourceFile.length()));
ds.setCacheTime(cacheTime);
return ds;
} catch (final FileNotFoundException e) {
- throw new RuntimeException("File not found: "
- + sourceFile.getName(), e);
+ throw new RuntimeException(
+ "File not found: " + sourceFile.getName(), e);
}
}
/**
* Gets the source file.
- *
+ *
* @return the source File.
*/
public File getSourceFile() {
@@ -90,7 +91,7 @@ public class FileResource implements ConnectorResource {
/**
* Sets the source file.
- *
+ *
* @param sourceFile
* the source file to set.
*/
@@ -113,7 +114,7 @@ public class FileResource implements ConnectorResource {
* possibility cache streams sent to the client. The caching may be made in
* adapter or at the client if the client supports caching. Default is
* <code>DownloadStream.DEFAULT_CACHETIME</code>.
- *
+ *
* @return Cache time in milliseconds.
*/
public long getCacheTime() {
@@ -125,7 +126,7 @@ public class FileResource implements ConnectorResource {
* possibility cache streams sent to the client. The caching may be made in
* adapter or at the client if the client supports caching. Zero or negavive
* value disbales the caching of this stream.
- *
+ *
* @param cacheTime
* the cache time in milliseconds.
*/
@@ -135,12 +136,12 @@ public class FileResource implements ConnectorResource {
/**
* Gets the size of the download buffer used for this resource.
- *
+ *
* <p>
* If the buffer size is 0, the buffer size is decided by the terminal
* adapter. The default value is 0.
* </p>
- *
+ *
* @return the size of the buffer in bytes.
*/
public int getBufferSize() {
@@ -149,7 +150,7 @@ public class FileResource implements ConnectorResource {
/**
* Sets the size of the download buffer used for this resource.
- *
+ *
* @param bufferSize
* the size of the buffer in bytes.
*/
diff --git a/server/src/main/java/com/vaadin/server/FontAwesome.java b/server/src/main/java/com/vaadin/server/FontAwesome.java
index 2a07a0b1a6..ee152df571 100644
--- a/server/src/main/java/com/vaadin/server/FontAwesome.java
+++ b/server/src/main/java/com/vaadin/server/FontAwesome.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ package com.vaadin.server;
* <p>
* The Font Awesome version currently included is 4.4.0.
* </p>
- *
+ *
* @since 7.2
* @author Vaadin Ltd
* @see http://fortawesome.github.io/Font-Awesome/
@@ -750,7 +750,7 @@ public enum FontAwesome implements FontIcon {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.FontIcon#getFontFamily()
*/
@Override
@@ -760,7 +760,7 @@ public enum FontAwesome implements FontIcon {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.FontIcon#getCodepoint()
*/
@Override
@@ -775,7 +775,7 @@ public enum FontAwesome implements FontIcon {
/**
* Finds an instance of FontAwesome with given codepoint
- *
+ *
* @since 7.5.0
* @param codepoint
* @return FontAwesome instance with a specific codepoint or null if there
@@ -787,8 +787,8 @@ public enum FontAwesome implements FontIcon {
return f;
}
}
- throw new IllegalArgumentException("Codepoint " + codepoint
- + " not found in FontAwesome");
+ throw new IllegalArgumentException(
+ "Codepoint " + codepoint + " not found in FontAwesome");
}
}
diff --git a/server/src/main/java/com/vaadin/server/FontIcon.java b/server/src/main/java/com/vaadin/server/FontIcon.java
index 2ada45084f..f3671d5159 100644
--- a/server/src/main/java/com/vaadin/server/FontIcon.java
+++ b/server/src/main/java/com/vaadin/server/FontIcon.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,7 +27,7 @@ import com.vaadin.ui.Label;
* <code>fonticon://&lt;fontfamily&gt;/&lt;codepoint&gt;</code> to reference a
* specific icon from a specific icon font. <br/>
* </p>
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
@@ -35,7 +35,7 @@ public interface FontIcon extends Resource {
/**
* Returns the name (font family) of the font from which this icon comes.
* The name is used to apply the correct font where the icon is used.
- *
+ *
* @since 7.2
* @return
*/
@@ -50,7 +50,7 @@ public interface FontIcon extends Resource {
* When constructing icon fonts, it might be a good idea to use the
* codepoints in the "Private use area", from 0xE000 0xF8FF.
* </p>
- *
+ *
* @since 7.2
* @return
*/
@@ -59,8 +59,8 @@ public interface FontIcon extends Resource {
/**
* Returns HTML that can be used to display the icon in places where HTML
* can be used, such as a {@link Label} with {@link ContentMode#HTML}.
- *
- *
+ *
+ *
* @since 7.2
* @return HTML needed to display icon
*/
diff --git a/server/src/main/java/com/vaadin/server/GAEVaadinServlet.java b/server/src/main/java/com/vaadin/server/GAEVaadinServlet.java
index 2429fde746..2164517b78 100644
--- a/server/src/main/java/com/vaadin/server/GAEVaadinServlet.java
+++ b/server/src/main/java/com/vaadin/server/GAEVaadinServlet.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -51,7 +51,7 @@ import com.google.apphosting.api.DeadlineExceededException;
/**
* ApplicationServlet to be used when deploying to Google App Engine, in
* web.xml:
- *
+ *
* <pre>
* &lt;servlet&gt;
* &lt;servlet-name&gt;HelloWorld&lt;/servlet-name&gt;
@@ -62,17 +62,17 @@ import com.google.apphosting.api.DeadlineExceededException;
* &lt;/init-param&gt;
* &lt;/servlet&gt;
* </pre>
- *
+ *
* Session support must be enabled in appengine-web.xml:
- *
+ *
* <pre>
* &lt;sessions-enabled&gt;true&lt;/sessions-enabled&gt;
* </pre>
- *
+ *
* Appengine datastore cleanup can be invoked by calling one of the applications
* with an additional path "/CLEAN". This can be set up as a cron-job in
* cron.xml (see appengine documentation for more information):
- *
+ *
* <pre>
* &lt;cronentries&gt;
* &lt;cron&gt;
@@ -82,18 +82,18 @@ import com.google.apphosting.api.DeadlineExceededException;
* &lt;/cron&gt;
* &lt;/cronentries&gt;
* </pre>
- *
+ *
* It is recommended (but not mandatory) to extract themes and widgetsets and
* have App Engine server these statically. Extract VAADIN folder (and it's
* contents) 'next to' the WEB-INF folder, and add the following to
* appengine-web.xml:
- *
+ *
* <pre>
* &lt;static-files&gt;
* &lt;include path=&quot;/VAADIN/**&quot; /&gt;
* &lt;/static-files&gt;
* </pre>
- *
+ *
* Additional limitations:
* <ul>
* <li/>Do not change application state when serving an ApplicationResource.
@@ -139,41 +139,31 @@ public class GAEVaadinServlet extends VaadinServlet {
protected void sendDeadlineExceededNotification(
VaadinServletRequest request, VaadinServletResponse response)
throws IOException {
- criticalNotification(
- request,
- response,
- "Deadline Exceeded",
+ criticalNotification(request, response, "Deadline Exceeded",
"I'm sorry, but the operation took too long to complete. We'll try reloading to see where we're at, please take note of any unsaved data...",
"", null);
}
- protected void sendNotSerializableNotification(
- VaadinServletRequest request, VaadinServletResponse response)
- throws IOException {
- criticalNotification(
- request,
- response,
- "NotSerializableException",
+ protected void sendNotSerializableNotification(VaadinServletRequest request,
+ VaadinServletResponse response) throws IOException {
+ criticalNotification(request, response, "NotSerializableException",
"I'm sorry, but there seems to be a serious problem, please contact the administrator. And please take note of any unsaved data...",
- "", getApplicationUrl(request).toString()
- + "?restartApplication");
+ "",
+ getApplicationUrl(request).toString() + "?restartApplication");
}
protected void sendCriticalErrorNotification(VaadinServletRequest request,
VaadinServletResponse response) throws IOException {
- criticalNotification(
- request,
- response,
- "Critical error",
+ criticalNotification(request, response, "Critical error",
"I'm sorry, but there seems to be a serious problem, please contact the administrator. And please take note of any unsaved data...",
- "", getApplicationUrl(request).toString()
- + "?restartApplication");
+ "",
+ getApplicationUrl(request).toString() + "?restartApplication");
}
@Override
protected void service(HttpServletRequest unwrappedRequest,
- HttpServletResponse unwrappedResponse) throws ServletException,
- IOException {
+ HttpServletResponse unwrappedResponse)
+ throws ServletException, IOException {
VaadinServletRequest request = new VaadinServletRequest(
unwrappedRequest, getService());
VaadinServletResponse response = new VaadinServletResponse(
@@ -200,8 +190,8 @@ public class GAEVaadinServlet extends VaadinServlet {
return;
}
- final HttpSession session = request.getSession(getService()
- .requestCanCreateSession(request));
+ final HttpSession session = request
+ .getSession(getService().requestCanCreateSession(request));
if (session == null) {
try {
getService().handleSessionExpired(request, response);
@@ -219,7 +209,8 @@ public class GAEVaadinServlet extends VaadinServlet {
try {
// try to get lock
long started = System.currentTimeMillis();
- while (System.currentTimeMillis() - started < MAX_UIDL_WAIT_MILLISECONDS) {
+ while (System.currentTimeMillis()
+ - started < MAX_UIDL_WAIT_MILLISECONDS) {
locked = memcache.put(mutex, 1, Expiration.byDeltaSeconds(40),
MemcacheService.SetPolicy.ADD_ONLY_IF_NOT_PRESENT);
if (locked || ServletPortletHelper.isUIDLRequest(request)) {
@@ -233,8 +224,8 @@ public class GAEVaadinServlet extends VaadinServlet {
try {
Thread.sleep(RETRY_AFTER_MILLISECONDS);
} catch (InterruptedException e) {
- getLogger().finer(
- "Thread.sleep() interrupted while waiting for lock. Trying again. "
+ getLogger()
+ .finer("Thread.sleep() interrupted while waiting for lock. Trying again. "
+ e);
}
}
@@ -244,7 +235,8 @@ public class GAEVaadinServlet extends VaadinServlet {
// client to retry
response.setStatus(HttpServletResponse.SC_SERVICE_UNAVAILABLE);
// Note: currently interpreting Retry-After as ms, not sec
- response.setHeader("Retry-After", "" + RETRY_AFTER_MILLISECONDS);
+ response.setHeader("Retry-After",
+ "" + RETRY_AFTER_MILLISECONDS);
return;
}
@@ -264,8 +256,8 @@ public class GAEVaadinServlet extends VaadinServlet {
started = new Date().getTime();
String id = AC_BASE + session.getId();
- Date expire = new Date(started
- + (getMaxInactiveIntervalSeconds(session) * 1000));
+ Date expire = new Date(
+ started + (getMaxInactiveIntervalSeconds(session) * 1000));
Expiration expires = Expiration.onDate(expire);
memcache.put(id, bytes, expires);
@@ -303,16 +295,15 @@ public class GAEVaadinServlet extends VaadinServlet {
/**
* Returns the maximum inactive time for a session. This is used for
* handling the expiration of session related information in caches etc.
- *
+ *
* @param session
* @return inactive timeout in seconds, greater than zero
*/
protected int getMaxInactiveIntervalSeconds(final HttpSession session) {
int interval = session.getMaxInactiveInterval();
if (interval <= 0) {
- getLogger()
- .log(Level.FINE,
- "Undefined session expiration time, using default value instead.");
+ getLogger().log(Level.FINE,
+ "Undefined session expiration time, using default value instead.");
return DEFAULT_MAX_INACTIVE_INTERVAL;
}
return interval;
@@ -336,11 +327,9 @@ public class GAEVaadinServlet extends VaadinServlet {
Blob blob = (Blob) entity.getProperty(PROPERTY_DATA);
serializedAC = blob.getBytes();
// bring it to memcache
- memcache.put(
- AC_BASE + session.getId(),
- serializedAC,
- Expiration
- .byDeltaSeconds(getMaxInactiveIntervalSeconds(session)),
+ memcache.put(AC_BASE + session.getId(), serializedAC,
+ Expiration.byDeltaSeconds(
+ getMaxInactiveIntervalSeconds(session)),
MemcacheService.SetPolicy.ADD_ONLY_IF_NOT_PRESENT);
}
}
@@ -353,17 +342,17 @@ public class GAEVaadinServlet extends VaadinServlet {
getService().storeSession(vaadinSession,
new WrappedHttpSession(session));
} catch (IOException e) {
- getLogger().log(
- Level.WARNING,
+ getLogger().log(Level.WARNING,
"Could not de-serialize ApplicationContext for "
+ session.getId()
- + " A new one will be created. ", e);
+ + " A new one will be created. ",
+ e);
} catch (ClassNotFoundException e) {
- getLogger().log(
- Level.WARNING,
+ getLogger().log(Level.WARNING,
"Could not de-serialize ApplicationContext for "
+ session.getId()
- + " A new one will be created. ", e);
+ + " A new one will be created. ",
+ e);
}
}
@@ -386,7 +375,7 @@ public class GAEVaadinServlet extends VaadinServlet {
/**
* Removes the ApplicationContext from the session in order to minimize the
* data serialized to datastore and memcache.
- *
+ *
* @param request
*/
private void cleanSession(VaadinServletRequest request) {
@@ -416,7 +405,7 @@ public class GAEVaadinServlet extends VaadinServlet {
/**
* This will look at the timestamp and delete expired persisted Vaadin and
* appengine sessions from the datastore.
- *
+ *
* TODO Possible improvements include: 1. Use transactions (requires entity
* groups - overkill?) 2. Delete one-at-a-time, catch possible exception,
* continue w/ next.
@@ -430,16 +419,15 @@ public class GAEVaadinServlet extends VaadinServlet {
Query q = new Query(AC_BASE);
q.setKeysOnly();
- q.addFilter(PROPERTY_EXPIRES,
- FilterOperator.LESS_THAN_OR_EQUAL, expire);
+ q.addFilter(PROPERTY_EXPIRES, FilterOperator.LESS_THAN_OR_EQUAL,
+ expire);
PreparedQuery pq = ds.prepare(q);
- List<Entity> entities = pq.asList(Builder
- .withLimit(CLEANUP_LIMIT));
+ List<Entity> entities = pq
+ .asList(Builder.withLimit(CLEANUP_LIMIT));
if (entities != null) {
- getLogger()
- .log(Level.INFO,
- "Vaadin cleanup deleting {0} expired Vaadin sessions.",
- entities.size());
+ getLogger().log(Level.INFO,
+ "Vaadin cleanup deleting {0} expired Vaadin sessions.",
+ entities.size());
List<Key> keys = new ArrayList<Key>();
for (Entity e : entities) {
keys.add(e.getKey());
@@ -454,13 +442,12 @@ public class GAEVaadinServlet extends VaadinServlet {
q.addFilter(PROPERTY_APPENGINE_EXPIRES,
FilterOperator.LESS_THAN_OR_EQUAL, expire);
PreparedQuery pq = ds.prepare(q);
- List<Entity> entities = pq.asList(Builder
- .withLimit(CLEANUP_LIMIT));
+ List<Entity> entities = pq
+ .asList(Builder.withLimit(CLEANUP_LIMIT));
if (entities != null) {
- getLogger()
- .log(Level.INFO,
- "Vaadin cleanup deleting {0} expired appengine sessions.",
- entities.size());
+ getLogger().log(Level.INFO,
+ "Vaadin cleanup deleting {0} expired appengine sessions.",
+ entities.size());
List<Key> keys = new ArrayList<Key>();
for (Entity e : entities) {
keys.add(e.getKey());
diff --git a/server/src/main/java/com/vaadin/server/GenericFontIcon.java b/server/src/main/java/com/vaadin/server/GenericFontIcon.java
index cf435d55e6..879ca679c8 100644
--- a/server/src/main/java/com/vaadin/server/GenericFontIcon.java
+++ b/server/src/main/java/com/vaadin/server/GenericFontIcon.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -17,7 +17,7 @@ package com.vaadin.server;
/**
* A generic implementation of {@link FontIcon} interface
- *
+ *
* @since 7.5.0
* @author Vaadin Ltd
*/
@@ -29,7 +29,7 @@ public class GenericFontIcon implements FontIcon {
/**
* Creates a new instance of GenericFontIcon with given font family and
* codepoint
- *
+ *
* @param fontFamily
* Name of the type face that is used to display icons
* @param codepoint
@@ -42,7 +42,7 @@ public class GenericFontIcon implements FontIcon {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.server.FontIcon#getFontFamily()
*/
@Override
@@ -52,7 +52,7 @@ public class GenericFontIcon implements FontIcon {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.server.Resource#getMIMEType()
*/
@Override
@@ -63,7 +63,7 @@ public class GenericFontIcon implements FontIcon {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.server.FontIcon#getCodepoint()
*/
@Override
@@ -73,7 +73,7 @@ public class GenericFontIcon implements FontIcon {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.server.FontIcon#getHtml()
*/
@Override
@@ -84,7 +84,7 @@ public class GenericFontIcon implements FontIcon {
/**
* Utility method for generating HTML that displays an icon from specific
* fontFamiliy with a given codePoint in the font
- *
+ *
* @param fontFamily
* Name of the font family
* @param codePoint
@@ -98,7 +98,7 @@ public class GenericFontIcon implements FontIcon {
/*
* (non-Javadoc)
- *
+ *
* @see java.lang.Object#hashCode()
*/
@Override
@@ -113,7 +113,7 @@ public class GenericFontIcon implements FontIcon {
/*
* (non-Javadoc)
- *
+ *
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
diff --git a/server/src/main/java/com/vaadin/server/GlobalResourceHandler.java b/server/src/main/java/com/vaadin/server/GlobalResourceHandler.java
index d1ef125534..1c3d5816d4 100644
--- a/server/src/main/java/com/vaadin/server/GlobalResourceHandler.java
+++ b/server/src/main/java/com/vaadin/server/GlobalResourceHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -36,7 +36,7 @@ import com.vaadin.util.CurrentInstance;
/**
* A {@link RequestHandler} that takes care of {@link ConnectorResource}s that
* should not be served by the connector.
- *
+ *
* @author Vaadin Ltd
* @version @VERSION@
* @since 7.0.0
@@ -61,9 +61,9 @@ public class GlobalResourceHandler implements RequestHandler {
private int nextLegacyId = 0;
// APP/global/[uiid]/[type]/[id]
- private static final Pattern pattern = Pattern.compile("^/?"
- + ApplicationConstants.APP_PATH + '/' + RESOURCE_REQUEST_PATH
- + "(\\d+)/(([^/]+)(/.*))");
+ private static final Pattern pattern = Pattern
+ .compile("^/?" + ApplicationConstants.APP_PATH + '/'
+ + RESOURCE_REQUEST_PATH + "(\\d+)/(([^/]+)(/.*))");
@Override
public boolean handleRequest(VaadinSession session, VaadinRequest request,
@@ -83,8 +83,8 @@ public class GlobalResourceHandler implements RequestHandler {
String key = matcher.group(2);
if (key == null) {
- return error(request, response, pathInfo
- + " is not a valid global resource path");
+ return error(request, response,
+ pathInfo + " is not a valid global resource path");
}
session.lock();
Map<Class<?>, CurrentInstance> oldInstances = null;
@@ -104,14 +104,14 @@ public class GlobalResourceHandler implements RequestHandler {
}
if (resource == null) {
- return error(request, response, "Global resource " + key
- + " not found");
+ return error(request, response,
+ "Global resource " + key + " not found");
}
stream = resource.getStream();
if (stream == null) {
- return error(request, response, "Resource " + resource
- + " didn't produce any stream.");
+ return error(request, response,
+ "Resource " + resource + " didn't produce any stream.");
}
} finally {
session.unlock();
@@ -130,7 +130,7 @@ public class GlobalResourceHandler implements RequestHandler {
* A {@link ConnectorResource} registered for a {@link LegacyComponent} will
* be set to be served with a global URL. Other resource types will be
* ignored and thus not served by this handler.
- *
+ *
* @param resource
* the resource to register
* @param ownerConnector
@@ -181,7 +181,7 @@ public class GlobalResourceHandler implements RequestHandler {
/**
* Gets a global URI for a resource if it's registered with this handler.
- *
+ *
* @param connector
* the connector for which the uri should be generated.
* @param resource
@@ -189,7 +189,8 @@ public class GlobalResourceHandler implements RequestHandler {
* @return an URI string, or <code>null</code> if the resource is not
* registered.
*/
- public String getUri(ClientConnector connector, ConnectorResource resource) {
+ public String getUri(ClientConnector connector,
+ ConnectorResource resource) {
// app://APP/global/[ui]/[type]/[id]
String uri = legacyResourceKeys.get(resource);
if (uri != null && !uri.isEmpty()) {
@@ -205,7 +206,7 @@ public class GlobalResourceHandler implements RequestHandler {
/**
* Notifies this handler that resources registered for the given connector
* can be released.
- *
+ *
* @param connector
* the connector for which any registered resources can be
* released.
@@ -230,8 +231,8 @@ public class GlobalResourceHandler implements RequestHandler {
return Logger.getLogger(GlobalResourceHandler.class.getName());
}
- private static boolean error(VaadinRequest request,
- VaadinResponse response, String logMessage) throws IOException {
+ private static boolean error(VaadinRequest request, VaadinResponse response,
+ String logMessage) throws IOException {
getLogger().log(Level.WARNING, logMessage);
response.sendError(HttpServletResponse.SC_NOT_FOUND,
request.getPathInfo() + " can not be found");
diff --git a/server/src/main/java/com/vaadin/server/JavaScriptCallbackHelper.java b/server/src/main/java/com/vaadin/server/JavaScriptCallbackHelper.java
index ac4a586d00..9e9dcf3d2a 100644
--- a/server/src/main/java/com/vaadin/server/JavaScriptCallbackHelper.java
+++ b/server/src/main/java/com/vaadin/server/JavaScriptCallbackHelper.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -39,7 +39,7 @@ import elemental.json.JsonException;
* {@link com.vaadin.client.JavaScriptConnectorHelper}.
* <p>
* You should most likely no use this class directly.
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
@@ -89,13 +89,12 @@ public class JavaScriptCallbackHelper implements Serializable {
public void invokeCallback(String name, Object... arguments) {
if (callbacks.containsKey(name)) {
- throw new IllegalStateException(
- "Can't call callback "
- + name
- + " on the client because a callback with the same name is registered on the server.");
+ throw new IllegalStateException("Can't call callback " + name
+ + " on the client because a callback with the same name is registered on the server.");
}
- JsonArray args = (JsonArray) JsonCodec.encode(arguments, null,
- Object[].class, null).getEncodedValue();
+ JsonArray args = (JsonArray) JsonCodec
+ .encode(arguments, null, Object[].class, null)
+ .getEncodedValue();
connector.addMethodInvocationToQueue(
JavaScriptCallbackRpc.class.getName(), CALL_METHOD,
new Object[] { name, args });
diff --git a/server/src/main/java/com/vaadin/server/JsonCodec.java b/server/src/main/java/com/vaadin/server/JsonCodec.java
index 8b685bb046..60f3856211 100644
--- a/server/src/main/java/com/vaadin/server/JsonCodec.java
+++ b/server/src/main/java/com/vaadin/server/JsonCodec.java
@@ -417,7 +417,8 @@ public class JsonCodec implements Serializable {
connectorTracker);
} else if (JsonConstants.VTYPE_STRINGARRAY.equals(transportType)) {
- return decodeArray(String.class, (JsonArray) encodedJsonValue, null);
+ return decodeArray(String.class, (JsonArray) encodedJsonValue,
+ null);
}
// Special Vaadin types
@@ -467,7 +468,8 @@ public class JsonCodec implements Serializable {
}
}
- if (!restrictToInternalTypes && targetType instanceof ParameterizedType) {
+ if (!restrictToInternalTypes
+ && targetType instanceof ParameterizedType) {
Type keyType = ((ParameterizedType) targetType)
.getActualTypeArguments()[0];
Type valueType = ((ParameterizedType) targetType)
@@ -489,14 +491,16 @@ public class JsonCodec implements Serializable {
}
private static Map<Object, Object> decodeObjectMap(Type keyType,
- Type valueType, JsonArray jsonMap, ConnectorTracker connectorTracker) {
+ Type valueType, JsonArray jsonMap,
+ ConnectorTracker connectorTracker) {
JsonArray keys = jsonMap.getArray(0);
JsonArray values = jsonMap.getArray(1);
assert (keys.length() == values.length());
- Map<Object, Object> map = new HashMap<Object, Object>(keys.length() * 2);
+ Map<Object, Object> map = new HashMap<Object, Object>(
+ keys.length() * 2);
for (int i = 0; i < keys.length(); i++) {
Object key = decodeInternalOrCustomType(keyType, keys.get(i),
connectorTracker);
@@ -554,7 +558,8 @@ public class JsonCodec implements Serializable {
private static Object decodeParametrizedType(Type targetType,
boolean restrictToInternalTypes, int typeIndex, JsonValue value,
ConnectorTracker connectorTracker) {
- if (!restrictToInternalTypes && targetType instanceof ParameterizedType) {
+ if (!restrictToInternalTypes
+ && targetType instanceof ParameterizedType) {
Type childType = ((ParameterizedType) targetType)
.getActualTypeArguments()[typeIndex];
// Only decode the given type
@@ -569,7 +574,8 @@ public class JsonCodec implements Serializable {
}
}
- private static Object decodeEnum(Class<? extends Enum> cls, JsonString value) {
+ private static Object decodeEnum(Class<? extends Enum> cls,
+ JsonString value) {
return Enum.valueOf(cls, value.getString());
}
@@ -616,8 +622,8 @@ public class JsonCodec implements Serializable {
String fieldName = property.getName();
JsonValue encodedFieldValue = serializedObject.get(fieldName);
Type fieldType = property.getType();
- Object decodedFieldValue = decodeInternalOrCustomType(
- fieldType, encodedFieldValue, connectorTracker);
+ Object decodedFieldValue = decodeInternalOrCustomType(fieldType,
+ encodedFieldValue, connectorTracker);
property.setValue(decodedObject, decodedFieldValue);
}
@@ -654,11 +660,11 @@ public class JsonCodec implements Serializable {
toReturn = encodeCollection(valueType, (Collection<?>) value,
connectorTracker);
} else if (value instanceof Map) {
- toReturn = encodeMap(valueType, (Map<?, ?>) value, connectorTracker);
+ toReturn = encodeMap(valueType, (Map<?, ?>) value,
+ connectorTracker);
} else if (value instanceof Connector) {
- if (value instanceof Component
- && !(LegacyCommunicationManager
- .isComponentVisibleToClient((Component) value))) {
+ if (value instanceof Component && !(LegacyCommunicationManager
+ .isComponentVisibleToClient((Component) value))) {
// an encoded null is cached, return it directly.
return ENCODE_RESULT_NULL;
}
@@ -724,12 +730,11 @@ public class JsonCodec implements Serializable {
Object fieldValue = property.getValue(value);
if (encoded.hasKey(fieldName)) {
- throw new RuntimeException(
- "Can't encode "
- + valueType.getName()
- + " as it has multiple properties with the name "
- + fieldName.toLowerCase()
- + ". This can happen if there are getters and setters for a public field (the framework can't know which to ignore) or if there are properties with only casing distinguishing between the names (e.g. getFoo() and getFOO())");
+ throw new RuntimeException("Can't encode "
+ + valueType.getName()
+ + " as it has multiple properties with the name "
+ + fieldName.toLowerCase()
+ + ". This can happen if there are getters and setters for a public field (the framework can't know which to ignore) or if there are properties with only casing distinguishing between the names (e.g. getFoo() and getFOO())");
}
JsonValue fieldReference;
@@ -746,7 +751,8 @@ public class JsonCodec implements Serializable {
fieldType, connectorTracker);
encoded.put(fieldName, encodeResult.getEncodedValue());
- if (valueChanged(encodeResult.getEncodedValue(), fieldReference)) {
+ if (valueChanged(encodeResult.getEncodedValue(),
+ fieldReference)) {
diff.put(fieldName, encodeResult.getDiffOrValue());
}
}
@@ -781,12 +787,12 @@ public class JsonCodec implements Serializable {
/**
* Compares two json values for deep equality.
- *
+ *
* This is a helper for overcoming the fact that
* {@link JsonValue#equals(Object)} only does an identity check and
* {@link JsonValue#jsEquals(JsonValue)} is defined to use JavaScript
* semantics where arrays and objects are equals only based on identity.
- *
+ *
* @since 7.4
* @param a
* the first json value to check, may not be null
@@ -896,7 +902,8 @@ public class JsonCodec implements Serializable {
if (mapType instanceof ParameterizedType) {
keyType = ((ParameterizedType) mapType).getActualTypeArguments()[0];
- valueType = ((ParameterizedType) mapType).getActualTypeArguments()[1];
+ valueType = ((ParameterizedType) mapType)
+ .getActualTypeArguments()[1];
} else {
throw new JsonException("Map is missing generics");
}
diff --git a/server/src/main/java/com/vaadin/server/JsonPaintTarget.java b/server/src/main/java/com/vaadin/server/JsonPaintTarget.java
index a885acccbc..41cf52d6ab 100644
--- a/server/src/main/java/com/vaadin/server/JsonPaintTarget.java
+++ b/server/src/main/java/com/vaadin/server/JsonPaintTarget.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -35,10 +35,10 @@ import com.vaadin.ui.CustomLayout;
/**
* User Interface Description Language Target.
- *
+ *
* TODO document better: role of this class, UIDL format, attributes, variables,
* etc.
- *
+ *
* @author Vaadin Ltd.
* @since 5.0
*/
@@ -77,7 +77,7 @@ public class JsonPaintTarget implements PaintTarget {
/**
* Creates a new JsonPaintTarget.
- *
+ *
* @param manager
* @param outWriter
* A character-output stream.
@@ -87,8 +87,8 @@ public class JsonPaintTarget implements PaintTarget {
* @throws PaintException
* if the paint operation failed.
*/
- public JsonPaintTarget(LegacyCommunicationManager manager,
- Writer outWriter, boolean cachingRequired) throws PaintException {
+ public JsonPaintTarget(LegacyCommunicationManager manager, Writer outWriter,
+ boolean cachingRequired) throws PaintException {
this.manager = manager;
@@ -112,18 +112,18 @@ public class JsonPaintTarget implements PaintTarget {
/**
* Prints the element start tag.
- *
+ *
* <pre>
* Todo:
* Checking of input values
- *
+ *
* </pre>
- *
+ *
* @param tagName
* the name of the start tag.
* @throws PaintException
* if the paint operation failed.
- *
+ *
*/
public void startTag(String tagName, boolean isChildNode)
throws PaintException {
@@ -152,10 +152,10 @@ public class JsonPaintTarget implements PaintTarget {
/**
* Prints the element end tag.
- *
+ *
* If the parent tag is closed before every child tag is closed an
* PaintException is raised.
- *
+ *
* @param tag
* the name of the end tag.
* @throws PaintException
@@ -198,7 +198,7 @@ public class JsonPaintTarget implements PaintTarget {
/**
* Substitutes the XML sensitive characters with predefined XML entities.
- *
+ *
* @param xml
* the String to be substituted.
* @return A new string instance where all occurrences of XML sensitive
@@ -213,12 +213,12 @@ public class JsonPaintTarget implements PaintTarget {
/**
* Substitutes the XML sensitive characters with predefined XML entities.
- *
+ *
* @param xml
* the String to be substituted.
* @return A new StringBuilder instance where all occurrences of XML
* sensitive characters are substituted with entities.
- *
+ *
*/
static StringBuilder escapeXML(StringBuilder xml) {
if (xml == null || xml.length() <= 0) {
@@ -241,7 +241,7 @@ public class JsonPaintTarget implements PaintTarget {
/**
* Escapes the given string so it can safely be used as a JSON string.
- *
+ *
* @param s
* The string to escape
* @return Escaped version of the string
@@ -298,7 +298,7 @@ public class JsonPaintTarget implements PaintTarget {
/**
* Substitutes a XML sensitive character with predefined XML entity.
- *
+ *
* @param c
* the Character to be replaced with an entity.
* @return String of the entity or null if character is not to be replaced
@@ -323,11 +323,11 @@ public class JsonPaintTarget implements PaintTarget {
/**
* Prints XML-escaped text.
- *
+ *
* @param str
* @throws PaintException
* if the paint operation failed.
- *
+ *
*/
@Override
@@ -341,7 +341,8 @@ public class JsonPaintTarget implements PaintTarget {
}
@Override
- public void addAttribute(String name, Resource value) throws PaintException {
+ public void addAttribute(String name, Resource value)
+ throws PaintException {
if (value == null) {
throw new NullPointerException();
}
@@ -417,8 +418,7 @@ public class JsonPaintTarget implements PaintTarget {
}
sb.append("\":");
if (mapValue instanceof Float || mapValue instanceof Integer
- || mapValue instanceof Double
- || mapValue instanceof Boolean
+ || mapValue instanceof Double || mapValue instanceof Boolean
|| mapValue instanceof Alignment) {
sb.append(mapValue);
} else {
@@ -465,7 +465,8 @@ public class JsonPaintTarget implements PaintTarget {
@Override
public void addVariable(VariableOwner owner, String name, Component value)
throws PaintException {
- tag.addVariable(new StringVariable(owner, name, value.getConnectorId()));
+ tag.addVariable(
+ new StringVariable(owner, name, value.getConnectorId()));
}
@Override
@@ -506,14 +507,14 @@ public class JsonPaintTarget implements PaintTarget {
/**
* Adds a upload stream type variable.
- *
+ *
* TODO not converted for JSON
- *
+ *
* @param owner
* the Listener for variable changes.
* @param name
* the Variable name.
- *
+ *
* @throws PaintException
* if the paint operation failed.
*/
@@ -528,9 +529,9 @@ public class JsonPaintTarget implements PaintTarget {
/**
* Prints the single text section.
- *
+ *
* Prints full text section. The section data is escaped
- *
+ *
* @param sectionTagName
* the name of the tag.
* @param sectionData
@@ -548,7 +549,7 @@ public class JsonPaintTarget implements PaintTarget {
/**
* Adds XML directly to UIDL.
- *
+ *
* @param xml
* the Xml to be added.
* @throws PaintException
@@ -576,7 +577,7 @@ public class JsonPaintTarget implements PaintTarget {
/**
* Adds XML section with namespace.
- *
+ *
* @param sectionTagName
* the name of the tag.
* @param sectionData
@@ -585,7 +586,7 @@ public class JsonPaintTarget implements PaintTarget {
* the namespace to be added.
* @throws PaintException
* if the paint operation failed.
- *
+ *
* @see com.vaadin.server.PaintTarget#addXMLSection(String, String, String)
*/
@@ -613,7 +614,7 @@ public class JsonPaintTarget implements PaintTarget {
/**
* Gets the UIDL already printed to stream. Paint target must be closed
* before the <code>getUIDL</code> can be called.
- *
+ *
* @return the UIDL.
*/
public String getUIDL() {
@@ -629,7 +630,7 @@ public class JsonPaintTarget implements PaintTarget {
* <code>getUIDL</code> can be called. Subsequent attempts to write to paint
* target. If the target was already closed, call to this function is
* ignored. will generate an exception.
- *
+ *
* @throws PaintException
* if the paint operation failed.
*/
@@ -650,7 +651,7 @@ public class JsonPaintTarget implements PaintTarget {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.terminal.PaintTarget#startPaintable(com.vaadin.terminal
* .Paintable, java.lang.String)
*/
@@ -661,9 +662,7 @@ public class JsonPaintTarget implements PaintTarget {
boolean topLevelPaintable = openPaintables.isEmpty();
if (getLogger().isLoggable(Level.FINE)) {
- getLogger().log(
- Level.FINE,
- "startPaintable for {0}@{1}",
+ getLogger().log(Level.FINE, "startPaintable for {0}@{1}",
new Object[] { connector.getClass().getName(),
Integer.toHexString(connector.hashCode()) });
}
@@ -689,9 +688,7 @@ public class JsonPaintTarget implements PaintTarget {
@Override
public void endPaintable(Component paintable) throws PaintException {
if (getLogger().isLoggable(Level.FINE)) {
- getLogger().log(
- Level.FINE,
- "endPaintable for {0}@{1}",
+ getLogger().log(Level.FINE, "endPaintable for {0}@{1}",
new Object[] { paintable.getClass().getName(),
Integer.toHexString(paintable.hashCode()) });
}
@@ -710,7 +707,7 @@ public class JsonPaintTarget implements PaintTarget {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.terminal.PaintTarget#addCharacterData(java.lang.String )
*/
@@ -724,9 +721,9 @@ public class JsonPaintTarget implements PaintTarget {
/**
* This is basically a container for UI components variables, that will be
* added at the end of JSON object.
- *
+ *
* @author mattitahvonen
- *
+ *
*/
class JsonTag implements Serializable {
boolean firstField = false;
@@ -797,7 +794,7 @@ public class JsonPaintTarget implements PaintTarget {
}
/**
- *
+ *
* @param s
* json string, object or array
*/
@@ -823,7 +820,8 @@ public class JsonPaintTarget implements PaintTarget {
final StringBuilder buf = new StringBuilder();
buf.append(startField());
buf.append("{");
- for (final Iterator<Object> iter = attr.iterator(); iter.hasNext();) {
+ for (final Iterator<Object> iter = attr.iterator(); iter
+ .hasNext();) {
final String element = (String) iter.next();
buf.append(element);
if (iter.hasNext()) {
@@ -1010,8 +1008,8 @@ public class JsonPaintTarget implements PaintTarget {
@Override
public void addVariable(VariableOwner owner, String name,
StreamVariable value) throws PaintException {
- String url = manager.getStreamVariableTargetUrl(
- (ClientConnector) owner, name, value);
+ String url = manager.getStreamVariableTargetUrl((ClientConnector) owner,
+ name, value);
if (url != null) {
addVariable(owner, name, url);
} // else { //NOP this was just a cleanup by component }
@@ -1020,7 +1018,7 @@ public class JsonPaintTarget implements PaintTarget {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.terminal.PaintTarget#isFullRepaint()
*/
diff --git a/server/src/main/java/com/vaadin/server/KeyMapper.java b/server/src/main/java/com/vaadin/server/KeyMapper.java
index b858660b4b..9a2c776045 100644
--- a/server/src/main/java/com/vaadin/server/KeyMapper.java
+++ b/server/src/main/java/com/vaadin/server/KeyMapper.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ import java.util.HashMap;
/**
* <code>KeyMapper</code> is the simple two-way map for generating textual keys
* for objects and retrieving the objects later with the key.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -36,7 +36,7 @@ public class KeyMapper<V> implements Serializable {
/**
* Gets key for an object.
- *
+ *
* @param o
* the object.
*/
@@ -62,7 +62,7 @@ public class KeyMapper<V> implements Serializable {
/**
* Retrieves object with the key.
- *
+ *
* @param key
* the name with the desired value.
* @return the object with the key.
@@ -73,7 +73,7 @@ public class KeyMapper<V> implements Serializable {
/**
* Removes object from the mapper.
- *
+ *
* @param removeobj
* the object to be removed.
*/
@@ -96,9 +96,9 @@ public class KeyMapper<V> implements Serializable {
/**
* Checks if the given key is mapped to an object.
- *
+ *
* @since 7.7
- *
+ *
* @param key
* the key to check
* @return <code>true</code> if the key is currently mapped,
diff --git a/server/src/main/java/com/vaadin/server/LegacyApplication.java b/server/src/main/java/com/vaadin/server/LegacyApplication.java
index d03b3d7f96..c256699f06 100644
--- a/server/src/main/java/com/vaadin/server/LegacyApplication.java
+++ b/server/src/main/java/com/vaadin/server/LegacyApplication.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,10 +31,10 @@ import com.vaadin.ui.UI;
* to Vaadin 7. The legacy application supports setting a main window, adding
* additional browser level windows and defining the theme for the entire
* application.
- *
+ *
* @deprecated As of 7.0. This class is only intended to ease migration and
* should not be used for new projects.
- *
+ *
* @since 7.0
*/
@Deprecated
@@ -56,7 +56,7 @@ public abstract class LegacyApplication implements ErrorHandler {
/**
* Sets the main window of this application. Setting window as a main window
* of this application also adds the window to this application.
- *
+ *
* @param mainWindow
* the UI to set as the default window
*/
@@ -87,7 +87,7 @@ public abstract class LegacyApplication implements ErrorHandler {
/**
* Gets the mainWindow of the application.
- *
+ *
* <p>
* The main window is the window attached to the application URL (
* {@link #getURL()}) and thus which is show by default to the user.
@@ -95,7 +95,7 @@ public abstract class LegacyApplication implements ErrorHandler {
* <p>
* Note that each application must have at least one main window.
* </p>
- *
+ *
* @return the UI used as the default window
*/
public LegacyWindow getMainWindow() {
@@ -110,7 +110,7 @@ public abstract class LegacyApplication implements ErrorHandler {
* <code>null</code> selects the default theme. For the available theme
* names, see the contents of the VAADIN/themes directory.
* </p>
- *
+ *
* @param theme
* the new theme for this application.
*/
@@ -123,7 +123,7 @@ public abstract class LegacyApplication implements ErrorHandler {
* theme used by all the uIs for which a theme is not explicitly defined. If
* the application theme is not explicitly set, <code>null</code> is
* returned.
- *
+ *
* @return the name of the application's theme.
*/
public String getTheme() {
@@ -135,7 +135,7 @@ public abstract class LegacyApplication implements ErrorHandler {
* Gets a UI by name. Returns <code>null</code> if the application is not
* running or it does not contain a window corresponding to the name.
* </p>
- *
+ *
* @param name
* the name of the requested window
* @return a UI corresponding to the name, or <code>null</code> to use the
@@ -154,11 +154,11 @@ public abstract class LegacyApplication implements ErrorHandler {
* Adds a new browser level window to this application. Please note that UI
* doesn't have a name that is used in the URL - to add a named window you
* should instead use {@link #addWindow(UI, String)}
- *
+ *
* @param uI
* the UI window to add to the application
* @return returns the name that has been assigned to the window
- *
+ *
* @see #addWindow(UI, String)
*/
public void addWindow(LegacyWindow uI) {
@@ -177,12 +177,12 @@ public abstract class LegacyApplication implements ErrorHandler {
* Removes the specified window from the application. This also removes all
* name mappings for the window (see {@link #addWindow(UI, String) and
* #getWindowName(UI)}.
- *
+ *
* <p>
* Note that removing window from the application does not close the browser
* window - the window is only removed from the server-side.
* </p>
- *
+ *
* @param uI
* the UI to remove
*/
@@ -196,11 +196,11 @@ public abstract class LegacyApplication implements ErrorHandler {
/**
* Gets the set of windows contained by the application.
- *
+ *
* <p>
* Note that the returned set of windows can not be modified.
* </p>
- *
+ *
* @return the unmodifiable collection of windows.
*/
public Collection<LegacyWindow> getWindows() {
@@ -250,7 +250,7 @@ public abstract class LegacyApplication implements ErrorHandler {
* Desktop application just closes the application window and
* web-application redirects the browser to application main URL.
* </p>
- *
+ *
* @return the URL.
*/
public String getLogoutURL() {
@@ -263,7 +263,7 @@ public abstract class LegacyApplication implements ErrorHandler {
* application running environment: Desktop application just closes the
* application window and web-application redirects the browser to
* application main URL.
- *
+ *
* @param logoutURL
* the logoutURL to set.
*/
diff --git a/server/src/main/java/com/vaadin/server/LegacyApplicationUIProvider.java b/server/src/main/java/com/vaadin/server/LegacyApplicationUIProvider.java
index 0977071806..02a6544d3f 100644
--- a/server/src/main/java/com/vaadin/server/LegacyApplicationUIProvider.java
+++ b/server/src/main/java/com/vaadin/server/LegacyApplicationUIProvider.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,10 +25,10 @@ import com.vaadin.ui.LegacyWindow;
import com.vaadin.ui.UI;
/**
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
- *
+ *
* @deprecated As of 7.0. Used only to support LegacyApplication - will be
* removed when LegacyApplication support is removed.
*/
@@ -100,7 +100,7 @@ public abstract class LegacyApplicationUIProvider extends UIProvider {
/**
* Hack used to return existing LegacyWindow instances without regard for
* out-of-sync problems.
- *
+ *
* @param event
* @return
*/
@@ -129,8 +129,8 @@ public abstract class LegacyApplicationUIProvider extends UIProvider {
URL applicationUrl;
try {
- applicationUrl = VaadinService.getCurrent().getApplicationUrl(
- VaadinService.getCurrentRequest());
+ applicationUrl = VaadinService.getCurrent()
+ .getApplicationUrl(VaadinService.getCurrentRequest());
} catch (MalformedURLException e) {
throw new RuntimeException(e);
}
diff --git a/server/src/main/java/com/vaadin/server/LegacyCommunicationManager.java b/server/src/main/java/com/vaadin/server/LegacyCommunicationManager.java
index 87b484a65f..f8074c5449 100644
--- a/server/src/main/java/com/vaadin/server/LegacyCommunicationManager.java
+++ b/server/src/main/java/com/vaadin/server/LegacyCommunicationManager.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -48,7 +48,7 @@ import elemental.json.JsonValue;
* {@link com.vaadin.client.ApplicationConnection}.
* <p>
* TODO Document better!
- *
+ *
* @deprecated As of 7.0. Will likely change or be removed in a future version
*/
@Deprecated
@@ -71,7 +71,7 @@ public class LegacyCommunicationManager implements Serializable {
/**
* TODO New constructor - document me!
- *
+ *
* @param session
*/
public LegacyCommunicationManager(VaadinSession session) {
@@ -133,7 +133,7 @@ public class LegacyCommunicationManager implements Serializable {
* Resolves a dependency URI, registering the URI with this
* {@code LegacyCommunicationManager} if needed and returns a fully
* qualified URI.
- *
+ *
* @deprecated As of 7.1. See #11413.
*/
@Deprecated
@@ -174,10 +174,9 @@ public class LegacyCommunicationManager implements Serializable {
if (publishedFileContexts.containsKey(name)) {
Class<?> oldContext = publishedFileContexts.get(name);
if (oldContext != context) {
- getLogger()
- .log(Level.WARNING,
- "{0} published by both {1} and {2}. File from {2} will be used.",
- new Object[] { name, context, oldContext });
+ getLogger().log(Level.WARNING,
+ "{0} published by both {1} and {2}. File from {2} will be used.",
+ new Object[] { name, context, oldContext });
}
} else {
publishedFileContexts.put(name, context);
@@ -205,16 +204,17 @@ public class LegacyCommunicationManager implements Serializable {
* {@link #isComponentVisibleToClient(Component)} is used. For other types
* of connectors, the contextual visibility of its first Component ancestor
* is used. If no Component ancestor is found, the connector is not visible.
- *
+ *
* @deprecated As of 7.1. See #11411.
- *
+ *
* @param connector
* The connector to check
* @return <code>true</code> if the connector is visible to the client,
* <code>false</code> otherwise
*/
@Deprecated
- public static boolean isConnectorVisibleToClient(ClientConnector connector) {
+ public static boolean isConnectorVisibleToClient(
+ ClientConnector connector) {
if (connector instanceof Component) {
return isComponentVisibleToClient((Component) connector);
} else {
@@ -230,9 +230,9 @@ public class LegacyCommunicationManager implements Serializable {
/**
* Checks if the component should be visible to the client. Returns false if
* the child should not be sent to the client, true otherwise.
- *
+ *
* @deprecated As of 7.1. See #11411.
- *
+ *
* @param child
* The child to check
* @return true if the child is visible to the client, false otherwise
@@ -299,8 +299,8 @@ public class LegacyCommunicationManager implements Serializable {
* @deprecated As of 7.1. Will be removed in the future.
*/
@Deprecated
- public static class InvalidUIDLSecurityKeyException extends
- GeneralSecurityException {
+ public static class InvalidUIDLSecurityKeyException
+ extends GeneralSecurityException {
public InvalidUIDLSecurityKeyException(String message) {
super(message);
@@ -330,9 +330,9 @@ public class LegacyCommunicationManager implements Serializable {
/**
* Helper class for terminal to keep track of data that client is expected
* to know.
- *
+ *
* TODO make customlayout templates (from theme) to be cached here.
- *
+ *
* @deprecated As of 7.1. See #11410.
*/
@Deprecated
@@ -341,7 +341,7 @@ public class LegacyCommunicationManager implements Serializable {
private final Set<Object> res = new HashSet<Object>();
/**
- *
+ *
* @param paintable
* @return true if the given class was added to cache
*/
@@ -363,17 +363,17 @@ public class LegacyCommunicationManager implements Serializable {
* @deprecated As of 7.1. See #11411.
*/
@Deprecated
- public String getStreamVariableTargetUrl(ClientConnector owner,
- String name, StreamVariable value) {
+ public String getStreamVariableTargetUrl(ClientConnector owner, String name,
+ StreamVariable value) {
/*
* We will use the same APP/* URI space as ApplicationResources but
* prefix url with UPLOAD
- *
+ *
* eg. APP/UPLOAD/[UIID]/[PID]/[NAME]/[SECKEY]
- *
+ *
* SECKEY is created on each paint to make URL's unpredictable (to
* prevent CSRF attacks).
- *
+ *
* NAME and PID from URI forms a key to fetch StreamVariable when
* handling post
*/
@@ -394,9 +394,9 @@ public class LegacyCommunicationManager implements Serializable {
/**
* Handles an exception related to a connector by invoking the appropriate
* error handler.
- *
+ *
* @deprecated As of 7.1. See #11411.
- *
+ *
* @param throwable
* the exception to handle
* @param connector
@@ -413,10 +413,9 @@ public class LegacyCommunicationManager implements Serializable {
/**
* Requests that the given UI should be fully re-rendered on the client
* side.
- *
- * @since 7.1
- * @deprecated. As of 7.1. Should be refactored once locales are fixed
- * (#11378)
+ *
+ * @since 7.1 @deprecated. As of 7.1. Should be refactored once locales are
+ * fixed (#11378)
*/
@Deprecated
public void repaintAll(UI ui) {
diff --git a/server/src/main/java/com/vaadin/server/LegacyPaint.java b/server/src/main/java/com/vaadin/server/LegacyPaint.java
index 91ff103db6..9aad82561b 100644
--- a/server/src/main/java/com/vaadin/server/LegacyPaint.java
+++ b/server/src/main/java/com/vaadin/server/LegacyPaint.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,24 +23,24 @@ import com.vaadin.ui.LegacyComponent;
public class LegacyPaint implements Serializable {
/**
- *
+ *
* <p>
* Paints the Paintable into a UIDL stream. This method creates the UIDL
* sequence describing it and outputs it to the given UIDL stream.
* </p>
- *
+ *
* <p>
* It is called when the contents of the component should be painted in
* response to the component first being shown or having been altered so
* that its visual representation is changed.
* </p>
- *
+ *
* <p>
* <b>Do not override this to paint your component.</b> Override
* {@link #paintContent(PaintTarget)} instead.
* </p>
- *
- *
+ *
+ *
* @param target
* the target UIDL stream where the component should paint itself
* to.
diff --git a/server/src/main/java/com/vaadin/server/LegacyVaadinPortlet.java b/server/src/main/java/com/vaadin/server/LegacyVaadinPortlet.java
index 606809d893..6392e46f3d 100644
--- a/server/src/main/java/com/vaadin/server/LegacyVaadinPortlet.java
+++ b/server/src/main/java/com/vaadin/server/LegacyVaadinPortlet.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/main/java/com/vaadin/server/LegacyVaadinServlet.java b/server/src/main/java/com/vaadin/server/LegacyVaadinServlet.java
index 8ef16b50bc..4a6a7af866 100644
--- a/server/src/main/java/com/vaadin/server/LegacyVaadinServlet.java
+++ b/server/src/main/java/com/vaadin/server/LegacyVaadinServlet.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/main/java/com/vaadin/server/LocaleService.java b/server/src/main/java/com/vaadin/server/LocaleService.java
index ccdc49f690..6435a08cdd 100644
--- a/server/src/main/java/com/vaadin/server/LocaleService.java
+++ b/server/src/main/java/com/vaadin/server/LocaleService.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -15,7 +15,7 @@
*/
/**
- *
+ *
*/
package com.vaadin.server;
@@ -35,7 +35,7 @@ import com.vaadin.ui.UI;
/**
* Server side service which handles locale and the transmission of locale date
* to the client side LocaleService.
- *
+ *
* @since 7.1
* @author Vaadin Ltd
*/
@@ -47,7 +47,7 @@ public class LocaleService implements Serializable {
/**
* Creates a LocaleService bound to the given UI
- *
+ *
* @since 7.1
* @param ui
* The UI which owns the LocaleService
@@ -59,7 +59,7 @@ public class LocaleService implements Serializable {
/**
* Retrieves the UI this service is bound to
- *
+ *
* @since 7.1
* @return the UI for this service
*/
@@ -73,7 +73,7 @@ public class LocaleService implements Serializable {
* {@link Locale} instances and sent to the client when needed, eliminating
* the need to use the {@link Locale} class and all the framework behind it
* on the client.
- *
+ *
* @param locale
* The locale which is required on the client side
*/
@@ -94,7 +94,7 @@ public class LocaleService implements Serializable {
* The state is transmitted inside the UI state rather than as an individual
* entity.
* </p>
- *
+ *
* @since 7.1
* @param markAsDirty
* true to mark the state as dirty
@@ -111,7 +111,7 @@ public class LocaleService implements Serializable {
/**
* Creates a LocaleData instance for transportation to the client
- *
+ *
* @since 7.1
* @param locale
* The locale for which to create a LocaleData object
@@ -159,12 +159,11 @@ public class LocaleService implements Serializable {
* Date formatting (MM/DD/YYYY etc.)
*/
- DateFormat dateFormat = DateFormat.getDateTimeInstance(
- DateFormat.SHORT, DateFormat.SHORT, locale);
+ DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.SHORT,
+ DateFormat.SHORT, locale);
if (!(dateFormat instanceof SimpleDateFormat)) {
- getLogger().warning(
- "Unable to get default date pattern for locale "
- + locale.toString());
+ getLogger().warning("Unable to get default date pattern for locale "
+ + locale.toString());
dateFormat = new SimpleDateFormat();
}
final String df = ((SimpleDateFormat) dateFormat).toPattern();
@@ -201,7 +200,7 @@ public class LocaleService implements Serializable {
final String timeformat = df.substring(timeStart, df.length());
/*
* Doesn't return second or milliseconds.
- *
+ *
* We use timeformat to determine 12/24-hour clock
*/
final boolean twelve_hour_clock = timeformat.indexOf("a") > -1;
diff --git a/server/src/main/java/com/vaadin/server/NoInputStreamException.java b/server/src/main/java/com/vaadin/server/NoInputStreamException.java
index 9f12c52fdf..8e35a66902 100644
--- a/server/src/main/java/com/vaadin/server/NoInputStreamException.java
+++ b/server/src/main/java/com/vaadin/server/NoInputStreamException.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/main/java/com/vaadin/server/NoOutputStreamException.java b/server/src/main/java/com/vaadin/server/NoOutputStreamException.java
index 8dce2194e8..66675b0a30 100644
--- a/server/src/main/java/com/vaadin/server/NoOutputStreamException.java
+++ b/server/src/main/java/com/vaadin/server/NoOutputStreamException.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/main/java/com/vaadin/server/Page.java b/server/src/main/java/com/vaadin/server/Page.java
index 74d79ade50..abb2ce19ef 100644
--- a/server/src/main/java/com/vaadin/server/Page.java
+++ b/server/src/main/java/com/vaadin/server/Page.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -45,13 +45,13 @@ public class Page implements Serializable {
/**
* Listener that gets notified when the size of the browser window
* containing the uI has changed.
- *
+ *
* @see UI#addListener(BrowserWindowResizeListener)
*/
public interface BrowserWindowResizeListener extends Serializable {
/**
* Invoked when the browser window containing a UI has been resized.
- *
+ *
* @param event
* a browser window resize event
*/
@@ -68,7 +68,7 @@ public class Page implements Serializable {
/**
* Creates a new event
- *
+ *
* @param source
* the uI for which the browser window has been resized
* @param width
@@ -89,7 +89,7 @@ public class Page implements Serializable {
/**
* Gets the new browser window height
- *
+ *
* @return an integer with the new pixel height of the browser window
*/
public int getHeight() {
@@ -98,7 +98,7 @@ public class Page implements Serializable {
/**
* Gets the new browser window width
- *
+ *
* @return an integer with the new pixel width of the browser window
*/
public int getWidth() {
@@ -140,7 +140,7 @@ public class Page implements Serializable {
/**
* Creates a new open resource.
- *
+ *
* @param url
* The URL to open
* @param name
@@ -162,7 +162,7 @@ public class Page implements Serializable {
/**
* Creates a new open resource.
- *
+ *
* @param resource
* The resource to open
* @param name
@@ -188,7 +188,7 @@ public class Page implements Serializable {
/**
* Paints the open request. Should be painted inside the window.
- *
+ *
* @param target
* the paint target
* @throws PaintException
@@ -222,9 +222,9 @@ public class Page implements Serializable {
}
}
- private static final Method BROWSER_RESIZE_METHOD = ReflectTools
- .findMethod(BrowserWindowResizeListener.class,
- "browserWindowResized", BrowserWindowResizeEvent.class);
+ private static final Method BROWSER_RESIZE_METHOD = ReflectTools.findMethod(
+ BrowserWindowResizeListener.class, "browserWindowResized",
+ BrowserWindowResizeEvent.class);
/**
* @deprecated As of 7.0, use {@link BorderStyle#NONE} instead.
@@ -247,7 +247,7 @@ public class Page implements Serializable {
/**
* Listener that that gets notified when the URI fragment of the page
* changes.
- *
+ *
* @see Page#addUriFragmentChangedListener(UriFragmentChangedListener)
*/
public interface UriFragmentChangedListener extends Serializable {
@@ -256,9 +256,9 @@ public class Page implements Serializable {
* changes. Please note that the initial URI fragment has already been
* set when a new UI is initialized, so there will not be any initial
* event for listeners added during {@link UI#init(VaadinRequest)}.
- *
+ *
* @see Page#addUriFragmentChangedListener(UriFragmentChangedListener)
- *
+ *
* @param event
* the URI fragment changed event
*/
@@ -283,7 +283,7 @@ public class Page implements Serializable {
/**
* Event fired when the URI fragment of a <code>Page</code> changes.
- *
+ *
* @see Page#addUriFragmentChangedListener(UriFragmentChangedListener)
*/
public static class UriFragmentChangedEvent extends EventObject {
@@ -295,7 +295,7 @@ public class Page implements Serializable {
/**
* Creates a new instance of UriFragmentReader change event.
- *
+ *
* @param source
* the Source of the event.
* @param uriFragment
@@ -308,7 +308,7 @@ public class Page implements Serializable {
/**
* Gets the page in which the fragment has changed.
- *
+ *
* @return the page in which the fragment has changed
*/
public Page getPage() {
@@ -317,7 +317,7 @@ public class Page implements Serializable {
/**
* Get the new URI fragment
- *
+ *
* @return the new fragment
*/
public String getUriFragment() {
@@ -383,7 +383,7 @@ public class Page implements Serializable {
/**
* Contains dynamically injected styles injected in the HTML document at
* runtime.
- *
+ *
* @since 7.1
*/
public static class Styles implements Serializable {
@@ -400,7 +400,7 @@ public class Page implements Serializable {
/**
* Injects a raw CSS string into the page.
- *
+ *
* @param css
* The CSS to inject
*/
@@ -416,7 +416,7 @@ public class Page implements Serializable {
/**
* Injects a CSS resource into the page
- *
+ *
* @param resource
* The resource to inject.
*/
@@ -491,7 +491,8 @@ public class Page implements Serializable {
eventRouter.addListener(eventType, target, method);
}
- private void removeListener(Class<?> eventType, Object target, Method method) {
+ private void removeListener(Class<?> eventType, Object target,
+ Method method) {
if (hasEventRouter()) {
eventRouter.removeListener(eventType, target, method);
}
@@ -502,11 +503,11 @@ public class Page implements Serializable {
* page is changed. Please note that the initial URI fragment has already
* been set when a new UI is initialized, so there will not be any initial
* event for listeners added during {@link UI#init(VaadinRequest)}.
- *
+ *
* @see #getUriFragment()
* @see #setUriFragment(String)
* @see #removeUriFragmentChangedListener(UriFragmentChangedListener)
- *
+ *
* @param listener
* the URI fragment listener to add
*/
@@ -527,10 +528,10 @@ public class Page implements Serializable {
/**
* Removes a URI fragment listener that was previously added to this page.
- *
+ *
* @param listener
* the URI fragment listener to remove
- *
+ *
* @see Page#addUriFragmentChangedListener(UriFragmentChangedListener)
*/
public void removeUriFragmentChangedListener(
@@ -560,17 +561,17 @@ public class Page implements Serializable {
* is already a non-null fragment will leave a trailing # in the URI since
* removing it would cause the browser to reload the page. This is not fully
* consistent with the semantics of {@link java.net.URI}.
- *
+ *
* @param newUriFragment
* The new fragment.
* @param fireEvents
* true to fire event
- *
+ *
* @see #getUriFragment()
* @see #setLocation(URI)
* @see UriFragmentChangedEvent
* @see Page.UriFragmentChangedListener
- *
+ *
*/
public void setUriFragment(String newUriFragment, boolean fireEvents) {
String oldUriFragment = location.getFragment();
@@ -579,9 +580,8 @@ public class Page implements Serializable {
// instead set it to the empty string
newUriFragment = "";
}
- if (newUriFragment == oldUriFragment
- || (newUriFragment != null && newUriFragment
- .equals(oldUriFragment))) {
+ if (newUriFragment == oldUriFragment || (newUriFragment != null
+ && newUriFragment.equals(oldUriFragment))) {
return;
}
try {
@@ -606,7 +606,7 @@ public class Page implements Serializable {
/**
* Sets URI fragment. This method fires a {@link UriFragmentChangedEvent}
- *
+ *
* @param newUriFragment
* id of the new fragment
* @see UriFragmentChangedEvent
@@ -624,9 +624,9 @@ public class Page implements Serializable {
* <p>
* To listen to changes in fragment, hook a
* {@link Page.UriFragmentChangedListener}.
- *
+ *
* @return the current fragment in browser location URI.
- *
+ *
* @see #getLocation()
* @see #setUriFragment(String)
* @see #addUriFragmentChangedListener(UriFragmentChangedListener)
@@ -671,9 +671,9 @@ public class Page implements Serializable {
/**
* Gets the window.name value of the browser window of this page.
- *
+ *
* @since 7.2
- *
+ *
* @return the window name, <code>null</code> if the name is not known
*/
public String getWindowName() {
@@ -700,9 +700,9 @@ public class Page implements Serializable {
/**
* For internal use only. Updates the internal state with the given values.
* Does not resize the Page or browser window.
- *
+ *
* @since 7.2
- *
+ *
* @param width
* the new browser window width
* @param height
@@ -742,10 +742,10 @@ public class Page implements Serializable {
* received while a resize is being performed. Use
* {@link UI#setResizeLazy(boolean)}.
* </p>
- *
+ *
* @param resizeListener
* the listener to add
- *
+ *
* @see BrowserWindowResizeListener#browserWindowResized(BrowserWindowResizeEvent)
* @see UI#setResizeLazy(boolean)
*/
@@ -768,7 +768,7 @@ public class Page implements Serializable {
/**
* Removes a {@link BrowserWindowResizeListener} from this UI. The listener
* will no longer be notified when the browser window is resized.
- *
+ *
* @param resizeListener
* the listener to remove
*/
@@ -792,7 +792,7 @@ public class Page implements Serializable {
/**
* Gets the last known height of the browser window in which this UI
* resides.
- *
+ *
* @return the browser window height in pixels
*/
public int getBrowserWindowHeight() {
@@ -801,7 +801,7 @@ public class Page implements Serializable {
/**
* Gets the last known width of the browser window in which this uI resides.
- *
+ *
* @return the browser window width in pixels
*/
public int getBrowserWindowWidth() {
@@ -820,7 +820,7 @@ public class Page implements Serializable {
/**
* Returns that stylesheet associated with this Page. The stylesheet
* contains additional styles injected at runtime into the HTML document.
- *
+ *
* @since 7.1
*/
public Styles getStyles() {
@@ -858,8 +858,7 @@ public class Page implements Serializable {
n.getDescription());
}
if (n.getIcon() != null) {
- target.addAttribute(
- UIConstants.ATTRIBUTE_NOTIFICATION_ICON,
+ target.addAttribute(UIConstants.ATTRIBUTE_NOTIFICATION_ICON,
n.getIcon());
}
if (!n.isHtmlContentAllowed()) {
@@ -867,9 +866,8 @@ public class Page implements Serializable {
UIConstants.NOTIFICATION_HTML_CONTENT_NOT_ALLOWED,
true);
}
- target.addAttribute(
- UIConstants.ATTRIBUTE_NOTIFICATION_POSITION, n
- .getPosition().ordinal());
+ target.addAttribute(UIConstants.ATTRIBUTE_NOTIFICATION_POSITION,
+ n.getPosition().ordinal());
target.addAttribute(UIConstants.ATTRIBUTE_NOTIFICATION_DELAY,
n.getDelayMsec());
if (n.getStyleName() != null) {
@@ -900,16 +898,16 @@ public class Page implements Serializable {
* This method should not be used to start downloads, as the client side
* will assume the browser will navigate away when opening the URI. Use one
* of the {@code Page.open} methods or {@code FileDownloader} instead.
- *
+ *
* @see #open(String, String)
* @see FileDownloader
- *
+ *
* @param uri
* the URI to show
*/
public void setLocation(String uri) {
- openList.add(new OpenResource(uri, "_self", -1, -1, BORDER_DEFAULT,
- false));
+ openList.add(
+ new OpenResource(uri, "_self", -1, -1, BORDER_DEFAULT, false));
uI.markAsDirty();
}
@@ -920,10 +918,10 @@ public class Page implements Serializable {
* This method should not be used to start downloads, as the client side
* will assume the browser will navigate away when opening the URI. Use one
* of the {@code Page.open} methods or {@code FileDownloader} instead.
- *
+ *
* @see #open(String, String)
* @see FileDownloader
- *
+ *
* @param uri
* the URI to show
*/
@@ -935,12 +933,12 @@ public class Page implements Serializable {
* Returns the location URI of this page, as reported by the browser. Note
* that this may not be consistent with the server URI the application is
* deployed in due to potential proxies, redirections and similar.
- *
+ *
* @return The browser location URI.
*/
public URI getLocation() {
- if (location == null
- && !uI.getSession().getConfiguration().isSendUrlsAsParameters()) {
+ if (location == null && !uI.getSession().getConfiguration()
+ .isSendUrlsAsParameters()) {
throw new IllegalStateException("Location is not available as the "
+ Constants.SERVLET_PARAMETER_SENDURLSASPARAMETERS
+ " parameter is configured as false");
@@ -951,10 +949,10 @@ public class Page implements Serializable {
/**
* For internal use only. Used to update the server-side location when the
* client-side location changes.
- *
+ *
* @deprecated As of 7.2, use {@link #updateLocation(String, boolean)}
* instead.
- *
+ *
* @param location
* the new location URI
*/
@@ -966,9 +964,9 @@ public class Page implements Serializable {
/**
* For internal use only. Used to update the server-side location when the
* client-side location changes.
- *
+ *
* @since 7.2
- *
+ *
* @param location
* the new location URI
* @param fireEvents
@@ -1030,7 +1028,7 @@ public class Page implements Serializable {
* forgiving when the window is opened directly from a client-side click
* event.
* </p>
- *
+ *
* @param url
* the URL to open.
* @param windowName
@@ -1081,7 +1079,7 @@ public class Page implements Serializable {
* forgiving when the window is opened directly from a client-side click
* event.
* </p>
- *
+ *
* @param url
* the URL to open.
* @param windowName
@@ -1108,7 +1106,7 @@ public class Page implements Serializable {
* forgiving when the window is opened directly from a client-side click
* event.
* </p>
- *
+ *
* @param url
* the URL to open.
* @param windowName
@@ -1122,8 +1120,8 @@ public class Page implements Serializable {
*/
public void open(String url, String windowName, int width, int height,
BorderStyle border) {
- openList.add(new OpenResource(url, windowName, width, height, border,
- true));
+ openList.add(
+ new OpenResource(url, windowName, width, height, border, true));
uI.markAsDirty();
}
@@ -1157,7 +1155,7 @@ public class Page implements Serializable {
/**
* Internal helper method to actually add a notification.
- *
+ *
* @param notification
* the notification to add
*/
@@ -1171,12 +1169,12 @@ public class Page implements Serializable {
/**
* Shows a notification message.
- *
+ *
* @see Notification
- *
+ *
* @param notification
* The notification message to show
- *
+ *
* @deprecated As of 7.0, use Notification.show(Page) instead.
*/
@Deprecated
@@ -1188,9 +1186,9 @@ public class Page implements Serializable {
* Gets the Page to which the current uI belongs. This is automatically
* defined when processing requests to the server. In other cases, (e.g.
* from background threads), the current uI is not automatically defined.
- *
+ *
* @see UI#getCurrent()
- *
+ *
* @return the current page instance if available, otherwise
* <code>null</code>
*/
@@ -1208,7 +1206,7 @@ public class Page implements Serializable {
* <p>
* If the title is set to null, it will not left as-is. Set to empty string
* to clear the title.
- *
+ *
* @param title
* the page title to set
*/
@@ -1234,7 +1232,7 @@ public class Page implements Serializable {
* outside of Page should not access it directly but only through public
* APIs provided by Page.
* </p>
- *
+ *
* @since 7.1
* @param markAsDirty
* true to mark the state as dirty
diff --git a/server/src/main/java/com/vaadin/server/PaintException.java b/server/src/main/java/com/vaadin/server/PaintException.java
index a7025598b2..5fb0e06779 100644
--- a/server/src/main/java/com/vaadin/server/PaintException.java
+++ b/server/src/main/java/com/vaadin/server/PaintException.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ import java.io.Serializable;
/**
* <code>PaintExcepection</code> is thrown if painting of a component fails.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -31,7 +31,7 @@ public class PaintException extends IOException implements Serializable {
/**
* Constructs an instance of <code>PaintExeception</code> with the specified
* detail message.
- *
+ *
* @param msg
* the detail message.
*/
@@ -42,7 +42,7 @@ public class PaintException extends IOException implements Serializable {
/**
* Constructs an instance of <code>PaintExeception</code> with the specified
* detail message and cause.
- *
+ *
* @param msg
* the detail message.
* @param cause
@@ -54,7 +54,7 @@ public class PaintException extends IOException implements Serializable {
/**
* Constructs an instance of <code>PaintExeception</code> from IOException.
- *
+ *
* @param exception
* the original exception.
*/
diff --git a/server/src/main/java/com/vaadin/server/PaintTarget.java b/server/src/main/java/com/vaadin/server/PaintTarget.java
index 902cb13816..b0acefda65 100644
--- a/server/src/main/java/com/vaadin/server/PaintTarget.java
+++ b/server/src/main/java/com/vaadin/server/PaintTarget.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.ui.Component;
/**
* This interface defines the methods for painting XML to the UIDL stream.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -32,10 +32,10 @@ public interface PaintTarget extends Serializable {
/**
* Prints single XMLsection.
- *
+ *
* Prints full XML section. The section data is escaped from XML tags and
* surrounded by XML start and end-tags.
- *
+ *
* @param sectionTagName
* the name of the tag.
* @param sectionData
@@ -49,7 +49,7 @@ public interface PaintTarget extends Serializable {
/**
* Result of starting to paint a Component (
* {@link PaintTarget#startPaintable(Component, String)}).
- *
+ *
* @since 7.0
*/
public enum PaintStatus {
@@ -85,7 +85,7 @@ public interface PaintTarget extends Serializable {
* {@link #endPaintable(Component)} regardless of the {@link PaintStatus}
* returned.
* </p>
- *
+ *
* @param paintable
* the paintable to start.
* @param tag
@@ -103,11 +103,11 @@ public interface PaintTarget extends Serializable {
/**
* Prints paintable element end tag.
- *
+ *
* Calls to {@link #startPaintable(Component, String)}should be matched by
* {@link #endPaintable(Component)}. If the parent tag is closed before
* every child tag is closed a PaintException is raised.
- *
+ *
* @param paintable
* the paintable to close.
* @throws PaintException
@@ -118,12 +118,12 @@ public interface PaintTarget extends Serializable {
/**
* Prints element start tag.
- *
+ *
* <pre>
* Todo:
* Checking of input values
* </pre>
- *
+ *
* @param tagName
* the name of the start tag.
* @throws PaintException
@@ -133,10 +133,10 @@ public interface PaintTarget extends Serializable {
/**
* Prints element end tag.
- *
+ *
* If the parent tag is closed before every child tag is closed an
* PaintException is raised.
- *
+ *
* @param tagName
* the name of the end tag.
* @throws PaintException
@@ -147,12 +147,12 @@ public interface PaintTarget extends Serializable {
/**
* Adds a boolean attribute to component. Atributes must be added before any
* content is written.
- *
+ *
* @param name
* the Attribute name.
* @param value
* the Attribute value.
- *
+ *
* @throws PaintException
* if the paint operation failed.
*/
@@ -161,12 +161,12 @@ public interface PaintTarget extends Serializable {
/**
* Adds a integer attribute to component. Atributes must be added before any
* content is written.
- *
+ *
* @param name
* the Attribute name.
* @param value
* the Attribute value.
- *
+ *
* @throws PaintException
* if the paint operation failed.
*/
@@ -175,12 +175,12 @@ public interface PaintTarget extends Serializable {
/**
* Adds a resource attribute to component. Atributes must be added before
* any content is written.
- *
+ *
* @param name
* the Attribute name
* @param value
* the Attribute value
- *
+ *
* @throws PaintException
* if the paint operation failed.
*/
@@ -206,7 +206,7 @@ public interface PaintTarget extends Serializable {
* Most commonly a component developer can just ignore this issue, but with
* strict memory requirements and lots of StreamVariables implementations
* that reserve a lot of memory this may be a critical issue.
- *
+ *
* @param owner
* the ReceiverOwner that can track the progress of streaming to
* the given StreamVariable
@@ -214,7 +214,7 @@ public interface PaintTarget extends Serializable {
* an identifying name for the StreamVariable
* @param value
* the StreamVariable to paint
- *
+ *
* @throws PaintException
* if the paint operation failed.
*/
@@ -224,12 +224,12 @@ public interface PaintTarget extends Serializable {
/**
* Adds a long attribute to component. Atributes must be added before any
* content is written.
- *
+ *
* @param name
* the Attribute name.
* @param value
* the Attribute value.
- *
+ *
* @throws PaintException
* if the paint operation failed.
*/
@@ -238,12 +238,12 @@ public interface PaintTarget extends Serializable {
/**
* Adds a float attribute to component. Atributes must be added before any
* content is written.
- *
+ *
* @param name
* the Attribute name.
* @param value
* the Attribute value.
- *
+ *
* @throws PaintException
* if the paint operation failed.
*/
@@ -252,12 +252,12 @@ public interface PaintTarget extends Serializable {
/**
* Adds a double attribute to component. Atributes must be added before any
* content is written.
- *
+ *
* @param name
* the Attribute name.
* @param value
* the Attribute value.
- *
+ *
* @throws PaintException
* if the paint operation failed.
*/
@@ -266,12 +266,12 @@ public interface PaintTarget extends Serializable {
/**
* Adds a string attribute to component. Atributes must be added before any
* content is written.
- *
+ *
* @param name
* the Boolean attribute name.
* @param value
* the Boolean attribute value.
- *
+ *
* @throws PaintException
* if the paint operation failed.
*/
@@ -279,7 +279,7 @@ public interface PaintTarget extends Serializable {
/**
* TODO
- *
+ *
* @param name
* @param value
* @throws PaintException
@@ -291,7 +291,7 @@ public interface PaintTarget extends Serializable {
* Adds a Component type attribute. On client side the value will be a
* terminal specific reference to corresponding component on client side
* implementation.
- *
+ *
* @param name
* the name of the attribute
* @param value
@@ -303,14 +303,14 @@ public interface PaintTarget extends Serializable {
/**
* Adds a string type variable.
- *
+ *
* @param owner
* the Listener for variable changes.
* @param name
* the Variable name.
* @param value
* the Variable initial value.
- *
+ *
* @throws PaintException
* if the paint operation failed.
*/
@@ -319,14 +319,14 @@ public interface PaintTarget extends Serializable {
/**
* Adds a int type variable.
- *
+ *
* @param owner
* the Listener for variable changes.
* @param name
* the Variable name.
* @param value
* the Variable initial value.
- *
+ *
* @throws PaintException
* if the paint operation failed.
*/
@@ -335,14 +335,14 @@ public interface PaintTarget extends Serializable {
/**
* Adds a long type variable.
- *
+ *
* @param owner
* the Listener for variable changes.
* @param name
* the Variable name.
* @param value
* the Variable initial value.
- *
+ *
* @throws PaintException
* if the paint operation failed.
*/
@@ -351,14 +351,14 @@ public interface PaintTarget extends Serializable {
/**
* Adds a float type variable.
- *
+ *
* @param owner
* the Listener for variable changes.
* @param name
* the Variable name.
* @param value
* the Variable initial value.
- *
+ *
* @throws PaintException
* if the paint operation failed.
*/
@@ -367,14 +367,14 @@ public interface PaintTarget extends Serializable {
/**
* Adds a double type variable.
- *
+ *
* @param owner
* the Listener for variable changes.
* @param name
* the Variable name.
* @param value
* the Variable initial value.
- *
+ *
* @throws PaintException
* if the paint operation failed.
*/
@@ -383,14 +383,14 @@ public interface PaintTarget extends Serializable {
/**
* Adds a boolean type variable.
- *
+ *
* @param owner
* the Listener for variable changes.
* @param name
* the Variable name.
* @param value
* the Variable initial value.
- *
+ *
* @throws PaintException
* if the paint operation failed.
*/
@@ -399,14 +399,14 @@ public interface PaintTarget extends Serializable {
/**
* Adds a string array type variable.
- *
+ *
* @param owner
* the Listener for variable changes.
* @param name
* the Variable name.
* @param value
* the Variable initial value.
- *
+ *
* @throws PaintException
* if the paint operation failed.
*/
@@ -419,14 +419,14 @@ public interface PaintTarget extends Serializable {
* implementation. When updated from client side, terminal will map the
* client side component reference back to a corresponding server side
* reference.
- *
+ *
* @param owner
* the Listener for variable changes
* @param name
* the name of the variable
* @param value
* the initial value of the variable
- *
+ *
* @throws PaintException
* if the paint oparation fails
*/
@@ -435,12 +435,12 @@ public interface PaintTarget extends Serializable {
/**
* Adds a upload stream type variable.
- *
+ *
* @param owner
* the Listener for variable changes.
* @param name
* the Variable name.
- *
+ *
* @throws PaintException
* if the paint operation failed.
*/
@@ -453,7 +453,7 @@ public interface PaintTarget extends Serializable {
* Prints full XML section. The section data must be XML and it is
* surrounded by XML start and end-tags.
* </p>
- *
+ *
* @param sectionTagName
* the tag name.
* @param sectionData
@@ -469,7 +469,7 @@ public interface PaintTarget extends Serializable {
/**
* Adds UIDL directly. The UIDL must be valid in accordance with the
* UIDL.dtd
- *
+ *
* @param uidl
* the UIDL to be added.
* @throws PaintException
@@ -479,7 +479,7 @@ public interface PaintTarget extends Serializable {
/**
* Adds text node. All the contents of the text are XML-escaped.
- *
+ *
* @param text
* the Text to add
* @throws PaintException
@@ -489,7 +489,7 @@ public interface PaintTarget extends Serializable {
/**
* Adds CDATA node to target UIDL-tree.
- *
+ *
* @param text
* the Character data to add
* @throws PaintException
diff --git a/server/src/main/java/com/vaadin/server/RequestHandler.java b/server/src/main/java/com/vaadin/server/RequestHandler.java
index b667ed038c..64f9cf6aa1 100644
--- a/server/src/main/java/com/vaadin/server/RequestHandler.java
+++ b/server/src/main/java/com/vaadin/server/RequestHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -40,7 +40,7 @@ public interface RequestHandler extends Serializable {
* {@link VaadinSession#accessSynchronously(Runnable)} or
* {@link UI#accessSynchronously(Runnable)}.
* </p>
- *
+ *
* @param session
* The session for the request
* @param request
diff --git a/server/src/main/java/com/vaadin/server/Resource.java b/server/src/main/java/com/vaadin/server/Resource.java
index 20e0bb7f9a..6e54fab8ed 100644
--- a/server/src/main/java/com/vaadin/server/Resource.java
+++ b/server/src/main/java/com/vaadin/server/Resource.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ import java.io.Serializable;
/**
* <code>Resource</code> provided to the client terminal. Support for actually
* displaying the resource type is left to the terminal.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -29,7 +29,7 @@ public interface Resource extends Serializable {
/**
* Gets the MIME type of the resource.
- *
+ *
* @return the MIME type of the resource.
*/
public String getMIMEType();
diff --git a/server/src/main/java/com/vaadin/server/ResourceReference.java b/server/src/main/java/com/vaadin/server/ResourceReference.java
index aeb06394b7..014301adf0 100644
--- a/server/src/main/java/com/vaadin/server/ResourceReference.java
+++ b/server/src/main/java/com/vaadin/server/ResourceReference.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -87,8 +87,8 @@ public class ResourceReference extends URLReference {
String uri = ApplicationConstants.APP_PROTOCOL_PREFIX
+ ApplicationConstants.APP_PATH + '/'
+ ConnectorResource.CONNECTOR_PATH + '/'
- + connector.getUI().getUIId() + '/'
- + connector.getConnectorId() + '/' + encodeFileName(filename);
+ + connector.getUI().getUIId() + '/' + connector.getConnectorId()
+ + '/' + encodeFileName(filename);
return uri;
}
diff --git a/server/src/main/java/com/vaadin/server/Responsive.java b/server/src/main/java/com/vaadin/server/Responsive.java
index 9209f14ff9..f44b8e4926 100644
--- a/server/src/main/java/com/vaadin/server/Responsive.java
+++ b/server/src/main/java/com/vaadin/server/Responsive.java
@@ -4,9 +4,9 @@
* Licensed under the Apache 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
@@ -40,22 +40,22 @@ import com.vaadin.ui.Component;
* <code>Page.getCurrent().getStyles().add(...)</code>) or any other style
* updates after the initial page load are not supported at the moment.</i>
* </p>
- *
- *
+ *
+ *
* <p>
* Example:
- *
+ *
* <b>Java</b>
- *
+ *
* <pre>
* CssLayout layout = new CssLayout();
* layout.setStyleName(&quot;responsive&quot;);
* layout.setSizeFull();
* Responsive.makeResponsive(layout);
* </pre>
- *
+ *
* <b>SCSS</b>
- *
+ *
* <pre>
* .v-csslayout.responsive {
* &[width-range~="0-300px"] {
@@ -78,9 +78,9 @@ import com.vaadin.ui.Component;
* }
* }
* </pre>
- *
+ *
* <b>CSS</b>
- *
+ *
* <pre>
* .v-csslayout.responsive[width-range~="0-300px"] {
* // Styles for the layout when its width is between 0 and 300 pixels
@@ -91,7 +91,7 @@ import com.vaadin.ui.Component;
* .v-csslayout.responsive[width-range~="501-"] {
* // Styles for the layout when its width is over 500 pixels
* }
- *
+ *
* .v-csslayout.responsive[height-range~="0-300px"] {
* // Styles for the layout when its height is between 0 and 300 pixels
* }
@@ -102,7 +102,7 @@ import com.vaadin.ui.Component;
* // Styles for the layout when its height is over 500 pixels
* }
* </pre>
- *
+ *
* </p>
* <p>
* <b>Note:</b> <i>The defined ranges are applied on a global context, so even
@@ -114,24 +114,24 @@ import com.vaadin.ui.Component;
* though the CSS implies it would only affect CssLayout instances inside a
* parent with a style name "foobar":
* </p>
- *
+ *
* <pre>
* .foobar .v-csslayout[width-range~="0px-100px"] {
* // These properties will affect all responsive CssLayout instances
* }
* </pre>
- *
+ *
* <p>
* To scope the ranges, use an additional style name for the target component,
* and add that to your CSS selector:
* </p>
- *
+ *
* <pre>
* .v-csslayout.mystyle[width-range="0px-100px"] {
* // These properties will only affect responsive CssLayout instances with an additional style name of 'mystyle'
* }
* </pre>
- *
+ *
* @author Vaadin Ltd
* @since 7.2
*/
@@ -146,7 +146,7 @@ public class Responsive extends AbstractExtension {
/**
* Enable responsive width and height range styling for the target component
* or UI instance.
- *
+ *
* @param target
* The component which should be able to respond to width and/or
* height changes.
diff --git a/server/src/main/java/com/vaadin/server/RestrictedRenderResponse.java b/server/src/main/java/com/vaadin/server/RestrictedRenderResponse.java
index 5bee476cff..e4092f8383 100644
--- a/server/src/main/java/com/vaadin/server/RestrictedRenderResponse.java
+++ b/server/src/main/java/com/vaadin/server/RestrictedRenderResponse.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -34,7 +34,7 @@ import org.w3c.dom.Element;
/**
* Read-only wrapper for a {@link RenderResponse}.
- *
+ *
* Only for use by {@link PortletApplicationContext} and
* {@link VaadinPortletSession}.
*/
@@ -149,7 +149,8 @@ class RestrictedRenderResponse implements RenderResponse, Serializable {
}
@Override
- public void setNextPossiblePortletModes(Collection<PortletMode> portletModes) {
+ public void setNextPossiblePortletModes(
+ Collection<PortletMode> portletModes) {
// NOP
// TODO throw?
}
diff --git a/server/src/main/java/com/vaadin/server/Scrollable.java b/server/src/main/java/com/vaadin/server/Scrollable.java
index ae6828e339..36be9cac01 100644
--- a/server/src/main/java/com/vaadin/server/Scrollable.java
+++ b/server/src/main/java/com/vaadin/server/Scrollable.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import java.io.Serializable;
* This interface is implemented by all visual objects that can be scrolled
* programmatically from the server-side. The unit of scrolling is pixel.
* </p>
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -31,24 +31,24 @@ public interface Scrollable extends Serializable {
/**
* Gets scroll left offset.
- *
+ *
* <p>
* Scrolling offset is the number of pixels this scrollable has been
* scrolled right.
* </p>
- *
+ *
* @return Horizontal scrolling position in pixels.
*/
public int getScrollLeft();
/**
* Sets scroll left offset.
- *
+ *
* <p>
* Scrolling offset is the number of pixels this scrollable has been
* scrolled right.
* </p>
- *
+ *
* @param scrollLeft
* the xOffset.
*/
@@ -56,24 +56,24 @@ public interface Scrollable extends Serializable {
/**
* Gets scroll top offset.
- *
+ *
* <p>
* Scrolling offset is the number of pixels this scrollable has been
* scrolled down.
* </p>
- *
+ *
* @return Vertical scrolling position in pixels.
*/
public int getScrollTop();
/**
* Sets scroll top offset.
- *
+ *
* <p>
* Scrolling offset is the number of pixels this scrollable has been
* scrolled down.
* </p>
- *
+ *
* <p>
* The scrolling position is limited by the current height of the content
* area. If the position is below the height, it is scrolled to the bottom.
@@ -81,7 +81,7 @@ public interface Scrollable extends Serializable {
* scrolling to bottom only scrolls to the bottom of the previous content
* area.
* </p>
- *
+ *
* @param scrollTop
* the yOffset.
*/
diff --git a/server/src/main/java/com/vaadin/server/ServerRpcManager.java b/server/src/main/java/com/vaadin/server/ServerRpcManager.java
index ae99622a4a..ce09dd2ec2 100644
--- a/server/src/main/java/com/vaadin/server/ServerRpcManager.java
+++ b/server/src/main/java/com/vaadin/server/ServerRpcManager.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,11 +29,11 @@ import com.vaadin.shared.communication.ServerRpc;
/**
* Server side RPC manager that handles RPC calls coming from the client.
- *
+ *
* Each {@link RpcTarget} (typically a {@link ClientConnector}) should have its
* own instance of {@link ServerRpcManager} if it wants to receive RPC calls
* from the client.
- *
+ *
* @since 7.0
*/
public class ServerRpcManager<T extends ServerRpc> implements Serializable {
@@ -44,10 +44,10 @@ public class ServerRpcManager<T extends ServerRpc> implements Serializable {
/**
* Wrapper exception for exceptions which occur during invocation of an RPC
* call
- *
+ *
* @author Vaadin Ltd
* @since 7.0
- *
+ *
*/
public static class RpcInvocationException extends Exception {
@@ -87,7 +87,7 @@ public class ServerRpcManager<T extends ServerRpc> implements Serializable {
/**
* Create a RPC manager for an RPC target.
- *
+ *
* @param target
* RPC call target (normally a {@link Connector})
* @param implementation
@@ -103,7 +103,7 @@ public class ServerRpcManager<T extends ServerRpc> implements Serializable {
/**
* Invoke a method in a server side RPC target class. This method is to be
* used by the RPC framework and unit testing tools only.
- *
+ *
* @param target
* non-null target of the RPC call
* @param invocation
@@ -111,23 +111,23 @@ public class ServerRpcManager<T extends ServerRpc> implements Serializable {
* @throws RpcInvocationException
*/
public static void applyInvocation(ClientConnector target,
- ServerRpcMethodInvocation invocation) throws RpcInvocationException {
- ServerRpcManager<?> manager = target.getRpcManager(invocation
- .getInterfaceName());
+ ServerRpcMethodInvocation invocation)
+ throws RpcInvocationException {
+ ServerRpcManager<?> manager = target
+ .getRpcManager(invocation.getInterfaceName());
if (manager != null) {
manager.applyInvocation(invocation);
} else {
- getLogger()
- .log(Level.WARNING,
- "RPC call received for RpcTarget {0} ({1}) but the target has not registered any RPC interfaces",
- new Object[] { target.getClass().getName(),
- invocation.getConnectorId() });
+ getLogger().log(Level.WARNING,
+ "RPC call received for RpcTarget {0} ({1}) but the target has not registered any RPC interfaces",
+ new Object[] { target.getClass().getName(),
+ invocation.getConnectorId() });
}
}
/**
* Returns the RPC interface implementation for the RPC target.
- *
+ *
* @return RPC interface implementation
*/
protected T getImplementation() {
@@ -136,7 +136,7 @@ public class ServerRpcManager<T extends ServerRpc> implements Serializable {
/**
* Returns the RPC interface type managed by this RPC manager instance.
- *
+ *
* @return RPC interface type
*/
public Class<T> getRpcInterface() {
@@ -146,7 +146,7 @@ public class ServerRpcManager<T extends ServerRpc> implements Serializable {
/**
* Invoke a method in a server side RPC target class. This method is to be
* used by the RPC framework and unit testing tools only.
- *
+ *
* @param invocation
* method invocation to perform
*/
@@ -157,9 +157,10 @@ public class ServerRpcManager<T extends ServerRpc> implements Serializable {
try {
method.invoke(implementation, arguments);
} catch (Exception e) {
- throw new RpcInvocationException("Unable to invoke method "
- + invocation.getMethodName() + " in "
- + invocation.getInterfaceName(), e);
+ throw new RpcInvocationException(
+ "Unable to invoke method " + invocation.getMethodName()
+ + " in " + invocation.getInterfaceName(),
+ e);
}
}
diff --git a/server/src/main/java/com/vaadin/server/ServerRpcMethodInvocation.java b/server/src/main/java/com/vaadin/server/ServerRpcMethodInvocation.java
index d3f8531406..7dc669e1cf 100644
--- a/server/src/main/java/com/vaadin/server/ServerRpcMethodInvocation.java
+++ b/server/src/main/java/com/vaadin/server/ServerRpcMethodInvocation.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -55,7 +55,7 @@ public class ServerRpcMethodInvocation extends MethodInvocation {
* Tries to find the method from the cache or alternatively by invoking
* {@link #doFindInvocationMethod(Class, String, int)} and updating the
* cache.
- *
+ *
* @param targetType
* @param methodName
* @param parameterCount
@@ -90,7 +90,7 @@ public class ServerRpcMethodInvocation extends MethodInvocation {
/**
* Tries to find the method from the class by looping through available
* methods.
- *
+ *
* @param targetType
* @param methodName
* @param parameterCount
diff --git a/server/src/main/java/com/vaadin/server/ServiceDestroyEvent.java b/server/src/main/java/com/vaadin/server/ServiceDestroyEvent.java
index 2ed0bbf8f1..6f3d790b82 100644
--- a/server/src/main/java/com/vaadin/server/ServiceDestroyEvent.java
+++ b/server/src/main/java/com/vaadin/server/ServiceDestroyEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ import java.util.EventObject;
/**
* Event fired to {@link ServiceDestroyListener} when a {@link VaadinService} is
* being destroyed.
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
@@ -29,7 +29,7 @@ public class ServiceDestroyEvent extends EventObject {
/**
* Creates a new event for the given service.
- *
+ *
* @param service
* the service being destroyed
*/
@@ -39,7 +39,7 @@ public class ServiceDestroyEvent extends EventObject {
/*
* (non-Javadoc)
- *
+ *
* @see java.util.EventObject#getSource()
*/
@Override
diff --git a/server/src/main/java/com/vaadin/server/ServiceDestroyListener.java b/server/src/main/java/com/vaadin/server/ServiceDestroyListener.java
index 1549d82d51..54b9a607d5 100644
--- a/server/src/main/java/com/vaadin/server/ServiceDestroyListener.java
+++ b/server/src/main/java/com/vaadin/server/ServiceDestroyListener.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,17 +21,17 @@ import java.io.Serializable;
/**
* Listener that gets notified when the {@link VaadinService} to which it has
* been registered is destroyed.
- *
+ *
* @see VaadinService#addServiceDestroyListener(ServiceDestroyListener)
* @see VaadinService#removeServiceDestroyListener(ServiceDestroyListener)
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
public interface ServiceDestroyListener extends Serializable {
/**
* Invoked when a service is destroyed
- *
+ *
* @param event
* the event
*/
diff --git a/server/src/main/java/com/vaadin/server/ServiceException.java b/server/src/main/java/com/vaadin/server/ServiceException.java
index 2bc36bc1d7..dffa4ac024 100644
--- a/server/src/main/java/com/vaadin/server/ServiceException.java
+++ b/server/src/main/java/com/vaadin/server/ServiceException.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/main/java/com/vaadin/server/ServletPortletHelper.java b/server/src/main/java/com/vaadin/server/ServletPortletHelper.java
index 33ecf16e17..7431ec6360 100644
--- a/server/src/main/java/com/vaadin/server/ServletPortletHelper.java
+++ b/server/src/main/java/com/vaadin/server/ServletPortletHelper.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ import com.vaadin.ui.UI;
/**
* Contains helper methods shared by {@link VaadinServlet} and
* {@link VaadinPortlet}.
- *
+ *
* @deprecated As of 7.1. Will be removed or refactored in the future.
*/
@Deprecated
@@ -50,37 +50,39 @@ public class ServletPortletHelper implements Serializable {
}
try {
- return classLoader.loadClass(applicationParameter).asSubclass(
- LegacyApplication.class);
+ return classLoader.loadClass(applicationParameter)
+ .asSubclass(LegacyApplication.class);
} catch (final ClassNotFoundException e) {
- throw new ServiceException("Failed to load application class: "
- + applicationParameter, e);
+ throw new ServiceException(
+ "Failed to load application class: " + applicationParameter,
+ e);
}
}
private static void verifyUIClass(String className, ClassLoader classLoader)
throws ServiceException {
if (className == null) {
- throw new ServiceException(VaadinSession.UI_PARAMETER
- + " init parameter not defined");
+ throw new ServiceException(
+ VaadinSession.UI_PARAMETER + " init parameter not defined");
}
// Check that the UI layout class can be found
try {
Class<?> uiClass = classLoader.loadClass(className);
if (!UI.class.isAssignableFrom(uiClass)) {
- throw new ServiceException(className + " does not implement UI");
+ throw new ServiceException(
+ className + " does not implement UI");
}
// Try finding a default constructor, else throw exception
uiClass.getConstructor();
} catch (ClassNotFoundException e) {
throw new ServiceException(className + " could not be loaded", e);
} catch (SecurityException e) {
- throw new ServiceException("Could not access " + className
- + " class", e);
+ throw new ServiceException(
+ "Could not access " + className + " class", e);
} catch (NoSuchMethodException e) {
- throw new ServiceException(className
- + " doesn't have a public no-args constructor");
+ throw new ServiceException(
+ className + " doesn't have a public no-args constructor");
}
}
@@ -125,8 +127,8 @@ public class ServletPortletHelper implements Serializable {
}
public static boolean isPublishedFileRequest(VaadinRequest request) {
- return hasPathPrefix(request, ApplicationConstants.PUBLISHED_FILE_PATH
- + "/");
+ return hasPathPrefix(request,
+ ApplicationConstants.PUBLISHED_FILE_PATH + "/");
}
public static boolean isUIDLRequest(VaadinRequest request) {
@@ -138,7 +140,8 @@ public class ServletPortletHelper implements Serializable {
}
public static boolean isHeartbeatRequest(VaadinRequest request) {
- return hasPathPrefix(request, ApplicationConstants.HEARTBEAT_PATH + '/');
+ return hasPathPrefix(request,
+ ApplicationConstants.HEARTBEAT_PATH + '/');
}
public static boolean isPushRequest(VaadinRequest request) {
@@ -175,17 +178,19 @@ public class ServletPortletHelper implements Serializable {
.asSubclass(UIProvider.class);
return subclass.newInstance();
} catch (ClassNotFoundException e) {
- throw new ServiceException("Could not load UIProvider class "
- + uiProviderProperty, e);
+ throw new ServiceException(
+ "Could not load UIProvider class " + uiProviderProperty, e);
} catch (ClassCastException e) {
throw new ServiceException("UIProvider class " + uiProviderProperty
+ " does not extend UIProvider", e);
} catch (InstantiationException e) {
- throw new ServiceException("Could not instantiate UIProvider "
- + uiProviderProperty, e);
+ throw new ServiceException(
+ "Could not instantiate UIProvider " + uiProviderProperty,
+ e);
} catch (IllegalAccessException e) {
- throw new ServiceException("Could not instantiate UIProvider "
- + uiProviderProperty, e);
+ throw new ServiceException(
+ "Could not instantiate UIProvider " + uiProviderProperty,
+ e);
}
}
@@ -194,7 +199,8 @@ public class ServletPortletHelper implements Serializable {
if (session.getUIProviders().isEmpty()) {
throw new ServiceException(
"No UIProvider has been added and there is no \""
- + VaadinSession.UI_PARAMETER + "\" init parameter.");
+ + VaadinSession.UI_PARAMETER
+ + "\" init parameter.");
}
}
diff --git a/server/src/main/java/com/vaadin/server/SessionDestroyEvent.java b/server/src/main/java/com/vaadin/server/SessionDestroyEvent.java
index a64fce0b64..ced5729177 100644
--- a/server/src/main/java/com/vaadin/server/SessionDestroyEvent.java
+++ b/server/src/main/java/com/vaadin/server/SessionDestroyEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,9 +20,9 @@ import java.util.EventObject;
/**
* Event fired when a Vaadin service session is no longer in use.
- *
+ *
* @see SessionDestroyListener#sessionDestroy(SessionDestroyEvent)
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
@@ -32,7 +32,7 @@ public class SessionDestroyEvent extends EventObject {
/**
* Creates a new event.
- *
+ *
* @param service
* the Vaadin service from which the even originates
* @param session
@@ -50,7 +50,7 @@ public class SessionDestroyEvent extends EventObject {
/**
* Gets the Vaadin service from which the even originates.
- *
+ *
* @return the Vaadin service
*/
public VaadinService getService() {
@@ -59,7 +59,7 @@ public class SessionDestroyEvent extends EventObject {
/**
* Gets the Vaadin service session that is no longer used.
- *
+ *
* @return the Vaadin service session
*/
public VaadinSession getSession() {
diff --git a/server/src/main/java/com/vaadin/server/SessionDestroyListener.java b/server/src/main/java/com/vaadin/server/SessionDestroyListener.java
index 29daa60a40..7c6ce1b354 100644
--- a/server/src/main/java/com/vaadin/server/SessionDestroyListener.java
+++ b/server/src/main/java/com/vaadin/server/SessionDestroyListener.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,16 +21,16 @@ import java.io.Serializable;
/**
* A listener that gets notified when a Vaadin service session is no longer
* used.
- *
+ *
* @see VaadinService#addSessionDestroyListener(SessionDestroyListener)
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
public interface SessionDestroyListener extends Serializable {
/**
* Called when a Vaadin service session is no longer used.
- *
+ *
* @param event
* the event with details about the destroyed session
*/
diff --git a/server/src/main/java/com/vaadin/server/SessionExpiredException.java b/server/src/main/java/com/vaadin/server/SessionExpiredException.java
index d70498e7cb..d0e8fb04dc 100644
--- a/server/src/main/java/com/vaadin/server/SessionExpiredException.java
+++ b/server/src/main/java/com/vaadin/server/SessionExpiredException.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/main/java/com/vaadin/server/SessionExpiredHandler.java b/server/src/main/java/com/vaadin/server/SessionExpiredHandler.java
index 3d6de95dea..5bb6d58764 100644
--- a/server/src/main/java/com/vaadin/server/SessionExpiredHandler.java
+++ b/server/src/main/java/com/vaadin/server/SessionExpiredHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import java.io.IOException;
/**
* A specialized RequestHandler which is capable of sending session expiration
* messages to the user.
- *
+ *
* @since 7.1
* @author Vaadin Ltd
*/
@@ -31,7 +31,7 @@ public interface SessionExpiredHandler extends RequestHandler {
* to be sent to the user. If a response is written, this method should
* return <code>true</code> to indicate that no more
* {@link SessionExpiredHandler} handlers should be invoked for the request.
- *
+ *
* @param request
* The request to handle
* @param response
diff --git a/server/src/main/java/com/vaadin/server/SessionInitEvent.java b/server/src/main/java/com/vaadin/server/SessionInitEvent.java
index 76262c6140..1ab9fe6083 100644
--- a/server/src/main/java/com/vaadin/server/SessionInitEvent.java
+++ b/server/src/main/java/com/vaadin/server/SessionInitEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,9 +26,9 @@ import java.util.EventObject;
* event is not necessarily fired immediately when the session is created but
* only when the first request for that session is handled by a specific
* service.
- *
+ *
* @see SessionInitListener#sessionInit(SessionInitEvent)
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
@@ -39,7 +39,7 @@ public class SessionInitEvent extends EventObject {
/**
* Creates a new event.
- *
+ *
* @param service
* the Vaadin service from which the event originates
* @param session
@@ -61,7 +61,7 @@ public class SessionInitEvent extends EventObject {
/**
* Gets the Vaadin service from which this event originates
- *
+ *
* @return the Vaadin service instance
*/
public VaadinService getService() {
@@ -70,7 +70,7 @@ public class SessionInitEvent extends EventObject {
/**
* Gets the Vaadin service session that has been initialized.
- *
+ *
* @return the Vaadin service session
*/
public VaadinSession getSession() {
@@ -79,7 +79,7 @@ public class SessionInitEvent extends EventObject {
/**
* Gets the request that triggered the initialization.
- *
+ *
* @return the request
*/
public VaadinRequest getRequest() {
diff --git a/server/src/main/java/com/vaadin/server/SessionInitListener.java b/server/src/main/java/com/vaadin/server/SessionInitListener.java
index 2bbb8e3d1f..3434df3ce2 100644
--- a/server/src/main/java/com/vaadin/server/SessionInitListener.java
+++ b/server/src/main/java/com/vaadin/server/SessionInitListener.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,9 +26,9 @@ import java.io.Serializable;
* listener is not necessarily notified immediately when the session is created
* but only when the first request for that session is handled by a specific
* service.
- *
+ *
* @see VaadinService#addSessionInitListener(SessionInitListener)
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
@@ -41,7 +41,7 @@ public interface SessionInitListener extends Serializable {
* the listener is not necessarily notified immediately when the session is
* created but only when the first request for that session is handled by a
* specific service.
- *
+ *
* @param event
* the initialization event
* @throws ServiceException
diff --git a/server/src/main/java/com/vaadin/server/SizeWithUnit.java b/server/src/main/java/com/vaadin/server/SizeWithUnit.java
index 4c3c51eaec..ddd584b607 100644
--- a/server/src/main/java/com/vaadin/server/SizeWithUnit.java
+++ b/server/src/main/java/com/vaadin/server/SizeWithUnit.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.shared.util.SharedUtil;
/**
* A class for representing a value-unit pair. Also contains utility methods for
* parsing such pairs from a string.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -37,7 +37,7 @@ public class SizeWithUnit implements Serializable {
/**
* Constructs a new SizeWithUnit object representing the pair (size, unit).
- *
+ *
* @param size
* a numeric value
* @param unit
@@ -50,7 +50,7 @@ public class SizeWithUnit implements Serializable {
/**
* Returns the numeric value stored in this object.
- *
+ *
* @return the value of this (value, unit) pair
*/
public float getSize() {
@@ -59,7 +59,7 @@ public class SizeWithUnit implements Serializable {
/**
* Returns the unit stored in this object.
- *
+ *
* @return the unit of this (value, unit) pair
*/
public Unit getUnit() {
@@ -72,7 +72,7 @@ public class SizeWithUnit implements Serializable {
* is used as the unit. If defaultUnit is null and s is a nonempty string
* representing a unitless number, an exception is thrown. Null or empty
* string will produce {-1,Unit#PIXELS}.
- *
+ *
* @param s
* the string to be parsed
* @param defaultUnit
@@ -116,7 +116,7 @@ public class SizeWithUnit implements Serializable {
* Returns an object whose numeric value and unit are taken from the string
* s. Null or empty string will produce {-1,Unit#PIXELS}. An exception is
* thrown if s specifies a number without a unit.
- *
+ *
* @param s
* the string to be parsed
* @return an object containing the parsed value and unit
diff --git a/server/src/main/java/com/vaadin/server/Sizeable.java b/server/src/main/java/com/vaadin/server/Sizeable.java
index ede5e6ab3b..dfdbc6d9d4 100644
--- a/server/src/main/java/com/vaadin/server/Sizeable.java
+++ b/server/src/main/java/com/vaadin/server/Sizeable.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ import java.io.Serializable;
/**
* Interface to be implemented by components wishing to display some object that
* may be dynamically resized during runtime.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -163,7 +163,7 @@ public interface Sizeable extends Serializable {
/**
* Gets the width of the object. Negative number implies unspecified size
* (terminal is free to set the size).
- *
+ *
* @return width of the object in units specified by widthUnits property.
*/
public float getWidth();
@@ -171,38 +171,38 @@ public interface Sizeable extends Serializable {
/**
* Gets the height of the object. Negative number implies unspecified size
* (terminal is free to set the size).
- *
+ *
* @return height of the object in units specified by heightUnits property.
*/
public float getHeight();
/**
* Gets the width property units.
- *
+ *
* @return units used in width property.
*/
public Unit getWidthUnits();
/**
* Gets the height property units.
- *
+ *
* @return units used in height property.
*/
public Unit getHeightUnits();
/**
* Sets the height of the component using String presentation.
- *
+ *
* String presentation is similar to what is used in Cascading Style Sheets.
* Size can be length or percentage of available size.
- *
+ *
* The empty string ("") or null will unset the height and set the units to
* pixels.
- *
- * See <a
- * href="http://www.w3.org/TR/REC-CSS2/syndata.html#value-def-length">CSS
+ *
+ * See
+ * <a href="http://www.w3.org/TR/REC-CSS2/syndata.html#value-def-length">CSS
* specification</a> for more details.
- *
+ *
* @param height
* in CSS style string representation
*/
@@ -211,7 +211,7 @@ public interface Sizeable extends Serializable {
/**
* Sets the width of the object. Negative number implies unspecified size
* (terminal is free to set the size).
- *
+ *
* @param width
* the width of the object.
* @param unit
@@ -222,7 +222,7 @@ public interface Sizeable extends Serializable {
/**
* Sets the height of the object. Negative number implies unspecified size
* (terminal is free to set the size).
- *
+ *
* @param height
* the height of the object.
* @param unit
@@ -232,17 +232,17 @@ public interface Sizeable extends Serializable {
/**
* Sets the width of the component using String presentation.
- *
+ *
* String presentation is similar to what is used in Cascading Style Sheets.
* Size can be length or percentage of available size.
- *
+ *
* The empty string ("") or null will unset the width and set the units to
* pixels.
- *
- * See <a
- * href="http://www.w3.org/TR/REC-CSS2/syndata.html#value-def-length">CSS
+ *
+ * See
+ * <a href="http://www.w3.org/TR/REC-CSS2/syndata.html#value-def-length">CSS
* specification</a> for more details.
- *
+ *
* @param width
* in CSS style string representation, null or empty string to
* reset
@@ -261,14 +261,14 @@ public interface Sizeable extends Serializable {
/**
* Clears any defined width
- *
+ *
* @since 7.3
*/
public void setWidthUndefined();
/**
* Clears any defined height
- *
+ *
* @since 7.3
*/
public void setHeightUndefined();
diff --git a/server/src/main/java/com/vaadin/server/StreamResource.java b/server/src/main/java/com/vaadin/server/StreamResource.java
index 070cfb5138..25d5436529 100644
--- a/server/src/main/java/com/vaadin/server/StreamResource.java
+++ b/server/src/main/java/com/vaadin/server/StreamResource.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ import com.vaadin.util.FileTypeResolver;
/**
* <code>StreamResource</code> is a resource provided to the client directly by
* the application.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -60,7 +60,7 @@ public class StreamResource implements ConnectorResource {
/**
* Creates a new stream resource for downloading from stream.
- *
+ *
* @param streamSource
* the source Stream.
* @param filename
@@ -84,7 +84,7 @@ public class StreamResource implements ConnectorResource {
/**
* Sets the mime type of the resource.
- *
+ *
* @param MIMEType
* the MIME type to be set.
*/
@@ -95,7 +95,7 @@ public class StreamResource implements ConnectorResource {
/**
* Returns the source for this <code>StreamResource</code>. StreamSource is
* queried when the resource is about to be streamed to the client.
- *
+ *
* @return Source of the StreamResource.
*/
public StreamSource getStreamSource() {
@@ -106,7 +106,7 @@ public class StreamResource implements ConnectorResource {
* Sets the source for this <code>StreamResource</code>.
* <code>StreamSource</code> is queried when the resource is about to be
* streamed to the client.
- *
+ *
* @param streamSource
* the source to set.
*/
@@ -116,7 +116,7 @@ public class StreamResource implements ConnectorResource {
/**
* Gets the filename.
- *
+ *
* @return the filename.
*/
@Override
@@ -126,7 +126,7 @@ public class StreamResource implements ConnectorResource {
/**
* Sets the filename.
- *
+ *
* @param filename
* the filename to set.
*/
@@ -149,7 +149,7 @@ public class StreamResource implements ConnectorResource {
/**
* Interface implemented by the source of a StreamResource.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -163,12 +163,12 @@ public class StreamResource implements ConnectorResource {
/**
* Gets the size of the download buffer used for this resource.
- *
+ *
* <p>
* If the buffer size is 0, the buffer size is decided by the terminal
* adapter. The default value is 0.
* </p>
- *
+ *
* @return the size of the buffer in bytes.
*/
public int getBufferSize() {
@@ -177,7 +177,7 @@ public class StreamResource implements ConnectorResource {
/**
* Sets the size of the download buffer used for this resource.
- *
+ *
* @param bufferSize
* the size of the buffer in bytes.
*/
@@ -190,7 +190,7 @@ public class StreamResource implements ConnectorResource {
* possibility cache streams sent to the client. The caching may be made in
* adapter or at the client if the client supports caching. Default is
* <code>DownloadStream.DEFAULT_CACHETIME</code>.
- *
+ *
* @return Cache time in milliseconds.
*/
public long getCacheTime() {
@@ -199,17 +199,17 @@ public class StreamResource implements ConnectorResource {
/**
* Sets the length of cache expiration time.
- *
+ *
* <p>
* This gives the adapter the possibility cache streams sent to the client.
* The caching may be made in adapter or at the client if the client
* supports caching. Zero or negavive value disbales the caching of this
* stream.
* </p>
- *
+ *
* @param cacheTime
* the cache time in milliseconds.
- *
+ *
*/
public void setCacheTime(long cacheTime) {
this.cacheTime = cacheTime;
diff --git a/server/src/main/java/com/vaadin/server/StreamVariable.java b/server/src/main/java/com/vaadin/server/StreamVariable.java
index c7b84c92d6..08a405b741 100644
--- a/server/src/main/java/com/vaadin/server/StreamVariable.java
+++ b/server/src/main/java/com/vaadin/server/StreamVariable.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -33,7 +33,7 @@ import com.vaadin.server.StreamVariable.StreamingStartEvent;
* service or file system). If UI is changed as a side effect of writing to the
* output stream, developer must handle synchronization manually.
* <p>
- *
+ *
* @author Vaadin Ltd.
* @since 6.5
* @see PaintTarget#addVariable(VariableOwner, String, StreamVariable)
@@ -45,7 +45,7 @@ public interface StreamVariable extends Serializable {
* {@link #streamingStarted(StreamingStartEvent)} method has been called.
* The terminal implementation will write the streamed variable to the
* returned output stream.
- *
+ *
* @return Stream to which the uploaded file should be written.
*/
public OutputStream getOutputStream();
@@ -59,7 +59,7 @@ public interface StreamVariable extends Serializable {
* calling that method only if requested. The value is requested after the
* {@link #uploadStarted(StreamingStartEvent)} event, but not after reading
* each buffer.
- *
+ *
* @return true if this {@link StreamVariable} wants to by notified during
* the upload of the progress of streaming.
* @see #onProgress(StreamingProgressEvent)
@@ -91,7 +91,7 @@ public interface StreamVariable extends Serializable {
* instance by the terminal like other methods. The implementation should
* only return a boolean field and especially not modify UI or implement a
* synchronization by itself.
- *
+ *
* @return true if the streaming should be interrupted as soon as possible.
*/
public boolean isInterrupted();
diff --git a/server/src/main/java/com/vaadin/server/SynchronizedRequestHandler.java b/server/src/main/java/com/vaadin/server/SynchronizedRequestHandler.java
index 56abfbb8f3..cb93eb9535 100644
--- a/server/src/main/java/com/vaadin/server/SynchronizedRequestHandler.java
+++ b/server/src/main/java/com/vaadin/server/SynchronizedRequestHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ import java.io.IOException;
* automatically. The session is locked before
* {@link #synchronizedHandleRequest(VaadinSession, VaadinRequest, VaadinResponse)}
* is called and unlocked after it has completed.
- *
+ *
* @author Vaadin Ltd
* @version @VERSION@
* @since 7.1
@@ -49,7 +49,7 @@ public abstract class SynchronizedRequestHandler implements RequestHandler {
* {@link #handleRequest(VaadinSession, VaadinRequest, VaadinResponse)}
* except the {@link VaadinSession} is locked before this is called and
* unlocked after this has completed.
- *
+ *
* @see #handleRequest(VaadinSession, VaadinRequest, VaadinResponse)
* @param session
* The session for the request
@@ -59,7 +59,7 @@ public abstract class SynchronizedRequestHandler implements RequestHandler {
* The response object to which a response can be written.
* @return true if a response has been written and no further request
* handlers should be called, otherwise false
- *
+ *
* @throws IOException
* If an IO error occurred
*/
@@ -74,7 +74,7 @@ public abstract class SynchronizedRequestHandler implements RequestHandler {
* calling
* {@link #synchronizedHandleRequest(VaadinSession, VaadinRequest, VaadinResponse)}
* with the session locked.
- *
+ *
* @since 7.2
* @param request
* the request to handle
diff --git a/server/src/main/java/com/vaadin/server/SystemError.java b/server/src/main/java/com/vaadin/server/SystemError.java
index 834055e1e1..b792320f15 100644
--- a/server/src/main/java/com/vaadin/server/SystemError.java
+++ b/server/src/main/java/com/vaadin/server/SystemError.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,11 +20,11 @@ package com.vaadin.server;
* <code>SystemError</code> is an error message for a problem caused by error in
* system, not the user application code. The system error can contain technical
* information such as stack trace and exception.
- *
+ *
* SystemError does not support HTML in error messages or stack traces. If HTML
* messages are required, use {@link UserError} or a custom implementation of
* {@link ErrorMessage}.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -33,7 +33,7 @@ public class SystemError extends AbstractErrorMessage {
/**
* Constructor for SystemError with error message specified.
- *
+ *
* @param message
* the Textual error description.
*/
@@ -46,7 +46,7 @@ public class SystemError extends AbstractErrorMessage {
/**
* Constructor for SystemError with causing exception and error message.
- *
+ *
* @param message
* the Textual error description.
* @param cause
@@ -59,7 +59,7 @@ public class SystemError extends AbstractErrorMessage {
/**
* Constructor for SystemError with cause.
- *
+ *
* @param cause
* the throwable causing the system error.
*/
@@ -69,7 +69,7 @@ public class SystemError extends AbstractErrorMessage {
/**
* Returns the message of the error in HTML.
- *
+ *
* Note that this API may change in future versions.
*/
protected String getHtmlMessage() {
diff --git a/server/src/main/java/com/vaadin/server/SystemMessageException.java b/server/src/main/java/com/vaadin/server/SystemMessageException.java
index 854d8001f6..f7d90d69e3 100644
--- a/server/src/main/java/com/vaadin/server/SystemMessageException.java
+++ b/server/src/main/java/com/vaadin/server/SystemMessageException.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ public class SystemMessageException extends RuntimeException {
/**
* Constructs a new <code>SystemMessageException</code> with the specified
* detail message.
- *
+ *
* @param msg
* the detail message.
*/
@@ -37,7 +37,7 @@ public class SystemMessageException extends RuntimeException {
/**
* Constructs a new <code>SystemMessageException</code> with the specified
* detail message and cause.
- *
+ *
* @param msg
* the detail message.
* @param cause
@@ -50,7 +50,7 @@ public class SystemMessageException extends RuntimeException {
/**
* Constructs a new <code>SystemMessageException</code> from another
* exception.
- *
+ *
* @param cause
* the cause of the exception.
*/
diff --git a/server/src/main/java/com/vaadin/server/SystemMessages.java b/server/src/main/java/com/vaadin/server/SystemMessages.java
index 3bcf0a90fa..ee9254a583 100644
--- a/server/src/main/java/com/vaadin/server/SystemMessages.java
+++ b/server/src/main/java/com/vaadin/server/SystemMessages.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,13 +31,13 @@ import java.io.Serializable;
* <li><b>sessionExpiredURL</b> = null</li>
* <li><b>sessionExpiredNotificationEnabled</b> = true</li>
* <li><b>sessionExpiredCaption</b> = ""</li>
- * <li><b>sessionExpiredMessage</b> =
- * "Take note of any unsaved data, and <u>click here</u> to continue."</li>
+ * <li><b>sessionExpiredMessage</b> = "Take note of any unsaved data, and
+ * <u>click here</u> to continue."</li>
* <li><b>communicationErrorURL</b> = null</li>
* <li><b>communicationErrorNotificationEnabled</b> = true</li>
* <li><b>communicationErrorCaption</b> = "Communication problem"</li>
- * <li><b>communicationErrorMessage</b> =
- * "Take note of any unsaved data, and <u>click here</u> to continue."</li>
+ * <li><b>communicationErrorMessage</b> = "Take note of any unsaved data, and
+ * <u>click here</u> to continue."</li>
* <li><b>internalErrorURL</b> = null</li>
* <li><b>internalErrorNotificationEnabled</b> = true</li>
* <li><b>internalErrorCaption</b> = "Internal error"</li>
@@ -48,10 +48,11 @@ import java.io.Serializable;
* <li><b>cookiesDisabledCaption</b> = "Cookies disabled"</li>
* <li><b>cookiesDisabledMessage</b> = "This application requires cookies to
* function.<br/>
- * Please enable cookies in your browser and <u>click here</u> to try again.</li>
+ * Please enable cookies in your browser and <u>click here</u> to try
+ * again.</li>
* </ul>
* </p>
- *
+ *
*/
public class SystemMessages implements Serializable {
protected String sessionExpiredURL = null;
@@ -110,8 +111,8 @@ public class SystemMessages implements Serializable {
}
/**
- * @return
- * "Take note of any unsaved data, and <u>click here</u> to continue."
+ * @return "Take note of any unsaved data, and <u>click here</u> to
+ * continue."
*/
public String getSessionExpiredMessage() {
return (sessionExpiredNotificationEnabled ? sessionExpiredMessage
@@ -136,17 +137,17 @@ public class SystemMessages implements Serializable {
* @return "Communication problem"
*/
public String getCommunicationErrorCaption() {
- return (communicationErrorNotificationEnabled ? communicationErrorCaption
- : null);
+ return (communicationErrorNotificationEnabled
+ ? communicationErrorCaption : null);
}
/**
- * @return
- * "Take note of any unsaved data, and <u>click here</u> to continue."
+ * @return "Take note of any unsaved data, and <u>click here</u> to
+ * continue."
*/
public String getCommunicationErrorMessage() {
- return (communicationErrorNotificationEnabled ? communicationErrorMessage
- : null);
+ return (communicationErrorNotificationEnabled
+ ? communicationErrorMessage : null);
}
/**
@@ -168,17 +169,17 @@ public class SystemMessages implements Serializable {
* @return "Authentication problem"
*/
public String getAuthenticationErrorCaption() {
- return (authenticationErrorNotificationEnabled ? authenticationErrorCaption
- : null);
+ return (authenticationErrorNotificationEnabled
+ ? authenticationErrorCaption : null);
}
/**
- * @return
- * "Take note of any unsaved data, and <u>click here</u> to continue."
+ * @return "Take note of any unsaved data, and <u>click here</u> to
+ * continue."
*/
public String getAuthenticationErrorMessage() {
- return (authenticationErrorNotificationEnabled ? authenticationErrorMessage
- : null);
+ return (authenticationErrorNotificationEnabled
+ ? authenticationErrorMessage : null);
}
/**
@@ -215,7 +216,7 @@ public class SystemMessages implements Serializable {
/**
* Returns the URL the user should be redirected to after dismissing the
* "you have to enable your cookies" message. Typically null.
- *
+ *
* @return A URL the user should be redirected to after dismissing the
* message or null to reload the current URL.
*/
@@ -227,7 +228,7 @@ public class SystemMessages implements Serializable {
* Determines if "cookies disabled" messages should be shown to the end user
* or not. If the notification is disabled the user will be immediately
* redirected to the URL returned by {@link #getCookiesDisabledURL()}.
- *
+ *
* @return true to show "cookies disabled" messages to the end user, false
* to redirect to the given URL directly
*/
@@ -238,7 +239,7 @@ public class SystemMessages implements Serializable {
/**
* Returns the caption of the message shown to the user when cookies are
* disabled in the browser.
- *
+ *
* @return The caption of the "cookies disabled" message
*/
public String getCookiesDisabledCaption() {
@@ -249,7 +250,7 @@ public class SystemMessages implements Serializable {
/**
* Returns the message shown to the user when cookies are disabled in the
* browser.
- *
+ *
* @return The "cookies disabled" message
*/
public String getCookiesDisabledMessage() {
diff --git a/server/src/main/java/com/vaadin/server/SystemMessagesInfo.java b/server/src/main/java/com/vaadin/server/SystemMessagesInfo.java
index 195cf3c711..5b410b5486 100644
--- a/server/src/main/java/com/vaadin/server/SystemMessagesInfo.java
+++ b/server/src/main/java/com/vaadin/server/SystemMessagesInfo.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ public class SystemMessagesInfo implements Serializable {
/**
* The locale of the UI related to the {@link SystemMessages} request.
- *
+ *
* @return The Locale or null if the locale is not known
*/
public Locale getLocale() {
@@ -39,7 +39,7 @@ public class SystemMessagesInfo implements Serializable {
/**
* Gets the request currently in progress.
- *
+ *
* @return The request currently in progress or null if no request is in
* progress.
*/
@@ -53,7 +53,7 @@ public class SystemMessagesInfo implements Serializable {
/**
* Returns the service this SystemMessages request comes from.
- *
+ *
* @return The service which triggered this request or null of not triggered
* from a service.
*/
diff --git a/server/src/main/java/com/vaadin/server/SystemMessagesProvider.java b/server/src/main/java/com/vaadin/server/SystemMessagesProvider.java
index a69cc0b159..fda3090350 100644
--- a/server/src/main/java/com/vaadin/server/SystemMessagesProvider.java
+++ b/server/src/main/java/com/vaadin/server/SystemMessagesProvider.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.ui.UI;
/**
* Gives out system messages based on Locale. Registered using
* {@link VaadinService#setSystemMessagesProvider(SystemMessagesProvider)}.
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
@@ -34,7 +34,7 @@ public interface SystemMessagesProvider extends Serializable {
* most cases some or both of {@link VaadinSession#getCurrent()} and
* {@link UI#getCurrent()} can also be used to find more information to help
* the decision.
- *
+ *
* @param systemMessagesInfo
* Locale, current request and other information available.
* @return a system messages object
diff --git a/server/src/main/java/com/vaadin/server/ThemeResource.java b/server/src/main/java/com/vaadin/server/ThemeResource.java
index 45a2736bf3..889e5365d6 100644
--- a/server/src/main/java/com/vaadin/server/ThemeResource.java
+++ b/server/src/main/java/com/vaadin/server/ThemeResource.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.util.FileTypeResolver;
* managed by a theme. The actual resource contents are dynamically resolved to
* comply with the used theme by the terminal adapter. This is commonly used to
* provide static images, flash, java-applets, etc for the terminals.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -37,7 +37,7 @@ public class ThemeResource implements Resource {
/**
* Creates a resource.
- *
+ *
* @param resourceId
* the Id of the resource.
*/
@@ -58,7 +58,7 @@ public class ThemeResource implements Resource {
/**
* Tests if the given object equals this Resource.
- *
+ *
* @param obj
* the object to be tested for equality.
* @return <code>true</code> if the given object equals this Icon,
@@ -89,7 +89,7 @@ public class ThemeResource implements Resource {
/**
* Gets the resource id.
- *
+ *
* @return the resource id.
*/
public String getResourceId() {
diff --git a/server/src/main/java/com/vaadin/server/UIClassSelectionEvent.java b/server/src/main/java/com/vaadin/server/UIClassSelectionEvent.java
index 9c9bbe5bc9..013e4037f4 100644
--- a/server/src/main/java/com/vaadin/server/UIClassSelectionEvent.java
+++ b/server/src/main/java/com/vaadin/server/UIClassSelectionEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ package com.vaadin.server;
* Contains information used by
* {@link UIProvider#getUIClass(UIClassSelectionEvent)} to choose a UI class to
* use in a specific situation.
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
@@ -28,7 +28,7 @@ public class UIClassSelectionEvent extends UIProviderEvent {
/**
* Creates a new event for a specific request.
- *
+ *
* @param request
* the Vaadin request for which a UI class is wanted.
*/
diff --git a/server/src/main/java/com/vaadin/server/UICreateEvent.java b/server/src/main/java/com/vaadin/server/UICreateEvent.java
index 1688416ba5..f7819c5d9f 100644
--- a/server/src/main/java/com/vaadin/server/UICreateEvent.java
+++ b/server/src/main/java/com/vaadin/server/UICreateEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ import com.vaadin.ui.UI;
/**
* Contains data used by various methods in {@link UIProvider} for determining
* information about a new UI that is about to be created.
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
@@ -33,7 +33,7 @@ public class UICreateEvent extends UIProviderEvent {
/**
* Creates a new UI create event for a given VaadinRequest and UI class but
* without a UI id.
- *
+ *
* @param request
* the request for which the UI will be created
* @param uiClass
@@ -46,7 +46,7 @@ public class UICreateEvent extends UIProviderEvent {
/**
* Creates a new UI create event for a given VaadinRequest, UI class and UI
* id
- *
+ *
* @param request
* the request for which the UI will be created
* @param uiClass
@@ -64,7 +64,7 @@ public class UICreateEvent extends UIProviderEvent {
/**
* Gets the UI class that will be created.
- *
+ *
* @return the UI class
*/
public Class<? extends UI> getUIClass() {
@@ -77,7 +77,7 @@ public class UICreateEvent extends UIProviderEvent {
* <p>
* The UI id is generally only available in
* {@link UIProvider#createInstance(UICreateEvent)}
- *
+ *
* @return the UI id; or <code>null</code> if the UI id is not yet known.
*/
public Integer getUiId() {
diff --git a/server/src/main/java/com/vaadin/server/UIProvider.java b/server/src/main/java/com/vaadin/server/UIProvider.java
index 6cff6f9be2..d16507234d 100644
--- a/server/src/main/java/com/vaadin/server/UIProvider.java
+++ b/server/src/main/java/com/vaadin/server/UIProvider.java
@@ -195,8 +195,8 @@ public abstract class UIProvider implements Serializable {
// Fourth case: we have an AppWidgetset.gwt.xml file
else {
- InputStream resource = event.getUIClass().getResourceAsStream(
- "/" + APP_WIDGETSET_NAME + ".gwt.xml");
+ InputStream resource = event.getUIClass()
+ .getResourceAsStream("/" + APP_WIDGETSET_NAME + ".gwt.xml");
if (resource != null) {
return new WidgetsetInfoImpl(false, null, APP_WIDGETSET_NAME);
}
@@ -231,15 +231,14 @@ public abstract class UIProvider implements Serializable {
try {
return cls.newInstance();
} catch (InstantiationException e) {
- getLogger().log(
- Level.INFO,
+ getLogger().log(Level.INFO,
"Unexpected trying to instantiate class "
- + cls.getName(), e);
+ + cls.getName(),
+ e);
} catch (IllegalAccessException e) {
- getLogger()
- .log(Level.INFO,
- "Unexpected trying to access class "
- + cls.getName(), e);
+ getLogger().log(Level.INFO,
+ "Unexpected trying to access class " + cls.getName(),
+ e);
}
}
return null;
diff --git a/server/src/main/java/com/vaadin/server/UIProviderEvent.java b/server/src/main/java/com/vaadin/server/UIProviderEvent.java
index 1fcc0a3ddc..5eee93808e 100644
--- a/server/src/main/java/com/vaadin/server/UIProviderEvent.java
+++ b/server/src/main/java/com/vaadin/server/UIProviderEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,9 +21,9 @@ import java.util.EventObject;
/**
* Base class for the events that are sent to various methods in UIProvider.
- *
+ *
* @see UIProvider
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
@@ -33,7 +33,7 @@ public class UIProviderEvent extends EventObject implements Serializable {
/**
* Creates a new UI provider event.
- *
+ *
* @param request
* the request for which the event is UI provider is invoked
*/
@@ -44,7 +44,7 @@ public class UIProviderEvent extends EventObject implements Serializable {
/**
* Gets the Vaadin service from which the event originates.
- *
+ *
* @return the Vaadin service
*/
public VaadinService getService() {
@@ -53,7 +53,7 @@ public class UIProviderEvent extends EventObject implements Serializable {
/**
* Gets the request associated with this event.
- *
+ *
* @return the Vaadin request
*/
public VaadinRequest getRequest() {
diff --git a/server/src/main/java/com/vaadin/server/UnsupportedBrowserHandler.java b/server/src/main/java/com/vaadin/server/UnsupportedBrowserHandler.java
index e5ea55b116..42a7d29efd 100644
--- a/server/src/main/java/com/vaadin/server/UnsupportedBrowserHandler.java
+++ b/server/src/main/java/com/vaadin/server/UnsupportedBrowserHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ import java.io.Writer;
/**
* A {@link RequestHandler} that presents an informative page if the browser in
* use is unsupported. Recognizes Chrome Frame and allow it to be used.
- *
+ *
* <p>
* This handler is usually added to the application by
* {@link LegacyCommunicationManager}.
@@ -54,7 +54,7 @@ public class UnsupportedBrowserHandler extends SynchronizedRequestHandler {
/**
* Writes a page encouraging the user to upgrade to a more current browser.
- *
+ *
* @param request
* @param response
* @throws IOException
@@ -64,29 +64,30 @@ public class UnsupportedBrowserHandler extends SynchronizedRequestHandler {
Writer page = response.getWriter();
WebBrowser b = VaadinSession.getCurrent().getBrowser();
- page.write("<html><body><h1>I'm sorry, but your browser is not supported</h1>"
- + "<p>The version ("
- + b.getBrowserMajorVersion()
- + "."
- + b.getBrowserMinorVersion()
- + ") of the browser you are using "
- + " is outdated and not supported.</p>"
- + "<p>You should <b>consider upgrading</b> to a more up-to-date browser.</p> "
- + "<p>The most popular browsers are <b>"
- + " <a href=\"https://www.google.com/chrome\">Chrome</a>,"
- + " <a href=\"http://www.mozilla.com/firefox\">Firefox</a>,"
- + (b.isWindows() ? " <a href=\"http://windows.microsoft.com/en-US/internet-explorer/downloads/ie\">Internet Explorer</a>,"
- : "")
- + " <a href=\"http://www.opera.com/browser\">Opera</a>"
- + " and <a href=\"http://www.apple.com/safari\">Safari</a>.</b><br/>"
- + "Upgrading to the latest version of one of these <b>will make the web safer, faster and better looking.</b></p>"
- + (b.isIE() ? "<script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/chrome-frame/1/CFInstall.min.js\"></script>"
- + "<p>If you can not upgrade your browser, please consider trying <a onclick=\"CFInstall.check({mode:'overlay'});return false;\" href=\"http://www.google.com/chromeframe\">Chrome Frame</a>.</p>"
- : "") //
- + "<p><sub><a onclick=\"document.cookie='"
- + FORCE_LOAD_COOKIE
- + "';window.location.reload();return false;\" href=\"#\">Continue without updating</a> (not recommended)</sub></p>"
- + "</body>\n" + "</html>");
+ page.write(
+ "<html><body><h1>I'm sorry, but your browser is not supported</h1>"
+ + "<p>The version (" + b.getBrowserMajorVersion() + "."
+ + b.getBrowserMinorVersion()
+ + ") of the browser you are using "
+ + " is outdated and not supported.</p>"
+ + "<p>You should <b>consider upgrading</b> to a more up-to-date browser.</p> "
+ + "<p>The most popular browsers are <b>"
+ + " <a href=\"https://www.google.com/chrome\">Chrome</a>,"
+ + " <a href=\"http://www.mozilla.com/firefox\">Firefox</a>,"
+ + (b.isWindows()
+ ? " <a href=\"http://windows.microsoft.com/en-US/internet-explorer/downloads/ie\">Internet Explorer</a>,"
+ : "")
+ + " <a href=\"http://www.opera.com/browser\">Opera</a>"
+ + " and <a href=\"http://www.apple.com/safari\">Safari</a>.</b><br/>"
+ + "Upgrading to the latest version of one of these <b>will make the web safer, faster and better looking.</b></p>"
+ + (b.isIE()
+ ? "<script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/chrome-frame/1/CFInstall.min.js\"></script>"
+ + "<p>If you can not upgrade your browser, please consider trying <a onclick=\"CFInstall.check({mode:'overlay'});return false;\" href=\"http://www.google.com/chromeframe\">Chrome Frame</a>.</p>"
+ : "") //
+ + "<p><sub><a onclick=\"document.cookie='"
+ + FORCE_LOAD_COOKIE
+ + "';window.location.reload();return false;\" href=\"#\">Continue without updating</a> (not recommended)</sub></p>"
+ + "</body>\n" + "</html>");
page.close();
}
diff --git a/server/src/main/java/com/vaadin/server/UploadException.java b/server/src/main/java/com/vaadin/server/UploadException.java
index 1f1073b435..ad4027ca1a 100644
--- a/server/src/main/java/com/vaadin/server/UploadException.java
+++ b/server/src/main/java/com/vaadin/server/UploadException.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/main/java/com/vaadin/server/UserError.java b/server/src/main/java/com/vaadin/server/UserError.java
index ec1ac042f8..6ffc04d0d7 100644
--- a/server/src/main/java/com/vaadin/server/UserError.java
+++ b/server/src/main/java/com/vaadin/server/UserError.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ package com.vaadin.server;
/**
* <code>UserError</code> is a controlled error occurred in application. User
* errors are occur in normal usage of the application and guide the user.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -46,7 +46,7 @@ public class UserError extends AbstractErrorMessage {
/**
* Creates a textual error message of level ERROR.
- *
+ *
* @param textErrorMessage
* the text of the error message.
*/
@@ -56,7 +56,7 @@ public class UserError extends AbstractErrorMessage {
/**
* Creates an error message with level and content mode.
- *
+ *
* @param message
* the error message.
* @param contentMode
diff --git a/server/src/main/java/com/vaadin/server/VaadinPortlet.java b/server/src/main/java/com/vaadin/server/VaadinPortlet.java
index 5c91b6669c..1072313f56 100644
--- a/server/src/main/java/com/vaadin/server/VaadinPortlet.java
+++ b/server/src/main/java/com/vaadin/server/VaadinPortlet.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -52,22 +52,22 @@ import com.vaadin.util.CurrentInstance;
/**
* Portlet 2.0 base class. This replaces the servlet in servlet/portlet 1.0
* deployments and handles various portlet requests from the browser.
- *
+ *
* @author Vaadin Ltd
*/
-public class VaadinPortlet extends GenericPortlet implements Constants,
- Serializable {
+public class VaadinPortlet extends GenericPortlet
+ implements Constants, Serializable {
/**
* Base class for portlet requests that need access to HTTP servlet
* requests.
*/
- public static abstract class VaadinHttpAndPortletRequest extends
- VaadinPortletRequest {
+ public static abstract class VaadinHttpAndPortletRequest
+ extends VaadinPortletRequest {
/**
* Constructs a new {@link VaadinHttpAndPortletRequest}.
- *
+ *
* @since 7.2
* @param request
* {@link PortletRequest} to be wrapped
@@ -83,7 +83,7 @@ public class VaadinPortlet extends GenericPortlet implements Constants,
/**
* Returns the original HTTP servlet request for this portlet request.
- *
+ *
* @since 7.2
* @param request
* {@link PortletRequest} used to
@@ -178,8 +178,8 @@ public class VaadinPortlet extends GenericPortlet implements Constants,
/**
* Portlet request for Liferay.
*/
- public static class VaadinLiferayRequest extends
- VaadinHttpAndPortletRequest {
+ public static class VaadinLiferayRequest
+ extends VaadinHttpAndPortletRequest {
/**
* The PortalUtil class to use. Set to either
* {@link #LIFERAY_6_PORTAL_UTIL} or {@link #LIFERAY_7_PORTAL_UTIL} the
@@ -203,15 +203,15 @@ public class VaadinPortlet extends GenericPortlet implements Constants,
* Simplified version of what Liferay PortalClassInvoker did. This is
* used because the API of PortalClassInvoker has changed in Liferay
* 6.2.
- *
+ *
* This simply uses reflection with Liferay class loader. Parameters are
* Strings to avoid static dependencies and to load all classes with
* Liferay's own class loader. Only static utility methods are
* supported.
- *
+ *
* This method is for internal use only and may change in future
* versions.
- *
+ *
* @param className
* name of the Liferay class to call
* @param methodName
@@ -288,7 +288,8 @@ public class VaadinPortlet extends GenericPortlet implements Constants,
/**
* Portlet request for GateIn.
*/
- public static class VaadinGateInRequest extends VaadinHttpAndPortletRequest {
+ public static class VaadinGateInRequest
+ extends VaadinHttpAndPortletRequest {
public VaadinGateInRequest(PortletRequest request,
VaadinPortletService vaadinService) {
super(request, vaadinService);
@@ -297,8 +298,8 @@ public class VaadinPortlet extends GenericPortlet implements Constants,
@Override
protected HttpServletRequest getServletRequest(PortletRequest request) {
try {
- Method getRealReq = request.getClass().getMethod(
- "getRealRequest");
+ Method getRealReq = request.getClass()
+ .getMethod("getRealRequest");
HttpServletRequestWrapper origRequest = (HttpServletRequestWrapper) getRealReq
.invoke(request);
return origRequest;
@@ -312,8 +313,8 @@ public class VaadinPortlet extends GenericPortlet implements Constants,
/**
* Portlet request for WebSphere Portal.
*/
- public static class VaadinWebSpherePortalRequest extends
- VaadinHttpAndPortletRequest {
+ public static class VaadinWebSpherePortalRequest
+ extends VaadinHttpAndPortletRequest {
public VaadinWebSpherePortalRequest(PortletRequest request,
VaadinPortletService vaadinService) {
@@ -323,8 +324,8 @@ public class VaadinPortlet extends GenericPortlet implements Constants,
@Override
protected HttpServletRequest getServletRequest(PortletRequest request) {
try {
- Class<?> portletUtils = Class
- .forName("com.ibm.ws.portletcontainer.portlet.PortletUtils");
+ Class<?> portletUtils = Class.forName(
+ "com.ibm.ws.portletcontainer.portlet.PortletUtils");
Method getHttpServletRequest = portletUtils.getMethod(
"getHttpServletRequest", PortletRequest.class);
@@ -340,8 +341,8 @@ public class VaadinPortlet extends GenericPortlet implements Constants,
/**
* Portlet request for WebSphere Portal.
*/
- public static class VaadinWebLogicPortalRequest extends
- VaadinHttpAndPortletRequest {
+ public static class VaadinWebLogicPortalRequest
+ extends VaadinHttpAndPortletRequest {
private static boolean warningLogged = false;
private static Method servletRequestMethod = null;
@@ -355,8 +356,8 @@ public class VaadinPortlet extends GenericPortlet implements Constants,
protected HttpServletRequest getServletRequest(PortletRequest request) {
try {
if (servletRequestMethod == null) {
- Class<?> portletRequestClass = Class
- .forName("com.bea.portlet.container.PortletRequestImpl");
+ Class<?> portletRequestClass = Class.forName(
+ "com.bea.portlet.container.PortletRequestImpl");
servletRequestMethod = portletRequestClass
.getDeclaredMethod("getInternalRequest",
new Class[] {});
@@ -368,10 +369,9 @@ public class VaadinPortlet extends GenericPortlet implements Constants,
} catch (Exception e) {
if (!warningLogged) {
warningLogged = true;
- getLogger()
- .log(Level.WARNING,
- "Could not determine underlying servlet request for WebLogic Portal portlet request",
- e);
+ getLogger().log(Level.WARNING,
+ "Could not determine underlying servlet request for WebLogic Portal portlet request",
+ e);
}
return null;
}
@@ -388,7 +388,7 @@ public class VaadinPortlet extends GenericPortlet implements Constants,
/**
* This portlet parameter is used to add styles to the main element. E.g
* "height:500px" generates a style="height:500px" to the main element.
- *
+ *
* @deprecated As of 7.0. Will likely change or be removed in a future
* version
*/
@@ -398,7 +398,7 @@ public class VaadinPortlet extends GenericPortlet implements Constants,
/**
* This portal parameter is used to define the name of the Vaadin theme that
* is used for all Vaadin applications in the portal.
- *
+ *
* @deprecated As of 7.0. Will likely change or be removed in a future
* version
*/
@@ -440,11 +440,13 @@ public class VaadinPortlet extends GenericPortlet implements Constants,
initParameters.setProperty(name, config.getInitParameter(name));
}
- DeploymentConfiguration deploymentConfiguration = createDeploymentConfiguration(initParameters);
+ DeploymentConfiguration deploymentConfiguration = createDeploymentConfiguration(
+ initParameters);
try {
vaadinService = createPortletService(deploymentConfiguration);
} catch (ServiceException e) {
- throw new PortletException("Could not initialized VaadinPortlet", e);
+ throw new PortletException("Could not initialized VaadinPortlet",
+ e);
}
// Sets current service even though there are no request and response
vaadinService.setCurrentInstances(null, null);
@@ -474,7 +476,7 @@ public class VaadinPortlet extends GenericPortlet implements Constants,
/**
* @author Vaadin Ltd
- *
+ *
* @deprecated As of 7.0. This is no longer used and only provided for
* backwards compatibility. Each {@link RequestHandler} can
* individually decide whether it wants to handle a request or
@@ -488,7 +490,7 @@ public class VaadinPortlet extends GenericPortlet implements Constants,
/**
* @param vaadinRequest
* @return
- *
+ *
* @deprecated As of 7.0. This is no longer used and only provided for
* backwards compatibility. Each {@link RequestHandler} can
* individually decide whether it wants to handle a request or
@@ -504,7 +506,8 @@ public class VaadinPortlet extends GenericPortlet implements Constants,
return RequestType.UIDL;
} else if (PortletUIInitHandler.isUIInitRequest(vaadinRequest)) {
return RequestType.BROWSER_DETAILS;
- } else if (ServletPortletHelper.isFileUploadRequest(vaadinRequest)) {
+ } else if (ServletPortletHelper
+ .isFileUploadRequest(vaadinRequest)) {
return RequestType.FILE_UPLOAD;
} else if (ServletPortletHelper
.isPublishedFileRequest(vaadinRequest)) {
@@ -513,7 +516,8 @@ public class VaadinPortlet extends GenericPortlet implements Constants,
return RequestType.APP;
} else if (ServletPortletHelper.isHeartbeatRequest(vaadinRequest)) {
return RequestType.HEARTBEAT;
- } else if (PortletDummyRequestHandler.isDummyRequest(vaadinRequest)) {
+ } else if (PortletDummyRequestHandler
+ .isDummyRequest(vaadinRequest)) {
return RequestType.DUMMY;
} else {
return RequestType.STATIC_FILE;
@@ -531,7 +535,7 @@ public class VaadinPortlet extends GenericPortlet implements Constants,
* @param response
* @throws PortletException
* @throws IOException
- *
+ *
* @deprecated As of 7.0. Will likely change or be removed in a future
* version
*/
@@ -550,7 +554,7 @@ public class VaadinPortlet extends GenericPortlet implements Constants,
/**
* Wraps the request in a (possibly portal specific) Vaadin portlet request.
- *
+ *
* @param request
* The original PortletRequest
* @return A wrapped version of the PortletRequest
@@ -578,7 +582,8 @@ public class VaadinPortlet extends GenericPortlet implements Constants,
return new VaadinPortletRequest(request, service);
}
- private VaadinPortletResponse createVaadinResponse(PortletResponse response) {
+ private VaadinPortletResponse createVaadinResponse(
+ PortletResponse response) {
return new VaadinPortletResponse(response, getService());
}
@@ -621,8 +626,8 @@ public class VaadinPortlet extends GenericPortlet implements Constants,
}
@Override
- public void serveResource(ResourceRequest request, ResourceResponse response)
- throws PortletException, IOException {
+ public void serveResource(ResourceRequest request,
+ ResourceResponse response) throws PortletException, IOException {
handleRequest(request, response);
}
@@ -646,10 +651,10 @@ public class VaadinPortlet extends GenericPortlet implements Constants,
* <p>
* The current portlet is derived from the current service using
* {@link VaadinService#getCurrent()}
- *
+ *
* @return the current vaadin portlet instance if available, otherwise
* <code>null</code>
- *
+ *
* @since 7.0
*/
public static VaadinPortlet getCurrent() {
diff --git a/server/src/main/java/com/vaadin/server/VaadinPortletRequest.java b/server/src/main/java/com/vaadin/server/VaadinPortletRequest.java
index 93e06d7f45..658d653dad 100644
--- a/server/src/main/java/com/vaadin/server/VaadinPortletRequest.java
+++ b/server/src/main/java/com/vaadin/server/VaadinPortletRequest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -33,21 +33,21 @@ import com.vaadin.shared.ApplicationConstants;
/**
* Wrapper for {@link PortletRequest} and its subclasses.
- *
+ *
* @author Vaadin Ltd.
* @since 7.0
- *
+ *
* @see VaadinRequest
* @see VaadinPortletResponse
*/
-public class VaadinPortletRequest extends PortletRequestWrapper implements
- VaadinRequest {
+public class VaadinPortletRequest extends PortletRequestWrapper
+ implements VaadinRequest {
private final VaadinPortletService vaadinService;
/**
* Wraps a portlet request and an associated vaadin service
- *
+ *
* @param request
* the portlet request to wrap
* @param vaadinService
@@ -123,7 +123,7 @@ public class VaadinPortletRequest extends PortletRequestWrapper implements
/**
* Gets the original, unwrapped portlet request.
- *
+ *
* @return the unwrapped portlet request
*/
public PortletRequest getPortletRequest() {
@@ -182,7 +182,7 @@ public class VaadinPortletRequest extends PortletRequestWrapper implements
/**
* Reads a portal property from the portal context of the Vaadin request.
- *
+ *
* @param name
* a string with the name of the portal property to get
* @return a string with the value of the property, or <code>null</code> if
@@ -194,11 +194,11 @@ public class VaadinPortletRequest extends PortletRequestWrapper implements
/**
* Reads a portlet preference from the portlet of the request.
- *
+ *
* @param name
* The name of the portlet preference. Cannot be
* <code>null</code>.
- *
+ *
* @return The value of the portlet preference, <code>null</code> if the
* preference is not defined.
*/
@@ -244,7 +244,7 @@ public class VaadinPortletRequest extends PortletRequestWrapper implements
* is automatically defined when the request is started. The current portlet
* request can not be used in e.g. background threads because of the way
* server implementations reuse request instances.
- *
+ *
* @return the current portlet request instance if available, otherwise
* <code>null</code>
* @since 7.3
@@ -259,7 +259,7 @@ public class VaadinPortletRequest extends PortletRequestWrapper implements
* is automatically defined when the request is started. The current request
* can not be used in e.g. background threads because of the way server
* implementations reuse request instances.
- *
+ *
* @return the current Vaadin portlet request instance if available,
* otherwise <code>null</code>
* @since 7.3
diff --git a/server/src/main/java/com/vaadin/server/VaadinPortletResponse.java b/server/src/main/java/com/vaadin/server/VaadinPortletResponse.java
index 0e830666e1..0ea8150122 100644
--- a/server/src/main/java/com/vaadin/server/VaadinPortletResponse.java
+++ b/server/src/main/java/com/vaadin/server/VaadinPortletResponse.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,10 +32,10 @@ import javax.servlet.http.Cookie;
/**
* Wrapper for {@link PortletResponse} and its subclasses.
- *
+ *
* @author Vaadin Ltd.
* @since 7.0
- *
+ *
* @see VaadinResponse
* @see VaadinPortletRequest
*/
@@ -51,7 +51,7 @@ public class VaadinPortletResponse implements VaadinResponse {
/**
* Wraps a portlet response and an associated vaadin service
- *
+ *
* @param response
* the portlet response to wrap
* @param vaadinService
@@ -76,7 +76,7 @@ public class VaadinPortletResponse implements VaadinResponse {
/**
* Gets the original, unwrapped portlet response.
- *
+ *
* @return the unwrapped portlet response
*/
public PortletResponse getPortletResponse() {
@@ -125,7 +125,8 @@ public class VaadinPortletResponse implements VaadinResponse {
@Override
public void setDateHeader(String name, long timestamp) {
- response.setProperty(name, HTTP_DATE_FORMAT.format(new Date(timestamp)));
+ response.setProperty(name,
+ HTTP_DATE_FORMAT.format(new Date(timestamp)));
}
@Override
diff --git a/server/src/main/java/com/vaadin/server/VaadinPortletService.java b/server/src/main/java/com/vaadin/server/VaadinPortletService.java
index 5f22dd7d7c..0e53337edb 100644
--- a/server/src/main/java/com/vaadin/server/VaadinPortletService.java
+++ b/server/src/main/java/com/vaadin/server/VaadinPortletService.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -65,14 +65,15 @@ public class VaadinPortletService extends VaadinService {
/**
* Retrieves a reference to the portlet associated with this service.
- *
+ *
* @return A reference to the VaadinPortlet this service is using
*/
public VaadinPortlet getPortlet() {
return portlet;
}
- private String getPortalProperty(VaadinRequest request, String propertyName) {
+ private String getPortalProperty(VaadinRequest request,
+ String propertyName) {
return ((VaadinPortletRequest) request).getPortalProperty(propertyName);
}
@@ -179,11 +180,10 @@ public class VaadinPortletService extends VaadinService {
return new File(url.getFile());
} catch (final Exception e) {
// FIXME: Handle exception
- getLogger()
- .log(Level.INFO,
- "Cannot access base directory, possible security issue "
- + "with Application Server or Servlet Container",
- e);
+ getLogger().log(Level.INFO,
+ "Cannot access base directory, possible security issue "
+ + "with Application Server or Servlet Container",
+ e);
}
}
return null;
@@ -222,18 +222,18 @@ public class VaadinPortletService extends VaadinService {
/**
* Gets the request type for the request.
- *
+ *
* @param request
* the request to get a request type for
* @return the request type
- *
+ *
* @deprecated As of 7.0. Will likely change or be removed in a future
* version
*/
@Deprecated
protected RequestType getRequestType(VaadinRequest request) {
- RequestType type = (RequestType) request.getAttribute(RequestType.class
- .getName());
+ RequestType type = (RequestType) request
+ .getAttribute(RequestType.class.getName());
if (type == null) {
type = getPortlet().getRequestType((VaadinPortletRequest) request);
request.setAttribute(RequestType.class.getName(), type);
@@ -246,10 +246,10 @@ public class VaadinPortletService extends VaadinService {
* is automatically defined when the request is started. The current portlet
* request can not be used in e.g. background threads because of the way
* server implementations reuse request instances.
- *
+ *
* @return the current portlet request instance if available, otherwise
* <code>null</code>
- *
+ *
*/
public static PortletRequest getCurrentPortletRequest() {
VaadinPortletRequest currentRequest = getCurrentRequest();
@@ -265,10 +265,10 @@ public class VaadinPortletService extends VaadinService {
* is automatically defined when the request is started. The current request
* can not be used in e.g. background threads because of the way server
* implementations reuse request instances.
- *
+ *
* @return the current Vaadin portlet request instance if available,
* otherwise <code>null</code>
- *
+ *
*/
public static VaadinPortletRequest getCurrentRequest() {
return (VaadinPortletRequest) VaadinService.getCurrentRequest();
@@ -279,10 +279,10 @@ public class VaadinPortletService extends VaadinService {
* response is automatically defined when the request is started. The
* current response can not be used in e.g. background threads because of
* the way server implementations reuse response instances.
- *
+ *
* @return the current Vaadin portlet response instance if available,
* otherwise <code>null</code>
- *
+ *
*/
public static VaadinPortletResponse getCurrentResponse() {
return (VaadinPortletResponse) VaadinService.getCurrentResponse();
@@ -303,7 +303,8 @@ public class VaadinPortletService extends VaadinService {
* Always preserve UIs in portlets to make portlet actions work.
*/
@Override
- public boolean preserveUIOnRefresh(UIProvider provider, UICreateEvent event) {
+ public boolean preserveUIOnRefresh(UIProvider provider,
+ UICreateEvent event) {
return true;
}
@@ -313,9 +314,9 @@ public class VaadinPortletService extends VaadinService {
VaadinPortletSession session = (VaadinPortletSession) uI.getSession();
PortletContext portletContext = session.getPortletSession()
.getPortletContext();
- return portletContext.getResourceAsStream("/"
- + VaadinPortlet.THEME_DIR_PATH + '/' + themeName + "/"
- + resource);
+ return portletContext
+ .getResourceAsStream("/" + VaadinPortlet.THEME_DIR_PATH + '/'
+ + themeName + "/" + resource);
}
@Override
@@ -332,7 +333,7 @@ public class VaadinPortletService extends VaadinService {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.server.VaadinService#handleSessionExpired(com.vaadin.server
* .VaadinRequest, com.vaadin.server.VaadinResponse)
diff --git a/server/src/main/java/com/vaadin/server/VaadinPortletSession.java b/server/src/main/java/com/vaadin/server/VaadinPortletSession.java
index 23b5027b03..f7f9bd56a3 100644
--- a/server/src/main/java/com/vaadin/server/VaadinPortletSession.java
+++ b/server/src/main/java/com/vaadin/server/VaadinPortletSession.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -47,18 +47,18 @@ import com.vaadin.util.CurrentInstance;
/**
* An implementation of {@link VaadinSession} for JSR-286 portlet environments.
- *
+ *
* This is automatically registered as a {@link HttpSessionBindingListener} when
* {@link PortletSession#setAttribute()} is called with the context as value.
- *
+ *
* Only the documented parts of this class should be considered as stable public
* API.
- *
+ *
* Note also that some methods and/or nested interfaces might move to
* {@link VaadinPortletService} in future minor or major versions of Vaadin. In
* these cases, a deprecated redirection for backwards compatibility will be
* used in VaadinPortletSession for a transition period.
- *
+ *
* @since 7.0
*/
@SuppressWarnings("serial")
@@ -74,7 +74,7 @@ public class VaadinPortletSession extends VaadinSession {
/**
* Create a portlet service session for the given portlet service
- *
+ *
* @param service
* the portlet service to which the new session belongs
*/
@@ -84,7 +84,7 @@ public class VaadinPortletSession extends VaadinSession {
/**
* Returns the underlying portlet session.
- *
+ *
* @return portlet session
*/
public PortletSession getPortletSession() {
@@ -108,7 +108,7 @@ public class VaadinPortletSession extends VaadinSession {
/**
* Returns the JSR-286 portlet configuration that provides access to the
* portlet context and init parameters.
- *
+ *
* @return portlet configuration
*/
public PortletConfig getPortletConfig() {
@@ -119,7 +119,7 @@ public class VaadinPortletSession extends VaadinSession {
/**
* Adds a listener for various types of portlet requests.
- *
+ *
* @param listener
* to add
*/
@@ -130,7 +130,7 @@ public class VaadinPortletSession extends VaadinSession {
/**
* Removes a portlet request listener registered with
* {@link #addPortletListener(PortletListener)}.
- *
+ *
* @param listener
* to remove
*/
@@ -145,8 +145,8 @@ public class VaadinPortletSession extends VaadinSession {
RenderResponse response) {
for (PortletListener l : new ArrayList<PortletListener>(
portletListeners)) {
- l.handleRenderRequest(request, new RestrictedRenderResponse(
- response), uI);
+ l.handleRenderRequest(request,
+ new RestrictedRenderResponse(response), uI);
}
}
@@ -207,11 +207,11 @@ public class VaadinPortletSession extends VaadinSession {
* {@link PortletListenerNotifier} after the session is locked and the
* corresponding UI has been found (if already created) but before other
* request processing takes place.
- *
+ *
* Direct rendering of output is not possible in a portlet listener and the
* JSR-286 limitations on allowed operations in each phase or portlet
* request processing must be respected by the listeners.
- *
+ *
* Note that internal action requests used by the framework to trigger
* events or set shared parameters do not call the action request listener
* but will result in a later event or render request that will trigger the
@@ -234,11 +234,11 @@ public class VaadinPortletSession extends VaadinSession {
/**
* Creates a new action URL.
- *
+ *
* Creating an action URL is only supported when processing a suitable
* request (render or resource request, including normal Vaadin UIDL
* processing) and will return null if not processing a suitable request.
- *
+ *
* @param action
* the action parameter (javax.portlet.action parameter value in
* JSR-286)
@@ -259,18 +259,18 @@ public class VaadinPortletSession extends VaadinSession {
/**
* Sends a portlet event to the indicated destination.
- *
+ *
* Internally, an action may be created and opened, as an event cannot be
* sent directly from all types of requests.
- *
+ *
* Sending portlet events from background threads is not supported.
- *
+ *
* The event destinations and values need to be kept in the context until
* sent. Any memory leaks if the action fails are limited to the session.
- *
+ *
* Event names for events sent and received by a portlet need to be declared
* in portlet.xml .
- *
+ *
* @param uI
* a window in which a temporary action URL can be opened if
* necessary
@@ -309,19 +309,19 @@ public class VaadinPortletSession extends VaadinSession {
/**
* Sets a shared portlet parameter.
- *
+ *
* Internally, an action may be created and opened, as shared parameters
* cannot be set directly from all types of requests.
- *
+ *
* Setting shared render parameters from background threads is not
* supported.
- *
+ *
* The parameters and values need to be kept in the context until sent. Any
* memory leaks if the action fails are limited to the session.
- *
+ *
* Shared parameters set or read by a portlet need to be declared in
* portlet.xml .
- *
+ *
* @param uI
* a window in which a temporary action URL can be opened if
* necessary
@@ -359,13 +359,13 @@ public class VaadinPortletSession extends VaadinSession {
/**
* Sets the portlet mode. This may trigger a new render request.
- *
+ *
* Currently, this is only supported when working with a
* {@link StateAwareResponse} (an action request or an event request).
* Portlet mode change in background threads is not supported.
- *
+ *
* Portlet modes used by a portlet need to be declared in portlet.xml .
- *
+ *
* @param uI
* a window in which the render URL can be opened if necessary
* @param portletMode
diff --git a/server/src/main/java/com/vaadin/server/VaadinRequest.java b/server/src/main/java/com/vaadin/server/VaadinRequest.java
index 5b7e16ac46..87d4a07b45 100644
--- a/server/src/main/java/com/vaadin/server/VaadinRequest.java
+++ b/server/src/main/java/com/vaadin/server/VaadinRequest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -35,7 +35,7 @@ import javax.servlet.http.HttpServletRequest;
/**
* A generic request to the server, wrapping a more specific request type, e.g.
* HttpServletReqest or PortletRequest.
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
@@ -44,10 +44,10 @@ public interface VaadinRequest extends Serializable {
* Gets the named request parameter This is typically a HTTP GET or POST
* parameter, though other request types might have other ways of
* representing parameters.
- *
+ *
* @see javax.servlet.ServletRequest#getParameter(String)
* @see javax.portlet.PortletRequest#getParameter(String)
- *
+ *
* @param parameter
* the name of the parameter
* @return The paramter value, or <code>null</code> if no parameter with the
@@ -59,12 +59,12 @@ public interface VaadinRequest extends Serializable {
* Gets all the parameters of the request. Framework's internal init
* parameters have prefix "v-" (does not include such parameters as "theme"
* and "debug").
- *
+ *
* @see #getParameter(String)
- *
+ *
* @see javax.servlet.ServletRequest#getParameterMap()
* @see javax.portlet.PortletRequest#getParameter(String)
- *
+ *
* @return A mapping of parameter names to arrays of parameter values
*/
public Map<String, String[]> getParameterMap();
@@ -72,10 +72,10 @@ public interface VaadinRequest extends Serializable {
/**
* Returns the length of the request content that can be read from the input
* stream returned by {@link #getInputStream()}.
- *
+ *
* @see javax.servlet.ServletRequest#getContentLength()
* @see javax.portlet.ClientDataRequest#getContentLength()
- *
+ *
* @return content length in bytes
*/
public int getContentLength();
@@ -84,10 +84,10 @@ public interface VaadinRequest extends Serializable {
* Returns an input stream from which the request content can be read. The
* request content length can be obtained with {@link #getContentLength()}
* without reading the full stream contents.
- *
+ *
* @see javax.servlet.ServletRequest#getInputStream()
* @see javax.portlet.ClientDataRequest#getPortletInputStream()
- *
+ *
* @return the input stream from which the contents of the request can be
* read
* @throws IOException
@@ -97,12 +97,12 @@ public interface VaadinRequest extends Serializable {
/**
* Gets a request attribute.
- *
+ *
* @param name
* the name of the attribute
* @return the value of the attribute, or <code>null</code> if there is no
* attribute with the given name
- *
+ *
* @see javax.servlet.ServletRequest#getAttribute(String)
* @see javax.portlet.PortletRequest#getAttribute(String)
*/
@@ -110,12 +110,12 @@ public interface VaadinRequest extends Serializable {
/**
* Defines a request attribute.
- *
+ *
* @param name
* the name of the attribute
* @param value
* the attribute value
- *
+ *
* @see javax.servlet.ServletRequest#setAttribute(String, Object)
* @see javax.portlet.PortletRequest#setAttribute(String, Object)
*/
@@ -125,9 +125,9 @@ public interface VaadinRequest extends Serializable {
* Gets the path of the requested resource relative to the application. The
* path is <code>null</code> if no path information is available. Does
* always start with / if the path isn't <code>null</code>.
- *
+ *
* @return a string with the path relative to the application.
- *
+ *
* @see javax.servlet.http.HttpServletRequest#getPathInfo()
*/
public String getPathInfo();
@@ -135,10 +135,10 @@ public interface VaadinRequest extends Serializable {
/**
* Returns the portion of the request URI that indicates the context of the
* request. The context path always comes first in a request URI.
- *
+ *
* @see HttpServletRequest#getContextPath()
* @see PortletRequest#getContextPath()
- *
+ *
* @return a String specifying the portion of the request URI that indicates
* the context of the request
*/
@@ -147,11 +147,11 @@ public interface VaadinRequest extends Serializable {
/**
* Gets the session associated with this request, creating a new if there is
* no session.
- *
+ *
* @see WrappedSession
* @see HttpServletRequest#getSession()
* @see PortletRequest#getPortletSession()
- *
+ *
* @return the wrapped session for this request
*/
public WrappedSession getWrappedSession();
@@ -159,16 +159,16 @@ public interface VaadinRequest extends Serializable {
/**
* Gets the session associated with this request, optionally creating a new
* if there is no session.
- *
+ *
* @param allowSessionCreation
* <code>true</code> to create a new session for this request if
* necessary; <code>false</code> to return <code>null</code> if
* there's no current session
- *
+ *
* @see WrappedSession
* @see HttpServletRequest#getSession(boolean)
* @see PortletRequest#getPortletSession(boolean)
- *
+ *
* @return the wrapped session for this request
*/
public WrappedSession getWrappedSession(boolean allowSessionCreation);
@@ -176,22 +176,22 @@ public interface VaadinRequest extends Serializable {
/**
* Returns the MIME type of the body of the request, or null if the type is
* not known.
- *
+ *
* @return a string containing the name of the MIME type of the request, or
* null if the type is not known
- *
+ *
* @see javax.servlet.ServletRequest#getContentType()
* @see javax.portlet.ResourceRequest#getContentType()
- *
+ *
*/
public String getContentType();
/**
* Gets locale information from the query, e.g. using the Accept-Language
* header.
- *
+ *
* @return the preferred Locale
- *
+ *
* @see ServletRequest#getLocale()
* @see PortletRequest#getLocale()
*/
@@ -200,10 +200,10 @@ public interface VaadinRequest extends Serializable {
/**
* Returns the IP address from which the request came. This might also be
* the address of a proxy between the server and the original requester.
- *
+ *
* @return a string containing the IP address, or <code>null</code> if the
* address is not available
- *
+ *
* @see ServletRequest#getRemoteAddr()
*/
public String getRemoteAddr();
@@ -211,9 +211,9 @@ public interface VaadinRequest extends Serializable {
/**
* Checks whether the request was made using a secure channel, e.g. using
* https.
- *
+ *
* @return a boolean indicating if the request is secure
- *
+ *
* @see ServletRequest#isSecure()
* @see PortletRequest#isSecure()
*/
@@ -222,21 +222,21 @@ public interface VaadinRequest extends Serializable {
/**
* Gets the value of a request header, e.g. a http header for a
* {@link HttpServletRequest}.
- *
+ *
* @param headerName
* the name of the header
* @return the header value, or <code>null</code> if the header is not
* present in the request
- *
+ *
* @see HttpServletRequest#getHeader(String)
*/
public String getHeader(String headerName);
/**
* Gets the vaadin service for the context of this request.
- *
+ *
* @return the vaadin service
- *
+ *
* @see VaadinService
*/
public VaadinService getService();
@@ -245,10 +245,10 @@ public interface VaadinRequest extends Serializable {
* Returns an array containing all of the <code>Cookie</code> objects the
* client sent with this request. This method returns <code>null</code> if
* no cookies were sent.
- *
+ *
* @return an array of all the <code>Cookies</code> included with this
* request, or <code>null</code> if the request has no cookies
- *
+ *
* @see HttpServletRequest#getCookies()
* @see PortletRequest#getCookies()
*/
@@ -259,10 +259,10 @@ public interface VaadinRequest extends Serializable {
* between client and server, for example, <code>BASIC_AUTH</code>,
* <code>CLIENT_CERT_AUTH</code>, a custom one or <code>null</code> if there
* was no authentication.
- *
+ *
* @return a string indicating the authentication scheme, or
* <code>null</code> if the request was not authenticated.
- *
+ *
* @see HttpServletRequest#getAuthType()
* @see PortletRequest#getAuthType()
*/
@@ -273,10 +273,10 @@ public interface VaadinRequest extends Serializable {
* authenticated, or null if the user has not been authenticated. Whether
* the user name is sent with each subsequent request depends on the browser
* and type of authentication.
- *
+ *
* @return a String specifying the login of the user making this request, or
* <code>null</code> if the user login is not known.
- *
+ *
* @see HttpServletRequest#getRemoteUser()
* @see PortletRequest#getRemoteUser()
*/
@@ -286,11 +286,11 @@ public interface VaadinRequest extends Serializable {
* Returns a <code>java.security.Principal</code> object containing the name
* of the current authenticated user. If the user has not been
* authenticated, the method returns <code>null</code>.
- *
+ *
* @return a <code>java.security.Principal</code> containing the name of the
* user making this request; <code>null</code> if the user has not
* been authenticated
- *
+ *
* @see HttpServletRequest#getUserPrincipal()
* @see PortletRequest#getUserPrincipal()
*/
@@ -301,13 +301,13 @@ public interface VaadinRequest extends Serializable {
* in the specified logical "role". Roles and role membership can be defined
* using deployment descriptors. If the user has not been authenticated, the
* method returns <code>false</code>.
- *
+ *
* @param role
* a String specifying the name of the role
* @return a boolean indicating whether the user making this request belongs
* to a given role; <code>false</code> if the user has not been
* authenticated
- *
+ *
* @see HttpServletRequest#isUserInRole(String)
* @see PortletRequest#isUserInRole(String)
*/
@@ -317,10 +317,10 @@ public interface VaadinRequest extends Serializable {
* Removes an attribute from this request. This method is not generally
* needed as attributes only persist as long as the request is being
* handled.
- *
+ *
* @param name
* a String specifying the name of the attribute to remove
- *
+ *
* @see ServletRequest#removeAttribute(String)
* @see PortletRequest#removeAttribute(String)
*/
@@ -330,10 +330,10 @@ public interface VaadinRequest extends Serializable {
* Returns an Enumeration containing the names of the attributes available
* to this request. This method returns an empty Enumeration if the request
* has no attributes available to it.
- *
+ *
* @return an Enumeration of strings containing the names of the request's
* attributes
- *
+ *
* @see ServletRequest#getAttributeNames()
* @see PortletRequest#getAttributeNames()
*/
@@ -345,9 +345,9 @@ public interface VaadinRequest extends Serializable {
* the client based on the Accept-Language header. If the client request
* doesn't provide an Accept-Language header, this method returns an
* Enumeration containing one Locale, the default locale for the server.
- *
+ *
* @return an Enumeration of preferred Locale objects for the client
- *
+ *
* @see HttpServletRequest#getLocales()
* @see PortletRequest#getLocales()
*/
@@ -358,10 +358,10 @@ public interface VaadinRequest extends Serializable {
* sent the request. If the engine cannot or chooses not to resolve the
* hostname (to improve performance), this method returns the dotted-string
* form of the IP address.
- *
+ *
* @return a String containing the fully qualified name of the client, or
* <code>null</code> if the information is not available.
- *
+ *
* @see HttpServletRequest#getRemoteHost()
*/
public String getRemoteHost();
@@ -369,10 +369,10 @@ public interface VaadinRequest extends Serializable {
/**
* Returns the Internet Protocol (IP) source port of the client or last
* proxy that sent the request.
- *
+ *
* @return an integer specifying the port number, or -1 if the information
* is not available.
- *
+ *
* @see ServletRequest#getRemotePort()
*/
public int getRemotePort();
@@ -381,10 +381,10 @@ public interface VaadinRequest extends Serializable {
* Returns the name of the character encoding used in the body of this
* request. This method returns <code>null</code> if the request does not
* specify a character encoding.
- *
+ *
* @return a String containing the name of the character encoding, or null
* if the request does not specify a character encoding
- *
+ *
* @see ServletRequest#getCharacterEncoding()
* @see ClientDataRequest#getCharacterEncoding()
*/
@@ -395,9 +395,9 @@ public interface VaadinRequest extends Serializable {
* <code>BufferedReader</code>. The reader translates the character data
* according to the character encoding used on the body. Either this method
* or {@link #getInputStream()} may be called to read the body, not both.
- *
+ *
* @return a BufferedReader containing the body of the request
- *
+ *
* @throws UnsupportedEncodingException
* - if the character set encoding used is not supported and the
* text cannot be decoded
@@ -406,7 +406,7 @@ public interface VaadinRequest extends Serializable {
* request
* @throws IOException
* if an input or output exception occurred
- *
+ *
* @see ServletRequest#getReader()
* @see ClientDataRequest#getReader()
*/
@@ -415,10 +415,10 @@ public interface VaadinRequest extends Serializable {
/**
* Returns the name of the HTTP method with which this request was made, for
* example, GET, POST, or PUT.
- *
+ *
* @return a String specifying the name of the method with which this
* request was made
- *
+ *
* @see HttpServletRequest#getMethod()
* @see ClientDataRequest#getMethod()
*/
@@ -435,7 +435,7 @@ public interface VaadinRequest extends Serializable {
* If the request did not have a header of the specified name, this method
* returns -1. If the header can't be converted to a date, the method throws
* an IllegalArgumentException.
- *
+ *
* @param name
* a String specifying the name of the header
* @return a long value representing the date specified in the header
@@ -453,7 +453,7 @@ public interface VaadinRequest extends Serializable {
* <p>
* Some implementations do not allow access headers using this method, in
* which case this method returns <code>null</code>
- *
+ *
* @return an enumeration of all the header names sent with this request; if
* the request has no headers, an empty enumeration; if the
* implementation does not allow this method, <code>null</code>
@@ -475,8 +475,8 @@ public interface VaadinRequest extends Serializable {
* <p>
* The header name is case insensitive. You can use this method with any
* request header.
- *
- *
+ *
+ *
* @param name
* a String specifying the header name
* @return an Enumeration containing the values of the requested header. If
diff --git a/server/src/main/java/com/vaadin/server/VaadinResponse.java b/server/src/main/java/com/vaadin/server/VaadinResponse.java
index c31c6c05d8..de33279814 100644
--- a/server/src/main/java/com/vaadin/server/VaadinResponse.java
+++ b/server/src/main/java/com/vaadin/server/VaadinResponse.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,7 +31,7 @@ import javax.servlet.http.HttpServletResponse;
/**
* A generic response from the server, wrapping a more specific response type,
* e.g. HttpServletResponse or PortletResponse.
- *
+ *
* @since 7.0
*/
public interface VaadinResponse extends Serializable {
@@ -40,11 +40,11 @@ public interface VaadinResponse extends Serializable {
* Sets the (http) status code for the response. If you want to include an
* error message along the status code, use {@link #sendError(int, String)}
* instead.
- *
+ *
* @param statusCode
* the status code to set
* @see HttpServletResponse#setStatus(int)
- *
+ *
* @see ResourceResponse#HTTP_STATUS_CODE
*/
public void setStatus(int statusCode);
@@ -53,10 +53,10 @@ public interface VaadinResponse extends Serializable {
* Sets the content type of this response. If the content type including a
* charset is set before {@link #getWriter()} is invoked, the returned
* PrintWriter will automatically use the defined charset.
- *
+ *
* @param contentType
* a string specifying the MIME type of the content
- *
+ *
* @see ServletResponse#setContentType(String)
* @see MimeResponse#setContentType(String)
*/
@@ -65,12 +65,12 @@ public interface VaadinResponse extends Serializable {
/**
* Sets the value of a generic response header. If the header had already
* been set, the new value overwrites the previous one.
- *
+ *
* @param name
* the name of the header
* @param value
* the header value.
- *
+ *
* @see HttpServletResponse#setHeader(String, String)
* @see PortletResponse#setProperty(String, String)
*/
@@ -79,12 +79,12 @@ public interface VaadinResponse extends Serializable {
/**
* Properly formats a timestamp as a date header. If the header had already
* been set, the new value overwrites the previous one.
- *
+ *
* @param name
* the name of the header
* @param timestamp
* the number of milliseconds since epoch
- *
+ *
* @see HttpServletResponse#setDateHeader(String, long)
*/
public void setDateHeader(String name, long timestamp);
@@ -95,11 +95,11 @@ public interface VaadinResponse extends Serializable {
* <p>
* Either this method or getWriter() may be called to write the response,
* not both.
- *
+ *
* @return a <code>OutputStream</code> for writing binary data
* @throws IOException
* if an input or output exception occurred
- *
+ *
* @see #getWriter()
* @see ServletResponse#getOutputStream()
* @see MimeResponse#getPortletOutputStream()
@@ -113,11 +113,11 @@ public interface VaadinResponse extends Serializable {
* <p>
* Either this method or getOutputStream() may be called to write the
* response, not both.
- *
+ *
* @return a <code>PrintWriter</code> for writing character text
* @throws IOException
* if an input or output exception occurred
- *
+ *
* @see #getOutputStream()
* @see ServletResponse#getWriter()
* @see MimeResponse#getWriter()
@@ -127,7 +127,7 @@ public interface VaadinResponse extends Serializable {
/**
* Sets cache time in milliseconds, -1 means no cache at all. All required
* headers related to caching in the response are set based on the time.
- *
+ *
* @param milliseconds
* Cache time in milliseconds
*/
@@ -137,23 +137,23 @@ public interface VaadinResponse extends Serializable {
* Sends an error response to the client using the specified status code and
* clears the buffer. In some configurations, this can cause a predefined
* error page to be displayed.
- *
+ *
* @param errorCode
* the HTTP status code
* @param message
* a message to accompany the error
* @throws IOException
* if an input or output exception occurs
- *
+ *
* @see HttpServletResponse#sendError(int, String)
*/
public void sendError(int errorCode, String message) throws IOException;
/**
* Gets the vaadin service for the context of this response.
- *
+ *
* @return the vaadin service
- *
+ *
* @see VaadinService
*/
public VaadinService getService();
@@ -161,10 +161,10 @@ public interface VaadinResponse extends Serializable {
/**
* Adds the specified cookie to the response. This method can be called
* multiple times to set more than one cookie.
- *
+ *
* @param cookie
* the Cookie to return to the client
- *
+ *
* @see HttpServletResponse#addCookie(Cookie)
* @see PortletResponse#addProperty(Cookie)
*/
diff --git a/server/src/main/java/com/vaadin/server/VaadinService.java b/server/src/main/java/com/vaadin/server/VaadinService.java
index b08597d37c..e453332f02 100644
--- a/server/src/main/java/com/vaadin/server/VaadinService.java
+++ b/server/src/main/java/com/vaadin/server/VaadinService.java
@@ -165,12 +165,13 @@ public abstract class VaadinService implements Serializable {
.loadClass(classLoaderName);
final Constructor<?> c = classLoaderClass
.getConstructor(new Class[] { ClassLoader.class });
- setClassLoader((ClassLoader) c
- .newInstance(new Object[] { getClass().getClassLoader() }));
+ setClassLoader((ClassLoader) c.newInstance(
+ new Object[] { getClass().getClassLoader() }));
} catch (final Exception e) {
throw new RuntimeException(
"Could not find specified class loader: "
- + classLoaderName, e);
+ + classLoaderName,
+ e);
}
}
@@ -372,7 +373,8 @@ public abstract class VaadinService implements Serializable {
* @param request
* @return the system messages to use
*/
- public SystemMessages getSystemMessages(Locale locale, VaadinRequest request) {
+ public SystemMessages getSystemMessages(Locale locale,
+ VaadinRequest request) {
SystemMessagesInfo systemMessagesInfo = new SystemMessagesInfo();
systemMessagesInfo.setLocale(locale);
systemMessagesInfo.setService(this);
@@ -485,8 +487,9 @@ public abstract class VaadinService implements Serializable {
// for now, use the session error handler; in the future, could
// have an API for using some other handler for session init and
// destroy listeners
- eventRouter.fireEvent(new SessionDestroyEvent(
- VaadinService.this, session), session.getErrorHandler());
+ eventRouter.fireEvent(
+ new SessionDestroyEvent(VaadinService.this, session),
+ session.getErrorHandler());
session.setState(State.CLOSED);
}
@@ -553,7 +556,8 @@ public abstract class VaadinService implements Serializable {
}
Object currentSessionLock = wrappedSession
.getAttribute(getLockAttributeName());
- assert (currentSessionLock == null || currentSessionLock == lock) : "Changing the lock for a session is not allowed";
+ assert (currentSessionLock == null
+ || currentSessionLock == lock) : "Changing the lock for a session is not allowed";
wrappedSession.setAttribute(getLockAttributeName(), lock);
}
@@ -665,7 +669,8 @@ public abstract class VaadinService implements Serializable {
}
try {
- return doFindOrCreateVaadinSession(request, requestCanCreateSession);
+ return doFindOrCreateVaadinSession(request,
+ requestCanCreateSession);
} finally {
unlockSession(wrappedSession);
}
@@ -684,8 +689,8 @@ public abstract class VaadinService implements Serializable {
* @throws ServiceException
*/
private VaadinSession doFindOrCreateVaadinSession(VaadinRequest request,
- boolean requestCanCreateSession) throws SessionExpiredException,
- ServiceException {
+ boolean requestCanCreateSession)
+ throws SessionExpiredException, ServiceException {
assert ((ReentrantLock) getSessionLock(request.getWrappedSession()))
.isHeldByCurrentThread() : "Session has not been locked by this thread";
@@ -768,7 +773,8 @@ public abstract class VaadinService implements Serializable {
Locale locale = request.getLocale();
session.setLocale(locale);
session.setConfiguration(getDeploymentConfiguration());
- session.setCommunicationManager(new LegacyCommunicationManager(session));
+ session.setCommunicationManager(
+ new LegacyCommunicationManager(session));
ServletPortletHelper.initDefaultUIProvider(session, this);
onVaadinSessionStarted(request, session);
@@ -1020,7 +1026,8 @@ public abstract class VaadinService implements Serializable {
* <code>false</code> if a new UI instance should be initialized on
* refreshed.
*/
- public boolean preserveUIOnRefresh(UIProvider provider, UICreateEvent event) {
+ public boolean preserveUIOnRefresh(UIProvider provider,
+ UICreateEvent event) {
return provider.isPreservedOnRefresh(event);
}
@@ -1088,7 +1095,7 @@ public abstract class VaadinService implements Serializable {
*
* Finds the given theme resource from the web content folder or using the
* class loader and returns a stream for it
- *
+ *
* @param ui
* The ui for which to find the resource
* @param themeName
@@ -1237,7 +1244,8 @@ public abstract class VaadinService implements Serializable {
*/
private int getHeartbeatTimeout() {
// Permit three missed heartbeats before closing the UI
- return (int) (getDeploymentConfiguration().getHeartbeatInterval() * (3.1));
+ return (int) (getDeploymentConfiguration().getHeartbeatInterval()
+ * (3.1));
}
/**
@@ -1260,8 +1268,8 @@ public abstract class VaadinService implements Serializable {
* timeout never occurs.
*/
private int getUidlRequestTimeout(VaadinSession session) {
- return getDeploymentConfiguration().isCloseIdleSessions() ? session
- .getSession().getMaxInactiveInterval() : -1;
+ return getDeploymentConfiguration().isCloseIdleSessions()
+ ? session.getSession().getMaxInactiveInterval() : -1;
}
/**
@@ -1445,12 +1453,10 @@ public abstract class VaadinService implements Serializable {
// if this was an UIDL request, send UIDL back to the client
if (ServletPortletHelper.isUIDLRequest(request)) {
- SystemMessages ci = getSystemMessages(
- ServletPortletHelper.findLocale(null, vaadinSession,
- request), request);
+ SystemMessages ci = getSystemMessages(ServletPortletHelper
+ .findLocale(null, vaadinSession, request), request);
try {
- writeStringResponse(
- response,
+ writeStringResponse(response,
JsonConstants.JSON_CONTENT_TYPE,
createCriticalNotificationJSON(
ci.getInternalErrorCaption(),
@@ -1459,10 +1465,9 @@ public abstract class VaadinService implements Serializable {
} catch (IOException e) {
// An exception occured while writing the response. Log
// it and continue handling only the original error.
- getLogger()
- .log(Level.WARNING,
- "Failed to write critical notification response to the client",
- e);
+ getLogger().log(Level.WARNING,
+ "Failed to write critical notification response to the client",
+ e);
}
} else {
// Re-throw other exceptions
@@ -1488,14 +1493,14 @@ public abstract class VaadinService implements Serializable {
* @throws IOException
* If an error occured while writing the response
*/
- public void writeStringResponse(VaadinResponse response,
- String contentType, String reponseString) throws IOException {
+ public void writeStringResponse(VaadinResponse response, String contentType,
+ String reponseString) throws IOException {
response.setContentType(contentType);
final OutputStream out = response.getOutputStream();
- final PrintWriter outWriter = new PrintWriter(new BufferedWriter(
- new OutputStreamWriter(out, "UTF-8")));
+ final PrintWriter outWriter = new PrintWriter(
+ new BufferedWriter(new OutputStreamWriter(out, "UTF-8")));
outWriter.print(reponseString);
outWriter.close();
}
@@ -1517,8 +1522,8 @@ public abstract class VaadinService implements Serializable {
for (RequestHandler handler : getRequestHandlers()) {
if (handler instanceof SessionExpiredHandler) {
try {
- if (((SessionExpiredHandler) handler).handleSessionExpired(
- request, response)) {
+ if (((SessionExpiredHandler) handler)
+ .handleSessionExpired(request, response)) {
return;
}
} catch (IOException e) {
@@ -1652,8 +1657,7 @@ public abstract class VaadinService implements Serializable {
}
if (!Constants.REQUIRED_ATMOSPHERE_RUNTIME_VERSION.equals(rawVersion)) {
- getLogger().log(
- Level.WARNING,
+ getLogger().log(Level.WARNING,
Constants.INVALID_ATMOSPHERE_VERSION_WARNING,
new Object[] {
Constants.REQUIRED_ATMOSPHERE_RUNTIME_VERSION,
@@ -1664,7 +1668,7 @@ public abstract class VaadinService implements Serializable {
/**
* Checks whether Atmosphere is avilable for use
- *
+ *
* @since 7.6
* @return true if Atmosphere is available, false otherwise
*/
@@ -1763,7 +1767,8 @@ public abstract class VaadinService implements Serializable {
* @return a future that can be used to check for task completion and to
* cancel the task
*/
- public Future<Void> accessSession(VaadinSession session, Runnable runnable) {
+ public Future<Void> accessSession(VaadinSession session,
+ Runnable runnable) {
FutureAccess future = new FutureAccess(session, runnable);
session.getPendingAccessQueue().add(future);
@@ -1788,7 +1793,7 @@ public abstract class VaadinService implements Serializable {
* If no thread is currently holding the lock, pending changes for UIs
* with automatic push would not be processed and pushed until the next
* time there is a request or someone does an explicit push call.
- *
+ *
* To remedy this, we try to get the lock at this point. If the lock is
* currently held by another thread, we just back out as the queue will
* get purged once it is released. If the lock is held by the current
@@ -1831,11 +1836,12 @@ public abstract class VaadinService implements Serializable {
FutureAccess pendingAccess;
try {
- while ((pendingAccess = session.getPendingAccessQueue().poll()) != null) {
+ while ((pendingAccess = session.getPendingAccessQueue()
+ .poll()) != null) {
if (!pendingAccess.isCancelled()) {
CurrentInstance.clearAll();
- CurrentInstance.restoreInstances(pendingAccess
- .getCurrentInstances());
+ CurrentInstance.restoreInstances(
+ pendingAccess.getCurrentInstances());
CurrentInstance.setCurrent(session);
pendingAccess.run();
@@ -1903,16 +1909,16 @@ public abstract class VaadinService implements Serializable {
* this {@link VaadinService} if found. If current security policy disallows
* acquiring class loader instance it will log a message and re-throw
* {@link SecurityException}
- *
+ *
* @throws SecurityException
* If current security policy forbids acquiring class loader
- *
+ *
* @since 7.3.5
*/
protected void setDefaultClassLoader() {
try {
- setClassLoader(VaadinServiceClassLoaderUtil
- .findDefaultClassLoader());
+ setClassLoader(
+ VaadinServiceClassLoaderUtil.findDefaultClassLoader());
} catch (SecurityException e) {
getLogger().log(Level.SEVERE,
Constants.CANNOT_ACQUIRE_CLASSLOADER_SEVERE, e);
@@ -1924,7 +1930,7 @@ public abstract class VaadinService implements Serializable {
* Called when the VaadinSession should be stored.
* <p>
* By default stores the VaadinSession in the underlying HTTP session.
- *
+ *
* @since 7.6
* @param session
* the VaadinSession to store
@@ -1943,7 +1949,7 @@ public abstract class VaadinService implements Serializable {
* session after sanity checks have been performed.
* <p>
* Called by {@link #storeSession(VaadinSession, WrappedSession)}
- *
+ *
* @since 7.6
* @param wrappedSession
* the underlying HTTP session
@@ -1958,7 +1964,7 @@ public abstract class VaadinService implements Serializable {
/**
* Called when the VaadinSession should be loaded from the underlying HTTP
* session
- *
+ *
* @since 7.6
* @param wrappedSession
* the underlying HTTP session
@@ -1980,7 +1986,7 @@ public abstract class VaadinService implements Serializable {
* session after sanity checks have been performed.
* <p>
* Called by {@link #loadSession(WrappedSession)}.
- *
+ *
* @param wrappedSession
* the underlying HTTP session
* @since 7.6
@@ -1994,7 +2000,7 @@ public abstract class VaadinService implements Serializable {
/**
* Called when the VaadinSession should be removed from the underlying HTTP
* session
- *
+ *
* @since 7.6
* @param wrappedSession
* the underlying HTTP session
@@ -2007,7 +2013,7 @@ public abstract class VaadinService implements Serializable {
/**
* Performs the actual removal of the VaadinSession from the underlying HTTP
* session after sanity checks have been performed
- *
+ *
* @since 7.6
* @param wrappedSession
* the underlying HTTP session
@@ -2020,7 +2026,7 @@ public abstract class VaadinService implements Serializable {
/**
* Returns the name used for storing the VaadinSession in the underlying
* HTTP session
- *
+ *
* @since 7.6
* @return the attribute name used for storing the VaadinSession
*/
diff --git a/server/src/main/java/com/vaadin/server/VaadinServiceClassLoaderUtil.java b/server/src/main/java/com/vaadin/server/VaadinServiceClassLoaderUtil.java
index 8c85a6b3b3..5b9d0a9237 100644
--- a/server/src/main/java/com/vaadin/server/VaadinServiceClassLoaderUtil.java
+++ b/server/src/main/java/com/vaadin/server/VaadinServiceClassLoaderUtil.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,14 +20,14 @@ import java.security.PrivilegedAction;
/**
* Utility class used by {@link VaadinService#setDefaultClassLoader()}.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
class VaadinServiceClassLoaderUtil {
- private static class GetClassLoaderPrivilegedAction implements
- PrivilegedAction<ClassLoader> {
+ private static class GetClassLoaderPrivilegedAction
+ implements PrivilegedAction<ClassLoader> {
@Override
public ClassLoader run() {
return Thread.currentThread().getContextClassLoader();
@@ -41,7 +41,7 @@ class VaadinServiceClassLoaderUtil {
* appropriate message. The code for this method is modeled after
* recommendations laid out by JEE 5 specification sections EE.6.2.4.7 and
* EE.8.2.5
- *
+ *
* @return Instance of {@link ClassLoader} that should be used by this
* instance of {@link VaadinService}
* @throws SecurityException
@@ -50,8 +50,8 @@ class VaadinServiceClassLoaderUtil {
*/
static protected ClassLoader findDefaultClassLoader()
throws SecurityException {
- return AccessController
- .doPrivileged(new VaadinServiceClassLoaderUtil.GetClassLoaderPrivilegedAction());
+ return AccessController.doPrivileged(
+ new VaadinServiceClassLoaderUtil.GetClassLoaderPrivilegedAction());
}
}
diff --git a/server/src/main/java/com/vaadin/server/VaadinServlet.java b/server/src/main/java/com/vaadin/server/VaadinServlet.java
index eef3bcd8ee..b48063f972 100644
--- a/server/src/main/java/com/vaadin/server/VaadinServlet.java
+++ b/server/src/main/java/com/vaadin/server/VaadinServlet.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -125,25 +125,27 @@ public class VaadinServlet extends HttpServlet implements Constants {
long lastModified = -1L;
if (file.exists()) {
lastModified = file.lastModified();
- } else if (resource != null && resource.getProtocol().equals("file")) {
+ } else if (resource != null
+ && resource.getProtocol().equals("file")) {
try {
file = new File(resource.toURI());
if (file.exists()) {
lastModified = file.lastModified();
}
} catch (URISyntaxException e) {
- getLogger().log(Level.WARNING, "Could not resolve timestamp for " + resource, e);
+ getLogger().log(Level.WARNING,
+ "Could not resolve timestamp for " + resource,
+ e);
}
}
if (lastModified == -1L && resource == null) {
/*
- * Ignore missing files found in the classpath,
- * report problem and abort for other files.
+ * Ignore missing files found in the classpath, report
+ * problem and abort for other files.
*/
- getLogger()
- .log(Level.WARNING,
- "Could not resolve timestamp for {0}, Scss on the fly caching will be disabled",
- uri);
+ getLogger().log(Level.WARNING,
+ "Could not resolve timestamp for {0}, Scss on the fly caching will be disabled",
+ uri);
// -1 means this cache entry will never be valid
return -1;
}
@@ -184,7 +186,7 @@ public class VaadinServlet extends HttpServlet implements Constants {
/**
* Called by the servlet container to indicate to a servlet that the servlet
* is being placed into service.
- *
+ *
* @param servletConfig
* the object containing the servlet's configuration and
* initialization parameters
@@ -219,7 +221,8 @@ public class VaadinServlet extends HttpServlet implements Constants {
servletConfig.getInitParameter(name));
}
- DeploymentConfiguration deploymentConfiguration = createDeploymentConfiguration(initParameters);
+ DeploymentConfiguration deploymentConfiguration = createDeploymentConfiguration(
+ initParameters);
try {
servletService = createServletService(deploymentConfiguration);
} catch (ServiceException e) {
@@ -236,7 +239,8 @@ public class VaadinServlet extends HttpServlet implements Constants {
private void readUiFromEnclosingClass(Properties initParameters) {
Class<?> enclosingClass = getClass().getEnclosingClass();
- if (enclosingClass != null && UI.class.isAssignableFrom(enclosingClass)) {
+ if (enclosingClass != null
+ && UI.class.isAssignableFrom(enclosingClass)) {
initParameters.put(VaadinSession.UI_PARAMETER,
enclosingClass.getName());
}
@@ -269,7 +273,8 @@ public class VaadinServlet extends HttpServlet implements Constants {
// This should never happen
throw new ServletException(
"Could not read @VaadinServletConfiguration value "
- + method.getName(), e);
+ + method.getName(),
+ e);
}
}
}
@@ -289,10 +294,10 @@ public class VaadinServlet extends HttpServlet implements Constants {
* <p>
* The current servlet is derived from the current service using
* {@link VaadinService#getCurrent()}
- *
+ *
* @return the current Vaadin servlet instance if available, otherwise
* <code>null</code>
- *
+ *
* @since 7.0
*/
public static VaadinServlet getCurrent() {
@@ -322,7 +327,7 @@ public class VaadinServlet extends HttpServlet implements Constants {
/**
* Receives standard HTTP requests from the public service method and
* dispatches them.
- *
+ *
* @param request
* the object that contains the request the client made of the
* servlet.
@@ -373,7 +378,7 @@ public class VaadinServlet extends HttpServlet implements Constants {
* Invoked for every request to this servlet to potentially send a redirect
* to avoid problems with requests to the context root with no trailing
* slash.
- *
+ *
* @param request
* the processed request
* @param response
@@ -425,7 +430,7 @@ public class VaadinServlet extends HttpServlet implements Constants {
* related to /bar.
* <p>
* For http://myhost.com/foo;a=1/bar;b=1 this method will return ;b=1
- *
+ *
* @since 7.2
* @param uri
* a URI
@@ -457,7 +462,7 @@ public class VaadinServlet extends HttpServlet implements Constants {
/**
* Create a Vaadin request for a http servlet request. This method can be
* overridden if the Vaadin request should have special properties.
- *
+ *
* @param request
* the original http servlet request
* @return a Vaadin request for the original request
@@ -469,7 +474,7 @@ public class VaadinServlet extends HttpServlet implements Constants {
/**
* Gets a the vaadin service for this servlet.
- *
+ *
* @return the vaadin service
*/
protected VaadinServletService getService() {
@@ -479,7 +484,7 @@ public class VaadinServlet extends HttpServlet implements Constants {
/**
* Check that cookie support is enabled in the browser. Only checks UIDL
* requests.
- *
+ *
* @param requestType
* Type of the request as returned by
* {@link #getRequestType(HttpServletRequest)}
@@ -501,8 +506,7 @@ public class VaadinServlet extends HttpServlet implements Constants {
SystemMessages systemMessages = getService().getSystemMessages(
ServletPortletHelper.findLocale(null, null, request),
request);
- getService().writeStringResponse(
- response,
+ getService().writeStringResponse(response,
JsonConstants.JSON_CONTENT_TYPE,
VaadinService.createCriticalNotificationJSON(
systemMessages.getCookiesDisabledCaption(),
@@ -518,7 +522,7 @@ public class VaadinServlet extends HttpServlet implements Constants {
* Send a notification to client-side widgetset. Used to notify client of
* critical errors, session expiration and more. Server has no knowledge of
* what UI client refers to.
- *
+ *
* @param request
* the HTTP request instance.
* @param response
@@ -537,7 +541,7 @@ public class VaadinServlet extends HttpServlet implements Constants {
* the current page.
* @throws IOException
* if the writing failed due to input/output error.
- *
+ *
* @deprecated As of 7.0. This method is retained only for backwards
* compatibility and for {@link GAEVaadinServlet}.
*/
@@ -581,20 +585,20 @@ public class VaadinServlet extends HttpServlet implements Constants {
/**
* Writes the response in {@code output} using the contentType given in
* {@code contentType} to the provided {@link HttpServletResponse}
- *
+ *
* @param response
* @param contentType
* @param output
* Output to write (UTF-8 encoded)
* @throws IOException
*/
- private void writeResponse(HttpServletResponse response,
- String contentType, String output) throws IOException {
+ private void writeResponse(HttpServletResponse response, String contentType,
+ String output) throws IOException {
response.setContentType(contentType);
final OutputStream out = response.getOutputStream();
// Set the response type
- final PrintWriter outWriter = new PrintWriter(new BufferedWriter(
- new OutputStreamWriter(out, "UTF-8")));
+ final PrintWriter outWriter = new PrintWriter(
+ new BufferedWriter(new OutputStreamWriter(out, "UTF-8")));
outWriter.print(output);
outWriter.flush();
outWriter.close();
@@ -604,12 +608,12 @@ public class VaadinServlet extends HttpServlet implements Constants {
* Gets resource path using different implementations. Required to
* supporting different servlet container implementations (application
* servers).
- *
+ *
* @param servletContext
* @param path
* the resource path.
* @return the resource path.
- *
+ *
* @deprecated As of 7.0. Will likely change or be removed in a future
* version
*/
@@ -637,10 +641,10 @@ public class VaadinServlet extends HttpServlet implements Constants {
* A helper method to strip away characters that might somehow be used for
* XSS attacks. Leaves at least alphanumeric characters intact. Also removes
* e.g. '(' and ')', so values should be safe in javascript too.
- *
+ *
* @param themeName
* @return
- *
+ *
* @deprecated As of 7.0. Will likely change or be removed in a future
* version
*/
@@ -685,7 +689,7 @@ public class VaadinServlet extends HttpServlet implements Constants {
/**
* Returns the default theme. Must never return null.
- *
+ *
* @return
*/
public static String getDefaultTheme() {
@@ -695,7 +699,7 @@ public class VaadinServlet extends HttpServlet implements Constants {
/**
* Check if this is a request for a static resource and, if it is, serve the
* resource to the client.
- *
+ *
* @param request
* @param response
* @return true if a file was served and the request has been handled, false
@@ -733,7 +737,7 @@ public class VaadinServlet extends HttpServlet implements Constants {
/**
* Serve resources from VAADIN directory.
- *
+ *
* @param filename
* The filename to serve. Should always start with /VAADIN/.
* @param request
@@ -755,11 +759,10 @@ public class VaadinServlet extends HttpServlet implements Constants {
return;
} else {
// cannot serve requested file
- getLogger()
- .log(Level.INFO,
- "Requested resource [{0}] not found from filesystem or through class loader."
- + " Add widgetset and/or theme JAR to your classpath or add files to WebContent/VAADIN folder.",
- filename);
+ getLogger().log(Level.INFO,
+ "Requested resource [{0}] not found from filesystem or through class loader."
+ + " Add widgetset and/or theme JAR to your classpath or add files to WebContent/VAADIN folder.",
+ filename);
response.setStatus(HttpServletResponse.SC_NOT_FOUND);
}
return;
@@ -768,10 +771,9 @@ public class VaadinServlet extends HttpServlet implements Constants {
// security check: do not permit navigation out of the VAADIN
// directory
if (!isAllowedVAADINResourceUrl(request, resourceUrl)) {
- getLogger()
- .log(Level.INFO,
- "Requested resource [{0}] not accessible in the VAADIN directory or access to it is forbidden.",
- filename);
+ getLogger().log(Level.INFO,
+ "Requested resource [{0}] not accessible in the VAADIN directory or access to it is forbidden.",
+ filename);
response.setStatus(HttpServletResponse.SC_FORBIDDEN);
return;
}
@@ -782,8 +784,8 @@ public class VaadinServlet extends HttpServlet implements Constants {
cacheControl = "max-age=" + String.valueOf(resourceCacheTime);
}
response.setHeader("Cache-Control", cacheControl);
- response.setDateHeader("Expires", System.currentTimeMillis()
- + (resourceCacheTime * 1000));
+ response.setDateHeader("Expires",
+ System.currentTimeMillis() + (resourceCacheTime * 1000));
// Find the modification timestamp
long lastModifiedTime = 0;
@@ -803,10 +805,9 @@ public class VaadinServlet extends HttpServlet implements Constants {
}
} catch (Exception e) {
// Failed to find out last modified timestamp. Continue without it.
- getLogger()
- .log(Level.FINEST,
- "Failed to find out last modified timestamp. Continuing without it.",
- e);
+ getLogger().log(Level.FINEST,
+ "Failed to find out last modified timestamp. Continuing without it.",
+ e);
} finally {
try {
// Explicitly close the input stream to prevent it
@@ -838,18 +839,18 @@ public class VaadinServlet extends HttpServlet implements Constants {
* default filenames containing ".nocache." return 0, filenames containing
* ".cache." return one year, all other return the value defined in the
* web.xml using resourceCacheTime (defaults to 1 hour).
- *
+ *
* @param filename
* @return cache lifetime for the given filename in seconds
*/
protected int getCacheTime(String filename) {
/*
* GWT conventions:
- *
+ *
* - files containing .nocache. will not be cached.
- *
+ *
* - files containing .cache. will be cached for one year.
- *
+ *
* https://developers.google.com/web-toolkit/doc/latest/
* DevGuideCompilingAndDebugging#perfect_caching
*/
@@ -873,7 +874,7 @@ public class VaadinServlet extends HttpServlet implements Constants {
/**
* Writes the contents of the given resourceUrl in the response. Can be
* overridden to add/modify response headers and similar.
- *
+ *
* @param request
* The request for the resource
* @param response
@@ -899,10 +900,10 @@ public class VaadinServlet extends HttpServlet implements Constants {
} catch (IOException e) {
// NOP: will be still tried with non gzipped version
} catch (Exception e) {
- getLogger().log(
- Level.FINE,
+ getLogger().log(Level.FINE,
"Unexpected exception looking for gzipped version of resource "
- + urlStr, e);
+ + urlStr,
+ e);
}
}
if (is == null) {
@@ -942,13 +943,13 @@ public class VaadinServlet extends HttpServlet implements Constants {
* is served if it exists. It is assumed that the compression method used is
* gzip. If this method returns false or a compressed version is not found,
* the original URL is used.
- *
+ *
* The base implementation of this method returns true if and only if the
* request indicates that the client accepts gzip compressed responses and
* the filename extension of the requested resource is .js, .css, or .html.
- *
+ *
* @since 7.5.0
- *
+ *
* @param request
* the request for the resource
* @param url
@@ -959,10 +960,8 @@ public class VaadinServlet extends HttpServlet implements Constants {
protected boolean allowServePrecompressedResource(
HttpServletRequest request, String url) {
String accept = request.getHeader("Accept-Encoding");
- return accept != null
- && accept.contains("gzip")
- && (url.endsWith(".js") || url.endsWith(".css") || url
- .endsWith(".html"));
+ return accept != null && accept.contains("gzip") && (url.endsWith(".js")
+ || url.endsWith(".css") || url.endsWith(".html"));
}
private void streamContent(HttpServletResponse response, InputStream is)
@@ -978,7 +977,7 @@ public class VaadinServlet extends HttpServlet implements Constants {
/**
* Finds the given resource from the web content folder or using the class
* loader.
- *
+ *
* @since 7.7
* @param filename
* The file to find, starting with a "/"
@@ -1018,10 +1017,9 @@ public class VaadinServlet extends HttpServlet implements Constants {
// security check: do not permit navigation out of the VAADIN
// directory
if (!isAllowedVAADINResourceUrl(request, scssUrl)) {
- getLogger()
- .log(Level.INFO,
- "Requested resource [{0}] not accessible in the VAADIN directory or access to it is forbidden.",
- filename);
+ getLogger().log(Level.INFO,
+ "Requested resource [{0}] not accessible in the VAADIN directory or access to it is forbidden.",
+ filename);
response.setStatus(HttpServletResponse.SC_FORBIDDEN);
// Handled, return true so no further processing is done
@@ -1029,10 +1027,9 @@ public class VaadinServlet extends HttpServlet implements Constants {
}
if (getService().getDeploymentConfiguration().isProductionMode()) {
// This is not meant for production mode.
- getLogger()
- .log(Level.INFO,
- "Request for {0} not handled by sass compiler while in production mode",
- filename);
+ getLogger().log(Level.INFO,
+ "Request for {0} not handled by sass compiler while in production mode",
+ filename);
response.setStatus(HttpServletResponse.SC_NOT_FOUND);
// Handled, return true so no further processing is done
return true;
@@ -1110,10 +1107,9 @@ public class VaadinServlet extends HttpServlet implements Constants {
}
if (scss == null) {
- getLogger()
- .log(Level.WARNING,
- "Scss file {0} exists but ScssStylesheet was not able to find it",
- scssFilename);
+ getLogger().log(Level.WARNING,
+ "Scss file {0} exists but ScssStylesheet was not able to find it",
+ scssFilename);
return null;
}
try {
@@ -1132,19 +1128,19 @@ public class VaadinServlet extends HttpServlet implements Constants {
/**
* Check whether a URL obtained from a classloader refers to a valid static
* resource in the directory VAADIN.
- *
+ *
* Warning: Overriding of this method is not recommended, but is possible to
* support non-default classloaders or servers that may produce URLs
* different from the normal ones. The method prototype may change in the
* future. Care should be taken not to expose class files or other resources
* outside the VAADIN directory if the method is overridden.
- *
+ *
* @param request
* @param resourceUrl
* @return
- *
+ *
* @since 6.6.7
- *
+ *
* @deprecated As of 7.0. Will likely change or be removed in a future
* version
*/
@@ -1162,10 +1158,9 @@ public class VaadinServlet extends HttpServlet implements Constants {
// loader sees it.
if (!resourceUrl.getPath().contains("!/VAADIN/")) {
- getLogger()
- .log(Level.INFO,
- "Blocked attempt to access a JAR entry not starting with /VAADIN/: {0}",
- resourceUrl);
+ getLogger().log(Level.INFO,
+ "Blocked attempt to access a JAR entry not starting with /VAADIN/: {0}",
+ resourceUrl);
return false;
}
getLogger().log(Level.FINE,
@@ -1195,7 +1190,7 @@ public class VaadinServlet extends HttpServlet implements Constants {
* Checks if the browser has an up to date cached version of requested
* resource. Currently the check is performed using the "If-Modified-Since"
* header. Could be expanded if needed.
- *
+ *
* @param request
* The HttpServletRequest from the browser.
* @param resourceLastModifiedTimestamp
@@ -1234,10 +1229,10 @@ public class VaadinServlet extends HttpServlet implements Constants {
}
/**
- *
+ *
* @author Vaadin Ltd
* @since 7.0
- *
+ *
* @deprecated As of 7.0. This is no longer used and only provided for
* backwards compatibility. Each {@link RequestHandler} can
* individually decide whether it wants to handle a request or
@@ -1251,7 +1246,7 @@ public class VaadinServlet extends HttpServlet implements Constants {
/**
* @param request
* @return
- *
+ *
* @deprecated As of 7.0. This is no longer used and only provided for
* backwards compatibility. Each {@link RequestHandler} can
* individually decide whether it wants to handle a request or
@@ -1279,13 +1274,13 @@ public class VaadinServlet extends HttpServlet implements Constants {
}
protected boolean isStaticResourceRequest(HttpServletRequest request) {
- return request.getRequestURI().startsWith(
- request.getContextPath() + "/VAADIN/");
+ return request.getRequestURI()
+ .startsWith(request.getContextPath() + "/VAADIN/");
}
/**
* Remove any heading or trailing "what" from the "string".
- *
+ *
* @param string
* @param what
* @return
@@ -1304,7 +1299,7 @@ public class VaadinServlet extends HttpServlet implements Constants {
/**
* Write a redirect response to the main page of the application.
- *
+ *
* @param request
* @param response
* @throws IOException
@@ -1319,32 +1314,33 @@ public class VaadinServlet extends HttpServlet implements Constants {
/**
* Gets the current application URL from request.
- *
+ *
* @param request
* the HTTP request.
* @throws MalformedURLException
* if the application is denied access to the persistent data
* store represented by the given URL.
- *
+ *
* @deprecated As of 7.0. Will likely change or be removed in a future
* version
*/
@Deprecated
protected URL getApplicationUrl(HttpServletRequest request)
throws MalformedURLException {
- final URL reqURL = new URL(
- (request.isSecure() ? "https://" : "http://")
- + request.getServerName()
- + ((request.isSecure() && request.getServerPort() == 443)
- || (!request.isSecure() && request
- .getServerPort() == 80) ? "" : ":"
- + request.getServerPort())
- + request.getRequestURI());
+ final URL reqURL = new URL((request.isSecure() ? "https://" : "http://")
+ + request.getServerName()
+ + ((request.isSecure() && request.getServerPort() == 443)
+ || (!request.isSecure()
+ && request.getServerPort() == 80) ? ""
+ : ":" + request.getServerPort())
+ + request.getRequestURI());
String servletPath = "";
- if (request.getAttribute("javax.servlet.include.servlet_path") != null) {
+ if (request
+ .getAttribute("javax.servlet.include.servlet_path") != null) {
// this is an include request
- servletPath = request.getAttribute(
- "javax.servlet.include.context_path").toString()
+ servletPath = request
+ .getAttribute("javax.servlet.include.context_path")
+ .toString()
+ request
.getAttribute("javax.servlet.include.servlet_path");
@@ -1362,7 +1358,7 @@ public class VaadinServlet extends HttpServlet implements Constants {
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.GenericServlet#destroy()
*/
@Override
@@ -1375,10 +1371,9 @@ public class VaadinServlet extends HttpServlet implements Constants {
String scssFileName = cacheEntry.getScssFileName();
if (scssFileName == null) {
if (!scssCompileWarWarningEmitted) {
- getLogger()
- .warning(
- "Could not persist scss cache because no real file was found for the compiled scss file. "
- + "This might happen e.g. if serving the scss file directly from a .war file.");
+ getLogger().warning(
+ "Could not persist scss cache because no real file was found for the compiled scss file. "
+ + "This might happen e.g. if serving the scss file directly from a .war file.");
scssCompileWarWarningEmitted = true;
}
return;
@@ -1390,7 +1385,8 @@ public class VaadinServlet extends HttpServlet implements Constants {
String cacheEntryJsonString = cacheEntry.asJson();
try {
- writeFile(cacheEntryJsonString, cacheFile, Charset.forName("UTF-8"));
+ writeFile(cacheEntryJsonString, cacheFile,
+ Charset.forName("UTF-8"));
} catch (IOException e) {
getLogger().log(Level.WARNING,
"Error persisting scss cache " + cacheFile, e);
@@ -1430,16 +1426,17 @@ public class VaadinServlet extends HttpServlet implements Constants {
}
private static File getScssCacheFile(File scssFile) {
- return new File(scssFile.getParentFile(), scssFile.getName() + ".cache");
+ return new File(scssFile.getParentFile(),
+ scssFile.getName() + ".cache");
}
/**
- * Escapes characters to html entities. An exception is made for some
- * "safe characters" to keep the text somewhat readable.
- *
+ * Escapes characters to html entities. An exception is made for some "safe
+ * characters" to keep the text somewhat readable.
+ *
* @param unsafe
* @return a safe string to be added inside an html tag
- *
+ *
* @deprecated As of 7.0. Will likely change or be removed in a future
* version
*/
diff --git a/server/src/main/java/com/vaadin/server/VaadinServletRequest.java b/server/src/main/java/com/vaadin/server/VaadinServletRequest.java
index c68eefedb1..9aec546cba 100644
--- a/server/src/main/java/com/vaadin/server/VaadinServletRequest.java
+++ b/server/src/main/java/com/vaadin/server/VaadinServletRequest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,21 +22,21 @@ import javax.servlet.http.HttpSession;
/**
* Wrapper for {@link HttpServletRequest}.
- *
+ *
* @author Vaadin Ltd.
* @since 7.0
- *
+ *
* @see VaadinRequest
* @see VaadinServletResponse
*/
-public class VaadinServletRequest extends HttpServletRequestWrapper implements
- VaadinRequest {
+public class VaadinServletRequest extends HttpServletRequestWrapper
+ implements VaadinRequest {
private final VaadinServletService vaadinService;
/**
* Wraps a http servlet request and associates with a vaadin service
- *
+ *
* @param request
* the http servlet request to wrap
* @param vaadinService
@@ -65,7 +65,7 @@ public class VaadinServletRequest extends HttpServletRequestWrapper implements
/**
* Gets the original, unwrapped HTTP servlet request.
- *
+ *
* @return the servlet request
*/
public HttpServletRequest getHttpServletRequest() {
diff --git a/server/src/main/java/com/vaadin/server/VaadinServletResponse.java b/server/src/main/java/com/vaadin/server/VaadinServletResponse.java
index fd688a594c..74f522b777 100644
--- a/server/src/main/java/com/vaadin/server/VaadinServletResponse.java
+++ b/server/src/main/java/com/vaadin/server/VaadinServletResponse.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,21 +21,21 @@ import javax.servlet.http.HttpServletResponseWrapper;
/**
* Wrapper for {@link HttpServletResponse}.
- *
+ *
* @author Vaadin Ltd.
* @since 7.0
- *
+ *
* @see VaadinResponse
* @see VaadinServletRequest
*/
-public class VaadinServletResponse extends HttpServletResponseWrapper implements
- VaadinResponse {
+public class VaadinServletResponse extends HttpServletResponseWrapper
+ implements VaadinResponse {
private VaadinServletService vaadinService;
/**
* Wraps a http servlet response and an associated vaadin service
- *
+ *
* @param response
* the http servlet response to wrap
* @param vaadinService
@@ -49,7 +49,7 @@ public class VaadinServletResponse extends HttpServletResponseWrapper implements
/**
* Gets the original unwrapped <code>HttpServletResponse</code>
- *
+ *
* @return the unwrapped response
*/
public HttpServletResponse getHttpServletResponse() {
@@ -68,10 +68,10 @@ public class VaadinServletResponse extends HttpServletResponseWrapper implements
response.setHeader("Pragma", "no-cache");
response.setDateHeader("Expires", 0);
} else {
- response.setHeader("Cache-Control", "max-age=" + milliseconds
- / 1000);
- response.setDateHeader("Expires", System.currentTimeMillis()
- + milliseconds);
+ response.setHeader("Cache-Control",
+ "max-age=" + milliseconds / 1000);
+ response.setDateHeader("Expires",
+ System.currentTimeMillis() + milliseconds);
// Required to apply caching in some Tomcats
response.setHeader("Pragma", "cache");
}
diff --git a/server/src/main/java/com/vaadin/server/VaadinServletService.java b/server/src/main/java/com/vaadin/server/VaadinServletService.java
index 7025d5f491..5091aac9a4 100644
--- a/server/src/main/java/com/vaadin/server/VaadinServletService.java
+++ b/server/src/main/java/com/vaadin/server/VaadinServletService.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -56,10 +56,9 @@ public class VaadinServletService extends VaadinService {
// Atmosphere init failed. Push won't work but we don't throw a
// service exception as we don't want to prevent non-push
// applications from working
- getLogger()
- .log(Level.WARNING,
- "Error initializing Atmosphere. Push will not work.",
- e);
+ getLogger().log(Level.WARNING,
+ "Error initializing Atmosphere. Push will not work.",
+ e);
}
}
return handlers;
@@ -67,7 +66,7 @@ public class VaadinServletService extends VaadinService {
/**
* Retrieves a reference to the servlet associated with this service.
- *
+ *
* @return A reference to the VaadinServlet this service is using
*/
public VaadinServlet getServlet() {
@@ -100,7 +99,7 @@ public class VaadinServletService extends VaadinService {
/**
* Gets a relative path that cancels the provided path. This essentially
* adds one .. for each part of the path to cancel.
- *
+ *
* @param pathToCancel
* the path that should be canceled
* @return a relative path that cancels out the provided path segment
@@ -118,8 +117,8 @@ public class VaadinServletService extends VaadinService {
@Override
public String getConfiguredWidgetset(VaadinRequest request) {
- return getDeploymentConfiguration().getWidgetset(
- VaadinServlet.DEFAULT_WIDGETSET);
+ return getDeploymentConfiguration()
+ .getWidgetset(VaadinServlet.DEFAULT_WIDGETSET);
}
@Override
@@ -140,8 +139,8 @@ public class VaadinServletService extends VaadinService {
@Override
public File getBaseDirectory() {
- final String realPath = VaadinServlet.getResourcePath(
- servlet.getServletContext(), "/");
+ final String realPath = VaadinServlet
+ .getResourcePath(servlet.getServletContext(), "/");
if (realPath == null) {
return null;
}
@@ -172,8 +171,8 @@ public class VaadinServletService extends VaadinService {
&& !ServletPortletHelper.isFileUploadRequest(request)
&& !ServletPortletHelper.isHeartbeatRequest(request)
&& !ServletPortletHelper.isPublishedFileRequest(request)
- && !ServletPortletHelper.isUIDLRequest(request) && !ServletPortletHelper
- .isPushRequest(request));
+ && !ServletPortletHelper.isUIDLRequest(request)
+ && !ServletPortletHelper.isPushRequest(request));
}
@Override
@@ -211,10 +210,9 @@ public class VaadinServletService extends VaadinService {
// security check: do not permit navigation out of the VAADIN
// directory
if (!servlet.isAllowedVAADINResourceUrl(null, resourceUrl)) {
- throw new IOException(
- String.format(
- "Requested resource [{0}] not accessible in the VAADIN directory or access to it is forbidden.",
- filename));
+ throw new IOException(String.format(
+ "Requested resource [{0}] not accessible in the VAADIN directory or access to it is forbidden.",
+ filename));
}
return resourceUrl.openStream();
@@ -228,8 +226,8 @@ public class VaadinServletService extends VaadinService {
Class<? extends UI> uiClass) {
String appId = null;
try {
- URL appUrl = getServlet().getApplicationUrl(
- (VaadinServletRequest) request);
+ URL appUrl = getServlet()
+ .getApplicationUrl((VaadinServletRequest) request);
appId = appUrl.getPath();
} catch (MalformedURLException e) {
// Just ignore problem here
diff --git a/server/src/main/java/com/vaadin/server/VaadinSession.java b/server/src/main/java/com/vaadin/server/VaadinSession.java
index 304dd4bec6..b0a99c1de9 100644
--- a/server/src/main/java/com/vaadin/server/VaadinSession.java
+++ b/server/src/main/java/com/vaadin/server/VaadinSession.java
@@ -115,7 +115,7 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable {
* deadlocks unless implemented very carefully. get(long, TimeUnit)
* does not have the same detection since a sensible timeout should
* avoid completely locking up the application.
- *
+ *
* Even though no deadlock could occur after the runnable has been
* run, the check is always done as the deterministic behavior makes
* it easier to detect potential problems.
@@ -204,9 +204,9 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable {
private static final Method BOOTSTRAP_FRAGMENT_METHOD = ReflectTools
.findMethod(BootstrapListener.class, "modifyBootstrapFragment",
BootstrapFragmentResponse.class);
- private static final Method BOOTSTRAP_PAGE_METHOD = ReflectTools
- .findMethod(BootstrapListener.class, "modifyBootstrapPage",
- BootstrapPageResponse.class);
+ private static final Method BOOTSTRAP_PAGE_METHOD = ReflectTools.findMethod(
+ BootstrapListener.class, "modifyBootstrapPage",
+ BootstrapPageResponse.class);
/**
* Configuration for the session.
@@ -299,17 +299,17 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable {
// closing
// Notify the service
if (service == null) {
- getLogger()
- .warning(
- "A VaadinSession instance not associated to any service is getting unbound. "
- + "Session destroy events will not be fired and UIs in the session will not get detached. "
- + "This might happen if a session is deserialized but never used before it expires.");
+ getLogger().warning(
+ "A VaadinSession instance not associated to any service is getting unbound. "
+ + "Session destroy events will not be fired and UIs in the session will not get detached. "
+ + "This might happen if a session is deserialized but never used before it expires.");
} else if (VaadinService.getCurrentRequest() != null
&& getCurrent() == this) {
assert hasLock();
// Ignore if the session is being moved to a different backing
// session or if GAEVaadinServlet is doing its normal cleanup.
- if (getAttribute(VaadinService.PRESERVE_UNBOUND_SESSION_ATTRIBUTE) == Boolean.TRUE) {
+ if (getAttribute(
+ VaadinService.PRESERVE_UNBOUND_SESSION_ATTRIBUTE) == Boolean.TRUE) {
return;
}
@@ -506,7 +506,8 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable {
* Updates the transient session lock from VaadinService.
*/
private void refreshLock() {
- assert lock == null || lock == service.getSessionLock(session) : "Cannot change the lock from one instance to another";
+ assert lock == null || lock == service.getSessionLock(
+ session) : "Cannot change the lock from one instance to another";
assert hasLock(service, session);
lock = service.getSessionLock(session);
}
@@ -892,7 +893,8 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable {
*
* @since 7.0.0
*/
- public GlobalResourceHandler getGlobalResourceHandler(boolean createOnDemand) {
+ public GlobalResourceHandler getGlobalResourceHandler(
+ boolean createOnDemand) {
assert hasLock();
if (globalResourceHandler == null && createOnDemand) {
globalResourceHandler = new GlobalResourceHandler();
@@ -990,7 +992,8 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable {
getService().runPendingAccessTasks(this);
for (UI ui : getUIs()) {
- if (ui.getPushConfiguration().getPushMode() == PushMode.AUTOMATIC) {
+ if (ui.getPushConfiguration()
+ .getPushMode() == PushMode.AUTOMATIC) {
Map<Class<?>, CurrentInstance> oldCurrent = CurrentInstance
.setCurrent(ui);
try {
@@ -1052,7 +1055,8 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable {
* <code>null</code> clears the stored value.
* <p>
* The fully qualified name of the type is used as the name when storing the
- * value. The outcome of calling this method is thus the same as if calling<br />
+ * value. The outcome of calling this method is thus the same as if
+ * calling<br />
* <br />
* <code>setAttribute(type.getName(), value);</code>
*
@@ -1071,9 +1075,8 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable {
throw new IllegalArgumentException("type can not be null");
}
if (value != null && !type.isInstance(value)) {
- throw new IllegalArgumentException("value of type "
- + type.getName() + " expected but got "
- + value.getClass().getName());
+ throw new IllegalArgumentException("value of type " + type.getName()
+ + " expected but got " + value.getClass().getName());
}
setAttribute(type.getName(), value);
}
@@ -1104,7 +1107,8 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable {
* <code>null</code> is returned.
* <p>
* The fully qualified name of the type is used as the name when getting the
- * value. The outcome of calling this method is thus the same as if calling<br />
+ * value. The outcome of calling this method is thus the same as if
+ * calling<br />
* <br />
* <code>getAttribute(type.getName());</code>
*
@@ -1164,8 +1168,8 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable {
Integer previousUiId = embedIdMap.put(embedId, uiId);
if (previousUiId != null) {
UI previousUi = uIs.get(previousUiId);
- assert previousUi != null
- && embedId.equals(previousUi.getEmbedId()) : "UI id map and embed id map not in sync";
+ assert previousUi != null && embedId.equals(previousUi
+ .getEmbedId()) : "UI id map and embed id map not in sync";
// Will fire cleanup events at the end of the request handling.
previousUi.close();
@@ -1409,8 +1413,8 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable {
* Override default deserialization logic to account for transient
* {@link #pendingAccessQueue}.
*/
- private void readObject(ObjectInputStream stream) throws IOException,
- ClassNotFoundException {
+ private void readObject(ObjectInputStream stream)
+ throws IOException, ClassNotFoundException {
Map<Class<?>, CurrentInstance> old = CurrentInstance.setCurrent(this);
try {
stream.defaultReadObject();
@@ -1465,7 +1469,7 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable {
* date.
* <p>
* Called internally by the framework.
- *
+ *
* @since 7.6
* @param wrappedSession
* the session this VaadinSession is stored in
diff --git a/server/src/main/java/com/vaadin/server/VariableOwner.java b/server/src/main/java/com/vaadin/server/VariableOwner.java
index 87a820e8b7..5588a40b29 100644
--- a/server/src/main/java/com/vaadin/server/VariableOwner.java
+++ b/server/src/main/java/com/vaadin/server/VariableOwner.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ import com.vaadin.ui.LegacyComponent;
* application, and the components owning those variables may then process those
* changes.
* </p>
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
* @deprecated As of 7.0. Only provided to ease porting of Vaadin 6 components.
@@ -42,7 +42,7 @@ public interface VariableOwner extends Serializable {
/**
* Called when one or more variables handled by the implementing class are
* changed.
- *
+ *
* @param source
* the Source of the variable change. This is the origin of the
* event. For example in Web Adapter this is the request.
@@ -56,7 +56,7 @@ public interface VariableOwner extends Serializable {
* Tests if the variable owner is enabled or not. The terminal should not
* send any variable changes to disabled variable owners.
* </p>
- *
+ *
* @return <code>true</code> if the variable owner is enabled,
* <code>false</code> if not
*/
@@ -68,7 +68,7 @@ public interface VariableOwner extends Serializable {
* immediate mode means that all variable changes are required to be sent
* back from the terminal immediately when they occur.
* </p>
- *
+ *
* <p>
* <strong>Note:</strong> <code>VariableOwner</code> does not include a set-
* method for the immediateness property. This is because not all
@@ -76,7 +76,7 @@ public interface VariableOwner extends Serializable {
* never in the immediate mode, thus they always return <code>false</code>
* in {@link #isImmediate()}.
* </p>
- *
+ *
* @return <code>true</code> if the component is in immediate mode,
* <code>false</code> if not.
*/
diff --git a/server/src/main/java/com/vaadin/server/ViewportGenerator.java b/server/src/main/java/com/vaadin/server/ViewportGenerator.java
index 33cc1341af..852b2b55dc 100644
--- a/server/src/main/java/com/vaadin/server/ViewportGenerator.java
+++ b/server/src/main/java/com/vaadin/server/ViewportGenerator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,17 +19,17 @@ import java.io.Serializable;
/**
* Callback for generating a viewport tag content based on a request.
- *
+ *
* @see ViewportGenerator
- *
+ *
* @since 7.4
- *
+ *
* @author Vaadin Ltd
*/
public interface ViewportGenerator extends Serializable {
/**
* Generates a viewport tag based on a request.
- *
+ *
* @param request
* the request for which to generate a viewport tag
* @return the viewport tag content
diff --git a/server/src/main/java/com/vaadin/server/WebBrowser.java b/server/src/main/java/com/vaadin/server/WebBrowser.java
index 5b7d795793..cb2f7686d9 100644
--- a/server/src/main/java/com/vaadin/server/WebBrowser.java
+++ b/server/src/main/java/com/vaadin/server/WebBrowser.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,7 +27,7 @@ import com.vaadin.shared.VBrowserDetails;
* Class that provides information about the web browser the user is using.
* Provides information such as browser name and version, screen resolution and
* IP address.
- *
+ *
* @author Vaadin Ltd.
*/
public class WebBrowser implements Serializable {
@@ -50,7 +50,7 @@ public class WebBrowser implements Serializable {
/**
* Gets the height of the screen in pixels. This is the full screen
* resolution and not the height available for the application.
- *
+ *
* @return the height of the screen in pixels.
*/
public int getScreenHeight() {
@@ -60,7 +60,7 @@ public class WebBrowser implements Serializable {
/**
* Gets the width of the screen in pixels. This is the full screen
* resolution and not the width available for the application.
- *
+ *
* @return the width of the screen in pixels.
*/
public int getScreenWidth() {
@@ -69,7 +69,7 @@ public class WebBrowser implements Serializable {
/**
* Get the browser user-agent string.
- *
+ *
* @return The raw browser userAgent string
*/
public String getBrowserApplication() {
@@ -79,7 +79,7 @@ public class WebBrowser implements Serializable {
/**
* Gets the IP-address of the web browser. If the application is running
* inside a portlet, this method will return null.
- *
+ *
* @return IP-address in 1.12.123.123 -format
*/
public String getAddress() {
@@ -98,7 +98,7 @@ public class WebBrowser implements Serializable {
/**
* Tests whether the user is using Firefox.
- *
+ *
* @return true if the user is using Firefox, false if the user is not using
* Firefox or if no information on the browser is present
*/
@@ -112,7 +112,7 @@ public class WebBrowser implements Serializable {
/**
* Tests whether the user is using Internet Explorer.
- *
+ *
* @return true if the user is using Internet Explorer, false if the user is
* not using Internet Explorer or if no information on the browser
* is present
@@ -127,7 +127,7 @@ public class WebBrowser implements Serializable {
/**
* Tests whether the user is using Edge.
- *
+ *
* @since 7.5.3
* @return true if the user is using Edge, false if the user is not using
* Edge or if no information on the browser is present
@@ -142,7 +142,7 @@ public class WebBrowser implements Serializable {
/**
* Tests whether the user is using Safari.
- *
+ *
* @return true if the user is using Safari, false if the user is not using
* Safari or if no information on the browser is present
*/
@@ -156,7 +156,7 @@ public class WebBrowser implements Serializable {
/**
* Tests whether the user is using Opera.
- *
+ *
* @return true if the user is using Opera, false if the user is not using
* Opera or if no information on the browser is present
*/
@@ -170,7 +170,7 @@ public class WebBrowser implements Serializable {
/**
* Tests whether the user is using Chrome.
- *
+ *
* @return true if the user is using Chrome, false if the user is not using
* Chrome or if no information on the browser is present
*/
@@ -184,7 +184,7 @@ public class WebBrowser implements Serializable {
/**
* Tests whether the user is using Chrome Frame.
- *
+ *
* @return true if the user is using Chrome Frame, false if the user is not
* using Chrome or if no information on the browser is present
*/
@@ -198,7 +198,7 @@ public class WebBrowser implements Serializable {
/**
* Tests whether the user's browser is Chrome Frame capable.
- *
+ *
* @return true if the user can use Chrome Frame, false if the user can not
* or if no information on the browser is present
*/
@@ -212,12 +212,12 @@ public class WebBrowser implements Serializable {
/**
* Gets the major version of the browser the user is using.
- *
+ *
* <p>
* Note that Internet Explorer in IE7 compatibility mode might return 8 in
* some cases even though it should return 7.
* </p>
- *
+ *
* @return The major version of the browser or -1 if not known.
*/
public int getBrowserMajorVersion() {
@@ -230,9 +230,9 @@ public class WebBrowser implements Serializable {
/**
* Gets the minor version of the browser the user is using.
- *
+ *
* @see #getBrowserMajorVersion()
- *
+ *
* @return The minor version of the browser or -1 if not known.
*/
public int getBrowserMinorVersion() {
@@ -245,7 +245,7 @@ public class WebBrowser implements Serializable {
/**
* Tests whether the user is using Linux.
- *
+ *
* @return true if the user is using Linux, false if the user is not using
* Linux or if no information on the browser is present
*/
@@ -255,7 +255,7 @@ public class WebBrowser implements Serializable {
/**
* Tests whether the user is using Mac OS X.
- *
+ *
* @return true if the user is using Mac OS X, false if the user is not
* using Mac OS X or if no information on the browser is present
*/
@@ -265,7 +265,7 @@ public class WebBrowser implements Serializable {
/**
* Tests whether the user is using Windows.
- *
+ *
* @return true if the user is using Windows, false if the user is not using
* Windows or if no information on the browser is present
*/
@@ -275,7 +275,7 @@ public class WebBrowser implements Serializable {
/**
* Tests whether the user is using Windows Phone.
- *
+ *
* @return true if the user is using Windows Phone, false if the user is not
* using Windows Phone or if no information on the browser is
* present
@@ -287,7 +287,7 @@ public class WebBrowser implements Serializable {
/**
* Tests if the browser is run on Android.
- *
+ *
* @return true if run on Android false if the user is not using Android or
* if no information on the browser is present
*/
@@ -297,7 +297,7 @@ public class WebBrowser implements Serializable {
/**
* Tests if the browser is run in iOS.
- *
+ *
* @return true if run in iOS false if the user is not using iOS or if no
* information on the browser is present
*/
@@ -307,7 +307,7 @@ public class WebBrowser implements Serializable {
/**
* Tests if the browser is run on IPhone.
- *
+ *
* @return true if run on IPhone false if the user is not using IPhone or if
* no information on the browser is present
* @since 7.3.3
@@ -318,7 +318,7 @@ public class WebBrowser implements Serializable {
/**
* Tests if the browser is run on IPad.
- *
+ *
* @return true if run on IPad false if the user is not using IPad or if no
* information on the browser is present
* @since 7.3.3
@@ -332,7 +332,7 @@ public class WebBrowser implements Serializable {
* This includes possible daylight saving adjustments, to figure out which
* TimeZone the user actually might be in, see
* {@link #getRawTimezoneOffset()}.
- *
+ *
* @see WebBrowser#getRawTimezoneOffset()
* @return timezone offset in milliseconds, 0 if not available
*/
@@ -354,7 +354,7 @@ public class WebBrowser implements Serializable {
* currently have daylight saving time, or in a zone that never has daylight
* saving time.
* </p>
- *
+ *
* @return timezone offset in milliseconds excluding DST, 0 if not available
*/
public int getRawTimezoneOffset() {
@@ -364,7 +364,7 @@ public class WebBrowser implements Serializable {
/**
* Returns the offset in milliseconds between the browser's GMT TimeZone and
* DST.
- *
+ *
* @return the number of milliseconds that the TimeZone shifts when DST is
* in effect
*/
@@ -375,7 +375,7 @@ public class WebBrowser implements Serializable {
/**
* Returns whether daylight saving time (DST) is currently in effect in the
* region of the browser or not.
- *
+ *
* @return true if the browser resides at a location that currently is in
* DST
*/
@@ -391,7 +391,7 @@ public class WebBrowser implements Serializable {
* <p>
* To get the actual date and time shown in the end users computer, you can
* do something like:
- *
+ *
* <pre>
* WebBrowser browser = ...;
* SimpleTimeZone timeZone = new SimpleTimeZone(browser.getTimezoneOffset(), "Fake client time zone");
@@ -399,7 +399,7 @@ public class WebBrowser implements Serializable {
* format.setTimeZone(timeZone);
* myLabel.setValue(format.format(browser.getCurrentDate()));
* </pre>
- *
+ *
* @return the current date and time of the browser.
* @see #isDSTInEffect()
* @see #getDSTSavings()
@@ -419,7 +419,7 @@ public class WebBrowser implements Serializable {
/**
* For internal use by VaadinServlet/VaadinPortlet only. Updates all
* properties in the class according to the given information.
- *
+ *
* @param sw
* Screen width
* @param sh
@@ -489,7 +489,7 @@ public class WebBrowser implements Serializable {
/**
* For internal use by VaadinServlet/VaadinPortlet only. Updates all
* properties in the class according to the given information.
- *
+ *
* @param request
* the Vaadin request to read the information from
*/
@@ -508,8 +508,7 @@ public class WebBrowser implements Serializable {
if (request.getParameter("v-sw") != null) {
updateClientSideDetails(request.getParameter("v-sw"),
- request.getParameter("v-sh"),
- request.getParameter("v-tzo"),
+ request.getParameter("v-sh"), request.getParameter("v-tzo"),
request.getParameter("v-rtzo"),
request.getParameter("v-dstd"),
request.getParameter("v-dston"),
@@ -522,11 +521,11 @@ public class WebBrowser implements Serializable {
* Checks if the browser is so old that it simply won't work with a Vaadin
* application. Can be used to redirect to an alternative page, show
* alternative content or similar.
- *
+ *
* When this method returns true chances are very high that the browser
* won't work and it does not make sense to direct the user to the Vaadin
* application.
- *
+ *
* @return true if the browser won't work, false if not the browser is
* supported or might work
*/
diff --git a/server/src/main/java/com/vaadin/server/WidgetsetInfoImpl.java b/server/src/main/java/com/vaadin/server/WidgetsetInfoImpl.java
index a887b0b7ac..373bc05b4c 100644
--- a/server/src/main/java/com/vaadin/server/WidgetsetInfoImpl.java
+++ b/server/src/main/java/com/vaadin/server/WidgetsetInfoImpl.java
@@ -24,8 +24,8 @@ package com.vaadin.server;
* BootstrapHandler.
* <p>
* This class is intended primarily for internal use. It is recommended to
- * implement WidgetsetInfo directly rather than extending or using this
- * class outside the framework, and this class is subject to changes.
+ * implement WidgetsetInfo directly rather than extending or using this class
+ * outside the framework, and this class is subject to changes.
*
* @since 7.7
*/
diff --git a/server/src/main/java/com/vaadin/server/WrappedHttpSession.java b/server/src/main/java/com/vaadin/server/WrappedHttpSession.java
index db4318e37a..45eb18faa1 100644
--- a/server/src/main/java/com/vaadin/server/WrappedHttpSession.java
+++ b/server/src/main/java/com/vaadin/server/WrappedHttpSession.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import javax.servlet.http.HttpSession;
/**
* Wrapper for {@link HttpSession}.
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
* @see WrappedSession
@@ -36,7 +36,7 @@ public class WrappedHttpSession implements WrappedSession {
/**
* Creates a new wrapped http session.
- *
+ *
* @param session
* the http session to wrap.
*/
@@ -61,7 +61,7 @@ public class WrappedHttpSession implements WrappedSession {
/**
* Gets the wrapped {@link HttpSession}.
- *
+ *
* @return the wrapped http session
*/
public HttpSession getHttpSession() {
diff --git a/server/src/main/java/com/vaadin/server/WrappedPortletSession.java b/server/src/main/java/com/vaadin/server/WrappedPortletSession.java
index 9f0f1ac10f..fa7dbe7f41 100644
--- a/server/src/main/java/com/vaadin/server/WrappedPortletSession.java
+++ b/server/src/main/java/com/vaadin/server/WrappedPortletSession.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ import javax.portlet.PortletSession;
/**
* Wrapper for {@link PortletSession}.
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
* @see WrappedSession
@@ -33,7 +33,7 @@ public class WrappedPortletSession implements WrappedSession {
/**
* Creates a new wrapped portlet session.
- *
+ *
* @param session
* the portlet session to wrap.
*/
@@ -68,11 +68,11 @@ public class WrappedPortletSession implements WrappedSession {
* scope is unknown to the container.
* @exception java.lang.IllegalArgumentException
* if name is <code>null</code>.
- *
+ *
* @see PortletSession#getAttribute(String, int)
* @see PortletSession#PORTLET_SCOPE
* @see PortletSession#APPLICATION_SCOPE
- *
+ *
* @since 7.6
*/
public Object getAttribute(String name, int scope) {
@@ -108,11 +108,11 @@ public class WrappedPortletSession implements WrappedSession {
* @exception java.lang.IllegalArgumentException
* if name is <code>null</code> or scope is unknown to the
* container.
- *
+ *
* @see PortletSession#setAttribute(String, Object, int)
* @see PortletSession#PORTLET_SCOPE
* @see PortletSession#APPLICATION_SCOPE
- *
+ *
* @since 7.6
*/
public void setAttribute(String name, Object value, int scope) {
@@ -121,7 +121,7 @@ public class WrappedPortletSession implements WrappedSession {
/**
* Gets the wrapped {@link PortletSession}.
- *
+ *
* @return the wrapped portlet session
*/
public PortletSession getPortletSession() {
@@ -136,19 +136,19 @@ public class WrappedPortletSession implements WrappedSession {
/**
* Gets the current set of attribute names bound to this session in the
* given scope.
- *
+ *
* @param scope
* session scope of the attribute names
* @return an unmodifiable set of the current attribute names in the given
* scope
- *
+ *
* @see PortletSession#getAttributeNames()
- *
+ *
* @since 7.6
*/
public Set<String> getAttributeNames(int scope) {
- return WrappedHttpSession.enumerationToSet(session
- .getAttributeNames(scope));
+ return WrappedHttpSession
+ .enumerationToSet(session.getAttributeNames(scope));
}
@Override
@@ -185,7 +185,7 @@ public class WrappedPortletSession implements WrappedSession {
* Removes the object bound with the specified name and the given scope from
* this session. If the session does not have an object bound with the
* specified name, this method does nothing.
- *
+ *
* @param name
* the name of the object to be removed from this session
* @param scope
@@ -199,7 +199,7 @@ public class WrappedPortletSession implements WrappedSession {
* @see PortletSession#removeAttribute(String, int)
* @see PortletSession#PORTLET_SCOPE
* @see PortletSession#APPLICATION_SCOPE
- *
+ *
* @since 7.6
*/
public void removeAttribute(String name, int scope) {
diff --git a/server/src/main/java/com/vaadin/server/WrappedSession.java b/server/src/main/java/com/vaadin/server/WrappedSession.java
index b839e5d87a..b2b74a64e1 100644
--- a/server/src/main/java/com/vaadin/server/WrappedSession.java
+++ b/server/src/main/java/com/vaadin/server/WrappedSession.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,8 +25,8 @@ import javax.servlet.http.HttpSession;
/**
* A generic session, wrapping a more specific session implementation, e.g.
* {@link HttpSession} or {@link PortletSession}.
- *
- *
+ *
+ *
* @author Vaadin Ltd
* @version @VERSION@
* @since 7.0.0
@@ -35,10 +35,10 @@ public interface WrappedSession extends Serializable {
/**
* Returns the maximum time interval, in seconds, that this session will be
* kept open between client accesses.
- *
+ *
* @return an integer specifying the number of seconds this session remains
* open between client requests
- *
+ *
* @see javax.servlet.http.HttpSession#getMaxInactiveInterval()
* @see javax.portlet.PortletSession#getMaxInactiveInterval()
*/
@@ -46,12 +46,12 @@ public interface WrappedSession extends Serializable {
/**
* Gets an attribute from this session.
- *
+ *
* @param name
* the name of the attribute
* @return the attribute value, or <code>null</code> if the attribute is not
* defined in the session
- *
+ *
* @see javax.servlet.http.HttpSession#getAttribute(String)
* @see javax.portlet.PortletSession#getAttribute(String)
*/
@@ -59,12 +59,12 @@ public interface WrappedSession extends Serializable {
/**
* Saves an attribute value in this session.
- *
+ *
* @param name
* the name of the attribute
* @param value
* the attribute value
- *
+ *
* @see javax.servlet.http.HttpSession#setAttribute(String, Object)
* @see javax.portlet.PortletSession#setAttribute(String, Object)
*/
@@ -72,9 +72,9 @@ public interface WrappedSession extends Serializable {
/**
* Gets the current set of attribute names stored in this session.
- *
+ *
* @return an unmodifiable set of the current attribute names
- *
+ *
* @see HttpSession#getAttributeNames()
* @see PortletSession#getAttributeNames()
*/
@@ -82,7 +82,7 @@ public interface WrappedSession extends Serializable {
/**
* Invalidates this session then unbinds any objects bound to it.
- *
+ *
* @see HttpSession#invalidate()
* @see PortletSession#invalidate()
*/
@@ -90,9 +90,9 @@ public interface WrappedSession extends Serializable {
/**
* Gets a string with a unique identifier for the session.
- *
+ *
* @return a unique session id string
- *
+ *
* @see HttpSession#getId()
* @see PortletSession#getId()
*/
@@ -101,10 +101,10 @@ public interface WrappedSession extends Serializable {
/**
* Returns the time when this session was created, measured in milliseconds
* since midnight January 1, 1970 GMT.
- *
+ *
* @return a long specifying when this session was created, expressed in
* milliseconds since 1/1/1970 GMT
- *
+ *
* @throws IllegalStateException
* if this method is called on an invalidated session
* @see HttpSession#getCreationTime()
@@ -119,14 +119,14 @@ public interface WrappedSession extends Serializable {
* <p>
* Actions that your application takes, such as getting or setting a value
* associated with the session, do not affect the access time.
- *
+ *
* @return a long representing the last time the client sent a request
* associated with this session, expressed in milliseconds since
* 1/1/1970 GMT
- *
+ *
* @throws IllegalStateException
* if this method is called on an invalidated session
- *
+ *
* @see HttpSession#getLastAccessedTime()
* @see PortletSession#getLastAccessedTime()
*/
@@ -137,7 +137,7 @@ public interface WrappedSession extends Serializable {
* client chooses not to join the session. For example, if the server used
* only cookie-based sessions, and the client had disabled the use of
* cookies, then a session would be new on each request.
- *
+ *
* @return true if the server has created a session, but the client has not
* yet joined
* @throws IllegalStateException
@@ -151,7 +151,7 @@ public interface WrappedSession extends Serializable {
* Removes the object bound with the specified name from this session. If
* the session does not have an object bound with the specified name, this
* method does nothing.
- *
+ *
* @param name
* the name of the object to remove from this session
* @throws IllegalStateException
@@ -165,7 +165,7 @@ public interface WrappedSession extends Serializable {
* Specifies the time, in seconds, between client requests before the
* servlet container will invalidate this session. A negative time indicates
* the session should never timeout.
- *
+ *
* @param interval
* An integer specifying the number of seconds
* @see HttpSession#setMaxInactiveInterval(int)
diff --git a/server/src/main/java/com/vaadin/server/communication/AbstractStreamingEvent.java b/server/src/main/java/com/vaadin/server/communication/AbstractStreamingEvent.java
index 1f546b2489..8d7591d7bb 100644
--- a/server/src/main/java/com/vaadin/server/communication/AbstractStreamingEvent.java
+++ b/server/src/main/java/com/vaadin/server/communication/AbstractStreamingEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/main/java/com/vaadin/server/communication/AtmospherePushConnection.java b/server/src/main/java/com/vaadin/server/communication/AtmospherePushConnection.java
index 5c0d2e14d4..19f0572300 100644
--- a/server/src/main/java/com/vaadin/server/communication/AtmospherePushConnection.java
+++ b/server/src/main/java/com/vaadin/server/communication/AtmospherePushConnection.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -41,7 +41,7 @@ import com.vaadin.ui.UI;
/**
* A {@link PushConnection} implementation using the Atmosphere push support
* that is by default included in Vaadin.
- *
+ *
* @author Vaadin Ltd
* @since 7.1
*/
@@ -83,7 +83,7 @@ public class AtmospherePushConnection implements PushConnection {
/**
* Appends all the data from the given Reader to this message and
* returns whether the message was completed.
- *
+ *
* @param reader
* The Reader from which to read.
* @return true if this message is complete, false otherwise.
@@ -150,7 +150,7 @@ public class AtmospherePushConnection implements PushConnection {
* Pushes pending state changes and client RPC calls to the client. If
* {@code isConnected()} is false, defers the push until a connection is
* established.
- *
+ *
* @param async
* True if this push asynchronously originates from the server,
* false if it is a response to a client request.
@@ -176,7 +176,7 @@ public class AtmospherePushConnection implements PushConnection {
/**
* Sends the given message to the current client. Cannot be called if
* {@isConnected()} is false.
- *
+ *
* @param message
* The message to send
*/
@@ -192,7 +192,7 @@ public class AtmospherePushConnection implements PushConnection {
* received, or if the call resulted in the completion of a partially
* received message, returns a {@link Reader} yielding the complete message.
* Otherwise, returns null.
- *
+ *
* @param reader
* A Reader from which to read the (partial) message
* @return A Reader yielding a complete message or null if the message is
@@ -230,10 +230,10 @@ public class AtmospherePushConnection implements PushConnection {
/**
* Associates this {@code AtmospherePushConnection} with the given
- * {@AtmosphereResource} representing an established
- * push connection. If already connected, calls {@link #disconnect()} first.
- * If there is a deferred push, carries it out via the new connection.
- *
+ * {@AtmosphereResource} representing an established push connection. If
+ * already connected, calls {@link #disconnect()} first. If there is a
+ * deferred push, carries it out via the new connection.
+ *
* @since 7.2
*/
public void connect(AtmosphereResource resource) {
@@ -279,8 +279,8 @@ public class AtmospherePushConnection implements PushConnection {
if (resource == null) {
// Already disconnected. Should not happen but if it does, we don't
// want to cause NPEs
- getLogger()
- .fine("AtmospherePushConnection.disconnect() called twice, this should not happen");
+ getLogger().fine(
+ "AtmospherePushConnection.disconnect() called twice, this should not happen");
return;
}
if (resource.isResumed()) {
@@ -297,13 +297,11 @@ public class AtmospherePushConnection implements PushConnection {
try {
outgoingMessage.get(1000, TimeUnit.MILLISECONDS);
} catch (TimeoutException e) {
- getLogger()
- .log(Level.INFO,
- "Timeout waiting for messages to be sent to client before disconnect");
+ getLogger().log(Level.INFO,
+ "Timeout waiting for messages to be sent to client before disconnect");
} catch (Exception e) {
- getLogger()
- .log(Level.INFO,
- "Error waiting for messages to be sent to client before disconnect");
+ getLogger().log(Level.INFO,
+ "Error waiting for messages to be sent to client before disconnect");
}
outgoingMessage = null;
}
@@ -311,15 +309,15 @@ public class AtmospherePushConnection implements PushConnection {
try {
resource.close();
} catch (IOException e) {
- getLogger()
- .log(Level.INFO, "Error when closing push connection", e);
+ getLogger().log(Level.INFO, "Error when closing push connection",
+ e);
}
connectionLost();
}
/**
* Called when the connection to the client has been lost.
- *
+ *
* @since 7.4.1
*/
public void connectionLost() {
@@ -345,8 +343,8 @@ public class AtmospherePushConnection implements PushConnection {
* is initially in disconnected state; the client will handle the
* reconnecting.
*/
- private void readObject(ObjectInputStream stream) throws IOException,
- ClassNotFoundException {
+ private void readObject(ObjectInputStream stream)
+ throws IOException, ClassNotFoundException {
stream.defaultReadObject();
state = State.DISCONNECTED;
}
@@ -358,7 +356,7 @@ public class AtmospherePushConnection implements PushConnection {
/**
* Internal method used for reconfiguring loggers to show all Atmosphere log
* messages in the console.
- *
+ *
* @since 7.6
*/
public static void enableAtmosphereDebugLogging() {
diff --git a/server/src/main/java/com/vaadin/server/communication/ClientRpcWriter.java b/server/src/main/java/com/vaadin/server/communication/ClientRpcWriter.java
index 2ecf81287e..aaecf9f273 100644
--- a/server/src/main/java/com/vaadin/server/communication/ClientRpcWriter.java
+++ b/server/src/main/java/com/vaadin/server/communication/ClientRpcWriter.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -40,7 +40,7 @@ import elemental.json.impl.JsonUtil;
/**
* Serializes {@link ClientRpc client RPC} invocations to JSON.
- *
+ *
* @author Vaadin Ltd
* @since 7.1
*/
@@ -49,7 +49,7 @@ public class ClientRpcWriter implements Serializable {
/**
* Writes a JSON object containing all pending client RPC invocations in the
* given UI.
- *
+ *
* @param ui
* The {@link UI} whose RPC calls to write.
* @param writer
@@ -59,20 +59,21 @@ public class ClientRpcWriter implements Serializable {
*/
public void write(UI ui, Writer writer) throws IOException {
- Collection<ClientMethodInvocation> pendingInvocations = collectPendingRpcCalls(ui
- .getConnectorTracker().getDirtyVisibleConnectors());
+ Collection<ClientMethodInvocation> pendingInvocations = collectPendingRpcCalls(
+ ui.getConnectorTracker().getDirtyVisibleConnectors());
JsonArray rpcCalls = Json.createArray();
for (ClientMethodInvocation invocation : pendingInvocations) {
// add invocation to rpcCalls
try {
JsonArray invocationJson = Json.createArray();
- invocationJson.set(0, invocation.getConnector()
- .getConnectorId());
+ invocationJson.set(0,
+ invocation.getConnector().getConnectorId());
invocationJson.set(1, invocation.getInterfaceName());
invocationJson.set(2, invocation.getMethodName());
JsonArray paramJson = Json.createArray();
- for (int i = 0; i < invocation.getParameterTypes().length; ++i) {
+ for (int i = 0; i < invocation
+ .getParameterTypes().length; ++i) {
Type parameterType = invocation.getParameterTypes()[i];
JsonValue referenceParameter = null;
// TODO Use default values for RPC parameter types
@@ -98,7 +99,8 @@ public class ClientRpcWriter implements Serializable {
+ invocation.getConnector().getConnectorId()
+ " method " + invocation.getInterfaceName()
+ "." + invocation.getMethodName() + ": "
- + e.getMessage(), e);
+ + e.getMessage(),
+ e);
}
}
writer.write(JsonUtil.stringify(rpcCalls));
@@ -107,7 +109,7 @@ public class ClientRpcWriter implements Serializable {
/**
* Collects all pending RPC calls from listed {@link ClientConnector}s and
* clears their RPC queues.
- *
+ *
* @param rpcPendingQueue
* list of {@link ClientConnector} of interest
* @return ordered list of pending RPC calls
@@ -128,14 +130,15 @@ public class ClientRpcWriter implements Serializable {
// merge two ordered comparable lists
for (int destIndex = 0, oldIndex = 0, paintableIndex = 0; destIndex < totalCalls; destIndex++) {
if (paintableIndex >= paintablePendingRpc.size()
- || (oldIndex < oldPendingRpc.size() && ((Comparable<ClientMethodInvocation>) oldPendingRpc
- .get(oldIndex))
- .compareTo(paintablePendingRpc
- .get(paintableIndex)) <= 0)) {
+ || (oldIndex < oldPendingRpc.size()
+ && ((Comparable<ClientMethodInvocation>) oldPendingRpc
+ .get(oldIndex)).compareTo(
+ paintablePendingRpc.get(
+ paintableIndex)) <= 0)) {
pendingInvocations.add(oldPendingRpc.get(oldIndex++));
} else {
- pendingInvocations.add(paintablePendingRpc
- .get(paintableIndex++));
+ pendingInvocations
+ .add(paintablePendingRpc.get(paintableIndex++));
}
}
}
diff --git a/server/src/main/java/com/vaadin/server/communication/ConnectorHierarchyWriter.java b/server/src/main/java/com/vaadin/server/communication/ConnectorHierarchyWriter.java
index 16ed9985c4..9af4186132 100644
--- a/server/src/main/java/com/vaadin/server/communication/ConnectorHierarchyWriter.java
+++ b/server/src/main/java/com/vaadin/server/communication/ConnectorHierarchyWriter.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -38,7 +38,7 @@ import elemental.json.impl.JsonUtil;
/**
* Serializes a connector hierarchy to JSON.
- *
+ *
* @author Vaadin Ltd
* @since 7.1
*/
@@ -47,7 +47,7 @@ public class ConnectorHierarchyWriter implements Serializable {
/**
* Writes a JSON object containing the connector hierarchy (parent-child
* mappings) of the dirty connectors in the given UI.
- *
+ *
* @param ui
* The {@link UI} whose hierarchy to write.
* @param writer
@@ -85,7 +85,8 @@ public class ConnectorHierarchyWriter implements Serializable {
throw new PaintException(
"Failed to send hierarchy information about "
+ connectorId + " to the client: "
- + e.getMessage(), e);
+ + e.getMessage(),
+ e);
}
}
}
@@ -100,8 +101,9 @@ public class ConnectorHierarchyWriter implements Serializable {
Set<String> stateUpdateConnectors) {
VaadinRequest request = VaadinService.getCurrentRequest();
if (request != null) {
- request.setAttribute(ConnectorHierarchyWriter.class.getName()
- + ".hierarchyInfo", hierarchyInfo);
+ request.setAttribute(
+ ConnectorHierarchyWriter.class.getName() + ".hierarchyInfo",
+ hierarchyInfo);
request.setAttribute(ConnectorHierarchyWriter.class.getName()
+ ".stateUpdateConnectors", stateUpdateConnectors);
}
diff --git a/server/src/main/java/com/vaadin/server/communication/ConnectorTypeWriter.java b/server/src/main/java/com/vaadin/server/communication/ConnectorTypeWriter.java
index d534987061..c7f48b9367 100644
--- a/server/src/main/java/com/vaadin/server/communication/ConnectorTypeWriter.java
+++ b/server/src/main/java/com/vaadin/server/communication/ConnectorTypeWriter.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -33,7 +33,7 @@ import elemental.json.impl.JsonUtil;
/**
* Serializes connector type mappings to JSON.
- *
+ *
* @author Vaadin Ltd
* @since 7.1
*/
@@ -42,7 +42,7 @@ public class ConnectorTypeWriter implements Serializable {
/**
* Writes a JSON object containing connector-ID-to-type-ID mappings for each
* dirty Connector in the given UI.
- *
+ *
* @param ui
* The {@link UI} containing dirty connectors
* @param writer
@@ -67,7 +67,8 @@ public class ConnectorTypeWriter implements Serializable {
throw new PaintException(
"Failed to send connector type for connector "
+ connector.getConnectorId() + ": "
- + e.getMessage(), e);
+ + e.getMessage(),
+ e);
}
}
writer.write(JsonUtil.stringify(connectorTypes));
diff --git a/server/src/main/java/com/vaadin/server/communication/DateSerializer.java b/server/src/main/java/com/vaadin/server/communication/DateSerializer.java
index 593728bac7..e10edf852a 100644
--- a/server/src/main/java/com/vaadin/server/communication/DateSerializer.java
+++ b/server/src/main/java/com/vaadin/server/communication/DateSerializer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import elemental.json.JsonValue;
/**
* Server side serializer/deserializer for java.util.Date
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
diff --git a/server/src/main/java/com/vaadin/server/communication/FileUploadHandler.java b/server/src/main/java/com/vaadin/server/communication/FileUploadHandler.java
index b9eaff3bd1..f205e28b7d 100644
--- a/server/src/main/java/com/vaadin/server/communication/FileUploadHandler.java
+++ b/server/src/main/java/com/vaadin/server/communication/FileUploadHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -42,7 +42,7 @@ import com.vaadin.ui.Upload.FailedEvent;
/**
* Handles a file upload request submitted via an Upload component.
- *
+ *
* @author Vaadin Ltd
* @since 7.1
*/
@@ -51,7 +51,7 @@ public class FileUploadHandler implements RequestHandler {
/**
* Stream that extracts content from another stream until the boundary
* string is encountered.
- *
+ *
* Public only for unit tests, should be considered private for all other
* purposes.
*/
@@ -119,7 +119,7 @@ public class FileUploadHandler implements RequestHandler {
/**
* Reads the input to expect a boundary string. Expects that the first
* character has already been matched.
- *
+ *
* @return -1 if the boundary was matched, else returns the first byte
* from boundary
* @throws IOException
@@ -155,7 +155,7 @@ public class FileUploadHandler implements RequestHandler {
/**
* Returns the partly matched boundary string and the byte following
* that.
- *
+ *
* @return
* @throws IOException
*/
@@ -192,7 +192,8 @@ public class FileUploadHandler implements RequestHandler {
}
}
if (b == -1) {
- throw new IOException("The multipart stream ended unexpectedly");
+ throw new IOException(
+ "The multipart stream ended unexpectedly");
}
return b;
}
@@ -201,7 +202,7 @@ public class FileUploadHandler implements RequestHandler {
/**
* An UploadInterruptedException will be thrown by an ongoing upload if
* {@link StreamVariable#isInterrupted()} returns <code>true</code>.
- *
+ *
* By checking the exception of an {@link StreamingErrorEvent} or
* {@link FailedEvent} against this class, it is possible to determine if an
* upload was interrupted by code or aborted due to any other exception.
@@ -227,7 +228,9 @@ public class FileUploadHandler implements RequestHandler {
private static final String DASHDASH = "--";
- /* Same as in apache commons file upload library that was previously used. */
+ /*
+ * Same as in apache commons file upload library that was previously used.
+ */
private static final int MAX_UPLOAD_BUFFER_SIZE = 4 * 1024;
/* Minimum interval which will be used for streaming progress events. */
@@ -266,8 +269,8 @@ public class FileUploadHandler implements RequestHandler {
UI uI = session.getUIById(Integer.parseInt(uiId));
UI.setCurrent(uI);
- streamVariable = uI.getConnectorTracker().getStreamVariable(
- connectorId, variableName);
+ streamVariable = uI.getConnectorTracker()
+ .getStreamVariable(connectorId, variableName);
String secKey = uI.getConnectorTracker().getSeckey(streamVariable);
if (secKey == null || !secKey.equals(parts[3])) {
// TODO Should rethink error handling
@@ -299,7 +302,8 @@ public class FileUploadHandler implements RequestHandler {
int readByte = stream.read();
while (readByte != LF) {
if (readByte == -1) {
- throw new IOException("The multipart stream ended unexpectedly");
+ throw new IOException(
+ "The multipart stream ended unexpectedly");
}
bout.write(readByte);
readByte = stream.read();
@@ -316,7 +320,7 @@ public class FileUploadHandler implements RequestHandler {
* assume the caller has locked the session. This allows the session to be
* locked only when needed and not when handling the upload data.
* </p>
- *
+ *
* @param session
* The session containing the stream variable
* @param request
@@ -374,19 +378,19 @@ public class FileUploadHandler implements RequestHandler {
}
}
- contentLength -= (boundary.length() + CRLF.length() + 2
- * DASHDASH.length() + CRLF.length());
+ contentLength -= (boundary.length() + CRLF.length()
+ + 2 * DASHDASH.length() + CRLF.length());
/*
* Reads bytes from the underlying stream. Compares the read bytes to
* the boundary string and returns -1 if met.
- *
+ *
* The matching happens so that if the read byte equals to the first
* char of boundary string, the stream goes to "buffering mode". In
* buffering mode bytes are read until the character does not match the
* corresponding from boundary string or the full boundary string is
* found.
- *
+ *
* Note, if this is someday needed elsewhere, don't shoot yourself to
* foot and split to a top level helper class.
*/
@@ -404,8 +408,8 @@ public class FileUploadHandler implements RequestHandler {
streamVariable, filename, mimeType, contentLength, owner,
variableName);
} catch (UploadException e) {
- session.getCommunicationManager().handleConnectorRelatedException(
- owner, e);
+ session.getCommunicationManager()
+ .handleConnectorRelatedException(owner, e);
}
sendUploadResponse(request, response);
@@ -476,7 +480,7 @@ public class FileUploadHandler implements RequestHandler {
* assume the caller has locked the session. This allows the session to be
* locked only when needed and not when handling the upload data.
* </p>
- *
+ *
* @param session
* The session containing the stream variable
* @param request
@@ -510,8 +514,8 @@ public class FileUploadHandler implements RequestHandler {
handleFileUploadValidationAndData(session, stream, streamVariable,
filename, mimeType, contentLength, owner, variableName);
} catch (UploadException e) {
- session.getCommunicationManager().handleConnectorRelatedException(
- owner, e);
+ session.getCommunicationManager()
+ .handleConnectorRelatedException(owner, e);
}
sendUploadResponse(request, response);
}
@@ -657,7 +661,7 @@ public class FileUploadHandler implements RequestHandler {
/**
* Removes any possible path information from the filename and returns the
* filename. Separators / and \\ are used.
- *
+ *
* @param name
* @return
*/
@@ -671,7 +675,7 @@ public class FileUploadHandler implements RequestHandler {
/**
* TODO document
- *
+ *
* @param request
* @param response
* @throws IOException
@@ -680,8 +684,8 @@ public class FileUploadHandler implements RequestHandler {
VaadinResponse response) throws IOException {
response.setContentType("text/html");
final OutputStream out = response.getOutputStream();
- final PrintWriter outWriter = new PrintWriter(new BufferedWriter(
- new OutputStreamWriter(out, "UTF-8")));
+ final PrintWriter outWriter = new PrintWriter(
+ new BufferedWriter(new OutputStreamWriter(out, "UTF-8")));
outWriter.print("<html><body>download handled</body></html>");
outWriter.flush();
out.close();
diff --git a/server/src/main/java/com/vaadin/server/communication/HeartbeatHandler.java b/server/src/main/java/com/vaadin/server/communication/HeartbeatHandler.java
index c6711d1d18..47671c0c5b 100644
--- a/server/src/main/java/com/vaadin/server/communication/HeartbeatHandler.java
+++ b/server/src/main/java/com/vaadin/server/communication/HeartbeatHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -36,12 +36,12 @@ import com.vaadin.ui.UI;
* no UIDL requests for a prolonged period of time. UIs that do not receive
* either heartbeat or UIDL requests are eventually removed from the session and
* garbage collected.
- *
+ *
* @author Vaadin Ltd
* @since 7.1
*/
-public class HeartbeatHandler extends SynchronizedRequestHandler implements
- SessionExpiredHandler {
+public class HeartbeatHandler extends SynchronizedRequestHandler
+ implements SessionExpiredHandler {
@Override
protected boolean canHandleRequest(VaadinRequest request) {
@@ -68,7 +68,8 @@ public class HeartbeatHandler extends SynchronizedRequestHandler implements
// complain about the empty response body (#12182)
response.setHeader("Content-Type", "text/plain");
} else {
- response.sendError(HttpServletResponse.SC_NOT_FOUND, "UI not found");
+ response.sendError(HttpServletResponse.SC_NOT_FOUND,
+ "UI not found");
}
return true;
@@ -76,7 +77,7 @@ public class HeartbeatHandler extends SynchronizedRequestHandler implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.server.SessionExpiredHandler#handleSessionExpired(com.vaadin
* .server.VaadinRequest, com.vaadin.server.VaadinResponse)
diff --git a/server/src/main/java/com/vaadin/server/communication/JSONSerializer.java b/server/src/main/java/com/vaadin/server/communication/JSONSerializer.java
index 7f673d01e8..dc9dcc8d79 100644
--- a/server/src/main/java/com/vaadin/server/communication/JSONSerializer.java
+++ b/server/src/main/java/com/vaadin/server/communication/JSONSerializer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -34,7 +34,7 @@ import elemental.json.JsonValue;
* <p>
* This is the server side interface, see
* com.vaadin.client.communication.JSONSerializer for the client side interface.
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
@@ -59,7 +59,7 @@ public interface JSONSerializer<T> {
* Serialize the given object into JSON. Must be compatible with
* {@link #deserialize(Type, JsonValue, ConnectorTracker)} and the client
* side com.vaadin.client.communication.JSONSerializer
- *
+ *
* @param value
* The object to serialize
* @param connectorTracker
diff --git a/server/src/main/java/com/vaadin/server/communication/JSR356WebsocketInitializer.java b/server/src/main/java/com/vaadin/server/communication/JSR356WebsocketInitializer.java
index be74c47106..bb28de67b0 100644
--- a/server/src/main/java/com/vaadin/server/communication/JSR356WebsocketInitializer.java
+++ b/server/src/main/java/com/vaadin/server/communication/JSR356WebsocketInitializer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -43,7 +43,7 @@ import com.vaadin.server.VaadinServlet;
* Note that {@link WebListener} is Servlet 3.0 API so this will not be run for
* older servers (unless added to web.xml), but these servers do not support JSR
* 356 websockets either.
- *
+ *
* @since 7.5.0
* @author Vaadin Ltd
*/
@@ -91,8 +91,8 @@ public class JSR356WebsocketInitializer implements ServletContextListener {
@Override
public Enumeration<String> getInitParameterNames() {
- return Collections.enumeration(servletRegistration
- .getInitParameters().keySet());
+ return Collections.enumeration(
+ servletRegistration.getInitParameters().keySet());
}
}
@@ -118,10 +118,10 @@ public class JSR356WebsocketInitializer implements ServletContextListener {
initAtmosphereForVaadinServlet(servletRegistration,
servletContext);
} catch (Exception e) {
- getLogger().log(
- Level.WARNING,
+ getLogger().log(Level.WARNING,
"Failed to initialize Atmosphere for "
- + servletName, e);
+ + servletName,
+ e);
}
}
}
@@ -132,7 +132,7 @@ public class JSR356WebsocketInitializer implements ServletContextListener {
* <p>
* For JSR 356 websockets to work properly, the initialization must be done
* in the servlet context initialization phase.
- *
+ *
* @param servletRegistration
* The servlet registration info for the servlet
* @param servletContext
@@ -149,9 +149,8 @@ public class JSR356WebsocketInitializer implements ServletContextListener {
return;
}
getLogger().finer("Creating AtmosphereFramework for " + servletName);
- AtmosphereFramework framework = PushRequestHandler
- .initAtmosphere(new FakeServletConfig(servletRegistration,
- servletContext));
+ AtmosphereFramework framework = PushRequestHandler.initAtmosphere(
+ new FakeServletConfig(servletRegistration, servletContext));
servletContext.setAttribute(attributeName, framework);
getLogger().finer("Created AtmosphereFramework for " + servletName);
@@ -160,7 +159,7 @@ public class JSR356WebsocketInitializer implements ServletContextListener {
/**
* Returns the name of the attribute in the servlet context where the
* pre-initialized Atmosphere object is stored
- *
+ *
* @param servletName
* The name of the servlet
* @return The attribute name which contains the initialized Atmosphere
@@ -179,15 +178,16 @@ public class JSR356WebsocketInitializer implements ServletContextListener {
* @return <code>true</code> if the attribute name matches the convention,
* <code>false</code> otherwise
*/
- private static boolean isAtmosphereFrameworkAttribute(String attributeName) {
- return attributeName.startsWith(JSR356WebsocketInitializer.class
- .getName() + ".");
+ private static boolean isAtmosphereFrameworkAttribute(
+ String attributeName) {
+ return attributeName
+ .startsWith(JSR356WebsocketInitializer.class.getName() + ".");
}
/**
* Tries to determine if the given servlet registration refers to a Vaadin
* servlet.
- *
+ *
* @param servletRegistration
* The servlet registration info for the servlet
* @return false if the servlet is definitely not a Vaadin servlet, true
diff --git a/server/src/main/java/com/vaadin/server/communication/LegacyUidlWriter.java b/server/src/main/java/com/vaadin/server/communication/LegacyUidlWriter.java
index 3f70a25c5b..c5a84c29a7 100644
--- a/server/src/main/java/com/vaadin/server/communication/LegacyUidlWriter.java
+++ b/server/src/main/java/com/vaadin/server/communication/LegacyUidlWriter.java
@@ -73,9 +73,9 @@ public class LegacyUidlWriter implements Serializable {
writer.write("[");
for (Component c : legacyComponents) {
- getLogger().fine(
- "Painting LegacyComponent " + c.getClass().getName() + "@"
- + Integer.toHexString(c.hashCode()));
+ getLogger()
+ .fine("Painting LegacyComponent " + c.getClass().getName()
+ + "@" + Integer.toHexString(c.hashCode()));
target.startTag("change");
final String pid = c.getConnectorId();
target.addAttribute("pid", pid);
diff --git a/server/src/main/java/com/vaadin/server/communication/MetadataWriter.java b/server/src/main/java/com/vaadin/server/communication/MetadataWriter.java
index 9c46e64692..941d1b0c4d 100644
--- a/server/src/main/java/com/vaadin/server/communication/MetadataWriter.java
+++ b/server/src/main/java/com/vaadin/server/communication/MetadataWriter.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.ui.UI;
/**
* Serializes miscellaneous metadata to JSON.
- *
+ *
* @author Vaadin Ltd
* @since 7.1
*/
@@ -35,7 +35,7 @@ public class MetadataWriter implements Serializable {
/**
* Writes a JSON object containing metadata related to the given UI.
- *
+ *
* @param ui
* The UI whose metadata to write.
* @param writer
@@ -53,7 +53,7 @@ public class MetadataWriter implements Serializable {
* messages.
* @throws IOException
* If the serialization fails.
- *
+ *
*/
public void write(UI ui, Writer writer, boolean repaintAll, boolean async,
SystemMessages messages) throws IOException {
@@ -89,8 +89,8 @@ public class MetadataWriter implements Serializable {
writer.write(",");
}
writer.write("\"timedRedirect\":{\"interval\":"
- + (newTimeoutInterval + 15) + ",\"url\":\""
- + escapedURL + "\"}");
+ + (newTimeoutInterval + 15) + ",\"url\":\"" + escapedURL
+ + "\"}");
metaOpen = true;
}
timeoutInterval = newTimeoutInterval;
diff --git a/server/src/main/java/com/vaadin/server/communication/PortletBootstrapHandler.java b/server/src/main/java/com/vaadin/server/communication/PortletBootstrapHandler.java
index 289309b631..57336b8a0f 100644
--- a/server/src/main/java/com/vaadin/server/communication/PortletBootstrapHandler.java
+++ b/server/src/main/java/com/vaadin/server/communication/PortletBootstrapHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -74,7 +74,8 @@ public class PortletBootstrapHandler extends BootstrapHandler {
// applications will load this exactly once
String portalTheme = ((VaadinPortletRequest) context.getRequest())
.getPortalProperty(VaadinPortlet.PORTAL_PARAMETER_VAADIN_THEME);
- if (portalTheme != null && !portalTheme.equals(context.getThemeName())) {
+ if (portalTheme != null
+ && !portalTheme.equals(context.getThemeName())) {
String portalThemeUri = getThemeUri(context, portalTheme);
// XSS safe - originates from portal properties
builder.append("vaadin.loadTheme('" + portalThemeUri + "');");
diff --git a/server/src/main/java/com/vaadin/server/communication/PortletDummyRequestHandler.java b/server/src/main/java/com/vaadin/server/communication/PortletDummyRequestHandler.java
index a79f5e96f2..83699a1818 100644
--- a/server/src/main/java/com/vaadin/server/communication/PortletDummyRequestHandler.java
+++ b/server/src/main/java/com/vaadin/server/communication/PortletDummyRequestHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -34,7 +34,7 @@ import com.vaadin.server.VaadinSession;
/**
* Request handler which provides a dummy HTML response to any resource request
* with the resource id DUMMY.
- *
+ *
* @author Vaadin Ltd
* @since 7.1
*/
@@ -60,8 +60,8 @@ public class PortletDummyRequestHandler implements RequestHandler {
final OutputStream out = ((ResourceResponse) response)
.getPortletOutputStream();
- final PrintWriter outWriter = new PrintWriter(new BufferedWriter(
- new OutputStreamWriter(out, "UTF-8")));
+ final PrintWriter outWriter = new PrintWriter(
+ new BufferedWriter(new OutputStreamWriter(out, "UTF-8")));
outWriter.print("<html><body>dummy page</body></html>");
outWriter.close();
diff --git a/server/src/main/java/com/vaadin/server/communication/PortletListenerNotifier.java b/server/src/main/java/com/vaadin/server/communication/PortletListenerNotifier.java
index 3aa3426d2f..06e1d9f11c 100644
--- a/server/src/main/java/com/vaadin/server/communication/PortletListenerNotifier.java
+++ b/server/src/main/java/com/vaadin/server/communication/PortletListenerNotifier.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -42,7 +42,7 @@ import com.vaadin.ui.UI;
/**
* Notifies {@link PortletListener}s of a received portlet request.
- *
+ *
* @author Vaadin Ltd
* @since 7.1
*/
diff --git a/server/src/main/java/com/vaadin/server/communication/PortletStateAwareRequestHandler.java b/server/src/main/java/com/vaadin/server/communication/PortletStateAwareRequestHandler.java
index a1276025d8..cb8c511a92 100644
--- a/server/src/main/java/com/vaadin/server/communication/PortletStateAwareRequestHandler.java
+++ b/server/src/main/java/com/vaadin/server/communication/PortletStateAwareRequestHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ import com.vaadin.server.VaadinSession;
/**
* Handler which ensures that Action and Event requests are marked as handled
* and do not cause a 404 to be sent.
- *
+ *
* @since 7.1
* @author Vaadin Ltd
*/
@@ -37,7 +37,7 @@ public class PortletStateAwareRequestHandler implements RequestHandler {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.server.RequestHandler#handleRequest(com.vaadin.server.
* VaadinSession, com.vaadin.server.VaadinRequest,
* com.vaadin.server.VaadinResponse)
diff --git a/server/src/main/java/com/vaadin/server/communication/PortletUIInitHandler.java b/server/src/main/java/com/vaadin/server/communication/PortletUIInitHandler.java
index b3cda44592..a47c59aa45 100644
--- a/server/src/main/java/com/vaadin/server/communication/PortletUIInitHandler.java
+++ b/server/src/main/java/com/vaadin/server/communication/PortletUIInitHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -34,14 +34,14 @@ public class PortletUIInitHandler extends UIInitHandler {
return false;
}
- return UIInitHandler.BROWSER_DETAILS_PARAMETER.equals(resourceRequest
- .getResourceID());
+ return UIInitHandler.BROWSER_DETAILS_PARAMETER
+ .equals(resourceRequest.getResourceID());
}
/**
* Returns the {@link ResourceRequest} for the given request or null if none
* could be found.
- *
+ *
* @param request
* The original request, must be a {@link VaadinPortletRequest}
* @return The resource request from the request parameter or null
diff --git a/server/src/main/java/com/vaadin/server/communication/PublishedFileHandler.java b/server/src/main/java/com/vaadin/server/communication/PublishedFileHandler.java
index 56edffd16d..7603b0f078 100644
--- a/server/src/main/java/com/vaadin/server/communication/PublishedFileHandler.java
+++ b/server/src/main/java/com/vaadin/server/communication/PublishedFileHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -42,7 +42,7 @@ import com.vaadin.shared.ApplicationConstants;
* names that have explicitly been registered. Resources can currently only be
* registered by including a {@link JavaScript} or {@link StyleSheet} annotation
* on a Connector class.
- *
+ *
* @author Vaadin Ltd
* @since 7.1
*/
@@ -62,16 +62,16 @@ public class PublishedFileHandler implements RequestHandler {
String pathInfo = request.getPathInfo();
// + 2 to also remove beginning and ending slashes
- String fileName = pathInfo
- .substring(ApplicationConstants.PUBLISHED_FILE_PATH.length() + 2);
+ String fileName = pathInfo.substring(
+ ApplicationConstants.PUBLISHED_FILE_PATH.length() + 2);
final String mimetype = response.getService().getMimeType(fileName);
// Security check: avoid accidentally serving from the UI of the
// classpath instead of relative to the context class
if (fileName.startsWith("/")) {
- getLogger().warning(
- "Published file request starting with / rejected: "
+ getLogger()
+ .warning("Published file request starting with / rejected: "
+ fileName);
response.sendError(HttpServletResponse.SC_NOT_FOUND, fileName);
return true;
@@ -100,12 +100,10 @@ public class PublishedFileHandler implements RequestHandler {
// Resolve file relative to the location of the context class
InputStream in = context.getResourceAsStream(fileName);
if (in == null) {
- getLogger().warning(
- fileName + " published by " + context.getName()
- + " not found. Verify that the file "
- + context.getPackage().getName().replace('.', '/')
- + '/' + fileName
- + " is available on the classpath.");
+ getLogger().warning(fileName + " published by " + context.getName()
+ + " not found. Verify that the file "
+ + context.getPackage().getName().replace('.', '/') + '/'
+ + fileName + " is available on the classpath.");
response.sendError(HttpServletResponse.SC_NOT_FOUND, fileName);
return true;
}
diff --git a/server/src/main/java/com/vaadin/server/communication/PushAtmosphereHandler.java b/server/src/main/java/com/vaadin/server/communication/PushAtmosphereHandler.java
index 50279a1a74..6e1fadca04 100644
--- a/server/src/main/java/com/vaadin/server/communication/PushAtmosphereHandler.java
+++ b/server/src/main/java/com/vaadin/server/communication/PushAtmosphereHandler.java
@@ -29,7 +29,7 @@ import org.atmosphere.handler.AbstractReflectorAtmosphereHandler;
/**
* Handles Atmosphere requests and forwards them to logical methods in
* {@link PushHandler}
- *
+ *
* @since 7.5.0
* @author Vaadin Ltd
*/
@@ -47,12 +47,12 @@ public class PushAtmosphereHandler extends AbstractReflectorAtmosphereHandler
}
@Override
- public void onStateChange(AtmosphereResourceEvent event) throws IOException {
+ public void onStateChange(AtmosphereResourceEvent event)
+ throws IOException {
super.onStateChange(event);
if (pushHandler == null) {
- getLogger()
- .warning(
- "AtmosphereHandler.onStateChange called before PushHandler has been set. This should really not happen");
+ getLogger().warning(
+ "AtmosphereHandler.onStateChange called before PushHandler has been set. This should really not happen");
return;
}
@@ -64,9 +64,8 @@ public class PushAtmosphereHandler extends AbstractReflectorAtmosphereHandler
@Override
public void onRequest(AtmosphereResource resource) {
if (pushHandler == null) {
- getLogger()
- .warning(
- "AtmosphereHandler.onRequest called before PushHandler has been set. This should really not happen");
+ getLogger().warning(
+ "AtmosphereHandler.onRequest called before PushHandler has been set. This should really not happen");
return;
}
@@ -81,7 +80,7 @@ public class PushAtmosphereHandler extends AbstractReflectorAtmosphereHandler
/**
* Called when the client sends a message through the push channel
- *
+ *
* @param resource
*/
private void onMessage(AtmosphereResource resource) {
@@ -91,7 +90,7 @@ public class PushAtmosphereHandler extends AbstractReflectorAtmosphereHandler
/**
* Called when the client sends the first request (to establish a push
* connection)
- *
+ *
* @param resource
*/
private void onConnect(AtmosphereResource resource) {
diff --git a/server/src/main/java/com/vaadin/server/communication/PushConnection.java b/server/src/main/java/com/vaadin/server/communication/PushConnection.java
index d5a0d6e9bc..6e0a31b9d6 100644
--- a/server/src/main/java/com/vaadin/server/communication/PushConnection.java
+++ b/server/src/main/java/com/vaadin/server/communication/PushConnection.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import com.vaadin.ui.UI;
* the transport mechanism.
* <p>
* This interface is an internal API, only meant to be used by the framework.
- *
+ *
* @author Vaadin Ltd
* @since 7.1
*/
diff --git a/server/src/main/java/com/vaadin/server/communication/PushHandler.java b/server/src/main/java/com/vaadin/server/communication/PushHandler.java
index 0b4fe28b77..7cc41aeda3 100644
--- a/server/src/main/java/com/vaadin/server/communication/PushHandler.java
+++ b/server/src/main/java/com/vaadin/server/communication/PushHandler.java
@@ -49,7 +49,7 @@ import elemental.json.JsonException;
/**
* Handles incoming push connections and messages and dispatches them to the
* correct {@link UI}/ {@link AtmospherePushConnection}
- *
+ *
* @author Vaadin Ltd
* @since 7.1
*/
@@ -90,13 +90,12 @@ public class PushHandler {
resource.getResponse().addHeader("Connection", "close");
}
- String requestToken = resource.getRequest().getParameter(
- ApplicationConstants.CSRF_TOKEN_PARAMETER);
+ String requestToken = resource.getRequest()
+ .getParameter(ApplicationConstants.CSRF_TOKEN_PARAMETER);
if (!VaadinService.isCsrfTokenValid(session, requestToken)) {
- getLogger()
- .log(Level.WARNING,
- "Invalid CSRF token in new connection received from {0}",
- resource.getRequest().getRemoteHost());
+ getLogger().log(Level.WARNING,
+ "Invalid CSRF token in new connection received from {0}",
+ resource.getRequest().getRemoteHost());
// Refresh on client side, create connection just for
// sending a message
sendRefreshAndDisconnect(resource);
@@ -171,7 +170,7 @@ public class PushHandler {
/**
* Suspends the given resource
- *
+ *
* @since 7.6
* @param resource
* the resource to suspend
@@ -186,7 +185,7 @@ public class PushHandler {
/**
* Find the UI for the atmosphere resource, lock it and invoke the callback.
- *
+ *
* @param resource
* the atmosphere resource for the current request
* @param callback
@@ -217,11 +216,10 @@ public class PushHandler {
"Could not get session. This should never happen", e);
return;
} catch (SessionExpiredException e) {
- SystemMessages msg = service.getSystemMessages(
- ServletPortletHelper.findLocale(null, null,
- vaadinRequest), vaadinRequest);
- sendNotificationAndDisconnect(
- resource,
+ SystemMessages msg = service
+ .getSystemMessages(ServletPortletHelper.findLocale(null,
+ null, vaadinRequest), vaadinRequest);
+ sendNotificationAndDisconnect(resource,
VaadinService.createCriticalNotificationJSON(
msg.getSessionExpiredCaption(),
msg.getSessionExpiredMessage(), null,
@@ -236,18 +234,17 @@ public class PushHandler {
assert UI.getCurrent() == ui;
if (ui == null) {
- sendNotificationAndDisconnect(resource,
- UidlRequestHandler.getUINotFoundErrorJSON(service,
- vaadinRequest));
+ sendNotificationAndDisconnect(resource, UidlRequestHandler
+ .getUINotFoundErrorJSON(service, vaadinRequest));
} else {
callback.run(resource, ui);
}
} catch (final IOException e) {
callErrorHandler(session, e);
} catch (final Exception e) {
- SystemMessages msg = service.getSystemMessages(
- ServletPortletHelper.findLocale(null, null,
- vaadinRequest), vaadinRequest);
+ SystemMessages msg = service
+ .getSystemMessages(ServletPortletHelper.findLocale(null,
+ null, vaadinRequest), vaadinRequest);
AtmosphereResource errorResource = resource;
if (ui != null && ui.getPushConnection() != null) {
@@ -259,8 +256,7 @@ public class PushHandler {
.getPushConnection()).getResource();
}
- sendNotificationAndDisconnect(
- errorResource,
+ sendNotificationAndDisconnect(errorResource,
VaadinService.createCriticalNotificationJSON(
msg.getInternalErrorCaption(),
msg.getInternalErrorMessage(), null,
@@ -334,10 +330,9 @@ public class PushHandler {
// preserving the session. After restart the client reconnects, gets
// a session expired notification and then closes the connection and
// ends up here
- getLogger()
- .log(Level.FINER,
- "Session expired before push disconnect event was received",
- e);
+ getLogger().log(Level.FINER,
+ "Session expired before push disconnect event was received",
+ e);
return;
}
@@ -352,7 +347,7 @@ public class PushHandler {
* UI not found, could be because FF has asynchronously closed
* the websocket connection and Atmosphere has already done
* cleanup of the request attributes.
- *
+ *
* In that case, we still have a chance of finding the right UI
* by iterating through the UIs in the session looking for one
* using the same AtmosphereResource.
@@ -360,18 +355,16 @@ public class PushHandler {
ui = findUiUsingResource(resource, session.getUIs());
if (ui == null) {
- getLogger()
- .log(Level.FINE,
- "Could not get UI. This should never happen,"
- + " except when reloading in Firefox and Chrome -"
- + " see http://dev.vaadin.com/ticket/14251.");
+ getLogger().log(Level.FINE,
+ "Could not get UI. This should never happen,"
+ + " except when reloading in Firefox and Chrome -"
+ + " see http://dev.vaadin.com/ticket/14251.");
return;
} else {
- getLogger()
- .log(Level.INFO,
- "No UI was found based on data in the request,"
- + " but a slower lookup based on the AtmosphereResource succeeded."
- + " See http://dev.vaadin.com/ticket/14251 for more details.");
+ getLogger().log(Level.INFO,
+ "No UI was found based on data in the request,"
+ + " but a slower lookup based on the AtmosphereResource succeeded."
+ + " See http://dev.vaadin.com/ticket/14251 for more details.");
}
}
@@ -381,10 +374,9 @@ public class PushHandler {
String id = resource.uuid();
if (pushConnection == null) {
- getLogger()
- .log(Level.WARNING,
- "Could not find push connection to close: {0} with transport {1}",
- new Object[] { id, resource.transport() });
+ getLogger().log(Level.WARNING,
+ "Could not find push connection to close: {0} with transport {1}",
+ new Object[] { id, resource.transport() });
} else {
if (!pushMode.isEnabled()) {
/*
@@ -398,10 +390,9 @@ public class PushHandler {
* Unexpected cancel, e.g. if the user closes the browser
* tab.
*/
- getLogger()
- .log(Level.FINER,
- "Connection unexpectedly closed for resource {0} with transport {1}",
- new Object[] { id, resource.transport() });
+ getLogger().log(Level.FINER,
+ "Connection unexpectedly closed for resource {0} with transport {1}",
+ new Object[] { id, resource.transport() });
}
pushConnection.connectionLost();
@@ -425,7 +416,8 @@ public class PushHandler {
for (UI ui : uIs) {
PushConnection pushConnection = ui.getPushConnection();
if (pushConnection instanceof AtmospherePushConnection) {
- if (((AtmospherePushConnection) pushConnection).getResource() == resource) {
+ if (((AtmospherePushConnection) pushConnection)
+ .getResource() == resource) {
return ui;
}
}
@@ -441,16 +433,15 @@ public class PushHandler {
* two push connections which try to use the same UI. Using the
* AtmosphereResource directly guarantees the message goes to the correct
* recipient.
- *
+ *
* @param resource
* The atmosphere resource to send refresh to
- *
+ *
*/
private static void sendRefreshAndDisconnect(AtmosphereResource resource)
throws IOException {
- sendNotificationAndDisconnect(resource,
- VaadinService.createCriticalNotificationJSON(null, null, null,
- null));
+ sendNotificationAndDisconnect(resource, VaadinService
+ .createCriticalNotificationJSON(null, null, null, null));
}
/**
@@ -465,8 +456,8 @@ public class PushHandler {
&& !((AtmosphereResourceImpl) resource).isInScope()) {
// The resource is no longer valid so we should not write
// anything to it
- getLogger()
- .fine("sendNotificationAndDisconnect called for resource no longer in scope");
+ getLogger().fine(
+ "sendNotificationAndDisconnect called for resource no longer in scope");
return;
}
resource.getResponse().getWriter().write(notificationJson);
@@ -483,7 +474,7 @@ public class PushHandler {
/**
* Called when a new push connection is requested to be opened by the client
- *
+ *
* @since 7.5.0
* @param resource
* The related atmosphere resources
@@ -494,7 +485,7 @@ public class PushHandler {
/**
* Called when a message is received through the push connection
- *
+ *
* @since 7.5.0
* @param resource
* The related atmosphere resources
@@ -506,11 +497,11 @@ public class PushHandler {
/**
* Sets the timeout used for suspend calls when using long polling.
- *
+ *
* If you are using a proxy with a defined idle timeout, set the suspend
* timeout to a value smaller than the proxy timeout so that the server is
* aware of a reconnect taking place.
- *
+ *
* @since 7.6
* @param suspendTimeout
* the timeout to use for suspended AtmosphereResources
@@ -521,7 +512,7 @@ public class PushHandler {
/**
* Gets the timeout used for suspend calls when using long polling.
- *
+ *
* @since 7.6
* @return the timeout to use for suspended AtmosphereResources
*/
diff --git a/server/src/main/java/com/vaadin/server/communication/PushRequestHandler.java b/server/src/main/java/com/vaadin/server/communication/PushRequestHandler.java
index 17f7243e36..04970fb90d 100644
--- a/server/src/main/java/com/vaadin/server/communication/PushRequestHandler.java
+++ b/server/src/main/java/com/vaadin/server/communication/PushRequestHandler.java
@@ -58,8 +58,8 @@ import com.vaadin.shared.communication.PushConstants;
* @author Vaadin Ltd
* @since 7.1
*/
-public class PushRequestHandler implements RequestHandler,
- SessionExpiredHandler {
+public class PushRequestHandler
+ implements RequestHandler, SessionExpiredHandler {
private AtmosphereFramework atmosphere;
private PushHandler pushHandler;
@@ -82,30 +82,26 @@ public class PushRequestHandler implements RequestHandler,
atmosphere = getPreInitializedAtmosphere(vaadinServletConfig);
if (atmosphere == null) {
// Not initialized by JSR356WebsocketInitializer
- getLogger().fine(
- "Initializing Atmosphere for servlet "
- + vaadinServletConfig.getServletName());
+ getLogger().fine("Initializing Atmosphere for servlet "
+ + vaadinServletConfig.getServletName());
try {
atmosphere = initAtmosphere(vaadinServletConfig);
} catch (Exception e) {
- getLogger().log(
- Level.WARNING,
+ getLogger().log(Level.WARNING,
"Failed to initialize Atmosphere for "
+ service.getServlet().getServletName()
- + ". Push will not work.", e);
+ + ". Push will not work.",
+ e);
return;
}
} else {
- getLogger().fine(
- "Using pre-initialized Atmosphere for servlet "
- + vaadinServletConfig.getServletName());
+ getLogger().fine("Using pre-initialized Atmosphere for servlet "
+ + vaadinServletConfig.getServletName());
}
- pushHandler
- .setLongPollingSuspendTimeout(atmosphere
- .getAtmosphereConfig()
- .getInitParameter(
- com.vaadin.server.Constants.SERVLET_PARAMETER_PUSH_SUSPEND_TIMEOUT_LONGPOLLING,
- -1));
+ pushHandler.setLongPollingSuspendTimeout(
+ atmosphere.getAtmosphereConfig().getInitParameter(
+ com.vaadin.server.Constants.SERVLET_PARAMETER_PUSH_SUSPEND_TIMEOUT_LONGPOLLING,
+ -1));
for (AtmosphereHandlerWrapper handlerWrapper : atmosphere
.getAtmosphereHandlers().values()) {
AtmosphereHandler handler = handlerWrapper.atmosphereHandler;
@@ -124,7 +120,7 @@ public class PushRequestHandler implements RequestHandler,
* Create your own request handler and override this method if you want to
* customize the {@link PushHandler}, e.g. to dynamically decide the suspend
* timeout.
- *
+ *
* @since 7.6
* @param service
* the vaadin service
@@ -158,7 +154,7 @@ public class PushRequestHandler implements RequestHandler,
/**
* Initializes Atmosphere for the given ServletConfiguration
- *
+ *
* @since 7.5.0
* @param vaadinServletConfig
* The servlet configuration for the servlet which should have
@@ -249,8 +245,8 @@ public class PushRequestHandler implements RequestHandler,
return true;
}
try {
- atmosphere.doCometSupport(AtmosphereRequest
- .wrap((VaadinServletRequest) request),
+ atmosphere.doCometSupport(
+ AtmosphereRequest.wrap((VaadinServletRequest) request),
AtmosphereResponse
.wrap((VaadinServletResponse) response));
} catch (ServletException e) {
@@ -271,7 +267,7 @@ public class PushRequestHandler implements RequestHandler,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.server.SessionExpiredHandler#handleSessionExpired(com.vaadin
* .server.VaadinRequest, com.vaadin.server.VaadinResponse)
diff --git a/server/src/main/java/com/vaadin/server/communication/ResourceWriter.java b/server/src/main/java/com/vaadin/server/communication/ResourceWriter.java
index 2834b3cea5..e663d004f4 100644
--- a/server/src/main/java/com/vaadin/server/communication/ResourceWriter.java
+++ b/server/src/main/java/com/vaadin/server/communication/ResourceWriter.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -33,7 +33,7 @@ import com.vaadin.ui.UI;
/**
* Serializes resources to JSON. Currently only used for {@link CustomLayout}
* templates.
- *
+ *
* @author Vaadin Ltd
* @since 7.1
*/
@@ -41,7 +41,7 @@ public class ResourceWriter implements Serializable {
/**
* Writes a JSON object containing registered resources.
- *
+ *
* @param ui
* The {@link UI} whose resources to write.
* @param writer
@@ -69,8 +69,8 @@ public class ResourceWriter implements Serializable {
final String resource = (String) i.next();
InputStream is = null;
try {
- is = ui.getSession().getService()
- .getThemeResourceAsStream(ui, ui.getTheme(), resource);
+ is = ui.getSession().getService().getThemeResourceAsStream(ui,
+ ui.getTheme(), resource);
} catch (final Exception e) {
// FIXME: Handle exception
getLogger().log(Level.FINER,
@@ -78,8 +78,8 @@ public class ResourceWriter implements Serializable {
}
if (is != null) {
- writer.write((resourceIndex++ > 0 ? ", " : "") + "\""
- + resource + "\" : ");
+ writer.write((resourceIndex++ > 0 ? ", " : "") + "\"" + resource
+ + "\" : ");
final StringBuffer layout = new StringBuffer();
try {
diff --git a/server/src/main/java/com/vaadin/server/communication/ServerRpcHandler.java b/server/src/main/java/com/vaadin/server/communication/ServerRpcHandler.java
index 03770d683e..dfdeed70ae 100644
--- a/server/src/main/java/com/vaadin/server/communication/ServerRpcHandler.java
+++ b/server/src/main/java/com/vaadin/server/communication/ServerRpcHandler.java
@@ -257,8 +257,8 @@ public class ServerRpcHandler implements Serializable {
// Just a duplicate message due to a bad connection or similar
// It has already been handled by the server so it is safe to
// ignore
- getLogger().fine(
- "Ignoring old message from the client. Expected: "
+ getLogger()
+ .fine("Ignoring old message from the client. Expected: "
+ expectedId + ", got: "
+ rpcRequest.getClientToServerId());
} else {
@@ -274,8 +274,8 @@ public class ServerRpcHandler implements Serializable {
rpcRequest.getRpcInvocationsData());
}
- ui.getConnectorTracker().cleanConcurrentlyRemovedConnectorIds(
- rpcRequest.getSyncId());
+ ui.getConnectorTracker()
+ .cleanConcurrentlyRemovedConnectorIds(rpcRequest.getSyncId());
if (rpcRequest.isResynchronize()) {
ui.getSession().getCommunicationManager().repaintAll(ui);
@@ -299,9 +299,8 @@ public class ServerRpcHandler implements Serializable {
}
if (!Version.getFullVersion().equals(widgetsetVersion)) {
- getLogger().warning(
- String.format(Constants.WIDGETSET_MISMATCH_INFO,
- Version.getFullVersion(), widgetsetVersion));
+ getLogger().warning(String.format(Constants.WIDGETSET_MISMATCH_INFO,
+ Version.getFullVersion(), widgetsetVersion));
}
}
@@ -355,12 +354,11 @@ public class ServerRpcHandler implements Serializable {
final ClientConnector connector = connectorTracker
.getConnector(invocation.getConnectorId());
if (connector == null) {
- getLogger()
- .log(Level.WARNING,
- "Received RPC call for unknown connector with id {0} (tried to invoke {1}.{2})",
- new Object[] { invocation.getConnectorId(),
- invocation.getInterfaceName(),
- invocation.getMethodName() });
+ getLogger().log(Level.WARNING,
+ "Received RPC call for unknown connector with id {0} (tried to invoke {1}.{2})",
+ new Object[] { invocation.getConnectorId(),
+ invocation.getInterfaceName(),
+ invocation.getMethodName() });
continue;
}
@@ -389,7 +387,8 @@ public class ServerRpcHandler implements Serializable {
continue;
}
// DragAndDropService has null UI
- if (connector.getUI() != null && connector.getUI().isClosing()) {
+ if (connector.getUI() != null
+ && connector.getUI().isClosing()) {
String msg = "Ignoring RPC call for connector "
+ connector.getClass().getName();
if (connector instanceof Component) {
@@ -413,9 +412,8 @@ public class ServerRpcHandler implements Serializable {
}
}
} catch (JsonException e) {
- getLogger().warning(
- "Unable to parse RPC call from the client: "
- + e.getMessage());
+ getLogger().warning("Unable to parse RPC call from the client: "
+ + e.getMessage());
throw new RuntimeException(e);
}
}
@@ -464,8 +462,7 @@ public class ServerRpcHandler implements Serializable {
} else {
throw new IllegalStateException(
"Received a legacy variable change for "
- + connector.getClass().getName()
- + " ("
+ + connector.getClass().getName() + " ("
+ connector.getConnectorId()
+ ") which is not a VariableOwner. The client-side connector sent these legacy variables: "
+ changes.keySet());
@@ -524,21 +521,15 @@ public class ServerRpcHandler implements Serializable {
String interfaceName = invocationJson.getString(1);
String methodName = invocationJson.getString(2);
- if (connectorTracker.getConnector(connectorId) == null
- && !connectorId
- .equals(ApplicationConstants.DRAG_AND_DROP_CONNECTOR_ID)) {
+ if (connectorTracker.getConnector(connectorId) == null && !connectorId
+ .equals(ApplicationConstants.DRAG_AND_DROP_CONNECTOR_ID)) {
if (!connectorTracker.connectorWasPresentAsRequestWasSent(
connectorId, lastSyncIdSeenByClient)) {
- getLogger()
- .log(Level.WARNING,
- "RPC call to "
- + interfaceName
- + "."
- + methodName
- + " received for connector "
- + connectorId
- + " but no such connector could be found. Resynchronizing client.");
+ getLogger().log(Level.WARNING, "RPC call to " + interfaceName
+ + "." + methodName + " received for connector "
+ + connectorId
+ + " but no such connector could be found. Resynchronizing client.");
// This is likely an out of sync issue (client tries to update a
// connector which is not present). Force resync.
connectorTracker.markAllConnectorsDirty();
@@ -548,8 +539,8 @@ public class ServerRpcHandler implements Serializable {
JsonArray parametersJson = invocationJson.getArray(3);
- if (LegacyChangeVariablesInvocation.isLegacyVariableChange(
- interfaceName, methodName)) {
+ if (LegacyChangeVariablesInvocation
+ .isLegacyVariableChange(interfaceName, methodName)) {
if (!(previousInvocation instanceof LegacyChangeVariablesInvocation)) {
previousInvocation = null;
}
@@ -603,11 +594,10 @@ public class ServerRpcHandler implements Serializable {
* corresponding to the received method invocation has been
* registered.
*/
- getLogger().warning(
- "Ignoring RPC call to " + interfaceName + "." + methodName
- + " in connector " + connector.getClass().getName()
- + "(" + connectorId
- + ") as no RPC implementation is registered");
+ getLogger().warning("Ignoring RPC call to " + interfaceName + "."
+ + methodName + " in connector "
+ + connector.getClass().getName() + "(" + connectorId
+ + ") as no RPC implementation is registered");
return null;
}
diff --git a/server/src/main/java/com/vaadin/server/communication/ServletBootstrapHandler.java b/server/src/main/java/com/vaadin/server/communication/ServletBootstrapHandler.java
index 46909cecee..bef9b71aef 100644
--- a/server/src/main/java/com/vaadin/server/communication/ServletBootstrapHandler.java
+++ b/server/src/main/java/com/vaadin/server/communication/ServletBootstrapHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -38,8 +38,8 @@ public class ServletBootstrapHandler extends BootstrapHandler {
@Override
public String getThemeName(BootstrapContext context) {
- String themeName = context.getRequest().getParameter(
- VaadinServlet.URL_PARAMETER_THEME);
+ String themeName = context.getRequest()
+ .getParameter(VaadinServlet.URL_PARAMETER_THEME);
if (themeName == null) {
themeName = super.getThemeName(context);
}
diff --git a/server/src/main/java/com/vaadin/server/communication/ServletUIInitHandler.java b/server/src/main/java/com/vaadin/server/communication/ServletUIInitHandler.java
index b3b1684809..44eda4c35c 100644
--- a/server/src/main/java/com/vaadin/server/communication/ServletUIInitHandler.java
+++ b/server/src/main/java/com/vaadin/server/communication/ServletUIInitHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,9 +25,8 @@ public class ServletUIInitHandler extends UIInitHandler {
}
public static boolean isUIInitRequest(VaadinRequest request) {
- return "POST".equals(request.getMethod())
- && request
- .getParameter(UIInitHandler.BROWSER_DETAILS_PARAMETER) != null;
+ return "POST".equals(request.getMethod()) && request
+ .getParameter(UIInitHandler.BROWSER_DETAILS_PARAMETER) != null;
}
}
diff --git a/server/src/main/java/com/vaadin/server/communication/SessionRequestHandler.java b/server/src/main/java/com/vaadin/server/communication/SessionRequestHandler.java
index 383ad2d541..c609610189 100644
--- a/server/src/main/java/com/vaadin/server/communication/SessionRequestHandler.java
+++ b/server/src/main/java/com/vaadin/server/communication/SessionRequestHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -39,10 +39,10 @@ import com.vaadin.server.VaadinSession;
* The session is not locked during execution of the request handlers. The
* request handler can itself decide if it needs to lock the session or not.
* </p>
- *
+ *
* @see VaadinSession#addRequestHandler(RequestHandler)
* @see RequestHandler
- *
+ *
* @since 7.1
*/
public class SessionRequestHandler implements RequestHandler {
diff --git a/server/src/main/java/com/vaadin/server/communication/SharedStateWriter.java b/server/src/main/java/com/vaadin/server/communication/SharedStateWriter.java
index 06b59ad4cc..ab91f6e605 100644
--- a/server/src/main/java/com/vaadin/server/communication/SharedStateWriter.java
+++ b/server/src/main/java/com/vaadin/server/communication/SharedStateWriter.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -35,7 +35,7 @@ import elemental.json.impl.JsonUtil;
/**
* Serializes {@link SharedState shared state} changes to JSON.
- *
+ *
* @author Vaadin Ltd
* @since 7.1
*/
@@ -44,7 +44,7 @@ public class SharedStateWriter implements Serializable {
/**
* Writes a JSON object containing the pending state changes of the dirty
* connectors of the given UI.
- *
+ *
* @param ui
* The UI whose state changes should be written.
* @param writer
@@ -74,7 +74,8 @@ public class SharedStateWriter implements Serializable {
throw new PaintException(
"Failed to serialize shared state for connector "
+ connector.getClass().getName() + " ("
- + connectorId + "): " + e.getMessage(), e);
+ + connectorId + "): " + e.getMessage(),
+ e);
}
}
writer.write(JsonUtil.stringify(sharedStates));
diff --git a/server/src/main/java/com/vaadin/server/communication/StreamingEndEventImpl.java b/server/src/main/java/com/vaadin/server/communication/StreamingEndEventImpl.java
index 6d87d0cc8b..70fb97fbd1 100644
--- a/server/src/main/java/com/vaadin/server/communication/StreamingEndEventImpl.java
+++ b/server/src/main/java/com/vaadin/server/communication/StreamingEndEventImpl.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -18,10 +18,11 @@ package com.vaadin.server.communication;
import com.vaadin.server.StreamVariable.StreamingEndEvent;
@SuppressWarnings("serial")
-final class StreamingEndEventImpl extends AbstractStreamingEvent implements
- StreamingEndEvent {
+final class StreamingEndEventImpl extends AbstractStreamingEvent
+ implements StreamingEndEvent {
- public StreamingEndEventImpl(String filename, String type, long totalBytes) {
+ public StreamingEndEventImpl(String filename, String type,
+ long totalBytes) {
super(filename, type, totalBytes, totalBytes);
}
diff --git a/server/src/main/java/com/vaadin/server/communication/StreamingErrorEventImpl.java b/server/src/main/java/com/vaadin/server/communication/StreamingErrorEventImpl.java
index a96f759216..4cc0ee459f 100644
--- a/server/src/main/java/com/vaadin/server/communication/StreamingErrorEventImpl.java
+++ b/server/src/main/java/com/vaadin/server/communication/StreamingErrorEventImpl.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -18,8 +18,8 @@ package com.vaadin.server.communication;
import com.vaadin.server.StreamVariable.StreamingErrorEvent;
@SuppressWarnings("serial")
-final class StreamingErrorEventImpl extends AbstractStreamingEvent implements
- StreamingErrorEvent {
+final class StreamingErrorEventImpl extends AbstractStreamingEvent
+ implements StreamingErrorEvent {
private final Exception exception;
diff --git a/server/src/main/java/com/vaadin/server/communication/StreamingProgressEventImpl.java b/server/src/main/java/com/vaadin/server/communication/StreamingProgressEventImpl.java
index 7f2428a55d..10fbbac08f 100644
--- a/server/src/main/java/com/vaadin/server/communication/StreamingProgressEventImpl.java
+++ b/server/src/main/java/com/vaadin/server/communication/StreamingProgressEventImpl.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -18,8 +18,8 @@ package com.vaadin.server.communication;
import com.vaadin.server.StreamVariable.StreamingProgressEvent;
@SuppressWarnings("serial")
-final class StreamingProgressEventImpl extends AbstractStreamingEvent implements
- StreamingProgressEvent {
+final class StreamingProgressEventImpl extends AbstractStreamingEvent
+ implements StreamingProgressEvent {
public StreamingProgressEventImpl(final String filename, final String type,
long contentLength, long bytesReceived) {
diff --git a/server/src/main/java/com/vaadin/server/communication/StreamingStartEventImpl.java b/server/src/main/java/com/vaadin/server/communication/StreamingStartEventImpl.java
index a2ce075458..42ed8a0bb9 100644
--- a/server/src/main/java/com/vaadin/server/communication/StreamingStartEventImpl.java
+++ b/server/src/main/java/com/vaadin/server/communication/StreamingStartEventImpl.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -18,8 +18,8 @@ package com.vaadin.server.communication;
import com.vaadin.server.StreamVariable.StreamingStartEvent;
@SuppressWarnings("serial")
-final class StreamingStartEventImpl extends AbstractStreamingEvent implements
- StreamingStartEvent {
+final class StreamingStartEventImpl extends AbstractStreamingEvent
+ implements StreamingStartEvent {
private boolean disposed;
diff --git a/server/src/main/java/com/vaadin/server/communication/UIInitHandler.java b/server/src/main/java/com/vaadin/server/communication/UIInitHandler.java
index f380a6df6e..f66dbe4107 100644
--- a/server/src/main/java/com/vaadin/server/communication/UIInitHandler.java
+++ b/server/src/main/java/com/vaadin/server/communication/UIInitHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -47,7 +47,7 @@ import elemental.json.impl.JsonUtil;
/**
* Handles an initial request from the client to initialize a {@link UI}.
- *
+ *
* @author Vaadin Ltd
* @since 7.1
*/
@@ -91,7 +91,7 @@ public abstract class UIInitHandler extends SynchronizedRequestHandler {
* Commit the JSON response. We can't write immediately to the output stream
* as we want to write only a critical notification if something goes wrong
* during the response handling.
- *
+ *
* @param request
* The request that resulted in this response
* @param response
@@ -122,7 +122,8 @@ public abstract class UIInitHandler extends SynchronizedRequestHandler {
return true;
}
- private UI getBrowserDetailsUI(VaadinRequest request, VaadinSession session) {
+ private UI getBrowserDetailsUI(VaadinRequest request,
+ VaadinSession session) {
VaadinService vaadinService = request.getService();
List<UIProvider> uiProviders = session.getUIProviders();
@@ -162,17 +163,16 @@ public abstract class UIInitHandler extends SynchronizedRequestHandler {
UI retainedUI = session.getUIByEmbedId(embedId);
if (retainedUI != null) {
- if (vaadinService.preserveUIOnRefresh(provider, new UICreateEvent(
- request, uiClass))) {
+ if (vaadinService.preserveUIOnRefresh(provider,
+ new UICreateEvent(request, uiClass))) {
if (uiClass.isInstance(retainedUI)) {
reinitUI(retainedUI, request);
return retainedUI;
} else {
- getLogger().info(
- "Not using the preserved UI " + embedId
- + " because it is of type "
- + retainedUI.getClass() + " but " + uiClass
- + " is expected for the request.");
+ getLogger().info("Not using the preserved UI " + embedId
+ + " because it is of type " + retainedUI.getClass()
+ + " but " + uiClass
+ + " is expected for the request.");
}
}
/*
@@ -218,9 +218,8 @@ public abstract class UIInitHandler extends SynchronizedRequestHandler {
// Warn if the window can't be preserved
if (embedId == null
&& vaadinService.preserveUIOnRefresh(provider, event)) {
- getLogger().warning(
- "There is no embed id available for UI " + uiClass
- + " that should be preserved.");
+ getLogger().warning("There is no embed id available for UI "
+ + uiClass + " that should be preserved.");
}
return ui;
@@ -228,13 +227,13 @@ public abstract class UIInitHandler extends SynchronizedRequestHandler {
/**
* Constructs an embed id based on information in the request.
- *
+ *
* @since 7.2
- *
+ *
* @param request
* the request to get embed information from
* @return the embed id, or <code>null</code> if id is not available.
- *
+ *
* @see UI#getEmbedId()
*/
protected String getEmbedId(VaadinRequest request) {
@@ -252,7 +251,7 @@ public abstract class UIInitHandler extends SynchronizedRequestHandler {
/**
* Updates a UI that has already been initialized but is now loaded again,
* e.g. because of {@link PreserveOnRefresh}.
- *
+ *
* @param ui
* @param request
*/
@@ -264,7 +263,7 @@ public abstract class UIInitHandler extends SynchronizedRequestHandler {
/**
* Generates the initial UIDL message that can e.g. be included in a html
* page to avoid a separate round trip just for getting the UIDL.
- *
+ *
* @param request
* the request that caused the initialization
* @param uI
@@ -295,7 +294,7 @@ public abstract class UIInitHandler extends SynchronizedRequestHandler {
/**
* Gets the security key (and generates one if needed) as UIDL.
- *
+ *
* @param session
* the vaadin session to which the security key belongs
* @return the security key UIDL or "" if the feature is turned off
diff --git a/server/src/main/java/com/vaadin/server/communication/UidlRequestHandler.java b/server/src/main/java/com/vaadin/server/communication/UidlRequestHandler.java
index 20b906c3e6..a9933a0054 100644
--- a/server/src/main/java/com/vaadin/server/communication/UidlRequestHandler.java
+++ b/server/src/main/java/com/vaadin/server/communication/UidlRequestHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -38,16 +38,16 @@ import elemental.json.JsonException;
/**
* Processes a UIDL request from the client.
- *
+ *
* Uses {@link ServerRpcHandler} to execute client-to-server RPC invocations and
* {@link UidlWriter} to write state changes and client RPC calls back to the
* client.
- *
+ *
* @author Vaadin Ltd
* @since 7.1
*/
-public class UidlRequestHandler extends SynchronizedRequestHandler implements
- SessionExpiredHandler {
+public class UidlRequestHandler extends SynchronizedRequestHandler
+ implements SessionExpiredHandler {
public static final String UIDL_PATH = "UIDL/";
@@ -59,7 +59,7 @@ public class UidlRequestHandler extends SynchronizedRequestHandler implements
/**
* Creates the ServerRpcHandler to use
- *
+ *
* @since 7.7
* @return the ServerRpcHandler to use
*/
@@ -132,7 +132,7 @@ public class UidlRequestHandler extends SynchronizedRequestHandler implements
/**
* Writes the opening of JSON message to be sent to client.
- *
+ *
* @param outWriter
* @param response
* @throws IOException
@@ -149,7 +149,7 @@ public class UidlRequestHandler extends SynchronizedRequestHandler implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.server.SessionExpiredHandler#handleSessionExpired(com.vaadin
* .server.VaadinRequest, com.vaadin.server.VaadinResponse)
@@ -176,7 +176,7 @@ public class UidlRequestHandler extends SynchronizedRequestHandler implements
/**
* Returns the JSON which should be returned to the client when a request
* for a non-existent UI arrives.
- *
+ *
* @param service
* The VaadinService
* @param vaadinRequest
@@ -186,8 +186,8 @@ public class UidlRequestHandler extends SynchronizedRequestHandler implements
*/
static String getUINotFoundErrorJSON(VaadinService service,
VaadinRequest vaadinRequest) {
- SystemMessages ci = service.getSystemMessages(
- vaadinRequest.getLocale(), vaadinRequest);
+ SystemMessages ci = service.getSystemMessages(vaadinRequest.getLocale(),
+ vaadinRequest);
// Session Expired is not really the correct message as the
// session exists but the requested UI does not.
// Using Communication Error for now.
diff --git a/server/src/main/java/com/vaadin/server/communication/UidlWriter.java b/server/src/main/java/com/vaadin/server/communication/UidlWriter.java
index 8a4e62fb24..c61060d95f 100644
--- a/server/src/main/java/com/vaadin/server/communication/UidlWriter.java
+++ b/server/src/main/java/com/vaadin/server/communication/UidlWriter.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -50,7 +50,7 @@ import elemental.json.impl.JsonUtil;
* Serializes pending server-side changes to UI state to JSON. This includes
* shared state, client RPC invocations, connector hierarchy changes, connector
* type information among others.
- *
+ *
* @author Vaadin Ltd
* @since 7.1
*/
@@ -58,7 +58,7 @@ public class UidlWriter implements Serializable {
/**
* Writes a JSON object containing all pending changes to the given UI.
- *
+ *
* @param ui
* The {@link UI} whose changes to write
* @param writer
@@ -68,7 +68,7 @@ public class UidlWriter implements Serializable {
* @param async
* True if this message is sent by the server asynchronously,
* false if it is a response to a client message.
- *
+ *
* @throws IOException
* If the writing fails.
*/
@@ -116,17 +116,15 @@ public class UidlWriter implements Serializable {
}
}
- getLogger().log(
- Level.FINE,
- "Found " + processedConnectors.size()
- + " dirty connectors to paint");
+ getLogger().log(Level.FINE, "Found " + processedConnectors.size()
+ + " dirty connectors to paint");
uiConnectorTracker.setWritingResponse(true);
try {
int syncId = service.getDeploymentConfiguration()
- .isSyncIdCheckEnabled() ? uiConnectorTracker
- .getCurrentSyncId() : -1;
+ .isSyncIdCheckEnabled()
+ ? uiConnectorTracker.getCurrentSyncId() : -1;
writer.write("\"" + ApplicationConstants.SERVER_SYNC_ID + "\": "
+ syncId + ", ");
if (repaintAll) {
@@ -159,8 +157,8 @@ public class UidlWriter implements Serializable {
// processing.
writer.write("\"state\":");
- Set<String> stateUpdateConnectors = new SharedStateWriter().write(
- ui, writer);
+ Set<String> stateUpdateConnectors = new SharedStateWriter()
+ .write(ui, writer);
writer.write(", "); // close states
// TODO This should be optimized. The type only needs to be
@@ -241,8 +239,8 @@ public class UidlWriter implements Serializable {
if (typeMappingsOpen) {
// send the whole type inheritance map if any new mappings
for (Class<? extends ClientConnector> class1 : usedClientConnectors) {
- if (!ClientConnector.class.isAssignableFrom(class1
- .getSuperclass())) {
+ if (!ClientConnector.class
+ .isAssignableFrom(class1.getSuperclass())) {
continue;
}
if (!typeInheritanceMapOpen) {
@@ -254,8 +252,8 @@ public class UidlWriter implements Serializable {
writer.write("\"");
writer.write(manager.getTagForType(class1));
writer.write("\" : ");
- writer.write(manager
- .getTagForType((Class<? extends ClientConnector>) class1
+ writer.write(manager.getTagForType(
+ (Class<? extends ClientConnector>) class1
.getSuperclass()));
}
if (typeInheritanceMapOpen) {
@@ -267,7 +265,7 @@ public class UidlWriter implements Serializable {
/*
* Ensure super classes come before sub classes to get script
* dependency order right. Sub class @JavaScript might assume that
- *
+ *
* @JavaScript defined by super class is already loaded.
*/
Collections.sort(newConnectorTypes, new Comparator<Class<?>>() {
@@ -294,8 +292,8 @@ public class UidlWriter implements Serializable {
.getAnnotation(JavaScript.class);
if (jsAnnotation != null) {
for (String uri : jsAnnotation.value()) {
- scriptDependencies.add(manager.registerDependency(uri,
- class1));
+ scriptDependencies
+ .add(manager.registerDependency(uri, class1));
}
}
@@ -303,8 +301,8 @@ public class UidlWriter implements Serializable {
.getAnnotation(StyleSheet.class);
if (styleAnnotation != null) {
for (String uri : styleAnnotation.value()) {
- styleDependencies.add(manager.registerDependency(uri,
- class1));
+ styleDependencies
+ .add(manager.registerDependency(uri, class1));
}
}
}
@@ -327,7 +325,8 @@ public class UidlWriter implements Serializable {
uiConnectorTracker.markClientSideInitialized(connector);
}
- assert (uiConnectorTracker.getDirtyConnectors().isEmpty()) : "Connectors have been marked as dirty during the end of the paint phase. This is most certainly not intended.";
+ assert (uiConnectorTracker.getDirtyConnectors()
+ .isEmpty()) : "Connectors have been marked as dirty during the end of the paint phase. This is most certainly not intended.";
writePerformanceData(ui, writer);
} finally {
@@ -348,15 +347,15 @@ public class UidlWriter implements Serializable {
/**
* Adds the performance timing data (used by TestBench 3) to the UIDL
* response.
- *
+ *
* @throws IOException
*/
private void writePerformanceData(UI ui, Writer writer) throws IOException {
if (!ui.getSession().getService().getDeploymentConfiguration()
.isProductionMode()) {
- writer.write(String.format(", \"timings\":[%d, %d]", ui
- .getSession().getCumulativeRequestDuration(), ui
- .getSession().getLastRequestDuration()));
+ writer.write(String.format(", \"timings\":[%d, %d]",
+ ui.getSession().getCumulativeRequestDuration(),
+ ui.getSession().getLastRequestDuration()));
}
}
diff --git a/server/src/main/java/com/vaadin/server/communication/data/DataGenerator.java b/server/src/main/java/com/vaadin/server/communication/data/DataGenerator.java
index 58ba1b3b00..2a45e05a0c 100644
--- a/server/src/main/java/com/vaadin/server/communication/data/DataGenerator.java
+++ b/server/src/main/java/com/vaadin/server/communication/data/DataGenerator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import elemental.json.JsonObject;
* <p>
* This class also provides a way to remove any unneeded data once the data
* object is no longer used on the client-side.
- *
+ *
* @since 7.6
* @author Vaadin Ltd
*/
@@ -36,7 +36,7 @@ public interface DataGenerator extends Serializable {
/**
* Adds data to row object for given item and item id being sent to client.
- *
+ *
* @param itemId
* item id of item
* @param item
@@ -50,7 +50,7 @@ public interface DataGenerator extends Serializable {
* Informs the DataGenerator that an item id has been dropped and is no
* longer needed. This method should clean up any unneeded stored data
* related to the item.
- *
+ *
* @param itemId
* removed item id
*/
diff --git a/server/src/main/java/com/vaadin/server/communication/data/RpcDataProviderExtension.java b/server/src/main/java/com/vaadin/server/communication/data/RpcDataProviderExtension.java
index 08c70c14cf..fb500eb870 100644
--- a/server/src/main/java/com/vaadin/server/communication/data/RpcDataProviderExtension.java
+++ b/server/src/main/java/com/vaadin/server/communication/data/RpcDataProviderExtension.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -58,7 +58,7 @@ import elemental.json.JsonObject;
* implemented as an Extension hardcoded to support a specific connector type.
* This will be changed once framework support for something more flexible has
* been implemented.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -66,7 +66,7 @@ public class RpcDataProviderExtension extends AbstractExtension {
/**
* Class for keeping track of current items and ValueChangeListeners.
- *
+ *
* @since 7.6
*/
private class ActiveItemHandler implements Serializable, DataGenerator {
@@ -80,7 +80,7 @@ public class RpcDataProviderExtension extends AbstractExtension {
* <p>
* Note: This method will clean up any unneeded listeners and key
* mappings
- *
+ *
* @param itemIds
* collection of new active item ids
*/
@@ -101,7 +101,7 @@ public class RpcDataProviderExtension extends AbstractExtension {
/**
* Marks given item id as dropped. Dropped items are cleared when adding
* new active items.
- *
+ *
* @param itemId
* dropped item id
*/
@@ -113,7 +113,7 @@ public class RpcDataProviderExtension extends AbstractExtension {
/**
* Gets a collection copy of currently active item ids.
- *
+ *
* @return collection of item ids
*/
public Collection<Object> getActiveItemIds() {
@@ -122,7 +122,7 @@ public class RpcDataProviderExtension extends AbstractExtension {
/**
* Gets a collection copy of currently active ValueChangeListeners.
- *
+ *
* @return collection of value change listeners
*/
public Collection<GridValueChangeListener> getValueChangeListeners() {
@@ -163,7 +163,7 @@ public class RpcDataProviderExtension extends AbstractExtension {
* Since there's no Container-wide possibility to listen to any kind of
* value changes, an instance of this class needs to be attached to each and
* every Item's Property in the container.
- *
+ *
* @see Grid#addValueChangeListener(Container, Object, Object)
* @see Grid#valueChangeListeners
*/
@@ -199,8 +199,8 @@ public class RpcDataProviderExtension extends AbstractExtension {
private void internalAddColumns(Collection<Column> addedColumns) {
for (final Column column : addedColumns) {
- final Property<?> property = item.getItemProperty(column
- .getPropertyId());
+ final Property<?> property = item
+ .getItemProperty(column.getPropertyId());
if (property instanceof ValueChangeNotifier) {
((ValueChangeNotifier) property)
.addValueChangeListener(this);
@@ -210,8 +210,8 @@ public class RpcDataProviderExtension extends AbstractExtension {
public void removeColumns(Collection<Column> removedColumns) {
for (final Column column : removedColumns) {
- final Property<?> property = item.getItemProperty(column
- .getPropertyId());
+ final Property<?> property = item
+ .getItemProperty(column.getPropertyId());
if (property instanceof ValueChangeNotifier) {
((ValueChangeNotifier) property)
.removeValueChangeListener(this);
@@ -278,7 +278,7 @@ public class RpcDataProviderExtension extends AbstractExtension {
/**
* Creates a new data provider using the given container.
- *
+ *
* @param container
* the container to make available
*/
@@ -297,8 +297,8 @@ public class RpcDataProviderExtension extends AbstractExtension {
@Override
public void dropRows(JsonArray rowKeys) {
for (int i = 0; i < rowKeys.length(); ++i) {
- activeItemHandler.dropActiveItem(getKeyMapper().get(
- rowKeys.getString(i)));
+ activeItemHandler.dropActiveItem(
+ getKeyMapper().get(rowKeys.getString(i)));
}
}
});
@@ -383,7 +383,8 @@ public class RpcDataProviderExtension extends AbstractExtension {
diff = cached.length();
}
- for (int i = 0; i < newRange.length() && i + diff < itemIds.size(); ++i) {
+ for (int i = 0; i < newRange.length()
+ && i + diff < itemIds.size(); ++i) {
Object itemId = itemIds.get(i + diff);
Item item = container.getItem(itemId);
@@ -408,7 +409,7 @@ public class RpcDataProviderExtension extends AbstractExtension {
/**
* Makes the data source available to the given {@link Grid} component.
- *
+ *
* @param component
* the remote data grid component to extend
* @param columnKeys
@@ -422,7 +423,7 @@ public class RpcDataProviderExtension extends AbstractExtension {
* Adds a {@link DataGenerator} for this {@code RpcDataProviderExtension}.
* DataGenerators are called when sending row data to client. If given
* DataGenerator is already added, this method does nothing.
- *
+ *
* @since 7.6
* @param generator
* generator to add
@@ -435,7 +436,7 @@ public class RpcDataProviderExtension extends AbstractExtension {
* Removes a {@link DataGenerator} from this
* {@code RpcDataProviderExtension}. If given DataGenerator is not added to
* this data provider, this method does nothing.
- *
+ *
* @since 7.6
* @param generator
* generator to remove
@@ -447,7 +448,7 @@ public class RpcDataProviderExtension extends AbstractExtension {
/**
* Informs the client side that new rows have been inserted into the data
* source.
- *
+ *
* @param index
* the index at which new rows have been inserted
* @param count
@@ -478,7 +479,7 @@ public class RpcDataProviderExtension extends AbstractExtension {
/**
* Informs the client side that rows have been removed from the data source.
- *
+ *
* @param index
* the index of the first row removed
* @param count
@@ -507,7 +508,7 @@ public class RpcDataProviderExtension extends AbstractExtension {
/**
* Informs the client side that data of a row has been modified in the data
* source.
- *
+ *
* @param itemId
* the item Id the row that was updated
*/
@@ -576,7 +577,7 @@ public class RpcDataProviderExtension extends AbstractExtension {
/**
* Informs all DataGenerators than an item id has been dropped.
- *
+ *
* @param droppedItemIds
* collection of dropped item ids
*/
@@ -591,7 +592,7 @@ public class RpcDataProviderExtension extends AbstractExtension {
/**
* Informs this data provider that given columns have been removed from
* grid.
- *
+ *
* @param removedColumns
* a list of removed columns
*/
@@ -607,7 +608,7 @@ public class RpcDataProviderExtension extends AbstractExtension {
/**
* Informs this data provider that given columns have been added to grid.
- *
+ *
* @param addedColumns
* a list of added columns
*/
diff --git a/server/src/main/java/com/vaadin/server/themeutils/SASSAddonImportFileCreator.java b/server/src/main/java/com/vaadin/server/themeutils/SASSAddonImportFileCreator.java
index cfee2a320e..2f8b1459b5 100644
--- a/server/src/main/java/com/vaadin/server/themeutils/SASSAddonImportFileCreator.java
+++ b/server/src/main/java/com/vaadin/server/themeutils/SASSAddonImportFileCreator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -36,11 +36,11 @@ import com.vaadin.server.widgetsetutils.ClassPathExplorer.LocationInfo;
* Helper class for managing the addon imports and creating an a SCSS file for
* importing all your addon themes. The helper method searches the classpath for
* Vaadin addons and uses the 'Vaadin-Themes' metadata to create the imports.
- *
+ *
* <p>
* The addons.scss is always overwritten when this tool is invoked.
* </p>
- *
+ *
* @since 7.1
*/
public class SASSAddonImportFileCreator {
@@ -51,7 +51,7 @@ public class SASSAddonImportFileCreator {
+ "will be overwritten from time to time.";
/**
- *
+ *
* @param args
* Theme directory where the addons.scss file should be created
*/
@@ -66,7 +66,7 @@ public class SASSAddonImportFileCreator {
/**
* Updates a themes addons.scss with the addon themes found on the classpath
- *
+ *
* @param themeDirectory
* The target theme directory
*/
@@ -87,8 +87,8 @@ public class SASSAddonImportFileCreator {
.getAvailableWidgetSetsAndStylesheets();
try {
- PrintStream printStream = new PrintStream(new FileOutputStream(
- addonImports));
+ PrintStream printStream = new PrintStream(
+ new FileOutputStream(addonImports));
printStream.println("/* " + ADDON_IMPORTS_FILE_TEXT + " */");
@@ -119,8 +119,8 @@ public class SASSAddonImportFileCreator {
List<String> mixins = new ArrayList<String>();
for (String path : paths) {
- mixins.addAll(addImport(printStream, path,
- addonThemes.get(path)));
+ mixins.addAll(
+ addImport(printStream, path, addonThemes.get(path)));
printStream.println();
}
@@ -187,7 +187,8 @@ public class SASSAddonImportFileCreator {
private static void createAddonsMixin(PrintStream stream,
List<String> mixins) {
- stream.println("/* Import and include this mixin into your project theme to include the addon themes */");
+ stream.println(
+ "/* Import and include this mixin into your project theme to include the addon themes */");
stream.println("@mixin addons {");
for (String addon : mixins) {
stream.println("\t@include " + addon + ";");
diff --git a/server/src/main/java/com/vaadin/server/widgetsetutils/ClassPathExplorer.java b/server/src/main/java/com/vaadin/server/widgetsetutils/ClassPathExplorer.java
index 99ec884c42..fefdf18e70 100644
--- a/server/src/main/java/com/vaadin/server/widgetsetutils/ClassPathExplorer.java
+++ b/server/src/main/java/com/vaadin/server/widgetsetutils/ClassPathExplorer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -49,7 +49,7 @@ import java.util.jar.Manifest;
* appropriate monkey code for gwt directly in annotation processor and get rid
* of {@link WidgetMapGenerator}. Using annotation processor might be a good
* idea when dropping Java 1.5 support (integrated to javac in 6).
- *
+ *
*/
public class ClassPathExplorer {
@@ -71,7 +71,7 @@ public class ClassPathExplorer {
/**
* Contains information about widgetsets and themes found on the classpath
- *
+ *
* @since 7.1
*/
public static class LocationInfo {
@@ -80,7 +80,8 @@ public class ClassPathExplorer {
private final Map<String, URL> addonStyles;
- public LocationInfo(Map<String, URL> widgetsets, Map<String, URL> themes) {
+ public LocationInfo(Map<String, URL> widgetsets,
+ Map<String, URL> themes) {
this.widgetsets = widgetsets;
addonStyles = themes;
}
@@ -107,7 +108,8 @@ public class ClassPathExplorer {
* slash, or a URL for a JAR file) to the corresponding URLs. This is
* constructed from the class path.
*/
- private static Map<String, URL> classpathLocations = getClasspathLocations(rawClasspathEntries);
+ private static Map<String, URL> classpathLocations = getClasspathLocations(
+ rawClasspathEntries);
private static boolean debug = false;
@@ -126,7 +128,7 @@ public class ClassPathExplorer {
/**
* Finds the names and locations of widgetsets available on the class path.
- *
+ *
* @return map from widgetset classname to widgetset location URL
* @deprecated Use {@link #getAvailableWidgetSetsAndStylesheets()} instead
*/
@@ -138,7 +140,7 @@ public class ClassPathExplorer {
/**
* Finds the names and locations of widgetsets and themes available on the
* class path.
- *
+ *
* @return
*/
public static LocationInfo getAvailableWidgetSetsAndStylesheets() {
@@ -178,13 +180,13 @@ public class ClassPathExplorer {
/**
* Finds all GWT modules / Vaadin widgetsets and Addon styles in a valid
* location.
- *
+ *
* If the location is a directory, all GWT modules (files with the
* ".gwt.xml" extension) are added to widgetsets.
- *
+ *
* If the location is a JAR file, the comma-separated values of the
* "Vaadin-Widgetsets" attribute in its manifest are added to widgetsets.
- *
+ *
* @param locationString
* an entry in {@link #classpathLocations}
* @param widgetsets
@@ -192,9 +194,8 @@ public class ClassPathExplorer {
* separators) to a URL (see {@link #classpathLocations}) - new
* entries are added to this map
*/
- private static void searchForWidgetSetsAndAddonStyles(
- String locationString, Map<String, URL> widgetsets,
- Map<String, URL> addonStyles) {
+ private static void searchForWidgetSetsAndAddonStyles(String locationString,
+ Map<String, URL> widgetsets, Map<String, URL> addonStyles) {
URL location = classpathLocations.get(locationString);
File directory = new File(location.getFile());
@@ -210,8 +211,8 @@ public class ClassPathExplorer {
// remove the .gwt.xml extension
String classname = files[i].substring(0, files[i].length() - 8);
- String packageName = locationString.substring(locationString
- .lastIndexOf("/") + 1);
+ String packageName = locationString
+ .substring(locationString.lastIndexOf("/") + 1);
classname = packageName + "." + classname;
if (!WidgetSetBuilder.isWidgetset(classname)) {
@@ -222,8 +223,8 @@ public class ClassPathExplorer {
if (!widgetsets.containsKey(classname)) {
String packagePath = packageName.replaceAll("\\.", "/");
- String basePath = location.getFile().replaceAll(
- "/" + packagePath + "$", "");
+ String basePath = location.getFile()
+ .replaceAll("/" + packagePath + "$", "");
try {
URL url = new URL(location.getProtocol(),
location.getHost(), location.getPort(),
@@ -255,8 +256,8 @@ public class ClassPathExplorer {
}
// Check for widgetset attribute
- String value = manifest.getMainAttributes().getValue(
- "Vaadin-Widgetsets");
+ String value = manifest.getMainAttributes()
+ .getValue("Vaadin-Widgetsets");
if (value != null) {
String[] widgetsetNames = value.split(",");
for (int i = 0; i < widgetsetNames.length; i++) {
@@ -268,8 +269,8 @@ public class ClassPathExplorer {
}
// Check for theme attribute
- value = manifest.getMainAttributes().getValue(
- "Vaadin-Stylesheets");
+ value = manifest.getMainAttributes()
+ .getValue("Vaadin-Stylesheets");
if (value != null) {
String[] stylesheets = value.split(",");
for (int i = 0; i < stylesheets.length; i++) {
@@ -290,9 +291,9 @@ public class ClassPathExplorer {
/**
* Splits the current class path into entries, and filters them accepting
* directories, Vaadin add-on JARs with widgetsets and Vaadin JARs.
- *
+ *
* Some other non-JAR entries may also be included in the result.
- *
+ *
* @return filtered list of class path entries
*/
private final static List<String> getRawClasspathEntries() {
@@ -325,9 +326,9 @@ public class ClassPathExplorer {
/**
* Determine every URL location defined by the current classpath, and it's
* associated package name.
- *
+ *
* See {@link #classpathLocations} for information on output format.
- *
+ *
* @param rawClasspathEntries
* raw class path entries as split from the Java class path
* string
@@ -352,14 +353,14 @@ public class ClassPathExplorer {
/**
* Checks a class path entry to see whether it can contain widgets and
* widgetsets.
- *
+ *
* All directories are automatically accepted. JARs are accepted if they
* have the "Vaadin-Widgetsets" attribute in their manifest or the JAR file
* name contains "vaadin-" or ".vaadin.".
- *
+ *
* Also other non-JAR entries may be accepted, the caller should be prepared
* to handle them.
- *
+ *
* @param classpathEntry
* class path entry string as given in the Java class path
* @return true if the entry should be considered when looking for widgets
@@ -390,10 +391,12 @@ public class ClassPathExplorer {
if (manifest != null) {
Attributes mainAttributes = manifest
.getMainAttributes();
- if (mainAttributes.getValue("Vaadin-Widgetsets") != null) {
+ if (mainAttributes
+ .getValue("Vaadin-Widgetsets") != null) {
return true;
}
- if (mainAttributes.getValue("Vaadin-Stylesheets") != null) {
+ if (mainAttributes
+ .getValue("Vaadin-Stylesheets") != null) {
return true;
}
}
@@ -415,7 +418,7 @@ public class ClassPathExplorer {
/**
* Recursively add subdirectories and jar files to locations - see
* {@link #classpathLocations}.
- *
+ *
* @param name
* @param file
* @param locations
@@ -462,7 +465,7 @@ public class ClassPathExplorer {
/**
* Add a jar file to locations - see {@link #classpathLocations}.
- *
+ *
* @param name
* @param locations
*/
@@ -486,12 +489,12 @@ public class ClassPathExplorer {
/**
* Find and return the default source directory where to create new
* widgetsets.
- *
+ *
* Return the first directory (not a JAR file etc.) on the classpath by
* default.
- *
+ *
* TODO this could be done better...
- *
+ *
* @return URL
*/
public static URL getDefaultSourceDirectory() {
@@ -501,17 +504,17 @@ public class ClassPathExplorer {
/**
* Find and return the source directory which contains the given widgetset
* file.
- *
+ *
* If not applicable or widgetsetFileName is null, return the first
* directory (not a JAR file etc.) on the classpath.
- *
+ *
* TODO this could be done better...
*
* @since 7.6.5
- *
+ *
* @param widgetsetFileName
* relative path for the widgetset
- *
+ *
* @return URL
*/
public static URL getWidgetsetSourceDirectory(String widgetsetFileName) {
@@ -541,7 +544,8 @@ public class ClassPathExplorer {
}
if (widgetsetFileName == null
- || new File(directory, widgetsetFileName).exists()) {
+ || new File(directory, widgetsetFileName)
+ .exists()) {
return directoryUrl;
}
} catch (MalformedURLException e) {
diff --git a/server/src/main/java/com/vaadin/server/widgetsetutils/WidgetSetBuilder.java b/server/src/main/java/com/vaadin/server/widgetsetutils/WidgetSetBuilder.java
index 58e90f9268..74e13d35ee 100644
--- a/server/src/main/java/com/vaadin/server/widgetsetutils/WidgetSetBuilder.java
+++ b/server/src/main/java/com/vaadin/server/widgetsetutils/WidgetSetBuilder.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -37,11 +37,11 @@ import java.util.regex.Pattern;
/**
* Helper class to update widgetsets GWT module configuration file. Can be used
* command line or via IDE tools.
- *
+ *
* <p>
* If module definition file contains text "WS Compiler: manually edited", tool
* will skip editing file.
- *
+ *
*/
public class WidgetSetBuilder {
@@ -84,28 +84,25 @@ public class WidgetSetBuilder {
}
}
widgetsetFile.createNewFile();
- PrintStream printStream = new PrintStream(new FileOutputStream(
- widgetsetFile));
- printStream
- .print("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
- + "<!DOCTYPE module PUBLIC \"-//Google Inc.//DTD Google Web Toolkit 2.5.1//EN\" \"http://google-web-toolkit.googlecode.com/svn/tags/2.5.1/distro-source/core/src/gwt-module.dtd\">\n");
+ PrintStream printStream = new PrintStream(
+ new FileOutputStream(widgetsetFile));
+ printStream.print("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+ + "<!DOCTYPE module PUBLIC \"-//Google Inc.//DTD Google Web Toolkit 2.5.1//EN\" \"http://google-web-toolkit.googlecode.com/svn/tags/2.5.1/distro-source/core/src/gwt-module.dtd\">\n");
printStream.print("<module>\n");
- printStream
- .print(" <!--\n"
- + " Uncomment the following to compile the widgetset for one browser only.\n\n"
- + " Multiple browsers can be specified as a comma separated list. The\n"
- + " supported user agents at the moment of writing were:\n"
- + " ie8,ie9,gecko1_8,safari,opera\n\n"
- + " The value gecko1_8 is used for Firefox and safari is used for webkit\n"
- + " based browsers including Google Chrome.\n"
- + " -->\n"
- + " <!-- <set-property name=\"user.agent\" value=\"safari\"/> -->\n\n"
- + " <!--\n"
- + " To enable SuperDevMode, uncomment this line.\n\n"
- + " See https://vaadin.com/wiki/-/wiki/Main/Using%20SuperDevMode for more\n"
- + " information and instructions.\n"
- + " -->\n"
- + " <!-- <set-configuration-property name=\"devModeRedirectEnabled\" value=\"true\" /> -->\n\n");
+ printStream.print(" <!--\n"
+ + " Uncomment the following to compile the widgetset for one browser only.\n\n"
+ + " Multiple browsers can be specified as a comma separated list. The\n"
+ + " supported user agents at the moment of writing were:\n"
+ + " ie8,ie9,gecko1_8,safari,opera\n\n"
+ + " The value gecko1_8 is used for Firefox and safari is used for webkit\n"
+ + " based browsers including Google Chrome.\n"
+ + " -->\n"
+ + " <!-- <set-property name=\"user.agent\" value=\"safari\"/> -->\n\n"
+ + " <!--\n"
+ + " To enable SuperDevMode, uncomment this line.\n\n"
+ + " See https://vaadin.com/wiki/-/wiki/Main/Using%20SuperDevMode for more\n"
+ + " information and instructions.\n" + " -->\n"
+ + " <!-- <set-configuration-property name=\"devModeRedirectEnabled\" value=\"true\" /> -->\n\n");
printStream.print("\n</module>\n");
printStream.close();
changed = true;
@@ -115,7 +112,8 @@ public class WidgetSetBuilder {
if (isEditable(content)) {
String originalContent = content;
- Collection<String> oldInheritedWidgetsets = getCurrentInheritedWidgetsets(content);
+ Collection<String> oldInheritedWidgetsets = getCurrentInheritedWidgetsets(
+ content);
// add widgetsets that do not exist
Iterator<String> i = availableWidgetSets.keySet().iterator();
@@ -164,8 +162,8 @@ public class WidgetSetBuilder {
}
private static String addWidgetSet(String ws, String content) {
- return content.replace("</module>", "\n <inherits name=\"" + ws
- + "\" />" + "\n</module>");
+ return content.replace("</module>",
+ "\n <inherits name=\"" + ws + "\" />" + "\n</module>");
}
private static Collection<String> getCurrentInheritedWidgetsets(
@@ -209,7 +207,8 @@ public class WidgetSetBuilder {
o.println(" 2. Give the widgetsetname (to be created or updated)"
+ " as first parameter");
o.println();
- o.println("All found vaadin widgetsets will be inherited in given widgetset");
+ o.println(
+ "All found vaadin widgetsets will be inherited in given widgetset");
}
diff --git a/server/src/main/java/com/vaadin/ui/AbsoluteLayout.java b/server/src/main/java/com/vaadin/ui/AbsoluteLayout.java
index c62da24612..0be3c6cb46 100644
--- a/server/src/main/java/com/vaadin/ui/AbsoluteLayout.java
+++ b/server/src/main/java/com/vaadin/ui/AbsoluteLayout.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -40,11 +40,11 @@ import com.vaadin.ui.declarative.DesignContext;
/**
* AbsoluteLayout is a layout implementation that mimics html absolute
* positioning.
- *
+ *
*/
@SuppressWarnings("serial")
-public class AbsoluteLayout extends AbstractLayout implements
- LayoutClickNotifier {
+public class AbsoluteLayout extends AbstractLayout
+ implements LayoutClickNotifier {
// constants for design attributes
private static final String ATTR_TOP = ":top";
@@ -90,7 +90,7 @@ public class AbsoluteLayout extends AbstractLayout implements
/**
* Gets the number of contained components. Consistent with the iterator
* returned by {@link #getComponentIterator()}.
- *
+ *
* @return the number of contained components
*/
@Override
@@ -103,7 +103,8 @@ public class AbsoluteLayout extends AbstractLayout implements
* old components position.
*/
@Override
- public void replaceComponent(Component oldComponent, Component newComponent) {
+ public void replaceComponent(Component oldComponent,
+ Component newComponent) {
ComponentPosition position = getPosition(oldComponent);
removeComponent(oldComponent);
addComponent(newComponent, position);
@@ -111,10 +112,9 @@ public class AbsoluteLayout extends AbstractLayout implements
/*
* (non-Javadoc)
- *
- * @see
- * com.vaadin.ui.AbstractComponentContainer#addComponent(com.vaadin.ui.Component
- * )
+ *
+ * @see com.vaadin.ui.AbstractComponentContainer#addComponent(com.vaadin.ui.
+ * Component )
*/
@Override
public void addComponent(Component c) {
@@ -129,7 +129,7 @@ public class AbsoluteLayout extends AbstractLayout implements
* 10 pixels from the left and 10 pixels from the top. The identifiers:
* "top","left","right" and "bottom" can be used to specify the position.
* </p>
- *
+ *
* @param c
* The component to add to the layout
* @param cssPosition
@@ -144,7 +144,7 @@ public class AbsoluteLayout extends AbstractLayout implements
/**
* Adds the component using the given position. Ensures the position is only
* set if the component is added correctly.
- *
+ *
* @param c
* The component to add
* @param position
@@ -175,7 +175,7 @@ public class AbsoluteLayout extends AbstractLayout implements
* Removes the component from all internal data structures. Does not
* actually remove the component from the layout (this is assumed to have
* been done by the caller).
- *
+ *
* @param c
* The component to remove
*/
@@ -194,8 +194,8 @@ public class AbsoluteLayout extends AbstractLayout implements
Map<String, String> connectorToPosition = new HashMap<String, String>();
for (Iterator<Component> ci = getComponentIterator(); ci.hasNext();) {
Component c = ci.next();
- connectorToPosition.put(c.getConnectorId(), getPosition(c)
- .getCSSString());
+ connectorToPosition.put(c.getConnectorId(),
+ getPosition(c).getCSSString());
}
getState().connectorToCssPosition = connectorToPosition;
@@ -203,7 +203,7 @@ public class AbsoluteLayout extends AbstractLayout implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.ui.AbstractComponentContainer#removeComponent(com.vaadin.ui
* .Component)
@@ -222,7 +222,7 @@ public class AbsoluteLayout extends AbstractLayout implements
* {@link #setPosition(Component, ComponentPosition)} with the updated
* {@link ComponentPosition} object.
* </p>
- *
+ *
* @param component
* The component which position is needed
* @return An instance of ComponentPosition containing the position of the
@@ -235,7 +235,7 @@ public class AbsoluteLayout extends AbstractLayout implements
/**
* Sets the position of a component in the layout.
- *
+ *
* @param component
* @param position
*/
@@ -250,7 +250,7 @@ public class AbsoluteLayout extends AbstractLayout implements
/**
* Updates the position for a component. Caller must ensure component is a
* child of this layout.
- *
+ *
* @param component
* The component. Must be a child for this layout. Not enforced.
* @param position
@@ -283,11 +283,11 @@ public class AbsoluteLayout extends AbstractLayout implements
/**
* Sets the position attributes using CSS syntax. Attributes not
* included in the string are reset to their unset states.
- *
+ *
* <code><pre>
* setCSSString("top:10px;left:20%;z-index:16;");
* </pre></code>
- *
+ *
* @param css
*/
public void setCSSString(String css) {
@@ -341,7 +341,7 @@ public class AbsoluteLayout extends AbstractLayout implements
/**
* Converts the internal values into a valid CSS string.
- *
+ *
* @return A valid CSS string
*/
public String getCSSString() {
@@ -367,7 +367,7 @@ public class AbsoluteLayout extends AbstractLayout implements
/**
* Sets the 'top' attribute; distance from the top of the component to
* the top edge of the layout.
- *
+ *
* @param topValue
* The value of the 'top' attribute
* @param topUnits
@@ -383,7 +383,7 @@ public class AbsoluteLayout extends AbstractLayout implements
/**
* Sets the 'right' attribute; distance from the right of the component
* to the right edge of the layout.
- *
+ *
* @param rightValue
* The value of the 'right' attribute
* @param rightUnits
@@ -399,7 +399,7 @@ public class AbsoluteLayout extends AbstractLayout implements
/**
* Sets the 'bottom' attribute; distance from the bottom of the
* component to the bottom edge of the layout.
- *
+ *
* @param bottomValue
* The value of the 'bottom' attribute
* @param units
@@ -415,7 +415,7 @@ public class AbsoluteLayout extends AbstractLayout implements
/**
* Sets the 'left' attribute; distance from the left of the component to
* the left edge of the layout.
- *
+ *
* @param leftValue
* The value of the 'left' attribute
* @param units
@@ -430,7 +430,7 @@ public class AbsoluteLayout extends AbstractLayout implements
/**
* Sets the 'z-index' attribute; the visual stacking order
- *
+ *
* @param zIndex
* The z-index for the component.
*/
@@ -442,7 +442,7 @@ public class AbsoluteLayout extends AbstractLayout implements
/**
* Sets the value of the 'top' attribute; distance from the top of the
* component to the top edge of the layout.
- *
+ *
* @param topValue
* The value of the 'left' attribute
*/
@@ -453,7 +453,7 @@ public class AbsoluteLayout extends AbstractLayout implements
/**
* Gets the 'top' attributes value in current units.
- *
+ *
* @see #getTopUnits()
* @return The value of the 'top' attribute, null if not set
*/
@@ -463,7 +463,7 @@ public class AbsoluteLayout extends AbstractLayout implements
/**
* Gets the 'right' attributes value in current units.
- *
+ *
* @return The value of the 'right' attribute, null if not set
* @see #getRightUnits()
*/
@@ -475,7 +475,7 @@ public class AbsoluteLayout extends AbstractLayout implements
* Sets the 'right' attribute value (distance from the right of the
* component to the right edge of the layout). Currently active units
* are maintained.
- *
+ *
* @param rightValue
* The value of the 'right' attribute
* @see #setRightUnits(int)
@@ -487,7 +487,7 @@ public class AbsoluteLayout extends AbstractLayout implements
/**
* Gets the 'bottom' attributes value using current units.
- *
+ *
* @return The value of the 'bottom' attribute, null if not set
* @see #getBottomUnits()
*/
@@ -499,7 +499,7 @@ public class AbsoluteLayout extends AbstractLayout implements
* Sets the 'bottom' attribute value (distance from the bottom of the
* component to the bottom edge of the layout). Currently active units
* are maintained.
- *
+ *
* @param bottomValue
* The value of the 'bottom' attribute
* @see #setBottomUnits(int)
@@ -511,7 +511,7 @@ public class AbsoluteLayout extends AbstractLayout implements
/**
* Gets the 'left' attributes value using current units.
- *
+ *
* @return The value of the 'left' attribute, null if not set
* @see #getLeftUnits()
*/
@@ -523,7 +523,7 @@ public class AbsoluteLayout extends AbstractLayout implements
* Sets the 'left' attribute value (distance from the left of the
* component to the left edge of the layout). Currently active units are
* maintained.
- *
+ *
* @param leftValue
* The value of the 'left' CSS-attribute
* @see #setLeftUnits(int)
@@ -535,7 +535,7 @@ public class AbsoluteLayout extends AbstractLayout implements
/**
* Gets the unit for the 'top' attribute
- *
+ *
* @return See {@link Sizeable} UNIT_SYMBOLS for a description of the
* available units.
*/
@@ -545,7 +545,7 @@ public class AbsoluteLayout extends AbstractLayout implements
/**
* Sets the unit for the 'top' attribute
- *
+ *
* @param topUnits
* See {@link Sizeable} UNIT_SYMBOLS for a description of the
* available units.
@@ -557,7 +557,7 @@ public class AbsoluteLayout extends AbstractLayout implements
/**
* Gets the unit for the 'right' attribute
- *
+ *
* @return See {@link Sizeable} UNIT_SYMBOLS for a description of the
* available units.
*/
@@ -567,7 +567,7 @@ public class AbsoluteLayout extends AbstractLayout implements
/**
* Sets the unit for the 'right' attribute
- *
+ *
* @param rightUnits
* See {@link Sizeable} UNIT_SYMBOLS for a description of the
* available units.
@@ -579,7 +579,7 @@ public class AbsoluteLayout extends AbstractLayout implements
/**
* Gets the unit for the 'bottom' attribute
- *
+ *
* @return See {@link Sizeable} UNIT_SYMBOLS for a description of the
* available units.
*/
@@ -589,7 +589,7 @@ public class AbsoluteLayout extends AbstractLayout implements
/**
* Sets the unit for the 'bottom' attribute
- *
+ *
* @param bottomUnits
* See {@link Sizeable} UNIT_SYMBOLS for a description of the
* available units.
@@ -601,7 +601,7 @@ public class AbsoluteLayout extends AbstractLayout implements
/**
* Gets the unit for the 'left' attribute
- *
+ *
* @return See {@link Sizeable} UNIT_SYMBOLS for a description of the
* available units.
*/
@@ -611,7 +611,7 @@ public class AbsoluteLayout extends AbstractLayout implements
/**
* Sets the unit for the 'left' attribute
- *
+ *
* @param leftUnits
* See {@link Sizeable} UNIT_SYMBOLS for a description of the
* available units.
@@ -623,7 +623,7 @@ public class AbsoluteLayout extends AbstractLayout implements
/**
* Gets the 'z-index' attribute.
- *
+ *
* @return the zIndex The z-index attribute
*/
public int getZIndex() {
@@ -632,7 +632,7 @@ public class AbsoluteLayout extends AbstractLayout implements
/*
* (non-Javadoc)
- *
+ *
* @see java.lang.Object#toString()
*/
@Override
@@ -677,7 +677,7 @@ public class AbsoluteLayout extends AbstractLayout implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.AbstractComponent#readDesign(org.jsoup.nodes .Node,
* com.vaadin.ui.declarative.DesignContext)
*/
@@ -712,7 +712,7 @@ public class AbsoluteLayout extends AbstractLayout implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.AbstractComponent#writeDesign(org.jsoup.nodes.Node,
* com.vaadin.ui.declarative.DesignContext)
*/
@@ -730,26 +730,29 @@ public class AbsoluteLayout extends AbstractLayout implements
// handle position
ComponentPosition position = getPosition(child);
- writePositionAttribute(childElement, ATTR_TOP, position
- .getTopUnits().getSymbol(), position.getTopValue());
- writePositionAttribute(childElement, ATTR_RIGHT, position
- .getRightUnits().getSymbol(), position.getRightValue());
- writePositionAttribute(childElement, ATTR_BOTTOM, position
- .getBottomUnits().getSymbol(), position.getBottomValue());
- writePositionAttribute(childElement, ATTR_LEFT, position
- .getLeftUnits().getSymbol(), position.getLeftValue());
+ writePositionAttribute(childElement, ATTR_TOP,
+ position.getTopUnits().getSymbol(), position.getTopValue());
+ writePositionAttribute(childElement, ATTR_RIGHT,
+ position.getRightUnits().getSymbol(),
+ position.getRightValue());
+ writePositionAttribute(childElement, ATTR_BOTTOM,
+ position.getBottomUnits().getSymbol(),
+ position.getBottomValue());
+ writePositionAttribute(childElement, ATTR_LEFT,
+ position.getLeftUnits().getSymbol(),
+ position.getLeftValue());
// handle z-index
if (position.getZIndex() >= 0) {
- childElement
- .attr(ATTR_Z_INDEX, String.valueOf(position.zIndex));
+ childElement.attr(ATTR_Z_INDEX,
+ String.valueOf(position.zIndex));
}
}
}
/**
* Private method for writing position attributes
- *
+ *
* @since 7.4
* @param node
* target node
@@ -763,8 +766,8 @@ public class AbsoluteLayout extends AbstractLayout implements
private void writePositionAttribute(Node node, String key, String symbol,
Float value) {
if (value != null) {
- String valueString = DesignAttributeHandler.getFormatter().format(
- value);
+ String valueString = DesignAttributeHandler.getFormatter()
+ .format(value);
node.attr(key, valueString + symbol);
}
}
diff --git a/server/src/main/java/com/vaadin/ui/AbstractColorPicker.java b/server/src/main/java/com/vaadin/ui/AbstractColorPicker.java
index 4ce4e46d6a..ca5631c3b0 100644
--- a/server/src/main/java/com/vaadin/ui/AbstractColorPicker.java
+++ b/server/src/main/java/com/vaadin/ui/AbstractColorPicker.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -37,11 +37,11 @@ import com.vaadin.ui.declarative.DesignContext;
/**
* An abstract class that defines default implementation for a color picker
* component.
- *
+ *
* @since 7.0.0
*/
-public abstract class AbstractColorPicker extends AbstractComponent implements
- CloseListener, ColorSelector {
+public abstract class AbstractColorPicker extends AbstractComponent
+ implements CloseListener, ColorSelector {
private static final Method COLOR_CHANGE_METHOD;
static {
try {
@@ -61,22 +61,22 @@ public abstract class AbstractColorPicker extends AbstractComponent implements
/**
* Calculate color from coordinates
- *
+ *
* @param x
* the x-coordinate
* @param y
* the y-coordinate
- *
+ *
* @return the color
*/
public Color calculate(int x, int y);
/**
* Calculate coordinates from color
- *
+ *
* @param c
* the c
- *
+ *
* @return the integer array with the coordinates
*/
public int[] calculate(Color c);
@@ -139,7 +139,7 @@ public abstract class AbstractColorPicker extends AbstractComponent implements
/**
* Instantiates a new color picker.
- *
+ *
* @param popupCaption
* the caption of the popup window
*/
@@ -149,7 +149,7 @@ public abstract class AbstractColorPicker extends AbstractComponent implements
/**
* Instantiates a new color picker.
- *
+ *
* @param popupCaption
* the caption of the popup window
* @param initialColor
@@ -183,7 +183,7 @@ public abstract class AbstractColorPicker extends AbstractComponent implements
* Set true if the component should show a default caption (css-code for the
* currently selected color, e.g. #ffffff) when no other caption is
* available.
- *
+ *
* @param enabled
*/
public void setDefaultCaptionEnabled(boolean enabled) {
@@ -200,7 +200,7 @@ public abstract class AbstractColorPicker extends AbstractComponent implements
/**
* Sets the position of the popup window
- *
+ *
* @param x
* the x-coordinate
* @param y
@@ -235,7 +235,7 @@ public abstract class AbstractColorPicker extends AbstractComponent implements
/**
* Fired when a color change event occurs
- *
+ *
* @param event
* The color change event
*/
@@ -253,7 +253,7 @@ public abstract class AbstractColorPicker extends AbstractComponent implements
/**
* The style for the popup window
- *
+ *
* @param style
* The style
*/
@@ -283,7 +283,7 @@ public abstract class AbstractColorPicker extends AbstractComponent implements
/**
* Gets the style for the popup window
- *
+ *
* @since 7.5.0
* @return popup window style
*/
@@ -293,7 +293,7 @@ public abstract class AbstractColorPicker extends AbstractComponent implements
/**
* Set the visibility of the RGB Tab
- *
+ *
* @param visible
* The visibility
*/
@@ -311,7 +311,7 @@ public abstract class AbstractColorPicker extends AbstractComponent implements
/**
* Gets the visibility of the RGB Tab
- *
+ *
* @since 7.5.0
* @return visibility of the RGB tab
*/
@@ -321,7 +321,7 @@ public abstract class AbstractColorPicker extends AbstractComponent implements
/**
* Set the visibility of the HSV Tab
- *
+ *
* @param visible
* The visibility
*/
@@ -338,7 +338,7 @@ public abstract class AbstractColorPicker extends AbstractComponent implements
/**
* Gets the visibility of the HSV Tab
- *
+ *
* @since 7.5.0
* @return visibility of the HSV tab
*/
@@ -348,7 +348,7 @@ public abstract class AbstractColorPicker extends AbstractComponent implements
/**
* Set the visibility of the Swatches Tab
- *
+ *
* @param visible
* The visibility
*/
@@ -365,7 +365,7 @@ public abstract class AbstractColorPicker extends AbstractComponent implements
/**
* Gets the visibility of the Swatches Tab
- *
+ *
* @since 7.5.0
* @return visibility of the swatches tab
*/
@@ -375,7 +375,7 @@ public abstract class AbstractColorPicker extends AbstractComponent implements
/**
* Sets the visibility of the Color History
- *
+ *
* @param visible
* The visibility
*/
@@ -388,7 +388,7 @@ public abstract class AbstractColorPicker extends AbstractComponent implements
/**
* Gets the visibility of the Color History
- *
+ *
* @since 7.5.0
* @return visibility of color history
*/
@@ -398,7 +398,7 @@ public abstract class AbstractColorPicker extends AbstractComponent implements
/**
* Sets the visibility of the CSS color code text field
- *
+ *
* @param visible
* The visibility
*/
@@ -411,7 +411,7 @@ public abstract class AbstractColorPicker extends AbstractComponent implements
/**
* Gets the visibility of CSS color code text field
- *
+ *
* @since 7.5.0
* @return visibility of css color code text field
*/
@@ -431,7 +431,7 @@ public abstract class AbstractColorPicker extends AbstractComponent implements
/**
* Sets the default styles of the component
- *
+ *
*/
abstract protected void setDefaultStyles();
@@ -452,7 +452,7 @@ public abstract class AbstractColorPicker extends AbstractComponent implements
/**
* Shows or hides popup-window depending on the given parameter. If there is
* no such window yet, one is created.
- *
+ *
* @param open
*/
protected void showPopup(boolean open) {
@@ -513,11 +513,11 @@ public abstract class AbstractColorPicker extends AbstractComponent implements
* Set whether the caption text is rendered as HTML or not. You might need
* to re-theme component to allow higher content than the original text
* style.
- *
+ *
* If set to true, the captions are passed to the browser as html and the
* developer is responsible for ensuring no harmful html is used. If set to
* false, the content is passed to the browser as plain text.
- *
+ *
* @param htmlContentAllowed
* <code>true</code> if caption is rendered as HTML,
* <code>false</code> otherwise
@@ -530,7 +530,7 @@ public abstract class AbstractColorPicker extends AbstractComponent implements
/**
* Return HTML rendering setting
- *
+ *
* @return <code>true</code> if the caption text is to be rendered as HTML,
* <code>false</code> otherwise
* @deprecated as of , use {@link #isCaptionAsHtml()} instead
@@ -547,13 +547,14 @@ public abstract class AbstractColorPicker extends AbstractComponent implements
Attributes attributes = design.attributes();
if (design.hasAttr("color")) {
// Ignore the # character
- String hexColor = DesignAttributeHandler.readAttribute("color",
- attributes, String.class).substring(1);
+ String hexColor = DesignAttributeHandler
+ .readAttribute("color", attributes, String.class)
+ .substring(1);
setColor(new Color(Integer.parseInt(hexColor, 16)));
}
if (design.hasAttr("popup-style")) {
- setPopupStyle(PopupStyle.valueOf("POPUP_"
- + attributes.get("popup-style").toUpperCase()));
+ setPopupStyle(PopupStyle.valueOf(
+ "POPUP_" + attributes.get("popup-style").toUpperCase()));
}
if (design.hasAttr("position")) {
String[] position = attributes.get("position").split(",");
@@ -572,8 +573,8 @@ public abstract class AbstractColorPicker extends AbstractComponent implements
DesignAttributeHandler.writeAttribute("popup-style", attribute,
(popupStyle == PopupStyle.POPUP_NORMAL ? "normal" : "simple"),
"normal", String.class);
- DesignAttributeHandler.writeAttribute("position", attribute, positionX
- + "," + positionY, "0,0", String.class);
+ DesignAttributeHandler.writeAttribute("position", attribute,
+ positionX + "," + positionY, "0,0", String.class);
}
@Override
diff --git a/server/src/main/java/com/vaadin/ui/AbstractComponent.java b/server/src/main/java/com/vaadin/ui/AbstractComponent.java
index 8fa1f523ff..f0d5773736 100644
--- a/server/src/main/java/com/vaadin/ui/AbstractComponent.java
+++ b/server/src/main/java/com/vaadin/ui/AbstractComponent.java
@@ -69,7 +69,7 @@ import com.vaadin.util.ReflectTools;
* {@link Component} interface. Basic UI components that are not derived from an
* external component can inherit this class to easily qualify as Vaadin
* components. Most components in Vaadin do just that.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -134,7 +134,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.Component#setId(java.lang.String)
*/
@Override
@@ -144,7 +144,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.Component#getId()
*/
@Override
@@ -176,8 +176,8 @@ public abstract class AbstractComponent extends AbstractClientConnector
public String getStyleName() {
String s = "";
if (ComponentStateUtil.hasStyles(getState(false))) {
- for (final Iterator<String> it = getState(false).styles.iterator(); it
- .hasNext();) {
+ for (final Iterator<String> it = getState(false).styles
+ .iterator(); it.hasNext();) {
s += it.next();
if (it.hasNext()) {
s += " ";
@@ -254,14 +254,14 @@ public abstract class AbstractComponent extends AbstractClientConnector
/**
* Adds or removes a style name. Multiple styles can be specified as a
* space-separated list of style names.
- *
+ *
* If the {@code add} parameter is true, the style name is added to the
* component. If the {@code add} parameter is false, the style name is
* removed from the component.
* <p>
* Functionally this is equivalent to using {@link #addStyleName(String)} or
* {@link #removeStyleName(String)}
- *
+ *
* @since 7.5
* @param style
* the style name to be added or removed
@@ -292,7 +292,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
* Sets the component's caption <code>String</code>. Caption is the visible
* name of the component. This method will trigger a
* {@link RepaintRequestEvent}.
- *
+ *
* @param caption
* the new caption <code>String</code> for the component.
*/
@@ -309,7 +309,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
* false, the caption is rendered in the browser as plain text.
* <p>
* The default is false, i.e. to render that caption as plain text.
- *
+ *
* @param captionAsHtml
* true if the captions are rendered as HTML, false if rendered
* as plain text
@@ -322,7 +322,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
* Checks whether captions are rendered as HTML
* <p>
* The default is false, i.e. to render that caption as plain text.
- *
+ *
* @return true if the captions are rendered as HTML, false if rendered as
* plain text
*/
@@ -352,20 +352,20 @@ public abstract class AbstractComponent extends AbstractClientConnector
/**
* Sets the locale of this component.
- *
+ *
* <pre>
* // Component for which the locale is meaningful
* InlineDateField date = new InlineDateField(&quot;Datum&quot;);
- *
+ *
* // German language specified with ISO 639-1 language
* // code and ISO 3166-1 alpha-2 country code.
* date.setLocale(new Locale(&quot;de&quot;, &quot;DE&quot;));
- *
+ *
* date.setResolution(DateField.RESOLUTION_DAY);
* layout.addComponent(date);
* </pre>
- *
- *
+ *
+ *
* @param locale
* the locale to become this component's locale.
*/
@@ -391,7 +391,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/**
* Sets the component's icon. This method will trigger a
* {@link RepaintRequestEvent}.
- *
+ *
* @param icon
* the icon to be shown with the component's caption.
*/
@@ -402,7 +402,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.Component#isEnabled()
*/
@Override
@@ -412,7 +412,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.Component#setEnabled(boolean)
*/
@Override
@@ -422,7 +422,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.client.Connector#isConnectorEnabled()
*/
@Override
@@ -443,7 +443,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/**
* Returns the explicitly set immediate value.
- *
+ *
* @return the explicitly set immediate value or null if
* {@link #setImmediate(boolean)} has not been explicitly invoked
*/
@@ -457,7 +457,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
* Certain operations such as adding a value change listener will set the
* component into immediate mode if {@link #setImmediate(boolean)} has not
* been explicitly called with false.
- *
+ *
* @return true if the component is in immediate mode (explicitly or
* implicitly set), false if the component if not in immediate mode
*/
@@ -477,7 +477,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/**
* Sets the component's immediate mode to the specified status.
- *
+ *
* @param immediate
* the boolean value specifying if the component should be in the
* immediate mode after the call.
@@ -489,7 +489,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.Component#isVisible()
*/
@Override
@@ -499,7 +499,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.Component#setVisible(boolean)
*/
@Override
@@ -526,7 +526,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.Component#getDescription()
*/
@Override
@@ -538,11 +538,11 @@ public abstract class AbstractComponent extends AbstractClientConnector
* Sets the component's description. See {@link #getDescription()} for more
* information on what the description is. This method will trigger a
* {@link RepaintRequestEvent}.
- *
+ *
* The description is displayed as HTML in tooltips or directly in certain
* components so care should be taken to avoid creating the possibility for
* HTML injection and possibly XSS vulnerabilities.
- *
+ *
* @param description
* the new description string for the component.
*/
@@ -567,8 +567,8 @@ public abstract class AbstractComponent extends AbstractClientConnector
}
if (parent != null && this.parent != null) {
- throw new IllegalStateException(getClass().getName()
- + " already has a parent.");
+ throw new IllegalStateException(
+ getClass().getName() + " already has a parent.");
}
// Send a detach event if the component is currently attached
@@ -591,7 +591,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
* To find the Window that contains the component, use {@code Window w =
* getParent(Window.class);}
* </p>
- *
+ *
* @param <T>
* The type of the ancestor
* @param parentType
@@ -612,7 +612,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/**
* Gets the error message for this component.
- *
+ *
* @return ErrorMessage containing the description of the error state of the
* component or null, if the component contains no errors. Extending
* classes should override this method if they support other error
@@ -625,9 +625,9 @@ public abstract class AbstractComponent extends AbstractClientConnector
/**
* Gets the component's error message.
- *
+ *
* @link Terminal.ErrorMessage#ErrorMessage(String, int)
- *
+ *
* @return the component's error message.
*/
public ErrorMessage getComponentError() {
@@ -637,9 +637,9 @@ public abstract class AbstractComponent extends AbstractClientConnector
/**
* Sets the component's error message. The message may contain certain XML
* tags, for more information see
- *
+ *
* @link Component.ErrorMessage#ErrorMessage(String, int)
- *
+ *
* @param componentError
* the new <code>ErrorMessage</code> of the component.
*/
@@ -716,7 +716,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/**
* Build CSS compatible string representation of height.
- *
+ *
* @return CSS height
*/
private String getCSSHeight() {
@@ -725,7 +725,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/**
* Build CSS compatible string representation of width.
- *
+ *
* @return CSS width
*/
private String getCSSWidth() {
@@ -735,12 +735,12 @@ public abstract class AbstractComponent extends AbstractClientConnector
/**
* Returns the shared state bean with information to be sent from the server
* to the client.
- *
+ *
* Subclasses should override this method and set any relevant fields of the
* state returned by super.getState().
- *
+ *
* @since 7.0
- *
+ *
* @return updated component shared state
*/
@Override
@@ -758,17 +758,15 @@ public abstract class AbstractComponent extends AbstractClientConnector
super.beforeClientResponse(initial);
// TODO This logic should be on the client side and the state should
// simply be a data object with "width" and "height".
- if (getHeight() >= 0
- && (getHeightUnits() != Unit.PERCENTAGE || ComponentSizeValidator
- .parentCanDefineHeight(this))) {
+ if (getHeight() >= 0 && (getHeightUnits() != Unit.PERCENTAGE
+ || ComponentSizeValidator.parentCanDefineHeight(this))) {
getState().height = "" + getCSSHeight();
} else {
getState().height = "";
}
- if (getWidth() >= 0
- && (getWidthUnits() != Unit.PERCENTAGE || ComponentSizeValidator
- .parentCanDefineWidth(this))) {
+ if (getWidth() >= 0 && (getWidthUnits() != Unit.PERCENTAGE
+ || ComponentSizeValidator.parentCanDefineWidth(this))) {
getState().width = "" + getCSSWidth();
} else {
getState().width = "";
@@ -831,7 +829,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/**
* Sets the data object, that can be used for any application specific data.
* The component does not use or modify this data.
- *
+ *
* @param data
* the Application specific data.
* @since 3.1
@@ -842,7 +840,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/**
* Gets the application specific data. See {@link #setData(Object)}.
- *
+ *
* @return the Application specific data set with setData function.
* @since 3.1
*/
@@ -854,7 +852,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.Sizeable#getHeight()
*/
@Override
@@ -864,7 +862,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.server.Sizeable#getHeightUnits()
*/
@Override
@@ -874,7 +872,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.server.Sizeable#getWidth()
*/
@Override
@@ -884,7 +882,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.server.Sizeable#getWidthUnits()
*/
@Override
@@ -894,7 +892,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.server.Sizeable#setHeight(float, Unit)
*/
@Override
@@ -910,7 +908,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.server.Sizeable#setSizeFull()
*/
@Override
@@ -921,7 +919,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.server.Sizeable#setSizeUndefined()
*/
@Override
@@ -932,7 +930,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.server.Sizeable#setWidthUndefined()
*/
@Override
@@ -942,7 +940,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.server.Sizeable#setHeightUndefined()
*/
@Override
@@ -952,7 +950,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.server.Sizeable#setWidth(float, Unit)
*/
@Override
@@ -968,7 +966,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.server.Sizeable#setWidth(java.lang.String)
*/
@Override
@@ -983,7 +981,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.server.Sizeable#setHeight(java.lang.String)
*/
@Override
@@ -998,7 +996,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.Component#readDesign(org.jsoup.nodes.Element,
* com.vaadin.ui.declarative.DesignContext)
*/
@@ -1015,8 +1013,8 @@ public abstract class AbstractComponent extends AbstractClientConnector
}
// handle immediate
if (attr.hasKey("immediate")) {
- setImmediate(DesignAttributeHandler.getFormatter().parse(
- attr.get("immediate"), Boolean.class));
+ setImmediate(DesignAttributeHandler.getFormatter()
+ .parse(attr.get("immediate"), Boolean.class));
}
// handle locale
@@ -1027,15 +1025,14 @@ public abstract class AbstractComponent extends AbstractClientConnector
readSize(attr);
// handle component error
if (attr.hasKey("error")) {
- UserError error = new UserError(attr.get("error"),
- ContentMode.HTML, ErrorLevel.ERROR);
+ UserError error = new UserError(attr.get("error"), ContentMode.HTML,
+ ErrorLevel.ERROR);
setComponentError(error);
}
// Tab index when applicable
if (design.hasAttr("tabindex") && this instanceof Focusable) {
- ((Focusable) this).setTabIndex(DesignAttributeHandler
- .readAttribute("tabindex", design.attributes(),
- Integer.class));
+ ((Focusable) this).setTabIndex(DesignAttributeHandler.readAttribute(
+ "tabindex", design.attributes(), Integer.class));
}
// check for unsupported attributes
@@ -1057,7 +1054,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
* consist of one, two or three parts with '_' between the different parts
* if there is more than one part. The first part specifies the language,
* the second part the country and the third part the variant of the locale.
- *
+ *
* @param localeString
* the locale specified as a string
* @return the Locale object corresponding to localeString
@@ -1068,8 +1065,8 @@ public abstract class AbstractComponent extends AbstractClientConnector
}
String[] parts = localeString.split("_");
if (parts.length > 3) {
- throw new RuntimeException("Cannot parse the locale string: "
- + localeString);
+ throw new RuntimeException(
+ "Cannot parse the locale string: " + localeString);
}
switch (parts.length) {
case 1:
@@ -1083,7 +1080,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/**
* Toggles responsiveness of this component.
- *
+ *
* @since 7.5.0
* @param responsive
* boolean enables responsiveness, false disables
@@ -1108,7 +1105,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/**
* Returns true if the component is responsive
- *
+ *
* @since 7.5.0
* @return true if the component is responsive
*/
@@ -1125,7 +1122,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
* Reads the size of this component from the given design attributes. If the
* attributes do not contain relevant size information, defaults is
* consulted.
- *
+ *
* @param attributes
* the design attributes
* @param defaultInstance
@@ -1143,7 +1140,8 @@ public abstract class AbstractComponent extends AbstractClientConnector
}
// read height
- if (attributes.hasKey("height-auto") || attributes.hasKey("size-auto")) {
+ if (attributes.hasKey("height-auto")
+ || attributes.hasKey("size-auto")) {
this.setHeight(null);
} else if (attributes.hasKey("height-full")
|| attributes.hasKey("size-full")) {
@@ -1156,7 +1154,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/**
* Writes the size related attributes for the component if they differ from
* the defaults
- *
+ *
* @param component
* the component
* @param attributes
@@ -1213,7 +1211,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/**
* Test if the given component has equal width with this instance
- *
+ *
* @param component
* the component for the width comparison
* @return true if the widths are equal
@@ -1225,7 +1223,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/**
* Test if the given component has equal height with this instance
- *
+ *
* @param component
* the component for the height comparison
* @return true if the heights are equal
@@ -1237,7 +1235,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/**
* Test if the given components has equal size with this instance
- *
+ *
* @param component
* the component for the size comparison
* @return true if the sizes are equal
@@ -1251,7 +1249,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
* when reading or writing design. These are typically attributes of some
* primitive type. The default implementation searches setters with
* primitive values
- *
+ *
* @return a collection of attributes that can be read and written using the
* default approach.
*/
@@ -1267,9 +1265,9 @@ public abstract class AbstractComponent extends AbstractClientConnector
* basic implementation of the {@link readDesign} and {@link writeDesign}
* methods. Typically these are handled in a custom way in the overridden
* versions of the above methods
- *
+ *
* @since 7.4
- *
+ *
* @return the collection of attributes that are not handled by the basic
* implementation
*/
@@ -1290,7 +1288,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.Component#writeDesign(org.jsoup.nodes.Element,
* com.vaadin.ui.declarative.DesignContext)
*/
@@ -1308,18 +1306,17 @@ public abstract class AbstractComponent extends AbstractClientConnector
explicitImmediateValue, def.isImmediate(), Boolean.class);
}
// handle locale
- if (getLocale() != null
- && (getParent() == null || !getLocale().equals(
- getParent().getLocale()))) {
+ if (getLocale() != null && (getParent() == null
+ || !getLocale().equals(getParent().getLocale()))) {
design.attr("locale", getLocale().toString());
}
// handle size
writeSize(attr, def);
// handle component error
- String errorMsg = getComponentError() != null ? getComponentError()
- .getFormattedHtmlMessage() : null;
- String defErrorMsg = def.getComponentError() != null ? def
- .getComponentError().getFormattedHtmlMessage() : null;
+ String errorMsg = getComponentError() != null
+ ? getComponentError().getFormattedHtmlMessage() : null;
+ String defErrorMsg = def.getComponentError() != null
+ ? def.getComponentError().getFormattedHtmlMessage() : null;
if (!SharedUtil.equals(errorMsg, defErrorMsg)) {
attr.put("error", errorMsg);
}
@@ -1346,7 +1343,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/**
* Gets the {@link ActionManager} used to manage the
* {@link ShortcutListener}s added to this {@link Field}.
- *
+ *
* @return the ActionManager in use
*/
protected ActionManager getActionManager() {
@@ -1388,7 +1385,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
/**
* Determine whether a <code>content</code> component is equal to, or the
* ancestor of this component.
- *
+ *
* @param content
* the potential ancestor element
* @return <code>true</code> if the relationship holds
@@ -1426,7 +1423,8 @@ public abstract class AbstractComponent extends AbstractClientConnector
@Override
public void removeContextClickListener(ContextClickListener listener) {
- removeListener(EventId.CONTEXT_CLICK, ContextClickEvent.class, listener);
+ removeListener(EventId.CONTEXT_CLICK, ContextClickEvent.class,
+ listener);
}
private static final Logger getLogger() {
diff --git a/server/src/main/java/com/vaadin/ui/AbstractComponentContainer.java b/server/src/main/java/com/vaadin/ui/AbstractComponentContainer.java
index 1095331602..ac331761d5 100644
--- a/server/src/main/java/com/vaadin/ui/AbstractComponentContainer.java
+++ b/server/src/main/java/com/vaadin/ui/AbstractComponentContainer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import com.vaadin.server.ComponentSizeValidator;
* implementation for the methods in {@link ComponentContainer}. Basic UI
* components that need to contain other components inherit this class to easily
* qualify as a component container.
- *
+ *
* @author Vaadin Ltd
* @since 3.0
*/
@@ -45,7 +45,7 @@ public abstract class AbstractComponentContainer extends AbstractComponent
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.ui.ComponentContainer#addComponents(com.vaadin.ui.Component[])
*/
@@ -65,7 +65,8 @@ public abstract class AbstractComponentContainer extends AbstractComponent
final LinkedList<Component> l = new LinkedList<Component>();
// Adds all components
- for (final Iterator<Component> i = getComponentIterator(); i.hasNext();) {
+ for (final Iterator<Component> i = getComponentIterator(); i
+ .hasNext();) {
l.add(i.next());
}
@@ -88,7 +89,8 @@ public abstract class AbstractComponentContainer extends AbstractComponent
components.add(i.next());
}
- for (final Iterator<Component> i = components.iterator(); i.hasNext();) {
+ for (final Iterator<Component> i = components.iterator(); i
+ .hasNext();) {
final Component c = i.next();
source.removeComponent(c);
addComponent(c);
@@ -114,7 +116,8 @@ public abstract class AbstractComponentContainer extends AbstractComponent
/* documented in interface */
@Override
- public void removeComponentAttachListener(ComponentAttachListener listener) {
+ public void removeComponentAttachListener(
+ ComponentAttachListener listener) {
removeListener(ComponentAttachEvent.class, listener,
ComponentAttachListener.attachMethod);
}
@@ -148,7 +151,8 @@ public abstract class AbstractComponentContainer extends AbstractComponent
/* documented in interface */
@Override
- public void removeComponentDetachListener(ComponentDetachListener listener) {
+ public void removeComponentDetachListener(
+ ComponentDetachListener listener) {
removeListener(ComponentDetachEvent.class, listener,
ComponentDetachListener.detachMethod);
}
@@ -167,7 +171,7 @@ public abstract class AbstractComponentContainer extends AbstractComponent
* Fires the component attached event. This should be called by the
* addComponent methods after the component have been added to this
* container.
- *
+ *
* @param component
* the component that has been added to this container.
*/
@@ -179,7 +183,7 @@ public abstract class AbstractComponentContainer extends AbstractComponent
* Fires the component detached event. This should be called by the
* removeComponent methods after the component have been removed from this
* container.
- *
+ *
* @param component
* the component that has been removed from this container.
*/
@@ -191,7 +195,7 @@ public abstract class AbstractComponentContainer extends AbstractComponent
* This only implements the events and component parent calls. The extending
* classes must implement component list maintenance and call this method
* after component list maintenance.
- *
+ *
* @see com.vaadin.ui.ComponentContainer#addComponent(Component)
*/
@Override
@@ -216,7 +220,7 @@ public abstract class AbstractComponentContainer extends AbstractComponent
* This only implements the events and component parent calls. The extending
* classes must implement component list maintenance and call this method
* before component list maintenance.
- *
+ *
* @see com.vaadin.ui.ComponentContainer#removeComponent(Component)
*/
@Override
@@ -241,8 +245,9 @@ public abstract class AbstractComponentContainer extends AbstractComponent
dirtyChildren = getInvalidSizedChildren(false);
} else if ((width == SIZE_UNDEFINED && getWidth() != SIZE_UNDEFINED)
|| (unit == Unit.PERCENTAGE
- && getWidthUnits() != Unit.PERCENTAGE && !ComponentSizeValidator
- .parentCanDefineWidth(this))) {
+ && getWidthUnits() != Unit.PERCENTAGE
+ && !ComponentSizeValidator
+ .parentCanDefineWidth(this))) {
/*
* relative width children may get to invalid state if width becomes
* invalid. Width may also become invalid if units become percentage
@@ -256,15 +261,15 @@ public abstract class AbstractComponentContainer extends AbstractComponent
false);
}
- private void repaintChangedChildTrees(
- Collection<Component> invalidChildren,
+ private void repaintChangedChildTrees(Collection<Component> invalidChildren,
boolean childrenMayBecomeUndefined, boolean vertical) {
if (childrenMayBecomeUndefined) {
Collection<Component> previouslyInvalidComponents = invalidChildren;
invalidChildren = getInvalidSizedChildren(vertical);
- if (previouslyInvalidComponents != null && invalidChildren != null) {
- for (Iterator<Component> iterator = invalidChildren.iterator(); iterator
- .hasNext();) {
+ if (previouslyInvalidComponents != null
+ && invalidChildren != null) {
+ for (Iterator<Component> iterator = invalidChildren
+ .iterator(); iterator.hasNext();) {
Component component = iterator.next();
if (previouslyInvalidComponents.contains(component)) {
// still invalid don't repaint
@@ -273,7 +278,8 @@ public abstract class AbstractComponentContainer extends AbstractComponent
}
}
} else if (invalidChildren != null) {
- Collection<Component> stillInvalidChildren = getInvalidSizedChildren(vertical);
+ Collection<Component> stillInvalidChildren = getInvalidSizedChildren(
+ vertical);
if (stillInvalidChildren != null) {
for (Component component : stillInvalidChildren) {
// didn't become valid
@@ -286,12 +292,13 @@ public abstract class AbstractComponentContainer extends AbstractComponent
}
}
- private Collection<Component> getInvalidSizedChildren(final boolean vertical) {
+ private Collection<Component> getInvalidSizedChildren(
+ final boolean vertical) {
HashSet<Component> components = null;
for (Component component : this) {
- boolean valid = vertical ? ComponentSizeValidator
- .checkHeights(component) : ComponentSizeValidator
- .checkWidths(component);
+ boolean valid = vertical
+ ? ComponentSizeValidator.checkHeights(component)
+ : ComponentSizeValidator.checkWidths(component);
if (!valid) {
if (components == null) {
components = new HashSet<Component>();
@@ -321,8 +328,9 @@ public abstract class AbstractComponentContainer extends AbstractComponent
dirtyChildren = getInvalidSizedChildren(true);
} else if ((height == SIZE_UNDEFINED && getHeight() != SIZE_UNDEFINED)
|| (unit == Unit.PERCENTAGE
- && getHeightUnits() != Unit.PERCENTAGE && !ComponentSizeValidator
- .parentCanDefineHeight(this))) {
+ && getHeightUnits() != Unit.PERCENTAGE
+ && !ComponentSizeValidator
+ .parentCanDefineHeight(this))) {
/*
* relative height children may get to invalid state if height
* becomes invalid. Height may also become invalid if units become
@@ -338,7 +346,7 @@ public abstract class AbstractComponentContainer extends AbstractComponent
/**
* {@inheritDoc}
- *
+ *
* @deprecated As of 7.0, use {@link #iterator()} instead.
*/
@Deprecated
diff --git a/server/src/main/java/com/vaadin/ui/AbstractEmbedded.java b/server/src/main/java/com/vaadin/ui/AbstractEmbedded.java
index a38e9bb788..de48b73539 100644
--- a/server/src/main/java/com/vaadin/ui/AbstractEmbedded.java
+++ b/server/src/main/java/com/vaadin/ui/AbstractEmbedded.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,10 +26,9 @@ import com.vaadin.ui.declarative.DesignContext;
/**
* Abstract base for embedding components.
- *
+ *
* @author Vaadin Ltd.
- * @version
- * @VERSION@
+ * @version @VERSION@
* @since 7.0
*/
@SuppressWarnings("serial")
@@ -48,7 +47,7 @@ public abstract class AbstractEmbedded extends AbstractComponent {
/**
* Sets the object source resource. The dimensions are assumed if possible.
* The type is guessed from resource.
- *
+ *
* @param source
* the source to set.
*/
@@ -58,7 +57,7 @@ public abstract class AbstractEmbedded extends AbstractComponent {
/**
* Get the object source resource.
- *
+ *
* @return the source
*/
public Resource getSource() {
@@ -68,7 +67,7 @@ public abstract class AbstractEmbedded extends AbstractComponent {
/**
* Sets this component's alternate text that can be presented instead of the
* component's normal content for accessibility purposes.
- *
+ *
* @param altText
* A short, human-readable description of this component's
* content.
@@ -80,7 +79,7 @@ public abstract class AbstractEmbedded extends AbstractComponent {
/**
* Gets this component's alternate text that can be presented instead of the
* component's normal content for accessibility purposes.
- *
+ *
* @returns Alternate text
*/
public String getAlternateText() {
diff --git a/server/src/main/java/com/vaadin/ui/AbstractField.java b/server/src/main/java/com/vaadin/ui/AbstractField.java
index 6d25076526..e0f5e971ac 100644
--- a/server/src/main/java/com/vaadin/ui/AbstractField.java
+++ b/server/src/main/java/com/vaadin/ui/AbstractField.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -58,25 +58,25 @@ import com.vaadin.ui.declarative.DesignContext;
* <code>AbstractField</code> implements that interface itself, too, so
* accessing the Property value represented by it is straightforward.
* </p>
- *
+ *
* <p>
* AbstractField also provides the {@link com.vaadin.data.Buffered} interface
* for buffering the data source value. By default the Field is in write
* through-mode and {@link #setWriteThrough(boolean)}should be called to enable
* buffering.
* </p>
- *
+ *
* <p>
* The class also supports {@link com.vaadin.data.Validator validators} to make
* sure the value contained in the field is valid.
* </p>
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@SuppressWarnings("serial")
-public abstract class AbstractField<T> extends AbstractComponent implements
- Field<T>, Property.ReadOnlyStatusChangeListener,
+public abstract class AbstractField<T> extends AbstractComponent
+ implements Field<T>, Property.ReadOnlyStatusChangeListener,
Property.ReadOnlyStatusChangeNotifier, Action.ShortcutNotifier {
/* Private members */
@@ -148,7 +148,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
/**
* Whether this field is currently registered as listening to events from
* its data source.
- *
+ *
* @see #setPropertyDataSource(Property)
* @see #addPropertyListeners()
* @see #removePropertyListeners()
@@ -170,11 +170,11 @@ public abstract class AbstractField<T> extends AbstractComponent implements
/**
* Returns true if the error indicator be hidden when painting the component
* even when there are errors.
- *
+ *
* This is a mostly internal method, but can be overridden in subclasses
* e.g. if the error indicator should also be shown for empty fields in some
* cases.
- *
+ *
* @return true to hide the error indicator, false to use the normal logic
* to show it when there are errors
*/
@@ -190,7 +190,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
* to safely cast the value returned from <code>getValue</code> to the given
* type and pass any variable assignable to this type as an argument to
* <code>setValue</code>.
- *
+ *
* @return the type of the Field
*/
@Override
@@ -208,7 +208,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
/**
* Changes the readonly state and throw read-only status change events.
- *
+ *
* @see com.vaadin.ui.Component#setReadOnly(boolean)
*/
@Override
@@ -219,7 +219,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
/**
* Tests if the invalid data is committed to datasource.
- *
+ *
* @see com.vaadin.data.BufferedValidatable#isInvalidCommitted()
*/
@Override
@@ -229,7 +229,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
/**
* Sets if the invalid data should be committed to datasource.
- *
+ *
* @see com.vaadin.data.BufferedValidatable#setInvalidCommitted(boolean)
*/
@Override
@@ -242,7 +242,8 @@ public abstract class AbstractField<T> extends AbstractComponent implements
* here, we use the default documentation from the implemented interface.
*/
@Override
- public void commit() throws Buffered.SourceException, InvalidValueException {
+ public void commit()
+ throws Buffered.SourceException, InvalidValueException {
if (dataSource != null && !dataSource.isReadOnly()) {
if ((isInvalidCommitted() || isValid())) {
try {
@@ -300,7 +301,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
/**
* Gets the value from the data source. This is only here because of clarity
* in the code that handles both the data model value and the field value.
- *
+ *
* @return The value of the property data source
*/
private Object getDataSourceValue() {
@@ -311,7 +312,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
* Returns the field value. This is always identical to {@link #getValue()}
* and only here because of clarity in the code that handles both the data
* model value and the field value.
- *
+ *
* @return The value of the field
*/
private T getFieldValue() {
@@ -348,9 +349,9 @@ public abstract class AbstractField<T> extends AbstractComponent implements
* Setting buffered mode from true to false will commit any pending changes.
* </p>
* <p>
- *
+ *
* </p>
- *
+ *
* @since 7.0.0
* @param buffered
* true if buffered mode should be turned on, false otherwise
@@ -368,7 +369,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
/**
* Checks the buffered mode of this Field.
- *
+ *
* @return true if buffered mode is on, false otherwise
*/
@Override
@@ -388,9 +389,9 @@ public abstract class AbstractField<T> extends AbstractComponent implements
* If legacy Property toString mode is disabled, the string representation
* has no special meaning
* </p>
- *
+ *
* @see LegacyPropertyHelper#isLegacyToStringEnabled()
- *
+ *
* @return A string representation of the value value stored in the Property
* or a string representation of the Property object.
* @deprecated As of 7.0. Use {@link #getValue()} to get the value of the
@@ -413,12 +414,12 @@ public abstract class AbstractField<T> extends AbstractComponent implements
/**
* Gets the current value of the field.
- *
+ *
* <p>
* This is the visible, modified and possible invalid value the user have
* entered to the field.
* </p>
- *
+ *
* <p>
* Note that the object returned is compatible with getType(). For example,
* if the type is String, this returns Strings even when the underlying
@@ -427,12 +428,12 @@ public abstract class AbstractField<T> extends AbstractComponent implements
* data source, use {@link Property#getValue()} for the property data
* source.
* </p>
- *
+ *
* <p>
* Since Vaadin 7.0, no implicit conversions between other data types and
* String are performed, but a converter is used if set.
* </p>
- *
+ *
* @return the current value of the field.
*/
@Override
@@ -442,20 +443,20 @@ public abstract class AbstractField<T> extends AbstractComponent implements
/**
* Sets the value of the field.
- *
+ *
* @param newFieldValue
* the New value of the field.
* @throws Property.ReadOnlyException
*/
@Override
- public void setValue(T newFieldValue) throws Property.ReadOnlyException,
- Converter.ConversionException {
+ public void setValue(T newFieldValue)
+ throws Property.ReadOnlyException, Converter.ConversionException {
setValue(newFieldValue, false);
}
/**
* Sets the value of the field.
- *
+ *
* @param newFieldValue
* the New value of the field.
* @param repaintIsNotNeeded
@@ -470,7 +471,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
/**
* Sets the value of the field.
- *
+ *
* @since 7.5.7
* @param newFieldValue
* the New value of the field.
@@ -493,9 +494,10 @@ public abstract class AbstractField<T> extends AbstractComponent implements
throw new Property.ReadOnlyException();
}
try {
- T doubleConvertedFieldValue = convertFromModel(convertToModel(newFieldValue));
- if (!SharedUtil
- .equals(newFieldValue, doubleConvertedFieldValue)) {
+ T doubleConvertedFieldValue = convertFromModel(
+ convertToModel(newFieldValue));
+ if (!SharedUtil.equals(newFieldValue,
+ doubleConvertedFieldValue)) {
newFieldValue = doubleConvertedFieldValue;
repaintIsNotNeeded = false;
}
@@ -506,8 +508,8 @@ public abstract class AbstractField<T> extends AbstractComponent implements
// Repaint is needed even when the client thinks that it knows the
// new state if validity of the component may change
- if (repaintIsNotNeeded
- && (isRequired() || hasValidators() || getConverter() != null)) {
+ if (repaintIsNotNeeded && (isRequired() || hasValidators()
+ || getConverter() != null)) {
repaintIsNotNeeded = false;
}
@@ -533,8 +535,8 @@ public abstract class AbstractField<T> extends AbstractComponent implements
// Commits the value to datasource
committingValueToDataSource = true;
- getPropertyDataSource().setValue(
- convertToModel(newFieldValue));
+ getPropertyDataSource()
+ .setValue(convertToModel(newFieldValue));
// The buffer is now unmodified
setModified(false);
@@ -581,7 +583,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
/**
* Gets the current data source of the field, if any.
- *
+ *
* @return the current data source as a Property, or <code>null</code> if
* none defined.
*/
@@ -595,7 +597,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
* Sets the specified Property as the data source for the field. All
* uncommitted changes are replaced with a value from the new data source.
* </p>
- *
+ *
* <p>
* If the datasource has any validators, the same validators are added to
* the field. Because the default behavior of the field is to allow invalid
@@ -604,7 +606,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
* is invalid. After the value is valid, the error message is not shown and
* the commit can be done normally.
* </p>
- *
+ *
* <p>
* If the data source implements
* {@link com.vaadin.data.Property.ValueChangeNotifier} and/or
@@ -615,7 +617,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
* {@link AbstractField#detach() detach} and re-added on
* {@link AbstractField#attach() attach}.
* </p>
- *
+ *
* <p>
* Note: before 6.5 we actually called discard() method in the beginning of
* the method. This was removed to simplify implementation, avoid excess
@@ -624,7 +626,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
* method is called). Some complex field implementations might now need to
* override this method to do housekeeping similar to discard().
* </p>
- *
+ *
* @param newDataSource
* the new data source Property.
*/
@@ -639,8 +641,8 @@ public abstract class AbstractField<T> extends AbstractComponent implements
// Sets the new data source
dataSource = newDataSource;
- getState().propertyReadOnly = dataSource == null ? false : dataSource
- .isReadOnly();
+ getState().propertyReadOnly = dataSource == null ? false
+ : dataSource.isReadOnly();
// Check if the current converter is compatible.
if (newDataSource != null
@@ -662,8 +664,8 @@ public abstract class AbstractField<T> extends AbstractComponent implements
setCurrentBufferedSourceException(null);
}
} catch (final Throwable e) {
- setCurrentBufferedSourceException(new Buffered.SourceException(
- this, e));
+ setCurrentBufferedSourceException(
+ new Buffered.SourceException(this, e));
setModified(true);
throw getCurrentBufferedSourceException();
}
@@ -685,8 +687,8 @@ public abstract class AbstractField<T> extends AbstractComponent implements
// Fires value change if the value has changed
T value = getInternalValue();
- if ((value != oldValue)
- && ((value != null && !value.equals(oldValue)) || value == null)) {
+ if ((value != oldValue) && ((value != null && !value.equals(oldValue))
+ || value == null)) {
fireValueChange(false);
}
}
@@ -695,20 +697,20 @@ public abstract class AbstractField<T> extends AbstractComponent implements
* Retrieves a converter for the field from the converter factory defined
* for the application. Clears the converter if no application reference is
* available or if the factory returns null.
- *
+ *
* @param datamodelType
* The type of the data model that we want to be able to convert
* from
*/
public void setConverter(Class<?> datamodelType) {
- Converter<T, ?> c = (Converter<T, ?>) ConverterUtil.getConverter(
- getType(), datamodelType, getSession());
+ Converter<T, ?> c = (Converter<T, ?>) ConverterUtil
+ .getConverter(getType(), datamodelType, getSession());
setConverter(c);
}
/**
* Convert the given value from the data source type to the UI type.
- *
+ *
* @param newValue
* The data source value to convert.
* @return The converted value that is compatible with the UI type or the
@@ -723,7 +725,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
/**
* Convert the given value from the data source type to the UI type.
- *
+ *
* @param newValue
* The data source value to convert.
* @return The converted value that is compatible with the UI type or the
@@ -739,7 +741,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
/**
* Convert the given value from the UI type to the data source type.
- *
+ *
* @param fieldValue
* The value to convert. Typically returned by
* {@link #getFieldValue()}
@@ -755,7 +757,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
/**
* Convert the given value from the UI type to the data source type.
- *
+ *
* @param fieldValue
* The value to convert. Typically returned by
* {@link #getFieldValue()}
@@ -780,7 +782,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
/**
* Retrieves the type of the currently used data model. If the field has no
* data source then the model type of the converter is used.
- *
+ *
* @since 7.1
* @return The type of the currently used data model or null if no data
* source or converter is set.
@@ -798,7 +800,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
/**
* Returns the conversion error with {0} replaced by the data source type
* and {1} replaced by the exception (localized) message.
- *
+ *
* @since 7.1
* @param dataSourceType
* the type of the data source
@@ -832,7 +834,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
* has been set. The value is not necessarily the same as the data source
* value e.g. if the field is in buffered mode and has been modified.
* </p>
- *
+ *
* @return The converted value that is compatible with the data source type
*/
public Object getConvertedValue() {
@@ -844,7 +846,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
* value given is converted to the field type and then assigned to the
* field. This will update the property data source in the same way as when
* {@link #setValue(Object)} is called.
- *
+ *
* @param value
* The value to set. Must be the same type as the data source.
*/
@@ -857,7 +859,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
/**
* Adds a new validator for the field's value. All validators added to a
* field are checked each time the its value changes.
- *
+ *
* @param validator
* the new validator to be added.
*/
@@ -872,7 +874,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
/**
* Gets the validators of the field.
- *
+ *
* @return An unmodifiable collection that holds all validators for the
* field.
*/
@@ -891,7 +893,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
/**
* Removes the validator from the field.
- *
+ *
* @param validator
* the validator to remove.
*/
@@ -918,10 +920,10 @@ public abstract class AbstractField<T> extends AbstractComponent implements
* Tests the current value against registered validators if the field is not
* empty. If the field is empty it is considered valid if it is not required
* and invalid otherwise. Validators are never checked for empty fields.
- *
+ *
* In most cases, {@link #validate()} should be used instead of
* {@link #isValid()} to also get the error message.
- *
+ *
* @return <code>true</code> if all registered validators claim that the
* current value is valid or if the field is empty and not required,
* <code>false</code> otherwise.
@@ -939,16 +941,16 @@ public abstract class AbstractField<T> extends AbstractComponent implements
/**
* Checks the validity of the Field.
- *
+ *
* A field is invalid if it is set as required (using
* {@link #setRequired(boolean)} and is empty, if one or several of the
* validators added to the field indicate it is invalid or if the value
* cannot be converted provided a converter has been set.
- *
+ *
* The "required" validation is a built-in validation feature. If the field
* is required and empty this method throws an EmptyValueException with the
* error message set using {@link #setRequiredError(String)}.
- *
+ *
* @see com.vaadin.data.Validatable#validate()
*/
@Override
@@ -964,7 +966,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
* Validates that the given value pass the validators for the field.
* <p>
* This method does not check the requiredness of the field.
- *
+ *
* @param fieldValue
* The value to check
* @throws Validator.InvalidValueException
@@ -982,8 +984,8 @@ public abstract class AbstractField<T> extends AbstractComponent implements
valueToValidate = getConverter().convertToModel(fieldValue,
getModelType(), getLocale());
} catch (ConversionException e) {
- throw new InvalidValueException(getConversionError(
- getConverter().getModelType(), e));
+ throw new InvalidValueException(
+ getConversionError(getConverter().getModelType(), e));
}
}
@@ -1009,8 +1011,8 @@ public abstract class AbstractField<T> extends AbstractComponent implements
throw validationExceptions.get(0);
}
- InvalidValueException[] exceptionArray = validationExceptions
- .toArray(new InvalidValueException[validationExceptions.size()]);
+ InvalidValueException[] exceptionArray = validationExceptions.toArray(
+ new InvalidValueException[validationExceptions.size()]);
// Create a composite validator and include all exceptions
throw new Validator.InvalidValueException(null, exceptionArray);
@@ -1019,7 +1021,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
/**
* Fields allow invalid values by default. In most cases this is wanted,
* because the field otherwise visually forget the user input immediately.
- *
+ *
* @return true iff the invalid values are allowed.
* @see com.vaadin.data.Validatable#isInvalidAllowed()
*/
@@ -1038,7 +1040,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
* values. The validators are automatically copied to the field when the
* datasource is set.
* </p>
- *
+ *
* @see com.vaadin.data.Validatable#setInvalidAllowed(boolean)
*/
@Override
@@ -1051,7 +1053,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
* Error messages shown by the fields are composites of the error message
* thrown by the superclasses (that is the component error message),
* validation errors and buffered source errors.
- *
+ *
* @see com.vaadin.ui.AbstractComponent#getErrorMessage()
*/
@Override
@@ -1084,13 +1086,11 @@ public abstract class AbstractField<T> extends AbstractComponent implements
}
// Throw combination of the error types
- return new CompositeErrorMessage(
- new ErrorMessage[] {
- superError,
+ return new CompositeErrorMessage(new ErrorMessage[] { superError,
AbstractErrorMessage
.getErrorMessageForException(validationError),
- AbstractErrorMessage
- .getErrorMessageForException(getCurrentBufferedSourceException()) });
+ AbstractErrorMessage.getErrorMessageForException(
+ getCurrentBufferedSourceException()) });
}
@@ -1138,7 +1138,8 @@ public abstract class AbstractField<T> extends AbstractComponent implements
* interface.
*/
@Override
- public void removeValueChangeListener(Property.ValueChangeListener listener) {
+ public void removeValueChangeListener(
+ Property.ValueChangeListener listener) {
removeListener(AbstractField.ValueChangeEvent.class, listener,
VALUE_CHANGE_METHOD);
// ensure "automatic immediate handling" works
@@ -1173,9 +1174,8 @@ public abstract class AbstractField<T> extends AbstractComponent implements
static {
try {
READ_ONLY_STATUS_CHANGE_METHOD = Property.ReadOnlyStatusChangeListener.class
- .getDeclaredMethod(
- "readOnlyStatusChange",
- new Class[] { Property.ReadOnlyStatusChangeEvent.class });
+ .getDeclaredMethod("readOnlyStatusChange", new Class[] {
+ Property.ReadOnlyStatusChangeEvent.class });
} catch (final java.lang.NoSuchMethodException e) {
// This should never happen
throw new java.lang.RuntimeException(
@@ -1186,7 +1186,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
/**
* React to read only status changes of the property by requesting a
* repaint.
- *
+ *
* @see Property.ReadOnlyStatusChangeListener
*/
@Override
@@ -1206,7 +1206,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
/**
* An <code>Event</code> object specifying the Property whose read-only
* status has changed.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -1215,7 +1215,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
/**
* New instance of text change event.
- *
+ *
* @param source
* the Source of the event.
*/
@@ -1225,7 +1225,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
/**
* Property where the event occurred.
- *
+ *
* @return the Source of the event.
*/
@Override
@@ -1289,10 +1289,10 @@ public abstract class AbstractField<T> extends AbstractComponent implements
/**
* This method listens to data source value changes and passes the changes
* forwards.
- *
+ *
* Changes are not forwarded to the listeners of the field during internal
* operations of the field to avoid duplicate notifications.
- *
+ *
* @param event
* the value change event telling the data source contents have
* changed.
@@ -1309,7 +1309,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
* reports different value than the one the field has just
* committed to it. In this case we respect the property
* value.
- *
+ *
* Still, we don't fire value change yet, but instead
* postpone it until "commit" is done. See setValue(Object,
* boolean) and commit().
@@ -1338,7 +1338,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.Component.Focusable#getTabIndex()
*/
@Override
@@ -1348,7 +1348,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.Component.Focusable#setTabIndex(int)
*/
@Override
@@ -1360,13 +1360,13 @@ public abstract class AbstractField<T> extends AbstractComponent implements
* Returns the internal field value, which might not match the data source
* value e.g. if the field has been modified and is not in write-through
* mode.
- *
+ *
* This method can be overridden by subclasses together with
* {@link #setInternalValue(Object)} to compute internal field value at
* runtime. When doing so, typically also {@link #isModified()} needs to be
* overridden and care should be taken in the management of the empty state
* and buffering support.
- *
+ *
* @return internal field value
*/
protected T getInternalValue() {
@@ -1378,9 +1378,9 @@ public abstract class AbstractField<T> extends AbstractComponent implements
* change the internal Field value. It does not trigger valuechange events.
* It can be overridden by the inheriting classes to update all dependent
* variables.
- *
+ *
* Subclasses can also override {@link #getInternalValue()} if necessary.
- *
+ *
* @param newValue
* the new value to be set.
*/
@@ -1394,7 +1394,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
/**
* Notifies the component that it is connected to an application.
- *
+ *
* @see com.vaadin.ui.Component#attach()
*/
@Override
@@ -1424,8 +1424,8 @@ public abstract class AbstractField<T> extends AbstractComponent implements
if (dataSource != null && !isModified()) {
// When we have a data source and the internal value is directly
// read from that we want to update the value
- T newInternalValue = convertFromModel(getPropertyDataSource()
- .getValue());
+ T newInternalValue = convertFromModel(
+ getPropertyDataSource().getValue());
if (!SharedUtil.equals(newInternalValue, getInternalValue())) {
setInternalValue(newInternalValue);
fireValueChange(false);
@@ -1460,17 +1460,17 @@ public abstract class AbstractField<T> extends AbstractComponent implements
/**
* Is this field required. Required fields must filled by the user.
- *
+ *
* If the field is required, it is visually indicated in the user interface.
* Furthermore, setting field to be required implicitly adds "non-empty"
* validator and thus isValid() == false or any isEmpty() fields. In those
* cases validation errors are not painted as it is obvious that the user
* must fill in the required fields.
- *
+ *
* On the other hand, for the non-required fields isValid() == true if the
* field isEmpty() regardless of any attached validators.
- *
- *
+ *
+ *
* @return <code>true</code> if the field is required, otherwise
* <code>false</code>.
*/
@@ -1481,16 +1481,16 @@ public abstract class AbstractField<T> extends AbstractComponent implements
/**
* Sets the field required. Required fields must filled by the user.
- *
+ *
* If the field is required, it is visually indicated in the user interface.
* Furthermore, setting field to be required implicitly adds "non-empty"
* validator and thus isValid() == false or any isEmpty() fields. In those
* cases validation errors are not painted as it is obvious that the user
* must fill in the required fields.
- *
+ *
* On the other hand, for the non-required fields isValid() == true if the
* field isEmpty() regardless of any attached validators.
- *
+ *
* @param required
* Is the field required.
*/
@@ -1504,7 +1504,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
* setting requiredMessage to be "" or null, no error pop-up or exclamation
* mark is shown for a empty required field. This faults to "". Even in
* those cases isValid() returns false for empty required fields.
- *
+ *
* @param requiredMessage
* Message to be shown when this field is required, but empty.
*/
@@ -1522,7 +1522,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
/**
* Gets the error that is shown if the field value cannot be converted to
* the data source type.
- *
+ *
* @return The error that is shown if conversion of the field value fails
*/
public String getConversionError() {
@@ -1534,7 +1534,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
* the data source type. If {0} is present in the message, it will be
* replaced by the simple name of the data source type. If {1} is present in
* the message, it will be replaced by the ConversionException message.
- *
+ *
* @param valueConversionError
* Message to be shown when conversion of the value fails
*/
@@ -1555,13 +1555,13 @@ public abstract class AbstractField<T> extends AbstractComponent implements
/**
* Is automatic, visible validation enabled?
- *
+ *
* If automatic validation is enabled, any validators connected to this
* component are evaluated while painting the component and potential error
* messages are sent to client. If the automatic validation is turned off,
* isValid() and validate() methods still work, but one must show the
* validation in their own code.
- *
+ *
* @return True, if automatic validation is enabled.
*/
public boolean isValidationVisible() {
@@ -1570,13 +1570,13 @@ public abstract class AbstractField<T> extends AbstractComponent implements
/**
* Enable or disable automatic, visible validation.
- *
+ *
* If automatic validation is enabled, any validators connected to this
* component are evaluated while painting the component and potential error
* messages are sent to client. If the automatic validation is turned off,
* isValid() and validate() methods still work, but one must show the
* validation in their own code.
- *
+ *
* @param validateAutomatically
* True, if automatic validation is enabled.
*/
@@ -1589,7 +1589,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
/**
* Sets the current buffered source exception.
- *
+ *
* @param currentBufferedSourceException
*/
public void setCurrentBufferedSourceException(
@@ -1600,7 +1600,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
/**
* Gets the current buffered source exception.
- *
+ *
* @return The current source exception
*/
protected Buffered.SourceException getCurrentBufferedSourceException() {
@@ -1611,7 +1611,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
* A ready-made {@link ShortcutListener} that focuses the given
* {@link Focusable} (usually a {@link Field}) when the keyboard shortcut is
* invoked.
- *
+ *
*/
public static class FocusShortcut extends ShortcutListener {
protected Focusable focusable;
@@ -1619,7 +1619,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
/**
* Creates a keyboard shortcut for focusing the given {@link Focusable}
* using the shorthand notation defined in {@link ShortcutAction}.
- *
+ *
* @param focusable
* to focused when the shortcut is invoked
* @param shorthandCaption
@@ -1632,7 +1632,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
/**
* Creates a keyboard shortcut for focusing the given {@link Focusable}.
- *
+ *
* @param focusable
* to focused when the shortcut is invoked
* @param keyCode
@@ -1640,14 +1640,15 @@ public abstract class AbstractField<T> extends AbstractComponent implements
* @param modifiers
* modifiers required to invoke the shortcut
*/
- public FocusShortcut(Focusable focusable, int keyCode, int... modifiers) {
+ public FocusShortcut(Focusable focusable, int keyCode,
+ int... modifiers) {
super(null, keyCode, modifiers);
this.focusable = focusable;
}
/**
* Creates a keyboard shortcut for focusing the given {@link Focusable}.
- *
+ *
* @param focusable
* to focused when the shortcut is invoked
* @param keyCode
@@ -1706,7 +1707,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
/**
* Gets the converter used to convert the property data source value to the
* field value.
- *
+ *
* @return The converter or null if none is set.
*/
public Converter<T, Object> getConverter() {
@@ -1717,7 +1718,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
* Sets the converter used to convert the field value to property data
* source type. The converter must have a presentation type that matches the
* field type.
- *
+ *
* @param converter
* The new converter to use.
*/
@@ -1800,7 +1801,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.AbstractComponent#readDesign(org.jsoup.nodes .Element,
* com.vaadin.ui.declarative.DesignContext)
*/
@@ -1816,7 +1817,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.AbstractComponent#getCustomAttributes()
*/
@Override
@@ -1831,7 +1832,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.AbstractComponent#writeDesign(org.jsoup.nodes.Element
* , com.vaadin.ui.declarative.DesignContext)
*/
diff --git a/server/src/main/java/com/vaadin/ui/AbstractFocusable.java b/server/src/main/java/com/vaadin/ui/AbstractFocusable.java
index ad3b96f29b..5f1c6cbc64 100644
--- a/server/src/main/java/com/vaadin/ui/AbstractFocusable.java
+++ b/server/src/main/java/com/vaadin/ui/AbstractFocusable.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,12 +28,12 @@ import com.vaadin.ui.Component.Focusable;
/**
* An abstract base class for focusable components. Includes API for setting the
* tab index, programmatic focusing, and adding focus and blur listeners.
- *
+ *
* @since 7.6
* @author Vaadin Ltd
*/
-public abstract class AbstractFocusable extends AbstractComponent implements
- Focusable, FocusNotifier, BlurNotifier {
+public abstract class AbstractFocusable extends AbstractComponent
+ implements Focusable, FocusNotifier, BlurNotifier {
protected AbstractFocusable() {
registerRpc(new FocusAndBlurServerRpcImpl(this) {
diff --git a/server/src/main/java/com/vaadin/ui/AbstractJavaScriptComponent.java b/server/src/main/java/com/vaadin/ui/AbstractJavaScriptComponent.java
index 68ee132b76..415ad2dcc9 100644
--- a/server/src/main/java/com/vaadin/ui/AbstractJavaScriptComponent.java
+++ b/server/src/main/java/com/vaadin/ui/AbstractJavaScriptComponent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -106,16 +106,18 @@ import elemental.json.JsonValue;
* the field, that function is called whenever the contents of the shared state
* is changed.</li>
* <li><code>onUnregister</code> - If the JavaScript code assigns a function to
- * the field, that function is called when the connector has been unregistered.</li>
+ * the field, that function is called when the connector has been
+ * unregistered.</li>
* <li>Any field name corresponding to a call to
* {@link #addFunction(String, JavaScriptFunction)} on the server will
* automatically be present as a function that triggers the registered function
* on the server.</li>
* <li>Any field name referred to using {@link #callFunction(String, Object...)}
- * on the server will be called if a function has been assigned to the field.</li>
+ * on the server will be called if a function has been assigned to the
+ * field.</li>
* </ul>
* <p>
- *
+ *
* Values in the Shared State and in RPC calls are converted between Java and
* JavaScript using the following conventions:
* <ul>
@@ -127,7 +129,8 @@ import elemental.json.JsonValue;
* <li>Java Strings are represented by JavaScript strings.</li>
* <li>Java Dates are represented by JavaScript numbers containing the timestamp
* </li>
- * <li>List, Set and all arrays in Java are represented by JavaScript arrays.</li>
+ * <li>List, Set and all arrays in Java are represented by JavaScript
+ * arrays.</li>
* <li>Map&lt;String, ?&gt; in Java is represented by JavaScript object with
* fields corresponding to the map keys.</li>
* <li>Any other Java Map is represented by a JavaScript array containing two
@@ -141,7 +144,7 @@ import elemental.json.JsonValue;
* here. Please refer to the documentation for specific types for serialization
* information.</li>
* </ul>
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
@@ -163,14 +166,15 @@ public abstract class AbstractJavaScriptComponent extends AbstractComponent {
* available as <code>this</code>). Calling that JavaScript function will
* cause the call method in the registered {@link JavaScriptFunction} to be
* invoked with the same arguments.
- *
+ *
* @param functionName
* the name that should be used for client-side function
* @param function
* the {@link JavaScriptFunction} object that will be invoked
* when the JavaScript function is called
*/
- protected void addFunction(String functionName, JavaScriptFunction function) {
+ protected void addFunction(String functionName,
+ JavaScriptFunction function) {
callbackHelper.registerCallback(functionName, function);
}
@@ -183,7 +187,7 @@ public abstract class AbstractJavaScriptComponent extends AbstractComponent {
* before sending. This can be done either with
* {@link JsonCodec#encode(Object, JsonValue, java.lang.reflect.Type, com.vaadin.ui.ConnectorTracker)}
* or using the factory methods in {@link Json}.
- *
+ *
* @param name
* the name of the function
* @param arguments
diff --git a/server/src/main/java/com/vaadin/ui/AbstractLayout.java b/server/src/main/java/com/vaadin/ui/AbstractLayout.java
index 0770670680..1804c2d135 100644
--- a/server/src/main/java/com/vaadin/ui/AbstractLayout.java
+++ b/server/src/main/java/com/vaadin/ui/AbstractLayout.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ import com.vaadin.ui.declarative.DesignContext;
/**
* An abstract class that defines default implementation for the {@link Layout}
* interface.
- *
+ *
* @author Vaadin Ltd.
* @since 5.0
*/
@@ -43,9 +43,9 @@ public abstract class AbstractLayout extends AbstractComponentContainer
* helper method should be called from the
* {@link #readDesign(Element, DesignContext) readDesign} method of layouts
* that implement {@link MarginHandler}.
- *
+ *
* @since 7.5
- *
+ *
* @param design
* the design from which to read
* @param defMargin
@@ -66,16 +66,15 @@ public abstract class AbstractLayout extends AbstractComponentContainer
boolean left = DesignAttributeHandler.readAttribute("margin-left",
design.attributes(), defMargin.hasLeft(), boolean.class);
- boolean right = DesignAttributeHandler.readAttribute(
- "margin-right", design.attributes(), defMargin.hasRight(),
- boolean.class);
+ boolean right = DesignAttributeHandler.readAttribute("margin-right",
+ design.attributes(), defMargin.hasRight(), boolean.class);
boolean top = DesignAttributeHandler.readAttribute("margin-top",
design.attributes(), defMargin.hasTop(), boolean.class);
boolean bottom = DesignAttributeHandler.readAttribute(
- "margin-bottom", design.attributes(),
- defMargin.hasBottom(), boolean.class);
+ "margin-bottom", design.attributes(), defMargin.hasBottom(),
+ boolean.class);
return new MarginInfo(top, right, bottom, left);
}
@@ -86,10 +85,10 @@ public abstract class AbstractLayout extends AbstractComponentContainer
* helper method should be called from the
* {@link #readDesign(Element, DesignContext) writeDesign} method of layouts
* that implement {@link MarginHandler}.
- *
- *
+ *
+ *
* @since 7.5
- *
+ *
* @param design
* the design to write to
* @param margin
@@ -102,9 +101,8 @@ public abstract class AbstractLayout extends AbstractComponentContainer
protected void writeMargin(Element design, MarginInfo margin,
MarginInfo defMargin, DesignContext context) {
if (margin.hasAll()) {
- DesignAttributeHandler.writeAttribute("margin",
- design.attributes(), margin.hasAll(), defMargin.hasAll(),
- boolean.class);
+ DesignAttributeHandler.writeAttribute("margin", design.attributes(),
+ margin.hasAll(), defMargin.hasAll(), boolean.class);
} else {
DesignAttributeHandler.writeAttribute("margin-left",
diff --git a/server/src/main/java/com/vaadin/ui/AbstractMedia.java b/server/src/main/java/com/vaadin/ui/AbstractMedia.java
index a0344624d7..a2f2c74d26 100644
--- a/server/src/main/java/com/vaadin/ui/AbstractMedia.java
+++ b/server/src/main/java/com/vaadin/ui/AbstractMedia.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -44,7 +44,7 @@ import com.vaadin.ui.declarative.DesignContext;
/**
* Abstract base class for the HTML5 media components.
- *
+ *
* @author Vaadin Ltd
*/
public abstract class AbstractMedia extends AbstractComponent {
@@ -61,7 +61,7 @@ public abstract class AbstractMedia extends AbstractComponent {
/**
* Sets a single media file as the source of the media component.
- *
+ *
* @param source
*/
public void setSource(Resource source) {
@@ -78,17 +78,17 @@ public abstract class AbstractMedia extends AbstractComponent {
/**
* Adds an alternative media file to the sources list. Which of the sources
* is used is selected by the browser depending on which file formats it
- * supports. See <a
- * href="http://en.wikipedia.org/wiki/HTML5_video#Table">wikipedia</a> for a
- * table of formats supported by different browsers.
- *
+ * supports. See
+ * <a href="http://en.wikipedia.org/wiki/HTML5_video#Table">wikipedia</a>
+ * for a table of formats supported by different browsers.
+ *
* @param source
*/
public void addSource(Resource source) {
if (source != null) {
List<URLReference> sources = getState().sources;
- sources.add(new ResourceReference(source, this, Integer
- .toString(sources.size())));
+ sources.add(new ResourceReference(source, this,
+ Integer.toString(sources.size())));
getState().sourceTypes.add(source.getMIMEType());
}
}
@@ -135,10 +135,10 @@ public abstract class AbstractMedia extends AbstractComponent {
/**
* Set multiple sources at once. Which of the sources is used is selected by
- * the browser depending on which file formats it supports. See <a
- * href="http://en.wikipedia.org/wiki/HTML5_video#Table">wikipedia</a> for a
- * table of formats supported by different browsers.
- *
+ * the browser depending on which file formats it supports. See
+ * <a href="http://en.wikipedia.org/wiki/HTML5_video#Table">wikipedia</a>
+ * for a table of formats supported by different browsers.
+ *
* @param sources
*/
public void setSources(Resource... sources) {
@@ -161,7 +161,7 @@ public abstract class AbstractMedia extends AbstractComponent {
/**
* Sets whether or not the browser should show native media controls.
- *
+ *
* @param showControls
*/
public void setShowControls(boolean showControls) {
@@ -183,7 +183,7 @@ public abstract class AbstractMedia extends AbstractComponent {
* flash-based player, see the <a href=
* "https://developer.mozilla.org/En/Using_audio_and_video_in_Firefox#Using_Flash"
* >Mozilla Developer Network</a> for details.
- *
+ *
* @param altText
*/
public void setAltText(String altText) {
@@ -201,7 +201,7 @@ public abstract class AbstractMedia extends AbstractComponent {
/**
* Set whether the alternative text ({@link #setAltText(String)}) is
* rendered as HTML or not.
- *
+ *
* @param htmlContentAllowed
*/
public void setHtmlContentAllowed(boolean htmlContentAllowed) {
@@ -219,7 +219,7 @@ public abstract class AbstractMedia extends AbstractComponent {
/**
* Sets whether the media is to automatically start playback when enough
* data has been loaded.
- *
+ *
* @param autoplay
*/
public void setAutoplay(boolean autoplay) {
@@ -235,7 +235,7 @@ public abstract class AbstractMedia extends AbstractComponent {
/**
* Set whether to mute the audio or not.
- *
+ *
* @param muted
*/
public void setMuted(boolean muted) {
diff --git a/server/src/main/java/com/vaadin/ui/AbstractOrderedLayout.java b/server/src/main/java/com/vaadin/ui/AbstractOrderedLayout.java
index d6df3f372a..0a555152cb 100644
--- a/server/src/main/java/com/vaadin/ui/AbstractOrderedLayout.java
+++ b/server/src/main/java/com/vaadin/ui/AbstractOrderedLayout.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -39,9 +39,9 @@ import com.vaadin.ui.declarative.DesignAttributeHandler;
import com.vaadin.ui.declarative.DesignContext;
@SuppressWarnings("serial")
-public abstract class AbstractOrderedLayout extends AbstractLayout implements
- Layout.AlignmentHandler, Layout.SpacingHandler, LayoutClickNotifier,
- Layout.MarginHandler {
+public abstract class AbstractOrderedLayout extends AbstractLayout
+ implements Layout.AlignmentHandler, Layout.SpacingHandler,
+ LayoutClickNotifier, Layout.MarginHandler {
private AbstractOrderedLayoutServerRpc rpc = new AbstractOrderedLayoutServerRpc() {
@@ -84,7 +84,7 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements
/**
* Add a component into this container. The component is added to the right
* or under the previous component.
- *
+ *
* @param c
* the component to be added.
*/
@@ -105,7 +105,7 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements
/**
* Adds a component into this container. The component is added to the left
* or on top of the other components.
- *
+ *
* @param c
* the component to be added.
*/
@@ -128,7 +128,7 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements
/**
* Adds a component into indexed position in this container.
- *
+ *
* @param c
* the component to be added.
* @param index
@@ -168,7 +168,7 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements
/**
* Removes the component from this container.
- *
+ *
* @param c
* the component to be removed.
*/
@@ -182,7 +182,7 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements
/**
* Gets the component container iterator for going trough all the components
* in the container.
- *
+ *
* @return the Iterator of the components inside the container.
*/
@Override
@@ -193,7 +193,7 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements
/**
* Gets the number of contained components. Consistent with the iterator
* returned by {@link #getComponentIterator()}.
- *
+ *
* @return the number of contained components
*/
@Override
@@ -203,13 +203,15 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements
/* Documented in superclass */
@Override
- public void replaceComponent(Component oldComponent, Component newComponent) {
+ public void replaceComponent(Component oldComponent,
+ Component newComponent) {
// Gets the locations
int oldLocation = -1;
int newLocation = -1;
int location = 0;
- for (final Iterator<Component> i = components.iterator(); i.hasNext();) {
+ for (final Iterator<Component> i = components.iterator(); i
+ .hasNext();) {
final Component component = i.next();
if (component == oldComponent) {
@@ -265,7 +267,7 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.Layout.AlignmentHandler#getComponentAlignment(com
* .vaadin.ui.Component)
*/
@@ -282,7 +284,7 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.Layout.SpacingHandler#setSpacing(boolean)
*/
@Override
@@ -292,7 +294,7 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.Layout.SpacingHandler#isSpacing()
*/
@Override
@@ -305,26 +307,26 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements
* This method is used to control how excess space in layout is distributed
* among components. Excess space may exist if layout is sized and contained
* non relatively sized components don't consume all available space.
- *
+ *
* <p>
* Example how to distribute 1:3 (33%) for component1 and 2:3 (67%) for
* component2 :
- *
+ *
* <code>
* layout.setExpandRatio(component1, 1);<br>
* layout.setExpandRatio(component2, 2);
* </code>
- *
+ *
* <p>
* If no ratios have been set, the excess space is distributed evenly among
* all components.
- *
+ *
* <p>
* Note, that width or height (depending on orientation) needs to be defined
* for this method to have any effect.
- *
+ *
* @see Sizeable
- *
+ *
* @param component
* the component in this layout which expand ratio is to be set
* @param ratio
@@ -349,7 +351,7 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements
/**
* Returns the expand ratio of given component.
- *
+ *
* @param component
* which expand ratios is requested
* @return expand ratio of given component, 0.0f by default.
@@ -399,7 +401,7 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements
/**
* Returns the index of the given component.
- *
+ *
* @param component
* The component to look up.
* @return The index of the component or -1 if the component is not a child.
@@ -410,7 +412,7 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements
/**
* Returns the component at the given position.
- *
+ *
* @param index
* The position of the component.
* @return The component at the given index.
@@ -428,7 +430,7 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.Layout.MarginHandler#getMargin()
*/
@Override
@@ -438,7 +440,7 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.Layout.MarginHandler#setMargin(MarginInfo)
*/
@Override
@@ -448,7 +450,7 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.Layout.AlignmentHandler#getDefaultComponentAlignment()
*/
@Override
@@ -458,7 +460,7 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.ui.Layout.AlignmentHandler#setDefaultComponentAlignment(com
* .vaadin.ui.Alignment)
@@ -476,7 +478,7 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.AbstractComponent#readDesign(org.jsoup.nodes .Element,
* com.vaadin.ui.declarative.DesignContext)
*/
@@ -503,8 +505,8 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements
float ratio = Float.valueOf(value);
setExpandRatio(newChild, ratio);
} catch (NumberFormatException nfe) {
- getLogger().info(
- "Failed to parse expand ratio " + value);
+ getLogger()
+ .info("Failed to parse expand ratio " + value);
}
} else {
setExpandRatio(newChild, 1.0f);
@@ -515,7 +517,7 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.AbstractComponent#writeDesign(org.jsoup.nodes.Element
* , com.vaadin.ui.declarative.DesignContext)
*/
@@ -562,7 +564,7 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.AbstractComponent#getCustomAttributes()
*/
@Override
diff --git a/server/src/main/java/com/vaadin/ui/AbstractSelect.java b/server/src/main/java/com/vaadin/ui/AbstractSelect.java
index 882458c531..80fd442724 100644
--- a/server/src/main/java/com/vaadin/ui/AbstractSelect.java
+++ b/server/src/main/java/com/vaadin/ui/AbstractSelect.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -66,13 +66,13 @@ import com.vaadin.ui.declarative.DesignFormatter;
* set of choices is presented as a set of {@link com.vaadin.data.Item}s in a
* {@link com.vaadin.data.Container}.
* </p>
- *
+ *
* <p>
* A <code>Select</code> component may be in single- or multiselect mode.
* Multiselect mode means that more than one item can be selected
* simultaneously.
* </p>
- *
+ *
* @author Vaadin Ltd.
* @since 5.0
*/
@@ -92,7 +92,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Item caption mode: Item's ID's <code>String</code> representation is
* used as caption.
- *
+ *
* @since 7.5.6
*/
ID_TOSTRING,
@@ -200,7 +200,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Sets the option filtering mode.
- *
+ *
* @param filteringMode
* the filtering mode to use
*/
@@ -208,7 +208,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Gets the current filtering mode.
- *
+ *
* @return the filtering mode in use
*/
public FilteringMode getFilteringMode();
@@ -272,7 +272,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Item id that represents null selection of this select.
- *
+ *
* <p>
* Data interface does not support nulls as item ids. Selecting the item
* identified by this id is the same as selecting no items at all. This
@@ -307,7 +307,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Creates a new select that is connected to a data-source.
- *
+ *
* @param caption
* the Caption of the component.
* @param dataSource
@@ -320,7 +320,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Creates a new select that is filled from a collection of option values.
- *
+ *
* @param caption
* the Caption of this field.
* @param options
@@ -344,7 +344,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Paints the content of this component.
- *
+ *
* @param target
* the Paint Event.
* @throws PaintException
@@ -449,7 +449,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Invoked when the value of a variable has changed.
- *
+ *
* @see com.vaadin.ui.AbstractComponent#changeVariables(java.lang.Object,
* java.util.Map)
*/
@@ -488,7 +488,8 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
}
}
- if (!isNullSelectionAllowed() && acceptedSelections.size() < 1) {
+ if (!isNullSelectionAllowed()
+ && acceptedSelections.size() < 1) {
// empty selection not allowed, keep old value
markAsDirty();
return;
@@ -498,7 +499,8 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
// (non-visible items can not be deselected)
Collection<?> visibleNotSelected = getVisibleItemIds();
if (visibleNotSelected != null) {
- visibleNotSelected = new HashSet<Object>(visibleNotSelected);
+ visibleNotSelected = new HashSet<Object>(
+ visibleNotSelected);
// Don't remove those that will be added to preserve order
visibleNotSelected.removeAll(acceptedSelections);
@@ -517,7 +519,8 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
// Single select mode
if (!isNullSelectionAllowed()
&& (clientSideSelectedKeys.length == 0
- || clientSideSelectedKeys[0] == null || clientSideSelectedKeys[0] == getNullSelectionItemId())) {
+ || clientSideSelectedKeys[0] == null
+ || clientSideSelectedKeys[0] == getNullSelectionItemId())) {
markAsDirty();
return;
}
@@ -554,7 +557,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* TODO refine doc Setter for new item handler that is called when user adds
* new item in newItemAllowed mode.
- *
+ *
* @param newItemHandler
*/
public void setNewItemHandler(NewItemHandler newItemHandler) {
@@ -563,7 +566,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* TODO refine doc
- *
+ *
* @return
*/
public NewItemHandler getNewItemHandler() {
@@ -579,13 +582,13 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* TODO refine doc
- *
+ *
* This is a default class that handles adding new items that are typed by
* user to selects container.
- *
+ *
* By extending this class one may implement some logic on new item addition
* like database inserts.
- *
+ *
*/
public class DefaultNewItemHandler implements NewItemHandler {
@Override
@@ -602,7 +605,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
if (getItemCaptionPropertyId() != null) {
getContainerProperty(newItemCaption,
getItemCaptionPropertyId())
- .setValue(newItemCaption);
+ .setValue(newItemCaption);
}
if (isMultiSelect()) {
Set values = new HashSet((Collection) getValue());
@@ -631,7 +634,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
* <code>setValue</code> methods must be compatible with this type: one can
* safely cast <code>getValue</code> to given type and pass any variable
* assignable to this type as a parameter to <code>setValue</code>.
- *
+ *
* @return the Type of the property.
*/
@Override
@@ -645,7 +648,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Gets the selected item id or in multiselect mode a set of selected ids.
- *
+ *
* @see com.vaadin.ui.AbstractField#getValue()
*/
@Override
@@ -677,13 +680,13 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Sets the visible value of the property.
- *
+ *
* <p>
* The value of the select is the selected item id. If the select is in
* multiselect-mode, the value is a set of selected item keys. In
* multiselect mode all collections of id:s can be assigned.
* </p>
- *
+ *
* @param newValue
* the New selected item or collection of selected items.
* @see com.vaadin.ui.AbstractField#setValue(java.lang.Object)
@@ -699,13 +702,13 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Sets the visible value of the property.
- *
+ *
* <p>
* The value of the select is the selected item id. If the select is in
* multiselect-mode, the value is a set of selected item keys. In
* multiselect mode all collections of id:s can be assigned.
* </p>
- *
+ *
* @since 7.5.7
* @param newValue
* the New selected item or collection of selected items.
@@ -725,11 +728,12 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
if (newFieldValue == null) {
super.setValue(new LinkedHashSet<Object>(), repaintIsNotNeeded,
ignoreReadOnly);
- } else if (Collection.class.isAssignableFrom(newFieldValue
- .getClass())) {
- super.setValue(new LinkedHashSet<Object>(
- (Collection<?>) newFieldValue), repaintIsNotNeeded,
- ignoreReadOnly);
+ } else if (Collection.class
+ .isAssignableFrom(newFieldValue.getClass())) {
+ super.setValue(
+ new LinkedHashSet<Object>(
+ (Collection<?>) newFieldValue),
+ repaintIsNotNeeded, ignoreReadOnly);
}
} else if (newFieldValue == null || items.containsId(newFieldValue)) {
super.setValue(newFieldValue, repaintIsNotNeeded, ignoreReadOnly);
@@ -741,7 +745,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Gets the item from the container with given id. If the container does not
* contain the requested item, null is returned.
- *
+ *
* @param itemId
* the item id.
* @return the item from the container.
@@ -753,7 +757,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Gets the item Id collection from the container.
- *
+ *
* @return the Collection of item ids.
*/
@Override
@@ -763,7 +767,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Gets the property Id collection from the container.
- *
+ *
* @return the Collection of property ids.
*/
@Override
@@ -773,7 +777,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Gets the property type.
- *
+ *
* @param propertyId
* the Id identifying the property.
* @see com.vaadin.data.Container#getType(java.lang.Object)
@@ -785,9 +789,9 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/*
* Gets the number of items in the container.
- *
+ *
* @return the Number of items in the container.
- *
+ *
* @see com.vaadin.data.Container#size()
*/
@Override
@@ -799,7 +803,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Tests, if the collection contains an item with given id.
- *
+ *
* @param itemId
* the Id the of item to be tested.
*/
@@ -815,7 +819,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Gets the Property identified by the given itemId and propertyId from the
* Container
- *
+ *
* @see com.vaadin.data.Container#getContainerProperty(Object, Object)
*/
@Override
@@ -826,10 +830,10 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Adds the new property to all items. Adds a property with given id, type
* and default value to all items in the container.
- *
+ *
* This functionality is optional. If the function is unsupported, it always
* returns false.
- *
+ *
* @return True if the operation succeeded.
* @see com.vaadin.data.Container#addContainerProperty(java.lang.Object,
* java.lang.Class, java.lang.Object)
@@ -848,10 +852,10 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Removes all items from the container.
- *
+ *
* This functionality is optional. If the function is unsupported, it always
* returns false.
- *
+ *
* @return True if the operation succeeded.
* @see com.vaadin.data.Container#removeAllItems()
*/
@@ -873,7 +877,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
* Creates a new item into container with container managed id. The id of
* the created new item is returned. The item can be fetched with getItem()
* method. if the creation fails, null is returned.
- *
+ *
* @return the Id of the created item or null in case of failure.
* @see com.vaadin.data.Container#addItem()
*/
@@ -893,10 +897,10 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
* ready for setting property values. if the creation fails, null is
* returned. In case the container already contains the item, null is
* returned.
- *
+ *
* This functionality is optional. If the function is unsupported, it always
* returns null.
- *
+ *
* @param itemId
* the Identification of the item to be created.
* @return the Created item with the given id, or null in case of failure.
@@ -915,7 +919,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Adds given items with given item ids to container.
- *
+ *
* @since 7.2
* @param itemId
* item identifiers to be added to underlying container
@@ -923,7 +927,8 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
* if the underlying container don't support adding items with
* identifiers
*/
- public void addItems(Object... itemId) throws UnsupportedOperationException {
+ public void addItems(Object... itemId)
+ throws UnsupportedOperationException {
for (Object id : itemId) {
addItem(id);
}
@@ -931,7 +936,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Adds given items with given item ids to container.
- *
+ *
* @since 7.2
* @param itemIds
* item identifiers to be added to underlying container
@@ -946,7 +951,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container#removeItem(java.lang.Object)
*/
@Override
@@ -1001,10 +1006,10 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Removes the property from all items. Removes a property with given id
* from all the items in the container.
- *
+ *
* This functionality is optional. If the function is unsupported, it always
* returns false.
- *
+ *
* @return True if the operation succeeded.
* @see com.vaadin.data.Container#removeContainerProperty(java.lang.Object)
*/
@@ -1023,12 +1028,12 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Sets the Container that serves as the data source of the viewer.
- *
+ *
* As a side-effect the fields value (selection) is set to null due old
* selection not necessary exists in new Container.
- *
+ *
* @see com.vaadin.data.Container.Viewer#setContainerDataSource(Container)
- *
+ *
* @param newDataSource
* the new data source.
*/
@@ -1085,7 +1090,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Gets the viewing data-source container.
- *
+ *
* @see com.vaadin.data.Container.Viewer#getContainerDataSource()
*/
@Override
@@ -1097,7 +1102,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Is the select in multiselect mode? In multiselect mode
- *
+ *
* @return the Value of property multiSelect.
*/
public boolean isMultiSelect() {
@@ -1108,10 +1113,10 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
* Sets the multiselect mode. Setting multiselect mode false may lose
* selection information: if selected items set contains one or more
* selected items, only one of the selected items is kept as selected.
- *
+ *
* Subclasses of AbstractSelect can choose not to support changing the
* multiselect mode, and may throw {@link UnsupportedOperationException}.
- *
+ *
* @param multiSelect
* the New value of property multiSelect.
*/
@@ -1153,7 +1158,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
* Does the select allow adding new options by the user. If true, the new
* options can be added to the Container. The text entered by the user is
* used as id. Note that data-source must allow adding new items.
- *
+ *
* @return True if additions are allowed.
*/
public boolean isNewItemsAllowed() {
@@ -1162,7 +1167,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Enables or disables possibility to add new options by the user.
- *
+ *
* @param allowNewOptions
* the New value of property allowNewOptions.
*/
@@ -1180,7 +1185,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Override the caption of an item. Setting caption explicitly overrides id,
* item and index captions.
- *
+ *
* @param itemId
* the id of the item to be recaptioned.
* @param caption
@@ -1197,7 +1202,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
* Gets the caption of an item. The caption is generated as specified by the
* item caption mode. See <code>setItemCaptionMode()</code> for more
* details.
- *
+ *
* @param itemId
* the id of the item to be queried.
* @return the caption for specified item.
@@ -1221,8 +1226,8 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
break;
case INDEX:
if (items instanceof Container.Indexed) {
- caption = String.valueOf(((Container.Indexed) items)
- .indexOfId(itemId));
+ caption = String
+ .valueOf(((Container.Indexed) items).indexOfId(itemId));
} else {
caption = "ERROR: Container is not indexed";
}
@@ -1265,7 +1270,8 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
private String idToCaption(Object itemId) {
try {
Converter<String, Object> c = (Converter<String, Object>) ConverterUtil
- .getConverter(String.class, itemId.getClass(), getSession());
+ .getConverter(String.class, itemId.getClass(),
+ getSession());
return ConverterUtil.convertFromModel(itemId, String.class, c,
getLocale());
} catch (Exception e) {
@@ -1275,7 +1281,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Sets the icon for an item.
- *
+ *
* @param itemId
* the id of the item to be assigned an icon.
* @param icon
@@ -1294,7 +1300,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Gets the item icon.
- *
+ *
* @param itemId
* the id of the item to be assigned an icon.
* @return the icon for the item or null, if not specified.
@@ -1324,12 +1330,12 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Sets the item caption mode.
- *
+ *
* See {@link ItemCaptionMode} for a description of the modes.
* <p>
* {@link ItemCaptionMode#EXPLICIT_DEFAULTS_ID} is the default mode.
* </p>
- *
+ *
* @param mode
* the One of the modes listed above.
*/
@@ -1342,7 +1348,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Gets the item caption mode.
- *
+ *
* <p>
* The mode can be one of the following ones:
* <ul>
@@ -1365,7 +1371,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
* The <code>ITEM_CAPTION_MODE_EXPLICIT_DEFAULTS_ID</code> is the default
* mode.
* </p>
- *
+ *
* @return the One of the modes listed above.
*/
public ItemCaptionMode getItemCaptionMode() {
@@ -1374,7 +1380,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Sets the item caption property.
- *
+ *
* <p>
* Setting the id to a existing property implicitly sets the item caption
* mode to <code>ITEM_CAPTION_MODE_PROPERTY</code>. If the object is in
@@ -1390,10 +1396,10 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
* default
* </p>
* .
- *
+ *
* @param propertyId
* the id of the property.
- *
+ *
*/
public void setItemCaptionPropertyId(Object propertyId) {
if (propertyId != null) {
@@ -1411,7 +1417,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Gets the item caption property.
- *
+ *
* @return the Id of the property used as item caption source.
*/
public Object getItemCaptionPropertyId() {
@@ -1420,24 +1426,24 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Sets the item icon property.
- *
+ *
* <p>
* If the property id is set to a valid value, each item is given an icon
* got from the given property of the items. The type of the property must
* be assignable to Resource.
* </p>
- *
+ *
* <p>
* Note : The icons set with <code>setItemIcon</code> function override the
* icons from the property.
* </p>
- *
+ *
* <p>
* Setting the property id to null disables this feature. The id is null by
* default
* </p>
* .
- *
+ *
* @param propertyId
* the id of the property that specifies icons for items or null
* @throws IllegalArgumentException
@@ -1462,24 +1468,24 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Gets the item icon property.
- *
+ *
* <p>
* If the property id is set to a valid value, each item is given an icon
* got from the given property of the items. The type of the property must
* be assignable to Icon.
* </p>
- *
+ *
* <p>
* Note : The icons set with <code>setItemIcon</code> function override the
* icons from the property.
* </p>
- *
+ *
* <p>
* Setting the property id to null disables this feature. The id is null by
* default
* </p>
* .
- *
+ *
* @return the Id of the property containing the item icons.
*/
public Object getItemIconPropertyId() {
@@ -1488,18 +1494,18 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Tests if an item is selected.
- *
+ *
* <p>
* In single select mode testing selection status of the item identified by
* {@link #getNullSelectionItemId()} returns true if the value of the
* property is null.
* </p>
- *
+ *
* @param itemId
* the Id the of the item to be tested.
* @see #getNullSelectionItemId()
* @see #setNullSelectionItemId(Object)
- *
+ *
*/
public boolean isSelected(Object itemId) {
if (itemId == null) {
@@ -1509,24 +1515,24 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
return ((Set<?>) getValue()).contains(itemId);
} else {
final Object value = getValue();
- return itemId.equals(value == null ? getNullSelectionItemId()
- : value);
+ return itemId
+ .equals(value == null ? getNullSelectionItemId() : value);
}
}
/**
* Selects an item.
- *
+ *
* <p>
* In single select mode selecting item identified by
* {@link #getNullSelectionItemId()} sets the value of the property to null.
* </p>
- *
+ *
* @param itemId
* the identifier of Item to be selected.
* @see #getNullSelectionItemId()
* @see #setNullSelectionItemId(Object)
- *
+ *
*/
public void select(Object itemId) {
if (!isMultiSelect()) {
@@ -1541,12 +1547,12 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Unselects an item.
- *
+ *
* @param itemId
* the identifier of the Item to be unselected.
* @see #getNullSelectionItemId()
* @see #setNullSelectionItemId(Object)
- *
+ *
*/
public void unselect(Object itemId) {
if (isSelected(itemId)) {
@@ -1562,7 +1568,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Notifies this listener that the Containers contents has changed.
- *
+ *
* @see com.vaadin.data.Container.PropertySetChangeListener#containerPropertySetChange(com.vaadin.data.Container.PropertySetChangeEvent)
*/
@Override
@@ -1573,7 +1579,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Adds a new Property set change listener for this Container.
- *
+ *
* @see com.vaadin.data.Container.PropertySetChangeNotifier#addListener(com.vaadin.data.Container.PropertySetChangeListener)
*/
@Override
@@ -1597,7 +1603,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Removes a previously registered Property set change listener.
- *
+ *
* @see com.vaadin.data.Container.PropertySetChangeNotifier#removeListener(com.vaadin.data.Container.PropertySetChangeListener)
*/
@Override
@@ -1623,7 +1629,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Adds an Item set change listener for the object.
- *
+ *
* @see com.vaadin.data.Container.ItemSetChangeNotifier#addListener(com.vaadin.data.Container.ItemSetChangeListener)
*/
@Override
@@ -1647,7 +1653,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Removes the Item set change listener from the object.
- *
+ *
* @see com.vaadin.data.Container.ItemSetChangeNotifier#removeListener(com.vaadin.data.Container.ItemSetChangeListener)
*/
@Override
@@ -1695,7 +1701,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Lets the listener know a Containers Item set has changed.
- *
+ *
* @see com.vaadin.data.Container.ItemSetChangeListener#containerItemSetChange(com.vaadin.data.Container.ItemSetChangeEvent)
*/
@Override
@@ -1743,8 +1749,8 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Implementation of item set change event.
*/
- private static class ItemSetChangeEvent extends EventObject implements
- Serializable, Container.ItemSetChangeEvent {
+ private static class ItemSetChangeEvent extends EventObject
+ implements Serializable, Container.ItemSetChangeEvent {
private ItemSetChangeEvent(Container source) {
super(source);
@@ -1752,7 +1758,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Gets the Property where the event occurred.
- *
+ *
* @see com.vaadin.data.Container.ItemSetChangeEvent#getContainer()
*/
@Override
@@ -1765,8 +1771,8 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Implementation of property set change event.
*/
- private static class PropertySetChangeEvent extends EventObject implements
- Container.PropertySetChangeEvent, Serializable {
+ private static class PropertySetChangeEvent extends EventObject
+ implements Container.PropertySetChangeEvent, Serializable {
private PropertySetChangeEvent(Container source) {
super(source);
@@ -1774,7 +1780,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Retrieves the Container whose contents have been modified.
- *
+ *
* @see com.vaadin.data.Container.PropertySetChangeEvent#getContainer()
*/
@Override
@@ -1787,7 +1793,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* For multi-selectable fields, also an empty collection of values is
* considered to be an empty field.
- *
+ *
* @see AbstractField#isEmpty().
*/
@Override
@@ -1796,9 +1802,8 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
return super.isEmpty();
} else {
Object value = getValue();
- return super.isEmpty()
- || (value instanceof Collection && ((Collection<?>) value)
- .isEmpty());
+ return super.isEmpty() || (value instanceof Collection
+ && ((Collection<?>) value).isEmpty());
}
}
@@ -1807,7 +1812,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
* single-select mode, you can make an item represent the empty selection by
* calling <code>setNullSelectionItemId()</code>. This way you can for
* instance set an icon and caption for the null selection item.
- *
+ *
* @param nullSelectionAllowed
* whether or not to allow empty selection
* @see #setNullSelectionItemId(Object)
@@ -1822,7 +1827,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Checks if null empty selection is allowed by the user.
- *
+ *
* @return whether or not empty selection is allowed
* @see #setNullSelectionAllowed(boolean)
*/
@@ -1833,13 +1838,13 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Returns the item id that represents null value of this select in single
* select mode.
- *
+ *
* <p>
* Data interface does not support nulls as item ids. Selecting the item
* identified by this id is the same as selecting no items at all. This
* setting only affects the single select mode.
* </p>
- *
+ *
* @return the Object Null value item id.
* @see #setNullSelectionItemId(Object)
* @see #isSelected(Object)
@@ -1851,13 +1856,13 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Sets the item id that represents null value of this select.
- *
+ *
* <p>
* Data interface does not support nulls as item ids. Selecting the item
* identified by this id is the same as selecting no items at all. This
* setting only affects the single select mode.
* </p>
- *
+ *
* @param nullSelectionItemId
* the nullSelectionItemId to set.
* @see #getNullSelectionItemId()
@@ -1874,7 +1879,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Notifies the component that it is connected to an application.
- *
+ *
* @see com.vaadin.ui.AbstractField#attach()
*/
@Override
@@ -1884,7 +1889,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Detaches the component from application.
- *
+ *
* @see com.vaadin.ui.AbstractComponent#detach()
*/
@Override
@@ -1908,9 +1913,9 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
* "lazyloading" components should take care to add and remove listeners as
* appropriate. Call addNotifierForItem() for each painted item (and
* remember to clear).
- *
+ *
* NOTE: singleton, use getCaptionChangeListener().
- *
+ *
*/
protected class CaptionChangeListener implements
Item.PropertySetChangeListener, Property.ValueChangeListener {
@@ -1928,7 +1933,8 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
}
if (i instanceof Item.PropertySetChangeNotifier) {
((Item.PropertySetChangeNotifier) i)
- .addPropertySetChangeListener(getCaptionChangeListener());
+ .addPropertySetChangeListener(
+ getCaptionChangeListener());
captionChangeNotifiers.add(i);
}
Collection<?> pids = i.getItemPropertyIds();
@@ -1938,7 +1944,8 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
if (p != null
&& p instanceof Property.ValueChangeNotifier) {
((Property.ValueChangeNotifier) p)
- .addValueChangeListener(getCaptionChangeListener());
+ .addValueChangeListener(
+ getCaptionChangeListener());
captionChangeNotifiers.add(p);
}
}
@@ -1973,17 +1980,20 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
Object notifier = it.next();
if (notifier instanceof Item.PropertySetChangeNotifier) {
((Item.PropertySetChangeNotifier) notifier)
- .removePropertySetChangeListener(getCaptionChangeListener());
+ .removePropertySetChangeListener(
+ getCaptionChangeListener());
} else {
((Property.ValueChangeNotifier) notifier)
- .removeValueChangeListener(getCaptionChangeListener());
+ .removeValueChangeListener(
+ getCaptionChangeListener());
}
}
captionChangeNotifiers.clear();
}
@Override
- public void valueChange(com.vaadin.data.Property.ValueChangeEvent event) {
+ public void valueChange(
+ com.vaadin.data.Property.ValueChangeEvent event) {
markAsDirty();
}
@@ -2000,7 +2010,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
* given Item identifier(s). Criterion can be used only on a drop targets
* that extends AbstractSelect like {@link Table} and {@link Tree}. The
* target and identifiers of valid Items are given in constructor.
- *
+ *
* @since 6.3
*/
public static class TargetItemIs extends AbstractItemSetCriterion {
@@ -2029,18 +2039,19 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Abstract helper class to implement item id based criterion.
- *
+ *
* Note, inner class used not to open itemIdMapper for public access.
- *
+ *
* @since 6.3
- *
+ *
*/
- private static abstract class AbstractItemSetCriterion extends
- ClientSideCriterion {
+ private static abstract class AbstractItemSetCriterion
+ extends ClientSideCriterion {
protected final Collection<Object> itemIds = new HashSet<Object>();
protected AbstractSelect select;
- public AbstractItemSetCriterion(AbstractSelect select, Object... itemId) {
+ public AbstractItemSetCriterion(AbstractSelect select,
+ Object... itemId) {
if (itemIds == null || select == null) {
throw new IllegalArgumentException(
"Accepted item identifiers must be accepted.");
@@ -2067,7 +2078,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* This criterion accepts a only a {@link Transferable} that contains given
* Item (practically its identifier) from a specific AbstractSelect.
- *
+ *
* @since 6.3
*/
public static class AcceptItem extends AbstractItemSetCriterion {
@@ -2106,7 +2117,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* TargetDetails implementation for subclasses of {@link AbstractSelect}
* that implement {@link DropTarget}.
- *
+ *
* @since 6.3
*/
public class AbstractSelectTargetDetails extends TargetDetailsImpl {
@@ -2119,9 +2130,10 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Constructor that automatically converts itemIdOver key to
* corresponding item Id
- *
+ *
*/
- protected AbstractSelectTargetDetails(Map<String, Object> rawVariables) {
+ protected AbstractSelectTargetDetails(
+ Map<String, Object> rawVariables) {
super(rawVariables, (DropTarget) AbstractSelect.this);
// eagar fetch itemid, mapper may be emptied
String keyover = (String) getData("itemIdOver");
@@ -2133,7 +2145,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* If the drag operation is currently over an {@link Item}, this method
* returns the identifier of that {@link Item}.
- *
+ *
*/
public Object getItemIdOver() {
return idOver;
@@ -2182,7 +2194,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Called by Table when a cell (and row) is painted or a item is painted
* in Tree
- *
+ *
* @param source
* The source of the generator, the Tree or Table the
* generator is attached to
@@ -2226,7 +2238,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
* Reads an Item from a design and inserts it into the data source.
* Hierarchical select components should override this method to recursively
* recursively read any child items as well.
- *
+ *
* @since 7.5.0
* @param child
* a child element representing the item
@@ -2236,7 +2248,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
* @param context
* the DesignContext instance used in parsing
* @return the item id of the new item
- *
+ *
* @throws DesignException
* if the tag name of the {@code child} element is not
* {@code option}.
@@ -2259,10 +2271,8 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
}
if (child.hasAttr("icon")) {
- setItemIcon(
- itemId,
- DesignAttributeHandler.readAttribute("icon",
- child.attributes(), Resource.class));
+ setItemIcon(itemId, DesignAttributeHandler.readAttribute("icon",
+ child.attributes(), Resource.class));
}
if (child.hasAttr("selected")) {
@@ -2286,7 +2296,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Writes the data source items to a design. Hierarchical select components
* should override this method to only write the root items.
- *
+ *
* @since 7.5.0
* @param design
* the element into which to insert the items
@@ -2302,7 +2312,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Writes a data source Item to a design. Hierarchical select components
* should override this method to recursively write any child items as well.
- *
+ *
* @since 7.5.0
* @param design
* the element into which to insert the item
diff --git a/server/src/main/java/com/vaadin/ui/AbstractSingleComponentContainer.java b/server/src/main/java/com/vaadin/ui/AbstractSingleComponentContainer.java
index 0854ffe9c2..07a0da9a68 100644
--- a/server/src/main/java/com/vaadin/ui/AbstractSingleComponentContainer.java
+++ b/server/src/main/java/com/vaadin/ui/AbstractSingleComponentContainer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,14 +30,14 @@ import com.vaadin.ui.declarative.DesignException;
/**
* Abstract base class for component containers that have only one child
* component.
- *
+ *
* For component containers that support multiple children, inherit
* {@link AbstractComponentContainer} instead of this class.
- *
+ *
* @since 7.0
*/
-public abstract class AbstractSingleComponentContainer extends
- AbstractComponent implements SingleComponentContainer {
+public abstract class AbstractSingleComponentContainer extends AbstractComponent
+ implements SingleComponentContainer {
private Component content;
@@ -65,7 +65,8 @@ public abstract class AbstractSingleComponentContainer extends
/* documented in interface */
@Override
- public void removeComponentAttachListener(ComponentAttachListener listener) {
+ public void removeComponentAttachListener(
+ ComponentAttachListener listener) {
removeListener(ComponentAttachEvent.class, listener,
ComponentAttachListener.attachMethod);
}
@@ -79,7 +80,8 @@ public abstract class AbstractSingleComponentContainer extends
/* documented in interface */
@Override
- public void removeComponentDetachListener(ComponentDetachListener listener) {
+ public void removeComponentDetachListener(
+ ComponentDetachListener listener) {
removeListener(ComponentDetachEvent.class, listener,
ComponentDetachListener.detachMethod);
}
@@ -88,7 +90,7 @@ public abstract class AbstractSingleComponentContainer extends
* Fires the component attached event. This is called by the
* {@link #setContent(Component)} method after the component has been set as
* the content.
- *
+ *
* @param component
* the component that has been added to this container.
*/
@@ -100,7 +102,7 @@ public abstract class AbstractSingleComponentContainer extends
* Fires the component detached event. This is called by the
* {@link #setContent(Component)} method after the content component has
* been replaced by other content.
- *
+ *
* @param component
* the component that has been removed from this container.
*/
@@ -116,13 +118,13 @@ public abstract class AbstractSingleComponentContainer extends
/**
* Sets the content of this container. The content is a component that
* serves as the outermost item of the visual contents.
- *
+ *
* The content must always be set, either with a constructor parameter or by
* calling this method.
- *
+ *
* Previous versions of Vaadin used a {@link VerticalLayout} with margins
* enabled as the default content but that is no longer the case.
- *
+ *
* @param content
* a component (typically a layout) to use as content
*/
@@ -156,7 +158,7 @@ public abstract class AbstractSingleComponentContainer extends
/**
* Utility method for removing a component from its parent (if possible).
- *
+ *
* @param content
* component to remove
*/
@@ -208,8 +210,9 @@ public abstract class AbstractSingleComponentContainer extends
dirtyChild = getInvalidSizedChild(false);
} else if ((width == SIZE_UNDEFINED && getWidth() != SIZE_UNDEFINED)
|| (unit == Unit.PERCENTAGE
- && getWidthUnits() != Unit.PERCENTAGE && !ComponentSizeValidator
- .parentCanDefineWidth(this))) {
+ && getWidthUnits() != Unit.PERCENTAGE
+ && !ComponentSizeValidator
+ .parentCanDefineWidth(this))) {
/*
* relative width children may get to invalid state if width becomes
* invalid. Width may also become invalid if units become percentage
@@ -265,8 +268,9 @@ public abstract class AbstractSingleComponentContainer extends
dirtyChild = getInvalidSizedChild(true);
} else if ((height == SIZE_UNDEFINED && getHeight() != SIZE_UNDEFINED)
|| (unit == Unit.PERCENTAGE
- && getHeightUnits() != Unit.PERCENTAGE && !ComponentSizeValidator
- .parentCanDefineHeight(this))) {
+ && getHeightUnits() != Unit.PERCENTAGE
+ && !ComponentSizeValidator
+ .parentCanDefineHeight(this))) {
/*
* relative height children may get to invalid state if height
* becomes invalid. Height may also become invalid if units become
@@ -281,7 +285,7 @@ public abstract class AbstractSingleComponentContainer extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.AbstractComponent#readDesign(org.jsoup.nodes .Element,
* com.vaadin.ui.declarative.DesignContext)
*/
@@ -298,24 +302,25 @@ public abstract class AbstractSingleComponentContainer extends
* contains multiple child elements, a DesignException is thrown. This
* method should be overridden by subclasses whose design may contain
* non-content child elements.
- *
+ *
* @since 7.5.0
- *
+ *
* @param children
* the child elements of the design that is being read
* @param context
* the DesignContext instance used to parse the design
- *
+ *
* @throws DesignException
* if there are multiple child elements
* @throws DesignException
* if a child element could not be parsed as a Component
*/
- protected void readDesignChildren(Elements children, DesignContext context) {
+ protected void readDesignChildren(Elements children,
+ DesignContext context) {
if (children.size() > 1) {
- throw new DesignException("The container of type "
- + getClass().toString()
- + " can have only one child component.");
+ throw new DesignException(
+ "The container of type " + getClass().toString()
+ + " can have only one child component.");
} else if (children.size() == 1) {
setContent(context.readDesign(children.first()));
}
@@ -323,7 +328,7 @@ public abstract class AbstractSingleComponentContainer extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.AbstractComponent#writeDesign(org.jsoup.nodes.Element
* , com.vaadin.ui.declarative.DesignContext)
*/
diff --git a/server/src/main/java/com/vaadin/ui/AbstractSplitPanel.java b/server/src/main/java/com/vaadin/ui/AbstractSplitPanel.java
index 0561996277..2bf93219fb 100644
--- a/server/src/main/java/com/vaadin/ui/AbstractSplitPanel.java
+++ b/server/src/main/java/com/vaadin/ui/AbstractSplitPanel.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -39,10 +39,10 @@ import com.vaadin.util.ReflectTools;
/**
* AbstractSplitPanel.
- *
+ *
* <code>AbstractSplitPanel</code> is base class for a component container that
* can contain two components. The components are split by a divider element.
- *
+ *
* @author Vaadin Ltd.
* @since 6.5
*/
@@ -79,8 +79,8 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
* Modifiable and Serializable Iterator for the components, used by
* {@link AbstractSplitPanel#getComponentIterator()}.
*/
- private class ComponentIterator implements Iterator<Component>,
- Serializable {
+ private class ComponentIterator
+ implements Iterator<Component>, Serializable {
int i = 0;
@@ -125,7 +125,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
/**
* Add a component into this container. The component is added to the right
* or under the previous component.
- *
+ *
* @param c
* the component to be added.
*/
@@ -145,7 +145,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
/**
* Sets the first component of this split panel. Depending on the direction
* the first component is shown at the top or to the left.
- *
+ *
* @param c
* The component to use as first component
*/
@@ -168,7 +168,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
/**
* Sets the second component of this split panel. Depending on the direction
* the second component is shown at the bottom or to the right.
- *
+ *
* @param c
* The component to use as second component
*/
@@ -191,7 +191,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
/**
* Gets the first component of this split panel. Depending on the direction
* this is either the component shown at the top or to the left.
- *
+ *
* @return the first component of this split panel
*/
public Component getFirstComponent() {
@@ -201,7 +201,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
/**
* Gets the second component of this split panel. Depending on the direction
* this is either the component shown at the top or to the left.
- *
+ *
* @return the second component of this split panel
*/
public Component getSecondComponent() {
@@ -210,7 +210,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
/**
* Removes the component from this container.
- *
+ *
* @param c
* the component to be removed.
*/
@@ -227,7 +227,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.ComponentContainer#getComponentIterator()
*/
@@ -239,7 +239,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
/**
* Gets the number of contained components. Consistent with the iterator
* returned by {@link #getComponentIterator()}.
- *
+ *
* @return the number of contained components (zero, one or two)
*/
@@ -258,7 +258,8 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
/* Documented in superclass */
@Override
- public void replaceComponent(Component oldComponent, Component newComponent) {
+ public void replaceComponent(Component oldComponent,
+ Component newComponent) {
if (oldComponent == getFirstComponent()) {
setFirstComponent(newComponent);
} else if (oldComponent == getSecondComponent()) {
@@ -268,7 +269,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
/**
* Moves the position of the splitter.
- *
+ *
* @param pos
* the new size of the first region in the unit that was last
* used (default is percentage). Fractions are only allowed when
@@ -280,12 +281,12 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
/**
* Moves the position of the splitter.
- *
+ *
* @param pos
* the new size of the region in the unit that was last used
* (default is percentage). Fractions are only allowed when unit
* is percentage.
- *
+ *
* @param reverse
* if set to true the split splitter position is measured by the
* second region else it is measured by the first region
@@ -296,7 +297,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
/**
* Moves the position of the splitter with given position and unit.
- *
+ *
* @param pos
* the new size of the first region. Fractions are only allowed
* when unit is percentage.
@@ -309,7 +310,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
/**
* Moves the position of the splitter with given position and unit.
- *
+ *
* @param pos
* the new size of the first region. Fractions are only allowed
* when unit is percentage.
@@ -318,7 +319,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
* @param reverse
* if set to true the split splitter position is measured by the
* second region else it is measured by the first region
- *
+ *
*/
public void setSplitPosition(float pos, Unit unit, boolean reverse) {
if (unit != Unit.PERCENTAGE && unit != Unit.PIXELS) {
@@ -340,7 +341,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
/**
* Returns the current position of the splitter, in
* {@link #getSplitPositionUnit()} units.
- *
+ *
* @return position of the splitter
*/
public float getSplitPosition() {
@@ -349,7 +350,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
/**
* Returns the unit of position of the splitter
- *
+ *
* @return unit of position of the splitter
* @see #setSplitPosition(float, Unit)
*/
@@ -361,7 +362,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
* Is the split position reversed. By default the split position is measured
* by the first region, but if split position is reversed the measuring is
* done by the second region instead.
- *
+ *
* @since 7.3.6
* @return {@code true} if reversed, {@code false} otherwise.
* @see #setSplitPosition(float, boolean)
@@ -373,7 +374,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
/**
* Sets the minimum split position to the given position and unit. If the
* split position is reversed, maximum and minimum are also reversed.
- *
+ *
* @param pos
* the minimum position of the split
* @param unit
@@ -388,7 +389,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
/**
* Returns the current minimum position of the splitter, in
* {@link #getMinSplitPositionUnit()} units.
- *
+ *
* @return the minimum position of the splitter
*/
public float getMinSplitPosition() {
@@ -397,7 +398,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
/**
* Returns the unit of the minimum position of the splitter.
- *
+ *
* @return the unit of the minimum position of the splitter
*/
public Unit getMinSplitPositionUnit() {
@@ -407,7 +408,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
/**
* Sets the maximum split position to the given position and unit. If the
* split position is reversed, maximum and minimum are also reversed.
- *
+ *
* @param pos
* the maximum position of the split
* @param unit
@@ -422,7 +423,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
/**
* Returns the current maximum position of the splitter, in
* {@link #getMaxSplitPositionUnit()} units.
- *
+ *
* @return the maximum position of the splitter
*/
public float getMaxSplitPosition() {
@@ -431,7 +432,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
/**
* Returns the unit of the maximum position of the splitter
- *
+ *
* @return the unit of the maximum position of the splitter
*/
public Unit getMaxSplitPositionUnit() {
@@ -441,7 +442,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
/**
* Sets the maximum and minimum position of the splitter. If the split
* position is reversed, maximum and minimum are also reversed.
- *
+ *
* @param minPos
* the new minimum position
* @param minPosUnit
@@ -456,7 +457,8 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
private void setSplitPositionLimits(float minPos, Unit minPosUnit,
float maxPos, Unit maxPosUnit) {
if ((minPosUnit != Unit.PERCENTAGE && minPosUnit != Unit.PIXELS)
- || (maxPosUnit != Unit.PERCENTAGE && maxPosUnit != Unit.PIXELS)) {
+ || (maxPosUnit != Unit.PERCENTAGE
+ && maxPosUnit != Unit.PIXELS)) {
throw new IllegalArgumentException(
"Only percentage and pixel units are allowed");
}
@@ -475,7 +477,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
/**
* Lock the SplitPanels position, disabling the user from dragging the split
* handle.
- *
+ *
* @param locked
* Set <code>true</code> if locked, <code>false</code> otherwise.
*/
@@ -486,7 +488,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
/**
* Is the SplitPanel handle locked (user not allowed to change split
* position by dragging).
- *
+ *
* @return <code>true</code> if locked, <code>false</code> otherwise.
*/
public boolean isLocked() {
@@ -496,7 +498,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
/**
* <code>SplitterClickListener</code> interface for listening for
* <code>SplitterClickEvent</code> fired by a <code>SplitPanel</code>.
- *
+ *
* @see SplitterClickEvent
* @since 6.2
*/
@@ -508,7 +510,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
/**
* SplitPanel splitter has been clicked
- *
+ *
* @param event
* SplitterClickEvent event.
*/
@@ -527,10 +529,11 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
/**
* Interface for listening for {@link SplitPositionChangeEvent}s fired by a
* SplitPanel.
- *
+ *
* @since 7.5.0
*/
- public interface SplitPositionChangeListener extends ConnectorEventListener {
+ public interface SplitPositionChangeListener
+ extends ConnectorEventListener {
public static final Method moveMethod = ReflectTools.findMethod(
SplitPositionChangeListener.class, "onSplitPositionChanged",
@@ -538,7 +541,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
/**
* SplitPanel splitter position has been changed.
- *
+ *
* @param event
* SplitPositionChangeEvent event.
*/
@@ -547,7 +550,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
/**
* Event that indicates a change in SplitPanel's splitter position.
- *
+ *
* @since 7.5.0
*/
public static class SplitPositionChangeEvent extends Component.Event {
@@ -587,8 +590,8 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
}
public void removeSplitterClickListener(SplitterClickListener listener) {
- removeListener(EventId.CLICK_EVENT_IDENTIFIER,
- SplitterClickEvent.class, listener);
+ removeListener(EventId.CLICK_EVENT_IDENTIFIER, SplitterClickEvent.class,
+ listener);
}
/**
@@ -602,7 +605,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
/**
* Register a listener to handle {@link SplitPositionChangeEvent}s.
- *
+ *
* @since 7.5.0
* @param listener
* {@link SplitPositionChangeListener} to be registered.
@@ -615,7 +618,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
/**
* Removes a {@link SplitPositionChangeListener}.
- *
+ *
* @since 7.5.0
* @param listener
* SplitPositionChangeListener to be removed.
@@ -640,12 +643,13 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
}
private SplitterState getSplitterState(boolean markAsDirty) {
- return ((AbstractSplitPanelState) super.getState(markAsDirty)).splitterState;
+ return ((AbstractSplitPanelState) super.getState(
+ markAsDirty)).splitterState;
}
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.AbstractComponent#readDesign(org.jsoup.nodes .Element,
* com.vaadin.ui.declarative.DesignContext)
*/
@@ -722,15 +726,13 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
+ getSplitPositionUnit();
design.attr("split-position", splitPositionString);
}
- if (getMinSplitPosition() != def.getMinSplitPosition()
- || !def.getMinSplitPositionUnit().equals(
- getMinSplitPositionUnit())) {
+ if (getMinSplitPosition() != def.getMinSplitPosition() || !def
+ .getMinSplitPositionUnit().equals(getMinSplitPositionUnit())) {
design.attr("min-split-position", asString(getMinSplitPosition())
+ getMinSplitPositionUnit());
}
- if (getMaxSplitPosition() != def.getMaxSplitPosition()
- || !def.getMaxSplitPositionUnit().equals(
- getMaxSplitPositionUnit())) {
+ if (getMaxSplitPosition() != def.getMaxSplitPosition() || !def
+ .getMaxSplitPositionUnit().equals(getMaxSplitPositionUnit())) {
design.attr("max-split-position", asString(getMaxSplitPosition())
+ getMaxSplitPositionUnit());
}
diff --git a/server/src/main/java/com/vaadin/ui/AbstractTextField.java b/server/src/main/java/com/vaadin/ui/AbstractTextField.java
index 5fbe60937a..0138da9c37 100644
--- a/server/src/main/java/com/vaadin/ui/AbstractTextField.java
+++ b/server/src/main/java/com/vaadin/ui/AbstractTextField.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -189,7 +189,8 @@ public abstract class AbstractTextField extends AbstractField<String> implements
String newValue = (String) variables.get("text");
// server side check for max length
- if (getMaxLength() != -1 && newValue.length() > getMaxLength()) {
+ if (getMaxLength() != -1
+ && newValue.length() > getMaxLength()) {
newValue = newValue.substring(0, getMaxLength());
}
final String oldValue = getValue();
@@ -232,17 +233,17 @@ public abstract class AbstractTextField extends AbstractField<String> implements
/**
* Gets the null-string representation.
- *
+ *
* <p>
* The null-valued strings are represented on the user interface by
* replacing the null value with this string. If the null representation is
* set null (not 'null' string), painting null value throws exception.
* </p>
- *
+ *
* <p>
* The default value is string 'null'.
* </p>
- *
+ *
* @return the String Textual representation for null strings.
* @see TextField#isNullSettingAllowed()
*/
@@ -252,7 +253,7 @@ public abstract class AbstractTextField extends AbstractField<String> implements
/**
* Is setting nulls with null-string representation allowed.
- *
+ *
* <p>
* If this property is true, writing null-representation string to text
* field always sets the field value to real null. If this property is
@@ -261,11 +262,11 @@ public abstract class AbstractTextField extends AbstractField<String> implements
* contents to real null, if the text field matches the null-string
* representation and the current value of the field is null.
* </p>
- *
+ *
* <p>
* By default this setting is false
* </p>
- *
+ *
* @return boolean Should the null-string represenation be always converted
* to null-values.
* @see TextField#getNullRepresentation()
@@ -276,17 +277,17 @@ public abstract class AbstractTextField extends AbstractField<String> implements
/**
* Sets the null-string representation.
- *
+ *
* <p>
* The null-valued strings are represented on the user interface by
* replacing the null value with this string. If the null representation is
* set null (not 'null' string), painting null value throws exception.
* </p>
- *
+ *
* <p>
* The default value is string 'null'
* </p>
- *
+ *
* @param nullRepresentation
* Textual representation for null strings.
* @see TextField#setNullSettingAllowed(boolean)
@@ -298,7 +299,7 @@ public abstract class AbstractTextField extends AbstractField<String> implements
/**
* Sets the null conversion mode.
- *
+ *
* <p>
* If this property is true, writing null-representation string to text
* field always sets the field value to real null. If this property is
@@ -307,11 +308,11 @@ public abstract class AbstractTextField extends AbstractField<String> implements
* contents to real null, if the text field matches the null-string
* representation and the current value of the field is null.
* </p>
- *
+ *
* <p>
* By default this setting is false.
* </p>
- *
+ *
* @param nullSettingAllowed
* Should the null-string representation always be converted to
* null-values.
@@ -330,7 +331,7 @@ public abstract class AbstractTextField extends AbstractField<String> implements
/**
* Returns the maximum number of characters in the field. Value -1 is
* considered unlimited. Terminal may however have some technical limits.
- *
+ *
* @return the maxLength
*/
public int getMaxLength() {
@@ -340,7 +341,7 @@ public abstract class AbstractTextField extends AbstractField<String> implements
/**
* Sets the maximum number of characters in the field. Value -1 is
* considered unlimited. Terminal may however have some technical limits.
- *
+ *
* @param maxLength
* the maxLength to set
*/
@@ -352,7 +353,7 @@ public abstract class AbstractTextField extends AbstractField<String> implements
* Gets the number of columns in the editor. If the number of columns is set
* 0, the actual number of displayed columns is determined implicitly by the
* adapter.
- *
+ *
* @return the number of columns in the editor.
*/
public int getColumns() {
@@ -363,7 +364,7 @@ public abstract class AbstractTextField extends AbstractField<String> implements
* Sets the number of columns in the editor. If the number of columns is set
* 0, the actual number of displayed columns is determined implicitly by the
* adapter.
- *
+ *
* @param columns
* the number of columns to set.
*/
@@ -376,7 +377,7 @@ public abstract class AbstractTextField extends AbstractField<String> implements
/**
* Gets the current input prompt.
- *
+ *
* @see #setInputPrompt(String)
* @return the current input prompt, or null if not enabled
*/
@@ -387,7 +388,7 @@ public abstract class AbstractTextField extends AbstractField<String> implements
/**
* Sets the input prompt - a textual prompt that is displayed when the field
* would otherwise be empty, to prompt the user for input.
- *
+ *
* @param inputPrompt
*/
public void setInputPrompt(String inputPrompt) {
@@ -414,11 +415,11 @@ public abstract class AbstractTextField extends AbstractField<String> implements
/*
* TODO check for possible (minor?) issue (not tested)
- *
+ *
* -field with e.g. PropertyFormatter.
- *
+ *
* -TextChangeListener and it changes value.
- *
+ *
* -if formatter again changes the value, do we get an extra
* simulated text change event ?
*/
@@ -426,7 +427,7 @@ public abstract class AbstractTextField extends AbstractField<String> implements
/*
* Fire a "simulated" text change event before value change event if
* change is coming from the client side.
- *
+ *
* Iff there is both value change and textChangeEvent in same
* variable burst, it is a text field in non immediate mode and the
* text change event "flushed" queued value change event. In this
@@ -479,10 +480,10 @@ public abstract class AbstractTextField extends AbstractField<String> implements
/**
* Sets the mode how the TextField triggers {@link TextChangeEvent}s.
- *
+ *
* @param inputEventMode
* the new mode
- *
+ *
* @see TextChangeEventMode
*/
public void setTextChangeEventMode(TextChangeEventMode inputEventMode) {
@@ -569,10 +570,10 @@ public abstract class AbstractTextField extends AbstractField<String> implements
* The text change timeout modifies how often text change events are
* communicated to the application when {@link #getTextChangeEventMode()} is
* {@link TextChangeEventMode#LAZY} or {@link TextChangeEventMode#TIMEOUT}.
- *
- *
+ *
+ *
* @see #getTextChangeEventMode()
- *
+ *
* @param timeout
* the timeout in milliseconds
*/
@@ -585,7 +586,7 @@ public abstract class AbstractTextField extends AbstractField<String> implements
* Gets the timeout used to fire {@link TextChangeEvent}s when the
* {@link #getTextChangeEventMode()} is {@link TextChangeEventMode#LAZY} or
* {@link TextChangeEventMode#TIMEOUT}.
- *
+ *
* @return the timeout value in milliseconds
*/
public int getTextChangeTimeout() {
@@ -628,7 +629,7 @@ public abstract class AbstractTextField extends AbstractField<String> implements
* pressing enter. The value returned by this method is updated also on
* {@link TextChangeEvent}s. Due to this high dependency to the terminal
* implementation this method is (at least at this point) not published.
- *
+ *
* @return the text which is currently displayed in the field.
*/
private String getCurrentTextContent() {
@@ -645,7 +646,7 @@ public abstract class AbstractTextField extends AbstractField<String> implements
/**
* Selects all text in the field.
- *
+ *
* @since 6.4
*/
public void selectAll() {
@@ -655,11 +656,11 @@ public abstract class AbstractTextField extends AbstractField<String> implements
/**
* Sets the range of text to be selected.
- *
+ *
* As a side effect the field will become focused.
- *
+ *
* @since 6.4
- *
+ *
* @param pos
* the position of the first character to be selected
* @param length
@@ -675,12 +676,12 @@ public abstract class AbstractTextField extends AbstractField<String> implements
/**
* Sets the cursor position in the field. As a side effect the field will
* become focused.
- *
+ *
* @since 6.4
- *
+ *
* @param pos
* the position for the cursor
- * */
+ */
public void setCursorPosition(int pos) {
setSelectionRange(pos, 0);
lastKnownCursorPosition = pos;
@@ -688,14 +689,14 @@ public abstract class AbstractTextField extends AbstractField<String> implements
/**
* Returns the last known cursor position of the field.
- *
+ *
* <p>
* Note that due to the client server nature or the GWT terminal, Vaadin
* cannot provide the exact value of the cursor position in most situations.
* The value is updated only when the client side terminal communicates to
* TextField, like on {@link ValueChangeEvent}s and {@link TextChangeEvent}
* s. This may change later if a deep push integration is built to Vaadin.
- *
+ *
* @return the cursor position
*/
public int getCursorPosition() {
@@ -765,7 +766,7 @@ public abstract class AbstractTextField extends AbstractField<String> implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.AbstractField#readDesign(org.jsoup.nodes.Element ,
* com.vaadin.ui.declarative.DesignContext)
*/
@@ -774,14 +775,14 @@ public abstract class AbstractTextField extends AbstractField<String> implements
super.readDesign(design, designContext);
Attributes attr = design.attributes();
if (attr.hasKey("maxlength")) {
- setMaxLength(DesignAttributeHandler.readAttribute("maxlength",
- attr, Integer.class));
+ setMaxLength(DesignAttributeHandler.readAttribute("maxlength", attr,
+ Integer.class));
}
}
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.AbstractField#getCustomAttributes()
*/
@Override
@@ -796,7 +797,7 @@ public abstract class AbstractTextField extends AbstractField<String> implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.AbstractField#writeDesign(org.jsoup.nodes.Element,
* com.vaadin.ui.declarative.DesignContext)
*/
@@ -806,8 +807,8 @@ public abstract class AbstractTextField extends AbstractField<String> implements
AbstractTextField def = (AbstractTextField) designContext
.getDefaultInstance(this);
Attributes attr = design.attributes();
- DesignAttributeHandler.writeAttribute("maxlength", attr,
- getMaxLength(), def.getMaxLength(), Integer.class);
+ DesignAttributeHandler.writeAttribute("maxlength", attr, getMaxLength(),
+ def.getMaxLength(), Integer.class);
}
}
diff --git a/server/src/main/java/com/vaadin/ui/Accordion.java b/server/src/main/java/com/vaadin/ui/Accordion.java
index 1d53937d24..331c503d17 100644
--- a/server/src/main/java/com/vaadin/ui/Accordion.java
+++ b/server/src/main/java/com/vaadin/ui/Accordion.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,12 +20,12 @@ import com.vaadin.shared.ui.accordion.AccordionState;
/**
* An accordion is a component similar to a {@link TabSheet}, but with a
* vertical orientation and the selected component presented between tabs.
- *
+ *
* Closable tabs are not supported by the accordion.
- *
+ *
* The {@link Accordion} can be styled with the .v-accordion, .v-accordion-item,
* .v-accordion-item-first and .v-accordion-item-caption styles.
- *
+ *
* @see TabSheet
*/
public class Accordion extends TabSheet {
@@ -38,7 +38,7 @@ public class Accordion extends TabSheet {
/**
* Constructs a new accordion containing the given components.
- *
+ *
* @param components
* The components to add to the accordion. Each component will be
* added to a separate tab.
@@ -50,7 +50,7 @@ public class Accordion extends TabSheet {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.TabSheet#getState()
*/
@Override
diff --git a/server/src/main/java/com/vaadin/ui/Alignment.java b/server/src/main/java/com/vaadin/ui/Alignment.java
index 57131494ac..06183ec927 100644
--- a/server/src/main/java/com/vaadin/ui/Alignment.java
+++ b/server/src/main/java/com/vaadin/ui/Alignment.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,12 +26,12 @@ import com.vaadin.shared.ui.AlignmentInfo.Bits;
@SuppressWarnings("serial")
public final class Alignment implements Serializable {
- public static final Alignment TOP_RIGHT = new Alignment(Bits.ALIGNMENT_TOP
- + Bits.ALIGNMENT_RIGHT);
- public static final Alignment TOP_LEFT = new Alignment(Bits.ALIGNMENT_TOP
- + Bits.ALIGNMENT_LEFT);
- public static final Alignment TOP_CENTER = new Alignment(Bits.ALIGNMENT_TOP
- + Bits.ALIGNMENT_HORIZONTAL_CENTER);
+ public static final Alignment TOP_RIGHT = new Alignment(
+ Bits.ALIGNMENT_TOP + Bits.ALIGNMENT_RIGHT);
+ public static final Alignment TOP_LEFT = new Alignment(
+ Bits.ALIGNMENT_TOP + Bits.ALIGNMENT_LEFT);
+ public static final Alignment TOP_CENTER = new Alignment(
+ Bits.ALIGNMENT_TOP + Bits.ALIGNMENT_HORIZONTAL_CENTER);
public static final Alignment MIDDLE_RIGHT = new Alignment(
Bits.ALIGNMENT_VERTICAL_CENTER + Bits.ALIGNMENT_RIGHT);
public static final Alignment MIDDLE_LEFT = new Alignment(
@@ -54,7 +54,7 @@ public final class Alignment implements Serializable {
/**
* Returns a bitmask representation of the alignment value. Used internally
* by terminal.
- *
+ *
* @return the bitmask representation of the alignment value
*/
public int getBitMask() {
@@ -63,7 +63,7 @@ public final class Alignment implements Serializable {
/**
* Checks if component is aligned to the top of the available space.
- *
+ *
* @return true if aligned top
*/
public boolean isTop() {
@@ -72,7 +72,7 @@ public final class Alignment implements Serializable {
/**
* Checks if component is aligned to the bottom of the available space.
- *
+ *
* @return true if aligned bottom
*/
public boolean isBottom() {
@@ -81,7 +81,7 @@ public final class Alignment implements Serializable {
/**
* Checks if component is aligned to the left of the available space.
- *
+ *
* @return true if aligned left
*/
public boolean isLeft() {
@@ -90,7 +90,7 @@ public final class Alignment implements Serializable {
/**
* Checks if component is aligned to the right of the available space.
- *
+ *
* @return true if aligned right
*/
public boolean isRight() {
@@ -100,26 +100,28 @@ public final class Alignment implements Serializable {
/**
* Checks if component is aligned middle (vertically center) of the
* available space.
- *
+ *
* @return true if aligned bottom
*/
public boolean isMiddle() {
- return (bitMask & Bits.ALIGNMENT_VERTICAL_CENTER) == Bits.ALIGNMENT_VERTICAL_CENTER;
+ return (bitMask
+ & Bits.ALIGNMENT_VERTICAL_CENTER) == Bits.ALIGNMENT_VERTICAL_CENTER;
}
/**
* Checks if component is aligned center (horizontally) of the available
* space.
- *
+ *
* @return true if aligned center
*/
public boolean isCenter() {
- return (bitMask & Bits.ALIGNMENT_HORIZONTAL_CENTER) == Bits.ALIGNMENT_HORIZONTAL_CENTER;
+ return (bitMask
+ & Bits.ALIGNMENT_HORIZONTAL_CENTER) == Bits.ALIGNMENT_HORIZONTAL_CENTER;
}
/**
* Returns string representation of vertical alignment.
- *
+ *
* @return vertical alignment as CSS value
*/
public String getVerticalAlignment() {
@@ -133,7 +135,7 @@ public final class Alignment implements Serializable {
/**
* Returns string representation of horizontal alignment.
- *
+ *
* @return horizontal alignment as CSS value
*/
public String getHorizontalAlignment() {
diff --git a/server/src/main/java/com/vaadin/ui/Audio.java b/server/src/main/java/com/vaadin/ui/Audio.java
index 8b9fad2196..056bde4280 100644
--- a/server/src/main/java/com/vaadin/ui/Audio.java
+++ b/server/src/main/java/com/vaadin/ui/Audio.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,19 +24,19 @@ import com.vaadin.shared.ui.audio.AudioState;
* such is only supported in browsers that support HTML5 media markup. Browsers
* that do not support HTML5 display the text or HTML set by calling
* {@link #setAltText(String)}.
- *
+ *
* A flash-player fallback can be implemented by setting HTML content allowed (
* {@link #setHtmlContentAllowed(boolean)} and calling
* {@link #setAltText(String)} with the flash player markup. An example of flash
* fallback can be found at the <a href=
* "https://developer.mozilla.org/En/Using_audio_and_video_in_Firefox#Using_Flash"
* >Mozilla Developer Network</a>.
- *
+ *
* Multiple sources can be specified. Which of the sources is used is selected
- * by the browser depending on which file formats it supports. See <a
- * href="http://en.wikipedia.org/wiki/HTML5_video#Table">wikipedia</a> for a
+ * by the browser depending on which file formats it supports. See
+ * <a href="http://en.wikipedia.org/wiki/HTML5_video#Table">wikipedia</a> for a
* table of formats supported by different browsers.
- *
+ *
* @author Vaadin Ltd
* @since 6.7.0
*/
diff --git a/server/src/main/java/com/vaadin/ui/BrowserFrame.java b/server/src/main/java/com/vaadin/ui/BrowserFrame.java
index 5717941ac5..cbb346db30 100644
--- a/server/src/main/java/com/vaadin/ui/BrowserFrame.java
+++ b/server/src/main/java/com/vaadin/ui/BrowserFrame.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,10 +21,9 @@ import com.vaadin.shared.ui.browserframe.BrowserFrameState;
/**
* A component displaying an embedded web page. Implemented as a HTML
* <code>iframe</code> element.
- *
+ *
* @author Vaadin Ltd.
- * @version
- * @VERSION@
+ * @version @VERSION@
* @since 7.0
*/
public class BrowserFrame extends AbstractEmbedded {
@@ -38,7 +37,7 @@ public class BrowserFrame extends AbstractEmbedded {
/**
* Creates a new empty browser frame with the given caption.
- *
+ *
* @param caption
* The caption for the component
*/
@@ -48,7 +47,7 @@ public class BrowserFrame extends AbstractEmbedded {
/**
* Creates a new browser frame with the given caption and content.
- *
+ *
* @param caption
* The caption for the component.
* @param source
diff --git a/server/src/main/java/com/vaadin/ui/Button.java b/server/src/main/java/com/vaadin/ui/Button.java
index 677e8cac7d..80b8bdfd32 100644
--- a/server/src/main/java/com/vaadin/ui/Button.java
+++ b/server/src/main/java/com/vaadin/ui/Button.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -39,13 +39,13 @@ import com.vaadin.util.ReflectTools;
/**
* A generic button component.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@SuppressWarnings("serial")
-public class Button extends AbstractFocusable implements
- Action.ShortcutNotifier {
+public class Button extends AbstractFocusable
+ implements Action.ShortcutNotifier {
private ButtonServerRpc rpc = new ButtonServerRpc() {
@@ -74,7 +74,7 @@ public class Button extends AbstractFocusable implements
/**
* Creates a new push button with the given caption.
- *
+ *
* @param caption
* the Button caption.
*/
@@ -85,7 +85,7 @@ public class Button extends AbstractFocusable implements
/**
* Creates a new push button with the given icon.
- *
+ *
* @param icon
* the icon
*/
@@ -96,7 +96,7 @@ public class Button extends AbstractFocusable implements
/**
* Creates a new push button with the given caption and icon.
- *
+ *
* @param caption
* the caption
* @param icon
@@ -110,7 +110,7 @@ public class Button extends AbstractFocusable implements
/**
* Creates a new push button with a click listener.
- *
+ *
* @param caption
* the Button caption.
* @param listener
@@ -123,7 +123,7 @@ public class Button extends AbstractFocusable implements
/**
* Click event. This event is thrown, when the button is clicked.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -133,7 +133,7 @@ public class Button extends AbstractFocusable implements
/**
* New instance of text change event.
- *
+ *
* @param source
* the Source of the event.
*/
@@ -144,7 +144,7 @@ public class Button extends AbstractFocusable implements
/**
* Constructor with mouse details
- *
+ *
* @param source
* The source where the click took place
* @param details
@@ -157,7 +157,7 @@ public class Button extends AbstractFocusable implements
/**
* Gets the Button where the event occurred.
- *
+ *
* @return the Source of the event.
*/
public Button getButton() {
@@ -167,7 +167,7 @@ public class Button extends AbstractFocusable implements
/**
* Returns the mouse position (x coordinate) when the click took place.
* The position is relative to the browser client area.
- *
+ *
* @return The mouse cursor x position or -1 if unknown
*/
public int getClientX() {
@@ -181,7 +181,7 @@ public class Button extends AbstractFocusable implements
/**
* Returns the mouse position (y coordinate) when the click took place.
* The position is relative to the browser client area.
- *
+ *
* @return The mouse cursor y position or -1 if unknown
*/
public int getClientY() {
@@ -195,7 +195,7 @@ public class Button extends AbstractFocusable implements
/**
* Returns the relative mouse position (x coordinate) when the click
* took place. The position is relative to the clicked component.
- *
+ *
* @return The mouse cursor x position relative to the clicked layout
* component or -1 if no x coordinate available
*/
@@ -210,7 +210,7 @@ public class Button extends AbstractFocusable implements
/**
* Returns the relative mouse position (y coordinate) when the click
* took place. The position is relative to the clicked component.
- *
+ *
* @return The mouse cursor y position relative to the clicked layout
* component or -1 if no y coordinate available
*/
@@ -224,7 +224,7 @@ public class Button extends AbstractFocusable implements
/**
* Checks if the Alt key was down when the mouse event took place.
- *
+ *
* @return true if Alt was down when the event occured, false otherwise
* or if unknown
*/
@@ -238,7 +238,7 @@ public class Button extends AbstractFocusable implements
/**
* Checks if the Ctrl key was down when the mouse event took place.
- *
+ *
* @return true if Ctrl was pressed when the event occured, false
* otherwise or if unknown
*/
@@ -252,7 +252,7 @@ public class Button extends AbstractFocusable implements
/**
* Checks if the Meta key was down when the mouse event took place.
- *
+ *
* @return true if Meta was pressed when the event occured, false
* otherwise or if unknown
*/
@@ -266,7 +266,7 @@ public class Button extends AbstractFocusable implements
/**
* Checks if the Shift key was down when the mouse event took place.
- *
+ *
* @return true if Shift was pressed when the event occured, false
* otherwise or if unknown
*/
@@ -282,7 +282,7 @@ public class Button extends AbstractFocusable implements
/**
* Interface for listening for a {@link ClickEvent} fired by a
* {@link Component}.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -295,7 +295,7 @@ public class Button extends AbstractFocusable implements
/**
* Called when a {@link Button} has been clicked. A reference to the
* button is given by {@link ClickEvent#getButton()}.
- *
+ *
* @param event
* An event containing information about the click.
*/
@@ -305,7 +305,7 @@ public class Button extends AbstractFocusable implements
/**
* Adds the button click listener.
- *
+ *
* @param listener
* the Listener to be added.
*/
@@ -325,7 +325,7 @@ public class Button extends AbstractFocusable implements
/**
* Removes the button click listener.
- *
+ *
* @param listener
* the Listener to be removed.
*/
@@ -345,7 +345,7 @@ public class Button extends AbstractFocusable implements
/**
* Simulates a button click, notifying all server-side listeners.
- *
+ *
* No action is taken is the button is disabled.
*/
public void click() {
@@ -356,7 +356,7 @@ public class Button extends AbstractFocusable implements
/**
* Fires a click event to all listeners without any event details.
- *
+ *
* In subclasses, override {@link #fireClick(MouseEventDetails)} instead of
* this method.
*/
@@ -366,7 +366,7 @@ public class Button extends AbstractFocusable implements
/**
* Fires a click event to all listeners.
- *
+ *
* @param details
* MouseEventDetails from which keyboard modifiers and other
* information about the mouse click can be obtained. If the
@@ -387,7 +387,7 @@ public class Button extends AbstractFocusable implements
* Makes it possible to invoke a click on this button by pressing the given
* {@link KeyCode} and (optional) {@link ModifierKey}s.<br/>
* The shortcut is global (bound to the containing Window).
- *
+ *
* @param keyCode
* the keycode for invoking the shortcut
* @param modifiers
@@ -418,7 +418,7 @@ public class Button extends AbstractFocusable implements
/**
* A {@link ShortcutListener} specifically made to define a keyboard
* shortcut that invokes a click on the given button.
- *
+ *
*/
public static class ClickShortcut extends ShortcutListener {
protected Button button;
@@ -426,7 +426,7 @@ public class Button extends AbstractFocusable implements
/**
* Creates a keyboard shortcut for clicking the given button using the
* shorthand notation defined in {@link ShortcutAction}.
- *
+ *
* @param button
* to be clicked when the shortcut is invoked
* @param shorthandCaption
@@ -440,7 +440,7 @@ public class Button extends AbstractFocusable implements
/**
* Creates a keyboard shortcut for clicking the given button using the
* given {@link KeyCode} and {@link ModifierKey}s.
- *
+ *
* @param button
* to be clicked when the shortcut is invoked
* @param keyCode
@@ -456,7 +456,7 @@ public class Button extends AbstractFocusable implements
/**
* Creates a keyboard shortcut for clicking the given button using the
* given {@link KeyCode}.
- *
+ *
* @param button
* to be clicked when the shortcut is invoked
* @param keyCode
@@ -475,7 +475,7 @@ public class Button extends AbstractFocusable implements
/**
* Determines if a button is automatically disabled when clicked. See
* {@link #setDisableOnClick(boolean)} for details.
- *
+ *
* @return true if the button is disabled when clicked, false otherwise
*/
public boolean isDisableOnClick() {
@@ -491,7 +491,7 @@ public class Button extends AbstractFocusable implements
* calling {@link #click()} method programmatically. Also, if developer
* wants to re-enable the button, it needs to be done programmatically.
* </p>
- *
+ *
* @param disableOnClick
* true to disable button when it is clicked, false otherwise
*/
@@ -511,10 +511,10 @@ public class Button extends AbstractFocusable implements
/**
* Sets the component's icon and alt text.
- *
+ *
* An alt text is shown when an image could not be loaded, and read by
* assisitve devices.
- *
+ *
* @param icon
* the icon to be shown with the component's caption.
* @param iconAltText
@@ -527,7 +527,7 @@ public class Button extends AbstractFocusable implements
/**
* Returns the icon's alt text.
- *
+ *
* @return String with the alt text
*/
public String getIconAlternateText() {
@@ -541,11 +541,11 @@ public class Button extends AbstractFocusable implements
/**
* Set whether the caption text is rendered as HTML or not. You might need
* to re-theme button to allow higher content than the original text style.
- *
+ *
* If set to true, the captions are passed to the browser as html and the
* developer is responsible for ensuring no harmful html is used. If set to
* false, the content is passed to the browser as plain text.
- *
+ *
* @param htmlContentAllowed
* <code>true</code> if caption is rendered as HTML,
* <code>false</code> otherwise
@@ -556,7 +556,7 @@ public class Button extends AbstractFocusable implements
/**
* Return HTML rendering setting
- *
+ *
* @return <code>true</code> if the caption text is to be rendered as HTML,
* <code>false</code> otherwise
*/
@@ -566,7 +566,7 @@ public class Button extends AbstractFocusable implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.AbstractComponent#readDesign(org.jsoup.nodes .Element,
* com.vaadin.ui.declarative.DesignContext)
*/
@@ -576,8 +576,8 @@ public class Button extends AbstractFocusable implements
Attributes attr = design.attributes();
String content;
// plain-text (default is html)
- Boolean plain = DesignAttributeHandler.readAttribute(
- DESIGN_ATTR_PLAIN_TEXT, attr, Boolean.class);
+ Boolean plain = DesignAttributeHandler
+ .readAttribute(DESIGN_ATTR_PLAIN_TEXT, attr, Boolean.class);
if (plain == null || !plain) {
setHtmlContentAllowed(true);
content = design.html();
@@ -588,13 +588,13 @@ public class Button extends AbstractFocusable implements
}
setCaption(content);
if (attr.hasKey("icon-alt")) {
- setIconAlternateText(DesignAttributeHandler.readAttribute(
- "icon-alt", attr, String.class));
+ setIconAlternateText(DesignAttributeHandler
+ .readAttribute("icon-alt", attr, String.class));
}
// click-shortcut
removeClickShortcut();
- ShortcutAction action = DesignAttributeHandler.readAttribute(
- "click-shortcut", attr, ShortcutAction.class);
+ ShortcutAction action = DesignAttributeHandler
+ .readAttribute("click-shortcut", attr, ShortcutAction.class);
if (action != null) {
setClickShortcut(action.getKeyCode(), action.getModifiers());
}
@@ -602,7 +602,7 @@ public class Button extends AbstractFocusable implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.AbstractComponent#getCustomAttributes()
*/
@Override
@@ -620,7 +620,7 @@ public class Button extends AbstractFocusable implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.AbstractComponent#writeDesign(org.jsoup.nodes.Element
* , com.vaadin.ui.declarative.DesignContext)
*/
diff --git a/server/src/main/java/com/vaadin/ui/Calendar.java b/server/src/main/java/com/vaadin/ui/Calendar.java
index 028a094cb5..741e2bb45a 100644
--- a/server/src/main/java/com/vaadin/ui/Calendar.java
+++ b/server/src/main/java/com/vaadin/ui/Calendar.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -97,27 +97,27 @@ import com.vaadin.ui.declarative.DesignContext;
* be visualized in the variable length view depending on the start and end
* dates.
* </p>
- *
+ *
* <li>You can set the viewable date range with the {@link #setStartDate(Date)}
* and {@link #setEndDate(Date)} methods. Calendar has a default date range of
* one week</li>
- *
+ *
* <li>Calendar has two kind of views: monthly and weekly view</li>
- *
+ *
* <li>If date range is seven days or shorter, the weekly view is used.</li>
- *
+ *
* <li>Calendar queries its events by using a
* {@link com.vaadin.addon.calendar.event.CalendarEventProvider
* CalendarEventProvider}. By default, a
* {@link com.vaadin.addon.calendar.event.BasicEventProvider BasicEventProvider}
* is used.</li>
- *
+ *
* @since 7.1
* @author Vaadin Ltd.
*/
@SuppressWarnings("serial")
-public class Calendar extends AbstractComponent implements
- CalendarComponentEvents.NavigationNotifier,
+public class Calendar extends AbstractComponent
+ implements CalendarComponentEvents.NavigationNotifier,
CalendarComponentEvents.EventMoveNotifier,
CalendarComponentEvents.RangeSelectNotifier,
CalendarComponentEvents.EventResizeNotifier,
@@ -216,7 +216,7 @@ public class Calendar extends AbstractComponent implements
private KeyMapper<Action> actionMapper = null;
/**
- *
+ *
*/
private CalendarServerRpcImpl rpc = new CalendarServerRpcImpl();
@@ -240,7 +240,7 @@ public class Calendar extends AbstractComponent implements
/**
* Construct a Vaadin Calendar with a BasicEventProvider and the provided
* caption. Default date range is one week.
- *
+ *
* @param caption
*/
public Calendar(String caption) {
@@ -253,13 +253,13 @@ public class Calendar extends AbstractComponent implements
* obligatory, because calendar component will query active events through
* it.
* </p>
- *
+ *
* <p>
* By default, Vaadin Calendar will show dates from the start of the current
* week to the end of the current week. Use {@link #setStartDate(Date)} and
* {@link #setEndDate(Date)} to change this.
* </p>
- *
+ *
* @param eventProvider
* Event provider, cannot be null.
*/
@@ -273,13 +273,13 @@ public class Calendar extends AbstractComponent implements
* provider is obligatory, because calendar component will query active
* events through it.
* </p>
- *
+ *
* <p>
* By default, Vaadin Calendar will show dates from the start of the current
* week to the end of the current week. Use {@link #setStartDate(Date)} and
* {@link #setEndDate(Date)} to change this.
* </p>
- *
+ *
* @param eventProvider
* Event provider, cannot be null.
*/
@@ -337,7 +337,7 @@ public class Calendar extends AbstractComponent implements
/**
* Gets the calendar's start date.
- *
+ *
* @return First visible date.
*/
public Date getStartDate() {
@@ -357,7 +357,7 @@ public class Calendar extends AbstractComponent implements
* Sets start date for the calendar. This and {@link #setEndDate(Date)}
* control the range of dates visible on the component. The default range is
* one week.
- *
+ *
* @param date
* First visible date to show.
*/
@@ -370,7 +370,7 @@ public class Calendar extends AbstractComponent implements
/**
* Gets the calendar's end date.
- *
+ *
* @return Last visible date.
*/
public Date getEndDate() {
@@ -389,10 +389,10 @@ public class Calendar extends AbstractComponent implements
/**
* Sets end date for the calendar. Starting from startDate, only six weeks
* will be shown if duration to endDate is longer than six weeks.
- *
+ *
* This and {@link #setStartDate(Date)} control the range of dates visible
* on the component. The default range is one week.
- *
+ *
* @param date
* Last visible date to show.
*/
@@ -408,7 +408,7 @@ public class Calendar extends AbstractComponent implements
/**
* Sets the locale to be used in the Calendar component.
- *
+ *
* @see com.vaadin.ui.AbstractComponent#setLocale(java.util.Locale)
*/
@Override
@@ -436,11 +436,12 @@ public class Calendar extends AbstractComponent implements
}
private void setupCalendarEvents() {
- int durationInDays = (int) (((endDate.getTime()) - startDate.getTime()) / DateConstants.DAYINMILLIS);
+ int durationInDays = (int) (((endDate.getTime()) - startDate.getTime())
+ / DateConstants.DAYINMILLIS);
durationInDays++;
if (durationInDays > 60) {
- throw new RuntimeException("Daterange is too big (max 60) = "
- + durationInDays);
+ throw new RuntimeException(
+ "Daterange is too big (max 60) = " + durationInDays);
}
Date firstDateToShow = expandStartDate(startDate, durationInDays > 7);
@@ -460,10 +461,10 @@ public class Calendar extends AbstractComponent implements
event.dateTo = df_date.format(e.getEnd());
event.timeFrom = df_time.format(e.getStart());
event.timeTo = df_time.format(e.getEnd());
- event.description = e.getDescription() == null ? "" : e
- .getDescription();
- event.styleName = e.getStyleName() == null ? "" : e
- .getStyleName();
+ event.description = e.getDescription() == null ? ""
+ : e.getDescription();
+ event.styleName = e.getStyleName() == null ? ""
+ : e.getStyleName();
event.allDay = e.isAllDay();
calendarStateEvents.add(event);
}
@@ -498,11 +499,12 @@ public class Calendar extends AbstractComponent implements
endDate = getEndDate();
}
- int durationInDays = (int) (((endDate.getTime()) - startDate.getTime()) / DateConstants.DAYINMILLIS);
+ int durationInDays = (int) (((endDate.getTime()) - startDate.getTime())
+ / DateConstants.DAYINMILLIS);
durationInDays++;
if (durationInDays > 60) {
- throw new RuntimeException("Daterange is too big (max 60) = "
- + durationInDays);
+ throw new RuntimeException(
+ "Daterange is too big (max 60) = " + durationInDays);
}
state.dayNames = getDayNamesShort();
@@ -551,8 +553,8 @@ public class Calendar extends AbstractComponent implements
for (Action.Handler actionHandler : actionHandlers) {
// Create calendar which omits time
- GregorianCalendar cal = new GregorianCalendar(
- getTimeZone(), getLocale());
+ GregorianCalendar cal = new GregorianCalendar(getTimeZone(),
+ getLocale());
cal.clear();
cal.set(currentCalendar.get(java.util.Calendar.YEAR),
currentCalendar.get(java.util.Calendar.MONTH),
@@ -604,8 +606,8 @@ public class Calendar extends AbstractComponent implements
}
private void setActionsForEachHalfHour(
- Map<CalendarDateRange, Set<Action>> actionMap, Date start,
- Date end, Action.Handler actionHandler) {
+ Map<CalendarDateRange, Set<Action>> actionMap, Date start, Date end,
+ Action.Handler actionHandler) {
GregorianCalendar cal = new GregorianCalendar(getTimeZone(),
getLocale());
cal.setTime(start);
@@ -613,7 +615,8 @@ public class Calendar extends AbstractComponent implements
Date s = cal.getTime();
cal.add(java.util.Calendar.MINUTE, 30);
Date e = cal.getTime();
- CalendarDateRange range = new CalendarDateRange(s, e, getTimeZone());
+ CalendarDateRange range = new CalendarDateRange(s, e,
+ getTimeZone());
Action[] actions = actionHandler.getActions(range, this);
if (actions != null) {
Set<Action> actionSet = new LinkedHashSet<Action>(
@@ -623,9 +626,8 @@ public class Calendar extends AbstractComponent implements
}
}
- private void setActionsForDay(
- Map<CalendarDateRange, Set<Action>> actionMap, Date start,
- Date end, Action.Handler actionHandler) {
+ private void setActionsForDay(Map<CalendarDateRange, Set<Action>> actionMap,
+ Date start, Date end, Action.Handler actionHandler) {
CalendarDateRange range = new CalendarDateRange(start, end,
getTimeZone());
Action[] actions = actionHandler.getActions(range, this);
@@ -648,7 +650,8 @@ public class Calendar extends AbstractComponent implements
DateConstants.ACTION_DATE_FORMAT_PATTERN);
formatter.setTimeZone(getTimeZone());
- for (Entry<CalendarDateRange, Set<Action>> entry : actionMap.entrySet()) {
+ for (Entry<CalendarDateRange, Set<Action>> entry : actionMap
+ .entrySet()) {
CalendarDateRange range = entry.getKey();
Set<Action> actions = entry.getValue();
for (Action action : actions) {
@@ -670,7 +673,7 @@ public class Calendar extends AbstractComponent implements
/**
* Gets currently active time format. Value is either TimeFormat.Format12H
* or TimeFormat.Format24H.
- *
+ *
* @return TimeFormat Format for the time.
*/
public TimeFormat getTimeFormat() {
@@ -680,8 +683,8 @@ public class Calendar extends AbstractComponent implements
f = (SimpleDateFormat) SimpleDateFormat
.getTimeInstance(SimpleDateFormat.SHORT);
} else {
- f = (SimpleDateFormat) SimpleDateFormat.getTimeInstance(
- SimpleDateFormat.SHORT, getLocale());
+ f = (SimpleDateFormat) SimpleDateFormat
+ .getTimeInstance(SimpleDateFormat.SHORT, getLocale());
}
String p = f.toPattern();
if (p.indexOf("HH") != -1 || p.indexOf("H") != -1) {
@@ -693,9 +696,9 @@ public class Calendar extends AbstractComponent implements
}
/**
- * Example: <code>setTimeFormat(TimeFormat.Format12H);</code></br> Set to
- * null, if you want the format being defined by the locale.
- *
+ * Example: <code>setTimeFormat(TimeFormat.Format12H);</code></br>
+ * Set to null, if you want the format being defined by the locale.
+ *
* @param format
* Set 12h or 24h format. Default is defined by the locale.
*/
@@ -706,7 +709,7 @@ public class Calendar extends AbstractComponent implements
/**
* Returns a time zone that is currently used by this component.
- *
+ *
* @return Component's Time zone
*/
public TimeZone getTimeZone() {
@@ -719,7 +722,7 @@ public class Calendar extends AbstractComponent implements
/**
* Set time zone that this component will use. Null value sets the default
* time zone.
- *
+ *
* @param zone
* Time zone to use
*/
@@ -739,7 +742,7 @@ public class Calendar extends AbstractComponent implements
* Get the internally used Calendar instance. This is the currently used
* instance of {@link java.util.Calendar} but is bound to change during the
* lifetime of the component.
- *
+ *
* @return the currently used java calendar
*/
public java.util.Calendar getInternalCalendar() {
@@ -752,13 +755,13 @@ public class Calendar extends AbstractComponent implements
* monthly and the weekly view. The general contract is that <b>firstDay <
* lastDay</b>.
* </p>
- *
+ *
* <p>
* Note that this only affects the rendering process. Events are still
* requested by the dates set by {@link #setStartDate(Date)} and
* {@link #setEndDate(Date)}.
* </p>
- *
+ *
* @param firstDay
* the first day of the week to show, between 1 and 7
*/
@@ -773,7 +776,7 @@ public class Calendar extends AbstractComponent implements
/**
* Get the first visible day of the week. Returns the weekdays as integers
* represented by {@link java.util.Calendar#DAY_OF_WEEK}
- *
+ *
* @return An integer representing the week day according to
* {@link java.util.Calendar#DAY_OF_WEEK}
*/
@@ -787,13 +790,13 @@ public class Calendar extends AbstractComponent implements
* monthly and the weekly view. The general contract is that <b>firstDay <
* lastDay</b>.
* </p>
- *
+ *
* <p>
* Note that this only affects the rendering process. Events are still
* requested by the dates set by {@link #setStartDate(Date)} and
* {@link #setEndDate(Date)}.
* </p>
- *
+ *
* @param lastDay
* the first day of the week to show, between 1 and 7
*/
@@ -808,7 +811,7 @@ public class Calendar extends AbstractComponent implements
/**
* Get the last visible day of the week. Returns the weekdays as integers
* represented by {@link java.util.Calendar#DAY_OF_WEEK}
- *
+ *
* @return An integer representing the week day according to
* {@link java.util.Calendar#DAY_OF_WEEK}
*/
@@ -821,13 +824,13 @@ public class Calendar extends AbstractComponent implements
* This method restricts the hours that are shown per day. This affects the
* weekly view. The general contract is that <b>firstHour < lastHour</b>.
* </p>
- *
+ *
* <p>
* Note that this only affects the rendering process. Events are still
* requested by the dates set by {@link #setStartDate(Date)} and
* {@link #setEndDate(Date)}.
* </p>
- *
+ *
* @param firstHour
* the first hour of the day to show, between 0 and 23
*/
@@ -842,7 +845,7 @@ public class Calendar extends AbstractComponent implements
/**
* Returns the first visible hour in the week view. Returns the hour using a
* 24h time format
- *
+ *
*/
public int getFirstVisibleHourOfDay() {
return firstHour;
@@ -853,13 +856,13 @@ public class Calendar extends AbstractComponent implements
* This method restricts the hours that are shown per day. This affects the
* weekly view. The general contract is that <b>firstHour < lastHour</b>.
* </p>
- *
+ *
* <p>
* Note that this only affects the rendering process. Events are still
* requested by the dates set by {@link #setStartDate(Date)} and
* {@link #setEndDate(Date)}.
* </p>
- *
+ *
* @param lastHour
* the first hour of the day to show, between 0 and 23
*/
@@ -874,7 +877,7 @@ public class Calendar extends AbstractComponent implements
/**
* Returns the last visible hour in the week view. Returns the hour using a
* 24h time format
- *
+ *
*/
public int getLastVisibleHourOfDay() {
return lastHour;
@@ -882,7 +885,7 @@ public class Calendar extends AbstractComponent implements
/**
* Gets the date caption format for the weekly view.
- *
+ *
* @return The pattern used in caption of dates in weekly view.
*/
public String getWeeklyCaptionFormat() {
@@ -892,14 +895,14 @@ public class Calendar extends AbstractComponent implements
/**
* Sets custom date format for the weekly view. This is the caption of the
* date. Format could be like "mmm MM/dd".
- *
+ *
* @param dateFormatPattern
* The date caption pattern.
*/
public void setWeeklyCaptionFormat(String dateFormatPattern) {
if ((weeklyCaptionFormat == null && dateFormatPattern != null)
- || (weeklyCaptionFormat != null && !weeklyCaptionFormat
- .equals(dateFormatPattern))) {
+ || (weeklyCaptionFormat != null
+ && !weeklyCaptionFormat.equals(dateFormatPattern))) {
weeklyCaptionFormat = dateFormatPattern;
markAsDirty();
}
@@ -916,7 +919,7 @@ public class Calendar extends AbstractComponent implements
/**
* Get the day of week by the given calendar and its locale
- *
+ *
* @param calendar
* The calendar to use
* @return
@@ -934,7 +937,7 @@ public class Calendar extends AbstractComponent implements
/**
* Is the user allowed to trigger events which alters the events
- *
+ *
* @return true if the client is allowed to send changes to server
* @see #isEventClickAllowed()
*/
@@ -946,7 +949,7 @@ public class Calendar extends AbstractComponent implements
* Is the user allowed to trigger click events. Returns {@code true} by
* default. Subclass can override this method to disallow firing event
* clicks got from the client side.
- *
+ *
* @return true if the client is allowed to click events
* @see #isClientChangeAllowed()
* @deprecated As of 7.4, override {@link #fireEventClick(Integer)} instead.
@@ -959,7 +962,7 @@ public class Calendar extends AbstractComponent implements
/**
* Fires an event when the user selecing moving forward/backward in the
* calendar.
- *
+ *
* @param forward
* True if the calendar moved forward else backward is assumed.
*/
@@ -973,7 +976,7 @@ public class Calendar extends AbstractComponent implements
/**
* Fires an event move event to all server side move listerners
- *
+ *
* @param index
* The index of the event in the events list
* @param newFromDatetime
@@ -995,7 +998,7 @@ public class Calendar extends AbstractComponent implements
/**
* Fires event when a week was clicked in the calendar.
- *
+ *
* @param week
* The week that was clicked
* @param year
@@ -1008,7 +1011,7 @@ public class Calendar extends AbstractComponent implements
/**
* Fires event when a date was clicked in the calendar. Uses an existing
* event from the event cache.
- *
+ *
* @param index
* The index of the event in the event cache.
*/
@@ -1019,7 +1022,7 @@ public class Calendar extends AbstractComponent implements
/**
* Fires event when a date was clicked in the calendar. Creates a new event
* for the date and passes it to the listener.
- *
+ *
* @param date
* The date and time that was clicked
*/
@@ -1031,7 +1034,7 @@ public class Calendar extends AbstractComponent implements
* Fires an event range selected event. The event is fired when a user
* highlights an area in the calendar. The highlighted areas start and end
* dates are returned as arguments.
- *
+ *
* @param from
* The start date and time of the highlighted area
* @param to
@@ -1048,7 +1051,7 @@ public class Calendar extends AbstractComponent implements
* event in the calendar causing the time range of the event to increase or
* decrease. The new start and end times are returned as arguments to this
* method.
- *
+ *
* @param index
* The index of the event in the event cache
* @param startTime
@@ -1073,7 +1076,7 @@ public class Calendar extends AbstractComponent implements
/**
* Localized display names for week days starting from sunday. Returned
* array's length is always 7.
- *
+ *
* @return Array of localized weekday names.
*/
protected String[] getDayNamesShort() {
@@ -1084,7 +1087,7 @@ public class Calendar extends AbstractComponent implements
/**
* Localized display names for months starting from January. Returned
* array's length is always 12.
- *
+ *
* @return Array of localized month names.
*/
protected String[] getMonthNamesShort() {
@@ -1095,7 +1098,7 @@ public class Calendar extends AbstractComponent implements
/**
* Gets a date that is first day in the week that target given date belongs
* to.
- *
+ *
* @param date
* Target date
* @return Date that is first date in same week that given date is.
@@ -1113,7 +1116,7 @@ public class Calendar extends AbstractComponent implements
/**
* Gets a date that is last day in the week that target given date belongs
* to.
- *
+ *
* @param date
* Target date
* @return Date that is last date in same week that given date is.
@@ -1134,7 +1137,7 @@ public class Calendar extends AbstractComponent implements
/**
* Calculates the end time of the day using the given calendar and date
- *
+ *
* @param date
* @param calendar
* the calendar instance to be used in the calculation. The given
@@ -1162,7 +1165,7 @@ public class Calendar extends AbstractComponent implements
/**
* Calculates the end time of the day using the given calendar and date
- *
+ *
* @param date
* @param calendar
* the calendar instance to be used in the calculation. The given
@@ -1186,7 +1189,7 @@ public class Calendar extends AbstractComponent implements
/**
* Finds the first day of the week and returns a day representing the start
* of that day
- *
+ *
* @param start
* The actual date
* @param expandToFullWeek
@@ -1217,7 +1220,7 @@ public class Calendar extends AbstractComponent implements
/**
* Finds the last day of the week and returns a day representing the end of
* that day
- *
+ *
* @param end
* The actual date
* @param expandToFullWeek
@@ -1251,7 +1254,7 @@ public class Calendar extends AbstractComponent implements
* is used to query for events to show, and must be non-null. By default a
* {@link com.vaadin.addon.calendar.event.BasicEventProvider
* BasicEventProvider} is used.
- *
+ *
* @param calendarEventProvider
* the calendarEventProvider to set. Cannot be null.
*/
@@ -1286,7 +1289,7 @@ public class Calendar extends AbstractComponent implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.addon.calendar.ui.CalendarEvents.EventChangeListener#
* eventChange (com.vaadin.addon.calendar.ui.CalendarEvents.EventChange)
*/
@@ -1302,7 +1305,7 @@ public class Calendar extends AbstractComponent implements
* Set the handler for the given type information. Mirrors
* {@link #addListener(String, Class, Object, Method) addListener} from
* AbstractComponent
- *
+ *
* @param eventId
* A unique id for the event. Usually one of
* {@link CalendarEventId}
@@ -1329,7 +1332,7 @@ public class Calendar extends AbstractComponent implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.addon.calendar.ui.CalendarComponentEvents.NavigationNotifier
* #addListener
@@ -1343,7 +1346,7 @@ public class Calendar extends AbstractComponent implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.addon.calendar.ui.CalendarComponentEvents.NavigationNotifier
* #addListener
@@ -1357,7 +1360,7 @@ public class Calendar extends AbstractComponent implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.addon.calendar.ui.CalendarComponentEvents.NavigationNotifier
* #addListener
@@ -1371,7 +1374,7 @@ public class Calendar extends AbstractComponent implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.addon.calendar.ui.CalendarComponentEvents.NavigationNotifier
* #addListener
@@ -1385,7 +1388,7 @@ public class Calendar extends AbstractComponent implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.addon.calendar.ui.CalendarComponentEvents.NavigationNotifier
* #addListener
@@ -1399,7 +1402,7 @@ public class Calendar extends AbstractComponent implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.addon.calendar.ui.CalendarComponentEvents.EventResizeNotifier
* #addListener
@@ -1414,7 +1417,7 @@ public class Calendar extends AbstractComponent implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.addon.calendar.ui.CalendarComponentEvents.RangeSelectNotifier
* #addListener
@@ -1430,7 +1433,7 @@ public class Calendar extends AbstractComponent implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.addon.calendar.ui.CalendarComponentEvents.EventMoveNotifier
* #addListener
@@ -1444,7 +1447,7 @@ public class Calendar extends AbstractComponent implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.addon.calendar.ui.CalendarComponentEvents.
* CalendarEventNotifier #getHandler(java.lang.String)
*/
@@ -1464,7 +1467,7 @@ public class Calendar extends AbstractComponent implements
/**
* Set the drop handler for the calendar See {@link DropHandler} for
* implementation details.
- *
+ *
* @param dropHandler
* The drop handler to set
*/
@@ -1474,7 +1477,7 @@ public class Calendar extends AbstractComponent implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.event.dd.DropTarget#translateDropTargetDetails(java.util.Map)
*/
@@ -1514,26 +1517,28 @@ public class Calendar extends AbstractComponent implements
* Sets a container as a data source for the events in the calendar.
* Equivalent for doing
* <code>Calendar.setEventProvider(new ContainerEventProvider(container))</code>
- *
+ *
* Use this method if you are adding a container which uses the default
* property ids like {@link BeanItemContainer} for instance. If you are
* using custom properties instead use
* {@link Calendar#setContainerDataSource(com.vaadin.data.Container.Indexed, Object, Object, Object, Object, Object)}
- *
+ *
* Please note that the container must be sorted by date!
- *
+ *
* @param container
* The container to use as a datasource
*/
public void setContainerDataSource(Container.Indexed container) {
ContainerEventProvider provider = new ContainerEventProvider(container);
- provider.addEventSetChangeListener(new CalendarEventProvider.EventSetChangeListener() {
- @Override
- public void eventSetChange(EventSetChangeEvent changeEvent) {
- // Repaint if events change
- markAsDirty();
- }
- });
+ provider.addEventSetChangeListener(
+ new CalendarEventProvider.EventSetChangeListener() {
+ @Override
+ public void eventSetChange(
+ EventSetChangeEvent changeEvent) {
+ // Repaint if events change
+ markAsDirty();
+ }
+ });
provider.addEventChangeListener(new EventChangeListener() {
@Override
public void eventChange(EventChangeEvent changeEvent) {
@@ -1548,9 +1553,9 @@ public class Calendar extends AbstractComponent implements
* Sets a container as a data source for the events in the calendar.
* Equivalent for doing
* <code>Calendar.setEventProvider(new ContainerEventProvider(container))</code>
- *
+ *
* Please note that the container must be sorted by date!
- *
+ *
* @param container
* The container to use as a data source
* @param captionProperty
@@ -1577,13 +1582,15 @@ public class Calendar extends AbstractComponent implements
provider.setStartDateProperty(startDateProperty);
provider.setEndDateProperty(endDateProperty);
provider.setStyleNameProperty(styleNameProperty);
- provider.addEventSetChangeListener(new CalendarEventProvider.EventSetChangeListener() {
- @Override
- public void eventSetChange(EventSetChangeEvent changeEvent) {
- // Repaint if events change
- markAsDirty();
- }
- });
+ provider.addEventSetChangeListener(
+ new CalendarEventProvider.EventSetChangeListener() {
+ @Override
+ public void eventSetChange(
+ EventSetChangeEvent changeEvent) {
+ // Repaint if events change
+ markAsDirty();
+ }
+ });
provider.addEventChangeListener(new EventChangeListener() {
@Override
public void eventChange(EventChangeEvent changeEvent) {
@@ -1596,7 +1603,7 @@ public class Calendar extends AbstractComponent implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.addon.calendar.event.CalendarEventProvider#getEvents(java.
* util.Date, java.util.Date)
@@ -1608,7 +1615,7 @@ public class Calendar extends AbstractComponent implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.addon.calendar.event.CalendarEditableEventProvider#addEvent
* (com.vaadin.addon.calendar.event.CalendarEvent)
@@ -1627,7 +1634,7 @@ public class Calendar extends AbstractComponent implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.addon.calendar.event.CalendarEditableEventProvider#removeEvent
* (com.vaadin.addon.calendar.event.CalendarEvent)
@@ -1647,7 +1654,7 @@ public class Calendar extends AbstractComponent implements
/**
* Adds an action handler to the calender that handles event produced by the
* context menu.
- *
+ *
* <p>
* The {@link Handler#getActions(Object, Object)} parameters depend on what
* view the Calendar is in:
@@ -1664,7 +1671,7 @@ public class Calendar extends AbstractComponent implements
* The Dates passed into the {@link CalendarDateRange} are in the same
* timezone as the calendar is.
* </p>
- *
+ *
* <p>
* The {@link Handler#handleAction(Action, Object, Object)} parameters
* depend on what the context menu is called upon:
@@ -1692,7 +1699,7 @@ public class Calendar extends AbstractComponent implements
/**
* Is the calendar in a mode where all days of the month is shown
- *
+ *
* @return Returns true if calendar is in monthly mode and false if it is in
* weekly mode
*/
@@ -1708,7 +1715,7 @@ public class Calendar extends AbstractComponent implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.event.Action.Container#removeActionHandler(com.vaadin.event
* .Action.Handler)
@@ -1895,7 +1902,7 @@ public class Calendar extends AbstractComponent implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.server.VariableOwner#changeVariables(java.lang.Object,
* java.util.Map)
*/
@@ -1909,7 +1916,7 @@ public class Calendar extends AbstractComponent implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.ui.LegacyComponent#paintContent(com.vaadin.server.PaintTarget)
*/
@@ -1928,7 +1935,7 @@ public class Calendar extends AbstractComponent implements
* false, the caption is rendered in the browser as plain text.
* <p>
* The default is false, i.e. to render that caption as plain text.
- *
+ *
* @param captionAsHtml
* true if the captions are rendered as HTML, false if rendered
* as plain text
@@ -1941,7 +1948,7 @@ public class Calendar extends AbstractComponent implements
* Checks whether event captions are rendered as HTML
* <p>
* The default is false, i.e. to render that caption as plain text.
- *
+ *
* @return true if the captions are rendered as HTML, false if rendered as
* plain text
*/
@@ -1955,8 +1962,8 @@ public class Calendar extends AbstractComponent implements
Attributes attr = design.attributes();
if (design.hasAttr("time-format")) {
- setTimeFormat(TimeFormat.valueOf("Format"
- + design.attr("time-format").toUpperCase()));
+ setTimeFormat(TimeFormat.valueOf(
+ "Format" + design.attr("time-format").toUpperCase()));
}
if (design.hasAttr("start-date")) {
@@ -1975,7 +1982,8 @@ public class Calendar extends AbstractComponent implements
if (currentTimeFormat != null) {
design.attr("time-format",
- (currentTimeFormat == TimeFormat.Format12H ? "12h" : "24h"));
+ (currentTimeFormat == TimeFormat.Format12H ? "12h"
+ : "24h"));
}
if (startDate != null) {
design.attr("start-date", df_date.format(getStartDate()));
@@ -2000,7 +2008,7 @@ public class Calendar extends AbstractComponent implements
/**
* Allow setting first day of week independent of Locale. Set to null if you
* want first day of week being defined by the locale
- *
+ *
* @since 7.6
* @param dayOfWeek
* any of java.util.Calendar.SUNDAY..java.util.Calendar.SATURDAY
@@ -2009,12 +2017,11 @@ public class Calendar extends AbstractComponent implements
public void setFirstDayOfWeek(Integer dayOfWeek) {
int minimalSupported = java.util.Calendar.SUNDAY;
int maximalSupported = java.util.Calendar.SATURDAY;
- if (dayOfWeek != null
- && (dayOfWeek < minimalSupported || dayOfWeek > maximalSupported)) {
- throw new IllegalArgumentException(
- String.format(
- "Day of week must be between %s and %s. Actually received: %s",
- minimalSupported, maximalSupported, dayOfWeek));
+ if (dayOfWeek != null && (dayOfWeek < minimalSupported
+ || dayOfWeek > maximalSupported)) {
+ throw new IllegalArgumentException(String.format(
+ "Day of week must be between %s and %s. Actually received: %s",
+ minimalSupported, maximalSupported, dayOfWeek));
}
customFirstDayOfWeek = dayOfWeek;
markAsDirty();
diff --git a/server/src/main/java/com/vaadin/ui/CheckBox.java b/server/src/main/java/com/vaadin/ui/CheckBox.java
index 8b31edcbb4..f7c518a499 100644
--- a/server/src/main/java/com/vaadin/ui/CheckBox.java
+++ b/server/src/main/java/com/vaadin/ui/CheckBox.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -49,7 +49,7 @@ public class CheckBox extends AbstractField<Boolean> {
* to make sure the cached state is updated to match the client. If
* we do not do this, a reverting setValue() call in a listener will
* not cause the new state to be sent to the client.
- *
+ *
* See #11028, #10030.
*/
getUI().getConnectorTracker().getDiffState(CheckBox.this)
@@ -66,7 +66,8 @@ public class CheckBox extends AbstractField<Boolean> {
}
};
- FocusAndBlurServerRpcImpl focusBlurRpc = new FocusAndBlurServerRpcImpl(this) {
+ FocusAndBlurServerRpcImpl focusBlurRpc = new FocusAndBlurServerRpcImpl(
+ this) {
@Override
protected void fireEvent(Event event) {
CheckBox.this.fireEvent(event);
@@ -84,7 +85,7 @@ public class CheckBox extends AbstractField<Boolean> {
/**
* Creates a new checkbox with a set caption.
- *
+ *
* @param caption
* the Checkbox caption.
*/
@@ -95,7 +96,7 @@ public class CheckBox extends AbstractField<Boolean> {
/**
* Creates a new checkbox with a caption and a set initial state.
- *
+ *
* @param caption
* the caption of the checkbox
* @param initialState
@@ -108,7 +109,7 @@ public class CheckBox extends AbstractField<Boolean> {
/**
* Creates a new checkbox that is connected to a boolean property.
- *
+ *
* @param state
* the Initial state of the switch-button.
* @param dataSource
@@ -132,7 +133,7 @@ public class CheckBox extends AbstractField<Boolean> {
* Overridden to keep the shared state in sync with the AbstractField
* internal value. Should be removed once AbstractField is refactored to use
* shared state.
- *
+ *
* See tickets #10921 and #11064.
*/
@Override
@@ -199,9 +200,9 @@ public class CheckBox extends AbstractField<Boolean> {
/**
* Get the boolean value of the button state.
- *
+ *
* @return True iff the button is pressed down or checked.
- *
+ *
* @deprecated As of 7.0, use {@link #getValue()} instead and, if needed,
* handle null values.
*/
@@ -213,7 +214,7 @@ public class CheckBox extends AbstractField<Boolean> {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.AbstractField#readDesign(org.jsoup.nodes.Element,
* com.vaadin.ui.declarative.DesignContext)
*/
@@ -221,15 +222,14 @@ public class CheckBox extends AbstractField<Boolean> {
public void readDesign(Element design, DesignContext designContext) {
super.readDesign(design, designContext);
if (design.hasAttr("checked")) {
- this.setValue(
- DesignAttributeHandler.readAttribute("checked",
- design.attributes(), Boolean.class), false, true);
+ this.setValue(DesignAttributeHandler.readAttribute("checked",
+ design.attributes(), Boolean.class), false, true);
}
}
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.AbstractField#getCustomAttributes()
*/
@Override
@@ -241,7 +241,7 @@ public class CheckBox extends AbstractField<Boolean> {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.AbstractField#writeDesign(org.jsoup.nodes.Element,
* com.vaadin.ui.declarative.DesignContext)
*/
diff --git a/server/src/main/java/com/vaadin/ui/ColorPicker.java b/server/src/main/java/com/vaadin/ui/ColorPicker.java
index 9e46c4e718..5f21aa0360 100644
--- a/server/src/main/java/com/vaadin/ui/ColorPicker.java
+++ b/server/src/main/java/com/vaadin/ui/ColorPicker.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,11 +20,11 @@ import com.vaadin.shared.ui.colorpicker.Color;
/**
* A class that defines default (button-like) implementation for a color picker
* component.
- *
+ *
* @since 7.0.0
- *
+ *
* @see ColorPickerArea
- *
+ *
*/
public class ColorPicker extends AbstractColorPicker {
@@ -37,7 +37,7 @@ public class ColorPicker extends AbstractColorPicker {
/**
* Instantiates a new color picker.
- *
+ *
* @param popupCaption
* caption of the color select popup
*/
@@ -47,7 +47,7 @@ public class ColorPicker extends AbstractColorPicker {
/**
* Instantiates a new color picker.
- *
+ *
* @param popupCaption
* caption of the color select popup
* @param initialColor
diff --git a/server/src/main/java/com/vaadin/ui/ColorPickerArea.java b/server/src/main/java/com/vaadin/ui/ColorPickerArea.java
index 94f64cf256..d15ffc6fad 100644
--- a/server/src/main/java/com/vaadin/ui/ColorPickerArea.java
+++ b/server/src/main/java/com/vaadin/ui/ColorPickerArea.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,11 +19,11 @@ import com.vaadin.shared.ui.colorpicker.Color;
/**
* A class that defines area-like implementation for a color picker component.
- *
+ *
* @since 7.0.0
- *
+ *
* @see ColorPicker
- *
+ *
*/
public class ColorPickerArea extends AbstractColorPicker {
@@ -36,7 +36,7 @@ public class ColorPickerArea extends AbstractColorPicker {
/**
* Instantiates a new color picker.
- *
+ *
* @param popupCaption
* caption of the color select popup
*/
@@ -46,7 +46,7 @@ public class ColorPickerArea extends AbstractColorPicker {
/**
* Instantiates a new color picker.
- *
+ *
* @param popupCaption
* caption of the color select popup
* @param initialColor
diff --git a/server/src/main/java/com/vaadin/ui/ComboBox.java b/server/src/main/java/com/vaadin/ui/ComboBox.java
index ce3526af53..0df7ed12da 100644
--- a/server/src/main/java/com/vaadin/ui/ComboBox.java
+++ b/server/src/main/java/com/vaadin/ui/ComboBox.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -44,18 +44,18 @@ import com.vaadin.shared.ui.combobox.FilteringMode;
* input, and loaded dynamically ("lazy-loading") from the server. You can turn
* on newItemsAllowed and change filtering mode (and also turn it off), but you
* can not turn on multi-select mode.
- *
+ *
*/
@SuppressWarnings("serial")
-public class ComboBox extends AbstractSelect implements
- AbstractSelect.Filtering, FieldEvents.BlurNotifier,
+public class ComboBox extends AbstractSelect
+ implements AbstractSelect.Filtering, FieldEvents.BlurNotifier,
FieldEvents.FocusNotifier {
/**
* ItemStyleGenerator can be used to add custom styles to combo box items
* shown in the popup. The CSS class name that will be added to the item
* style names is <tt>v-filterselect-item-[style name]</tt>.
- *
+ *
* @since 7.5.6
* @see ComboBox#setItemStyleGenerator(ItemStyleGenerator)
*/
@@ -63,7 +63,7 @@ public class ComboBox extends AbstractSelect implements
/**
* Called by ComboBox when an item is painted.
- *
+ *
* @param source
* the source combo box
* @param itemId
@@ -115,7 +115,7 @@ public class ComboBox extends AbstractSelect implements
* Flag to indicate whether to scroll the selected item visible (select the
* page on which it is) when opening the popup or not. Only applies to
* single select mode.
- *
+ *
* This requires finding the index of the item, which can be expensive in
* many large lazy loading containers.
*/
@@ -161,7 +161,7 @@ public class ComboBox extends AbstractSelect implements
/**
* Gets the current input prompt.
- *
+ *
* @see #setInputPrompt(String)
* @return the current input prompt, or null if not enabled
*/
@@ -320,11 +320,11 @@ public class ComboBox extends AbstractSelect implements
}
target.endTag("options");
- target.addAttribute("totalitems", size()
- + (needNullSelectOption ? 1 : 0));
+ target.addAttribute("totalitems",
+ size() + (needNullSelectOption ? 1 : 0));
if (filteredSize > 0 || nullOptionVisible) {
- target.addAttribute("totalMatches", filteredSize
- + (nullOptionVisible ? 1 : 0));
+ target.addAttribute("totalMatches",
+ filteredSize + (nullOptionVisible ? 1 : 0));
}
// Paint variables
@@ -367,9 +367,9 @@ public class ComboBox extends AbstractSelect implements
* field area of the component is just used to show what is selected. By
* disabling text input, the comboBox will work in the same way as a
* {@link NativeSelect}
- *
+ *
* @see #isTextInputAllowed()
- *
+ *
* @param textInputAllowed
* true to allow entering text, false to just show the current
* selection
@@ -384,7 +384,7 @@ public class ComboBox extends AbstractSelect implements
* the selections or enter a new value if {@link #isNewItemsAllowed()}
* returns true. If text input is disabled, the comboBox will work in the
* same way as a {@link NativeSelect}
- *
+ *
* @return
*/
public boolean isTextInputAllowed() {
@@ -399,17 +399,17 @@ public class ComboBox extends AbstractSelect implements
/**
* Returns the filtered options for the current page using a container
* filter.
- *
+ *
* As a size effect, {@link #filteredSize} is set to the total number of
* items passing the filter.
- *
+ *
* The current container must be {@link Filterable} and {@link Indexed}, and
* the filtering mode must be suitable for container filtering (tested with
* {@link #canUseContainerFilter()}).
- *
+ *
* Use {@link #getFilteredOptions()} and
* {@link #sanitizeList(List, boolean)} if this is not the case.
- *
+ *
* @param needNullSelectOption
* @return filtered list of options (may be empty) or null if cannot use
* container filters
@@ -452,7 +452,8 @@ public class ComboBox extends AbstractSelect implements
// to page with the selected item after filtering if accepted by
// filter
Object selection = getValue();
- if (isScrollToSelectedItem() && !optionRequest && selection != null) {
+ if (isScrollToSelectedItem() && !optionRequest
+ && selection != null) {
// ensure proper page
indexToEnsureInView = indexed.indexOfId(selection);
}
@@ -485,11 +486,11 @@ public class ComboBox extends AbstractSelect implements
/**
* Constructs a filter instance to use when using a Filterable container in
* the <code>ITEM_CAPTION_MODE_PROPERTY</code> mode.
- *
+ *
* Note that the client side implementation expects the filter string to
* apply to the item caption string it sees, so changing the behavior of
* this method can cause problems.
- *
+ *
* @param filterString
* @param filteringMode
* @return
@@ -533,7 +534,7 @@ public class ComboBox extends AbstractSelect implements
* be adjusted.
* <p>
* Package private only for testing purposes.
- *
+ *
* @param options
* @param needNullSelectOption
* flag to indicate if nullselect option needs to be taken into
@@ -550,7 +551,8 @@ public class ComboBox extends AbstractSelect implements
// to page with the selected item after filtering if accepted by
// filter
Object selection = getValue();
- if (isScrollToSelectedItem() && !optionRequest && selection != null) {
+ if (isScrollToSelectedItem() && !optionRequest
+ && selection != null) {
// ensure proper page
indexToEnsureInView = options.indexOf(selection);
}
@@ -560,8 +562,8 @@ public class ComboBox extends AbstractSelect implements
indexToEnsureInView, size);
int first = getFirstItemIndexOnCurrentPage(needNullSelectOption,
size);
- int last = getLastItemIndexOnCurrentPage(needNullSelectOption,
- size, first);
+ int last = getLastItemIndexOnCurrentPage(needNullSelectOption, size,
+ first);
return options.subList(first, last + 1);
} else {
return options;
@@ -572,7 +574,7 @@ public class ComboBox extends AbstractSelect implements
* Returns the index of the first item on the current page. The index is to
* the underlying (possibly filtered) contents. The null item, if any, does
* not have an index but takes up a slot on the first page.
- *
+ *
* @param needNullSelectOption
* true if a null option should be shown before any other options
* (takes up the first slot on the first page, not counted in
@@ -599,7 +601,7 @@ public class ComboBox extends AbstractSelect implements
* the underlying (possibly filtered) contents. If needNullSelectOption is
* true, the null item takes up the first slot on the first page,
* effectively reducing the first page size by one.
- *
+ *
* @param needNullSelectOption
* true if a null option should be shown before any other options
* (takes up the first slot on the first page, not counted in
@@ -624,7 +626,7 @@ public class ComboBox extends AbstractSelect implements
* page is not after the end of the contents, and optionally go to the page
* containg a specific item. There are no side effects but the adjusted page
* index is returned.
- *
+ *
* @param page
* page number to use as the starting point
* @param needNullSelectOption
@@ -654,11 +656,11 @@ public class ComboBox extends AbstractSelect implements
/**
* Filters the options in memory and returns the full filtered list.
- *
+ *
* This can be less efficient than using container filters, so use
* {@link #getOptionsWithFilter(boolean)} if possible (filterable container
* and suitable item caption mode etc.).
- *
+ *
* @return
*/
protected List<?> getFilteredOptions() {
@@ -710,7 +712,7 @@ public class ComboBox extends AbstractSelect implements
/**
* Invoked when the value of a variable has changed.
- *
+ *
* @see com.vaadin.ui.AbstractComponent#changeVariables(java.lang.Object,
* java.util.Map)
*/
@@ -844,7 +846,7 @@ public class ComboBox extends AbstractSelect implements
/**
* ComboBox does not support multi select mode.
- *
+ *
* @deprecated As of 7.0, use {@link ListSelect}, {@link OptionGroup} or
* {@link TwinColSelect} instead
* @see com.vaadin.ui.AbstractSelect#setMultiSelect(boolean)
@@ -855,18 +857,19 @@ public class ComboBox extends AbstractSelect implements
@Override
public void setMultiSelect(boolean multiSelect) {
if (multiSelect) {
- throw new UnsupportedOperationException("Multiselect not supported");
+ throw new UnsupportedOperationException(
+ "Multiselect not supported");
}
}
/**
* ComboBox does not support multi select mode.
- *
+ *
* @deprecated As of 7.0, use {@link ListSelect}, {@link OptionGroup} or
* {@link TwinColSelect} instead
- *
+ *
* @see com.vaadin.ui.AbstractSelect#isMultiSelect()
- *
+ *
* @return false
*/
@Deprecated
@@ -877,7 +880,7 @@ public class ComboBox extends AbstractSelect implements
/**
* Returns the page length of the suggestion popup.
- *
+ *
* @return the pageLength
*/
public int getPageLength() {
@@ -897,7 +900,7 @@ public class ComboBox extends AbstractSelect implements
/**
* Sets the page length for the suggestion popup. Setting the page length to
* 0 will disable suggestion popup paging (all items visible).
- *
+ *
* @param pageLength
* the pageLength to set
*/
@@ -910,10 +913,11 @@ public class ComboBox extends AbstractSelect implements
* Sets the suggestion pop-up's width as a CSS string. By using relative
* units (e.g. "50%") it's possible to set the popup's width relative to the
* ComboBox itself.
- *
+ *
* @see #getPopupWidth()
* @since 7.7
- * @param width the width
+ * @param width
+ * the width
*/
public void setPopupWidth(String width) {
suggestionPopupWidth = width;
@@ -924,10 +928,10 @@ public class ComboBox extends AbstractSelect implements
* Sets whether to scroll the selected item visible (directly open the page
* on which it is) when opening the combo box popup or not. Only applies to
* single select mode.
- *
+ *
* This requires finding the index of the item, which can be expensive in
* many large lazy loading containers.
- *
+ *
* @param scrollToSelectedItem
* true to find the page with the selected item when opening the
* selection popup
@@ -939,9 +943,9 @@ public class ComboBox extends AbstractSelect implements
/**
* Returns true if the select should find the page with the selected item
* when opening the popup (single select combo box only).
- *
+ *
* @see #setScrollToSelectedItem(boolean)
- *
+ *
* @return true if the page with the selected item will be shown when
* opening the popup
*/
@@ -953,7 +957,7 @@ public class ComboBox extends AbstractSelect implements
* Sets the item style generator that is used to produce custom styles for
* showing items in the popup. The CSS class name that will be added to the
* item style names is <tt>v-filterselect-item-[style name]</tt>.
- *
+ *
* @param itemStyleGenerator
* the item style generator to set, or <code>null</code> to not
* use any custom item styles
@@ -966,7 +970,7 @@ public class ComboBox extends AbstractSelect implements
/**
* Gets the currently used item style generator.
- *
+ *
* @return the itemStyleGenerator the currently used item style generator,
* or <code>null</code> if no generator is used
* @since 7.5.6
diff --git a/server/src/main/java/com/vaadin/ui/Component.java b/server/src/main/java/com/vaadin/ui/Component.java
index 5db48806c3..22548fb0b5 100644
--- a/server/src/main/java/com/vaadin/ui/Component.java
+++ b/server/src/main/java/com/vaadin/ui/Component.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -36,14 +36,14 @@ import com.vaadin.ui.declarative.DesignContext;
* by all Vaadin components. {@code Component} is paired with
* {@link AbstractComponent}, which provides a default implementation for all
* the methods defined in this interface.
- *
+ *
* <p>
* Components are laid out in the user interface hierarchically. The layout is
* managed by layout components, or more generally by components that implement
* the {@link ComponentContainer} interface. Such a container is the
* <i>parent</i> of the contained components.
* </p>
- *
+ *
* <p>
* The {@link #getParent()} method allows retrieving the parent component of a
* component. While there is a {@link #setParent(Component) setParent()}, you
@@ -52,13 +52,13 @@ import com.vaadin.ui.declarative.DesignContext;
* the layout or other {@code ComponentContainer}, which automatically sets the
* parent.
* </p>
- *
+ *
* <p>
* A component becomes <i>attached</i> to an application (and the
* {@link #attach()} is called) when it or one of its parents is attached to the
* main window of the application through its containment hierarchy.
* </p>
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -69,14 +69,14 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
* has multiple style names defined, the return string is a space-separated
* list of style names. Built-in style names defined in Vaadin or GWT are
* not returned.
- *
+ *
* <p>
* The style names are returned only in the basic form in which they were
* added; each user-defined style name shows as two CSS style class names in
* the rendered HTML: one as it was given and one prefixed with the
* component-specific style name. Only the former is returned.
* </p>
- *
+ *
* @return the style name or a space-separated list of user-defined style
* names of the component
* @see #setStyleName(String)
@@ -91,12 +91,12 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
* space-separated list of style names. The style names must be valid CSS
* class names and should not conflict with any built-in style names in
* Vaadin or GWT.
- *
+ *
* <pre>
* Label label = new Label(&quot;This text has a lot of style&quot;);
* label.setStyleName(&quot;myonestyle myotherstyle&quot;);
* </pre>
- *
+ *
* <p>
* Each style name will occur in two versions: one as specified and one that
* is prefixed with the style name of the component. For example, if you
@@ -104,30 +104,30 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
* component will have both "{@code mystyle}" and "{@code v-button-mystyle}"
* styles. You could then style the component either with:
* </p>
- *
+ *
* <pre>
* .myonestyle {background: blue;}
* </pre>
- *
+ *
* <p>
* or
* </p>
- *
+ *
* <pre>
* .v-button-myonestyle {background: blue;}
* </pre>
- *
+ *
* <p>
* It is normally a good practice to use {@link #addStyleName(String)
* addStyleName()} rather than this setter, as different software
* abstraction layers can then add their own styles without accidentally
* removing those defined in other layers.
* </p>
- *
+ *
* <p>
* This method will trigger a {@link RepaintRequestEvent}.
* </p>
- *
+ *
* @param style
* the new style or styles of the component as a space-separated
* list
@@ -141,12 +141,12 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
* Adds one or more style names to this component. Multiple styles can be
* specified as a space-separated list of style names. The style name will
* be rendered as a HTML class name, which can be used in a CSS definition.
- *
+ *
* <pre>
* Label label = new Label(&quot;This text has style&quot;);
* label.addStyleName(&quot;mystyle&quot;);
* </pre>
- *
+ *
* <p>
* Each style name will occur in two versions: one as specified and one that
* is prefixed with the style name of the component. For example, if you
@@ -154,23 +154,23 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
* component will have both "{@code mystyle}" and "{@code v-button-mystyle}"
* styles. You could then style the component either with:
* </p>
- *
+ *
* <pre>
* .mystyle {font-style: italic;}
* </pre>
- *
+ *
* <p>
* or
* </p>
- *
+ *
* <pre>
* .v-button-mystyle {font-style: italic;}
* </pre>
- *
+ *
* <p>
* This method will trigger a {@link RepaintRequestEvent}.
* </p>
- *
+ *
* @param style
* the new style to be added to the component
* @see #getStyleName()
@@ -182,16 +182,16 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
/**
* Removes one or more style names from component. Multiple styles can be
* specified as a space-separated list of style names.
- *
+ *
* <p>
* The parameter must be a valid CSS style name. Only user-defined style
* names added with {@link #addStyleName(String) addStyleName()} or
* {@link #setStyleName(String) setStyleName()} can be removed; built-in
* style names defined in Vaadin or GWT can not be removed.
* </p>
- *
+ *
* * This method will trigger a {@link RepaintRequestEvent}.
- *
+ *
* @param style
* the style name or style names to be removed
* @see #getStyleName()
@@ -209,21 +209,21 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
/**
* Changes the primary style name of the component.
- *
+ *
* <p>
* The primary style name identifies the component when applying the CSS
* theme to the Component. By changing the style name all CSS rules targeted
* for that style name will no longer apply, and might result in the
* component not working as intended.
* </p>
- *
+ *
* <p>
* To preserve the original style of the component when changing to a new
* primary style you should make your new primary style inherit the old
* primary style using the SASS @include directive. See more in the SASS
* tutorials.
* </p>
- *
+ *
* @param style
* The new primary style name
*/
@@ -234,18 +234,18 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
* with disabled components. Disabled components are rendered in a style
* that indicates the status, usually in gray color. Children of a disabled
* component are also disabled. Components are enabled by default.
- *
+ *
* <p>
* As a security feature, all updates for disabled components are blocked on
* the server-side.
* </p>
- *
+ *
* <p>
* Note that this method only returns the status of the component and does
* not take parents into account. Even though this method returns true the
* component can be disabled to the user if a parent is disabled.
* </p>
- *
+ *
* @return <code>true</code> if the component and its parent are enabled,
* <code>false</code> otherwise.
* @see VariableOwner#isEnabled()
@@ -257,23 +257,23 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
* disabled components, which are shown with a style that indicates the
* status, usually shaded in light gray color. Components are enabled by
* default.
- *
+ *
* <pre>
* Button enabled = new Button(&quot;Enabled&quot;);
* enabled.setEnabled(true); // The default
* layout.addComponent(enabled);
- *
+ *
* Button disabled = new Button(&quot;Disabled&quot;);
* disabled.setEnabled(false);
* layout.addComponent(disabled);
* </pre>
- *
+ *
* <p>
* This method will trigger a {@link RepaintRequestEvent} for the component
* and, if it is a {@link ComponentContainer}, for all its children
* recursively.
* </p>
- *
+ *
* @param enabled
* a boolean value specifying if the component should be enabled
* or not
@@ -282,7 +282,7 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
/**
* Tests the <i>visibility</i> property of the component.
- *
+ *
* <p>
* Visible components are drawn in the user interface, while invisible ones
* are not. The effect is not merely a cosmetic CSS change - no information
@@ -291,14 +291,14 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
* component invisible through this property can alter the positioning of
* other components.
* </p>
- *
+ *
* <p>
* A component is visible only if all its parents are also visible. This is
* not checked by this method though, so even if this method returns true,
* the component can be hidden from the user because a parent is set to
* invisible.
* </p>
- *
+ *
* @return <code>true</code> if the component has been set to be visible in
* the user interface, <code>false</code> if not
* @see #setVisible(boolean)
@@ -308,27 +308,27 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
/**
* Sets the visibility of the component.
- *
+ *
* <p>
* Visible components are drawn in the user interface, while invisible ones
* are not. The effect is not merely a cosmetic CSS change - no information
* about an invisible component will be sent to the client. The effect is
* thus the same as removing the component from its parent.
* </p>
- *
+ *
* <pre>
* TextField readonly = new TextField(&quot;Read-Only&quot;);
* readonly.setValue(&quot;You can't see this!&quot;);
* readonly.setVisible(false);
* layout.addComponent(readonly);
* </pre>
- *
+ *
* <p>
* A component is visible only if all of its parents are also visible. If a
* component is explicitly set to be invisible, changes in the visibility of
* its parents will not change the visibility of the component.
* </p>
- *
+ *
* @param visible
* the boolean value specifying if the component should be
* visible after the call or not.
@@ -338,7 +338,7 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
/**
* Sets the parent connector of the component.
- *
+ *
* <p>
* This method automatically calls {@link #attach()} if the component
* becomes attached to the session, regardless of whether it was attached
@@ -353,7 +353,7 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
* components to a parent and the used method will call this method
* implicitly.
* </p>
- *
+ *
* @param parent
* the parent connector
* @throws IllegalStateException
@@ -364,13 +364,13 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
/**
* Gets the parent component of the component.
- *
+ *
* <p>
* Components can be nested but a component can have only one parent. A
* component that contains other components, that is, can be a parent,
* should usually inherit the {@link ComponentContainer} interface.
* </p>
- *
+ *
* @return the parent component
*/
@Override
@@ -382,18 +382,18 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
* components normally have a value that can be input or changed by the
* user, this is mostly relevant only to field components, though not
* restricted to them.
- *
+ *
* <p>
* Notice that the read-only mode only affects whether the user can change
* the <i>value</i> of the component; it is possible to, for example, scroll
* a read-only table.
* </p>
- *
+ *
* <p>
* The method will return {@code true} if the component or any of its
* parents is in the read-only mode.
* </p>
- *
+ *
* @return <code>true</code> if the component or any of its parents is in
* read-only mode, <code>false</code> if not.
* @see #setReadOnly(boolean)
@@ -403,23 +403,23 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
/**
* Sets the read-only mode of the component to the specified mode. The user
* can not change the value of a read-only component.
- *
+ *
* <p>
* As only {@link Field} components normally have a value that can be input
* or changed by the user, this is mostly relevant only to field components,
* though not restricted to them.
* </p>
- *
+ *
* <p>
* Notice that the read-only mode only affects whether the user can change
* the <i>value</i> of the component; it is possible to, for example, scroll
* a read-only table.
* </p>
- *
+ *
* <p>
* This method will trigger a {@link RepaintRequestEvent}.
* </p>
- *
+ *
* @param readOnly
* a boolean value specifying whether the component is put
* read-only mode or not
@@ -428,12 +428,12 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
/**
* Gets the caption of the component.
- *
+ *
* <p>
* See {@link #setCaption(String)} for a detailed description of the
* caption.
* </p>
- *
+ *
* @return the caption of the component or {@code null} if the caption is
* not set.
* @see #setCaption(String)
@@ -442,7 +442,7 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
/**
* Sets the caption of the component.
- *
+ *
* <p>
* A <i>caption</i> is an explanatory textual label accompanying a user
* interface component, usually shown above, left of, or inside the
@@ -450,25 +450,25 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
* closely related to caption and is usually displayed horizontally before
* or after it, depending on the component and the containing layout.
* </p>
- *
+ *
* <p>
* The caption can usually also be given as the first parameter to a
* constructor, though some components do not support it.
* </p>
- *
+ *
* <pre>
* RichTextArea area = new RichTextArea();
* area.setCaption(&quot;You can edit stuff here&quot;);
* area.setValue(&quot;&lt;h1&gt;Helpful Heading&lt;/h1&gt;&quot;
* + &quot;&lt;p&gt;All this is for you to edit.&lt;/p&gt;&quot;);
* </pre>
- *
+ *
* <p>
* The contents of a caption are automatically quoted, so no raw HTML can be
* rendered in a caption. The validity of the used character encoding,
* usually UTF-8, is not checked.
* </p>
- *
+ *
* <p>
* The caption of a component is, by default, managed and displayed by the
* layout component or component container in which the component is placed.
@@ -482,12 +482,12 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
* {@link Button} and {@link Panel}, manage the caption themselves and
* display it inside the component.
* </p>
- *
+ *
* <p>
* This method will trigger a {@link RepaintRequestEvent}. A
* reimplementation should call the superclass implementation.
* </p>
- *
+ *
* @param caption
* the new caption for the component. If the caption is
* {@code null}, no caption is shown and it does not normally
@@ -497,11 +497,11 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
/**
* Gets the icon resource of the component.
- *
+ *
* <p>
* See {@link #setIcon(Resource)} for a detailed description of the icon.
* </p>
- *
+ *
* @return the icon resource of the component or {@code null} if the
* component has no icon
* @see #setIcon(Resource)
@@ -510,7 +510,7 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
/**
* Sets the icon of the component.
- *
+ *
* <p>
* An icon is an explanatory graphical label accompanying a user interface
* component, usually shown above, left of, or inside the component. Icon is
@@ -518,24 +518,24 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
* and is usually displayed horizontally before or after it, depending on
* the component and the containing layout.
* </p>
- *
+ *
* <p>
* The image is loaded by the browser from a resource, typically a
* {@link com.vaadin.server.ThemeResource}.
* </p>
- *
+ *
* <pre>
* // Component with an icon from a custom theme
* TextField name = new TextField(&quot;Name&quot;);
* name.setIcon(new ThemeResource(&quot;icons/user.png&quot;));
* layout.addComponent(name);
- *
+ *
* // Component with an icon from another theme ('runo')
* Button ok = new Button(&quot;OK&quot;);
* ok.setIcon(new ThemeResource(&quot;../runo/icons/16/ok.png&quot;));
* layout.addComponent(ok);
* </pre>
- *
+ *
* <p>
* The icon of a component is, by default, managed and displayed by the
* layout component or component container in which the component is placed.
@@ -547,16 +547,16 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
* icon of its composition root, so if the root component has an icon, it
* will not be rendered.
* </p>
- *
+ *
* <p>
* An icon will be rendered inside an HTML element that has the
* {@code v-icon} CSS style class. The containing layout may enclose an icon
* and a caption inside elements related to the caption, such as
* {@code v-caption} .
* </p>
- *
+ *
* This method will trigger a {@link RepaintRequestEvent}.
- *
+ *
* @param icon
* the icon of the component. If null, no icon is shown and it
* does not normally take any space.
@@ -567,12 +567,12 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
/**
* Gets the UI the component is attached to.
- *
+ *
* <p>
* If the component is not attached to a UI through a component containment
* hierarchy, <code>null</code> is returned.
* </p>
- *
+ *
* @return the UI of the component or <code>null</code> if it is not
* attached to a UI
*/
@@ -581,7 +581,7 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
/**
* {@inheritDoc}
- *
+ *
* <p>
* Reimplementing the {@code attach()} method is useful for tasks that need
* to get a reference to the parent, window, or application object with the
@@ -590,18 +590,19 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
* so in such case, the methods will return {@code null}. For example, the
* following is invalid:
* </p>
- *
+ *
* <pre>
* public class AttachExample extends CustomComponent {
* public AttachExample() {
* // ERROR: We can't access the application object yet.
- * ClassResource r = new ClassResource(&quot;smiley.jpg&quot;, getApplication());
+ * ClassResource r = new ClassResource(&quot;smiley.jpg&quot;,
+ * getApplication());
* Embedded image = new Embedded(&quot;Image:&quot;, r);
* setCompositionRoot(image);
* }
* }
* </pre>
- *
+ *
* <p>
* Adding a component to an application triggers calling the
* {@link #attach()} method for the component. Correspondingly, removing a
@@ -610,18 +611,19 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
* application, the {@code attach()} is called immediately from
* {@link #setParent(Component)}.
* </p>
- *
+ *
* <pre>
* public class AttachExample extends CustomComponent {
* public AttachExample() {
* }
- *
+ *
* &#064;Override
* public void attach() {
* super.attach(); // Must call.
- *
+ *
* // Now we know who ultimately owns us.
- * ClassResource r = new ClassResource(&quot;smiley.jpg&quot;, getApplication());
+ * ClassResource r = new ClassResource(&quot;smiley.jpg&quot;,
+ * getApplication());
* Embedded image = new Embedded(&quot;Image:&quot;, r);
* setCompositionRoot(image);
* }
@@ -633,21 +635,21 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
/**
* Gets the locale of the component.
- *
+ *
* <p>
* If a component does not have a locale set, the locale of its parent is
* returned, and so on. Eventually, if no parent has locale set, the locale
* of the application is returned. If the application does not have a locale
* set, it is determined by <code>Locale.getDefault()</code>.
* </p>
- *
+ *
* <p>
* As the component must be attached before its locale can be acquired,
* using this method in the internationalization of component captions, etc.
* is generally not feasible. For such use case, we recommend using an
* otherwise acquired reference to the application locale.
* </p>
- *
+ *
* @return Locale of this component or {@code null} if the component and
* none of its parents has a locale set and the component is not yet
* attached to an application.
@@ -658,7 +660,7 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
* Adds an unique id for component that is used in the client-side for
* testing purposes. Keeping identifiers unique is the responsibility of the
* programmer.
- *
+ *
* @param id
* An alphanumeric id
*/
@@ -666,7 +668,7 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
/**
* Gets currently set debug identifier
- *
+ *
* @return current id, null if not set
*/
public String getId();
@@ -678,7 +680,7 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
* be used to briefly describe the state of the component to the user. The
* description string may contain certain XML tags:
* </p>
- *
+ *
* <p>
* <table border=1>
* <tr>
@@ -721,11 +723,11 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
* </tr>
* </table>
* </p>
- *
+ *
* <p>
* These tags may be nested.
* </p>
- *
+ *
* @return component's description <code>String</code>
*/
public String getDescription();
@@ -744,7 +746,7 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
* defaults.
* <p>
* This method must not modify the design.
- *
+ *
* @since 7.4
* @param design
* The element to obtain the state from
@@ -760,14 +762,14 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
* for ensuring that its children write their state to the design.
* <p>
* This method must not modify the component state.
- *
+ *
* @since 7.4
* @param design
* The element to write the component state to. Any previous
* attributes or child nodes are <i>not</i> cleared.
* @param designContext
* The DesignContext instance used for writing the design
- *
+ *
*/
public void writeDesign(Element design, DesignContext designContext);
@@ -775,13 +777,13 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
/**
* Superclass of all component originated events.
- *
+ *
* <p>
* Events are the basis of all user interaction handling in Vaadin. To
* handle events, you provide a listener object that receives the events of
* the particular event type.
* </p>
- *
+ *
* <pre>
* Button button = new Button(&quot;Click Me!&quot;);
* button.addListener(new Button.ClickListener() {
@@ -791,13 +793,13 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
* });
* layout.addComponent(button);
* </pre>
- *
+ *
* <p>
* Notice that while each of the event types have their corresponding
* listener types; the listener interfaces are not required to inherit the
* {@code Component.Listener} interface.
* </p>
- *
+ *
* @see Component.Listener
*/
@SuppressWarnings("serial")
@@ -805,7 +807,7 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
/**
* Constructs a new event with the specified source component.
- *
+ *
* @param source
* the source component of the event
*/
@@ -815,7 +817,7 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
/**
* Gets the component where the event occurred.
- *
+ *
* @return the source component of the event
*/
public Component getComponent() {
@@ -826,7 +828,7 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
/**
* Listener interface for receiving <code>Component.Event</code>s.
- *
+ *
* <p>
* Listener interfaces are the basis of all user interaction handling in
* Vaadin. You have or create a listener object that receives the events.
@@ -834,7 +836,7 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
* however, required to inherit the {@code Component.Listener} interface,
* and they rarely do so.
* </p>
- *
+ *
* <p>
* This generic listener interface is useful typically when you wish to
* handle events from different component types in a single listener method
@@ -842,76 +844,79 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
* listener class, you normally use the component specific listener class,
* such as {@link com.vaadin.ui.Button.ClickEvent}.
* </p>
- *
+ *
* <pre>
* class Listening extends CustomComponent implements Listener {
* Button ok; // Stored for determining the source of an event
- *
+ *
* Label status; // For displaying info about the event
- *
+ *
* public Listening() {
* VerticalLayout layout = new VerticalLayout();
- *
+ *
* // Some miscellaneous component
* TextField name = new TextField(&quot;Say it all here&quot;);
* name.addListener(this);
* name.setImmediate(true);
* layout.addComponent(name);
- *
+ *
* // Handle button clicks as generic events instead
* // of Button.ClickEvent events
* ok = new Button(&quot;OK&quot;);
* ok.addListener(this);
* layout.addComponent(ok);
- *
+ *
* // For displaying information about an event
* status = new Label(&quot;&quot;);
* layout.addComponent(status);
- *
+ *
* setCompositionRoot(layout);
* }
- *
+ *
* public void componentEvent(Event event) {
* // Act according to the source of the event
* if (event.getSource() == ok
* &amp;&amp; event.getClass() == Button.ClickEvent.class)
* getWindow().showNotification(&quot;Click!&quot;);
- *
+ *
* // Display source component and event class names
- * status.setValue(&quot;Event from &quot; + event.getSource().getClass().getName()
- * + &quot;: &quot; + event.getClass().getName());
+ * status.setValue(
+ * &quot;Event from &quot; + event.getSource().getClass().getName()
+ * + &quot;: &quot; + event.getClass().getName());
* }
* }
- *
+ *
* Listening listening = new Listening();
* layout.addComponent(listening);
* </pre>
- *
+ *
* @see Component#addListener(Listener)
*/
public interface Listener extends ConnectorEventListener {
/**
* Notifies the listener of a component event.
- *
+ *
* <p>
* As the event can typically come from one of many source components,
* you may need to differentiate between the event source by component
* reference, class, etc.
* </p>
- *
+ *
* <pre>
* public void componentEvent(Event event) {
* // Act according to the source of the event
- * if (event.getSource() == ok &amp;&amp; event.getClass() == Button.ClickEvent.class)
+ * if (event.getSource() == ok
+ * &amp;&amp; event.getClass() == Button.ClickEvent.class)
* getWindow().showNotification(&quot;Click!&quot;);
- *
+ *
* // Display source component and event class names
- * status.setValue(&quot;Event from &quot; + event.getSource().getClass().getName()
- * + &quot;: &quot; + event.getClass().getName());
+ * status.setValue(
+ * &quot;Event from &quot; + event.getSource().getClass().getName() + &quot;: &quot;
+ * + event.getClass().getName());
* }
* </pre>
- *
+ *
* @param event
* the event that has occurred.
*/
@@ -920,50 +925,51 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
/**
* Registers a new (generic) component event listener for the component.
- *
+ *
* <pre>
* class Listening extends CustomComponent implements Listener {
* // Stored for determining the source of an event
* Button ok;
- *
+ *
* Label status; // For displaying info about the event
- *
+ *
* public Listening() {
* VerticalLayout layout = new VerticalLayout();
- *
+ *
* // Some miscellaneous component
* TextField name = new TextField(&quot;Say it all here&quot;);
* name.addListener(this);
* name.setImmediate(true);
* layout.addComponent(name);
- *
+ *
* // Handle button clicks as generic events instead
* // of Button.ClickEvent events
* ok = new Button(&quot;OK&quot;);
* ok.addListener(this);
* layout.addComponent(ok);
- *
+ *
* // For displaying information about an event
* status = new Label(&quot;&quot;);
* layout.addComponent(status);
- *
+ *
* setCompositionRoot(layout);
* }
- *
+ *
* public void componentEvent(Event event) {
* // Act according to the source of the event
* if (event.getSource() == ok)
* getWindow().showNotification(&quot;Click!&quot;);
- *
- * status.setValue(&quot;Event from &quot; + event.getSource().getClass().getName()
- * + &quot;: &quot; + event.getClass().getName());
+ *
+ * status.setValue(
+ * &quot;Event from &quot; + event.getSource().getClass().getName()
+ * + &quot;: &quot; + event.getClass().getName());
* }
* }
- *
+ *
* Listening listening = new Listening();
* layout.addComponent(listening);
* </pre>
- *
+ *
* @param listener
* the new Listener to be registered.
* @see Component.Event
@@ -974,7 +980,7 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
/**
* Removes a previously registered component event listener from this
* component.
- *
+ *
* @param listener
* the listener to be removed.
* @see #addListener(Listener)
@@ -983,7 +989,7 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
/**
* Class of all component originated error events.
- *
+ *
* <p>
* The component error event is normally fired by
* {@link AbstractComponent#setComponentError(ErrorMessage)}. The component
@@ -998,7 +1004,7 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
/**
* Constructs a new event with a specified source component.
- *
+ *
* @param message
* the error message.
* @param component
@@ -1011,7 +1017,7 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
/**
* Gets the error message.
- *
+ *
* @return the error message.
*/
public ErrorMessage getErrorMessage() {
@@ -1023,7 +1029,7 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
* A sub-interface implemented by components that can obtain input focus.
* This includes all {@link Field} components as well as some other
* components, such as {@link Upload}.
- *
+ *
* <p>
* Focus can be set with {@link #focus()}. This interface does not provide
* an accessor that would allow finding out the currently focused component;
@@ -1031,33 +1037,33 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
* components through the {@link com.vaadin.event.FieldEvents.FocusListener}
* and {@link com.vaadin.event.FieldEvents.BlurListener} interfaces.
* </p>
- *
+ *
* @see FieldEvents
*/
public interface Focusable extends Component {
/**
* Sets the focus to this component.
- *
+ *
* <pre>
* Form loginBox = new Form();
* loginBox.setCaption(&quot;Login&quot;);
* layout.addComponent(loginBox);
- *
+ *
* // Create the first field which will be focused
* TextField username = new TextField(&quot;User name&quot;);
* loginBox.addField(&quot;username&quot;, username);
- *
+ *
* // Set focus to the user name
* username.focus();
- *
+ *
* TextField password = new TextField(&quot;Password&quot;);
* loginBox.addField(&quot;password&quot;, password);
- *
+ *
* Button login = new Button(&quot;Login&quot;);
* loginBox.getFooter().addComponent(login);
* </pre>
- *
+ *
* <p>
* Notice that this interface does not provide an accessor that would
* allow finding out the currently focused component. Focus information
@@ -1065,7 +1071,7 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
* through the {@link com.vaadin.event.FieldEvents.FocusListener} and
* {@link com.vaadin.event.FieldEvents.BlurListener} interfaces.
* </p>
- *
+ *
* @see com.vaadin.event.FieldEvents
* @see com.vaadin.event.FieldEvents.FocusEvent
* @see com.vaadin.event.FieldEvents.FocusListener
@@ -1076,7 +1082,7 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
/**
* Gets the <i>tabulator index</i> of the {@code Focusable} component.
- *
+ *
* @return tab index set for the {@code Focusable} component
* @see #setTabIndex(int)
*/
@@ -1088,54 +1094,54 @@ public interface Component extends ClientConnector, Sizeable, Serializable {
* fields are focused when the user presses the Tab key. Components with
* a defined tab index are focused sequentially first, and then the
* components with no tab index.
- *
+ *
* <pre>
* Form loginBox = new Form();
* loginBox.setCaption(&quot;Login&quot;);
* layout.addComponent(loginBox);
- *
+ *
* // Create the first field which will be focused
* TextField username = new TextField(&quot;User name&quot;);
* loginBox.addField(&quot;username&quot;, username);
- *
+ *
* // Set focus to the user name
* username.focus();
- *
+ *
* TextField password = new TextField(&quot;Password&quot;);
* loginBox.addField(&quot;password&quot;, password);
- *
+ *
* Button login = new Button(&quot;Login&quot;);
* loginBox.getFooter().addComponent(login);
- *
+ *
* // An additional component which natural focus order would
* // be after the button.
* CheckBox remember = new CheckBox(&quot;Remember me&quot;);
* loginBox.getFooter().addComponent(remember);
- *
+ *
* username.setTabIndex(1);
* password.setTabIndex(2);
* remember.setTabIndex(3); // Different than natural place
* login.setTabIndex(4);
* </pre>
- *
+ *
* <p>
* After all focusable user interface components are done, the browser
* can begin again from the component with the smallest tab index, or it
* can take the focus out of the page, for example, to the location bar.
* </p>
- *
+ *
* <p>
* If the tab index is not set (is set to zero), the default tab order
* is used. The order is somewhat browser-dependent, but generally
* follows the HTML structure of the page.
* </p>
- *
+ *
* <p>
* A negative value means that the component is completely removed from
* the tabulation order and can not be reached by pressing the Tab key
* at all.
* </p>
- *
+ *
* @param tabIndex
* the tab order of this component. Indexes usually start
* from 1. Zero means that default tab order should be used.
diff --git a/server/src/main/java/com/vaadin/ui/ComponentContainer.java b/server/src/main/java/com/vaadin/ui/ComponentContainer.java
index 2d5b4ffa9a..521bee3879 100644
--- a/server/src/main/java/com/vaadin/ui/ComponentContainer.java
+++ b/server/src/main/java/com/vaadin/ui/ComponentContainer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,16 +24,16 @@ import com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier;
* A special type of parent which allows the user to add and remove components
* to it. Typically does not have any restrictions on the number of children it
* can contain.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
-public interface ComponentContainer extends HasComponents,
- ComponentAttachDetachNotifier {
+public interface ComponentContainer
+ extends HasComponents, ComponentAttachDetachNotifier {
/**
* Adds the component into this container.
- *
+ *
* @param c
* the component to be added.
*/
@@ -41,7 +41,7 @@ public interface ComponentContainer extends HasComponents,
/**
* Adds the components in the given order to this component container.
- *
+ *
* @param components
* The components to add.
*/
@@ -49,7 +49,7 @@ public interface ComponentContainer extends HasComponents,
/**
* Removes the component from this container.
- *
+ *
* @param c
* the component to be removed.
*/
@@ -63,7 +63,7 @@ public interface ComponentContainer extends HasComponents,
/**
* Replaces the component in the container with another one without changing
* position.
- *
+ *
* <p>
* This method replaces component with another one is such way that the new
* component overtakes the position of the old component. If the old
@@ -72,21 +72,22 @@ public interface ComponentContainer extends HasComponents,
* positions are swapped. Component attach and detach events should be taken
* care as with add and remove.
* </p>
- *
+ *
* @param oldComponent
* the old component that will be replaced.
* @param newComponent
* the new component to be replaced.
*/
- public void replaceComponent(Component oldComponent, Component newComponent);
+ public void replaceComponent(Component oldComponent,
+ Component newComponent);
/**
* Gets an iterator to the collection of contained components. Using this
* iterator it is possible to step through all components contained in this
* container.
- *
+ *
* @return the component iterator.
- *
+ *
* @deprecated As of 7.0, use {@link #iterator()} instead.
*/
@Deprecated
@@ -95,7 +96,7 @@ public interface ComponentContainer extends HasComponents,
/**
* Gets the number of children this {@link ComponentContainer} has. This
* must be symmetric with what {@link #getComponentIterator()} returns.
- *
+ *
* @return The number of child components this container has.
* @since 7.0.0
*/
@@ -104,7 +105,7 @@ public interface ComponentContainer extends HasComponents,
/**
* Moves all components from an another container into this container. The
* components are removed from <code>source</code>.
- *
+ *
* @param source
* the container which contains the components that are to be
* moved to this container.
diff --git a/server/src/main/java/com/vaadin/ui/ConnectorTracker.java b/server/src/main/java/com/vaadin/ui/ConnectorTracker.java
index 159bd09c0d..3cf03a134d 100644
--- a/server/src/main/java/com/vaadin/ui/ConnectorTracker.java
+++ b/server/src/main/java/com/vaadin/ui/ConnectorTracker.java
@@ -140,9 +140,7 @@ public class ConnectorTracker implements Serializable {
connectorIdToConnector.put(connectorId, connector);
uninitializedConnectors.add(connector);
if (getLogger().isLoggable(Level.FINE)) {
- getLogger().log(
- Level.FINE,
- "Registered {0} ({1})",
+ getLogger().log(Level.FINE, "Registered {0} ({1})",
new Object[] { connector.getClass().getSimpleName(),
connectorId });
}
@@ -150,12 +148,10 @@ public class ConnectorTracker implements Serializable {
throw new RuntimeException("A connector with id " + connectorId
+ " is already registered!");
} else if (!wasUnregistered) {
- getLogger()
- .log(Level.WARNING,
- "An already registered connector was registered again: {0} ({1})",
- new Object[] {
- connector.getClass().getSimpleName(),
- connectorId });
+ getLogger().log(Level.WARNING,
+ "An already registered connector was registered again: {0} ({1})",
+ new Object[] { connector.getClass().getSimpleName(),
+ connectorId });
}
dirtyConnectors.add(connector);
}
@@ -174,8 +170,7 @@ public class ConnectorTracker implements Serializable {
public void unregisterConnector(ClientConnector connector) {
String connectorId = connector.getConnectorId();
if (!connectorIdToConnector.containsKey(connectorId)) {
- getLogger().log(
- Level.WARNING,
+ getLogger().log(Level.WARNING,
"Tried to unregister {0} ({1}) which is not registered",
new Object[] { connector.getClass().getSimpleName(),
connectorId });
@@ -199,15 +194,12 @@ public class ConnectorTracker implements Serializable {
dirtyConnectors.remove(connector);
if (unregisteredConnectors.add(connector)) {
if (getLogger().isLoggable(Level.FINE)) {
- getLogger().log(
- Level.FINE,
- "Unregistered {0} ({1})",
+ getLogger().log(Level.FINE, "Unregistered {0} ({1})",
new Object[] { connector.getClass().getSimpleName(),
connectorId });
}
} else {
- getLogger().log(
- Level.WARNING,
+ getLogger().log(Level.WARNING,
"Unregistered {0} ({1}) that was already unregistered.",
new Object[] { connector.getClass().getSimpleName(),
connectorId });
@@ -226,7 +218,8 @@ public class ConnectorTracker implements Serializable {
* already know anything about the connector.
*/
public boolean isClientSideInitialized(ClientConnector connector) {
- assert connectorIdToConnector.get(connector.getConnectorId()) == connector : "Connector should be registered with this ConnectorTracker";
+ assert connectorIdToConnector.get(connector
+ .getConnectorId()) == connector : "Connector should be registered with this ConnectorTracker";
return !uninitializedConnectors.contains(connector);
}
@@ -313,10 +306,9 @@ public class ConnectorTracker implements Serializable {
// This code should never be called as cleanup should take place
// in detach()
- getLogger()
- .log(Level.WARNING,
- "cleanConnectorMap unregistered connector {0}. This should have been done when the connector was detached.",
- getConnectorAndParentInfo(connector));
+ getLogger().log(Level.WARNING,
+ "cleanConnectorMap unregistered connector {0}. This should have been done when the connector was detached.",
+ getConnectorAndParentInfo(connector));
if (globalResourceHandler != null) {
globalResourceHandler.unregisterConnector(connector);
@@ -331,16 +323,13 @@ public class ConnectorTracker implements Serializable {
diffStates.remove(connector);
assert isRemovalSentToClient(connector) : "Connector "
- + connector
- + " (id = "
- + connector.getConnectorId()
+ + connector + " (id = " + connector.getConnectorId()
+ ") is no longer visible to the client, but no corresponding hierarchy change is being sent.";
if (getLogger().isLoggable(Level.FINE)) {
- getLogger()
- .log(Level.FINE,
- "cleanConnectorMap removed state for {0} as it is not visible",
- getConnectorAndParentInfo(connector));
+ getLogger().log(Level.FINE,
+ "cleanConnectorMap removed state for {0} as it is not visible",
+ getConnectorAndParentInfo(connector));
}
}
}
@@ -361,7 +350,8 @@ public class ConnectorTracker implements Serializable {
if (hierarchyInfoObj instanceof JsonObject) {
JsonObject hierachyInfo = (JsonObject) hierarchyInfoObj;
- ClientConnector firstVisibleParent = findFirstVisibleParent(connector);
+ ClientConnector firstVisibleParent = findFirstVisibleParent(
+ connector);
if (firstVisibleParent == null) {
// Connector is detached, not our business
return true;
@@ -385,22 +375,20 @@ public class ConnectorTracker implements Serializable {
.getAttribute(attributeName);
if (stateUpdateConnectorsObj instanceof Set<?>) {
Set<?> stateUpdateConnectors = (Set<?>) stateUpdateConnectorsObj;
- if (!stateUpdateConnectors.contains(firstVisibleParent
- .getConnectorId())) {
+ if (!stateUpdateConnectors
+ .contains(firstVisibleParent.getConnectorId())) {
// Not the optimization case if the parent is not marked
// as dirty
return false;
}
} else {
- getLogger().warning(
- "Request attribute " + attributeName
- + " is not a Set");
+ getLogger().warning("Request attribute " + attributeName
+ + " is not a Set");
}
}
} else {
- getLogger().warning(
- "Request attribute " + attributeName
- + " is not a JsonObject");
+ getLogger().warning("Request attribute " + attributeName
+ + " is not a JsonObject");
}
return true;
@@ -466,25 +454,21 @@ public class ConnectorTracker implements Serializable {
if (!connector.equals(child.getParent())) {
noErrors = false;
- getLogger()
- .log(Level.WARNING,
- "{0} claims that {1} is its child, but the child claims {2} is its parent.",
- new Object[] {
- getConnectorString(connector),
- getConnectorString(child),
- getConnectorString(child
- .getParent()) });
+ getLogger().log(Level.WARNING,
+ "{0} claims that {1} is its child, but the child claims {2} is its parent.",
+ new Object[] { getConnectorString(connector),
+ getConnectorString(child),
+ getConnectorString(child.getParent()) });
}
}
}
for (ClientConnector dangling : danglingConnectors) {
noErrors = false;
- getLogger()
- .log(Level.WARNING,
- "{0} claims that {1} is its parent, but the parent does not acknowledge the parenthood.",
- new Object[] { getConnectorString(dangling),
- getConnectorString(dangling.getParent()) });
+ getLogger().log(Level.WARNING,
+ "{0} claims that {1} is its parent, but the parent does not acknowledge the parenthood.",
+ new Object[] { getConnectorString(dangling),
+ getConnectorString(dangling.getParent()) });
}
return noErrors;
@@ -717,7 +701,8 @@ public class ConnectorTracker implements Serializable {
}
/* Special serialization to JsonObjects which are not serializable */
- private void writeObject(java.io.ObjectOutputStream out) throws IOException {
+ private void writeObject(java.io.ObjectOutputStream out)
+ throws IOException {
out.defaultWriteObject();
// Convert JsonObjects in diff state to String representation as
// JsonObject is not serializable
@@ -730,8 +715,8 @@ public class ConnectorTracker implements Serializable {
}
/* Special serialization to JsonObjects which are not serializable */
- private void readObject(java.io.ObjectInputStream in) throws IOException,
- ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in)
+ throws IOException, ClassNotFoundException {
in.defaultReadObject();
// Read String versions of JsonObjects and parse into JsonObjects as
@@ -930,11 +915,11 @@ public class ConnectorTracker implements Serializable {
* Maintains the bookkeeping connector removal and concurrency by removing
* entries that have become too old.
* <p>
- * <em>It is important to run this call for each transmission from the client</em>
- * , otherwise the bookkeeping gets out of date and the results form
- * {@link #connectorWasPresentAsRequestWasSent(String, long)} will become
- * invalid (that is, even though the client knew the component was removed,
- * the aforementioned method would start claiming otherwise).
+ * <em>It is important to run this call for each transmission from the
+ * client</em> , otherwise the bookkeeping gets out of date and the results
+ * form {@link #connectorWasPresentAsRequestWasSent(String, long)} will
+ * become invalid (that is, even though the client knew the component was
+ * removed, the aforementioned method would start claiming otherwise).
* <p>
* Entries that both client and server agree upon are removed. Since
* argument is the last sync id that the client has seen from the server, we
@@ -949,7 +934,8 @@ public class ConnectorTracker implements Serializable {
* the sync id the client has most recently received from the
* server.
*/
- public void cleanConcurrentlyRemovedConnectorIds(int lastSyncIdSeenByClient) {
+ public void cleanConcurrentlyRemovedConnectorIds(
+ int lastSyncIdSeenByClient) {
if (lastSyncIdSeenByClient == -1) {
// Sync id checking is not in use, so we should just clear the
// entire map to avoid leaking memory
diff --git a/server/src/main/java/com/vaadin/ui/CssLayout.java b/server/src/main/java/com/vaadin/ui/CssLayout.java
index dbedfa53ff..21c1875322 100644
--- a/server/src/main/java/com/vaadin/ui/CssLayout.java
+++ b/server/src/main/java/com/vaadin/ui/CssLayout.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -54,7 +54,7 @@ import com.vaadin.ui.declarative.DesignContext;
* <p>
* By extending CssLayout one can also inject some css rules straight to child
* components using {@link #getCss(Component)}.
- *
+ *
* <p>
* (*) Relative sizes (set from server side) are treated bit differently than in
* other layouts in Vaadin. In cssLayout the size is calculated relatively to
@@ -67,9 +67,9 @@ import com.vaadin.ui.declarative.DesignContext;
* wants to set component sizes with CSS, component must have undefined size on
* server side (which is not the default for all components) and the size must
* be defined with class styles - not by directly injecting width and height.
- *
+ *
* @since 6.1 brought in from "FastLayouts" incubator project
- *
+ *
*/
public class CssLayout extends AbstractLayout implements LayoutClickNotifier {
@@ -78,8 +78,8 @@ public class CssLayout extends AbstractLayout implements LayoutClickNotifier {
@Override
public void layoutClick(MouseEventDetails mouseDetails,
Connector clickedConnector) {
- fireEvent(LayoutClickEvent.createEvent(CssLayout.this,
- mouseDetails, clickedConnector));
+ fireEvent(LayoutClickEvent.createEvent(CssLayout.this, mouseDetails,
+ clickedConnector));
}
};
/**
@@ -96,9 +96,9 @@ public class CssLayout extends AbstractLayout implements LayoutClickNotifier {
/**
* Constructs a CssLayout with the given components in the given order.
- *
+ *
* @see #addComponents(Component...)
- *
+ *
* @param children
* Components to add to the container.
*/
@@ -110,7 +110,7 @@ public class CssLayout extends AbstractLayout implements LayoutClickNotifier {
/**
* Add a component into this container. The component is added to the right
* or below the previous component.
- *
+ *
* @param c
* the component to be added.
*/
@@ -130,7 +130,7 @@ public class CssLayout extends AbstractLayout implements LayoutClickNotifier {
/**
* Adds a component into this container. The component is added to the left
* or on top of the other components.
- *
+ *
* @param c
* the component to be added.
*/
@@ -151,7 +151,7 @@ public class CssLayout extends AbstractLayout implements LayoutClickNotifier {
/**
* Adds a component into indexed position in this container.
- *
+ *
* @param c
* the component to be added.
* @param index
@@ -179,7 +179,7 @@ public class CssLayout extends AbstractLayout implements LayoutClickNotifier {
/**
* Removes the component from this container.
- *
+ *
* @param c
* the component to be removed.
*/
@@ -192,7 +192,7 @@ public class CssLayout extends AbstractLayout implements LayoutClickNotifier {
/**
* Gets the component container iterator for going trough all the components
* in the container.
- *
+ *
* @return the Iterator of the components inside the container.
*/
@Override
@@ -203,7 +203,7 @@ public class CssLayout extends AbstractLayout implements LayoutClickNotifier {
/**
* Gets the number of contained components. Consistent with the iterator
* returned by {@link #getComponentIterator()}.
- *
+ *
* @return the number of contained components
*/
@Override
@@ -238,17 +238,17 @@ public class CssLayout extends AbstractLayout implements LayoutClickNotifier {
/**
* Returns styles to be applied to given component. Override this method to
* inject custom style rules to components.
- *
+ *
* <p>
* Note that styles are injected over previous styles before actual child
* rendering. Previous styles are not cleared, but overridden.
- *
+ *
* <p>
* Note that one most often achieves better code style, by separating
* styling to theme (with custom theme and {@link #addStyleName(String)}.
* With own custom styles it is also very easy to break browser
* compatibility.
- *
+ *
* @param c
* the component
* @return css rules to be applied to component
@@ -259,13 +259,15 @@ public class CssLayout extends AbstractLayout implements LayoutClickNotifier {
/* Documented in superclass */
@Override
- public void replaceComponent(Component oldComponent, Component newComponent) {
+ public void replaceComponent(Component oldComponent,
+ Component newComponent) {
// Gets the locations
int oldLocation = -1;
int newLocation = -1;
int location = 0;
- for (final Iterator<Component> i = components.iterator(); i.hasNext();) {
+ for (final Iterator<Component> i = components.iterator(); i
+ .hasNext();) {
final Component component = i.next();
if (component == oldComponent) {
@@ -335,7 +337,7 @@ public class CssLayout extends AbstractLayout implements LayoutClickNotifier {
/**
* Returns the index of the given component.
- *
+ *
* @param component
* The component to look up.
* @return The index of the component or -1 if the component is not a child.
@@ -346,7 +348,7 @@ public class CssLayout extends AbstractLayout implements LayoutClickNotifier {
/**
* Returns the component at the given position.
- *
+ *
* @param index
* The position of the component.
* @return The component at the given index.
@@ -359,7 +361,7 @@ public class CssLayout extends AbstractLayout implements LayoutClickNotifier {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.AbstractComponent#readDesign(org.jsoup.nodes .Element,
* com.vaadin.ui.declarative.DesignContext)
*/
@@ -376,7 +378,7 @@ public class CssLayout extends AbstractLayout implements LayoutClickNotifier {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.AbstractComponent#writeDesign(org.jsoup.nodes.Element
* , com.vaadin.ui.declarative.DesignContext)
*/
diff --git a/server/src/main/java/com/vaadin/ui/CustomComponent.java b/server/src/main/java/com/vaadin/ui/CustomComponent.java
index 55f9d7db03..5275169cd3 100644
--- a/server/src/main/java/com/vaadin/ui/CustomComponent.java
+++ b/server/src/main/java/com/vaadin/ui/CustomComponent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import java.util.Iterator;
* Custom component provides a simple implementation of the {@link Component}
* interface to allow creating new UI components by composition of existing
* server-side components.
- *
+ *
* <p>
* The component is used by inheriting the CustomComponent class and setting the
* composition root component. The composition root must be set with
@@ -31,29 +31,30 @@ import java.util.Iterator;
* such as by adding it to a layout, so it is preferable to set it in the
* constructor.
* </p>
- *
+ *
* <p>
* The composition root itself can contain more components. The advantage of
* wrapping it in a CustomComponent is that its details, such as interfaces, are
* hidden from the users of the component, thereby contributing to information
* hiding.
* </p>
- *
+ *
* <p>
* The CustomComponent does not display the caption of the composition root, so
* if you want to have it shown in the layout where the custom component is
* contained, you need to set it as caption of the CustomComponent.
* </p>
- *
+ *
* <p>
* The component expands horizontally and has undefined height by default.
* </p>
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@SuppressWarnings("serial")
-public class CustomComponent extends AbstractComponent implements HasComponents {
+public class CustomComponent extends AbstractComponent
+ implements HasComponents {
/**
* The root component implementing the custom component.
@@ -62,7 +63,7 @@ public class CustomComponent extends AbstractComponent implements HasComponents
/**
* Constructs a new custom component.
- *
+ *
* <p>
* Note that you must set the composition root before the component can be
* used, preferably in the constructor.
@@ -75,7 +76,7 @@ public class CustomComponent extends AbstractComponent implements HasComponents
/**
* Constructs a new custom component.
- *
+ *
* @param compositionRoot
* the root of the composition component tree. It must not be
* null.
@@ -87,7 +88,7 @@ public class CustomComponent extends AbstractComponent implements HasComponents
/**
* Returns the composition root.
- *
+ *
* @return the Component Composition root.
*/
protected Component getCompositionRoot() {
@@ -96,12 +97,12 @@ public class CustomComponent extends AbstractComponent implements HasComponents
/**
* Sets the composition root for the component.
- *
+ *
* <p>
* You must set the composition root to a non-null value before the
* component can be used. You can change it later.
* </p>
- *
+ *
* @param compositionRoot
* the root of the composition component tree.
*/
@@ -139,7 +140,7 @@ public class CustomComponent extends AbstractComponent implements HasComponents
/**
* Gets the number of contained components. Consistent with the iterator
* returned by {@link #getComponentIterator()}.
- *
+ *
* @return the number of contained components (zero or one)
*/
public int getComponentCount() {
diff --git a/server/src/main/java/com/vaadin/ui/CustomField.java b/server/src/main/java/com/vaadin/ui/CustomField.java
index 12f00ac23f..df8f9180c4 100644
--- a/server/src/main/java/com/vaadin/ui/CustomField.java
+++ b/server/src/main/java/com/vaadin/ui/CustomField.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,26 +25,26 @@ import com.vaadin.data.Property;
* A {@link Field} whose UI content can be constructed by the user, enabling the
* creation of e.g. form fields by composing Vaadin components. Customization of
* both the visual presentation and the logic of the field is possible.
- *
+ *
* Subclasses must implement {@link #getType()} and {@link #initContent()}.
- *
+ *
* Most custom fields can simply compose a user interface that calls the methods
* {@link #setInternalValue(Object)} and {@link #getInternalValue()} when
* necessary.
- *
+ *
* It is also possible to override {@link #validate()},
* {@link #setInternalValue(Object)}, {@link #commit()},
* {@link #setPropertyDataSource(Property)}, {@link #isEmpty()} and other logic
* of the field. Methods overriding {@link #setInternalValue(Object)} should
* also call the corresponding superclass method.
- *
+ *
* @param <T>
* field value type
- *
+ *
* @since 7.0
*/
-public abstract class CustomField<T> extends AbstractField<T> implements
- HasComponents {
+public abstract class CustomField<T> extends AbstractField<T>
+ implements HasComponents {
/**
* The root component implementing the custom component.
@@ -53,7 +53,7 @@ public abstract class CustomField<T> extends AbstractField<T> implements
/**
* Constructs a new custom field.
- *
+ *
* <p>
* The component is implemented by wrapping the methods of the composition
* root component given as parameter. The composition root must be set
@@ -68,7 +68,7 @@ public abstract class CustomField<T> extends AbstractField<T> implements
/**
* Constructs the content and notifies it that the {@link CustomField} is
* attached to a window.
- *
+ *
* @see com.vaadin.ui.Component#attach()
*/
@Override
@@ -84,7 +84,7 @@ public abstract class CustomField<T> extends AbstractField<T> implements
/**
* Returns the content (UI) of the custom component.
- *
+ *
* @return Component
*/
protected Component getContent() {
@@ -98,11 +98,11 @@ public abstract class CustomField<T> extends AbstractField<T> implements
/**
* Create the content component or layout for the field. Subclasses of
* {@link CustomField} should implement this method.
- *
+ *
* Note that this method is called when the CustomField is attached to a
* layout or when {@link #getContent()} is called explicitly for the first
* time. It is only called once for a {@link CustomField}.
- *
+ *
* @return {@link Component} representing the UI of the CustomField
*/
protected abstract Component initContent();
@@ -125,8 +125,8 @@ public abstract class CustomField<T> extends AbstractField<T> implements
// ComponentContainer methods
- private class ComponentIterator implements Iterator<Component>,
- Serializable {
+ private class ComponentIterator
+ implements Iterator<Component>, Serializable {
boolean first = (root != null);
@Override
diff --git a/server/src/main/java/com/vaadin/ui/CustomLayout.java b/server/src/main/java/com/vaadin/ui/CustomLayout.java
index d64f70e95e..2095d6628d 100644
--- a/server/src/main/java/com/vaadin/ui/CustomLayout.java
+++ b/server/src/main/java/com/vaadin/ui/CustomLayout.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -42,7 +42,7 @@ import com.vaadin.ui.declarative.DesignContext;
* adapter and theme are responsible for rendering the layout with a given style
* by placing the items in the defined locations.
* </p>
- *
+ *
* <p>
* The placement of the locations is not fixed - different themes can define the
* locations in a way that is suitable for them. One typical example would be to
@@ -50,12 +50,12 @@ import com.vaadin.ui.declarative.DesignContext;
* would define locations for "menu", "body", and "title", for example. The
* layout would then be implemented as an HTML template for each theme.
* </p>
- *
+ *
* <p>
* The default theme handles the styles that are not defined by drawing the
* subcomponents just as in OrderedLayout.
* </p>
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -74,7 +74,7 @@ public class CustomLayout extends AbstractLayout implements LegacyComponent {
* for setting the appropriate fields. Either
* {@link #setTemplateName(String)}, that makes layout fetch the template
* from theme, or {@link #setTemplateContents(String)}.
- *
+ *
* @since 7.5.0
*/
public CustomLayout() {
@@ -83,7 +83,7 @@ public class CustomLayout extends AbstractLayout implements LegacyComponent {
/**
* Constructs a custom layout with the template given in the stream.
- *
+ *
* @param templateStream
* Stream containing template data. Must be using UTF-8 encoding.
* To use a String as a template use for instance new
@@ -108,8 +108,8 @@ public class CustomLayout extends AbstractLayout implements LegacyComponent {
protected void initTemplateContentsFromInputStream(
InputStream templateStream) throws IOException {
- BufferedReader reader = new BufferedReader(new InputStreamReader(
- templateStream, "UTF-8"));
+ BufferedReader reader = new BufferedReader(
+ new InputStreamReader(templateStream, "UTF-8"));
StringBuilder builder = new StringBuilder(BUFFER_SIZE);
try {
char[] cbuf = new char[BUFFER_SIZE];
@@ -137,7 +137,7 @@ public class CustomLayout extends AbstractLayout implements LegacyComponent {
/**
* Adds the component into this container to given location. If the location
* is already populated, the old component is removed.
- *
+ *
* @param c
* the component to be added.
* @param location
@@ -159,7 +159,7 @@ public class CustomLayout extends AbstractLayout implements LegacyComponent {
* specifying the location (empty string is then used as location). Only one
* component can be added to the default "" location and adding more
* components into that location overwrites the old components.
- *
+ *
* @param c
* the component to be added.
*/
@@ -170,7 +170,7 @@ public class CustomLayout extends AbstractLayout implements LegacyComponent {
/**
* Removes the component from this container.
- *
+ *
* @param c
* the component to be removed.
*/
@@ -186,7 +186,7 @@ public class CustomLayout extends AbstractLayout implements LegacyComponent {
/**
* Removes the component from this container from given location.
- *
+ *
* @param location
* the Location identifier of the component.
*/
@@ -197,7 +197,7 @@ public class CustomLayout extends AbstractLayout implements LegacyComponent {
/**
* Gets the component container iterator for going trough all the components
* in the container.
- *
+ *
* @return the Iterator of the components inside the container.
*/
@Override
@@ -208,7 +208,7 @@ public class CustomLayout extends AbstractLayout implements LegacyComponent {
/**
* Gets the number of contained components. Consistent with the iterator
* returned by {@link #getComponentIterator()}.
- *
+ *
* @return the number of contained components
*/
@Override
@@ -218,7 +218,7 @@ public class CustomLayout extends AbstractLayout implements LegacyComponent {
/**
* Gets the child-component by its location.
- *
+ *
* @param location
* the name of the location where the requested component
* resides.
@@ -230,12 +230,14 @@ public class CustomLayout extends AbstractLayout implements LegacyComponent {
/* Documented in superclass */
@Override
- public void replaceComponent(Component oldComponent, Component newComponent) {
+ public void replaceComponent(Component oldComponent,
+ Component newComponent) {
// Gets the locations
String oldLocation = null;
String newLocation = null;
- for (final Iterator<String> i = slots.keySet().iterator(); i.hasNext();) {
+ for (final Iterator<String> i = slots.keySet().iterator(); i
+ .hasNext();) {
final String location = i.next();
final Component component = slots.get(location);
if (component == oldComponent) {
@@ -271,11 +273,11 @@ public class CustomLayout extends AbstractLayout implements LegacyComponent {
/**
* Set the name of the template used to draw custom layout.
- *
+ *
* With GWT-adapter, the template with name 'templatename' is loaded from
* VAADIN/themes/themename/layouts/templatename.html. If the theme has not
* been set (with Application.setTheme()), themename is 'default'.
- *
+ *
* @param templateName
*/
public void setTemplateName(String templateName) {
@@ -285,7 +287,7 @@ public class CustomLayout extends AbstractLayout implements LegacyComponent {
/**
* Set the contents of the template used to draw the custom layout.
- *
+ *
* @param templateContents
*/
public void setTemplateContents(String templateContents) {
diff --git a/server/src/main/java/com/vaadin/ui/DateField.java b/server/src/main/java/com/vaadin/ui/DateField.java
index 82bd10178a..4e005a5c3f 100644
--- a/server/src/main/java/com/vaadin/ui/DateField.java
+++ b/server/src/main/java/com/vaadin/ui/DateField.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -60,7 +60,7 @@ import com.vaadin.ui.declarative.DesignContext;
* {@link com.vaadin.ui.AbstractField#setWriteThrough(boolean)}must be called to
* enable buffering.
* </p>
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -70,7 +70,7 @@ public class DateField extends AbstractField<Date> implements
/**
* Resolution identifier: seconds.
- *
+ *
* @deprecated As of 7.0, use {@link Resolution#SECOND}
*/
@Deprecated
@@ -78,7 +78,7 @@ public class DateField extends AbstractField<Date> implements
/**
* Resolution identifier: minutes.
- *
+ *
* @deprecated As of 7.0, use {@link Resolution#MINUTE}
*/
@Deprecated
@@ -86,7 +86,7 @@ public class DateField extends AbstractField<Date> implements
/**
* Resolution identifier: hours.
- *
+ *
* @deprecated As of 7.0, use {@link Resolution#HOUR}
*/
@Deprecated
@@ -94,7 +94,7 @@ public class DateField extends AbstractField<Date> implements
/**
* Resolution identifier: days.
- *
+ *
* @deprecated As of 7.0, use {@link Resolution#DAY}
*/
@Deprecated
@@ -102,7 +102,7 @@ public class DateField extends AbstractField<Date> implements
/**
* Resolution identifier: months.
- *
+ *
* @deprecated As of 7.0, use {@link Resolution#MONTH}
*/
@Deprecated
@@ -110,7 +110,7 @@ public class DateField extends AbstractField<Date> implements
/**
* Resolution identifier: years.
- *
+ *
* @deprecated As of 7.0, use {@link Resolution#YEAR}
*/
@Deprecated
@@ -184,7 +184,7 @@ public class DateField extends AbstractField<Date> implements
/**
* Constructs an empty <code>DateField</code> with caption.
- *
+ *
* @param caption
* the caption of the datefield.
*/
@@ -195,7 +195,7 @@ public class DateField extends AbstractField<Date> implements
/**
* Constructs a new <code>DateField</code> that's bound to the specified
* <code>Property</code> and has the given caption <code>String</code>.
- *
+ *
* @param caption
* the caption <code>String</code> for the editor.
* @param dataSource
@@ -209,15 +209,15 @@ public class DateField extends AbstractField<Date> implements
/**
* Constructs a new <code>DateField</code> that's bound to the specified
* <code>Property</code> and has no caption.
- *
+ *
* @param dataSource
* the Property to be edited with this editor.
*/
public DateField(Property dataSource) throws IllegalArgumentException {
if (!Date.class.isAssignableFrom(dataSource.getType())) {
- throw new IllegalArgumentException("Can't use "
- + dataSource.getType().getName()
- + " typed property as datasource");
+ throw new IllegalArgumentException(
+ "Can't use " + dataSource.getType().getName()
+ + " typed property as datasource");
}
setPropertyDataSource(dataSource);
@@ -229,7 +229,7 @@ public class DateField extends AbstractField<Date> implements
* to a Property unless
* {@link com.vaadin.data.Property.Viewer#setPropertyDataSource(Property)}
* is called to bind it.
- *
+ *
* @param caption
* the caption <code>String</code> for the editor.
* @param value
@@ -311,7 +311,7 @@ public class DateField extends AbstractField<Date> implements
* date (taking the resolution into account), the component will not
* validate. If <code>startDate</code> is set to <code>null</code>, any
* value before <code>endDate</code> will be accepted by the range
- *
+ *
* @param startDate
* - the allowed range's start date
*/
@@ -324,14 +324,14 @@ public class DateField extends AbstractField<Date> implements
// Create a defensive copy against issues when using java.sql.Date (and
// also against mutable Date).
- getState().rangeStart = startDate != null ? new Date(
- startDate.getTime()) : null;
+ getState().rangeStart = startDate != null
+ ? new Date(startDate.getTime()) : null;
updateRangeValidator();
}
/**
* Sets the current error message if the range validation fails.
- *
+ *
* @param dateOutOfRangeMessage
* - Localizable message which is shown when value (the date) is
* set outside allowed range
@@ -347,7 +347,7 @@ public class DateField extends AbstractField<Date> implements
* to YEAR, any date in year n will be accepted. Resolutions lower than DAY
* will be interpreted on a DAY level. That is, everything below DATE is
* cleared
- *
+ *
* @param forResolution
* - the range conforms to the resolution
* @return
@@ -386,7 +386,7 @@ public class DateField extends AbstractField<Date> implements
* if <code>rangeStart</code> is set to one millisecond before year n and
* resolution is set to YEAR, any date in year n - 1 will be accepted.
* Lowest supported resolution is DAY.
- *
+ *
* @param forResolution
* - the range conforms to the resolution
* @return
@@ -431,7 +431,7 @@ public class DateField extends AbstractField<Date> implements
* date (taking the resolution into account), the component will not
* validate. If <code>endDate</code> is set to <code>null</code>, any value
* after <code>startDate</code> will be accepted by the range.
- *
+ *
* @param endDate
* - the allowed range's end date (inclusive, based on the
* current resolution)
@@ -452,9 +452,9 @@ public class DateField extends AbstractField<Date> implements
/**
* Returns the precise rangeStart used.
- *
+ *
* @param startDate
- *
+ *
*/
public Date getRangeStart() {
return getState(false).rangeStart;
@@ -462,7 +462,7 @@ public class DateField extends AbstractField<Date> implements
/**
* Returns the precise rangeEnd used.
- *
+ *
* @param startDate
*/
public Date getRangeEnd() {
@@ -477,15 +477,12 @@ public class DateField extends AbstractField<Date> implements
@Override
public void changeVariables(Object source, Map<String, Object> variables) {
- if (!isReadOnly()
- && (variables.containsKey("year")
- || variables.containsKey("month")
- || variables.containsKey("day")
- || variables.containsKey("hour")
- || variables.containsKey("min")
- || variables.containsKey("sec")
- || variables.containsKey("msec") || variables
- .containsKey("dateString"))) {
+ if (!isReadOnly() && (variables.containsKey("year")
+ || variables.containsKey("month")
+ || variables.containsKey("day") || variables.containsKey("hour")
+ || variables.containsKey("min") || variables.containsKey("sec")
+ || variables.containsKey("msec")
+ || variables.containsKey("dateString"))) {
// Old and new dates
final Date oldDate = getValue();
@@ -543,7 +540,8 @@ public class DateField extends AbstractField<Date> implements
newDate = cal.getTime();
}
- if (newDate == null && dateString != null && !"".equals(dateString)) {
+ if (newDate == null && dateString != null
+ && !"".equals(dateString)) {
try {
Date parsedDate = handleUnparsableDateString(dateString);
setValue(parsedDate, true);
@@ -606,7 +604,7 @@ public class DateField extends AbstractField<Date> implements
* also checks the parsingSucceeded flag, we must also
* notify the form (if this is used in one) that the
* validity of this field has changed.
- *
+ *
* Normally fields validity doesn't change without value
* change and form depends on this implementation detail.
*/
@@ -643,7 +641,8 @@ public class DateField extends AbstractField<Date> implements
// If the user entered an invalid value in the date field
// getInternalValue() returns null.
// If the datasource also contains null, then
- // updateValueFromDataSource() will then not clear the internal state
+ // updateValueFromDataSource() will then not clear the internal
+ // state
// and error indicators (ticket #8069).
setInternalValue(null);
} else {
@@ -665,13 +664,13 @@ public class DateField extends AbstractField<Date> implements
/**
* This method is called to handle a non-empty date string from the client
* if the client could not parse it as a Date.
- *
+ *
* By default, a Converter.ConversionException is thrown, and the current
* value is not modified.
- *
+ *
* This can be overridden to handle conversions, to return null (equivalent
* to empty input), to throw an exception or to fire an event.
- *
+ *
* @param dateString
* @return parsed Date
* @throws Converter.ConversionException
@@ -696,7 +695,7 @@ public class DateField extends AbstractField<Date> implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.AbstractField#setValue(java.lang.Object, boolean)
*/
@Override
@@ -721,7 +720,7 @@ public class DateField extends AbstractField<Date> implements
* datefields validity may change although the logical value does
* not change. This is an issue for Form which expects that validity
* of Fields cannot change unless actual value changes.
- *
+ *
* So we check if this field is inside a form and the form has
* registered this as a field. In this case we repaint the form.
* Without this hacky solution the form might not be able to clean
@@ -790,7 +789,7 @@ public class DateField extends AbstractField<Date> implements
/**
* Gets the resolution.
- *
+ *
* @return int
*/
public Resolution getResolution() {
@@ -799,9 +798,9 @@ public class DateField extends AbstractField<Date> implements
/**
* Sets the resolution of the DateField.
- *
+ *
* The default resolution is {@link Resolution#DAY} since Vaadin 7.0.
- *
+ *
* @param resolution
* the resolution to set.
*/
@@ -813,13 +812,13 @@ public class DateField extends AbstractField<Date> implements
/**
* Returns new instance calendar used in Date conversions.
- *
+ *
* Returns new clone of the calendar object initialized using the the
* current date (if available)
- *
+ *
* If this is no calendar is assigned the <code>Calendar.getInstance</code>
* is used.
- *
+ *
* @return the Calendar.
* @see #setCalendar(Calendar)
*/
@@ -831,7 +830,8 @@ public class DateField extends AbstractField<Date> implements
// Start by a zeroed calendar to avoid having values for lower
// resolution variables e.g. time when resolution is day
int min, field;
- for (Resolution r : Resolution.getResolutionsLowerThan(resolution)) {
+ for (Resolution r : Resolution
+ .getResolutionsLowerThan(resolution)) {
field = r.getCalendarField();
min = calendar.getActualMinimum(field);
calendar.set(field, min);
@@ -857,14 +857,14 @@ public class DateField extends AbstractField<Date> implements
/**
* Sets formatting used by some component implementations. See
* {@link SimpleDateFormat} for format details.
- *
+ *
* By default it is encouraged to used default formatting defined by Locale,
* but due some JVM bugs it is sometimes necessary to use this method to
* override formatting. See Vaadin issue #2200.
- *
+ *
* @param dateFormat
* the dateFormat to set
- *
+ *
* @see com.vaadin.ui.AbstractComponent#setLocale(Locale))
*/
public void setDateFormat(String dateFormat) {
@@ -875,7 +875,7 @@ public class DateField extends AbstractField<Date> implements
/**
* Returns a format string used to format date value on client side or null
* if default formatting from {@link Component#getLocale()} is used.
- *
+ *
* @return the dateFormat
*/
public String getDateFormat() {
@@ -885,10 +885,10 @@ public class DateField extends AbstractField<Date> implements
/**
* Specifies whether or not date/time interpretation in component is to be
* lenient.
- *
+ *
* @see Calendar#setLenient(boolean)
* @see #isLenient()
- *
+ *
* @param lenient
* true if the lenient mode is to be turned on; false if it is to
* be turned off.
@@ -900,9 +900,9 @@ public class DateField extends AbstractField<Date> implements
/**
* Returns whether date/time interpretation is to be lenient.
- *
+ *
* @see #setLenient(boolean)
- *
+ *
* @return true if the interpretation mode of this calendar is lenient;
* false otherwise.
*/
@@ -973,7 +973,7 @@ public class DateField extends AbstractField<Date> implements
/**
* Checks whether ISO 8601 week numbers are shown in the date selector.
- *
+ *
* @return true if week numbers are shown, false otherwise.
*/
public boolean isShowISOWeekNumbers() {
@@ -984,7 +984,7 @@ public class DateField extends AbstractField<Date> implements
* Sets the visibility of ISO 8601 week numbers in the date selector. ISO
* 8601 defines that a week always starts with a Monday so the week numbers
* are only shown if this is the case.
- *
+ *
* @param showWeekNumbers
* true if week numbers should be shown, false otherwise.
*/
@@ -998,7 +998,7 @@ public class DateField extends AbstractField<Date> implements
* not empty. Note that DateField is considered empty (value == null) and
* invalid if it contains text typed in by the user that couldn't be parsed
* into a Date value.
- *
+ *
* @see com.vaadin.ui.AbstractField#validate()
*/
@Override
@@ -1021,9 +1021,9 @@ public class DateField extends AbstractField<Date> implements
* custom exception, the message returned by
* {@link Exception#getLocalizedMessage()} will be used instead of the value
* returned by this method.
- *
+ *
* @see #setParseErrorMessage(String)
- *
+ *
* @return the error message that the DateField uses when it can't parse the
* textual input from user to a Date object
*/
@@ -1036,7 +1036,7 @@ public class DateField extends AbstractField<Date> implements
* text input by user to a Date field. Note that if the
* {@link #handleUnparsableDateString(String)} method is overridden, the
* localized message from its exception is used.
- *
+ *
* @see #getParseErrorMessage()
* @see #handleUnparsableDateString(String)
* @param parsingErrorMessage
@@ -1049,10 +1049,10 @@ public class DateField extends AbstractField<Date> implements
* Sets the time zone used by this date field. The time zone is used to
* convert the absolute time in a Date object to a logical time displayed in
* the selector and to convert the select time back to a Date object.
- *
+ *
* If no time zone has been set, the current default time zone returned by
* {@code TimeZone.getDefault()} is used.
- *
+ *
* @see #getTimeZone()
* @param timeZone
* the time zone to use for time calculations.
@@ -1066,18 +1066,18 @@ public class DateField extends AbstractField<Date> implements
* Gets the time zone used by this field. The time zone is used to convert
* the absolute time in a Date object to a logical time displayed in the
* selector and to convert the select time back to a Date object.
- *
+ *
* If {@code null} is returned, the current default time zone returned by
* {@code TimeZone.getDefault()} is used.
- *
+ *
* @return the current time zone
*/
public TimeZone getTimeZone() {
return timeZone;
}
- public static class UnparsableDateString extends
- Validator.InvalidValueException {
+ public static class UnparsableDateString
+ extends Validator.InvalidValueException {
public UnparsableDateString(String message) {
super(message);
@@ -1089,8 +1089,8 @@ public class DateField extends AbstractField<Date> implements
public void readDesign(Element design, DesignContext designContext) {
super.readDesign(design, designContext);
if (design.hasAttr("value") && !design.attr("value").isEmpty()) {
- Date date = DesignAttributeHandler.getFormatter().parse(
- design.attr("value"), Date.class);
+ Date date = DesignAttributeHandler.getFormatter()
+ .parse(design.attr("value"), Date.class);
// formatting will return null if it cannot parse the string
if (date == null) {
Logger.getLogger(DateField.class.getName()).info(
@@ -1111,7 +1111,7 @@ public class DateField extends AbstractField<Date> implements
/**
* Returns current date-out-of-range error message.
- *
+ *
* @see #setDateOutOfRangeMessage(String)
* @since 7.4
* @return Current error message for dates out of range.
diff --git a/server/src/main/java/com/vaadin/ui/DefaultFieldFactory.java b/server/src/main/java/com/vaadin/ui/DefaultFieldFactory.java
index 535943bcd5..c8a5c241e9 100644
--- a/server/src/main/java/com/vaadin/ui/DefaultFieldFactory.java
+++ b/server/src/main/java/com/vaadin/ui/DefaultFieldFactory.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,19 +26,20 @@ import com.vaadin.shared.util.SharedUtil;
* This class contains a basic implementation for both {@link FormFieldFactory}
* and {@link TableFieldFactory}. The class is singleton, use {@link #get()}
* method to get reference to the instance.
- *
+ *
* <p>
* There are also some static helper methods available for custom built field
* factories.
- *
+ *
*/
-public class DefaultFieldFactory implements FormFieldFactory, TableFieldFactory {
+public class DefaultFieldFactory
+ implements FormFieldFactory, TableFieldFactory {
private static final DefaultFieldFactory instance = new DefaultFieldFactory();
/**
* Singleton method to get an instance of DefaultFieldFactory.
- *
+ *
* @return an instance of DefaultFieldFactory
*/
public static DefaultFieldFactory get() {
@@ -71,7 +72,7 @@ public class DefaultFieldFactory implements FormFieldFactory, TableFieldFactory
/**
* If name follows method naming conventions, convert the name to spaced
* upper case text. For example, convert "firstName" to "First Name"
- *
+ *
* @param propertyId
* @return the formatted caption string
*/
@@ -90,7 +91,7 @@ public class DefaultFieldFactory implements FormFieldFactory, TableFieldFactory
* <b>Item</b>: {@link Form}. <br/>
* <b>default field type</b>: {@link TextField}.
* <p>
- *
+ *
* @param type
* the type of the property
* @return the most suitable generic {@link Field} for given type
diff --git a/server/src/main/java/com/vaadin/ui/DragAndDropWrapper.java b/server/src/main/java/com/vaadin/ui/DragAndDropWrapper.java
index 29179ddca7..82a78b344c 100644
--- a/server/src/main/java/com/vaadin/ui/DragAndDropWrapper.java
+++ b/server/src/main/java/com/vaadin/ui/DragAndDropWrapper.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -44,8 +44,8 @@ import com.vaadin.shared.ui.draganddropwrapper.DragAndDropWrapperServerRpc;
import com.vaadin.ui.declarative.DesignContext;
@SuppressWarnings("serial")
-public class DragAndDropWrapper extends CustomComponent implements DropTarget,
- DragSource, LegacyComponent {
+public class DragAndDropWrapper extends CustomComponent
+ implements DropTarget, DragSource, LegacyComponent {
public class WrapperTransferable extends TransferableImpl {
@@ -73,7 +73,7 @@ public class DragAndDropWrapper extends CustomComponent implements DropTarget,
/**
* The component in wrapper that is being dragged or null if the
* transferable is not a component (most likely an html5 drag).
- *
+ *
* @return
*/
public Component getDraggedComponent() {
@@ -136,7 +136,7 @@ public class DragAndDropWrapper extends CustomComponent implements DropTarget,
}
/**
- *
+ *
* @return the absolute position of wrapper on the page
*/
public Integer getAbsoluteTop() {
@@ -177,7 +177,7 @@ public class DragAndDropWrapper extends CustomComponent implements DropTarget,
WRAPPER,
/**
* The whole wrapper is used to start an HTML5 drag.
- *
+ *
* NOTE: In Internet Explorer 6 to 8, this prevents user interactions
* with the wrapper's contents. For example, clicking a button inside
* the wrapper will no longer work.
@@ -200,7 +200,7 @@ public class DragAndDropWrapper extends CustomComponent implements DropTarget,
/**
* This is an internal constructor. Use
* {@link DragAndDropWrapper#DragAndDropWrapper(Component)} instead.
- *
+ *
* @since 7.5.0
*/
@Deprecated
@@ -211,7 +211,7 @@ public class DragAndDropWrapper extends CustomComponent implements DropTarget,
/**
* Wraps given component in a {@link DragAndDropWrapper}.
- *
+ *
* @param root
* the component to be wrapped
*/
@@ -224,7 +224,7 @@ public class DragAndDropWrapper extends CustomComponent implements DropTarget,
* Sets data flavors available in the DragAndDropWrapper is used to start an
* HTML5 style drags. Most commonly the "Text" flavor should be set.
* Multiple data types can be set.
- *
+ *
* @param type
* the string identifier of the drag "payload". E.g. "Text" or
* "text/html"
@@ -279,7 +279,7 @@ public class DragAndDropWrapper extends CustomComponent implements DropTarget,
* We want to avoid a new ProxyReceiver to be made since
* it'll get a new URL, so we need to keep extra track
* on what has been sent.
- *
+ *
* See #12330.
*/
sentIds.add(id);
@@ -318,7 +318,8 @@ public class DragAndDropWrapper extends CustomComponent implements DropTarget,
}
@Override
- public Transferable getTransferable(final Map<String, Object> rawVariables) {
+ public Transferable getTransferable(
+ final Map<String, Object> rawVariables) {
return new WrapperTransferable(this, rawVariables);
}
@@ -334,7 +335,7 @@ public class DragAndDropWrapper extends CustomComponent implements DropTarget,
/**
* Sets the component that will be used as the drag image. Only used when
* wrapper is set to {@link DragStartMode#COMPONENT_OTHER}
- *
+ *
* @param dragImageComponent
*/
public void setDragImageComponent(Component dragImageComponent) {
@@ -345,7 +346,7 @@ public class DragAndDropWrapper extends CustomComponent implements DropTarget,
/**
* Gets the component that will be used as the drag image. Only used when
* wrapper is set to {@link DragStartMode#COMPONENT_OTHER}
- *
+ *
* @return <code>null</code> if no component is set.
*/
public Component getDragImageComponent() {
@@ -379,16 +380,16 @@ public class DragAndDropWrapper extends CustomComponent implements DropTarget,
@Override
public void onProgress(StreamingProgressEvent event) {
- file.getStreamVariable().onProgress(
- new ReceivingEventWrapper(event));
+ file.getStreamVariable()
+ .onProgress(new ReceivingEventWrapper(event));
}
@Override
public void streamingStarted(StreamingStartEvent event) {
listenProgressOfUploadedFile = file.getStreamVariable() != null;
if (listenProgressOfUploadedFile) {
- file.getStreamVariable().streamingStarted(
- new ReceivingEventWrapper(event));
+ file.getStreamVariable()
+ .streamingStarted(new ReceivingEventWrapper(event));
}
// no need tell to the client about this receiver on next paint
receivers.remove(id);
@@ -401,16 +402,16 @@ public class DragAndDropWrapper extends CustomComponent implements DropTarget,
@Override
public void streamingFinished(StreamingEndEvent event) {
if (listenProgressOfUploadedFile) {
- file.getStreamVariable().streamingFinished(
- new ReceivingEventWrapper(event));
+ file.getStreamVariable()
+ .streamingFinished(new ReceivingEventWrapper(event));
}
}
@Override
public void streamingFailed(final StreamingErrorEvent event) {
if (listenProgressOfUploadedFile) {
- file.getStreamVariable().streamingFailed(
- new ReceivingEventWrapper(event));
+ file.getStreamVariable()
+ .streamingFailed(new ReceivingEventWrapper(event));
}
}
diff --git a/server/src/main/java/com/vaadin/ui/Embedded.java b/server/src/main/java/com/vaadin/ui/Embedded.java
index d83eef9c4d..8431faa83a 100644
--- a/server/src/main/java/com/vaadin/ui/Embedded.java
+++ b/server/src/main/java/com/vaadin/ui/Embedded.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -42,10 +42,10 @@ import com.vaadin.shared.ui.embedded.EmbeddedServerRpc;
* Adobe Flash objects, and embedded web pages. This use of the component is
* deprecated in Vaadin 7; the {@link Image}, {@link Flash}, and
* {@link BrowserFrame} components should be used instead, respectively.
- *
+ *
* @see Video
* @see Audio
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -59,7 +59,7 @@ public class Embedded extends AbstractComponent implements LegacyComponent {
/**
* Image types.
- *
+ *
* @deprecated As of 7.0, use the {@link Image} component instead.
*/
@Deprecated
@@ -67,7 +67,7 @@ public class Embedded extends AbstractComponent implements LegacyComponent {
/**
* Browser ("iframe") type.
- *
+ *
* @deprecated As of 7.0, use the {@link BrowserFrame} component instead.
*/
@Deprecated
@@ -119,7 +119,7 @@ public class Embedded extends AbstractComponent implements LegacyComponent {
/**
* Creates a new empty Embedded object with caption.
- *
+ *
* @param caption
*/
public Embedded(String caption) {
@@ -131,7 +131,7 @@ public class Embedded extends AbstractComponent implements LegacyComponent {
* Creates a new Embedded object whose contents is loaded from given
* resource. The dimensions are assumed if possible. The type is guessed
* from resource.
- *
+ *
* @param caption
* @param source
* the Source of the embedded object.
@@ -199,7 +199,7 @@ public class Embedded extends AbstractComponent implements LegacyComponent {
* presented instead of this component's normal content, for accessibility
* purposes. Does not work when {@link #setType(int)} has been called with
* {@link #TYPE_BROWSER}.
- *
+ *
* @param altText
* A short, human-readable description of this component's
* content.
@@ -215,7 +215,7 @@ public class Embedded extends AbstractComponent implements LegacyComponent {
/**
* Gets this component's "alt-text".
- *
+ *
* @see #setAlternateText(String)
*/
public String getAlternateText() {
@@ -227,7 +227,7 @@ public class Embedded extends AbstractComponent implements LegacyComponent {
* are passed to the instantiated object. Parameters are are stored as name
* value pairs. This overrides the previous value assigned to this
* parameter.
- *
+ *
* @param name
* the name of the parameter.
* @param value
@@ -242,7 +242,7 @@ public class Embedded extends AbstractComponent implements LegacyComponent {
* Gets the value of an object parameter. Parameters are optional
* information, and they are passed to the instantiated object. Parameters
* are are stored as name value pairs.
- *
+ *
* @return the Value of parameter or null if not found.
*/
public String getParameter(String name) {
@@ -251,7 +251,7 @@ public class Embedded extends AbstractComponent implements LegacyComponent {
/**
* Removes an object parameter from the list.
- *
+ *
* @param name
* the name of the parameter to remove.
*/
@@ -262,7 +262,7 @@ public class Embedded extends AbstractComponent implements LegacyComponent {
/**
* Gets the embedded object parameter names.
- *
+ *
* @return the Iterator of parameters names.
*/
public Iterator<String> getParameterNames() {
@@ -273,7 +273,7 @@ public class Embedded extends AbstractComponent implements LegacyComponent {
* This attribute specifies the base path used to resolve relative URIs
* specified by the classid, data, and archive attributes. When absent, its
* default value is the base URI of the current document.
- *
+ *
* @return the code base.
*/
public String getCodebase() {
@@ -282,7 +282,7 @@ public class Embedded extends AbstractComponent implements LegacyComponent {
/**
* Gets the MIME-Type of the code.
- *
+ *
* @return the MIME-Type of the code.
*/
public String getCodetype() {
@@ -291,7 +291,7 @@ public class Embedded extends AbstractComponent implements LegacyComponent {
/**
* Gets the MIME-Type of the object.
- *
+ *
* @return the MIME-Type of the object.
*/
public String getMimeType() {
@@ -301,7 +301,7 @@ public class Embedded extends AbstractComponent implements LegacyComponent {
/**
* This attribute specifies a message that a user agent may render while
* loading the object's implementation and data.
- *
+ *
* @return The text displayed when loading
*/
public String getStandby() {
@@ -312,7 +312,7 @@ public class Embedded extends AbstractComponent implements LegacyComponent {
* This attribute specifies the base path used to resolve relative URIs
* specified by the classid, data, and archive attributes. When absent, its
* default value is the base URI of the current document.
- *
+ *
* @param codebase
* The base path
*/
@@ -330,7 +330,7 @@ public class Embedded extends AbstractComponent implements LegacyComponent {
* but recommended when classid is specified since it allows the user agent
* to avoid loading information for unsupported content types. When absent,
* it defaults to the value of the type attribute.
- *
+ *
* @param codetype
* the codetype to set.
*/
@@ -344,7 +344,7 @@ public class Embedded extends AbstractComponent implements LegacyComponent {
/**
* Sets the mimeType, the MIME-Type of the object.
- *
+ *
* @param mimeType
* the mimeType to set.
*/
@@ -370,7 +370,7 @@ public class Embedded extends AbstractComponent implements LegacyComponent {
/**
* This attribute specifies a message that a user agent may render while
* loading the object's implementation and data.
- *
+ *
* @param standby
* The text to display while loading
*/
@@ -385,7 +385,7 @@ public class Embedded extends AbstractComponent implements LegacyComponent {
/**
* This attribute may be used to specify the location of an object's
* implementation via a URI.
- *
+ *
* @return the classid.
*/
public String getClassId() {
@@ -395,7 +395,7 @@ public class Embedded extends AbstractComponent implements LegacyComponent {
/**
* This attribute may be used to specify the location of an object's
* implementation via a URI.
- *
+ *
* @param classId
* the classId to set.
*/
@@ -409,7 +409,7 @@ public class Embedded extends AbstractComponent implements LegacyComponent {
/**
* Gets the resource contained in the embedded object.
- *
+ *
* @return the Resource
*/
public Resource getSource() {
@@ -425,7 +425,7 @@ public class Embedded extends AbstractComponent implements LegacyComponent {
* <li>TYPE_IMAGE
* </ul>
* </p>
- *
+ *
* @return the type.
*/
public int getType() {
@@ -435,7 +435,7 @@ public class Embedded extends AbstractComponent implements LegacyComponent {
/**
* Sets the object source resource. The dimensions are assumed if possible.
* The type is guessed from resource.
- *
+ *
* @param source
* the source to set.
*/
@@ -470,7 +470,7 @@ public class Embedded extends AbstractComponent implements LegacyComponent {
* <li>{@link #TYPE_BROWSER} <i>(Deprecated)</i>
* </ul>
* </p>
- *
+ *
* @param type
* the type to set.
*/
@@ -491,7 +491,7 @@ public class Embedded extends AbstractComponent implements LegacyComponent {
* archives will generally result in reduced load times for objects.
* Archives specified as relative URIs should be interpreted relative to the
* codebase attribute.
- *
+ *
* @return Space-separated list of URIs with resources relevant to the
* object
*/
@@ -506,7 +506,7 @@ public class Embedded extends AbstractComponent implements LegacyComponent {
* archives will generally result in reduced load times for objects.
* Archives specified as relative URIs should be interpreted relative to the
* codebase attribute.
- *
+ *
* @param archive
* Space-separated list of URIs with resources relevant to the
* object
@@ -523,9 +523,9 @@ public class Embedded extends AbstractComponent implements LegacyComponent {
* Add a click listener to the component. The listener is called whenever
* the user clicks inside the component. Depending on the content the event
* may be blocked and in that case no event is fired.
- *
+ *
* Use {@link #removeListener(ClickListener)} to remove the listener.
- *
+ *
* @param listener
* The listener to add
*/
@@ -546,7 +546,7 @@ public class Embedded extends AbstractComponent implements LegacyComponent {
/**
* Remove a click listener from the component. The listener should earlier
* have been added using {@link #addListener(ClickListener)}.
- *
+ *
* @param listener
* The listener to remove
*/
diff --git a/server/src/main/java/com/vaadin/ui/Field.java b/server/src/main/java/com/vaadin/ui/Field.java
index 8a9acd570f..dbcfe69c7f 100644
--- a/server/src/main/java/com/vaadin/ui/Field.java
+++ b/server/src/main/java/com/vaadin/ui/Field.java
@@ -90,8 +90,8 @@ public interface Field<T> extends Component, BufferedValidatable, Property<T>,
* @since 3.0
*/
@SuppressWarnings("serial")
- public static class ValueChangeEvent extends Component.Event implements
- Property.ValueChangeEvent {
+ public static class ValueChangeEvent extends Component.Event
+ implements Property.ValueChangeEvent {
/**
* Constructs a new event object with the specified source field object.
@@ -116,10 +116,10 @@ public interface Field<T> extends Component, BufferedValidatable, Property<T>,
/**
* Is the field empty?
- *
+ *
* In general, "empty" state is same as null. As an exception, TextField
* also treats empty string as "empty".
- *
+ *
* @since 7.4
* @return true if the field is empty, false otherwise
*/
@@ -130,7 +130,7 @@ public interface Field<T> extends Component, BufferedValidatable, Property<T>,
* <p>
* The field value is typically reset to the initial value of the field.
* Calling {@link #isEmpty()} on a cleared field must always returns true.
- *
+ *
* @since 7.4
*/
public void clear();
diff --git a/server/src/main/java/com/vaadin/ui/Flash.java b/server/src/main/java/com/vaadin/ui/Flash.java
index 6e99d2fe35..f569b9ad16 100644
--- a/server/src/main/java/com/vaadin/ui/Flash.java
+++ b/server/src/main/java/com/vaadin/ui/Flash.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,10 +28,9 @@ import com.vaadin.ui.declarative.DesignContext;
/**
* A component for displaying Adobe® Flash® content.
- *
+ *
* @author Vaadin Ltd.
- * @version
- * @VERSION@
+ * @version @VERSION@
* @since 7.0
*/
@SuppressWarnings("serial")
@@ -46,7 +45,7 @@ public class Flash extends AbstractEmbedded {
/**
* Creates a new empty Flash component with the given caption
- *
+ *
* @param caption
* The caption for the component
*/
@@ -56,7 +55,7 @@ public class Flash extends AbstractEmbedded {
/**
* Creates a new Flash component with the given caption and content.
- *
+ *
* @param caption
* The caption for the component
* @param source
@@ -82,13 +81,13 @@ public class Flash extends AbstractEmbedded {
* This attribute specifies the base path used to resolve relative URIs
* specified by the classid, data, and archive attributes. When absent, its
* default value is the base URI of the current document.
- *
+ *
* @param codebase
* The base path
*/
public void setCodebase(String codebase) {
- if (codebase != getState().codebase
- || (codebase != null && !codebase.equals(getState().codebase))) {
+ if (codebase != getState().codebase || (codebase != null
+ && !codebase.equals(getState().codebase))) {
getState().codebase = codebase;
requestRepaint();
}
@@ -96,7 +95,7 @@ public class Flash extends AbstractEmbedded {
/**
* Returns the codebase.
- *
+ *
* @see #setCodebase(String)
* @since 7.4.1
* @return Current codebase.
@@ -111,13 +110,13 @@ public class Flash extends AbstractEmbedded {
* but recommended when classid is specified since it allows the user agent
* to avoid loading information for unsupported content types. When absent,
* it defaults to the value of the type attribute.
- *
+ *
* @param codetype
* the codetype to set.
*/
public void setCodetype(String codetype) {
- if (codetype != getState().codetype
- || (codetype != null && !codetype.equals(getState().codetype))) {
+ if (codetype != getState().codetype || (codetype != null
+ && !codetype.equals(getState().codetype))) {
getState().codetype = codetype;
requestRepaint();
}
@@ -125,7 +124,7 @@ public class Flash extends AbstractEmbedded {
/**
* Returns the current codetype.
- *
+ *
* @see #setCodetype(String)
* @since 7.4.1
* @return Current codetype.
@@ -141,7 +140,7 @@ public class Flash extends AbstractEmbedded {
* archives will generally result in reduced load times for objects.
* Archives specified as relative URIs should be interpreted relative to the
* codebase attribute.
- *
+ *
* @param archive
* Space-separated list of URIs with resources relevant to the
* object
@@ -156,7 +155,7 @@ public class Flash extends AbstractEmbedded {
/**
* Returns current archive.
- *
+ *
* @see #setArchive(String)
* @since 7.4.1
* @return Current archive.
@@ -167,7 +166,7 @@ public class Flash extends AbstractEmbedded {
/**
* Sets standby.
- *
+ *
* @param standby
* Standby string.
*/
@@ -181,7 +180,7 @@ public class Flash extends AbstractEmbedded {
/**
* Returns standby.
- *
+ *
* @since 7.4.1
* @return Standby string.
*/
@@ -194,7 +193,7 @@ public class Flash extends AbstractEmbedded {
* are passed to the instantiated object. Parameters are are stored as name
* value pairs. This overrides the previous value assigned to this
* parameter.
- *
+ *
* @param name
* the name of the parameter.
* @param value
@@ -212,17 +211,17 @@ public class Flash extends AbstractEmbedded {
* Gets the value of an object parameter. Parameters are optional
* information, and they are passed to the instantiated object. Parameters
* are are stored as name value pairs.
- *
+ *
* @return the Value of parameter or null if not found.
*/
public String getParameter(String name) {
- return getState(false).embedParams != null ? getState(false).embedParams
- .get(name) : null;
+ return getState(false).embedParams != null
+ ? getState(false).embedParams.get(name) : null;
}
/**
* Removes an object parameter from the list.
- *
+ *
* @param name
* the name of the parameter to remove.
*/
@@ -246,14 +245,14 @@ public class Flash extends AbstractEmbedded {
Collections.sort(paramNames);
for (String param : paramNames) {
- design.appendElement("parameter").attr("name", param)
- .attr("value", getParameter(param));
+ design.appendElement("parameter").attr("name", param).attr("value",
+ getParameter(param));
}
}
/**
* Returns an iterable with declared parameter names.
- *
+ *
* @see #setParameter(String, String)
* @see #getParameter(String)
* @since 7.4.1
diff --git a/server/src/main/java/com/vaadin/ui/Form.java b/server/src/main/java/com/vaadin/ui/Form.java
index 45532756e5..4926a7a429 100644
--- a/server/src/main/java/com/vaadin/ui/Form.java
+++ b/server/src/main/java/com/vaadin/ui/Form.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -46,7 +46,7 @@ import com.vaadin.shared.ui.form.FormState;
/**
* Form component provides easy way of creating and managing sets fields.
- *
+ *
* <p>
* <code>Form</code> is a container for fields implementing {@link Field}
* interface. It provides support for any layouts and provides buffering
@@ -55,7 +55,7 @@ import com.vaadin.shared.ui.form.FormState;
* setting immediateness, etc. Also direct mechanism for replacing existing
* fields with selections is given.
* </p>
- *
+ *
* <p>
* <code>Form</code> provides customizable editor for classes implementing
* {@link com.vaadin.data.Item} interface. Also the form itself implements this
@@ -69,16 +69,16 @@ import com.vaadin.shared.ui.form.FormState;
* properties of any class following bean pattern, can be accessed trough
* {@link com.vaadin.data.util.BeanItem}.
* </p>
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
* @deprecated As of 7.0, use {@link FieldGroup} instead of {@link Form} for
* more flexibility.
*/
@Deprecated
-public class Form extends AbstractField<Object> implements Item.Editor,
- Buffered, Item, Validatable, Action.Notifier, HasComponents,
- LegacyComponent {
+public class Form extends AbstractField<Object>
+ implements Item.Editor, Buffered, Item, Validatable, Action.Notifier,
+ HasComponents, LegacyComponent {
private Object propertyValue;
@@ -125,13 +125,14 @@ public class Form extends AbstractField<Object> implements Item.Editor,
/**
* Form needs to repaint itself if child fields value changes due possible
* change in form validity.
- *
+ *
* TODO introduce ValidityChangeEvent (#6239) and start using it instead.
* See e.g. DateField#notifyFormOfValidityChange().
*/
private final ValueChangeListener fieldValueChangeListener = new ValueChangeListener() {
@Override
- public void valueChange(com.vaadin.data.Property.ValueChangeEvent event) {
+ public void valueChange(
+ com.vaadin.data.Property.ValueChangeEvent event) {
markAsDirty();
}
};
@@ -155,7 +156,7 @@ public class Form extends AbstractField<Object> implements Item.Editor,
/**
* Constructs a new form with default layout.
- *
+ *
* <p>
* By default the form uses {@link FormLayout}.
* </p>
@@ -167,7 +168,7 @@ public class Form extends AbstractField<Object> implements Item.Editor,
/**
* Constructs a new form with given {@link Layout}.
- *
+ *
* @param formLayout
* the layout of the form.
*/
@@ -178,7 +179,7 @@ public class Form extends AbstractField<Object> implements Item.Editor,
/**
* Constructs a new form with given {@link Layout} and
* {@link FormFieldFactory}.
- *
+ *
* @param formLayout
* the layout of the form.
* @param fieldFactory
@@ -222,7 +223,7 @@ public class Form extends AbstractField<Object> implements Item.Editor,
/**
* The error message of a Form is the error of the first field with a
* non-empty error.
- *
+ *
* Empty error messages of the contained fields are skipped, because an
* empty error indicator would be confusing to the user, especially if there
* are errors that have something to display. This is also the reason why
@@ -236,7 +237,8 @@ public class Form extends AbstractField<Object> implements Item.Editor,
// getErrorMessage() recursively instead of validate().
ErrorMessage validationError = null;
if (isValidationVisible()) {
- for (final Iterator<Object> i = propertyIds.iterator(); i.hasNext();) {
+ for (final Iterator<Object> i = propertyIds.iterator(); i
+ .hasNext();) {
Object f = fields.get(i.next());
if (f instanceof AbstractComponent) {
AbstractComponent field = (AbstractComponent) f;
@@ -248,7 +250,8 @@ public class Form extends AbstractField<Object> implements Item.Editor,
validationError = new UserError(field.getCaption());
}
break;
- } else if (f instanceof Field && !((Field<?>) f).isValid()) {
+ } else if (f instanceof Field
+ && !((Field<?>) f).isValid()) {
// Something is wrong with the field, but no proper
// error is given. Generate one.
validationError = new UserError(field.getCaption());
@@ -266,24 +269,22 @@ public class Form extends AbstractField<Object> implements Item.Editor,
// Throw combination of the error types
return new CompositeErrorMessage(
- new ErrorMessage[] {
- getComponentError(),
- validationError,
- AbstractErrorMessage
- .getErrorMessageForException(currentBufferedSourceException) });
+ new ErrorMessage[] { getComponentError(), validationError,
+ AbstractErrorMessage.getErrorMessageForException(
+ currentBufferedSourceException) });
}
/**
* Controls the making validation visible implicitly on commit.
- *
+ *
* Having commit() call setValidationVisible(true) implicitly is the default
* behaviour. You can disable the implicit setting by setting this property
* as false.
- *
+ *
* It is useful, because you usually want to start with the form free of
* errors and only display them after the user clicks Ok. You can disable
* the implicit setting by setting this property as false.
- *
+ *
* @param makeVisible
* If true (default), validation is made visible when commit() is
* called. If false, the visibility is left as it is.
@@ -294,9 +295,9 @@ public class Form extends AbstractField<Object> implements Item.Editor,
/**
* Is validation made automatically visible on commit?
- *
+ *
* See setValidationVisibleOnCommit().
- *
+ *
* @return true if validation is made automatically visible on commit.
*/
public boolean isValidationVisibleOnCommit() {
@@ -308,7 +309,8 @@ public class Form extends AbstractField<Object> implements Item.Editor,
* use the default one from the interface.
*/
@Override
- public void commit() throws Buffered.SourceException, InvalidValueException {
+ public void commit()
+ throws Buffered.SourceException, InvalidValueException {
LinkedList<SourceException> problems = null;
@@ -433,7 +435,8 @@ public class Form extends AbstractField<Object> implements Item.Editor,
public void setBuffered(boolean buffered) {
if (buffered != this.buffered) {
this.buffered = buffered;
- for (final Iterator<Object> i = propertyIds.iterator(); i.hasNext();) {
+ for (final Iterator<Object> i = propertyIds.iterator(); i
+ .hasNext();) {
(fields.get(i.next())).setBuffered(buffered);
}
}
@@ -441,7 +444,7 @@ public class Form extends AbstractField<Object> implements Item.Editor,
/**
* Adds a new property to form and create corresponding field.
- *
+ *
* @see com.vaadin.data.Item#addItemProperty(Object, Property)
*/
@Override
@@ -477,16 +480,16 @@ public class Form extends AbstractField<Object> implements Item.Editor,
/**
* Registers the field with the form and adds the field to the form layout.
- *
+ *
* <p>
* The property id must not be already used in the form.
* </p>
- *
+ *
* <p>
* This field is added to the layout using the
* {@link #attachField(Object, Field)} method.
* </p>
- *
+ *
* @param propertyId
* the Property id the the field.
* @param field
@@ -501,12 +504,12 @@ public class Form extends AbstractField<Object> implements Item.Editor,
/**
* Register the field with the form. All registered fields are validated
* when the form is validated and also committed when the form is committed.
- *
+ *
* <p>
* The property id must not be already used in the form.
* </p>
- *
- *
+ *
+ *
* @param propertyId
* the Property id of the field.
* @param field
@@ -542,11 +545,11 @@ public class Form extends AbstractField<Object> implements Item.Editor,
* CustomLayout location given by the string representation of the property
* id using {@link CustomLayout#addComponent(Component, String)}.
* </p>
- *
+ *
* <p>
* Override this method to control how the fields are added to the layout.
* </p>
- *
+ *
* @param propertyId
* @param field
*/
@@ -566,13 +569,13 @@ public class Form extends AbstractField<Object> implements Item.Editor,
/**
* The property identified by the property id.
- *
+ *
* <p>
* The property data source of the field specified with property id is
* returned. If there is a (with specified property id) having no data
* source, the field is returned instead of the data source.
* </p>
- *
+ *
* @see com.vaadin.data.Item#getItemProperty(Object)
*/
@Override
@@ -593,7 +596,7 @@ public class Form extends AbstractField<Object> implements Item.Editor,
/**
* Gets the field identified by the propertyid.
- *
+ *
* @param propertyId
* the id of the property.
*/
@@ -609,7 +612,7 @@ public class Form extends AbstractField<Object> implements Item.Editor,
/**
* Removes the property and corresponding field from the form.
- *
+ *
* @see com.vaadin.data.Item#removeItemProperty(Object)
*/
@Override
@@ -636,7 +639,7 @@ public class Form extends AbstractField<Object> implements Item.Editor,
* Override this method to control how the fields are removed from the
* layout.
* </p>
- *
+ *
* @param field
* the field to be detached from the forms layout.
*/
@@ -649,7 +652,7 @@ public class Form extends AbstractField<Object> implements Item.Editor,
/**
* Removes all properties and fields from the form.
- *
+ *
* @return the Success of the operation. Removal of all fields succeeded if
* (and only if) the return value is <code>true</code>.
*/
@@ -674,34 +677,34 @@ public class Form extends AbstractField<Object> implements Item.Editor,
/**
* Sets the item datasource for the form.
- *
+ *
* <p>
* Setting item datasource clears any fields, the form might contain and
* adds all the properties as fields to the form.
* </p>
- *
+ *
* @see com.vaadin.data.Item.Viewer#setItemDataSource(Item)
*/
@Override
public void setItemDataSource(Item newDataSource) {
- setItemDataSource(newDataSource,
- newDataSource != null ? newDataSource.getItemPropertyIds()
- : null);
+ setItemDataSource(newDataSource, newDataSource != null
+ ? newDataSource.getItemPropertyIds() : null);
}
/**
* Set the item datasource for the form, but limit the form contents to
* specified properties of the item.
- *
+ *
* <p>
* Setting item datasource clears any fields, the form might contain and
* adds the specified the properties as fields to the form, in the specified
* order.
* </p>
- *
+ *
* @see com.vaadin.data.Item.Viewer#setItemDataSource(Item)
*/
- public void setItemDataSource(Item newDataSource, Collection<?> propertyIds) {
+ public void setItemDataSource(Item newDataSource,
+ Collection<?> propertyIds) {
if (getLayout() instanceof GridLayout) {
GridLayout gl = (GridLayout) getLayout();
@@ -748,7 +751,7 @@ public class Form extends AbstractField<Object> implements Item.Editor,
* property straight to Field. If Property.Viewer type property (e.g.
* PropertyFormatter) is already set for field, the property is bound to
* that Property.Viewer.
- *
+ *
* @param propertyId
* @param property
* @param field
@@ -771,12 +774,12 @@ public class Form extends AbstractField<Object> implements Item.Editor,
/**
* Gets the layout of the form.
- *
+ *
* <p>
* By default form uses <code>OrderedLayout</code> with <code>form</code>
* -style.
* </p>
- *
+ *
* @return the Layout of the form.
*/
public Layout getLayout() {
@@ -785,11 +788,11 @@ public class Form extends AbstractField<Object> implements Item.Editor,
/**
* Sets the layout of the form.
- *
+ *
* <p>
* If set to null then Form uses a FormLayout by default.
* </p>
- *
+ *
* @param layout
* the layout of the form.
*/
@@ -828,16 +831,16 @@ public class Form extends AbstractField<Object> implements Item.Editor,
/**
* Sets the form field to be selectable from static list of changes.
- *
+ *
* <p>
* The list values and descriptions are given as array. The value-array must
* contain the current value of the field and the lengths of the arrays must
* match. Null values are not supported.
* </p>
- *
+ *
* Note: since Vaadin 7.0, returns an {@link AbstractSelect} instead of a
* {@link Select}.
- *
+ *
* @param propertyId
* the id of the property.
* @param values
@@ -862,8 +865,9 @@ public class Form extends AbstractField<Object> implements Item.Editor,
throw new IllegalArgumentException("Field with given propertyid '"
+ propertyId.toString() + "' can not be found.");
}
- final Object value = oldField.getPropertyDataSource() == null ? oldField
- .getValue() : oldField.getPropertyDataSource().getValue();
+ final Object value = oldField.getPropertyDataSource() == null
+ ? oldField.getValue()
+ : oldField.getPropertyDataSource().getValue();
// Checks that the value exists and check if the select should
// be forced in multiselect mode
@@ -877,8 +881,8 @@ public class Form extends AbstractField<Object> implements Item.Editor,
}
if (value != null && !found) {
if (value instanceof Collection) {
- for (final Iterator<?> it = ((Collection<?>) value).iterator(); it
- .hasNext();) {
+ for (final Iterator<?> it = ((Collection<?>) value)
+ .iterator(); it.hasNext();) {
final Object val = it.next();
found = false;
for (int i = 0; i < values.length && !found; i++) {
@@ -897,9 +901,9 @@ public class Form extends AbstractField<Object> implements Item.Editor,
}
isMultiselect = true;
} else {
- throw new IllegalArgumentException("Current value '" + value
- + "' of property '" + propertyId.toString()
- + "' was not found");
+ throw new IllegalArgumentException(
+ "Current value '" + value + "' of property '"
+ + propertyId.toString() + "' was not found");
}
}
@@ -925,8 +929,8 @@ public class Form extends AbstractField<Object> implements Item.Editor,
}
if (item != null) {
- item.getItemProperty("desc").setValue(
- descriptions[i].toString());
+ item.getItemProperty("desc")
+ .setValue(descriptions[i].toString());
}
}
@@ -946,7 +950,7 @@ public class Form extends AbstractField<Object> implements Item.Editor,
/**
* Checks the validity of the Form and all of its fields.
- *
+ *
* @see com.vaadin.data.Validatable#validate()
*/
@Override
@@ -959,7 +963,7 @@ public class Form extends AbstractField<Object> implements Item.Editor,
/**
* Checks the validabtable object accept invalid values.
- *
+ *
* @see com.vaadin.data.Validatable#isInvalidAllowed()
*/
@Override
@@ -969,7 +973,7 @@ public class Form extends AbstractField<Object> implements Item.Editor,
/**
* Should the validabtable object accept invalid values.
- *
+ *
* @see com.vaadin.data.Validatable#setInvalidAllowed(boolean)
*/
@Override
@@ -980,7 +984,7 @@ public class Form extends AbstractField<Object> implements Item.Editor,
/**
* Sets the component's to read-only mode to the specified state.
- *
+ *
* @see com.vaadin.ui.Component#setReadOnly(boolean)
*/
@Override
@@ -994,10 +998,10 @@ public class Form extends AbstractField<Object> implements Item.Editor,
/**
* Sets the field factory used by this Form to genarate Fields for
* properties.
- *
+ *
* {@link FormFieldFactory} is used to create fields for form properties.
* {@link DefaultFieldFactory} is used by default.
- *
+ *
* @param fieldFactory
* the new factory used to create the fields.
* @see Field
@@ -1009,7 +1013,7 @@ public class Form extends AbstractField<Object> implements Item.Editor,
/**
* Get the field factory of the form.
- *
+ *
* @return the FormFieldFactory Factory used to create the fields.
*/
public FormFieldFactory getFormFieldFactory() {
@@ -1018,7 +1022,7 @@ public class Form extends AbstractField<Object> implements Item.Editor,
/**
* Gets the field type.
- *
+ *
* @see com.vaadin.ui.AbstractField#getType()
*/
@Override
@@ -1031,9 +1035,9 @@ public class Form extends AbstractField<Object> implements Item.Editor,
/**
* Sets the internal value.
- *
+ *
* This is relevant when the Form is used as Field.
- *
+ *
* @see com.vaadin.ui.AbstractField#setInternalValue(java.lang.Object)
*/
@Override
@@ -1055,7 +1059,7 @@ public class Form extends AbstractField<Object> implements Item.Editor,
* Gets the first focusable field in form. If there are enabled,
* non-read-only fields, the first one of them is returned. Otherwise, the
* field for the first property (or null if none) is returned.
- *
+ *
* @return the Field.
*/
private Field<?> getFirstFocusableField() {
@@ -1081,9 +1085,9 @@ public class Form extends AbstractField<Object> implements Item.Editor,
/**
* Updates the internal form datasource.
- *
+ *
* Method setFormDataSource.
- *
+ *
* @param data
* @param properties
*/
@@ -1109,7 +1113,7 @@ public class Form extends AbstractField<Object> implements Item.Editor,
/**
* Returns the visibleProperties.
- *
+ *
* @return the Collection of visible Item properites.
*/
public Collection<?> getVisibleItemProperties() {
@@ -1118,7 +1122,7 @@ public class Form extends AbstractField<Object> implements Item.Editor,
/**
* Sets the visibleProperties.
- *
+ *
* @param visibleProperties
* the visibleProperties to set.
*/
@@ -1133,7 +1137,7 @@ public class Form extends AbstractField<Object> implements Item.Editor,
/**
* Sets the visibleProperties.
- *
+ *
* @param visibleProperties
* the visibleProperties to set.
*/
@@ -1147,7 +1151,7 @@ public class Form extends AbstractField<Object> implements Item.Editor,
/**
* Focuses the first field in the form.
- *
+ *
* @see com.vaadin.ui.Component.Focusable#focus()
*/
@Override
@@ -1160,13 +1164,14 @@ public class Form extends AbstractField<Object> implements Item.Editor,
/**
* Sets the Tabulator index of this Focusable component.
- *
+ *
* @see com.vaadin.ui.Component.Focusable#setTabIndex(int)
*/
@Override
public void setTabIndex(int tabIndex) {
super.setTabIndex(tabIndex);
- for (final Iterator<?> i = getItemPropertyIds().iterator(); i.hasNext();) {
+ for (final Iterator<?> i = getItemPropertyIds().iterator(); i
+ .hasNext();) {
(getField(i.next())).setTabIndex(tabIndex);
}
}
@@ -1190,7 +1195,7 @@ public class Form extends AbstractField<Object> implements Item.Editor,
* {@inheritDoc}
* <p>
* A Form is empty if all of its fields are empty.
- *
+ *
*/
@Override
public boolean isEmpty() {
@@ -1209,7 +1214,7 @@ public class Form extends AbstractField<Object> implements Item.Editor,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.AbstractField#clear()
*/
@Override
@@ -1224,7 +1229,7 @@ public class Form extends AbstractField<Object> implements Item.Editor,
/**
* Adding validators directly to form is not supported.
- *
+ *
* Add the validators to form fields instead.
*/
@Override
@@ -1235,7 +1240,7 @@ public class Form extends AbstractField<Object> implements Item.Editor,
/**
* Returns a layout that is rendered below normal form contents. This area
* can be used for example to include buttons related to form contents.
- *
+ *
* @return layout rendered below normal form contents or null if no footer
* is used
*/
@@ -1246,7 +1251,7 @@ public class Form extends AbstractField<Object> implements Item.Editor,
/**
* Sets the layout that is rendered below normal form contents. No footer is
* rendered if this is set to null, .
- *
+ *
* @param footer
* the new footer layout
*/
@@ -1282,7 +1287,7 @@ public class Form extends AbstractField<Object> implements Item.Editor,
* {@link AbstractField}. The ownActionManager handles Actions attached to
* this Form specifically, while the ActionManager in AbstractField
* delegates to the containing Window (i.e global Actions).
- *
+ *
* @return
*/
protected ActionManager getOwnActionManager() {
@@ -1336,8 +1341,8 @@ public class Form extends AbstractField<Object> implements Item.Editor,
* Modifiable and Serializable Iterator for the components, used by
* {@link Form#getComponentIterator()}.
*/
- private class ComponentIterator implements Iterator<Component>,
- Serializable {
+ private class ComponentIterator
+ implements Iterator<Component>, Serializable {
int i = 0;
diff --git a/server/src/main/java/com/vaadin/ui/FormFieldFactory.java b/server/src/main/java/com/vaadin/ui/FormFieldFactory.java
index 124e0fcb9a..ef0894de7b 100644
--- a/server/src/main/java/com/vaadin/ui/FormFieldFactory.java
+++ b/server/src/main/java/com/vaadin/ui/FormFieldFactory.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,9 +25,9 @@ import com.vaadin.data.fieldgroup.FieldGroup;
* property id and uiContext (the component responsible for displaying fields).
* Currently this interface is used by {@link Form}, but might later be used by
* some other components for {@link Field} generation.
- *
+ *
* <p>
- *
+ *
* @author Vaadin Ltd.
* @since 6.0
* @see TableFieldFactory
@@ -39,7 +39,7 @@ public interface FormFieldFactory extends Serializable {
/**
* Creates a field based on the item, property id and the component (most
* commonly {@link Form}) where the Field will be presented.
- *
+ *
* @param item
* the item where the property belongs to.
* @param propertyId
diff --git a/server/src/main/java/com/vaadin/ui/FormLayout.java b/server/src/main/java/com/vaadin/ui/FormLayout.java
index c817300e53..72d053fb4e 100644
--- a/server/src/main/java/com/vaadin/ui/FormLayout.java
+++ b/server/src/main/java/com/vaadin/ui/FormLayout.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,14 +22,14 @@ import com.vaadin.shared.ui.orderedlayout.FormLayoutState;
/**
* FormLayout is used by {@link Form} to layout fields. It may also be used
* separately without {@link Form}.
- *
+ *
* FormLayout is a close relative of {@link VerticalLayout}, but in FormLayout
* captions are rendered to the left of their respective components. Required
* and validation indicators are shown between the captions and the fields.
- *
+ *
* FormLayout by default has component spacing on. Also margin top and margin
* bottom are by default on.
- *
+ *
*/
public class FormLayout extends AbstractOrderedLayout {
@@ -42,9 +42,9 @@ public class FormLayout extends AbstractOrderedLayout {
/**
* Constructs a FormLayout and adds the given components to it.
- *
+ *
* @see AbstractOrderedLayout#addComponents(Component...)
- *
+ *
* @param children
* Components to add to the FormLayout
*/
diff --git a/server/src/main/java/com/vaadin/ui/Grid.java b/server/src/main/java/com/vaadin/ui/Grid.java
index 962d88087d..5e1d44244b 100644
--- a/server/src/main/java/com/vaadin/ui/Grid.java
+++ b/server/src/main/java/com/vaadin/ui/Grid.java
@@ -123,11 +123,11 @@ import elemental.json.JsonValue;
* Grid is always bound to a {@link Container.Indexed}, but is not a
* {@code Container} of any kind in of itself. The contents of the given
* Container is displayed with the help of {@link Renderer Renderers}.
- *
+ *
* <h3 id="grid-headers-and-footers">Headers and Footers</h3>
* <p>
- *
- *
+ *
+ *
* <h3 id="grid-converters-and-renderers">Converters and Renderers</h3>
* <p>
* Each column has its own {@link Renderer} that displays data into something
@@ -146,36 +146,36 @@ import elemental.json.JsonValue;
* column.setConverter(new StringToDateConverter());
* column.setRenderer(new MyColorfulDateRenderer());
* </pre></code>
- *
+ *
* <h3 id="grid-lazyloading">Lazy Loading</h3>
* <p>
* The data is accessed as it is needed by Grid and not any sooner. In other
* words, if the given Container is huge, but only the first few rows are
* displayed to the user, only those (and a few more, for caching purposes) are
* accessed.
- *
+ *
* <h3 id="grid-selection-modes-and-models">Selection Modes and Models</h3>
* <p>
* Grid supports three selection <em>{@link SelectionMode modes}</em> (single,
- * multi, none), and comes bundled with one
- * <em>{@link SelectionModel model}</em> for each of the modes. The distinction
- * between a selection mode and selection model is as follows: a <em>mode</em>
- * essentially says whether you can have one, many or no rows selected. The
- * model, however, has the behavioral details of each. A single selection model
- * may require that the user deselects one row before selecting another one. A
- * variant of a multiselect might have a configurable maximum of rows that may
- * be selected. And so on.
+ * multi, none), and comes bundled with one <em>{@link SelectionModel
+ * model}</em> for each of the modes. The distinction between a selection mode
+ * and selection model is as follows: a <em>mode</em> essentially says whether
+ * you can have one, many or no rows selected. The model, however, has the
+ * behavioral details of each. A single selection model may require that the
+ * user deselects one row before selecting another one. A variant of a
+ * multiselect might have a configurable maximum of rows that may be selected.
+ * And so on.
* <p>
* <code><pre>
* Grid grid = new Grid(myContainer);
- *
+ *
* // uses the bundled SingleSelectionModel class
* grid.setSelectionMode(SelectionMode.SINGLE);
- *
+ *
* // changes the behavior to a custom selection model
* grid.setSelectionModel(new MyTwoSelectionModel());
* </pre></code>
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -184,13 +184,13 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* An event listener for column visibility change events in the Grid.
- *
+ *
* @since 7.5.0
*/
public interface ColumnVisibilityChangeListener extends Serializable {
/**
* Called when a column has become hidden or unhidden.
- *
+ *
* @param event
*/
void columnVisibilityChanged(ColumnVisibilityChangeEvent event);
@@ -198,7 +198,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* An event that is fired when a column's visibility changes.
- *
+ *
* @since 7.5.0
*/
public static class ColumnVisibilityChangeEvent extends Component.Event {
@@ -209,7 +209,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Constructor for a column visibility change event.
- *
+ *
* @param source
* the grid from which this event originates
* @param column
@@ -231,7 +231,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Gets the column that became hidden or visible.
- *
+ *
* @return the column that became hidden or visible.
* @see Column#isHidden()
*/
@@ -241,7 +241,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Was the column set hidden or visible.
- *
+ *
* @return <code>true</code> if the column was hidden <code>false</code>
* if it was set visible
*/
@@ -252,7 +252,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Returns <code>true</code> if the column reorder was done by the user,
* <code>false</code> if not and it was triggered by server side code.
- *
+ *
* @return <code>true</code> if event is a result of user interaction
*/
public boolean isUserOriginated() {
@@ -262,7 +262,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* A callback interface for generating details for a particular row in Grid.
- *
+ *
* @since 7.5.0
* @author Vaadin Ltd
* @see DetailsGenerator#NULL
@@ -286,7 +286,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* <em>Note:</em> If a component gets generated, it may not be manually
* attached anywhere. The same details component can not be displayed
* for multiple different rows.
- *
+ *
* @param rowReference
* the reference for the row for which to generate details
* @return the details for the given row, or <code>null</code> to leave
@@ -301,15 +301,15 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* this class when the {@link RpcDataProviderExtension} is sending data to
* the client. Details components are detached and forgotten when client
* informs that it has dropped the corresponding item.
- *
+ *
* @since 7.6.1
*/
- public final static class DetailComponentManager extends
- AbstractGridExtension implements DataGenerator {
+ public final static class DetailComponentManager
+ extends AbstractGridExtension implements DataGenerator {
/**
* The user-defined details generator.
- *
+ *
* @see #setDetailsGenerator(DetailsGenerator)
*/
private DetailsGenerator detailsGenerator;
@@ -348,7 +348,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* {@link DetailsGenerator}.
* <p>
* This method attaches created components to the parent {@link Grid}.
- *
+ *
* @param itemId
* the item id for which to create the details component.
* @throws IllegalStateException
@@ -373,10 +373,10 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
if (details != null) {
if (details.getParent() != null) {
String name = detailsGenerator.getClass().getName();
- throw new IllegalStateException(name
- + " generated a details component that already "
- + "was attached. (itemId: " + itemId
- + ", component: " + details + ")");
+ throw new IllegalStateException(
+ name + " generated a details component that already "
+ + "was attached. (itemId: " + itemId
+ + ", component: " + details + ")");
}
itemIdToDetailsComponent.put(itemId, details);
@@ -396,7 +396,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* Destroys a details component correctly.
* <p>
* This method will detach the component from parent {@link Grid}.
- *
+ *
* @param itemId
* the item id for which to destroy the details component
*/
@@ -427,7 +427,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Sets details visiblity status of given item id.
- *
+ *
* @param itemId
* item id to set
* @param visible
@@ -460,10 +460,9 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
Component detailsComponent = itemIdToDetailsComponent
.get(itemId);
- rowData.put(
- GridState.JSONKEY_DETAILS_VISIBLE,
- (detailsComponent != null ? detailsComponent
- .getConnectorId() : ""));
+ rowData.put(GridState.JSONKEY_DETAILS_VISIBLE,
+ (detailsComponent != null
+ ? detailsComponent.getConnectorId() : ""));
}
}
@@ -478,7 +477,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* Sets a new details generator for row details.
* <p>
* The currently opened row details will be re-rendered.
- *
+ *
* @param detailsGenerator
* the details generator to set
* @throws IllegalArgumentException
@@ -500,7 +499,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Gets the current details generator for row details.
- *
+ *
* @return the detailsGenerator the current details generator
*/
public DetailsGenerator getDetailsGenerator() {
@@ -509,7 +508,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Checks whether details are visible for the given item.
- *
+ *
* @param itemId
* the id of the item for which to check details visibility
* @return <code>true</code> iff the details are visible
@@ -552,12 +551,12 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Field factory used by default in the editor.
- *
+ *
* Aims to fields of suitable type and with suitable size for use in the
* editor row.
*/
- public static class EditorFieldFactory extends
- DefaultFieldGroupFieldFactory {
+ public static class EditorFieldFactory
+ extends DefaultFieldGroupFieldFactory {
private static final EditorFieldFactory INSTANCE = new EditorFieldFactory();
protected EditorFieldFactory() {
@@ -565,7 +564,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Returns the singleton instance
- *
+ *
* @return the singleton instance
*/
public static EditorFieldFactory get() {
@@ -573,7 +572,8 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
}
@Override
- public <T extends Field> T createField(Class<?> type, Class<T> fieldType) {
+ public <T extends Field> T createField(Class<?> type,
+ Class<T> fieldType) {
T f = super.createField(type, fieldType);
if (f != null) {
f.setWidth("100%");
@@ -610,7 +610,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Called when an exception occurs while the editor row is being saved
- *
+ *
* @param event
* An event providing more information about the error
*/
@@ -619,7 +619,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* ContextClickEvent for the Grid Component.
- *
+ *
* @since 7.6
*/
public static class GridContextClickEvent extends ContextClickEvent {
@@ -641,7 +641,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Returns the item id of context clicked row.
- *
+ *
* @return item id of clicked row; <code>null</code> if header or footer
*/
public Object getItemId() {
@@ -650,7 +650,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Returns property id of clicked column.
- *
+ *
* @return property id
*/
public Object getPropertyId() {
@@ -659,7 +659,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Return the clicked section of Grid.
- *
+ *
* @return section of grid
*/
public Section getSection() {
@@ -671,7 +671,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* of the Grid the index is the item index in the Container. Header and
* Footer rows for index can be fetched with
* {@link Grid#getHeaderRow(int)} and {@link Grid#getFooterRow(int)}.
- *
+ *
* @return row index in section
*/
public int getRowIndex() {
@@ -703,7 +703,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Retrieves the cause of the failure
- *
+ *
* @return the cause of the failure
*/
public CommitException getCause() {
@@ -717,7 +717,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Checks if validation exceptions caused this error
- *
+ *
* @return true if the problem was caused by a validation error
*/
public boolean isValidationFailure() {
@@ -727,7 +727,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Marks that an error indicator should be shown for the editor of a
* column.
- *
+ *
* @param column
* the column to show an error for
*/
@@ -737,7 +737,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Gets all the columns that have been marked as erroneous.
- *
+ *
* @return an umodifiable collection of erroneous columns
*/
public Collection<Column> getErrorColumns() {
@@ -746,7 +746,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Gets the error message to show to the user.
- *
+ *
* @return error message to show
*/
public String getUserErrorMessage() {
@@ -755,7 +755,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Sets the error message to show to the user.
- *
+ *
* @param userErrorMessage
* the user error message to set
*/
@@ -767,14 +767,14 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* An event listener for column reorder events in the Grid.
- *
+ *
* @since 7.5.0
*/
public interface ColumnReorderListener extends Serializable {
/**
* Called when the columns of the grid have been reordered.
- *
+ *
* @param event
* An event providing more information
*/
@@ -783,7 +783,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* An event that is fired when the columns are reordered.
- *
+ *
* @since 7.5.0
*/
public static class ColumnReorderEvent extends Component.Event {
@@ -791,7 +791,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
private final boolean userOriginated;
/**
- *
+ *
* @param source
* the grid where the event originated from
* @param userOriginated
@@ -806,7 +806,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Returns <code>true</code> if the column reorder was done by the user,
* <code>false</code> if not and it was triggered by server side code.
- *
+ *
* @return <code>true</code> if event is a result of user interaction
*/
public boolean isUserOriginated() {
@@ -817,14 +817,14 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* An event listener for column resize events in the Grid.
- *
+ *
* @since 7.6
*/
public interface ColumnResizeListener extends Serializable {
/**
* Called when the columns of the grid have been resized.
- *
+ *
* @param event
* An event providing more information
*/
@@ -834,7 +834,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* An event that is fired when a column is resized, either programmatically
* or by the user.
- *
+ *
* @since 7.6
*/
public static class ColumnResizeEvent extends Component.Event {
@@ -843,7 +843,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
private final boolean userOriginated;
/**
- *
+ *
* @param source
* the grid where the event originated from
* @param userOriginated
@@ -859,7 +859,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Returns the column that was resized.
- *
+ *
* @return the resized column.
*/
public Column getColumn() {
@@ -869,7 +869,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Returns <code>true</code> if the column resize was done by the user,
* <code>false</code> if not and it was triggered by server side code.
- *
+ *
* @return <code>true</code> if event is a result of user interaction
*/
public boolean isUserOriginated() {
@@ -883,19 +883,17 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
*/
public interface EditorListener extends Serializable {
- public static final Method EDITOR_OPEN_METHOD = ReflectTools
- .findMethod(EditorListener.class, "editorOpened",
- EditorOpenEvent.class);
- public static final Method EDITOR_MOVE_METHOD = ReflectTools
- .findMethod(EditorListener.class, "editorMoved",
- EditorMoveEvent.class);
+ public static final Method EDITOR_OPEN_METHOD = ReflectTools.findMethod(
+ EditorListener.class, "editorOpened", EditorOpenEvent.class);
+ public static final Method EDITOR_MOVE_METHOD = ReflectTools.findMethod(
+ EditorListener.class, "editorMoved", EditorMoveEvent.class);
public static final Method EDITOR_CLOSE_METHOD = ReflectTools
.findMethod(EditorListener.class, "editorClosed",
EditorCloseEvent.class);
/**
* Called when an editor is opened
- *
+ *
* @param e
* an editor open event object
*/
@@ -903,7 +901,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Called when an editor is reopened without closing it first
- *
+ *
* @param e
* an editor move event object
*/
@@ -911,7 +909,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Called when an editor is closed
- *
+ *
* @param e
* an editor close event object
*/
@@ -974,7 +972,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Default error handler for the editor
- *
+ *
*/
public class DefaultEditorErrorHandler implements EditorErrorHandler {
@@ -1038,7 +1036,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* {@link Grid#setSelectionMode(SelectionMode)} is equivalent to calling
* {@link Grid#setSelectionModel(SelectionModel)} with one of the built-in
* implementations of {@link SelectionModel}.
- *
+ *
* @see Grid#setSelectionMode(SelectionMode)
* @see Grid#setSelectionModel(SelectionModel)
*/
@@ -1078,7 +1076,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
public interface SelectionModel extends Serializable, Extension {
/**
* Checks whether an item is selected or not.
- *
+ *
* @param itemId
* the item id to check for
* @return <code>true</code> iff the item is selected
@@ -1087,7 +1085,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Returns a collection of all the currently selected itemIds.
- *
+ *
* @return a collection of all the currently selected itemIds
*/
Collection<Object> getSelectedRows();
@@ -1098,7 +1096,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* {@link AbstractExtension}.
* <p>
* <em>Note:</em> This method should not be called manually.
- *
+ *
* @param grid
* the Grid in which the SelectionModel currently is, or
* <code>null</code> when a selection model is being detached
@@ -1131,7 +1129,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* <p>
* This method does not clear any previous selection state, only
* adds to it.
- *
+ *
* @param itemIds
* the itemId(s) to mark as selected
* @return <code>true</code> if the selection state changed.
@@ -1150,7 +1148,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* <p>
* This method does not clear any previous selection state, only
* adds to it.
- *
+ *
* @param itemIds
* the itemIds to mark as selected
* @return <code>true</code> if the selection state changed.
@@ -1166,7 +1164,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Marks items as deselected.
- *
+ *
* @param itemIds
* the itemId(s) to remove from being selected
* @return <code>true</code> if the selection state changed.
@@ -1181,7 +1179,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Marks items as deselected.
- *
+ *
* @param itemIds
* the itemId(s) to remove from being selected
* @return <code>true</code> if the selection state changed.
@@ -1196,7 +1194,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Marks all the items in the current Container as selected
- *
+ *
* @return <code>true</code> iff some items were previously not
* selected
* @see #deselectAll()
@@ -1205,7 +1203,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Marks all the items in the current Container as deselected
- *
+ *
* @return <code>true</code> iff some items were previously selected
* @see #selectAll()
*/
@@ -1214,7 +1212,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Marks items as selected while deselecting all items not in the
* given Collection.
- *
+ *
* @param itemIds
* the itemIds to mark as selected
* @return <code>true</code> if the selection state changed.
@@ -1230,7 +1228,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Marks items as selected while deselecting all items not in the
* varargs array.
- *
+ *
* @param itemIds
* the itemIds to mark as selected
* @return <code>true</code> if the selection state changed.
@@ -1258,7 +1256,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Marks an item as selected.
- *
+ *
* @param itemId
* the itemId to mark as selected; <code>null</code> for
* deselect
@@ -1273,12 +1271,12 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* if given itemId does not exist in the container of
* Grid
*/
- boolean select(Object itemId) throws IllegalStateException,
- IllegalArgumentException;
+ boolean select(Object itemId)
+ throws IllegalStateException, IllegalArgumentException;
/**
* Gets the item id of the currently selected item.
- *
+ *
* @return the item id of the currently selected item, or
* <code>null</code> if nothing is selected
*/
@@ -1287,7 +1285,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Sets whether it's allowed to deselect the selected row through
* the UI. Deselection is allowed by default.
- *
+ *
* @param deselectAllowed
* <code>true</code> if the selected row can be
* deselected without selecting another row instead;
@@ -1298,7 +1296,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Sets whether it's allowed to deselect the selected row through
* the UI.
- *
+ *
* @return <code>true</code> if deselection is allowed; otherwise
* <code>false</code>
*/
@@ -1317,7 +1315,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* {@inheritDoc}
- *
+ *
* @return always <code>false</code>.
*/
@Override
@@ -1325,7 +1323,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* {@inheritDoc}
- *
+ *
* @return always an empty collection.
*/
@Override
@@ -1360,10 +1358,10 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Sanity check for existence of item id.
- *
+ *
* @param itemId
* item id to be selected / deselected
- *
+ *
* @throws IllegalArgumentException
* if item Id doesn't exist in the container of Grid
*/
@@ -1377,10 +1375,10 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Sanity check for existence of item ids in given collection.
- *
+ *
* @param itemIds
* item id collection to be selected / deselected
- *
+ *
* @throws IllegalArgumentException
* if at least one item id doesn't exist in the container of
* Grid
@@ -1400,7 +1398,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* Note that this is only a helper method, and routes the call all the
* way to Grid. A {@link SelectionModel} is not a
* {@link SelectionNotifier}
- *
+ *
* @param oldSelection
* the complete {@link Collection} of the itemIds that were
* selected <em>before</em> this event happened
@@ -1408,8 +1406,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* the complete {@link Collection} of the itemIds that are
* selected <em>after</em> this event happened
*/
- protected void fireSelectionEvent(
- final Collection<Object> oldSelection,
+ protected void fireSelectionEvent(final Collection<Object> oldSelection,
final Collection<Object> newSelection) {
getParentGrid().fireSelectionEvent(oldSelection, newSelection);
}
@@ -1572,7 +1569,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* The default selection size limit.
- *
+ *
* @see #setSelectionLimit(int)
*/
public static final int DEFAULT_MAX_SELECTIONS = 1000;
@@ -1685,7 +1682,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* row exceeds the new limit.
* <p>
* The default limit is {@value #DEFAULT_MAX_SELECTIONS} rows.
- *
+ *
* @param selectionLimit
* the non-negative selection limit to set
* @throws IllegalArgumentException
@@ -1701,9 +1698,9 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Gets the selection limit.
- *
+ *
* @see #setSelectionLimit(int)
- *
+ *
* @return the selection limit
*/
public int getSelectionLimit() {
@@ -1728,7 +1725,8 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
return deselect(itemIds, true);
}
- protected boolean deselect(final Collection<?> itemIds, boolean refresh) {
+ protected boolean deselect(final Collection<?> itemIds,
+ boolean refresh) {
if (itemIds == null) {
throw new IllegalArgumentException("itemIds may not be null");
}
@@ -1852,7 +1850,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Compares two sets and returns a set containing all values that are
* present in the first, but not in the second.
- *
+ *
* @param set1
* first item set
* @param set2
@@ -1907,7 +1905,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Creates a new row reference for the given grid.
- *
+ *
* @param grid
* the grid that the row belongs to
*/
@@ -1917,7 +1915,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Sets the identifying information for this row
- *
+ *
* @param itemId
* the item id of the row
*/
@@ -1927,7 +1925,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Gets the grid that contains the referenced row.
- *
+ *
* @return the grid that contains referenced row
*/
public Grid getGrid() {
@@ -1936,7 +1934,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Gets the item id of the row.
- *
+ *
* @return the item id of the row
*/
public Object getItemId() {
@@ -1945,7 +1943,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Gets the item for the row.
- *
+ *
* @return the item for the row
*/
public Item getItem() {
@@ -1973,7 +1971,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Sets the identifying information for this cell
- *
+ *
* @param propertyId
* the property id of the column
*/
@@ -1983,7 +1981,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Gets the grid that contains the referenced cell.
- *
+ *
* @return the grid that contains referenced cell
*/
public Grid getGrid() {
@@ -2006,7 +2004,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Gets the item id of the row of the cell.
- *
+ *
* @return the item id of the row
*/
public Object getItemId() {
@@ -2015,7 +2013,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Gets the item for the row of the cell.
- *
+ *
* @return the item for the row
*/
public Item getItem() {
@@ -2024,7 +2022,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Gets the value of the cell.
- *
+ *
* @return the value of the cell
*/
public Object getValue() {
@@ -2034,14 +2032,14 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* A callback interface for generating custom style names for Grid rows.
- *
+ *
* @see Grid#setRowStyleGenerator(RowStyleGenerator)
*/
public interface RowStyleGenerator extends Serializable {
/**
* Called by Grid to generate a style name for a row.
- *
+ *
* @param row
* the row to generate a style for
* @return the style name to add to this row, or {@code null} to not set
@@ -2052,14 +2050,14 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* A callback interface for generating custom style names for Grid cells.
- *
+ *
* @see Grid#setCellStyleGenerator(CellStyleGenerator)
*/
public interface CellStyleGenerator extends Serializable {
/**
* Called by Grid to generate a style name for a column.
- *
+ *
* @param cell
* the cell to generate a style for
* @return the style name to add to this cell, or {@code null} to not
@@ -2073,9 +2071,9 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* Grid rows. If a description is generated for a row, it is used for all
* the cells in the row for which a {@link CellDescriptionGenerator cell
* description} is not generated.
- *
+ *
* @see Grid#setRowDescriptionGenerator
- *
+ *
* @since 7.6
*/
public interface RowDescriptionGenerator extends Serializable {
@@ -2085,7 +2083,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* description may contain HTML which is rendered directly; if this is
* not desired the returned string must be escaped by the implementing
* method.
- *
+ *
* @param row
* the row to generate a description for
* @return the row description or {@code null} for no description
@@ -2097,9 +2095,9 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* A callback interface for generating optional descriptions (tooltips) for
* Grid cells. If a cell has both a {@link RowDescriptionGenerator row
* description} and a cell description, the latter has precedence.
- *
+ *
* @see Grid#setCellDescriptionGenerator(CellDescriptionGenerator)
- *
+ *
* @since 7.6
*/
public interface CellDescriptionGenerator extends Serializable {
@@ -2109,7 +2107,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* description may contain HTML which is rendered directly; if this is
* not desired the returned string must be escaped by the implementing
* method.
- *
+ *
* @param cell
* the cell to generate a description for
* @return the cell description or {@code null} for no description
@@ -2162,7 +2160,8 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
if (cellDescriptionGenerator != null
&& cellDescriptions.keys().length > 0) {
- rowData.put(GridState.JSONKEY_CELLDESCRIPTION, cellDescriptions);
+ rowData.put(GridState.JSONKEY_CELLDESCRIPTION,
+ cellDescriptions);
}
if (cellStyleGenerator != null && cellStyles.keys().length > 0) {
@@ -2210,7 +2209,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Abstract base class for Grid header and footer sections.
- *
+ *
* @since 7.6
* @param <ROWTYPE>
* the type of the rows in the section
@@ -2220,7 +2219,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Abstract base class for Grid header and footer rows.
- *
+ *
* @param <CELLTYPE>
* the type of the cells in the row
*/
@@ -2238,7 +2237,8 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
protected void addCell(Object propertyId) {
CELLTYPE cell = createCell();
- cell.setColumnId(section.grid.getColumn(propertyId).getState().id);
+ cell.setColumnId(
+ section.grid.getColumn(propertyId).getState().id);
cells.put(propertyId, cell);
rowState.cells.add(cell.getCellState());
}
@@ -2277,7 +2277,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Creates and returns a new instance of the cell type.
- *
+ *
* @return the created cell
*/
protected abstract CELLTYPE createCell();
@@ -2289,7 +2289,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Returns the cell for the given property id on this row. If the
* column is merged returned cell is the cell for the whole group.
- *
+ *
* @param propertyId
* the property id of the column
* @return the cell for the given property, merged cell for merged
@@ -2306,7 +2306,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Merges columns cells in a row
- *
+ *
* @param propertyIds
* The property ids of columns to merge
* @return The remaining visible cell after the merge
@@ -2324,7 +2324,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Merges columns cells in a row
- *
+ *
* @param cells
* The cells to merge. Must be from the same row.
* @return The remaining visible cell after the merge
@@ -2369,7 +2369,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Returns the custom style name for this row.
- *
+ *
* @return the style name or null if no style name has been set
*/
public String getStyleName() {
@@ -2378,7 +2378,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Sets a custom style name for this row.
- *
+ *
* @param styleName
* the style name to set or null to not use any style
* name
@@ -2389,7 +2389,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Writes the declarative design to the given table row element.
- *
+ *
* @since 7.5.0
* @param trElement
* Element to write design to
@@ -2413,8 +2413,8 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
for (Entry<Set<CELLTYPE>, CELLTYPE> entry : cellGroups
.entrySet()) {
if (entry.getValue() == cell) {
- cellElement.attr("colspan", ""
- + entry.getKey().size());
+ cellElement.attr("colspan",
+ "" + entry.getKey().size());
break;
}
}
@@ -2423,7 +2423,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Reads the declarative design from the given table row element.
- *
+ *
* @since 7.5.0
* @param trElement
* Element to read design from
@@ -2460,8 +2460,8 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
totalColSpans += colspan - 1;
join(cells).readDesign(element, designContext);
} else {
- cells.iterator().next()
- .readDesign(element, designContext);
+ cells.iterator().next().readDesign(element,
+ designContext);
}
}
}
@@ -2497,7 +2497,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Gets the row where this cell is.
- *
+ *
* @return row for this cell
*/
public StaticRow<?> getRow() {
@@ -2510,7 +2510,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Sets the text displayed in this cell.
- *
+ *
* @param text
* a plain text caption
*/
@@ -2523,7 +2523,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Returns the text displayed in this cell.
- *
+ *
* @return the plain text caption
*/
public String getText() {
@@ -2537,9 +2537,9 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Returns the HTML content displayed in this cell.
- *
+ *
* @return the html
- *
+ *
*/
public String getHtml() {
if (cellState.type != GridStaticCellType.HTML) {
@@ -2552,7 +2552,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Sets the HTML content displayed in this cell.
- *
+ *
* @param html
* the html to set
*/
@@ -2565,7 +2565,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Returns the component displayed in this cell.
- *
+ *
* @return the component
*/
public Component getComponent() {
@@ -2579,7 +2579,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Sets the component displayed in this cell.
- *
+ *
* @param component
* the component to set
*/
@@ -2593,7 +2593,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Returns the type of content stored in this cell.
- *
+ *
* @return cell content type
*/
public GridStaticCellType getCellType() {
@@ -2602,7 +2602,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Returns the custom style name for this cell.
- *
+ *
* @return the style name or null if no style name has been set
*/
public String getStyleName() {
@@ -2611,7 +2611,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Sets a custom style name for this cell.
- *
+ *
* @param styleName
* the style name to set or null to not use any style
* name
@@ -2631,7 +2631,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Writes the declarative design to the given table cell element.
- *
+ *
* @since 7.5.0
* @param cellElement
* Element to write design to
@@ -2649,15 +2649,15 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
cellElement.append(getHtml());
break;
case WIDGET:
- cellElement.appendChild(designContext
- .createElement(getComponent()));
+ cellElement.appendChild(
+ designContext.createElement(getComponent()));
break;
}
}
/**
* Reads the declarative design from the given table cell element.
- *
+ *
* @since 7.5.0
* @param cellElement
* Element to read design from
@@ -2669,15 +2669,15 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
if (!cellElement.hasAttr("plain-text")) {
if (cellElement.children().size() > 0
&& cellElement.child(0).tagName().contains("-")) {
- setComponent(designContext.readDesign(cellElement
- .child(0)));
+ setComponent(
+ designContext.readDesign(cellElement.child(0)));
} else {
setHtml(cellElement.html());
}
} else {
// text – need to unescape HTML entities
- setText(DesignFormatter.decodeFromTextNode(cellElement
- .html()));
+ setText(DesignFormatter
+ .decodeFromTextNode(cellElement.html()));
}
}
@@ -2691,7 +2691,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Sets the visibility of the whole section.
- *
+ *
* @param visible
* true to show this section, false to hide
*/
@@ -2704,7 +2704,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Returns the visibility of this section.
- *
+ *
* @return true if visible, false otherwise.
*/
public boolean isVisible() {
@@ -2713,10 +2713,10 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Removes the row at the given position.
- *
+ *
* @param rowIndex
* the position of the row
- *
+ *
* @throws IllegalArgumentException
* if no row exists at given index
* @see #removeRow(StaticRow)
@@ -2726,8 +2726,8 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
*/
public ROWTYPE removeRow(int rowIndex) {
if (rowIndex >= rows.size() || rowIndex < 0) {
- throw new IllegalArgumentException("No row at given index "
- + rowIndex);
+ throw new IllegalArgumentException(
+ "No row at given index " + rowIndex);
}
ROWTYPE row = rows.remove(rowIndex);
row.detach();
@@ -2739,10 +2739,10 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Removes the given row from the section.
- *
+ *
* @param row
* the row to be removed
- *
+ *
* @throws IllegalArgumentException
* if the row does not exist in this section
* @see #removeRow(int)
@@ -2761,22 +2761,22 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Gets row at given index.
- *
+ *
* @param rowIndex
* 0 based index for row. Counted from top to bottom
* @return row at given index
*/
public ROWTYPE getRow(int rowIndex) {
if (rowIndex >= rows.size() || rowIndex < 0) {
- throw new IllegalArgumentException("No row at given index "
- + rowIndex);
+ throw new IllegalArgumentException(
+ "No row at given index " + rowIndex);
}
return rows.get(rowIndex);
}
/**
* Adds a new row at the top of this section.
- *
+ *
* @return the new row
* @see #appendRow()
* @see #addRowAt(int)
@@ -2789,7 +2789,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Adds a new row at the bottom of this section.
- *
+ *
* @return the new row
* @see #prependRow()
* @see #addRowAt(int)
@@ -2802,11 +2802,11 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Inserts a new row at the given position.
- *
+ *
* @param index
* the position at which to insert the row
* @return the new row
- *
+ *
* @throws IndexOutOfBoundsException
* if the index is out of bounds
* @see #appendRow()
@@ -2833,7 +2833,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Gets the amount of rows in this section.
- *
+ *
* @return row count
*/
public int getRowCount() {
@@ -2853,7 +2853,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Removes a column for given property id from the section.
- *
+ *
* @param propertyId
* property to be removed
*/
@@ -2865,7 +2865,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Adds a column for given property id to the section.
- *
+ *
* @param propertyId
* property to be added
*/
@@ -2877,7 +2877,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Performs a sanity check that section is in correct state.
- *
+ *
* @throws IllegalStateException
* if merged cells are not i n continuous range
*/
@@ -2917,7 +2917,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Writes the declarative design to the given table section element.
- *
+ *
* @since 7.5.0
* @param tableSectionElement
* Element to write design to
@@ -2934,7 +2934,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Writes the declarative design from the given table section element.
- *
+ *
* @since 7.5.0
* @param tableSectionElement
* Element to read design from
@@ -2980,10 +2980,10 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Sets the default row of this header. The default row is a special
* header row providing a user interface for sorting columns.
- *
+ *
* @param row
* the new default row, or null for no default row
- *
+ *
* @throws IllegalArgumentException
* this header does not contain the row
*/
@@ -3012,7 +3012,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Returns the current default row of this header. The default row is a
* special header row providing a user interface for sorting columns.
- *
+ *
* @return the default row or null if no default row set
*/
public HeaderRow getDefaultRow() {
@@ -3106,11 +3106,12 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
}
@Override
- protected void readDesign(Element trElement, DesignContext designContext) {
+ protected void readDesign(Element trElement,
+ DesignContext designContext) {
super.readDesign(trElement, designContext);
- boolean defaultRow = DesignAttributeHandler.readAttribute(
- "default", trElement.attributes(), false, boolean.class);
+ boolean defaultRow = DesignAttributeHandler.readAttribute("default",
+ trElement.attributes(), false, boolean.class);
if (defaultRow) {
section.grid.setDefaultHeaderRow(this);
}
@@ -3221,7 +3222,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Internally used constructor.
- *
+ *
* @param grid
* The grid this column belongs to. Should not be null.
* @param state
@@ -3239,7 +3240,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Returns the serializable state of this column that is sent to the
* client side connector.
- *
+ *
* @return the internal state of the column
*/
GridColumnState getState() {
@@ -3248,7 +3249,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Returns the property id for the backing property of this Column
- *
+ *
* @return property id
*/
public Object getPropertyId() {
@@ -3258,9 +3259,9 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Returns the caption of the header. By default the header caption is
* the property id of the column.
- *
+ *
* @return the text in the default row of header.
- *
+ *
* @throws IllegalStateException
* if the column no longer is attached to the grid
*/
@@ -3274,11 +3275,11 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* Sets the caption of the header. This caption is also used as the
* hiding toggle caption, unless it is explicitly set via
* {@link #setHidingToggleCaption(String)}.
- *
+ *
* @param caption
* the text to show in the caption
* @return the column itself
- *
+ *
* @throws IllegalStateException
* if the column is no longer attached to any grid
*/
@@ -3292,15 +3293,15 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
HeaderRow row = grid.getHeader().getDefaultRow();
if (row != null) {
- row.getCell(grid.getPropertyIdByColumnId(state.id)).setText(
- caption);
+ row.getCell(grid.getPropertyIdByColumnId(state.id))
+ .setText(caption);
}
return this;
}
/**
* Gets the caption of the hiding toggle for this column.
- *
+ *
* @since 7.5.0
* @see #setHidingToggleCaption(String)
* @return the caption for the hiding toggle for this column
@@ -3322,7 +3323,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* <p>
* <em>NOTE:</em> setting this to empty string might cause the hiding
* toggle to not render correctly.
- *
+ *
* @since 7.5.0
* @param hidingToggleCaption
* the text to show in the column hiding toggle
@@ -3340,7 +3341,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Returns the width (in pixels). By default a column is 100px wide.
- *
+ *
* @return the width in pixels of the column
* @throws IllegalStateException
* if the column is no longer attached to any grid
@@ -3356,23 +3357,23 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* This overrides any configuration set by any of
* {@link #setExpandRatio(int)}, {@link #setMinimumWidth(double)} or
* {@link #setMaximumWidth(double)}.
- *
+ *
* @param pixelWidth
* the new pixel width of the column
* @return the column itself
- *
+ *
* @throws IllegalStateException
* if the column is no longer attached to any grid
* @throws IllegalArgumentException
* thrown if pixel width is less than zero
*/
- public Column setWidth(double pixelWidth) throws IllegalStateException,
- IllegalArgumentException {
+ public Column setWidth(double pixelWidth)
+ throws IllegalStateException, IllegalArgumentException {
checkColumnIsAttached();
if (pixelWidth < 0) {
throw new IllegalArgumentException(
- "Pixel width should be greated than 0 (in "
- + toString() + ")");
+ "Pixel width should be greated than 0 (in " + toString()
+ + ")");
}
if (state.width != pixelWidth) {
state.width = pixelWidth;
@@ -3384,7 +3385,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Returns whether this column has an undefined width.
- *
+ *
* @since 7.6
* @return whether the width is undefined
* @throws IllegalStateException
@@ -3399,7 +3400,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* Marks the column width as undefined. An undefined width means the
* grid is free to resize the column based on the cell contents and
* available space in the grid.
- *
+ *
* @return the column itself
*/
public Column setWidthUndefined() {
@@ -3415,7 +3416,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Checks if column is attached and throws an
* {@link IllegalStateException} if it is not
- *
+ *
* @throws IllegalStateException
* if the column is no longer attached to any grid
*/
@@ -3427,17 +3428,18 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Sets this column as the last frozen column in its grid.
- *
+ *
* @return the column itself
- *
+ *
* @throws IllegalArgumentException
* if the column is no longer attached to any grid
* @see Grid#setFrozenColumnCount(int)
*/
public Column setLastFrozenColumn() {
checkColumnIsAttached();
- grid.setFrozenColumnCount(grid.getState(false).columnOrder
- .indexOf(getState().id) + 1);
+ grid.setFrozenColumnCount(
+ grid.getState(false).columnOrder.indexOf(getState().id)
+ + 1);
return this;
}
@@ -3446,14 +3448,14 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* <p>
* If a suitable converter isn't defined explicitly, the session
* converter factory is used to find a compatible converter.
- *
+ *
* @param renderer
* the renderer to use
* @return the column itself
- *
+ *
* @throws IllegalArgumentException
* if no compatible converter could be found
- *
+ *
* @see VaadinSession#getConverterFactory()
* @see ConverterUtil#getConverter(Class, Class, VaadinSession)
* @see #setConverter(Converter)
@@ -3473,13 +3475,13 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Sets the renderer for this column and the converter used to convert
* from the property value type to the renderer presentation type.
- *
+ *
* @param renderer
* the renderer to use, cannot be null
* @param converter
* the converter to use
* @return the column itself
- *
+ *
* @throws IllegalArgumentException
* if the renderer is already associated with a grid column
*/
@@ -3504,12 +3506,12 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Sets the converter used to convert from the property value type to
* the renderer presentation type.
- *
+ *
* @param converter
* the converter to use, or {@code null} to not use any
* converters
* @return the column itself
- *
+ *
* @throws IllegalArgumentException
* if the types are not compatible
*/
@@ -3540,7 +3542,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* Since the converter is null (i.e. will be removed), we need
* to know that the renderer and model are compatible. If not,
* we can't allow for this to happen.
- *
+ *
* The constructor is allowed to call this method with null
* without any compatibility checks, therefore we have a special
* case for it.
@@ -3548,17 +3550,14 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
Class<?> rendererPresentationType = getRenderer()
.getPresentationType();
- if (!isFirstConverterAssignment
- && !rendererPresentationType
- .isAssignableFrom(modelType)) {
+ if (!isFirstConverterAssignment && !rendererPresentationType
+ .isAssignableFrom(modelType)) {
throw new IllegalArgumentException(
"Cannot remove converter, "
+ "as renderer's presentation type "
+ rendererPresentationType.getName()
- + " and column's "
- + "model "
- + modelType.getName()
- + " type aren't "
+ + " and column's " + "model "
+ + modelType.getName() + " type aren't "
+ "directly compatible with each other (in "
+ toString() + ")");
}
@@ -3575,7 +3574,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Returns the renderer instance used by this column.
- *
+ *
* @return the renderer
*/
public Renderer<?> getRenderer() {
@@ -3584,7 +3583,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Returns the converter instance used by this column.
- *
+ *
* @return the converter
*/
public Converter<?, ?> getConverter() {
@@ -3624,8 +3623,8 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
}
private Class<?> getModelType() {
- return grid.getContainerDataSource().getType(
- grid.getPropertyIdByColumnId(state.id));
+ return grid.getContainerDataSource()
+ .getType(grid.getPropertyIdByColumnId(state.id));
}
/**
@@ -3633,12 +3632,12 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* sorted by a sortable column by clicking or tapping the column's
* default header. Programmatic sorting using the Grid#sort methods is
* not affected by this setting.
- *
+ *
* @param sortable
* {@code true} if the user should be able to sort the
* column, {@code false} otherwise
* @return the column itself
- *
+ *
* @throws IllegalStateException
* if the data source of the Grid does not implement
* {@link Sortable}
@@ -3651,15 +3650,14 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
if (sortable) {
if (!(grid.datasource instanceof Sortable)) {
- throw new IllegalStateException(
- "Can't set column "
- + toString()
- + " sortable. The Container of Grid does not implement Sortable");
+ throw new IllegalStateException("Can't set column "
+ + toString()
+ + " sortable. The Container of Grid does not implement Sortable");
} else if (!((Sortable) grid.datasource)
- .getSortableContainerPropertyIds().contains(propertyId)) {
+ .getSortableContainerPropertyIds()
+ .contains(propertyId)) {
throw new IllegalStateException(
- "Can't set column "
- + toString()
+ "Can't set column " + toString()
+ " sortable. Container doesn't support sorting by property "
+ propertyId);
}
@@ -3675,7 +3673,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* <p>
* <em>Note:</em> it is possible to sort by this column programmatically
* using the Grid#sort methods regardless of the returned value.
- *
+ *
* @return {@code true} if the column is sortable by the user,
* {@code false} otherwise
*/
@@ -3708,7 +3706,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* reserves only one of those. The column with a ratio of 2, is as wide
* as it needs to be, <strong>plus two thirds</strong> of the excess
* width.
- *
+ *
* @param expandRatio
* the expand ratio of this column. {@code 0} to not have it
* expand at all. A negative number to clear the expand
@@ -3728,7 +3726,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Returns the column's expand ratio.
- *
+ *
* @return the column's expand ratio
* @see #setExpandRatio(int)
*/
@@ -3740,7 +3738,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* Clears the expand ratio for this column.
* <p>
* Equal to calling {@link #setExpandRatio(int) setExpandRatio(-1)}
- *
+ *
* @throws IllegalStateException
* if the column is no longer attached to any grid
*/
@@ -3753,7 +3751,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* <p>
* This defines the minimum guaranteed pixel width of the column
* <em>when it is set to expand</em>.
- *
+ *
* @throws IllegalStateException
* if the column is no longer attached to any grid
* @see #setExpandRatio(int)
@@ -3775,7 +3773,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Return the minimum width for this column.
- *
+ *
* @return the minimum width for this column
* @see #setMinimumWidth(double)
*/
@@ -3786,9 +3784,9 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Sets the maximum width for this column.
* <p>
- * This defines the maximum allowed pixel width of the column
- * <em>when it is set to expand</em>.
- *
+ * This defines the maximum allowed pixel width of the column <em>when
+ * it is set to expand</em>.
+ *
* @param pixels
* the maximum width
* @throws IllegalStateException
@@ -3812,7 +3810,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Returns the maximum width for this column.
- *
+ *
* @return the maximum width for this column
* @see #setMaximumWidth(double)
*/
@@ -3830,15 +3828,15 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* are not automatically assigned an editor field and, if one is
* manually assigned, it is not used. Columns that cannot (or should
* not) be edited even in principle should be set non-editable.
- *
+ *
* @param editable
* {@code true} if this column should be editable,
* {@code false} otherwise
* @return this column
- *
+ *
* @throws IllegalStateException
* if the editor is currently active
- *
+ *
* @see Grid#editItem(Object)
* @see Grid#isEditorActive()
*/
@@ -3856,10 +3854,10 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Returns whether the properties corresponding to this column should be
* editable when the item editor is active.
- *
+ *
* @return {@code true} if this column is editable, {@code false}
* otherwise
- *
+ *
* @see Grid#editItem(Object)
* @see #setEditable(boolean)
*/
@@ -3877,7 +3875,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* Setting the field to <code>null</code> clears any previously set
* field, causing a new field to be created the next time the item
* editor is opened.
- *
+ *
* @param editor
* the editor field
* @return this column
@@ -3900,10 +3898,10 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* user-provided <code>FieldGroup</code> might cause
* {@link com.vaadin.data.fieldgroup.FieldGroup.BindException
* BindException} to be thrown.
- *
+ *
* @return the bound field; or <code>null</code> if the respective
* column is not editable
- *
+ *
* @throws IllegalArgumentException
* if there is no column for the provided property id
* @throws FieldGroup.BindException
@@ -3917,7 +3915,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Hides or shows the column. By default columns are visible before
* explicitly hiding them.
- *
+ *
* @since 7.5.0
* @param hidden
* <code>true</code> to hide the column, <code>false</code>
@@ -3935,7 +3933,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Returns whether this column is hidden. Default is {@code false}.
- *
+ *
* @since 7.5.0
* @return <code>true</code> if the column is currently hidden,
* <code>false</code> otherwise
@@ -3947,7 +3945,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Sets whether this column can be hidden by the user. Hidable columns
* can be hidden and shown via the sidebar menu.
- *
+ *
* @since 7.5.0
* @param hidable
* <code>true</code> iff the column may be hidable by the
@@ -3968,7 +3966,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* <p>
* <em>Note:</em> the column can be programmatically hidden using
* {@link #setHidden(boolean)} regardless of the returned value.
- *
+ *
* @since 7.5.0
* @return <code>true</code> if the user can hide the column,
* <code>false</code> if not
@@ -3979,7 +3977,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Sets whether this column can be resized by the user.
- *
+ *
* @since 7.6
* @param resizable
* {@code true} if this column should be resizable,
@@ -4000,7 +3998,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* <em>Note:</em> the column can be programmatically resized using
* {@link #setWidth(double)} and {@link #setWidthUndefined()} regardless
* of the returned value.
- *
+ *
* @since 7.6
* @return {@code true} if this column is resizable, {@code false}
* otherwise
@@ -4011,16 +4009,17 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Writes the design attributes for this column into given element.
- *
+ *
* @since 7.5.0
- *
+ *
* @param design
* Element to write attributes into
- *
+ *
* @param designContext
* the design context
*/
- protected void writeDesign(Element design, DesignContext designContext) {
+ protected void writeDesign(Element design,
+ DesignContext designContext) {
Attributes attributes = design.attributes();
GridColumnState def = new GridColumnState();
@@ -4054,7 +4053,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Reads the design attributes for this column from given element.
- *
+ *
* @since 7.5.0
* @param design
* Element to read attributes from
@@ -4096,12 +4095,12 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
attributes, Double.class));
}
if (design.hasAttr("min-width")) {
- setMinimumWidth(DesignAttributeHandler.readAttribute(
- "min-width", attributes, Double.class));
+ setMinimumWidth(DesignAttributeHandler
+ .readAttribute("min-width", attributes, Double.class));
}
if (design.hasAttr("max-width")) {
- setMaximumWidth(DesignAttributeHandler.readAttribute(
- "max-width", attributes, Double.class));
+ setMaximumWidth(DesignAttributeHandler
+ .readAttribute("max-width", attributes, Double.class));
}
if (design.hasAttr("expand")) {
if (design.attr("expand").isEmpty()) {
@@ -4120,12 +4119,12 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* currently extends the AbstractExtension superclass, but this fact should
* be regarded as an implementation detail and subject to change in a future
* major or minor Vaadin revision.
- *
+ *
* @param <T>
* the type this renderer knows how to present
*/
- public static abstract class AbstractRenderer<T> extends
- AbstractGridExtension implements Renderer<T> {
+ public static abstract class AbstractRenderer<T>
+ extends AbstractGridExtension implements Renderer<T> {
private final Class<T> presentationType;
@@ -4177,7 +4176,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Null representation for the renderer
- *
+ *
* @return a textual representation of {@code null}
*/
protected String getNullRepresentation() {
@@ -4193,7 +4192,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* is desired. For instance, a {@code Renderer<Date>} could first turn a
* date value into a formatted string and return
* {@code encode(dateString, String.class)}.
- *
+ *
* @param value
* the value to be encoded
* @param type
@@ -4201,15 +4200,16 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* @return a JSON representation of the given value
*/
protected <U> JsonValue encode(U value, Class<U> type) {
- return JsonCodec.encode(value, null, type,
- getUI().getConnectorTracker()).getEncodedValue();
+ return JsonCodec
+ .encode(value, null, type, getUI().getConnectorTracker())
+ .getEncodedValue();
}
/**
* Converts and encodes the given data model property value using the
* given converter and renderer. This method is public only for testing
* purposes.
- *
+ *
* @since 7.6
* @param renderer
* the renderer to use
@@ -4222,7 +4222,8 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* @return an encoded value ready to be sent to the client
*/
public static <T> JsonValue encodeValue(Object modelValue,
- Renderer<T> renderer, Converter<?, ?> converter, Locale locale) {
+ Renderer<T> renderer, Converter<?, ?> converter,
+ Locale locale) {
Class<T> presentationType = renderer.getPresentationType();
T presentationValue;
@@ -4245,13 +4246,13 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
}
}
} else {
- assert presentationType.isAssignableFrom(converter
- .getPresentationType());
+ assert presentationType
+ .isAssignableFrom(converter.getPresentationType());
@SuppressWarnings("unchecked")
Converter<T, Object> safeConverter = (Converter<T, Object>) converter;
- presentationValue = safeConverter
- .convertToPresentation(modelValue,
- safeConverter.getPresentationType(), locale);
+ presentationValue = safeConverter.convertToPresentation(
+ modelValue, safeConverter.getPresentationType(),
+ locale);
}
JsonValue encodedValue;
@@ -4277,11 +4278,11 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* Note: If the extension is an instance of {@link DataGenerator} it will
* automatically register itself to {@link RpcDataProviderExtension} of
* extended Grid. On remove this registration is automatically removed.
- *
+ *
* @since 7.5
*/
- public static abstract class AbstractGridExtension extends
- AbstractExtension {
+ public static abstract class AbstractGridExtension
+ extends AbstractExtension {
/**
* Constructs a new Grid extension.
@@ -4292,7 +4293,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Constructs a new Grid extension and extends given Grid.
- *
+ *
* @param grid
* a grid instance
*/
@@ -4327,7 +4328,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* A key is used to identify a particular row on both a server and a
* client. This method can be used to get the item id for the row key
* that the client has sent.
- *
+ *
* @param rowKey
* the row key for which to retrieve an item id
* @return the item id corresponding to {@code key}
@@ -4342,7 +4343,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* An id is used to identify a particular column on both a server and a
* client. This method can be used to get the column for the column id
* that the client has sent.
- *
+ *
* @param columnId
* the column id for which to retrieve a column
* @return the column corresponding to {@code columnId}
@@ -4353,7 +4354,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Gets the parent Grid of the renderer.
- *
+ *
* @return parent grid
* @throws IllegalStateException
* if parent is not Grid
@@ -4375,7 +4376,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Resends the row data for given item id to the client.
- *
+ *
* @since 7.6
* @param itemId
* row to refresh
@@ -4387,7 +4388,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Informs the parent Grid that this Extension wants to add a child
* component to it.
- *
+ *
* @since 7.6
* @param c
* component
@@ -4399,7 +4400,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Informs the parent Grid that this Extension wants to remove a child
* component from it.
- *
+ *
* @since 7.6
* @param c
* component
@@ -4436,8 +4437,8 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
@Override
public void containerPropertySetChange(PropertySetChangeEvent event) {
- Collection<?> properties = new HashSet<Object>(event.getContainer()
- .getContainerPropertyIds());
+ Collection<?> properties = new HashSet<Object>(
+ event.getContainer().getContainerPropertyIds());
// Find columns that need to be removed.
List<Column> removedColumns = new LinkedList<Column>();
@@ -4474,7 +4475,8 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
.getSortableContainerPropertyIds();
for (Object propertyId : columns.keySet()) {
Column column = columns.get(propertyId);
- if (!sortables.contains(propertyId) && column.isSortable()) {
+ if (!sortables.contains(propertyId)
+ && column.isSortable()) {
column.setSortable(false);
}
}
@@ -4510,7 +4512,8 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
private Object editedItemId = null;
private boolean editorActive = false;
/**
- * True while the editor is storing the field values, i.e. commiting the field group.
+ * True while the editor is storing the field values, i.e. commiting the
+ * field group.
*/
private boolean editorSaving = false;
private FieldGroup editorFieldGroup = new CustomFieldGroup();
@@ -4525,7 +4528,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* <code>true</code> if Grid is using the internal IndexedContainer created
* in Grid() constructor, or <code>false</code> if the user has set their
* own Container.
- *
+ *
* @see #setContainerDataSource(Indexed)
* @see #Grid()
*/
@@ -4538,18 +4541,19 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
private Set<Component> extensionComponents = new HashSet<Component>();
private static final Method SELECTION_CHANGE_METHOD = ReflectTools
- .findMethod(SelectionListener.class, "select", SelectionEvent.class);
+ .findMethod(SelectionListener.class, "select",
+ SelectionEvent.class);
private static final Method SORT_ORDER_CHANGE_METHOD = ReflectTools
.findMethod(SortListener.class, "sort", SortEvent.class);
- private static final Method COLUMN_REORDER_METHOD = ReflectTools
- .findMethod(ColumnReorderListener.class, "columnReorder",
- ColumnReorderEvent.class);
+ private static final Method COLUMN_REORDER_METHOD = ReflectTools.findMethod(
+ ColumnReorderListener.class, "columnReorder",
+ ColumnReorderEvent.class);
- private static final Method COLUMN_RESIZE_METHOD = ReflectTools
- .findMethod(ColumnResizeListener.class, "columnResize",
- ColumnResizeEvent.class);
+ private static final Method COLUMN_RESIZE_METHOD = ReflectTools.findMethod(
+ ColumnResizeListener.class, "columnResize",
+ ColumnResizeEvent.class);
private static final Method COLUMN_VISIBILITY_METHOD = ReflectTools
.findMethod(ColumnVisibilityChangeListener.class,
@@ -4566,7 +4570,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Creates a new Grid using the given data source.
- *
+ *
* @param dataSource
* the indexed container to use as a data source
*/
@@ -4577,7 +4581,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Creates a new Grid with the given caption and a new
* {@link IndexedContainer} data source.
- *
+ *
* @param caption
* the caption of the grid
*/
@@ -4588,7 +4592,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Creates a new Grid with the given caption and data source. If the data
* source is null, a new {@link IndexedContainer} will be used.
- *
+ *
* @param caption
* the caption of the grid
* @param dataSource
@@ -4664,11 +4668,13 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
getState(false).columnOrder = newColumnOrder;
// write changes to diffState so that possible reverting the
// column order is sent to client
- assert diffState.hasKey(diffStateKey) : "Field name has changed";
+ assert diffState
+ .hasKey(diffStateKey) : "Field name has changed";
Type type = null;
try {
- type = (getState(false).getClass().getDeclaredField(
- diffStateKey).getGenericType());
+ type = (getState(false).getClass()
+ .getDeclaredField(diffStateKey)
+ .getGenericType());
} catch (NoSuchFieldException e) {
e.printStackTrace();
} catch (SecurityException e) {
@@ -4703,11 +4709,13 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
JsonObject diffState = connectorTracker
.getDiffState(Grid.this);
- assert diffState.hasKey(diffStateKey) : "Field name has changed";
+ assert diffState
+ .hasKey(diffStateKey) : "Field name has changed";
Type type = null;
try {
- type = (getState(false).getClass().getDeclaredField(
- diffStateKey).getGenericType());
+ type = (getState(false).getClass()
+ .getDeclaredField(diffStateKey)
+ .getGenericType());
} catch (NoSuchFieldException e) {
e.printStackTrace();
} catch (SecurityException e) {
@@ -4726,14 +4734,14 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
@Override
public void contextClick(int rowIndex, String rowKey,
- String columnId, Section section, MouseEventDetails details) {
+ String columnId, Section section,
+ MouseEventDetails details) {
Object itemId = null;
if (rowKey != null) {
itemId = getKeyMapper().get(rowKey);
}
- fireEvent(new GridContextClickEvent(Grid.this, details,
- section, rowIndex, itemId,
- getPropertyIdByColumnId(columnId)));
+ fireEvent(new GridContextClickEvent(Grid.this, details, section,
+ rowIndex, itemId, getPropertyIdByColumnId(columnId)));
}
@Override
@@ -4804,8 +4812,8 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
success = true;
} catch (CommitException e) {
try {
- CommitErrorEvent event = new CommitErrorEvent(
- Grid.this, e);
+ CommitErrorEvent event = new CommitErrorEvent(Grid.this,
+ e);
getEditorErrorHandler().commitError(event);
errorMessage = event.getUserErrorMessage();
@@ -4827,8 +4835,8 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
}
private void handleError(Exception e) {
- com.vaadin.server.ErrorEvent.findErrorHandler(Grid.this).error(
- new ConnectorErrorEvent(Grid.this, e));
+ com.vaadin.server.ErrorEvent.findErrorHandler(Grid.this)
+ .error(new ConnectorErrorEvent(Grid.this, e));
}
});
}
@@ -4980,8 +4988,8 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
// Initial sorting is defined by container
if (datasource instanceof Sortable) {
column.setSortable(((Sortable) datasource)
- .getSortableContainerPropertyIds().contains(
- propertyId));
+ .getSortableContainerPropertyIds()
+ .contains(propertyId));
} else {
column.setSortable(false);
}
@@ -4992,8 +5000,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
if (!properties.contains(property)) {
throw new IllegalStateException(
"Found at least one column in Grid that does not exist in the given container: "
- + property
- + " with the header \""
+ + property + " with the header \""
+ getColumn(property).getHeaderCaption()
+ "\". "
+ "Call removeAllColumns() before setContainerDataSource() if you want to reconfigure the columns based on the new container.");
@@ -5001,8 +5008,8 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
if (!(datasource instanceof Sortable)
|| !((Sortable) datasource)
- .getSortableContainerPropertyIds().contains(
- property)) {
+ .getSortableContainerPropertyIds()
+ .contains(property)) {
columns.get(property).setSortable(false);
}
}
@@ -5011,7 +5018,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Returns the grid data source.
- *
+ *
* @return the container data source of the grid
*/
public Container.Indexed getContainerDataSource() {
@@ -5020,7 +5027,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Returns a column based on the property id
- *
+ *
* @param propertyId
* the property id of the column
* @return the column or <code>null</code> if not found
@@ -5032,7 +5039,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Returns a copy of currently configures columns in their current visual
* order in this Grid.
- *
+ *
* @return unmodifiable copy of current columns in visual order
*/
public List<Column> getColumns() {
@@ -5050,11 +5057,11 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* <p>
* Note that adding a new property is only done for the default container
* that Grid sets up with the default constructor.
- *
+ *
* @param propertyId
* the property id of the new column
* @return the new column
- *
+ *
* @throws IllegalStateException
* if column for given property already exists in this grid
*/
@@ -5067,13 +5074,13 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
addColumnProperty(propertyId, String.class, "");
} else {
if (columns.containsKey(propertyId)) {
- throw new IllegalStateException("A column for property id '"
- + propertyId.toString()
- + "' already exists in this grid");
+ throw new IllegalStateException(
+ "A column for property id '" + propertyId.toString()
+ + "' already exists in this grid");
} else {
- throw new IllegalStateException("Property id '"
- + propertyId.toString()
- + "' does not exist in the container");
+ throw new IllegalStateException(
+ "Property id '" + propertyId.toString()
+ + "' does not exist in the container");
}
}
@@ -5097,13 +5104,13 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* <p>
* Note that adding a new property is only done for the default container
* that Grid sets up with the default constructor.
- *
+ *
* @param propertyId
* the property id of the new column
* @param type
* the data type for the new property
* @return the new column
- *
+ *
* @throws IllegalStateException
* if column for given property already exists in this grid or
* property already exists in the container with wrong type
@@ -5124,9 +5131,8 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
if (!datasource.getContainerPropertyIds().contains(propertyId)) {
datasource.addContainerProperty(propertyId, type, defaultValue);
} else {
- Property<?> containerProperty = datasource
- .getContainerProperty(datasource.firstItemId(),
- propertyId);
+ Property<?> containerProperty = datasource.getContainerProperty(
+ datasource.firstItemId(), propertyId);
if (containerProperty.getType() == type) {
appendColumn(propertyId);
} else {
@@ -5157,7 +5163,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* Used internally by the {@link Grid} to get a {@link Column} by
* referencing its generated state id. Also used by {@link Column} to verify
* if it has been detached from the {@link Grid}.
- *
+ *
* @param columnId
* the client id generated for the column when the column is
* added to the grid
@@ -5171,7 +5177,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Used internally by the {@link Grid} to get a property id by referencing
* the columns generated state id.
- *
+ *
* @param columnId
* The state id of the column
* @return The column instance or null if not found
@@ -5183,7 +5189,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Returns whether column reordering is allowed. Default value is
* <code>false</code>.
- *
+ *
* @since 7.5.0
* @return true if reordering is allowed
*/
@@ -5194,7 +5200,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Sets whether or not column reordering is allowed. Default value is
* <code>false</code>.
- *
+ *
* @since 7.5.0
* @param columnReorderingAllowed
* specifies whether column reordering is allowed
@@ -5218,7 +5224,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Creates a new column based on a property id and appends it as the last
* column.
- *
+ *
* @param datasourcePropertyId
* The property id of a property in the datasource
*/
@@ -5240,8 +5246,8 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
header.addColumn(datasourcePropertyId);
footer.addColumn(datasourcePropertyId);
- String humanFriendlyPropertyId = SharedUtil
- .propertyIdToHumanFriendly(String.valueOf(datasourcePropertyId));
+ String humanFriendlyPropertyId = SharedUtil.propertyIdToHumanFriendly(
+ String.valueOf(datasourcePropertyId));
column.setHeaderCaption(humanFriendlyPropertyId);
if (datasource instanceof Sortable
@@ -5255,14 +5261,15 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Removes a column from Grid based on a property id.
- *
+ *
* @param propertyId
* The property id of column to be removed
- *
+ *
* @throws IllegalArgumentException
* if there is no column for given property id in this grid
*/
- public void removeColumn(Object propertyId) throws IllegalArgumentException {
+ public void removeColumn(Object propertyId)
+ throws IllegalArgumentException {
if (!columns.keySet().contains(propertyId)) {
throw new IllegalArgumentException(
"There is no column for given property id " + propertyId);
@@ -5289,9 +5296,9 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* property id is not in propertyIds are removed. Similarly, a column is
* added for any property id in propertyIds that has no corresponding column
* in this Grid.
- *
+ *
* @since 7.5.0
- *
+ *
* @param propertyIds
* properties in the desired column order
*/
@@ -5313,7 +5320,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* Sets a new column order for the grid. All columns which are not ordered
* here will remain in the order they were before as the last columns of
* grid.
- *
+ *
* @param propertyIds
* properties in the order columns should be
*/
@@ -5345,10 +5352,10 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* -1 will also disable the selection column.
* <p>
* The default value is 0.
- *
+ *
* @param numberOfColumns
* the number of columns that should be frozen
- *
+ *
* @throws IllegalArgumentException
* if the column count is < 0 or > the number of visible columns
*/
@@ -5370,9 +5377,9 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* <p>
* <em>NOTE:</em> this count includes {@link Column#isHidden() hidden
* columns} in the count.
- *
+ *
* @see #setFrozenColumnCount(int)
- *
+ *
* @return the number of frozen columns
*/
public int getFrozenColumnCount() {
@@ -5384,7 +5391,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* <p>
* If the item has visible details, its size will also be taken into
* account.
- *
+ *
* @param itemId
* id of item to scroll to.
* @throws IllegalArgumentException
@@ -5399,7 +5406,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* <p>
* If the item has visible details, its size will also be taken into
* account.
- *
+ *
* @param itemId
* id of item to scroll to.
* @param destination
@@ -5443,7 +5450,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* <p>
* If Grid is currently not in {@link HeightMode#ROW}, the given value is
* remembered, and applied once the mode is applied.
- *
+ *
* @param rows
* The height in terms of number of rows displayed in Grid's
* body. If Grid doesn't contain enough rows, white space is
@@ -5473,7 +5480,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Gets the amount of rows in Grid's body that are shown, while
* {@link #getHeightMode()} is {@link HeightMode#ROW}.
- *
+ *
* @return the amount of rows that are being shown in Grid's body
* @see #setHeightByRows(double)
*/
@@ -5486,7 +5493,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* <p>
* <em>Note:</em> This method will change the widget's size in the browser
* only if {@link #getHeightMode()} returns {@link HeightMode#CSS}.
- *
+ *
* @see #setHeightMode(HeightMode)
*/
@Override
@@ -5505,7 +5512,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* <em>Note:</em> If headers/footers are inserted or removed, the widget
* will resize itself to still display the required amount of rows in its
* body. It also takes the horizontal scrollbar into account.
- *
+ *
* @param heightMode
* the mode in to which Grid should be set
*/
@@ -5515,7 +5522,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* widget dimensions (height/width) on each state change event. The
* original design was to have setHeight and setHeightByRow be equals,
* and whichever was called the latest was considered in effect.
- *
+ *
* But, because of Vaadin always calling setHeight on the widget, this
* approach doesn't work.
*/
@@ -5527,7 +5534,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* Returns the current {@link HeightMode} the Grid is in.
* <p>
* Defaults to {@link HeightMode#CSS}.
- *
+ *
* @return the current HeightMode
*/
public HeightMode getHeightMode() {
@@ -5543,7 +5550,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* deselected.
* <p>
* If the given SelectionModel is already in use, this method does nothing.
- *
+ *
* @param selectionModel
* the new SelectionModel to use
* @throws IllegalArgumentException
@@ -5569,7 +5576,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Returns the currently used {@link SelectionModel}.
- *
+ *
* @return the currently used SelectionModel
*/
public SelectionModel getSelectionModel() {
@@ -5594,8 +5601,8 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* grid.setSelectionMode(SelectionMode.MULTI);
* grid.setSelectionModel(new MultiSelectionMode());
* </pre></code>
- *
- *
+ *
+ *
* @param selectionMode
* the selection mode to switch to
* @return The {@link SelectionModel} instance that was taken into use
@@ -5606,7 +5613,8 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
public SelectionModel setSelectionMode(final SelectionMode selectionMode)
throws IllegalArgumentException {
if (selectionMode == null) {
- throw new IllegalArgumentException("selection mode may not be null");
+ throw new IllegalArgumentException(
+ "selection mode may not be null");
}
final SelectionModel newSelectionModel = selectionMode.createModel();
setSelectionModel(newSelectionModel);
@@ -5615,7 +5623,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Checks whether an item is selected or not.
- *
+ *
* @param itemId
* the item id to check for
* @return <code>true</code> iff the item is selected
@@ -5630,7 +5638,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* <p>
* This method is a shorthand that delegates to the
* {@link #getSelectionModel() selection model}.
- *
+ *
* @return a collection of all the currently selected itemIds
*/
// keep this javadoc in sync with SelectionModel.getSelectedRows
@@ -5644,7 +5652,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* This method is a shorthand that delegates to the
* {@link #getSelectionModel() selection model}. Only
* {@link SelectionModel.Single} is supported.
- *
+ *
* @return the item id of the currently selected item, or <code>null</code>
* if nothing is selected
* @throws IllegalStateException
@@ -5661,10 +5669,10 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
+ "(the current selection model is "
+ selectionModel.getClass().getName() + ").");
} else if (selectionModel instanceof SelectionModel.None) {
- throw new IllegalStateException("Cannot get selected row: "
- + "Grid selection is disabled "
- + "(the current selection model is "
- + selectionModel.getClass().getName() + ").");
+ throw new IllegalStateException(
+ "Cannot get selected row: " + "Grid selection is disabled "
+ + "(the current selection model is "
+ + selectionModel.getClass().getName() + ").");
} else {
throw new IllegalStateException("Cannot get selected row: "
+ "Grid selection model does not implement "
@@ -5682,7 +5690,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* {@link #getSelectionModel() selection model}. Only
* {@link SelectionModel.Single} and {@link SelectionModel.Multi} are
* supported.
- *
+ *
* @param itemId
* the itemId to mark as selected
* @return <code>true</code> if the selection state changed,
@@ -5700,8 +5708,8 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* {@code SelectionModel.Single} or {@code SelectionModel.Multi}
*/
// keep this javadoc in sync with SelectionModel.Single.select
- public boolean select(Object itemId) throws IllegalArgumentException,
- IllegalStateException {
+ public boolean select(Object itemId)
+ throws IllegalArgumentException, IllegalStateException {
if (selectionModel instanceof SelectionModel.Single) {
return ((SelectionModel.Single) selectionModel).select(itemId);
} else if (selectionModel instanceof SelectionModel.Multi) {
@@ -5728,7 +5736,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* {@link #getSelectionModel() selection model}. Only
* {@link SelectionModel.Single} and {@link SelectionModel.Multi} are
* supported.
- *
+ *
* @param itemId
* the itemId to remove from being selected
* @return <code>true</code> if the selection state changed,
@@ -5775,7 +5783,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* {@link #getSelectionModel() selection model}. Only
* {@link SelectionModel.Single} and {@link SelectionModel.Multi} are
* supported.
- *
+ *
* @return <code>true</code> if the selection state changed,
* <code>false</code> if the itemId was already selected
* @throws IllegalStateException
@@ -5795,10 +5803,10 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
} else if (selectionModel instanceof SelectionModel.Multi) {
return ((SelectionModel.Multi) selectionModel).deselectAll();
} else if (selectionModel instanceof SelectionModel.None) {
- throw new IllegalStateException("Cannot deselect all rows"
- + ": Grid selection is disabled "
- + "(the current selection model is "
- + selectionModel.getClass().getName() + ").");
+ throw new IllegalStateException(
+ "Cannot deselect all rows" + ": Grid selection is disabled "
+ + "(the current selection model is "
+ + selectionModel.getClass().getName() + ").");
} else {
throw new IllegalStateException("Cannot deselect all rows:"
+ " Grid selection model does not implement "
@@ -5816,7 +5824,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* application logic. This method is publicly accessible only so that
* {@link SelectionModel SelectionModels} would be able to inform Grid of
* these events.
- *
+ *
* @param newSelection
* the selection that was added by this event
* @param oldSelection
@@ -5843,7 +5851,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Registers a new column reorder listener.
- *
+ *
* @since 7.5.0
* @param listener
* the listener to register
@@ -5854,7 +5862,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Removes a previously registered column reorder listener.
- *
+ *
* @since 7.5.0
* @param listener
* the listener to remove
@@ -5870,7 +5878,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Registers a new column resize listener.
- *
+ *
* @param listener
* the listener to register
*/
@@ -5880,7 +5888,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Removes a previously registered column resize listener.
- *
+ *
* @param listener
* the listener to remove
*/
@@ -5890,7 +5898,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Gets the {@link KeyMapper } being used by the data source.
- *
+ *
* @return the key mapper being used by the data source
*/
KeyMapper<Object> getKeyMapper() {
@@ -5899,7 +5907,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Adds a renderer to this grid's connector hierarchy.
- *
+ *
* @param renderer
* the renderer to add
*/
@@ -5913,10 +5921,10 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* <p>
* <em>Note:</em> Sorting by a property that has no column in Grid will hide
* all possible sorting indicators.
- *
+ *
* @param s
* a sort instance
- *
+ *
* @throws IllegalStateException
* if container is not sortable (does not implement
* Container.Sortable)
@@ -5932,10 +5940,10 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* <p>
* <em>Note:</em> Sorting by a property that has no column in Grid will hide
* all possible sorting indicators.
- *
+ *
* @param propertyId
* a property ID
- *
+ *
* @throws IllegalStateException
* if container is not sortable (does not implement
* Container.Sortable)
@@ -5951,12 +5959,12 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* <p>
* <em>Note:</em> Sorting by a property that has no column in Grid will hide
* all possible sorting indicators.
- *
+ *
* @param propertyId
* a property ID
* @param direction
* a sort order value (ascending/descending)
- *
+ *
* @throws IllegalStateException
* if container is not sortable (does not implement
* Container.Sortable)
@@ -5980,10 +5988,10 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* <p>
* <em>Note:</em> Sorting by a property that has no column in Grid will hide
* all possible sorting indicators.
- *
+ *
* @param order
* a sort order list.
- *
+ *
* @throws IllegalStateException
* if container is not sortable (does not implement
* Container.Sortable)
@@ -6012,10 +6020,9 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
for (SortOrder o : order) {
if (!sortableProps.contains(o.getPropertyId())) {
- throw new IllegalArgumentException(
- "Property "
- + o.getPropertyId()
- + " does not exist or is not sortable in the current container");
+ throw new IllegalArgumentException("Property "
+ + o.getPropertyId()
+ + " does not exist or is not sortable in the current container");
}
}
@@ -6025,7 +6032,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Get the current sort order list.
- *
+ *
* @return a sort order list
*/
public List<SortOrder> getSortOrder() {
@@ -6090,7 +6097,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Adds a sort order change listener that gets notified when the sort order
* changes.
- *
+ *
* @param listener
* the sort order change listener to add
*/
@@ -6102,7 +6109,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Removes a sort order change listener previously added using
* {@link #addSortListener(SortListener)}.
- *
+ *
* @param listener
* the sort order change listener to remove
*/
@@ -6116,7 +6123,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Returns the header section of this grid. The default header contains a
* single row displaying the column captions.
- *
+ *
* @return the header
*/
protected Header getHeader() {
@@ -6125,7 +6132,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Gets the header row at given index.
- *
+ *
* @param rowIndex
* 0 based index for row. Counted from top to bottom
* @return header row at given index
@@ -6140,11 +6147,11 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* Inserts a new row at the given position to the header section. Shifts the
* row currently at that position and any subsequent rows down (adds one to
* their indices).
- *
+ *
* @param index
* the position at which to insert the row
* @return the new row
- *
+ *
* @throws IllegalArgumentException
* if the index is less than 0 or greater than row count
* @see #appendHeaderRow()
@@ -6158,7 +6165,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Adds a new row at the bottom of the header section.
- *
+ *
* @return the new row
* @see #prependHeaderRow()
* @see #addHeaderRowAt(int)
@@ -6173,7 +6180,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* Returns the current default row of the header section. The default row is
* a special header row providing a user interface for sorting columns.
* Setting a header text for column updates cells in the default header.
- *
+ *
* @return the default row or null if no default row set
*/
public HeaderRow getDefaultHeaderRow() {
@@ -6182,7 +6189,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Gets the row count for the header section.
- *
+ *
* @return row count
*/
public int getHeaderRowCount() {
@@ -6191,7 +6198,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Adds a new row at the top of the header section.
- *
+ *
* @return the new row
* @see #appendHeaderRow()
* @see #addHeaderRowAt(int)
@@ -6204,10 +6211,10 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Removes the given row from the header section.
- *
+ *
* @param row
* the row to be removed
- *
+ *
* @throws IllegalArgumentException
* if the row does not exist in this section
* @see #removeHeaderRow(int)
@@ -6221,10 +6228,10 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Removes the row at the given position from the header section.
- *
+ *
* @param rowIndex
* the position of the row
- *
+ *
* @throws IllegalArgumentException
* if no row exists at given index
* @see #removeHeaderRow(HeaderRow)
@@ -6239,10 +6246,10 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Sets the default row of the header. The default row is a special header
* row providing a user interface for sorting columns.
- *
+ *
* @param row
* the new default row, or null for no default row
- *
+ *
* @throws IllegalArgumentException
* header does not contain the row
*/
@@ -6252,7 +6259,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Sets the visibility of the header section.
- *
+ *
* @param visible
* true to show header section, false to hide
*/
@@ -6262,7 +6269,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Returns the visibility of the header section.
- *
+ *
* @return true if visible, false otherwise.
*/
public boolean isHeaderVisible() {
@@ -6274,7 +6281,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Returns the footer section of this grid. The default header contains a
* single row displaying the column captions.
- *
+ *
* @return the footer
*/
protected Footer getFooter() {
@@ -6283,7 +6290,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Gets the footer row at given index.
- *
+ *
* @param rowIndex
* 0 based index for row. Counted from top to bottom
* @return footer row at given index
@@ -6298,11 +6305,11 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* Inserts a new row at the given position to the footer section. Shifts the
* row currently at that position and any subsequent rows down (adds one to
* their indices).
- *
+ *
* @param index
* the position at which to insert the row
* @return the new row
- *
+ *
* @throws IllegalArgumentException
* if the index is less than 0 or greater than row count
* @see #appendFooterRow()
@@ -6316,7 +6323,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Adds a new row at the bottom of the footer section.
- *
+ *
* @return the new row
* @see #prependFooterRow()
* @see #addFooterRowAt(int)
@@ -6329,7 +6336,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Gets the row count for the footer.
- *
+ *
* @return row count
*/
public int getFooterRowCount() {
@@ -6338,7 +6345,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Adds a new row at the top of the footer section.
- *
+ *
* @return the new row
* @see #appendFooterRow()
* @see #addFooterRowAt(int)
@@ -6351,10 +6358,10 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Removes the given row from the footer section.
- *
+ *
* @param row
* the row to be removed
- *
+ *
* @throws IllegalArgumentException
* if the row does not exist in this section
* @see #removeFooterRow(int)
@@ -6368,10 +6375,10 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Removes the row at the given position from the footer section.
- *
+ *
* @param rowIndex
* the position of the row
- *
+ *
* @throws IllegalArgumentException
* if no row exists at given index
* @see #removeFooterRow(FooterRow)
@@ -6385,7 +6392,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Sets the visibility of the footer section.
- *
+ *
* @param visible
* true to show footer section, false to hide
*/
@@ -6395,7 +6402,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Returns the visibility of the footer section.
- *
+ *
* @return true if visible, false otherwise.
*/
public boolean isFooterVisible() {
@@ -6471,27 +6478,29 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* {@link RowDescriptionGenerator} is also set, the row description it
* generates is displayed for cells for which {@code generator} returns
* null.
- *
+ *
* @param generator
* the description generator to use or {@code null} to remove a
* previously set generator if any
- *
+ *
* @see #setRowDescriptionGenerator(RowDescriptionGenerator)
- *
+ *
* @since 7.6
*/
- public void setCellDescriptionGenerator(CellDescriptionGenerator generator) {
+ public void setCellDescriptionGenerator(
+ CellDescriptionGenerator generator) {
cellDescriptionGenerator = generator;
- getState().hasDescriptions = (generator != null || rowDescriptionGenerator != null);
+ getState().hasDescriptions = (generator != null
+ || rowDescriptionGenerator != null);
datasourceExtension.refreshCache();
}
/**
* Returns the {@code CellDescriptionGenerator} instance used to generate
* descriptions (tooltips) for Grid cells.
- *
+ *
* @return the description generator or {@code null} if no generator is set
- *
+ *
* @since 7.6
*/
public CellDescriptionGenerator getCellDescriptionGenerator() {
@@ -6504,28 +6513,29 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* {@link CellDescriptionGenerator} is also set, the row description
* generated by {@code generator} is used for cells for which the cell
* description generator returns null.
- *
- *
+ *
+ *
* @param generator
* the description generator to use or {@code null} to remove a
* previously set generator if any
- *
+ *
* @see #setCellDescriptionGenerator(CellDescriptionGenerator)
- *
+ *
* @since 7.6
*/
public void setRowDescriptionGenerator(RowDescriptionGenerator generator) {
rowDescriptionGenerator = generator;
- getState().hasDescriptions = (generator != null || cellDescriptionGenerator != null);
+ getState().hasDescriptions = (generator != null
+ || cellDescriptionGenerator != null);
datasourceExtension.refreshCache();
}
/**
* Returns the {@code RowDescriptionGenerator} instance used to generate
* descriptions (tooltips) for Grid rows
- *
+ *
* @return the description generator or {@code} null if no generator is set
- *
+ *
* @since 7.6
*/
public RowDescriptionGenerator getRowDescriptionGenerator() {
@@ -6534,7 +6544,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Sets the style generator that is used for generating styles for cells
- *
+ *
* @param cellStyleGenerator
* the cell style generator to set, or <code>null</code> to
* remove a previously set generator
@@ -6546,7 +6556,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Gets the style generator that is used for generating styles for cells
- *
+ *
* @return the cell style generator, or <code>null</code> if no generator is
* set
*/
@@ -6556,7 +6566,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Sets the style generator that is used for generating styles for rows
- *
+ *
* @param rowStyleGenerator
* the row style generator to set, or <code>null</code> to remove
* a previously set generator
@@ -6568,7 +6578,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Gets the style generator that is used for generating styles for rows
- *
+ *
* @return the row style generator, or <code>null</code> if no generator is
* set
*/
@@ -6585,7 +6595,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* order might have been changed, it's better to instead add items directly
* to the underlying container and use {@link Item#getItemProperty(Object)}
* to make sure each value is assigned to the intended property.
- *
+ *
* @param values
* the cell values of the new row, in the same order as the
* visible column order, not <code>null</code>.
@@ -6609,9 +6619,9 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
List<String> columnOrder = getState(false).columnOrder;
if (values.length != columnOrder.size()) {
- throw new IllegalArgumentException("There are "
- + columnOrder.size() + " visible columns, but "
- + values.length + " cell values were provided.");
+ throw new IllegalArgumentException(
+ "There are " + columnOrder.size() + " visible columns, but "
+ + values.length + " cell values were provided.");
}
// First verify all parameter types
@@ -6656,13 +6666,13 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* editor is enabled, the user can open it by double-clicking a row or
* hitting enter when a row is focused. The editor can also be opened
* programmatically using the {@link #editItem(Object)} method.
- *
+ *
* @param isEnabled
* <code>true</code> to enable the feature, <code>false</code>
* otherwise
* @throws IllegalStateException
* if an item is currently being edited
- *
+ *
* @see #getEditedItemId()
*/
public void setEditorEnabled(boolean isEnabled)
@@ -6679,9 +6689,9 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Checks whether the item editor UI is enabled for this grid.
- *
+ *
* @return <code>true</code> iff the editor is enabled for this grid
- *
+ *
* @see #setEditorEnabled(boolean)
* @see #getEditedItemId()
*/
@@ -6691,7 +6701,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Gets the id of the item that is currently being edited.
- *
+ *
* @return the id of the item that is currently being edited, or
* <code>null</code> if no item is being edited at the moment
*/
@@ -6701,7 +6711,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Gets the field group that is backing the item editor of this grid.
- *
+ *
* @return the backing field group
*/
public FieldGroup getEditorFieldGroup() {
@@ -6710,10 +6720,10 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Sets the field group that is backing the item editor of this grid.
- *
+ *
* @param fieldGroup
* the backing field group
- *
+ *
* @throws IllegalStateException
* if the editor is currently active
*/
@@ -6728,7 +6738,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Returns whether an item is currently being edited in the editor.
- *
+ *
* @return true iff the editor is open
*/
public boolean isEditorActive() {
@@ -6771,10 +6781,10 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Opens the editor interface for the provided item. Scrolls the Grid to
* bring the item to view if it is not already visible.
- *
+ *
* Note that any cell content rendered by a WidgetRenderer will not be
* visible in the editor row.
- *
+ *
* @param itemId
* the id of the item to edit
* @throws IllegalStateException
@@ -6784,8 +6794,8 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* if the {@code itemId} is not in the backing container
* @see #setEditorEnabled(boolean)
*/
- public void editItem(Object itemId) throws IllegalStateException,
- IllegalArgumentException {
+ public void editItem(Object itemId)
+ throws IllegalStateException, IllegalArgumentException {
if (!isEditorEnabled()) {
throw new IllegalStateException("Item editor is not enabled");
} else if (isEditorBuffered() && editedItemId != null) {
@@ -6806,8 +6816,8 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
editorFieldGroup.setItemDataSource(item);
for (Column column : getColumns()) {
- column.getState().editorConnector = getEditorField(column
- .getPropertyId());
+ column.getState().editorConnector = getEditorField(
+ column.getPropertyId());
}
editorActive = true;
@@ -6842,10 +6852,10 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* Saves all changes done to the bound fields.
* <p>
* <em>Note:</em> This is a pass-through call to the backing field group.
- *
+ *
* @throws CommitException
* If the commit was aborted
- *
+ *
* @see FieldGroup#commit()
*/
public void saveEditor() throws CommitException {
@@ -6870,8 +6880,8 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
}
if (isEditorActive()) {
- getEditorRpc().cancel(
- getContainerDataSource().indexOfId(editedItemId));
+ getEditorRpc()
+ .cancel(getContainerDataSource().indexOfId(editedItemId));
doCancelEditor();
}
}
@@ -6914,7 +6924,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* <p>
* When {@link #editItem(Object) editItem} is called, fields are
* automatically created and bound to any unbound properties.
- *
+ *
* @return a collection of all the fields bound to the item editor
*/
Collection<Field<?>> getEditorFields() {
@@ -6937,7 +6947,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* only used when {@link FieldGroup} creates a new field.
* <p>
* <em>Note:</em> This is a pass-through call to the backing field group.
- *
+ *
* @param fieldFactory
* The field factory to use
*/
@@ -6947,9 +6957,9 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Sets the error handler for the editor.
- *
+ *
* The error handler is called whenever there is an exception in the editor.
- *
+ *
* @param editorErrorHandler
* The editor error handler to use
* @throws IllegalArgumentException
@@ -6966,7 +6976,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Gets the error handler used for the editor
- *
+ *
* @see #setErrorHandler(com.vaadin.server.ErrorHandler)
* @return the editor error handler, never null
*/
@@ -6979,7 +6989,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* only used when {@link FieldGroup} creates a new field.
* <p>
* <em>Note:</em> This is a pass-through call to the backing field group.
- *
+ *
* @return The field factory in use
*/
public FieldGroupFieldFactory getEditorFieldFactory() {
@@ -6988,7 +6998,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Sets the caption on the save button in the Grid editor.
- *
+ *
* @param saveCaption
* the caption to set
* @throws IllegalArgumentException
@@ -7004,7 +7014,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Gets the current caption of the save button in the Grid editor.
- *
+ *
* @return the current caption of the save button
*/
public String getEditorSaveCaption() {
@@ -7013,7 +7023,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Sets the caption on the cancel button in the Grid editor.
- *
+ *
* @param cancelCaption
* the caption to set
* @throws IllegalArgumentException
@@ -7029,7 +7039,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Gets the current caption of the cancel button in the Grid editor.
- *
+ *
* @return the current caption of the cancel button
*/
public String getEditorCancelCaption() {
@@ -7039,7 +7049,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Sets the buffered editor mode. The default mode is buffered (
* <code>true</code>).
- *
+ *
* @since 7.6
* @param editorBuffered
* <code>true</code> to enable buffered editor,
@@ -7060,7 +7070,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Gets the buffered editor mode.
- *
+ *
* @since 7.6
* @return <code>true</code> if buffered editor is enabled,
* <code>false</code> otherwise
@@ -7099,7 +7109,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* In most cases Grid will know when column widths need to be recalculated
* but this method can be used to force recalculation in situations when
* grid does not recalculate automatically.
- *
+ *
* @since 7.4.1
*/
public void recalculateColumnWidths() {
@@ -7108,7 +7118,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Registers a new column visibility change listener
- *
+ *
* @since 7.5.0
* @param listener
* the listener to register
@@ -7121,7 +7131,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Removes a previously registered column visibility change listener
- *
+ *
* @since 7.5.0
* @param listener
* the listener to remove
@@ -7142,7 +7152,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
* Sets a new details generator for row details.
* <p>
* The currently opened row details will be re-rendered.
- *
+ *
* @since 7.5.0
* @param detailsGenerator
* the details generator to set
@@ -7156,7 +7166,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Gets the current details generator for row details.
- *
+ *
* @since 7.5.0
* @return the detailsGenerator the current details generator
*/
@@ -7166,7 +7176,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Shows or hides the details for a specific item.
- *
+ *
* @since 7.5.0
* @param itemId
* the id of the item for which to set details visibility
@@ -7180,7 +7190,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* Checks whether details are visible for the given item.
- *
+ *
* @since 7.5.0
* @param itemId
* the id of the item for which to check details visibility
@@ -7262,8 +7272,8 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
// Read frozen columns after columns are read.
if (attrs.hasKey("frozen-columns")) {
- setFrozenColumnCount(DesignAttributeHandler.readAttribute(
- "frozen-columns", attrs, int.class));
+ setFrozenColumnCount(DesignAttributeHandler
+ .readAttribute("frozen-columns", attrs, int.class));
}
}
@@ -7289,7 +7299,8 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
if (selectionModel.getClass().equals(SingleSelectionModel.class)) {
selectionMode = SelectionMode.SINGLE;
- } else if (selectionModel.getClass().equals(MultiSelectionModel.class)) {
+ } else if (selectionModel.getClass()
+ .equals(MultiSelectionModel.class)) {
selectionMode = SelectionMode.MULTI;
} else if (selectionModel.getClass().equals(NoSelectionModel.class)) {
selectionMode = SelectionMode.NONE;
@@ -7327,8 +7338,8 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
for (Column c : getColumns()) {
Object value = datasource.getItem(itemId)
.getItemProperty(c.getPropertyId()).getValue();
- tableRow.appendElement("td").append(
- (value != null ? DesignFormatter
+ tableRow.appendElement("td")
+ .append((value != null ? DesignFormatter
.encodeForTextNode(value.toString()) : ""));
}
}
diff --git a/server/src/main/java/com/vaadin/ui/GridLayout.java b/server/src/main/java/com/vaadin/ui/GridLayout.java
index e0fe7c18b7..66195c4a6f 100644
--- a/server/src/main/java/com/vaadin/ui/GridLayout.java
+++ b/server/src/main/java/com/vaadin/ui/GridLayout.java
@@ -50,12 +50,12 @@ import com.vaadin.ui.declarative.DesignContext;
/**
* A layout where the components are laid out on a grid using cell coordinates.
- *
+ *
* <p>
* The GridLayout also maintains a cursor for adding components in
* left-to-right, top-to-bottom order.
* </p>
- *
+ *
* <p>
* Each component in a <code>GridLayout</code> uses a defined
* {@link GridLayout.Area area} (column1,row1,column2,row2) from the grid. The
@@ -63,19 +63,19 @@ import com.vaadin.ui.declarative.DesignContext;
* you will get an {@link OverlapsException}. Adding a component with cursor
* automatically extends the grid by increasing the grid height.
* </p>
- *
+ *
* <p>
* The grid coordinates, which are specified by a row and column index, always
* start from 0 for the topmost row and the leftmost column.
* </p>
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@SuppressWarnings("serial")
-public class GridLayout extends AbstractLayout implements
- Layout.AlignmentHandler, Layout.SpacingHandler, Layout.MarginHandler,
- LayoutClickNotifier {
+public class GridLayout extends AbstractLayout
+ implements Layout.AlignmentHandler, Layout.SpacingHandler,
+ Layout.MarginHandler, LayoutClickNotifier {
private GridLayoutServerRpc rpc = new GridLayoutServerRpc() {
@@ -107,10 +107,10 @@ public class GridLayout extends AbstractLayout implements
/**
* Constructor for a grid of given size (number of columns and rows).
- *
+ *
* The grid may grow or shrink later. Grid grows automatically if you add
* components outside its area.
- *
+ *
* @param columns
* Number of columns in the grid.
* @param rows
@@ -132,9 +132,9 @@ public class GridLayout extends AbstractLayout implements
/**
* Constructs a GridLayout of given size (number of columns and rows) and
* adds the given components in order to the grid.
- *
+ *
* @see #addComponents(Component...)
- *
+ *
* @param columns
* Number of columns in the grid.
* @param rows
@@ -163,13 +163,13 @@ public class GridLayout extends AbstractLayout implements
* by specifying the upper left corner (column1, row1) and the lower right
* corner (column2, row2) of the area. The coordinates are zero-based.
* </p>
- *
+ *
* <p>
* If the area overlaps with any of the existing components already present
* in the grid, the operation will fail and an {@link OverlapsException} is
* thrown.
* </p>
- *
+ *
* @param component
* the component to be added, not <code>null</code>.
* @param column1
@@ -191,8 +191,8 @@ public class GridLayout extends AbstractLayout implements
* if the cells are outside the grid area.
*/
public void addComponent(Component component, int column1, int row1,
- int column2, int row2) throws OverlapsException,
- OutOfBoundsException {
+ int column2, int row2)
+ throws OverlapsException, OutOfBoundsException {
if (component == null) {
throw new NullPointerException("Component must not be null");
@@ -271,7 +271,7 @@ public class GridLayout extends AbstractLayout implements
/**
* Tests if the given area overlaps with any of the items already on the
* grid.
- *
+ *
* @param area
* the Area to be checked for overlapping.
* @throws OverlapsException
@@ -282,8 +282,8 @@ public class GridLayout extends AbstractLayout implements
.entrySet()) {
if (componentsOverlap(entry.getValue(), area.childData)) {
// Component not added, overlaps with existing component
- throw new OverlapsException(new Area(entry.getValue(),
- (Component) entry.getKey()));
+ throw new OverlapsException(
+ new Area(entry.getValue(), (Component) entry.getKey()));
}
}
}
@@ -293,7 +293,7 @@ public class GridLayout extends AbstractLayout implements
* the area.) End coordinates (SouthEast corner of the area) are the same as
* column1,row1. The coordinates are zero-based. Component width and height
* is 1.
- *
+ *
* @param component
* the component to be added, not <code>null</code>.
* @param column
@@ -313,16 +313,16 @@ public class GridLayout extends AbstractLayout implements
/**
* Forces the next component to be added at the beginning of the next line.
- *
+ *
* <p>
* Sets the cursor column to 0 and increments the cursor row by one.
* </p>
- *
+ *
* <p>
* By calling this function you can ensure that no more components are added
* right of the previous component.
* </p>
- *
+ *
* @see #space()
*/
public void newLine() {
@@ -333,7 +333,7 @@ public class GridLayout extends AbstractLayout implements
/**
* Moves the cursor forward by one. If the cursor goes out of the right grid
* border, it is moved to the first column of the next row.
- *
+ *
* @see #newLine()
*/
public void space() {
@@ -349,7 +349,7 @@ public class GridLayout extends AbstractLayout implements
* cursor position is already occupied, the cursor is moved forwards to find
* free position. If the cursor goes out from the bottom of the grid, the
* grid is automatically extended.
- *
+ *
* @param component
* the component to be added, not <code>null</code>.
*/
@@ -385,7 +385,7 @@ public class GridLayout extends AbstractLayout implements
/**
* Removes the specified component from the layout.
- *
+ *
* @param component
* the component to be removed.
*/
@@ -404,7 +404,7 @@ public class GridLayout extends AbstractLayout implements
/**
* Removes the component specified by its cell coordinates.
- *
+ *
* @param column
* the component's column, starting from 0.
* @param row
@@ -413,7 +413,8 @@ public class GridLayout extends AbstractLayout implements
public void removeComponent(int column, int row) {
// Finds the area
- for (final Iterator<Component> i = components.iterator(); i.hasNext();) {
+ for (final Iterator<Component> i = components.iterator(); i
+ .hasNext();) {
final Component component = i.next();
final ChildComponentData childData = getState().childData
.get(component);
@@ -427,7 +428,7 @@ public class GridLayout extends AbstractLayout implements
/**
* Gets an Iterator for the components contained in the layout. By using the
* Iterator it is possible to step through the contents of the layout.
- *
+ *
* @return the Iterator of the components inside the layout.
*/
@Override
@@ -438,7 +439,7 @@ public class GridLayout extends AbstractLayout implements
/**
* Gets the number of components contained in the layout. Consistent with
* the iterator returned by {@link #getComponentIterator()}.
- *
+ *
* @return the number of contained components
*/
@Override
@@ -488,7 +489,7 @@ public class GridLayout extends AbstractLayout implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.Layout.AlignmentHandler#getComponentAlignment(com
* .vaadin.ui.Component)
*/
@@ -506,17 +507,17 @@ public class GridLayout extends AbstractLayout implements
/**
* Defines a rectangular area of cells in a GridLayout.
- *
+ *
* <p>
* Also maintains a reference to the component contained in the area.
* </p>
- *
+ *
* <p>
* The area is specified by the cell coordinates of its upper left corner
* (column1,row1) and lower right corner (column2,row2). As otherwise with
* GridLayout, the column and row coordinates start from zero.
* </p>
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -528,7 +529,7 @@ public class GridLayout extends AbstractLayout implements
* <p>
* Construct a new area on a grid.
* </p>
- *
+ *
* @param component
* the component connected to the area.
* @param column1
@@ -562,7 +563,7 @@ public class GridLayout extends AbstractLayout implements
/**
* Tests if this Area overlaps with another Area.
- *
+ *
* @param other
* the other Area that is to be tested for overlap with this
* area
@@ -575,7 +576,7 @@ public class GridLayout extends AbstractLayout implements
/**
* Gets the component connected to the area.
- *
+ *
* @return the Component.
*/
public Component getComponent() {
@@ -584,7 +585,7 @@ public class GridLayout extends AbstractLayout implements
/**
* Gets the column of the top-left corner cell.
- *
+ *
* @return the column of the top-left corner cell.
*/
public int getColumn1() {
@@ -593,7 +594,7 @@ public class GridLayout extends AbstractLayout implements
/**
* Gets the column of the bottom-right corner cell.
- *
+ *
* @return the column of the bottom-right corner cell.
*/
public int getColumn2() {
@@ -602,7 +603,7 @@ public class GridLayout extends AbstractLayout implements
/**
* Gets the row of the top-left corner cell.
- *
+ *
* @return the row of the top-left corner cell.
*/
public int getRow1() {
@@ -611,7 +612,7 @@ public class GridLayout extends AbstractLayout implements
/**
* Gets the row of the bottom-right corner cell.
- *
+ *
* @return the row of the bottom-right corner cell.
*/
public int getRow2() {
@@ -630,7 +631,7 @@ public class GridLayout extends AbstractLayout implements
* Gridlayout does not support laying components on top of each other. An
* <code>OverlapsException</code> is thrown when a component already exists
* (even partly) at the same space on a grid with the new component.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -640,7 +641,7 @@ public class GridLayout extends AbstractLayout implements
/**
* Constructs an <code>OverlapsException</code>.
- *
+ *
* @param existingArea
*/
public OverlapsException(Area existingArea) {
@@ -675,7 +676,7 @@ public class GridLayout extends AbstractLayout implements
/**
* Gets the area .
- *
+ *
* @return the existing area.
*/
public Area getArea() {
@@ -686,7 +687,7 @@ public class GridLayout extends AbstractLayout implements
/**
* An <code>Exception</code> object which is thrown when an area exceeds the
* bounds of the grid.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -697,7 +698,7 @@ public class GridLayout extends AbstractLayout implements
/**
* Constructs an <code>OoutOfBoundsException</code> with the specified
* detail message.
- *
+ *
* @param areaOutOfBounds
*/
public OutOfBoundsException(Area areaOutOfBounds) {
@@ -706,7 +707,7 @@ public class GridLayout extends AbstractLayout implements
/**
* Gets the area that is out of bounds.
- *
+ *
* @return the area out of Bound.
*/
public Area getArea() {
@@ -717,7 +718,7 @@ public class GridLayout extends AbstractLayout implements
/**
* Sets the number of columns in the grid. The column count can not be
* reduced if there are any areas that would be outside of the shrunk grid.
- *
+ *
* @param columns
* the new number of columns in the grid.
*/
@@ -758,7 +759,7 @@ public class GridLayout extends AbstractLayout implements
/**
* Get the number of columns in the grid.
- *
+ *
* @return the number of columns in the grid.
*/
public int getColumns() {
@@ -768,7 +769,7 @@ public class GridLayout extends AbstractLayout implements
/**
* Sets the number of rows in the grid. The number of rows can not be
* reduced if there are any areas that would be outside of the shrunk grid.
- *
+ *
* @param rows
* the new number of rows in the grid.
*/
@@ -808,7 +809,7 @@ public class GridLayout extends AbstractLayout implements
/**
* Get the number of rows in the grid.
- *
+ *
* @return the number of rows in the grid.
*/
public int getRows() {
@@ -817,14 +818,14 @@ public class GridLayout extends AbstractLayout implements
/**
* Gets the current x-position (column) of the cursor.
- *
+ *
* <p>
* The cursor position points the position for the next component that is
* added without specifying its coordinates (grid cell). When the cursor
* position is occupied, the next component will be added to first free
* position after the cursor.
* </p>
- *
+ *
* @return the grid column the cursor is on, starting from 0.
*/
public int getCursorX() {
@@ -834,7 +835,7 @@ public class GridLayout extends AbstractLayout implements
/**
* Sets the current cursor x-position. This is usually handled automatically
* by GridLayout.
- *
+ *
* @param cursorX
*/
public void setCursorX(int cursorX) {
@@ -843,14 +844,14 @@ public class GridLayout extends AbstractLayout implements
/**
* Gets the current y-position (row) of the cursor.
- *
+ *
* <p>
* The cursor position points the position for the next component that is
* added without specifying its coordinates (grid cell). When the cursor
* position is occupied, the next component will be added to the first free
* position after the cursor.
* </p>
- *
+ *
* @return the grid row the Cursor is on.
*/
public int getCursorY() {
@@ -860,7 +861,7 @@ public class GridLayout extends AbstractLayout implements
/**
* Sets the current y-coordinate (row) of the cursor. This is usually
* handled automatically by GridLayout.
- *
+ *
* @param cursorY
* the row number, starting from 0 for the topmost row.
*/
@@ -870,7 +871,8 @@ public class GridLayout extends AbstractLayout implements
/* Documented in superclass */
@Override
- public void replaceComponent(Component oldComponent, Component newComponent) {
+ public void replaceComponent(Component oldComponent,
+ Component newComponent) {
// Gets the locations
ChildComponentData oldLocation = getState().childData.get(oldComponent);
@@ -894,7 +896,7 @@ public class GridLayout extends AbstractLayout implements
/*
* Removes all components from this container.
- *
+ *
* @see com.vaadin.ui.ComponentContainer#removeAllComponents()
*/
@Override
@@ -924,7 +926,7 @@ public class GridLayout extends AbstractLayout implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.Layout.SpacingHandler#setSpacing(boolean)
*/
@Override
@@ -934,7 +936,7 @@ public class GridLayout extends AbstractLayout implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.Layout.SpacingHandler#isSpacing()
*/
@Override
@@ -944,7 +946,7 @@ public class GridLayout extends AbstractLayout implements
/**
* Inserts an empty row at the specified position in the grid.
- *
+ *
* @param row
* Index of the row before which the new row will be inserted.
* The leftmost row has index 0.
@@ -978,18 +980,18 @@ public class GridLayout extends AbstractLayout implements
/**
* Removes a row and all the components in the row.
- *
+ *
* <p>
* Components which span over several rows are removed if the selected row
* is on the first row of such a component.
* </p>
- *
+ *
* <p>
* If the last row is removed then all remaining components will be removed
* and the grid will be reduced to one row. The cursor will be moved to the
* upper left cell of the grid.
* </p>
- *
+ *
* @param row
* Index of the row to remove. The leftmost row has index 0.
*/
@@ -1036,13 +1038,13 @@ public class GridLayout extends AbstractLayout implements
/**
* Sets the expand ratio of given column.
- *
+ *
* <p>
* The expand ratio defines how excess space is distributed among columns.
* Excess space means space that is left over from components that are not
* sized relatively. By default, the excess space is distributed evenly.
* </p>
- *
+ *
* <p>
* Note, that width of this GridLayout needs to be defined (fixed or
* relative, as opposed to undefined height) for this method to have any
@@ -1052,9 +1054,9 @@ public class GridLayout extends AbstractLayout implements
* the server so you cannot set a child component to have undefined width on
* the server and set it to <code>100%</code> in CSS. You must set it to
* <code>100%</code> on the server.
- *
+ *
* @see #setWidth(float, int)
- *
+ *
* @param columnIndex
* @param ratio
*/
@@ -1066,9 +1068,9 @@ public class GridLayout extends AbstractLayout implements
/**
* Returns the expand ratio of given column
- *
+ *
* @see #setColumnExpandRatio(int, float)
- *
+ *
* @param columnIndex
* @return the expand ratio, 0.0f by default
*/
@@ -1079,13 +1081,13 @@ public class GridLayout extends AbstractLayout implements
/**
* Sets the expand ratio of given row.
- *
+ *
* <p>
* Expand ratio defines how excess space is distributed among rows. Excess
* space means the space left over from components that are not sized
* relatively. By default, the excess space is distributed evenly.
* </p>
- *
+ *
* <p>
* Note, that height of this GridLayout needs to be defined (fixed or
* relative, as opposed to undefined height) for this method to have any
@@ -1095,9 +1097,9 @@ public class GridLayout extends AbstractLayout implements
* on the server so you cannot set a child component to have undefined
* height on the server and set it to <code>100%</code> in CSS. You must set
* it to <code>100%</code> on the server.
- *
+ *
* @see #setHeight(float, int)
- *
+ *
* @param rowIndex
* The row index, starting from 0 for the topmost row.
* @param ratio
@@ -1110,9 +1112,9 @@ public class GridLayout extends AbstractLayout implements
/**
* Returns the expand ratio of given row.
- *
+ *
* @see #setRowExpandRatio(int, float)
- *
+ *
* @param rowIndex
* The row index, starting from 0 for the topmost row.
* @return the expand ratio, 0.0f by default
@@ -1124,7 +1126,7 @@ public class GridLayout extends AbstractLayout implements
/**
* Gets the Component at given index.
- *
+ *
* @param x
* The column index, starting from 0 for the leftmost column.
* @param y
@@ -1132,8 +1134,8 @@ public class GridLayout extends AbstractLayout implements
* @return Component in given cell or null if empty
*/
public Component getComponent(int x, int y) {
- for (Entry<Connector, ChildComponentData> entry : getState(false).childData
- .entrySet()) {
+ for (Entry<Connector, ChildComponentData> entry : getState(
+ false).childData.entrySet()) {
ChildComponentData childData = entry.getValue();
if (childData.column1 <= x && x <= childData.column2
&& childData.row1 <= y && y <= childData.row2) {
@@ -1146,7 +1148,7 @@ public class GridLayout extends AbstractLayout implements
/**
* Returns information about the area where given component is laid in the
* GridLayout.
- *
+ *
* @param component
* the component whose area information is requested.
* @return an Area object that contains information how component is laid in
@@ -1197,7 +1199,7 @@ public class GridLayout extends AbstractLayout implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.Layout.MarginHandler#setMargin(boolean)
*/
@Override
@@ -1207,10 +1209,9 @@ public class GridLayout extends AbstractLayout implements
/*
* (non-Javadoc)
- *
- * @see
- * com.vaadin.ui.Layout.MarginHandler#setMargin(com.vaadin.shared.ui.MarginInfo
- * )
+ *
+ * @see com.vaadin.ui.Layout.MarginHandler#setMargin(com.vaadin.shared.ui.
+ * MarginInfo )
*/
@Override
public void setMargin(MarginInfo marginInfo) {
@@ -1219,7 +1220,7 @@ public class GridLayout extends AbstractLayout implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.Layout.MarginHandler#getMargin()
*/
@Override
@@ -1229,7 +1230,7 @@ public class GridLayout extends AbstractLayout implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.Layout.AlignmentHandler#getDefaultComponentAlignment()
*/
@Override
@@ -1239,7 +1240,7 @@ public class GridLayout extends AbstractLayout implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.ui.Layout.AlignmentHandler#setDefaultComponentAlignment(com
* .vaadin.ui.Alignment)
@@ -1253,12 +1254,12 @@ public class GridLayout extends AbstractLayout implements
* Sets whether empty rows and columns should be considered as non-existent
* when rendering or not. If this is set to true then the spacing between
* multiple empty columns (or rows) will be collapsed.
- *
+ *
* The default behavior is to consider all rows and columns as visible
- *
+ *
* NOTE that this must be set before the initial rendering takes place.
* Updating this on the fly is not supported.
- *
+ *
* @since 7.3
* @param hideEmptyRowsAndColumns
* true to hide empty rows and columns, false to leave them as-is
@@ -1270,7 +1271,7 @@ public class GridLayout extends AbstractLayout implements
/**
* Checks whether whether empty rows and columns should be considered as
* non-existent when rendering or not.
- *
+ *
* @see #setHideEmptyRowsAndColumns(boolean)
* @since 7.3
* @return true if empty rows and columns are hidden, false otherwise
@@ -1345,13 +1346,14 @@ public class GridLayout extends AbstractLayout implements
attr, 1, int.class);
for (int rowIndex = row; rowIndex < row + rowspan; ++rowIndex) {
- for (int colIndex = column; colIndex < column + colspan; ++colIndex) {
+ for (int colIndex = column; colIndex < column
+ + colspan; ++colIndex) {
if (rowIndex == rows.size()) {
// Rowspan with not enough rows. Fix by adding rows.
rows.add(new HashMap<Integer, Component>());
}
- rows.get(rowIndex)
- .put(colIndex + skippedColumns, child);
+ rows.get(rowIndex).put(colIndex + skippedColumns,
+ child);
}
}
@@ -1492,8 +1494,8 @@ public class GridLayout extends AbstractLayout implements
col.appendChild(childElement);
if (coords.row1 != coords.row2) {
- col.attr("rowspan", ""
- + (1 + coords.row2 - coords.row1));
+ col.attr("rowspan",
+ "" + (1 + coords.row2 - coords.row1));
}
colspan = 1 + coords.column2 - coords.column1;
@@ -1503,8 +1505,8 @@ public class GridLayout extends AbstractLayout implements
} else {
boolean hasExpands = false;
- if (i == 0
- && lastComponentOnRow(componentMap[i], j, visited)) {
+ if (i == 0 && lastComponentOnRow(componentMap[i], j,
+ visited)) {
// A column with expand and no content in the end of
// first row needs to be present.
for (int c = j; c < componentMap[i].length; ++c) {
@@ -1528,7 +1530,8 @@ public class GridLayout extends AbstractLayout implements
++colspan;
}
- int rowspan = getRowSpan(componentMap, i, j, colspan, child);
+ int rowspan = getRowSpan(componentMap, i, j, colspan,
+ child);
if (colspan > 1) {
col.attr("colspan", "" + colspan);
}
@@ -1570,7 +1573,7 @@ public class GridLayout extends AbstractLayout implements
* for empty {@link GridLayout}, because there's no other way to serialize
* info about number of columns and rows if there are absolutely no
* components in the {@link GridLayout}
- *
+ *
* @param design
* @param designContext
*/
@@ -1596,7 +1599,8 @@ public class GridLayout extends AbstractLayout implements
private int getRowSpan(Component[][] compMap, int i, int j, int colspan,
Component child) {
int rowspan = 1;
- while (i + rowspan < compMap.length && compMap[i + rowspan][j] == child) {
+ while (i + rowspan < compMap.length
+ && compMap[i + rowspan][j] == child) {
for (int k = 0; k < colspan; ++k) {
if (compMap[i + rowspan][j + k] != child) {
return rowspan;
diff --git a/server/src/main/java/com/vaadin/ui/HasChildMeasurementHint.java b/server/src/main/java/com/vaadin/ui/HasChildMeasurementHint.java
index 86d33f57b2..fac7cf4dbd 100644
--- a/server/src/main/java/com/vaadin/ui/HasChildMeasurementHint.java
+++ b/server/src/main/java/com/vaadin/ui/HasChildMeasurementHint.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -18,7 +18,7 @@ package com.vaadin.ui;
/**
* Component with layout measuring hint. Used to improve granularity of control
* over child component measurements.
- *
+ *
* @since 7.6
* @author Vaadin Ltd
*/
@@ -52,7 +52,7 @@ public interface HasChildMeasurementHint extends HasComponents {
/**
* Sets desired child size measurement hint.
- *
+ *
* @param hint
* desired hint. A value of null will reset value back to the
* default (MEASURE_ALWAYS)
@@ -61,7 +61,7 @@ public interface HasChildMeasurementHint extends HasComponents {
/**
* Returns the current child size measurement hint.
- *
+ *
* @return a child measurement hint value
*/
ChildMeasurementHint getChildMeasurementHint();
diff --git a/server/src/main/java/com/vaadin/ui/HasComponents.java b/server/src/main/java/com/vaadin/ui/HasComponents.java
index 6273e8053b..58a4ac6668 100644
--- a/server/src/main/java/com/vaadin/ui/HasComponents.java
+++ b/server/src/main/java/com/vaadin/ui/HasComponents.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,17 +24,17 @@ import com.vaadin.util.ReflectTools;
/**
* Interface that must be implemented by all {@link Component}s that contain
* other {@link Component}s.
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
- *
+ *
*/
public interface HasComponents extends Component, Iterable<Component> {
/**
* Gets an iterator to the collection of contained components. Using this
* iterator it is possible to step through all components contained in this
* container.
- *
+ *
* @return the component iterator.
*/
@Override
@@ -43,21 +43,22 @@ public interface HasComponents extends Component, Iterable<Component> {
/**
* Interface for {@link HasComponents} implementations that support sending
* attach and detach events for components.
- *
+ *
* @since 7.0
*/
public interface ComponentAttachDetachNotifier extends Serializable {
/**
* Listens the component attach events.
- *
+ *
* @param listener
* the listener to add.
*/
- public void addComponentAttachListener(ComponentAttachListener listener);
+ public void addComponentAttachListener(
+ ComponentAttachListener listener);
/**
* Stops the listening component attach events.
- *
+ *
* @param listener
* the listener to removed.
*/
@@ -67,7 +68,8 @@ public interface HasComponents extends Component, Iterable<Component> {
/**
* Listens the component detach events.
*/
- public void addComponentDetachListener(ComponentDetachListener listener);
+ public void addComponentDetachListener(
+ ComponentDetachListener listener);
/**
* Stops the listening component detach events.
@@ -87,7 +89,7 @@ public interface HasComponents extends Component, Iterable<Component> {
/**
* A new component is attached to container.
- *
+ *
* @param event
* the component attach event.
*/
@@ -100,12 +102,12 @@ public interface HasComponents extends Component, Iterable<Component> {
public interface ComponentDetachListener extends Serializable {
public static final Method detachMethod = ReflectTools.findMethod(
- ComponentDetachListener.class,
- "componentDetachedFromContainer", ComponentDetachEvent.class);
+ ComponentDetachListener.class, "componentDetachedFromContainer",
+ ComponentDetachEvent.class);
/**
* A component has been detached from container.
- *
+ *
* @param event
* the component detach event.
*/
@@ -122,7 +124,7 @@ public interface HasComponents extends Component, Iterable<Component> {
/**
* Creates a new attach event.
- *
+ *
* @param container
* the container the component has been detached to.
* @param attachedComponent
@@ -136,7 +138,7 @@ public interface HasComponents extends Component, Iterable<Component> {
/**
* Gets the component container.
- *
+ *
* @param the
* component container.
*/
@@ -146,7 +148,7 @@ public interface HasComponents extends Component, Iterable<Component> {
/**
* Gets the attached component.
- *
+ *
* @param the
* attach component.
*/
@@ -165,7 +167,7 @@ public interface HasComponents extends Component, Iterable<Component> {
/**
* Creates a new detach event.
- *
+ *
* @param container
* the container the component has been detached from.
* @param detachedComponent
@@ -179,7 +181,7 @@ public interface HasComponents extends Component, Iterable<Component> {
/**
* Gets the component container.
- *
+ *
* @param the
* component container.
*/
@@ -189,7 +191,7 @@ public interface HasComponents extends Component, Iterable<Component> {
/**
* Gets the detached component.
- *
+ *
* @return the detached component.
*/
public Component getDetachedComponent() {
diff --git a/server/src/main/java/com/vaadin/ui/HorizontalLayout.java b/server/src/main/java/com/vaadin/ui/HorizontalLayout.java
index 616fa09225..32378a4652 100644
--- a/server/src/main/java/com/vaadin/ui/HorizontalLayout.java
+++ b/server/src/main/java/com/vaadin/ui/HorizontalLayout.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,10 +19,10 @@ import com.vaadin.shared.ui.orderedlayout.HorizontalLayoutState;
/**
* Horizontal layout
- *
+ *
* <code>HorizontalLayout</code> is a component container, which shows the
* subcomponents in the order of their addition (horizontally).
- *
+ *
* @author Vaadin Ltd.
* @since 5.3
*/
@@ -39,9 +39,9 @@ public class HorizontalLayout extends AbstractOrderedLayout {
/**
* Constructs a HorizontalLayout with the given components. The components
* are added in the given order.
- *
+ *
* @see AbstractOrderedLayout#addComponents(Component...)
- *
+ *
* @param children
* The components to add.
*/
diff --git a/server/src/main/java/com/vaadin/ui/HorizontalSplitPanel.java b/server/src/main/java/com/vaadin/ui/HorizontalSplitPanel.java
index 922986eeda..e176573d3c 100644
--- a/server/src/main/java/com/vaadin/ui/HorizontalSplitPanel.java
+++ b/server/src/main/java/com/vaadin/ui/HorizontalSplitPanel.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,9 +20,9 @@ import com.vaadin.shared.ui.splitpanel.HorizontalSplitPanelState;
/**
* A horizontal split panel contains two components and lays them horizontally.
* The first component is on the left side.
- *
+ *
* <pre>
- *
+ *
* +---------------------++----------------------+
* | || |
* | The first component || The second component |
@@ -32,9 +32,9 @@ import com.vaadin.shared.ui.splitpanel.HorizontalSplitPanelState;
* ^
* |
* the splitter
- *
+ *
* </pre>
- *
+ *
* @author Vaadin Ltd.
* @since 6.5
*/
@@ -49,7 +49,7 @@ public class HorizontalSplitPanel extends AbstractSplitPanel {
/**
* Creates a horizontal split panel containing the given components
- *
+ *
* @param firstComponent
* The component to be placed to the left of the splitter
* @param secondComponent
diff --git a/server/src/main/java/com/vaadin/ui/Html5File.java b/server/src/main/java/com/vaadin/ui/Html5File.java
index 87ea83c8c9..ef3b646f81 100644
--- a/server/src/main/java/com/vaadin/ui/Html5File.java
+++ b/server/src/main/java/com/vaadin/ui/Html5File.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -61,7 +61,7 @@ public class Html5File implements Serializable {
* on HTML 5 API's. It is supported only by modern web browsers like Firefox
* 3.6 and above and recent webkit based browsers (Safari 5, Chrome 6) at
* this time.
- *
+ *
* @param streamVariable
* the callback that returns stream where the implementation
* writes the file contents as it arrives.
diff --git a/server/src/main/java/com/vaadin/ui/Image.java b/server/src/main/java/com/vaadin/ui/Image.java
index 7b0294a450..cc92b4a3c8 100644
--- a/server/src/main/java/com/vaadin/ui/Image.java
+++ b/server/src/main/java/com/vaadin/ui/Image.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,10 +25,9 @@ import com.vaadin.shared.ui.image.ImageState;
/**
* Component for embedding images.
- *
+ *
* @author Vaadin Ltd.
- * @version
- * @VERSION@
+ * @version @VERSION@
* @since 7.0
*/
@SuppressWarnings("serial")
@@ -50,7 +49,7 @@ public class Image extends AbstractEmbedded {
/**
* Creates a new empty Image with caption.
- *
+ *
* @param caption
*/
public Image(String caption) {
@@ -61,7 +60,7 @@ public class Image extends AbstractEmbedded {
/**
* Creates a new Image whose contents is loaded from given resource. The
* dimensions are assumed if possible. The type is guessed from resource.
- *
+ *
* @param caption
* @param source
* the Source of the embedded object.
@@ -89,9 +88,9 @@ public class Image extends AbstractEmbedded {
* Add a click listener to the component. The listener is called whenever
* the user clicks inside the component. Depending on the content the event
* may be blocked and in that case no event is fired.
- *
+ *
* Use {@link #removeClickListener(ClickListener)} to remove the listener.
- *
+ *
* @param listener
* The listener to add
*/
@@ -112,7 +111,7 @@ public class Image extends AbstractEmbedded {
/**
* Remove a click listener from the component. The listener should earlier
* have been added using {@link #addClickListener(ClickListener)}.
- *
+ *
* @param listener
* The listener to remove
*/
diff --git a/server/src/main/java/com/vaadin/ui/InlineDateField.java b/server/src/main/java/com/vaadin/ui/InlineDateField.java
index e6f0f5d7a0..d1d165791b 100644
--- a/server/src/main/java/com/vaadin/ui/InlineDateField.java
+++ b/server/src/main/java/com/vaadin/ui/InlineDateField.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,9 +23,9 @@ import com.vaadin.data.Property;
/**
* <p>
* A date entry component, which displays the actual date selector inline.
- *
+ *
* </p>
- *
+ *
* @see DateField
* @see PopupDateField
* @author Vaadin Ltd.
@@ -37,7 +37,8 @@ public class InlineDateField extends DateField {
super();
}
- public InlineDateField(Property dataSource) throws IllegalArgumentException {
+ public InlineDateField(Property dataSource)
+ throws IllegalArgumentException {
super(dataSource);
}
diff --git a/server/src/main/java/com/vaadin/ui/JavaScript.java b/server/src/main/java/com/vaadin/ui/JavaScript.java
index 668ae67056..91ee1ccc20 100644
--- a/server/src/main/java/com/vaadin/ui/JavaScript.java
+++ b/server/src/main/java/com/vaadin/ui/JavaScript.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -33,7 +33,7 @@ import elemental.json.JsonException;
* instance of JavaScript, either use Page.getJavaScript() or
* JavaScript.getCurrent() as a shorthand for getting the JavaScript object
* corresponding to the current Page.
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
@@ -76,15 +76,15 @@ public class JavaScript extends AbstractExtension {
* object). The <code>call</code> method in the passed
* {@link JavaScriptFunction} object will be invoked with the same
* parameters whenever the JavaScript function is called in the browser.
- *
+ *
* A function added with the name <code>"myFunction"</code> can thus be
* invoked with the following JavaScript code:
* <code>window.myFunction(argument1, argument2)</code>.
- *
+ *
* If the name parameter contains dots, simple objects are created on demand
* to allow calling the function using the same name (e.g.
* <code>window.myObject.myFunction</code>).
- *
+ *
* @param name
* the name that the function should get in the global JavaScript
* namespace.
@@ -100,11 +100,11 @@ public class JavaScript extends AbstractExtension {
/**
* Removes a JavaScripFunction from the browser's global JavaScript
* namespace.
- *
+ *
* If the name contains dots and intermediate objects were created by
* {@link #addFunction(String, JavaScriptFunction)}, these objects will not
* be removed by this method.
- *
+ *
* @param name
* the name of the callback to remove
*/
@@ -115,7 +115,7 @@ public class JavaScript extends AbstractExtension {
/**
* Executes the given JavaScript code in the browser.
- *
+ *
* @param script
* The JavaScript code to run.
*/
@@ -125,7 +125,7 @@ public class JavaScript extends AbstractExtension {
/**
* Executes the given JavaScript code in the browser.
- *
+ *
* @param script
* The JavaScript code to run.
*/
@@ -136,9 +136,9 @@ public class JavaScript extends AbstractExtension {
/**
* Get the JavaScript object for the current Page, or null if there is no
* current page.
- *
+ *
* @see Page#getCurrent()
- *
+ *
* @return the JavaScript object corresponding to the current Page, or
* <code>null</code> if there is no current page.
*/
@@ -152,7 +152,7 @@ public class JavaScript extends AbstractExtension {
/**
* JavaScript is not designed to be removed.
- *
+ *
* @throws UnsupportedOperationException
* when invoked
*/
diff --git a/server/src/main/java/com/vaadin/ui/JavaScriptFunction.java b/server/src/main/java/com/vaadin/ui/JavaScriptFunction.java
index 071c88350b..b1f2b8c324 100644
--- a/server/src/main/java/com/vaadin/ui/JavaScriptFunction.java
+++ b/server/src/main/java/com/vaadin/ui/JavaScriptFunction.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,11 +26,11 @@ import elemental.json.JsonArray;
* Defines a method that is called by a client-side JavaScript function. When
* the corresponding JavaScript function is called, the {@link #call(JsonArray)}
* method is invoked.
- *
+ *
* @see JavaScript#addFunction(String, JavaScriptFunction)
* @see AbstractJavaScriptComponent#addFunction(String, JavaScriptFunction)
* @see AbstractJavaScriptExtension#addFunction(String, JavaScriptFunction)
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
@@ -41,7 +41,7 @@ public interface JavaScriptFunction extends Serializable {
* <p>
* Because of the asynchronous nature of the communication between client
* and server, no return value can be sent back to the browser.
- *
+ *
* @param arguments
* an array with JSON representations of the arguments with which
* the JavaScript function was called.
diff --git a/server/src/main/java/com/vaadin/ui/Label.java b/server/src/main/java/com/vaadin/ui/Label.java
index 1498246ec5..35ce130790 100644
--- a/server/src/main/java/com/vaadin/ui/Label.java
+++ b/server/src/main/java/com/vaadin/ui/Label.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -35,9 +35,9 @@ import com.vaadin.ui.declarative.DesignFormatter;
/**
* Label component for showing non-editable short texts.
- *
+ *
* The label content can be set to the modes specified by {@link ContentMode}
- *
+ *
* <p>
* The contents of the label may contain simple formatting:
* <ul>
@@ -51,7 +51,7 @@ import com.vaadin.ui.declarative.DesignFormatter;
* The <b>b</b>,<b>i</b>,<b>u</b> and <b>li</b> tags can contain all the tags in
* the list recursively.
* </p>
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -113,7 +113,7 @@ public class Label extends AbstractComponent implements Property<String>,
/**
* Creates a new instance of Label with text-contents.
- *
+ *
* @param content
*/
public Label(String content) {
@@ -123,7 +123,7 @@ public class Label extends AbstractComponent implements Property<String>,
/**
* Creates a new instance of Label with text-contents read from given
* datasource.
- *
+ *
* @param contentSource
*/
public Label(Property contentSource) {
@@ -132,7 +132,7 @@ public class Label extends AbstractComponent implements Property<String>,
/**
* Creates a new instance of Label with text-contents.
- *
+ *
* @param content
* @param contentMode
*/
@@ -145,7 +145,7 @@ public class Label extends AbstractComponent implements Property<String>,
/**
* Creates a new instance of Label with text-contents read from given
* datasource.
- *
+ *
* @param contentSource
* @param contentMode
*/
@@ -171,7 +171,7 @@ public class Label extends AbstractComponent implements Property<String>,
* The value of the label is the text that is shown to the end user.
* Depending on the {@link ContentMode} it is plain text or markup.
* </p>
- *
+ *
* @return the value of the label.
*/
@Override
@@ -186,19 +186,20 @@ public class Label extends AbstractComponent implements Property<String>,
/**
* Returns the current value of the data source converted using the current
* locale.
- *
+ *
* @return
*/
private String getDataSourceValue() {
- return ConverterUtil.convertFromModel(getPropertyDataSource()
- .getValue(), String.class, getConverter(), getLocale());
+ return ConverterUtil.convertFromModel(
+ getPropertyDataSource().getValue(), String.class,
+ getConverter(), getLocale());
}
/**
* Set the value of the label. Value of the label is the XML contents of the
* label. Since Vaadin 7.2, changing the value of Label instance with that
* method will fire ValueChangeEvent.
- *
+ *
* @param newStringValue
* the New value of the label.
*/
@@ -220,7 +221,7 @@ public class Label extends AbstractComponent implements Property<String>,
/**
* Gets the type of the Property.
- *
+ *
* @see com.vaadin.data.Property#getType()
*/
@Override
@@ -230,7 +231,7 @@ public class Label extends AbstractComponent implements Property<String>,
/**
* Gets the viewing data-source property.
- *
+ *
* @return the data source property.
* @see com.vaadin.data.Property.Viewer#getPropertyDataSource()
*/
@@ -242,7 +243,7 @@ public class Label extends AbstractComponent implements Property<String>,
/**
* Sets the property as data-source for viewing. Since Vaadin 7.2 a
* ValueChangeEvent is fired if the new value is different from previous.
- *
+ *
* @param newDataSource
* the new data source Property
* @see com.vaadin.data.Property.Viewer#setPropertyDataSource(com.vaadin.data.Property)
@@ -250,9 +251,8 @@ public class Label extends AbstractComponent implements Property<String>,
@Override
public void setPropertyDataSource(Property newDataSource) {
// Stops listening the old data source changes
- if (dataSource != null
- && Property.ValueChangeNotifier.class
- .isAssignableFrom(dataSource.getClass())) {
+ if (dataSource != null && Property.ValueChangeNotifier.class
+ .isAssignableFrom(dataSource.getClass())) {
((Property.ValueChangeNotifier) dataSource).removeListener(this);
}
@@ -275,9 +275,8 @@ public class Label extends AbstractComponent implements Property<String>,
}
// Listens the new data source if possible
- if (dataSource != null
- && Property.ValueChangeNotifier.class
- .isAssignableFrom(dataSource.getClass())) {
+ if (dataSource != null && Property.ValueChangeNotifier.class
+ .isAssignableFrom(dataSource.getClass())) {
((Property.ValueChangeNotifier) dataSource).addListener(this);
}
markAsDirty();
@@ -285,9 +284,9 @@ public class Label extends AbstractComponent implements Property<String>,
/**
* Gets the content mode of the Label.
- *
+ *
* @return the Content mode of the label.
- *
+ *
* @see ContentMode
*/
public ContentMode getContentMode() {
@@ -296,10 +295,10 @@ public class Label extends AbstractComponent implements Property<String>,
/**
* Sets the content mode of the Label.
- *
+ *
* @param contentMode
* the New content mode of the label.
- *
+ *
* @see ContentMode
*/
public void setContentMode(ContentMode contentMode) {
@@ -328,16 +327,16 @@ public class Label extends AbstractComponent implements Property<String>,
/**
* Value change event
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
- public static class ValueChangeEvent extends Component.Event implements
- Property.ValueChangeEvent {
+ public static class ValueChangeEvent extends Component.Event
+ implements Property.ValueChangeEvent {
/**
* New instance of text change event
- *
+ *
* @param source
* the Source of the event.
*/
@@ -347,7 +346,7 @@ public class Label extends AbstractComponent implements Property<String>,
/**
* Gets the Property that has been modified.
- *
+ *
* @see com.vaadin.data.Property.ValueChangeEvent#getProperty()
*/
@Override
@@ -358,14 +357,15 @@ public class Label extends AbstractComponent implements Property<String>,
/**
* Adds the value change listener.
- *
+ *
* @param listener
* the Listener to be added.
* @see com.vaadin.data.Property.ValueChangeNotifier#addListener(com.vaadin.data.Property.ValueChangeListener)
*/
@Override
public void addValueChangeListener(Property.ValueChangeListener listener) {
- addListener(Label.ValueChangeEvent.class, listener, VALUE_CHANGE_METHOD);
+ addListener(Label.ValueChangeEvent.class, listener,
+ VALUE_CHANGE_METHOD);
}
/**
@@ -380,13 +380,14 @@ public class Label extends AbstractComponent implements Property<String>,
/**
* Removes the value change listener.
- *
+ *
* @param listener
* the Listener to be removed.
* @see com.vaadin.data.Property.ValueChangeNotifier#removeListener(com.vaadin.data.Property.ValueChangeListener)
*/
@Override
- public void removeValueChangeListener(Property.ValueChangeListener listener) {
+ public void removeValueChangeListener(
+ Property.ValueChangeListener listener) {
removeListener(Label.ValueChangeEvent.class, listener,
VALUE_CHANGE_METHOD);
}
@@ -411,7 +412,7 @@ public class Label extends AbstractComponent implements Property<String>,
/**
* Listens the value change events from data source.
- *
+ *
* @see com.vaadin.data.Property.ValueChangeListener#valueChange(Property.ValueChangeEvent)
*/
@Override
@@ -463,19 +464,19 @@ public class Label extends AbstractComponent implements Property<String>,
/**
* Compares the Label to other objects.
- *
+ *
* <p>
* Labels can be compared to other labels for sorting label contents. This
* is especially handy for sorting table columns.
* </p>
- *
+ *
* <p>
* In RAW, PREFORMATTED and TEXT modes, the label contents are compared as
* is. In XML, UIDL and HTML modes, only CDATA is compared and tags ignored.
* If the other object is not a Label, its toString() return value is used
* in comparison.
* </p>
- *
+ *
* @param other
* the Other object to compare to.
* @return a negative integer, zero, or a positive integer as this object is
@@ -493,7 +494,7 @@ public class Label extends AbstractComponent implements Property<String>,
/**
* Strips the tags from the XML.
- *
+ *
* @param xml
* the String containing a XML snippet.
* @return the original XML without tags.
@@ -525,7 +526,7 @@ public class Label extends AbstractComponent implements Property<String>,
/**
* Gets the converter used to convert the property data source value to the
* label value.
- *
+ *
* @return The converter or null if none is set.
*/
public Converter<String, Object> getConverter() {
@@ -535,7 +536,7 @@ public class Label extends AbstractComponent implements Property<String>,
/**
* Sets the converter used to convert the label value to the property data
* source type. The converter must have a presentation type of String.
- *
+ *
* @param converter
* The new converter to use.
*/
@@ -556,12 +557,12 @@ public class Label extends AbstractComponent implements Property<String>,
* If legacy Property toString mode is disabled, the string representation
* has no special meaning
* </p>
- *
+ *
* @see AbstractProperty#isLegacyToStringEnabled()
- *
+ *
* @return The value displayed by this label or a string representation of
* this Label object.
- *
+ *
* @deprecated As of 7.0, use {@link #getValue()} to get the value of the
* label or {@link #getPropertyDataSource()}.getValue() to get
* the value of the data source.
@@ -578,7 +579,7 @@ public class Label extends AbstractComponent implements Property<String>,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.AbstractComponent#readDesign(org.jsoup.nodes .Element,
* com.vaadin.ui.declarative.DesignContext)
*/
@@ -602,7 +603,7 @@ public class Label extends AbstractComponent implements Property<String>,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.AbstractComponent#getCustomAttributes()
*/
@Override
@@ -616,7 +617,7 @@ public class Label extends AbstractComponent implements Property<String>,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.AbstractComponent#writeDesign(org.jsoup.nodes.Element
* , com.vaadin.ui.declarative.DesignContext)
*/
diff --git a/server/src/main/java/com/vaadin/ui/Layout.java b/server/src/main/java/com/vaadin/ui/Layout.java
index 6cf2cec249..01343d3299 100644
--- a/server/src/main/java/com/vaadin/ui/Layout.java
+++ b/server/src/main/java/com/vaadin/ui/Layout.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.shared.ui.MarginInfo;
* layouting control to the elements in the container. This is required by the
* various layout components to enable them to place other components in
* specific locations in the UI.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -40,11 +40,11 @@ public interface Layout extends ComponentContainer, Serializable {
/**
* Set alignment for one contained component in this layout. Use
* predefined alignments from Alignment class.
- *
+ *
* Example: <code>
* layout.setComponentAlignment(myComponent, Alignment.TOP_RIGHT);
* </code>
- *
+ *
* @param childComponent
* the component to align within it's layout cell.
* @param alignment
@@ -55,7 +55,7 @@ public interface Layout extends ComponentContainer, Serializable {
/**
* Returns the current Alignment of given component.
- *
+ *
* @param childComponent
* @return the {@link Alignment}
*/
@@ -64,7 +64,7 @@ public interface Layout extends ComponentContainer, Serializable {
/**
* Sets the alignment used for new components added to this layout. The
* default is {@link Alignment#TOP_LEFT}.
- *
+ *
* @param defaultComponentAlignment
* The new default alignment
*/
@@ -73,7 +73,7 @@ public interface Layout extends ComponentContainer, Serializable {
/**
* Returns the alignment used for new components added to this layout
- *
+ *
* @return The default alignment
*/
public Alignment getDefaultComponentAlignment();
@@ -83,12 +83,12 @@ public interface Layout extends ComponentContainer, Serializable {
/**
* This type of layout supports automatic addition of space between its
* components.
- *
+ *
*/
public interface SpacingHandler extends Serializable {
/**
* Enable spacing between child components within this layout.
- *
+ *
* <p>
* <strong>NOTE:</strong> This will only affect the space between
* components, not the space around all the components in the layout
@@ -96,12 +96,12 @@ public interface Layout extends ComponentContainer, Serializable {
* Table). Use {@link #setMargin(boolean)} to add space around the
* layout.
* </p>
- *
+ *
* <p>
* See the reference manual for more information about CSS rules for
* defining the amount of spacing to use.
* </p>
- *
+ *
* @param enabled
* true if spacing should be turned on, false if it should be
* turned off
@@ -109,7 +109,7 @@ public interface Layout extends ComponentContainer, Serializable {
public void setSpacing(boolean enabled);
/**
- *
+ *
* @return true if spacing between child components within this layout
* is enabled, false otherwise
*/
@@ -127,7 +127,7 @@ public interface Layout extends ComponentContainer, Serializable {
* will tell the client-side implementation to leave extra space around
* the layout. The client-side implementation decides the actual amount,
* and it can vary between themes.
- *
+ *
* @param enabled
* true if margins should be enabled on all sides, false to
* disable all margins
@@ -136,26 +136,26 @@ public interface Layout extends ComponentContainer, Serializable {
/**
* Enable margins for this layout.
- *
+ *
* <p>
* <strong>NOTE:</strong> This will only affect the space around the
* components in the layout, not space between the components in the
* layout. Use {@link #setSpacing(boolean)} to add space between the
* components in the layout.
* </p>
- *
+ *
* <p>
* See the reference manual for more information about CSS rules for
* defining the size of the margin.
* </p>
- *
+ *
* @param marginInfo
* MarginInfo object containing the new margins.
*/
public void setMargin(MarginInfo marginInfo);
/**
- *
+ *
* @return MarginInfo containing the currently enabled margins.
*/
public MarginInfo getMargin();
diff --git a/server/src/main/java/com/vaadin/ui/LegacyComponent.java b/server/src/main/java/com/vaadin/ui/LegacyComponent.java
index 7f71162c94..4260ee482a 100644
--- a/server/src/main/java/com/vaadin/ui/LegacyComponent.java
+++ b/server/src/main/java/com/vaadin/ui/LegacyComponent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,29 +25,29 @@ import com.vaadin.server.VariableOwner;
* implementing this interface your Component will be able to use
* {@link #paintContent(PaintTarget)} and
* {@link #changeVariables(Object, java.util.Map)} just like in Vaadin 6.
- *
+ *
* @deprecated As of 7.0. This class is only intended to ease migration and
* should not be used for new projects.
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
@Deprecated
-public interface LegacyComponent extends VariableOwner, Component,
- ConnectorEventListener {
+public interface LegacyComponent
+ extends VariableOwner, Component, ConnectorEventListener {
/**
* <p>
* Paints the Paintable into a UIDL stream. This method creates the UIDL
* sequence describing it and outputs it to the given UIDL stream.
* </p>
- *
+ *
* <p>
* It is called when the contents of the component should be painted in
* response to the component first being shown or having been altered so
* that its visual representation is changed.
* </p>
- *
+ *
* @param target
* the target UIDL stream where the component should paint itself
* to.
@@ -62,7 +62,7 @@ public interface LegacyComponent extends VariableOwner, Component,
* For a LegacyComponent, markAsDirty will also cause
* {@link #paintContent(PaintTarget)} to be called before sending changes to
* the client.
- *
+ *
* @see com.vaadin.server.ClientConnector#markAsDirty()
*/
@Override
diff --git a/server/src/main/java/com/vaadin/ui/LegacyWindow.java b/server/src/main/java/com/vaadin/ui/LegacyWindow.java
index fe71d14430..61b488054d 100644
--- a/server/src/main/java/com/vaadin/ui/LegacyWindow.java
+++ b/server/src/main/java/com/vaadin/ui/LegacyWindow.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -45,7 +45,7 @@ public class LegacyWindow extends UI {
/**
* Creates a new legacy window with the given caption
- *
+ *
* @param caption
* the caption of the window
*/
@@ -57,7 +57,7 @@ public class LegacyWindow extends UI {
/**
* Creates a legacy window with the given caption and content layout
- *
+ *
* @param caption
* @param content
*/
@@ -92,7 +92,7 @@ public class LegacyWindow extends UI {
* <p>
* Note! Portlets do not support direct window access through URLs.
* </p>
- *
+ *
* @return the Name of the Window.
*/
public String getName() {
@@ -115,7 +115,7 @@ public class LegacyWindow extends UI {
* <p>
* Note! Portlets do not support direct window access through URLs.
* </p>
- *
+ *
* @param name
* the new name for the window or null if the application should
* automatically assign a name to it
@@ -139,7 +139,7 @@ public class LegacyWindow extends UI {
* <p>
* Note! This method can not be used for portlets.
* </p>
- *
+ *
* @return the URL of the window or null if the window is not attached to an
* application
*/
@@ -160,10 +160,10 @@ public class LegacyWindow extends UI {
/**
* Opens the given resource in this UI. The contents of this UI is replaced
* by the {@code Resource}.
- *
+ *
* @param resource
* the resource to show in this UI
- *
+ *
* @deprecated As of 7.0, use getPage().setLocation instead
*/
@Deprecated
@@ -211,7 +211,7 @@ public class LegacyWindow extends UI {
* with security features in some browsers. Is is recommended to instead use
* {@link Link} for starting downloads.
* </p>
- *
+ *
* @param resource
* the resource.
* @param windowName
@@ -270,7 +270,7 @@ public class LegacyWindow extends UI {
* with security features in some browsers. Is is recommended to instead use
* {@link Link} for starting downloads.
* </p>
- *
+ *
* @param resource
* the resource.
* @param windowName
@@ -278,7 +278,7 @@ public class LegacyWindow extends UI {
* @param tryToOpenAsPopup
* Whether to try to force the resource to be opened in a new
* window
- * */
+ */
public void open(Resource resource, String windowName,
boolean tryToOpenAsPopup) {
getPage().open(resource, windowName, tryToOpenAsPopup);
@@ -295,7 +295,7 @@ public class LegacyWindow extends UI {
* with security features in some browsers. Is is recommended to instead use
* {@link Link} for starting downloads.
* </p>
- *
+ *
* @param resource
* the resource.
* @param windowName
@@ -318,13 +318,13 @@ public class LegacyWindow extends UI {
* Adds a new {@link BrowserWindowResizeListener} to this UI. The listener
* will be notified whenever the browser window within which this UI resides
* is resized.
- *
+ *
* @param resizeListener
* the listener to add
- *
+ *
* @see BrowserWindowResizeListener#browserWindowResized(BrowserWindowResizeEvent)
* @see #setResizeLazy(boolean)
- *
+ *
* @deprecated As of 7.0, use the similarly named api in Page instead
*/
@Deprecated
@@ -335,7 +335,7 @@ public class LegacyWindow extends UI {
/**
* Removes a {@link BrowserWindowResizeListener} from this UI. The listener
* will no longer be notified when the browser window is resized.
- *
+ *
* @param resizeListener
* the listener to remove
* @deprecated As of 7.0, use the similarly named api in Page instead
@@ -348,7 +348,7 @@ public class LegacyWindow extends UI {
/**
* Gets the last known height of the browser window in which this UI
* resides.
- *
+ *
* @return the browser window height in pixels
* @deprecated As of 7.0, use the similarly named api in Page instead
*/
@@ -359,9 +359,9 @@ public class LegacyWindow extends UI {
/**
* Gets the last known width of the browser window in which this UI resides.
- *
+ *
* @return the browser window width in pixels
- *
+ *
* @deprecated As of 7.0, use the similarly named api in Page instead
*/
@Deprecated
@@ -371,13 +371,13 @@ public class LegacyWindow extends UI {
/**
* Executes JavaScript in this window.
- *
+ *
* <p>
* This method allows one to inject javascript from the server to client. A
* client implementation is not required to implement this functionality,
* but currently all web-based clients do implement this.
* </p>
- *
+ *
* <p>
* Executing javascript this way often leads to cross-browser compatibility
* issues and regressions that are hard to resolve. Use of this method
@@ -385,10 +385,10 @@ public class LegacyWindow extends UI {
* with GWT. For more info on creating own, reusable client-side widgets in
* Java, read the corresponding chapter in Book of Vaadin.
* </p>
- *
+ *
* @param script
* JavaScript snippet that will be executed.
- *
+ *
* @deprecated As of 7.0, use JavaScript.getCurrent().execute(String)
* instead
*/
@@ -412,7 +412,7 @@ public class LegacyWindow extends UI {
/**
* Set the content of the window. For a {@link LegacyWindow}, the content
* must be a {@link ComponentContainer}.
- *
+ *
* @param content
*/
@Override
@@ -427,26 +427,27 @@ public class LegacyWindow extends UI {
/**
* This implementation replaces a component in the content container (
* {@link #getContent()}) instead of in the actual UI.
- *
+ *
* This method should only be called when the content is a
* {@link ComponentContainer} (default {@link VerticalLayout} or explicitly
* set).
*/
- public void replaceComponent(Component oldComponent, Component newComponent) {
+ public void replaceComponent(Component oldComponent,
+ Component newComponent) {
getContent().replaceComponent(oldComponent, newComponent);
}
/**
* Adds a component to this UI. The component is not added directly to the
* UI, but instead to the content container ({@link #getContent()}).
- *
+ *
* This method should only be called when the content is a
* {@link ComponentContainer} (default {@link VerticalLayout} or explicitly
* set).
- *
+ *
* @param component
* the component to add to this UI
- *
+ *
* @see #getContent()
*/
public void addComponent(Component component) {
@@ -456,7 +457,7 @@ public class LegacyWindow extends UI {
/**
* This implementation removes the component from the content container (
* {@link #getContent()}) instead of from the actual UI.
- *
+ *
* This method should only be called when the content is a
* {@link ComponentContainer} (default {@link VerticalLayout} or explicitly
* set).
@@ -468,7 +469,7 @@ public class LegacyWindow extends UI {
/**
* This implementation removes the components from the content container (
* {@link #getContent()}) instead of from the actual UI.
- *
+ *
* This method should only be called when the content is a
* {@link ComponentContainer} (default {@link VerticalLayout} or explicitly
* set).
diff --git a/server/src/main/java/com/vaadin/ui/Link.java b/server/src/main/java/com/vaadin/ui/Link.java
index c100336180..650aa3bcbd 100644
--- a/server/src/main/java/com/vaadin/ui/Link.java
+++ b/server/src/main/java/com/vaadin/ui/Link.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ import com.vaadin.ui.declarative.DesignContext;
/**
* Link is used to create external or internal URL links.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -63,7 +63,7 @@ public class Link extends AbstractComponent {
/**
* Creates a new instance of Link.
- *
+ *
* @param caption
* @param resource
*/
@@ -74,8 +74,8 @@ public class Link extends AbstractComponent {
/**
* Creates a new instance of Link that opens a new window.
- *
- *
+ *
+ *
* @param caption
* the Link text.
* @param targetName
@@ -88,7 +88,7 @@ public class Link extends AbstractComponent {
* the Height of the target window.
* @param border
* the Border style of the target window.
- *
+ *
*/
public Link(String caption, Resource resource, String targetName, int width,
int height, BorderStyle border) {
@@ -112,7 +112,7 @@ public class Link extends AbstractComponent {
/**
* Returns the target window border.
- *
+ *
* @return the target window border.
*/
public BorderStyle getTargetBorder() {
@@ -121,7 +121,7 @@ public class Link extends AbstractComponent {
/**
* Returns the target window height or -1 if not set.
- *
+ *
* @return the target window height.
*/
public int getTargetHeight() {
@@ -132,7 +132,7 @@ public class Link extends AbstractComponent {
/**
* Returns the target window name. Empty name of null implies that the
* target is opened to the window containing the link.
- *
+ *
* @return the target window name.
*/
public String getTargetName() {
@@ -141,7 +141,7 @@ public class Link extends AbstractComponent {
/**
* Returns the target window width or -1 if not set.
- *
+ *
* @return the target window width.
*/
public int getTargetWidth() {
@@ -151,7 +151,7 @@ public class Link extends AbstractComponent {
/**
* Sets the border of the target window.
- *
+ *
* @param targetBorder
* the targetBorder to set.
*/
@@ -161,7 +161,7 @@ public class Link extends AbstractComponent {
/**
* Sets the target window height.
- *
+ *
* @param targetHeight
* the targetHeight to set.
*/
@@ -171,7 +171,7 @@ public class Link extends AbstractComponent {
/**
* Sets the target window name.
- *
+ *
* @param targetName
* the targetName to set.
*/
@@ -181,7 +181,7 @@ public class Link extends AbstractComponent {
/**
* Sets the target window width.
- *
+ *
* @param targetWidth
* the targetWidth to set.
*/
@@ -191,7 +191,7 @@ public class Link extends AbstractComponent {
/**
* Returns the resource this link opens.
- *
+ *
* @return the Resource.
*/
public Resource getResource() {
@@ -200,7 +200,7 @@ public class Link extends AbstractComponent {
/**
* Sets the resource this link opens.
- *
+ *
* @param resource
* the resource to set.
*/
diff --git a/server/src/main/java/com/vaadin/ui/ListSelect.java b/server/src/main/java/com/vaadin/ui/ListSelect.java
index 9f44407db9..2f2a336fb8 100644
--- a/server/src/main/java/com/vaadin/ui/ListSelect.java
+++ b/server/src/main/java/com/vaadin/ui/ListSelect.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -55,7 +55,7 @@ public class ListSelect extends AbstractSelect {
* Calling {@code setColumns(10);} is equivalent to calling
* {@code setWidth("10em");}
* </p>
- *
+ *
* @deprecated As of 7.0. "Columns" does not reflect the exact number of
* characters that will be displayed. It is better to use
* setWidth together with "em" to control the width of the
@@ -76,7 +76,7 @@ public class ListSelect extends AbstractSelect {
/**
* Gets the number of columns for the component.
- *
+ *
* @see #setColumns(int)
* @deprecated As of 7.0. "Columns" does not reflect the exact number of
* characters that will be displayed. It is better to use
@@ -96,7 +96,7 @@ public class ListSelect extends AbstractSelect {
* Sets the number of rows in the editor. If the number of rows is set 0,
* the actual number of displayed rows is determined implicitly by the
* adapter.
- *
+ *
* @param rows
* the number of rows to set.
*/
diff --git a/server/src/main/java/com/vaadin/ui/LoadingIndicatorConfiguration.java b/server/src/main/java/com/vaadin/ui/LoadingIndicatorConfiguration.java
index 46fe7ead35..e0566497e0 100644
--- a/server/src/main/java/com/vaadin/ui/LoadingIndicatorConfiguration.java
+++ b/server/src/main/java/com/vaadin/ui/LoadingIndicatorConfiguration.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ import com.vaadin.shared.ui.ui.UIState.LoadingIndicatorConfigurationState;
/**
* Provides method for configuring the loading indicator.
- *
+ *
* @author Vaadin Ltd
* @since 7.1
*/
@@ -29,7 +29,7 @@ public interface LoadingIndicatorConfiguration extends Serializable {
/**
* Sets the delay before the loading indicator is shown. The default is
* 300ms.
- *
+ *
* @param firstDelay
* The first delay (in ms)
*/
@@ -37,7 +37,7 @@ public interface LoadingIndicatorConfiguration extends Serializable {
/**
* Returns the delay before the loading indicator is shown.
- *
+ *
* @return The first delay (in ms)
*/
public int getFirstDelay();
@@ -46,7 +46,7 @@ public interface LoadingIndicatorConfiguration extends Serializable {
* Sets the delay before the loading indicator goes into the "second" state.
* The delay is calculated from the time when the loading indicator was
* triggered. The default is 1500ms.
- *
+ *
* @param secondDelay
* The delay before going into the "second" state (in ms)
*/
@@ -56,7 +56,7 @@ public interface LoadingIndicatorConfiguration extends Serializable {
* Returns the delay before the loading indicator goes into the "second"
* state. The delay is calculated from the time when the loading indicator
* was triggered.
- *
+ *
* @return The delay before going into the "second" state (in ms)
*/
public int getSecondDelay();
@@ -65,7 +65,7 @@ public interface LoadingIndicatorConfiguration extends Serializable {
* Sets the delay before the loading indicator goes into the "third" state.
* The delay is calculated from the time when the loading indicator was
* triggered. The default is 5000ms.
- *
+ *
* @param thirdDelay
* The delay before going into the "third" state (in ms)
*/
@@ -75,14 +75,14 @@ public interface LoadingIndicatorConfiguration extends Serializable {
* Returns the delay before the loading indicator goes into the "third"
* state. The delay is calculated from the time when the loading indicator
* was triggered.
- *
+ *
* @return The delay before going into the "third" state (in ms)
*/
public int getThirdDelay();
}
-class LoadingIndicatorConfigurationImpl implements
- LoadingIndicatorConfiguration {
+class LoadingIndicatorConfigurationImpl
+ implements LoadingIndicatorConfiguration {
private UI ui;
public LoadingIndicatorConfigurationImpl(UI ui) {
@@ -91,7 +91,7 @@ class LoadingIndicatorConfigurationImpl implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.LoadingIndicator#setFirstDelay(int)
*/
@Override
@@ -101,7 +101,7 @@ class LoadingIndicatorConfigurationImpl implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.LoadingIndicator#getFirstDelay()
*/
@Override
@@ -111,7 +111,7 @@ class LoadingIndicatorConfigurationImpl implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.LoadingIndicator#setSecondDelay(int)
*/
@Override
@@ -121,7 +121,7 @@ class LoadingIndicatorConfigurationImpl implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.LoadingIndicator#getSecondDelay()
*/
@Override
@@ -131,7 +131,7 @@ class LoadingIndicatorConfigurationImpl implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.LoadingIndicator#setThirdDelay(int)
*/
@Override
@@ -141,7 +141,7 @@ class LoadingIndicatorConfigurationImpl implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.LoadingIndicator#getThirdDelay()
*/
@Override
diff --git a/server/src/main/java/com/vaadin/ui/LoginForm.java b/server/src/main/java/com/vaadin/ui/LoginForm.java
index 9df5f7343e..89244004db 100644
--- a/server/src/main/java/com/vaadin/ui/LoginForm.java
+++ b/server/src/main/java/com/vaadin/ui/LoginForm.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -70,7 +70,7 @@ public class LoginForm extends AbstractSingleComponentContainer {
/**
* Access method to form values by field names.
- *
+ *
* @param name
* @return value in given field
*/
@@ -90,7 +90,7 @@ public class LoginForm extends AbstractSingleComponentContainer {
public interface LoginListener extends Serializable {
/**
* This method is fired on each login form post.
- *
+ *
* @param event
* Login event
*/
@@ -101,12 +101,13 @@ public class LoginForm extends AbstractSingleComponentContainer {
* Internal stream source for the login URL - always returns "Success" and
* ignores the values received.
*/
- private static class LoginStreamSource implements StreamResource.StreamSource {
+ private static class LoginStreamSource
+ implements StreamResource.StreamSource {
@Override
public InputStream getStream() {
try {
- return new ByteArrayInputStream("<html>Success</html>".toString().getBytes(
- "UTF-8"));
+ return new ByteArrayInputStream(
+ "<html>Success</html>".toString().getBytes("UTF-8"));
} catch (UnsupportedEncodingException e) {
return null;
}
@@ -114,7 +115,6 @@ public class LoginForm extends AbstractSingleComponentContainer {
}
}
-
static {
try {
ON_LOGIN_METHOD = LoginListener.class.getDeclaredMethod("onLogin",
@@ -136,7 +136,7 @@ public class LoginForm extends AbstractSingleComponentContainer {
/**
* Customize the user name field. Only for overriding, do not call.
- *
+ *
* @return the user name field
* @since 7.7
*/
@@ -151,7 +151,7 @@ public class LoginForm extends AbstractSingleComponentContainer {
* Returns the caption set with {@link #setUsernameCaption(String)}. Note
* that this method might not match what is shown to the user if
* {@link #createUsernameField()} has been overridden.
- *
+ *
* @return user name field caption
*/
public String getUsernameCaption() {
@@ -165,7 +165,7 @@ public class LoginForm extends AbstractSingleComponentContainer {
* <p>
* As an alternative to calling this method, the method
* {@link #createUsernameField()} can be overridden.
- *
+ *
* @param cap
* new caption
*/
@@ -175,7 +175,7 @@ public class LoginForm extends AbstractSingleComponentContainer {
/**
* Customize the password field. Only for overriding, do not call.
- *
+ *
* @return the password field
* @since 7.7
*/
@@ -188,7 +188,7 @@ public class LoginForm extends AbstractSingleComponentContainer {
* Returns the caption set with {@link #setPasswordCaption(String)}. Note
* that this method might not match what is shown to the user if
* {@link #createPasswordField()} has been overridden.
- *
+ *
* @return password field caption
*/
public String getPasswordCaption() {
@@ -202,8 +202,9 @@ public class LoginForm extends AbstractSingleComponentContainer {
* <p>
* As an alternative to calling this method, the method
* {@link #createPasswordField()} can be overridden.
- *
- * @param cap new caption
+ *
+ * @param cap
+ * new caption
*/
public void setPasswordCaption(String cap) {
passwordCaption = cap;
@@ -212,7 +213,7 @@ public class LoginForm extends AbstractSingleComponentContainer {
/**
* Customize the login button. Only for overriding, do not call.
- *
+ *
* @return the login button
* @since 7.7
*/
@@ -225,7 +226,7 @@ public class LoginForm extends AbstractSingleComponentContainer {
* Returns the caption set with {@link #setLoginButtonCaption(String)}. Note
* that this method might not match what is shown to the user if
* {@link #createLoginButton()} has been overridden.
- *
+ *
* @return login button caption
*/
public String getLoginButtonCaption() {
@@ -239,8 +240,9 @@ public class LoginForm extends AbstractSingleComponentContainer {
* <p>
* As an alternative to calling this method, the method
* {@link #createLoginButton()} can be overridden.
- *
- * @param cap new caption
+ *
+ * @param cap
+ * new caption
*/
public void setLoginButtonCaption(String cap) {
loginButtonCaption = cap;
@@ -274,7 +276,7 @@ public class LoginForm extends AbstractSingleComponentContainer {
* {@link #getUsernameFieldCaption()}, {@link #getPasswordFieldCaption()}
* and {@link #getLoginButtonCaption()}. You do not have to use the login
* button in your layout.
- *
+ *
* @param userNameField
* the user name text field
* @param passwordField
@@ -338,7 +340,7 @@ public class LoginForm extends AbstractSingleComponentContainer {
/*
* (non-Javadoc)
- *
+ *
* Handle the login. In deferred mode, this method is called after the dummy
* POST request that triggers the password manager has been completed. In
* direct mode (the default setting), it is called directly when the user
@@ -356,7 +358,7 @@ public class LoginForm extends AbstractSingleComponentContainer {
/**
* Adds LoginListener to handle login logic
- *
+ *
* @param listener
*/
public void addLoginListener(LoginListener listener) {
@@ -374,7 +376,7 @@ public class LoginForm extends AbstractSingleComponentContainer {
/**
* Removes LoginListener
- *
+ *
* @param listener
*/
public void removeLoginListener(LoginListener listener) {
diff --git a/server/src/main/java/com/vaadin/ui/MenuBar.java b/server/src/main/java/com/vaadin/ui/MenuBar.java
index 9f05df7869..8dff0db804 100644
--- a/server/src/main/java/com/vaadin/ui/MenuBar.java
+++ b/server/src/main/java/com/vaadin/ui/MenuBar.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -45,8 +45,8 @@ import com.vaadin.ui.declarative.DesignContext;
* </p>
*/
@SuppressWarnings("serial")
-public class MenuBar extends AbstractComponent implements LegacyComponent,
- Focusable {
+public class MenuBar extends AbstractComponent
+ implements LegacyComponent, Focusable {
// Items of the top-level menu
private final List<MenuItem> menuItems;
@@ -139,8 +139,7 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
String description = item.getDescription();
if (description != null && description.length() > 0) {
- target.addAttribute(
- MenuBarConstants.ATTRIBUTE_ITEM_DESCRIPTION,
+ target.addAttribute(MenuBarConstants.ATTRIBUTE_ITEM_DESCRIPTION,
description);
}
if (item.isCheckable()) {
@@ -188,7 +187,7 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
}
}
- }// while
+ } // while
// If we got the clicked item, launch the command.
if (found && tmpItem.isEnabled()) {
@@ -199,7 +198,7 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
tmpItem.getCommand().menuSelected(tmpItem);
}
}
- }// if
+ } // if
}// changeVariables
/**
@@ -213,7 +212,7 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
/**
* Add a new item to the menu bar. Command can be null, but a caption must
* be given.
- *
+ *
* @param caption
* the text for the menu item
* @param command
@@ -227,7 +226,7 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
/**
* Add a new item to the menu bar. Icon and command can be null, but a
* caption must be given.
- *
+ *
* @param caption
* the text for the menu item
* @param icon
@@ -253,7 +252,7 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
* Add an item before some item. If the given item does not exist the item
* is added at the end of the menu. Icon and command can be null, but a
* caption must be given.
- *
+ *
* @param caption
* the text for the menu item
* @param icon
@@ -286,7 +285,7 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
/**
* Returns a list with all the MenuItem objects in the menu bar
- *
+ *
* @return a list containing the MenuItem objects in the menu bar
*/
public List<MenuItem> getItems() {
@@ -295,7 +294,7 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
/**
* Remove first occurrence the specified item from the main menu
- *
+ *
* @param item
* The item to be removed
*/
@@ -316,7 +315,7 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
/**
* Returns the size of the menu.
- *
+ *
* @return The size of the menu
*/
public int getSize() {
@@ -327,9 +326,9 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
* Set the item that is used when collapsing the top level menu. All
* "overflowing" items will be added below this. The item command will be
* ignored. If set to null, the default item with a downwards arrow is used.
- *
+ *
* The item command (if specified) is ignored.
- *
+ *
* @param item
*/
public void setMoreMenuItem(MenuItem item) {
@@ -343,7 +342,7 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
/**
* Get the MenuItem used as the collapse menu item.
- *
+ *
* @return
*/
public MenuItem getMoreMenuItem() {
@@ -357,7 +356,7 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
* if the mouse is moved out of the opened menu.
* <p>
* Note, that on touch devices the menu still opens on a click event.
- *
+ *
* @param autoOpenTopLevelMenu
* true if menus should be opened without click, the default is
* false
@@ -374,7 +373,7 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
* automatically opened when the mouse cursor is moved over the menu.
* Normally root menu opens only by clicking on the menu. Submenus always
* open automatically.
- *
+ *
* @return true if the root menus open without click, the default is false
*/
public boolean isAutoOpen() {
@@ -386,7 +385,7 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
* captions are passed to the browser as html and the developer is
* responsible for ensuring no harmful html is used. If set to false, the
* content is passed to the browser as plain text.
- *
+ *
* @param htmlContentAllowed
* true if the captions are used as html, false if used as plain
* text
@@ -398,7 +397,7 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
/**
* Checks whether item captions are interpreted as html or plain text.
- *
+ *
* @return true if the captions are used as html, false if used as plain
* text
* @see #setHtmlContentAllowed(boolean)
@@ -414,7 +413,7 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.Component.Focusable#setTabIndex(int)
*/
@Override
@@ -443,7 +442,7 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
* be fired on user click by implementing the
* {@link com.vaadin.ui.MenuBar.Command} interface. You can also add
* multiple MenuItems to a MenuItem and create a sub-menu.
- *
+ *
*/
public class MenuItem implements Serializable {
@@ -466,14 +465,15 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
* Constructs a new menu item that can optionally have an icon and a
* command associated with it. Icon and command can be null, but a
* caption must be given.
- *
+ *
* @param text
* The text associated with the command
* @param command
* The command to be fired
* @throws IllegalArgumentException
*/
- public MenuItem(String caption, Resource icon, MenuBar.Command command) {
+ public MenuItem(String caption, Resource icon,
+ MenuBar.Command command) {
if (caption == null) {
throw new IllegalArgumentException("caption cannot be null");
}
@@ -485,7 +485,7 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
/**
* Checks if the item has children (if it is a sub-menu).
- *
+ *
* @return True if this item has children
*/
public boolean hasChildren() {
@@ -496,7 +496,7 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
* Adds a separator to this menu. A separator is a way to visually group
* items in a menu, to make it easier for users to find what they are
* looking for in the menu.
- *
+ *
* @author Jouni Koivuviita / Vaadin Ltd.
* @since 6.2.0
*/
@@ -515,20 +515,21 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
/**
* Add a new item inside this item, thus creating a sub-menu. Command
* can be null, but a caption must be given.
- *
+ *
* @param caption
* the text for the menu item
* @param command
* the command for the menu item
*/
- public MenuBar.MenuItem addItem(String caption, MenuBar.Command command) {
+ public MenuBar.MenuItem addItem(String caption,
+ MenuBar.Command command) {
return addItem(caption, null, command);
}
/**
* Add a new item inside this item, thus creating a sub-menu. Icon and
* command can be null, but a caption must be given.
- *
+ *
* @param caption
* the text for the menu item
* @param icon
@@ -571,7 +572,7 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
* Add an item before some item. If the given item does not exist the
* item is added at the end of the menu. Icon and command can be null,
* but a caption must be given.
- *
+ *
* @param caption
* the text for the menu item
* @param icon
@@ -608,7 +609,7 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
/**
* For the associated command.
- *
+ *
* @return The associated command, or null if there is none
*/
public Command getCommand() {
@@ -617,7 +618,7 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
/**
* Gets the objects icon.
- *
+ *
* @return The icon of the item, null if the item doesn't have an icon
*/
public Resource getIcon() {
@@ -627,7 +628,7 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
/**
* For the containing item. This will return null if the item is in the
* top-level menu bar.
- *
+ *
* @return The containing {@link com.vaadin.ui.MenuBar.MenuItem} , or
* null if there is none
*/
@@ -637,7 +638,7 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
/**
* This will return the children of this item or null if there are none.
- *
+ *
* @return List of children items, or null if there are none
*/
public List<MenuItem> getChildren() {
@@ -646,7 +647,7 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
/**
* Gets the objects text
- *
+ *
* @return The text
*/
public java.lang.String getText() {
@@ -655,7 +656,7 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
/**
* Returns the number of children.
- *
+ *
* @return The number of child items
*/
public int getSize() {
@@ -667,7 +668,7 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
/**
* Get the unique identifier for this item.
- *
+ *
* @return The id of this item
*/
public int getId() {
@@ -676,7 +677,7 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
/**
* Set the command for this item. Set null to remove.
- *
+ *
* @param command
* The MenuCommand of this item
*/
@@ -686,7 +687,7 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
/**
* Sets the icon. Set null to remove.
- *
+ *
* @param icon
* The icon for this item
*/
@@ -697,7 +698,7 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
/**
* Set the text of this object.
- *
+ *
* @param text
* Text for this object
*/
@@ -710,7 +711,7 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
/**
* Remove the first occurrence of the item.
- *
+ *
* @param item
* The item to be removed
*/
@@ -737,7 +738,7 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
/**
* Set the parent of this item. This is called by the addItem method.
- *
+ *
* @param parent
* The parent item
*/
@@ -785,7 +786,7 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
* Sets the items's description. See {@link #getDescription()} for more
* information on what the description is. This method will trigger a
* {@link RepaintRequestEvent}.
- *
+ *
* @param description
* the new description string for the component.
*/
@@ -800,7 +801,7 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
* describe the state of the item to the user. The description string
* may contain certain XML tags:
* </p>
- *
+ *
* <p>
* <table border=1>
* <tr>
@@ -843,11 +844,11 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
* </tr>
* </table>
* </p>
- *
+ *
* <p>
* These tags may be nested.
* </p>
- *
+ *
* @return item's description <code>String</code>
*/
public String getDescription() {
@@ -858,11 +859,11 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
* Gets the checkable state of the item - whether the item has checked
* and unchecked states. If an item is checkable its checked state (as
* returned by {@link #isChecked()}) is indicated in the UI.
- *
+ *
* <p>
* An item is not checkable by default.
* </p>
- *
+ *
* @return true if the item is checkable, false otherwise
* @since 6.6.2
*/
@@ -874,15 +875,15 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
* Sets the checkable state of the item. If an item is checkable its
* checked state (as returned by {@link #isChecked()}) is indicated in
* the UI.
- *
+ *
* <p>
* An item is not checkable by default.
* </p>
- *
+ *
* <p>
* Items with sub items cannot be checkable.
* </p>
- *
+ *
* @param checkable
* true if the item should be checkable, false otherwise
* @throws IllegalStateException
@@ -904,15 +905,15 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
* if the item is checkable (as indicated by {@link #isCheckable()}).
* The checked state is indicated in the UI with the item, if the item
* is checkable.
- *
+ *
* <p>
* An item is not checked by default.
* </p>
- *
+ *
* <p>
* The CSS style corresponding to the checked state is "-checked".
* </p>
- *
+ *
* @return true if the item is checked, false otherwise
* @since 6.6.2
*/
@@ -924,15 +925,15 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
* Sets the checked state of the item. Only used if the item is
* checkable (indicated by {@link #isCheckable()}). The checked state is
* indicated in the UI with the item, if the item is checkable.
- *
+ *
* <p>
* An item is not checked by default.
* </p>
- *
+ *
* <p>
* The CSS style corresponding to the checked state is "-checked".
* </p>
- *
+ *
* @return true if the item is checked, false otherwise
* @since 6.6.2
*/
@@ -950,7 +951,8 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
}
// in many cases there seems to be an empty more menu item
- if (getMoreMenuItem() != null && !getMoreMenuItem().getText().isEmpty()) {
+ if (getMoreMenuItem() != null
+ && !getMoreMenuItem().getText().isEmpty()) {
Element moreMenu = createMenuElement(getMoreMenuItem());
moreMenu.attr("more", true);
design.appendChild(moreMenu);
@@ -971,14 +973,14 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
def.getIcon(), Resource.class);
DesignAttributeHandler.writeAttribute("disabled", attr,
!item.isEnabled(), !def.isEnabled(), boolean.class);
- DesignAttributeHandler.writeAttribute("visible", attr,
- item.isVisible(), def.isVisible(), boolean.class);
+ DesignAttributeHandler.writeAttribute("visible", attr, item.isVisible(),
+ def.isVisible(), boolean.class);
DesignAttributeHandler.writeAttribute("separator", attr,
item.isSeparator(), def.isSeparator(), boolean.class);
DesignAttributeHandler.writeAttribute("checkable", attr,
item.isCheckable(), def.isCheckable(), boolean.class);
- DesignAttributeHandler.writeAttribute("checked", attr,
- item.isChecked(), def.isChecked(), boolean.class);
+ DesignAttributeHandler.writeAttribute("checked", attr, item.isChecked(),
+ def.isChecked(), boolean.class);
DesignAttributeHandler.writeAttribute("description", attr,
item.getDescription(), def.getDescription(), String.class);
DesignAttributeHandler.writeAttribute("style-name", attr,
@@ -998,8 +1000,8 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
protected MenuItem readMenuElement(Element menuElement) {
Resource icon = null;
if (menuElement.hasAttr("icon")) {
- icon = DesignAttributeHandler.getFormatter().parse(
- menuElement.attr("icon"), Resource.class);
+ icon = DesignAttributeHandler.getFormatter()
+ .parse(menuElement.attr("icon"), Resource.class);
}
String caption = "";
@@ -1040,12 +1042,12 @@ public class MenuBar extends AbstractComponent implements LegacyComponent,
attr, boolean.class));
}
if (menuElement.hasAttr("description")) {
- menu.setDescription(DesignAttributeHandler.readAttribute(
- "description", attr, String.class));
+ menu.setDescription(DesignAttributeHandler
+ .readAttribute("description", attr, String.class));
}
if (menuElement.hasAttr("style-name")) {
- menu.setStyleName(DesignAttributeHandler.readAttribute(
- "style-name", attr, String.class));
+ menu.setStyleName(DesignAttributeHandler.readAttribute("style-name",
+ attr, String.class));
}
if (!subMenus.isEmpty()) {
diff --git a/server/src/main/java/com/vaadin/ui/NativeButton.java b/server/src/main/java/com/vaadin/ui/NativeButton.java
index 3c220719b5..e04a356e22 100644
--- a/server/src/main/java/com/vaadin/ui/NativeButton.java
+++ b/server/src/main/java/com/vaadin/ui/NativeButton.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/main/java/com/vaadin/ui/NativeSelect.java b/server/src/main/java/com/vaadin/ui/NativeSelect.java
index 137d57f677..d3fac0ade5 100644
--- a/server/src/main/java/com/vaadin/ui/NativeSelect.java
+++ b/server/src/main/java/com/vaadin/ui/NativeSelect.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -35,13 +35,14 @@ import com.vaadin.server.PaintTarget;
* better choice.
*/
@SuppressWarnings("serial")
-public class NativeSelect extends AbstractSelect implements
- FieldEvents.BlurNotifier, FieldEvents.FocusNotifier {
+public class NativeSelect extends AbstractSelect
+ implements FieldEvents.BlurNotifier, FieldEvents.FocusNotifier {
// width in characters, mimics TextField
private int columns = 0;
- FocusAndBlurServerRpcImpl focusBlurRpc = new FocusAndBlurServerRpcImpl(this) {
+ FocusAndBlurServerRpcImpl focusBlurRpc = new FocusAndBlurServerRpcImpl(
+ this) {
@Override
protected void fireEvent(Event event) {
@@ -76,7 +77,7 @@ public class NativeSelect extends AbstractSelect implements
* Calling {@code setColumns(10);} is equivalent to calling
* {@code setWidth("10em");}
* </p>
- *
+ *
* @deprecated As of 7.0. "Columns" does not reflect the exact number of
* characters that will be displayed. It is better to use
* setWidth together with "em" to control the width of the
@@ -97,7 +98,7 @@ public class NativeSelect extends AbstractSelect implements
/**
* Gets the number of columns for the component.
- *
+ *
* @see #setColumns(int)
* @deprecated As of 7.0. "Columns" does not reflect the exact number of
* characters that will be displayed. It is better to use
@@ -124,7 +125,8 @@ public class NativeSelect extends AbstractSelect implements
public void setMultiSelect(boolean multiSelect)
throws UnsupportedOperationException {
if (multiSelect == true) {
- throw new UnsupportedOperationException("Multiselect not supported");
+ throw new UnsupportedOperationException(
+ "Multiselect not supported");
}
}
diff --git a/server/src/main/java/com/vaadin/ui/Notification.java b/server/src/main/java/com/vaadin/ui/Notification.java
index aaf25a9e9d..410493c81f 100644
--- a/server/src/main/java/com/vaadin/ui/Notification.java
+++ b/server/src/main/java/com/vaadin/ui/Notification.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -59,12 +59,12 @@ import com.vaadin.shared.Position;
* configured to show up in a custom position, for a specified time (or until
* clicked), and with a custom stylename. An icon can also be added.
* </p>
- *
+ *
*/
public class Notification implements Serializable {
public enum Type {
- HUMANIZED_MESSAGE("humanized"), WARNING_MESSAGE("warning"), ERROR_MESSAGE(
- "error"), TRAY_NOTIFICATION("tray"),
+ HUMANIZED_MESSAGE("humanized"), WARNING_MESSAGE(
+ "warning"), ERROR_MESSAGE("error"), TRAY_NOTIFICATION("tray"),
/**
* @since 7.2
*/
@@ -123,9 +123,9 @@ public class Notification implements Serializable {
/**
* Creates a "humanized" notification message.
- *
+ *
* The caption is rendered as plain text with HTML automatically escaped.
- *
+ *
* @param caption
* The message to show
*/
@@ -135,9 +135,9 @@ public class Notification implements Serializable {
/**
* Creates a notification message of the specified type.
- *
+ *
* The caption is rendered as plain text with HTML automatically escaped.
- *
+ *
* @param caption
* The message to show
* @param type
@@ -150,10 +150,10 @@ public class Notification implements Serializable {
/**
* Creates a "humanized" notification message with a bigger caption and
* smaller description.
- *
+ *
* The caption and description are rendered as plain text with HTML
* automatically escaped.
- *
+ *
* @param caption
* The message caption
* @param description
@@ -166,10 +166,10 @@ public class Notification implements Serializable {
/**
* Creates a notification message of the specified type, with a bigger
* caption and smaller description.
- *
+ *
* The caption and description are rendered as plain text with HTML
* automatically escaped.
- *
+ *
* @param caption
* The message caption
* @param description
@@ -184,9 +184,9 @@ public class Notification implements Serializable {
/**
* Creates a notification message of the specified type, with a bigger
* caption and smaller description.
- *
+ *
* Care should be taken to to avoid XSS vulnerabilities if html is allowed.
- *
+ *
* @param caption
* The message caption
* @param description
@@ -230,7 +230,7 @@ public class Notification implements Serializable {
/**
* Gets the caption part of the notification message.
- *
+ *
* @return The message caption
*/
public String getCaption() {
@@ -239,7 +239,7 @@ public class Notification implements Serializable {
/**
* Sets the caption part of the notification message
- *
+ *
* @param caption
* The message caption
*/
@@ -249,7 +249,7 @@ public class Notification implements Serializable {
/**
* Gets the description part of the notification message.
- *
+ *
* @return The message description.
*/
public String getDescription() {
@@ -258,7 +258,7 @@ public class Notification implements Serializable {
/**
* Sets the description part of the notification message.
- *
+ *
* @param description
*/
public void setDescription(String description) {
@@ -267,7 +267,7 @@ public class Notification implements Serializable {
/**
* Gets the position of the notification message.
- *
+ *
* @return The position
*/
public Position getPosition() {
@@ -276,7 +276,7 @@ public class Notification implements Serializable {
/**
* Sets the position of the notification message.
- *
+ *
* @param position
* The desired notification position
*/
@@ -286,7 +286,7 @@ public class Notification implements Serializable {
/**
* Gets the icon part of the notification message.
- *
+ *
* @return The message icon
*/
public Resource getIcon() {
@@ -295,7 +295,7 @@ public class Notification implements Serializable {
/**
* Sets the icon part of the notification message.
- *
+ *
* @param icon
* The desired message icon
*/
@@ -305,7 +305,7 @@ public class Notification implements Serializable {
/**
* Gets the delay before the notification disappears.
- *
+ *
* @return the delay in msec, -1 indicates the message has to be clicked.
*/
public int getDelayMsec() {
@@ -314,7 +314,7 @@ public class Notification implements Serializable {
/**
* Sets the delay before the notification disappears.
- *
+ *
* @param delayMsec
* the desired delay in msec, -1 to require the user to click the
* message
@@ -325,7 +325,7 @@ public class Notification implements Serializable {
/**
* Sets the style name for the notification message.
- *
+ *
* @param styleName
* The desired style name.
*/
@@ -335,7 +335,7 @@ public class Notification implements Serializable {
/**
* Gets the style name for the notification message.
- *
+ *
* @return
*/
public String getStyleName() {
@@ -347,7 +347,7 @@ public class Notification implements Serializable {
* true, the texts are passed to the browser as html and the developer is
* responsible for ensuring no harmful html is used. If set to false, the
* texts are passed to the browser as plain text.
- *
+ *
* @param htmlContentAllowed
* true if the texts are used as html, false if used as plain
* text
@@ -359,7 +359,7 @@ public class Notification implements Serializable {
/**
* Checks whether caption and description are interpreted as html or plain
* text.
- *
+ *
* @return true if the texts are used as html, false if used as plain text
* @see #setHtmlContentAllowed(boolean)
*/
@@ -369,7 +369,7 @@ public class Notification implements Serializable {
/**
* Shows this notification on a Page.
- *
+ *
* @param page
* The page on which the notification should be shown
*/
@@ -381,12 +381,12 @@ public class Notification implements Serializable {
/**
* Shows a notification message on the middle of the current page. The
* message automatically disappears ("humanized message").
- *
+ *
* The caption is rendered as plain text with HTML automatically escaped.
- *
+ *
* @see #Notification(String)
* @see #show(Page)
- *
+ *
* @param caption
* The message
*/
@@ -399,12 +399,12 @@ public class Notification implements Serializable {
* of the message depends on the type, which is one of the basic types
* defined in {@link Notification}, for instance
* Notification.TYPE_WARNING_MESSAGE.
- *
+ *
* The caption is rendered as plain text with HTML automatically escaped.
- *
+ *
* @see #Notification(String, int)
* @see #show(Page)
- *
+ *
* @param caption
* The message
* @param type
@@ -419,12 +419,12 @@ public class Notification implements Serializable {
* of the message depends on the type, which is one of the basic types
* defined in {@link Notification}, for instance
* Notification.TYPE_WARNING_MESSAGE.
- *
+ *
* The caption is rendered as plain text with HTML automatically escaped.
- *
+ *
* @see #Notification(String, Type)
* @see #show(Page)
- *
+ *
* @param caption
* The message
* @param description
diff --git a/server/src/main/java/com/vaadin/ui/NotificationConfiguration.java b/server/src/main/java/com/vaadin/ui/NotificationConfiguration.java
index 925c888a51..37eacab09d 100644
--- a/server/src/main/java/com/vaadin/ui/NotificationConfiguration.java
+++ b/server/src/main/java/com/vaadin/ui/NotificationConfiguration.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -15,7 +15,7 @@
*/
/**
- *
+ *
*/
package com.vaadin.ui;
@@ -86,8 +86,8 @@ public interface NotificationConfiguration extends Serializable {
* Sets the WAI-ARIA role for a notification type.
* <p>
* This role defines how an assistive device handles a notification.
- * Available roles are alert and status (@see <a
- * href="http://www.w3.org/TR/2011/CR-wai-aria-20110118/roles">Roles
+ * Available roles are alert and status (@see
+ * <a href="http://www.w3.org/TR/2011/CR-wai-aria-20110118/roles">Roles
* Model</a>).
*
* The default role is alert.
@@ -103,8 +103,8 @@ public interface NotificationConfiguration extends Serializable {
* Gets the WAI-ARIA role for a notification type.
* <p>
* This role defines how an assistive device handles a notification.
- * Available roles are alert and status (@see <a
- * href="http://www.w3.org/TR/2011/CR-wai-aria-20110118/roles">Roles
+ * Available roles are alert and status (@see
+ * <a href="http://www.w3.org/TR/2011/CR-wai-aria-20110118/roles">Roles
* Model</a>)
* <p>
* The default role is alert.
diff --git a/server/src/main/java/com/vaadin/ui/OptionGroup.java b/server/src/main/java/com/vaadin/ui/OptionGroup.java
index 81e81c9a3a..2516dc7dde 100644
--- a/server/src/main/java/com/vaadin/ui/OptionGroup.java
+++ b/server/src/main/java/com/vaadin/ui/OptionGroup.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -40,8 +40,8 @@ import com.vaadin.ui.declarative.DesignFormatter;
* Configures select to be used as an option group.
*/
@SuppressWarnings("serial")
-public class OptionGroup extends AbstractSelect implements
- FieldEvents.BlurNotifier, FieldEvents.FocusNotifier {
+public class OptionGroup extends AbstractSelect
+ implements FieldEvents.BlurNotifier, FieldEvents.FocusNotifier {
private Set<Object> disabledItemIds = new HashSet<Object>();
private boolean htmlContentAllowed = false;
@@ -66,7 +66,8 @@ public class OptionGroup extends AbstractSelect implements
public void paintContent(PaintTarget target) throws PaintException {
target.addAttribute("type", "optiongroup");
if (isHtmlContentAllowed()) {
- target.addAttribute(OptionGroupConstants.HTML_CONTENT_ALLOWED, true);
+ target.addAttribute(OptionGroupConstants.HTML_CONTENT_ALLOWED,
+ true);
}
super.paintContent(target);
}
@@ -168,7 +169,8 @@ public class OptionGroup extends AbstractSelect implements
Set<?> currentValueSet = (Set<?>) getValue();
Set<?> newValueSet = (Set<?>) newValue;
for (Object itemId : currentValueSet) {
- if (!isItemEnabled(itemId) && !newValueSet.contains(itemId)) {
+ if (!isItemEnabled(itemId)
+ && !newValueSet.contains(itemId)) {
markAsDirty();
return;
}
@@ -197,10 +199,10 @@ public class OptionGroup extends AbstractSelect implements
* Sets an item disabled or enabled. In the multiselect mode, a disabled
* item cannot be selected or deselected by the user. In the single
* selection mode, a disable item cannot be selected.
- *
+ *
* However, programmatical selection or deselection of an disable item is
* possible. By default, items are enabled.
- *
+ *
* @param itemId
* the id of the item to be disabled or enabled
* @param enabled
@@ -219,7 +221,7 @@ public class OptionGroup extends AbstractSelect implements
/**
* Returns true if the item is enabled.
- *
+ *
* @param itemId
* the id of the item to be checked
* @return true if the item is enabled, false otherwise
@@ -237,7 +239,7 @@ public class OptionGroup extends AbstractSelect implements
* captions are passed to the browser as html and the developer is
* responsible for ensuring no harmful html is used. If set to false, the
* content is passed to the browser as plain text.
- *
+ *
* @param htmlContentAllowed
* true if the captions are used as html, false if used as plain
* text
@@ -249,7 +251,7 @@ public class OptionGroup extends AbstractSelect implements
/**
* Checks whether captions are interpreted as html or plain text.
- *
+ *
* @return true if the captions are used as html, false if used as plain
* text
* @see #setHtmlContentAllowed(boolean)
diff --git a/server/src/main/java/com/vaadin/ui/Panel.java b/server/src/main/java/com/vaadin/ui/Panel.java
index 6458d5f57d..193f0bdcef 100644
--- a/server/src/main/java/com/vaadin/ui/Panel.java
+++ b/server/src/main/java/com/vaadin/ui/Panel.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -38,13 +38,13 @@ import com.vaadin.ui.declarative.DesignContext;
/**
* Panel - a simple single component container.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@SuppressWarnings("serial")
-public class Panel extends AbstractSingleComponentContainer implements
- Scrollable, Action.Notifier, Focusable, LegacyComponent {
+public class Panel extends AbstractSingleComponentContainer
+ implements Scrollable, Action.Notifier, Focusable, LegacyComponent {
/**
* Keeps track of the Actions added to this component, and manages the
@@ -68,7 +68,7 @@ public class Panel extends AbstractSingleComponentContainer implements
/**
* Creates a new empty panel which contains the given content.
- *
+ *
* @param content
* the content for the panel.
*/
@@ -81,7 +81,7 @@ public class Panel extends AbstractSingleComponentContainer implements
/**
* Creates a new empty panel with caption.
- *
+ *
* @param caption
* the caption used in the panel (HTML).
*/
@@ -91,7 +91,7 @@ public class Panel extends AbstractSingleComponentContainer implements
/**
* Creates a new empty panel with the given caption and content.
- *
+ *
* @param caption
* the caption of the panel (HTML).
* @param content
@@ -104,11 +104,11 @@ public class Panel extends AbstractSingleComponentContainer implements
/**
* Sets the caption of the panel.
- *
+ *
* Note that the caption is interpreted as HTML and therefore care should be
* taken not to enable HTML injection and XSS attacks using panel captions.
* This behavior may change in future versions.
- *
+ *
* @see AbstractComponent#setCaption(String)
*/
@Override
@@ -118,7 +118,7 @@ public class Panel extends AbstractSingleComponentContainer implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.server.LegacyComponent#paintContent(com.vaadin.server
* .PaintTarget)
*/
@@ -132,7 +132,7 @@ public class Panel extends AbstractSingleComponentContainer implements
/**
* Called when one or more variables handled by the implementing class are
* changed.
- *
+ *
* @see com.vaadin.server.VariableOwner#changeVariables(Object, Map)
*/
@Override
@@ -170,7 +170,7 @@ public class Panel extends AbstractSingleComponentContainer implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.server.Scrollable#setScrollable(boolean)
*/
@Override
@@ -180,7 +180,7 @@ public class Panel extends AbstractSingleComponentContainer implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.server.Scrollable#setScrollable(boolean)
*/
@Override
@@ -190,7 +190,7 @@ public class Panel extends AbstractSingleComponentContainer implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.server.Scrollable#setScrollLeft(int)
*/
@Override
@@ -204,7 +204,7 @@ public class Panel extends AbstractSingleComponentContainer implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.server.Scrollable#setScrollTop(int)
*/
@Override
@@ -267,9 +267,9 @@ public class Panel extends AbstractSingleComponentContainer implements
* user clicks inside the Panel. Also when the click targets a component
* inside the Panel, provided the targeted component does not prevent the
* click event from propagating.
- *
+ *
* Use {@link #removeListener(ClickListener)} to remove the listener.
- *
+ *
* @param listener
* The listener to add
*/
@@ -290,7 +290,7 @@ public class Panel extends AbstractSingleComponentContainer implements
/**
* Remove a click listener from the Panel. The listener should earlier have
* been added using {@link #addListener(ClickListener)}.
- *
+ *
* @param listener
* The listener to remove
*/
@@ -326,7 +326,7 @@ public class Panel extends AbstractSingleComponentContainer implements
/**
* Moves keyboard focus to the component. {@see Focusable#focus()}
- *
+ *
*/
@Override
public void focus() {
diff --git a/server/src/main/java/com/vaadin/ui/PasswordField.java b/server/src/main/java/com/vaadin/ui/PasswordField.java
index 385649c318..05f2138dd5 100644
--- a/server/src/main/java/com/vaadin/ui/PasswordField.java
+++ b/server/src/main/java/com/vaadin/ui/PasswordField.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -37,7 +37,7 @@ public class PasswordField extends AbstractTextField {
/**
* Constructs a PasswordField with given property data source.
- *
+ *
* @param dataSource
* the property data source for the field
*/
@@ -47,7 +47,7 @@ public class PasswordField extends AbstractTextField {
/**
* Constructs a PasswordField with given caption and property data source.
- *
+ *
* @param caption
* the caption for the field
* @param dataSource
@@ -60,7 +60,7 @@ public class PasswordField extends AbstractTextField {
/**
* Constructs a PasswordField with given value and caption.
- *
+ *
* @param caption
* the caption for the field
* @param value
@@ -73,7 +73,7 @@ public class PasswordField extends AbstractTextField {
/**
* Constructs a PasswordField with given caption.
- *
+ *
* @param caption
* the caption for the field
*/
@@ -84,7 +84,7 @@ public class PasswordField extends AbstractTextField {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.AbstractField#readDesign(org.jsoup.nodes.Element ,
* com.vaadin.ui.declarative.DesignContext)
*/
@@ -100,7 +100,7 @@ public class PasswordField extends AbstractTextField {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.AbstractTextField#writeDesign(org.jsoup.nodes.Element
* , com.vaadin.ui.declarative.DesignContext)
*/
diff --git a/server/src/main/java/com/vaadin/ui/PopupDateField.java b/server/src/main/java/com/vaadin/ui/PopupDateField.java
index f07ac84160..cdfd594e53 100644
--- a/server/src/main/java/com/vaadin/ui/PopupDateField.java
+++ b/server/src/main/java/com/vaadin/ui/PopupDateField.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,9 +26,9 @@ import com.vaadin.shared.ui.datefield.PopupDateFieldState;
/**
* <p>
* A date entry component, which displays the actual date selector as a popup.
- *
+ *
* </p>
- *
+ *
* @see DateField
* @see InlineDateField
* @author Vaadin Ltd.
@@ -69,7 +69,7 @@ public class PopupDateField extends DateField {
/**
* Gets the current input prompt.
- *
+ *
* @see #setInputPrompt(String)
* @return the current input prompt, or null if not enabled
*/
@@ -80,7 +80,7 @@ public class PopupDateField extends DateField {
/**
* Sets the input prompt - a textual prompt that is displayed when the field
* would otherwise be empty, to prompt the user for input.
- *
+ *
* @param inputPrompt
*/
public void setInputPrompt(String inputPrompt) {
@@ -100,9 +100,9 @@ public class PopupDateField extends DateField {
/**
* Checks whether the text field is enabled (default) or not.
- *
+ *
* @see PopupDateField#setTextFieldEnabled(boolean);
- *
+ *
* @return <b>true</b> if the text field is enabled, <b>false</b> otherwise.
*/
public boolean isTextFieldEnabled() {
@@ -113,9 +113,9 @@ public class PopupDateField extends DateField {
* Enables or disables the text field. By default the text field is enabled.
* Disabling it causes only the button for date selection to be active, thus
* preventing the user from entering invalid dates.
- *
+ *
* See {@link http://dev.vaadin.com/ticket/6790}.
- *
+ *
* @param state
* <b>true</b> to enable text field, <b>false</b> to disable it.
*/
@@ -126,7 +126,7 @@ public class PopupDateField extends DateField {
/**
* Set a description that explains the usage of the Widget for users of
* assistive devices.
- *
+ *
* @param description
* String with the description
*/
@@ -137,7 +137,7 @@ public class PopupDateField extends DateField {
/**
* Get the description that explains the usage of the Widget for users of
* assistive devices.
- *
+ *
* @return String with the description
*/
public String getAssistiveText() {
diff --git a/server/src/main/java/com/vaadin/ui/PopupView.java b/server/src/main/java/com/vaadin/ui/PopupView.java
index 73c93b29f3..04598d4aa6 100644
--- a/server/src/main/java/com/vaadin/ui/PopupView.java
+++ b/server/src/main/java/com/vaadin/ui/PopupView.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,12 +29,12 @@ import com.vaadin.shared.ui.popupview.PopupViewState;
import com.vaadin.ui.declarative.DesignContext;
/**
- *
+ *
* A component for displaying a two different views to data. The minimized view
* is normally used to render the component, and when it is clicked the full
* view is displayed on a popup. The inner class {@link PopupView.Content} is
* used to deliver contents to this component.
- *
+ *
* @author Vaadin Ltd.
*/
@SuppressWarnings("serial")
@@ -69,7 +69,7 @@ public class PopupView extends AbstractComponent implements HasComponents {
/**
* This is an internal constructor. Use
* {@link PopupView#PopupView(String, Component)} instead.
- *
+ *
* @since 7.5.0
*/
@Deprecated
@@ -83,7 +83,7 @@ public class PopupView extends AbstractComponent implements HasComponents {
* A simple way to create a PopupPanel. Note that the minimal representation
* may not be dynamically updated, in order to achieve this create your own
* Content object and use {@link PopupView#PopupView(Content)}.
- *
+ *
* @param small
* the minimal textual representation as HTML
* @param large
@@ -96,7 +96,7 @@ public class PopupView extends AbstractComponent implements HasComponents {
/**
* Creates a PopupView through the PopupView.Content interface. This allows
* the creator to dynamically change the contents of the PopupView.
- *
+ *
* @param content
* the PopupView.Content that contains the information for this
*/
@@ -107,9 +107,9 @@ public class PopupView extends AbstractComponent implements HasComponents {
/**
* Creates a Content from given text representation and popup content.
- *
+ *
* @since 7.5.0
- *
+ *
* @param minimizedValue
* text representation when popup is hidden
* @param popupContent
@@ -133,7 +133,7 @@ public class PopupView extends AbstractComponent implements HasComponents {
/**
* This method will replace the current content of the panel with a new one.
- *
+ *
* @param newContent
* PopupView.Content object containing new information for the
* PopupView
@@ -152,7 +152,7 @@ public class PopupView extends AbstractComponent implements HasComponents {
/**
* Returns the content-package for this PopupView.
- *
+ *
* @return the PopupView.Content for this object or null
*/
public PopupView.Content getContent() {
@@ -162,7 +162,7 @@ public class PopupView extends AbstractComponent implements HasComponents {
/**
* Set the visibility of the popup. Does not hide the minimal
* representation.
- *
+ *
* @param visible
*/
public void setPopupVisible(boolean visible) {
@@ -202,7 +202,7 @@ public class PopupView extends AbstractComponent implements HasComponents {
/**
* Return whether the popup is visible.
- *
+ *
* @return true if the popup is showing
*/
public boolean isPopupVisible() {
@@ -212,7 +212,7 @@ public class PopupView extends AbstractComponent implements HasComponents {
/**
* Check if this popup will be hidden when the user takes the mouse cursor
* out of the popup area.
- *
+ *
* @return true if the popup is hidden on mouse out, false otherwise
*/
public boolean isHideOnMouseOut() {
@@ -223,9 +223,9 @@ public class PopupView extends AbstractComponent implements HasComponents {
* Should the popup automatically hide when the user takes the mouse cursor
* out of the popup area? If this is false, the user must click outside the
* popup to close it. The default is true.
- *
+ *
* @param hideOnMouseOut
- *
+ *
*/
public void setHideOnMouseOut(boolean hideOnMouseOut) {
getState().hideOnMouseOut = hideOnMouseOut;
@@ -238,7 +238,7 @@ public class PopupView extends AbstractComponent implements HasComponents {
/**
* This class only contains other components when the popup is showing.
- *
+ *
* @see com.vaadin.ui.ComponentContainer#getComponentIterator()
*/
@Override
@@ -253,7 +253,7 @@ public class PopupView extends AbstractComponent implements HasComponents {
/**
* Gets the number of contained components. Consistent with the iterator
* returned by {@link #getComponentIterator()}.
- *
+ *
* @return the number of contained components (zero or one)
*/
public int getComponentCount() {
@@ -288,8 +288,8 @@ public class PopupView extends AbstractComponent implements HasComponents {
super.writeDesign(design, designContext);
Element popupContent = new Element(Tag.valueOf("popup-content"), "");
- popupContent.appendChild(designContext.createElement(content
- .getPopupComponent()));
+ popupContent.appendChild(
+ designContext.createElement(content.getPopupComponent()));
String minimizedHTML = content.getMinimizedValueAsHTML();
if (minimizedHTML != null && !minimizedHTML.isEmpty()) {
@@ -317,14 +317,14 @@ public class PopupView extends AbstractComponent implements HasComponents {
/**
* This should return a small view of the full data.
- *
+ *
* @return value in HTML format
*/
public String getMinimizedValueAsHTML();
/**
* This should return the full Component representing the data
- *
+ *
* @return a Component for the value
*/
public Component getPopupComponent();
@@ -333,13 +333,13 @@ public class PopupView extends AbstractComponent implements HasComponents {
/**
* Add a listener that is called whenever the visibility of the popup is
* changed.
- *
+ *
* @param listener
* the listener to add
* @see PopupVisibilityListener
* @see PopupVisibilityEvent
* @see #removeListener(PopupVisibilityListener)
- *
+ *
*/
public void addPopupVisibilityListener(PopupVisibilityListener listener) {
addListener(PopupVisibilityEvent.class, listener,
@@ -358,13 +358,14 @@ public class PopupView extends AbstractComponent implements HasComponents {
/**
* Removes a previously added listener, so that it no longer receives events
* when the visibility of the popup changes.
- *
+ *
* @param listener
* the listener to remove
* @see PopupVisibilityListener
* @see #addListener(PopupVisibilityListener)
*/
- public void removePopupVisibilityListener(PopupVisibilityListener listener) {
+ public void removePopupVisibilityListener(
+ PopupVisibilityListener listener) {
removeListener(PopupVisibilityEvent.class, listener,
POPUP_VISIBILITY_METHOD);
}
@@ -383,7 +384,7 @@ public class PopupView extends AbstractComponent implements HasComponents {
* visibility of the popup changes. You can get the new visibility directly
* with {@link #isPopupVisible()}, or get the PopupView that produced the
* event with {@link #getPopupView()}.
- *
+ *
*/
public static class PopupVisibilityEvent extends Event {
@@ -393,7 +394,7 @@ public class PopupView extends AbstractComponent implements HasComponents {
/**
* Get the PopupView instance that is the source of this event.
- *
+ *
* @return the source PopupView
*/
public PopupView getPopupView() {
@@ -402,7 +403,7 @@ public class PopupView extends AbstractComponent implements HasComponents {
/**
* Returns the current visibility of the popup.
- *
+ *
* @return true if the popup is visible
*/
public boolean isPopupVisible() {
@@ -413,16 +414,16 @@ public class PopupView extends AbstractComponent implements HasComponents {
/**
* Defines a listener that can receive a PopupVisibilityEvent when the
* visibility of the popup changes.
- *
+ *
*/
public interface PopupVisibilityListener extends Serializable {
/**
* Pass to {@link PopupView#PopupVisibilityEvent} to start listening for
* popup visibility changes.
- *
+ *
* @param event
* the event
- *
+ *
* @see {@link PopupVisibilityEvent}
* @see {@link PopupView#addListener(PopupVisibilityListener)}
*/
diff --git a/server/src/main/java/com/vaadin/ui/ProgressBar.java b/server/src/main/java/com/vaadin/ui/ProgressBar.java
index d38067d51e..8c588cb095 100644
--- a/server/src/main/java/com/vaadin/ui/ProgressBar.java
+++ b/server/src/main/java/com/vaadin/ui/ProgressBar.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,12 +30,12 @@ import com.vaadin.ui.declarative.DesignContext;
* floating point value between 0 and 1 (inclusive). The progress bar can also
* be in an indeterminate mode showing an animation indicating that the task is
* running but without providing any information about the current progress.
- *
+ *
* @since 7.1
* @author Vaadin Ltd
*/
-public class ProgressBar extends AbstractField<Float> implements
- Property.Viewer, Property.ValueChangeListener {
+public class ProgressBar extends AbstractField<Float>
+ implements Property.Viewer, Property.ValueChangeListener {
private static final float DEFAULT_VALUE = 0f;
@@ -48,7 +48,7 @@ public class ProgressBar extends AbstractField<Float> implements
/**
* Creates a new progress bar with the given initial value.
- *
+ *
* @param progress
* the initial progress value
*/
@@ -58,7 +58,7 @@ public class ProgressBar extends AbstractField<Float> implements
/**
* Creates a new progress bar bound to the given data source.
- *
+ *
* @param dataSource
* the property to bind this progress bar to
*/
@@ -78,7 +78,7 @@ public class ProgressBar extends AbstractField<Float> implements
* Gets the value of this progress bar. The value is a <code>float</code>
* between 0 and 1 where 0 represents no progress at all and 1 represents
* fully completed.
- *
+ *
* @return the current progress value
*/
@Override
@@ -90,7 +90,7 @@ public class ProgressBar extends AbstractField<Float> implements
* Sets the value of this progress bar. The value is a <code>float</code>
* between 0 and 1 where 0 represents no progress at all and 1 represents
* fully completed.
- *
+ *
* @param newValue
* the current progress value
*/
@@ -118,7 +118,7 @@ public class ProgressBar extends AbstractField<Float> implements
* Sets whether or not this progress indicator is indeterminate. In
* indeterminate mode there is an animation indicating that the task is
* running but without providing any information about the current progress.
- *
+ *
* @param indeterminate
* <code>true</code> to set to indeterminate mode; otherwise
* <code>false</code>
@@ -131,7 +131,7 @@ public class ProgressBar extends AbstractField<Float> implements
* Gets whether or not this progress indicator is indeterminate. In
* indeterminate mode there is an animation indicating that the task is
* running but without providing any information about the current progress.
- *
+ *
* @return <code>true</code> if set to indeterminate mode; otherwise
* <code>false</code>
*/
@@ -143,7 +143,7 @@ public class ProgressBar extends AbstractField<Float> implements
* Overridden to keep the shared state in sync with the AbstractField
* internal value. Should be removed once AbstractField is refactored to use
* shared state.
- *
+ *
* See tickets #10921 and #11064.
*/
@Override
@@ -159,9 +159,8 @@ public class ProgressBar extends AbstractField<Float> implements
public void readDesign(Element design, DesignContext designContext) {
super.readDesign(design, designContext);
if (design.hasAttr("value") && !design.attr("value").isEmpty()) {
- setValue(
- DesignAttributeHandler.readAttribute("value",
- design.attributes(), Float.class), false, true);
+ setValue(DesignAttributeHandler.readAttribute("value",
+ design.attributes(), Float.class), false, true);
}
}
diff --git a/server/src/main/java/com/vaadin/ui/ProgressIndicator.java b/server/src/main/java/com/vaadin/ui/ProgressIndicator.java
index 6e436169e3..dd275782a8 100644
--- a/server/src/main/java/com/vaadin/ui/ProgressIndicator.java
+++ b/server/src/main/java/com/vaadin/ui/ProgressIndicator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import com.vaadin.shared.ui.progressindicator.ProgressIndicatorState;
* centralized management of when messages are sent to the server. Furthermore,
* polling might not be needed at all if {@link UI#setPushMode(PushMode)} or
* {@link UI#setPollInterval(int)} is used.
- *
+ *
* @author Vaadin Ltd.
* @since 4
* @deprecated as of 7.1, use {@link ProgressBar} combined with
@@ -56,7 +56,7 @@ public class ProgressIndicator extends ProgressBar {
/**
* Creates a new instance of ProgressIndicator with given state.
- *
+ *
* @param value
*/
public ProgressIndicator(float value) {
@@ -67,7 +67,7 @@ public class ProgressIndicator extends ProgressBar {
/**
* Creates a new instance of ProgressIndicator with state read from the
* given datasource.
- *
+ *
* @param contentSource
*/
public ProgressIndicator(Property contentSource) {
@@ -87,7 +87,7 @@ public class ProgressIndicator extends ProgressBar {
/**
* Sets the interval that component checks for progress.
- *
+ *
* @param pollingInterval
* the interval in milliseconds.
*/
@@ -97,7 +97,7 @@ public class ProgressIndicator extends ProgressBar {
/**
* Gets the interval that component checks for progress.
- *
+ *
* @return the interval in milliseconds.
*/
public int getPollingInterval() {
diff --git a/server/src/main/java/com/vaadin/ui/PushConfiguration.java b/server/src/main/java/com/vaadin/ui/PushConfiguration.java
index 6ef323cea8..e0f47c494c 100644
--- a/server/src/main/java/com/vaadin/ui/PushConfiguration.java
+++ b/server/src/main/java/com/vaadin/ui/PushConfiguration.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import com.vaadin.shared.ui.ui.UIState.PushConfigurationState;
/**
* Provides method for configuring the push channel.
- *
+ *
* @since 7.1
* @author Vaadin Ltd
*/
@@ -36,7 +36,7 @@ public interface PushConfiguration extends Serializable {
/**
* Returns the mode of bidirectional ("push") communication that is used.
- *
+ *
* @return The push mode.
*/
public PushMode getPushMode();
@@ -49,10 +49,10 @@ public interface PushConfiguration extends Serializable {
* application developer. An add-on should not set the push mode directly,
* rather instruct the user to set it.
* </p>
- *
+ *
* @param pushMode
* The push mode to use.
- *
+ *
* @throws IllegalArgumentException
* if the argument is null.
* @throws IllegalStateException
@@ -66,7 +66,7 @@ public interface PushConfiguration extends Serializable {
* Note that if you set the transport type using
* {@link #setParameter(String, String)} to an unsupported type this method
* will return null. Supported types are defined by {@link Transport}.
- *
+ *
* @return The primary transport type
*/
public Transport getTransport();
@@ -76,7 +76,7 @@ public interface PushConfiguration extends Serializable {
* <p>
* Note that the new transport type will not be used until the push channel
* is disconnected and reconnected if already active.
- *
+ *
* @param transport
* The primary transport type
*/
@@ -88,7 +88,7 @@ public interface PushConfiguration extends Serializable {
* Note that if you set the transport type using
* {@link #setParameter(String, String)} to an unsupported type this method
* will return null. Supported types are defined by {@link Transport}.
- *
+ *
* @return The fallback transport type
*/
public Transport getFallbackTransport();
@@ -98,7 +98,7 @@ public interface PushConfiguration extends Serializable {
* <p>
* Note that the new transport type will not be used until the push channel
* is disconnected and reconnected if already active.
- *
+ *
* @param fallbackTransport
* The fallback transport type
*/
@@ -109,7 +109,7 @@ public interface PushConfiguration extends Serializable {
* <p>
* This method provides low level access to push parameters and is typically
* not needed for normal application development.
- *
+ *
* @since 7.1
* @param parameter
* The parameter name
@@ -119,7 +119,7 @@ public interface PushConfiguration extends Serializable {
/**
* Returns the parameters which have been defined.
- *
+ *
* @since 7.1
* @return A collection of parameter names
*/
@@ -130,7 +130,7 @@ public interface PushConfiguration extends Serializable {
* <p>
* This method provides low level access to push parameters and is typically
* not needed for normal application development.
- *
+ *
* @since 7.1
* @param parameter
* The parameter name
@@ -144,7 +144,7 @@ public interface PushConfiguration extends Serializable {
* <p>
* This is only used when overriding the URL to use. Setting this to null
* (the default) will use the default URL.
- *
+ *
* @since 7.6
* @param pushUrl
* The push URL to use
@@ -156,7 +156,7 @@ public interface PushConfiguration extends Serializable {
* <p>
* This is only used when overriding the URL to use. Returns null (the
* default) when the default URL is used.
- *
+ *
* @since 7.6
* @return the URL to use for push requests, or null to use to default
*/
@@ -173,7 +173,7 @@ class PushConfigurationImpl implements PushConfiguration {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.PushConfiguration#getPushMode()
*/
@Override
@@ -183,10 +183,9 @@ class PushConfigurationImpl implements PushConfiguration {
/*
* (non-Javadoc)
- *
- * @see
- * com.vaadin.ui.PushConfiguration#setPushMode(com.vaadin.shared.communication
- * .PushMode)
+ *
+ * @see com.vaadin.ui.PushConfiguration#setPushMode(com.vaadin.shared.
+ * communication .PushMode)
*/
@Override
public void setPushMode(PushMode pushMode) {
@@ -203,7 +202,8 @@ class PushConfigurationImpl implements PushConfiguration {
assert session.hasLock();
- if (pushMode.isEnabled() && !session.getService().ensurePushAvailable()) {
+ if (pushMode.isEnabled()
+ && !session.getService().ensurePushAvailable()) {
throw new IllegalStateException(
"Push is not available. See previous log messages for more information.");
}
@@ -234,14 +234,14 @@ class PushConfigurationImpl implements PushConfiguration {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.PushConfiguration#getTransport()
*/
@Override
public Transport getTransport() {
try {
- Transport tr = Transport
- .getByIdentifier(getParameter(PushConfigurationState.TRANSPORT_PARAM));
+ Transport tr = Transport.getByIdentifier(
+ getParameter(PushConfigurationState.TRANSPORT_PARAM));
if (tr == Transport.WEBSOCKET
&& getState(false).alwaysUseXhrForServerRequests) {
return Transport.WEBSOCKET_XHR;
@@ -255,7 +255,7 @@ class PushConfigurationImpl implements PushConfiguration {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.ui.PushConfiguration#setTransport(com.vaadin.shared.ui.ui.
* Transport)
@@ -276,14 +276,14 @@ class PushConfigurationImpl implements PushConfiguration {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.PushConfiguration#getFallbackTransport()
*/
@Override
public Transport getFallbackTransport() {
try {
- return Transport
- .valueOf(getParameter(PushConfigurationState.FALLBACK_TRANSPORT_PARAM));
+ return Transport.valueOf(getParameter(
+ PushConfigurationState.FALLBACK_TRANSPORT_PARAM));
} catch (IllegalArgumentException e) {
return null;
}
@@ -291,7 +291,7 @@ class PushConfigurationImpl implements PushConfiguration {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.ui.PushConfiguration#setFallbackTransport(com.vaadin.shared
* .ui.ui.Transport)
@@ -308,7 +308,7 @@ class PushConfigurationImpl implements PushConfiguration {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.PushConfiguration#getParameter(java.lang.String)
*/
@Override
@@ -318,7 +318,7 @@ class PushConfigurationImpl implements PushConfiguration {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.PushConfiguration#setParameter(java.lang.String,
* java.lang.String)
*/
@@ -338,8 +338,8 @@ class PushConfigurationImpl implements PushConfiguration {
@Override
public Collection<String> getParameterNames() {
- return Collections.unmodifiableCollection(getState(false).parameters
- .keySet());
+ return Collections
+ .unmodifiableCollection(getState(false).parameters.keySet());
}
}
diff --git a/server/src/main/java/com/vaadin/ui/ReconnectDialogConfiguration.java b/server/src/main/java/com/vaadin/ui/ReconnectDialogConfiguration.java
index 92eb1e785f..da5fa80f04 100644
--- a/server/src/main/java/com/vaadin/ui/ReconnectDialogConfiguration.java
+++ b/server/src/main/java/com/vaadin/ui/ReconnectDialogConfiguration.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import java.io.Serializable;
/**
* Provides method for configuring the reconnect dialog.
- *
+ *
* @since 7.6
* @author Vaadin Ltd
*/
@@ -28,7 +28,7 @@ public interface ReconnectDialogConfiguration extends Serializable {
/**
* Gets the text to show in the reconnect dialog when trying to re-establish
* the server connection
- *
+ *
* @return the text to show in the reconnect dialog
*/
public String getDialogText();
@@ -36,7 +36,7 @@ public interface ReconnectDialogConfiguration extends Serializable {
/**
* Sets the text to show in the reconnect dialog when trying to re-establish
* the server connection
- *
+ *
* @param dialogText
* the text to show in the reconnect dialog
*/
@@ -45,7 +45,7 @@ public interface ReconnectDialogConfiguration extends Serializable {
/**
* Gets the text to show in the reconnect dialog after giving up trying to
* reconnect ({@link #getReconnectAttempts()} reached)
- *
+ *
* @return the text to show in the reconnect dialog after giving up
*/
public String getDialogTextGaveUp();
@@ -53,7 +53,7 @@ public interface ReconnectDialogConfiguration extends Serializable {
/**
* Sets the text to show in the reconnect dialog after giving up trying to
* reconnect ({@link #getReconnectAttempts()} reached)
- *
+ *
* @param dialogText
* the text to show in the reconnect dialog after giving up
*/
@@ -62,7 +62,7 @@ public interface ReconnectDialogConfiguration extends Serializable {
/**
* Gets the number of times to try to reconnect to the server before giving
* up
- *
+ *
* @return the number of times to try to reconnect
*/
public int getReconnectAttempts();
@@ -70,7 +70,7 @@ public interface ReconnectDialogConfiguration extends Serializable {
/**
* Sets the number of times to try to reconnect to the server before giving
* up
- *
+ *
* @param reconnectAttempts
* the number of times to try to reconnect
*/
@@ -78,14 +78,14 @@ public interface ReconnectDialogConfiguration extends Serializable {
/**
* Gets the interval (in milliseconds) between reconnect attempts
- *
+ *
* @return the interval (in ms) between reconnect attempts
*/
public int getReconnectInterval();
/**
* Sets the interval (in milliseconds) between reconnect attempts
- *
+ *
* @param reconnectInterval
* the interval (in ms) between reconnect attempts
*/
@@ -94,7 +94,7 @@ public interface ReconnectDialogConfiguration extends Serializable {
/**
* Gets the timeout (in milliseconds) between noticing a loss of connection
* and showing the dialog.
- *
+ *
* @return the time to wait before showing a dialog
*/
public int getDialogGracePeriod();
@@ -102,7 +102,7 @@ public interface ReconnectDialogConfiguration extends Serializable {
/**
* Sets the timeout (in milliseconds) between noticing a loss of connection
* and showing the dialog.
- *
+ *
* @param dialogGracePeriod
* the time to wait before showing a dialog
*/
@@ -115,7 +115,7 @@ public interface ReconnectDialogConfiguration extends Serializable {
* application while the dialog is being shown. If not modal, the user can
* continue to use the application as normally and all server events will be
* queued until connection has been re-established.
- *
+ *
* @param dialogModal
* true to make the dialog modal, false otherwise
*/
@@ -160,7 +160,8 @@ class ReconnectDialogConfigurationImpl implements ReconnectDialogConfiguration {
@Override
public int getReconnectAttempts() {
- return ui.getState(false).reconnectDialogConfiguration.reconnectAttempts;
+ return ui
+ .getState(false).reconnectDialogConfiguration.reconnectAttempts;
}
@Override
@@ -170,7 +171,8 @@ class ReconnectDialogConfigurationImpl implements ReconnectDialogConfiguration {
@Override
public int getReconnectInterval() {
- return ui.getState(false).reconnectDialogConfiguration.reconnectInterval;
+ return ui
+ .getState(false).reconnectDialogConfiguration.reconnectInterval;
}
@Override
@@ -180,7 +182,8 @@ class ReconnectDialogConfigurationImpl implements ReconnectDialogConfiguration {
@Override
public int getDialogGracePeriod() {
- return ui.getState(false).reconnectDialogConfiguration.dialogGracePeriod;
+ return ui
+ .getState(false).reconnectDialogConfiguration.dialogGracePeriod;
}
@Override
diff --git a/server/src/main/java/com/vaadin/ui/RichTextArea.java b/server/src/main/java/com/vaadin/ui/RichTextArea.java
index 2f0ba215b9..fb66685e16 100644
--- a/server/src/main/java/com/vaadin/ui/RichTextArea.java
+++ b/server/src/main/java/com/vaadin/ui/RichTextArea.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,13 +28,13 @@ import com.vaadin.ui.declarative.DesignContext;
/**
* A simple RichTextArea to edit HTML format text.
- *
+ *
* Note, that using {@link TextField#setMaxLength(int)} method in
* {@link RichTextArea} may produce unexpected results as formatting is counted
* into length of field.
*/
-public class RichTextArea extends AbstractField<String> implements
- LegacyComponent {
+public class RichTextArea extends AbstractField<String>
+ implements LegacyComponent {
/**
* Null representation.
@@ -61,9 +61,9 @@ public class RichTextArea extends AbstractField<String> implements
}
/**
- *
+ *
* Constructs an empty <code>RichTextArea</code> with the given caption.
- *
+ *
* @param caption
* the caption for the editor.
*/
@@ -75,7 +75,7 @@ public class RichTextArea extends AbstractField<String> implements
/**
* Constructs a new <code>RichTextArea</code> that's bound to the specified
* <code>Property</code> and has no caption.
- *
+ *
* @param dataSource
* the data source for the editor value
*/
@@ -86,7 +86,7 @@ public class RichTextArea extends AbstractField<String> implements
/**
* Constructs a new <code>RichTextArea</code> that's bound to the specified
* <code>Property</code> and has the given caption.
- *
+ *
* @param caption
* the caption for the editor.
* @param dataSource
@@ -100,7 +100,7 @@ public class RichTextArea extends AbstractField<String> implements
/**
* Constructs a new <code>RichTextArea</code> with the given caption and
* initial text contents.
- *
+ *
* @param caption
* the caption for the editor.
* @param value
@@ -146,7 +146,7 @@ public class RichTextArea extends AbstractField<String> implements
/**
* Selects all text in the rich text area. As a side effect, focuses the
* rich text area.
- *
+ *
* @since 6.5
*/
public void selectAll() {
@@ -173,8 +173,7 @@ public class RichTextArea extends AbstractField<String> implements
String newValue = (String) variables.get("text");
final String oldValue = getValue();
- if (newValue != null
- && (oldValue == null || isNullSettingAllowed())
+ if (newValue != null && (oldValue == null || isNullSettingAllowed())
&& newValue.equals(getNullRepresentation())) {
newValue = null;
}
@@ -200,17 +199,17 @@ public class RichTextArea extends AbstractField<String> implements
/**
* Gets the null-string representation.
- *
+ *
* <p>
* The null-valued strings are represented on the user interface by
* replacing the null value with this string. If the null representation is
* set null (not 'null' string), painting null value throws exception.
* </p>
- *
+ *
* <p>
* The default value is string 'null'.
* </p>
- *
+ *
* @return the String Textual representation for null strings.
* @see TextField#isNullSettingAllowed()
*/
@@ -220,7 +219,7 @@ public class RichTextArea extends AbstractField<String> implements
/**
* Is setting nulls with null-string representation allowed.
- *
+ *
* <p>
* If this property is true, writing null-representation string to text
* field always sets the field value to real null. If this property is
@@ -229,11 +228,11 @@ public class RichTextArea extends AbstractField<String> implements
* contents to real null, if the text field matches the null-string
* representation and the current value of the field is null.
* </p>
- *
+ *
* <p>
* By default this setting is false
* </p>
- *
+ *
* @return boolean Should the null-string represenation be always converted
* to null-values.
* @see TextField#getNullRepresentation()
@@ -244,17 +243,17 @@ public class RichTextArea extends AbstractField<String> implements
/**
* Sets the null-string representation.
- *
+ *
* <p>
* The null-valued strings are represented on the user interface by
* replacing the null value with this string. If the null representation is
* set null (not 'null' string), painting null value throws exception.
* </p>
- *
+ *
* <p>
* The default value is string 'null'
* </p>
- *
+ *
* @param nullRepresentation
* Textual representation for null strings.
* @see TextField#setNullSettingAllowed(boolean)
@@ -265,7 +264,7 @@ public class RichTextArea extends AbstractField<String> implements
/**
* Sets the null conversion mode.
- *
+ *
* <p>
* If this property is true, writing null-representation string to text
* field always sets the field value to real null. If this property is
@@ -274,11 +273,11 @@ public class RichTextArea extends AbstractField<String> implements
* contents to real null, if the text field matches the null-string
* representation and the current value of the field is null.
* </p>
- *
+ *
* <p>
* By default this setting is false.
* </p>
- *
+ *
* @param nullSettingAllowed
* Should the null-string represenation be always converted to
* null-values.
diff --git a/server/src/main/java/com/vaadin/ui/Select.java b/server/src/main/java/com/vaadin/ui/Select.java
index e63cba3eaa..21313e6e55 100644
--- a/server/src/main/java/com/vaadin/ui/Select.java
+++ b/server/src/main/java/com/vaadin/ui/Select.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,13 +26,13 @@ import com.vaadin.data.Container;
* set of choices is presented as a set of {@link com.vaadin.data.Item}s in a
* {@link com.vaadin.data.Container}.
* </p>
- *
+ *
* <p>
* A <code>Select</code> component may be in single- or multiselect mode.
* Multiselect mode means that more than one item can be selected
* simultaneously.
* </p>
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
* @deprecated As of 7.0. Use {@link ComboBox} instead.
diff --git a/server/src/main/java/com/vaadin/ui/SelectiveRenderer.java b/server/src/main/java/com/vaadin/ui/SelectiveRenderer.java
index 5c4d052a53..663e3faaba 100644
--- a/server/src/main/java/com/vaadin/ui/SelectiveRenderer.java
+++ b/server/src/main/java/com/vaadin/ui/SelectiveRenderer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,11 +19,11 @@ package com.vaadin.ui;
* Interface implemented by {@link HasComponents} implementors that wish to
* dynamically be able to prevent given child components from reaching the
* client side.
- *
+ *
* @author Vaadin Ltd
* @version @VERSION@
* @since 7.0
- *
+ *
*/
public interface SelectiveRenderer extends HasComponents {
/**
@@ -39,7 +39,7 @@ public interface SelectiveRenderer extends HasComponents {
* returning false will prevent the child from being sent to the client. If
* a child is set to invisible, this method has no effect.
* </p>
- *
+ *
* @param childComponent
* The child component to check
* @return true if the child component may be sent to the client, false
diff --git a/server/src/main/java/com/vaadin/ui/SingleComponentContainer.java b/server/src/main/java/com/vaadin/ui/SingleComponentContainer.java
index 9feee84f15..c9379f85b4 100644
--- a/server/src/main/java/com/vaadin/ui/SingleComponentContainer.java
+++ b/server/src/main/java/com/vaadin/ui/SingleComponentContainer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,20 +21,20 @@ import com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier;
/**
* Interface for component containers that have one child component and do not
* support adding or removing components.
- *
+ *
* For component containers that support multiple children, see
* {@link ComponentContainer} instead.
- *
+ *
* @since 7.0
*/
-public interface SingleComponentContainer extends HasComponents,
- ComponentAttachDetachNotifier {
+public interface SingleComponentContainer
+ extends HasComponents, ComponentAttachDetachNotifier {
/**
* Gets the number of children this {@link SingleComponentContainer} has.
* This must be symmetric with what {@link #iterator()} returns and thus
* typically return 1 if the content is set, 0 otherwise.
- *
+ *
* @return The number of child components this container has.
*/
public int getComponentCount();
@@ -42,9 +42,9 @@ public interface SingleComponentContainer extends HasComponents,
/**
* Gets the content of this container. The content is a component that
* serves as the outermost item of the visual contents.
- *
+ *
* @return a component to use as content
- *
+ *
* @see #setContent(Component)
*/
public Component getContent();
@@ -52,10 +52,10 @@ public interface SingleComponentContainer extends HasComponents,
/**
* Sets the content of this container. The content is a component that
* serves as the outermost item of the visual contents.
- *
+ *
* The content should always be set, either as a constructor parameter or by
* calling this method.
- *
+ *
* @return a component (typically a layout) to use as content
*/
public void setContent(Component content);
diff --git a/server/src/main/java/com/vaadin/ui/Slider.java b/server/src/main/java/com/vaadin/ui/Slider.java
index 1fd6d425fe..af67daa6e7 100644
--- a/server/src/main/java/com/vaadin/ui/Slider.java
+++ b/server/src/main/java/com/vaadin/ui/Slider.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ import com.vaadin.ui.declarative.DesignContext;
/**
* A component for selecting a numerical value within a range.
- *
+ *
* @author Vaadin Ltd.
*/
public class Slider extends AbstractField<Double> {
@@ -44,11 +44,11 @@ public class Slider extends AbstractField<Double> {
* to make sure the cached state is updated to match the client. If
* we do not do this, a reverting setValue() call in a listener will
* not cause the new state to be sent to the client.
- *
+ *
* See #12133.
*/
- getUI().getConnectorTracker().getDiffState(Slider.this)
- .put("value", value);
+ getUI().getConnectorTracker().getDiffState(Slider.this).put("value",
+ value);
try {
setValue(value, true);
@@ -70,7 +70,7 @@ public class Slider extends AbstractField<Double> {
/**
* Default slider constructor. Sets all values to defaults and the slide
* handle at minimum value.
- *
+ *
*/
public Slider() {
super();
@@ -80,10 +80,10 @@ public class Slider extends AbstractField<Double> {
/**
* Create a new slider with the caption given as parameter.
- *
+ *
* The range of the slider is set to 0-100 and only integer values are
* allowed.
- *
+ *
* @param caption
* The caption for this slider (e.g. "Volume").
*/
@@ -94,7 +94,7 @@ public class Slider extends AbstractField<Double> {
/**
* Create a new slider with the given range and resolution.
- *
+ *
* @param min
* The minimum value of the slider
* @param max
@@ -111,7 +111,7 @@ public class Slider extends AbstractField<Double> {
/**
* Create a new slider with the given range that only allows integer values.
- *
+ *
* @param min
* The minimum value of the slider
* @param max
@@ -127,7 +127,7 @@ public class Slider extends AbstractField<Double> {
/**
* Create a new slider with the given caption and range that only allows
* integer values.
- *
+ *
* @param caption
* The caption for the slider
* @param min
@@ -152,7 +152,7 @@ public class Slider extends AbstractField<Double> {
/**
* Gets the maximum slider value
- *
+ *
* @return the largest value the slider can have
*/
public double getMax() {
@@ -162,7 +162,7 @@ public class Slider extends AbstractField<Double> {
/**
* Set the maximum slider value. If the current value of the slider is
* larger than this, the value is set to the new maximum.
- *
+ *
* @param max
* The new maximum slider value
*/
@@ -181,7 +181,7 @@ public class Slider extends AbstractField<Double> {
/**
* Gets the minimum slider value
- *
+ *
* @return the smallest value the slider can have
*/
public double getMin() {
@@ -191,7 +191,7 @@ public class Slider extends AbstractField<Double> {
/**
* Set the minimum slider value. If the current value of the slider is
* smaller than this, the value is set to the new minimum.
- *
+ *
* @param min
* The new minimum slider value
*/
@@ -210,7 +210,7 @@ public class Slider extends AbstractField<Double> {
/**
* Get the current orientation of the slider (horizontal or vertical).
- *
+ *
* @return {@link SliderOrientation#HORIZONTAL} or
* {@link SliderOrientation#VERTICAL}
*/
@@ -220,7 +220,7 @@ public class Slider extends AbstractField<Double> {
/**
* Set the orientation of the slider.
- *
+ *
* @param orientation
* The new orientation, either
* {@link SliderOrientation#HORIZONTAL} or
@@ -233,7 +233,7 @@ public class Slider extends AbstractField<Double> {
/**
* Get the current resolution of the slider. The resolution is the number of
* digits after the decimal point.
- *
+ *
* @return resolution
*/
public int getResolution() {
@@ -243,10 +243,10 @@ public class Slider extends AbstractField<Double> {
/**
* Set a new resolution for the slider. The resolution is the number of
* digits after the decimal point.
- *
+ *
* @throws IllegalArgumentException
* if resolution is negative.
- *
+ *
* @param resolution
*/
public void setResolution(int resolution) {
@@ -259,7 +259,7 @@ public class Slider extends AbstractField<Double> {
/**
* Sets the value of the slider.
- *
+ *
* @param value
* The new value of the slider.
* @param repaintIsNotNeeded
@@ -302,7 +302,7 @@ public class Slider extends AbstractField<Double> {
* Overridden to keep the shared state in sync with the AbstractField
* internal value. Should be removed once AbstractField is refactored to use
* shared state.
- *
+ *
* See tickets #10921 and #11064.
*/
@Override
@@ -317,9 +317,9 @@ public class Slider extends AbstractField<Double> {
/**
* Thrown when the value of the slider is about to be set to a value that is
* outside the valid range of the slider.
- *
+ *
* @author Vaadin Ltd.
- *
+ *
*/
public class ValueOutOfBoundsException extends RuntimeException {
@@ -328,7 +328,7 @@ public class Slider extends AbstractField<Double> {
/**
* Constructs an <code>ValueOutOfBoundsException</code> with the
* specified detail message.
- *
+ *
* @param valueOutOfBounds
*/
public ValueOutOfBoundsException(Double valueOutOfBounds) {
@@ -339,7 +339,7 @@ public class Slider extends AbstractField<Double> {
/**
* Gets the value that is outside the valid range of the slider.
- *
+ *
* @return the value that is out of bounds
*/
public Double getValue() {
@@ -371,8 +371,8 @@ public class Slider extends AbstractField<Double> {
setOrientation(SliderOrientation.VERTICAL);
}
if (attr.hasKey("value")) {
- Double newFieldValue = DesignAttributeHandler.readAttribute(
- "value", attr, Double.class);
+ Double newFieldValue = DesignAttributeHandler.readAttribute("value",
+ attr, Double.class);
setValue(newFieldValue, false, true);
}
}
diff --git a/server/src/main/java/com/vaadin/ui/TabSheet.java b/server/src/main/java/com/vaadin/ui/TabSheet.java
index 66784aaa02..ce9214ae40 100644
--- a/server/src/main/java/com/vaadin/ui/TabSheet.java
+++ b/server/src/main/java/com/vaadin/ui/TabSheet.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -52,37 +52,37 @@ import com.vaadin.ui.themes.Runo;
/**
* TabSheet component.
- *
+ *
* Tabs are typically identified by the component contained on the tab (see
* {@link ComponentContainer}), and tab metadata (including caption, icon,
* visibility, enabledness, closability etc.) is kept in separate {@link Tab}
* instances.
- *
+ *
* Tabs added with {@link #addComponent(Component)} get the caption and the icon
* of the component at the time when the component is created, and these are not
* automatically updated after tab creation.
- *
+ *
* A tab sheet can have multiple tab selection listeners and one tab close
* handler ({@link CloseHandler}), which by default removes the tab from the
* TabSheet.
- *
+ *
* The {@link TabSheet} can be styled with the .v-tabsheet, .v-tabsheet-tabs and
* .v-tabsheet-content styles. Themes may also have pre-defined variations of
* the tab sheet presentation, such as {@link Reindeer#TABSHEET_BORDERLESS},
* {@link Runo#TABSHEET_SMALL} and several other styles in {@link Reindeer}.
- *
+ *
* The current implementation does not load the tabs to the UI before the first
* time they are shown, but this may change in future releases.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
-public class TabSheet extends AbstractComponentContainer implements Focusable,
- FocusNotifier, BlurNotifier, SelectiveRenderer {
+public class TabSheet extends AbstractComponentContainer
+ implements Focusable, FocusNotifier, BlurNotifier, SelectiveRenderer {
/**
* Client to server RPC implementation for TabSheet.
- *
+ *
* @since 7.2
*/
protected class TabsheetServerRpcImpl implements TabsheetServerRpc {
@@ -153,7 +153,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* Constructs a new TabSheet containing the given components.
- *
+ *
* @param components
* The components to add to the tab sheet. Each component will be
* added to a separate tab.
@@ -166,7 +166,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* Gets the component container iterator for going through all the
* components (tab contents).
- *
+ *
* @return the unmodifiable Iterator of the tab content components
*/
@@ -178,7 +178,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* Gets the number of contained components (tabs). Consistent with the
* iterator returned by {@link #getComponentIterator()}.
- *
+ *
* @return the number of contained components
*/
@@ -189,10 +189,10 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* Removes a component and its corresponding tab.
- *
+ *
* If the tab was selected, the first eligible (visible and enabled)
* remaining tab is selected.
- *
+ *
* @param component
* the component to be removed.
*/
@@ -216,7 +216,8 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
setSelected(null);
} else {
- int newSelectedIndex = selectedTabIndexAfterTabRemove(componentIndex);
+ int newSelectedIndex = selectedTabIndexAfterTabRemove(
+ componentIndex);
// Make sure the component actually exists, in case someone
// override it and provide a non existing component.
@@ -245,11 +246,11 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
* Called when a selected tab is removed to specify the new tab to select.
* Can be overridden to provide another algorithm that calculates the new
* selection.
- *
+ *
* Current implementation will choose the first enabled tab to the right of
* the removed tab if it's not the last one, otherwise will choose the
* closer enabled tab to the left.
- *
+ *
* @since 7.4
* @param removedTabIndex
* the index of the selected tab which was just remove.
@@ -284,7 +285,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
* If the tab was selected, the first eligible (visible and enabled)
* remaining tab is selected.
* </p>
- *
+ *
* @see #addTab(Component)
* @see #addTab(Component, String, Resource)
* @see #addComponent(Component)
@@ -299,9 +300,9 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* Adds a new tab into TabSheet. Component caption and icon are copied to
* the tab metadata at creation time.
- *
+ *
* @see #addTab(Component)
- *
+ *
* @param c
* the component to be added.
*/
@@ -313,13 +314,13 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* Adds a new tab into TabSheet.
- *
+ *
* The first tab added to a tab sheet is automatically selected and a tab
* selection event is fired.
- *
+ *
* If the component is already present in the tab sheet, changes its caption
* and returns the corresponding (old) tab, preserving other tab metadata.
- *
+ *
* @param c
* the component to be added onto tab - should not be null.
* @param caption
@@ -333,14 +334,14 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* Adds a new tab into TabSheet.
- *
+ *
* The first tab added to a tab sheet is automatically selected and a tab
* selection event is fired.
- *
+ *
* If the component is already present in the tab sheet, changes its caption
* and icon and returns the corresponding (old) tab, preserving other tab
* metadata.
- *
+ *
* @param c
* the component to be added onto tab - should not be null.
* @param caption
@@ -357,14 +358,14 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* Adds a new tab into TabSheet.
- *
+ *
* The first tab added to a tab sheet is automatically selected and a tab
* selection event is fired.
- *
+ *
* If the component is already present in the tab sheet, changes its caption
* and icon and returns the corresponding (old) tab, preserving other tab
* metadata like the position.
- *
+ *
* @param tabComponent
* the component to be added onto tab - should not be null.
* @param caption
@@ -409,9 +410,9 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* Adds a new tab into TabSheet. Component caption and icon are copied to
* the tab metadata at creation time.
- *
+ *
* If the tab sheet already contains the component, its tab is returned.
- *
+ *
* @param c
* the component to be added onto tab - should not be null.
* @return the created {@link Tab}
@@ -423,9 +424,9 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* Adds a new tab into TabSheet. Component caption and icon are copied to
* the tab metadata at creation time.
- *
+ *
* If the tab sheet already contains the component, its tab is returned.
- *
+ *
* @param component
* the component to be added onto tab - should not be null.
* @param position
@@ -446,10 +447,10 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* Moves all components from another container to this container. The
* components are removed from the other container.
- *
+ *
* If the source container is a {@link TabSheet}, component captions and
* icons are copied from it.
- *
+ *
* @param source
* the container components are removed from.
*/
@@ -476,7 +477,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* Are the tab selection parts ("tabs") hidden.
- *
+ *
* @return true if the tabs are hidden in the UI
* @deprecated as of 7.5, use {@link #isTabsVisible()} instead
*/
@@ -487,7 +488,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* Hides or shows the tab selection parts ("tabs").
- *
+ *
* @param tabsHidden
* true if the tabs should be hidden
* @deprecated as of 7.5, use {@link #setTabsVisible(boolean)} instead
@@ -499,7 +500,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* Sets whether the tab selection part should be shown in the UI
- *
+ *
* @since 7.5
* @param tabsVisible
* true if the tabs should be shown in the UI, false otherwise
@@ -522,7 +523,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* Returns the {@link Tab} (metadata) for a component. The {@link Tab}
* object can be used for setting caption,icon, etc for the tab.
- *
+ *
* @param c
* the component
* @return The tab instance associated with the given component, or null if
@@ -535,7 +536,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* Returns the {@link Tab} (metadata) for a component. The {@link Tab}
* object can be used for setting caption,icon, etc for the tab.
- *
+ *
* @param position
* the position of the tab
* @return The tab in the given position, or null if the position is out of
@@ -552,7 +553,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* Sets the selected tab. The tab is identified by the tab content
* component. Does nothing if the tabsheet doesn't contain the component.
- *
+ *
* @param c
*/
public void setSelectedTab(Component c) {
@@ -568,7 +569,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* Sets the selected tab in the TabSheet. Ensures that the selected tab is
* repainted if needed.
- *
+ *
* @param component
* The new selection or null for no selection
*/
@@ -599,7 +600,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
* Sets the selected tab. The tab is identified by the corresponding
* {@link Tab Tab} instance. Does nothing if the tabsheet doesn't contain
* the given tab.
- *
+ *
* @param tab
*/
public void setSelectedTab(Tab tab) {
@@ -611,7 +612,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* Sets the selected tab, identified by its position. Does nothing if the
* position is out of bounds.
- *
+ *
* @param position
*/
public void setSelectedTab(int position) {
@@ -623,15 +624,16 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
* the previously selected component is not visible and enabled. The first
* visible and enabled tab is selected if the current selection is empty or
* invalid.
- *
+ *
* This method does not fire tab change events, but the caller should do so
* if appropriate.
- *
+ *
* @return true if selection was changed, false otherwise
*/
private boolean updateSelection() {
Component originalSelection = selected;
- for (final Iterator<Component> i = getComponentIterator(); i.hasNext();) {
+ for (final Iterator<Component> i = getComponentIterator(); i
+ .hasNext();) {
final Component component = i.next();
Tab tab = tabs.get(component);
@@ -668,7 +670,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* Gets the selected tab content component.
- *
+ *
* @return the selected tab contents
*/
public Component getSelectedTab() {
@@ -691,21 +693,22 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
* change tab contents or to rearrange tabs. The tab position and some
* metadata are preserved when moving components within the same
* {@link TabSheet}.
- *
+ *
* If the oldComponent is not present in the tab sheet, the new one is added
* at the end.
- *
+ *
* If the oldComponent is already in the tab sheet but the newComponent
* isn't, the old tab is replaced with a new one, and the caption and icon
* of the old one are copied to the new tab.
- *
+ *
* If both old and new components are present, their positions are swapped.
- *
+ *
* {@inheritDoc}
*/
@Override
- public void replaceComponent(Component oldComponent, Component newComponent) {
+ public void replaceComponent(Component oldComponent,
+ Component newComponent) {
boolean selectAfterInserting = false;
if (selected == oldComponent) {
@@ -720,7 +723,8 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
int newLocation = -1;
int location = 0;
- for (final Iterator<Component> i = components.iterator(); i.hasNext();) {
+ for (final Iterator<Component> i = components.iterator(); i
+ .hasNext();) {
final Component component = i.next();
if (component == oldComponent) {
@@ -755,8 +759,10 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
if (selectAfterInserting) {
setSelected(newComponent);
- //SelectedTabChangeEvent should be fired here as selected Tab is changed.
- //Other cases are handled implicitly by removeComponent() and addComponent()addTab()
+ // SelectedTabChangeEvent should be fired here as selected Tab
+ // is changed.
+ // Other cases are handled implicitly by removeComponent() and
+ // addComponent()addTab()
fireSelectedTabChange();
}
@@ -790,7 +796,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* Selected tab change event. This event is sent when the selected (shown)
* tab in the tab sheet is changed.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -798,7 +804,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* New instance of selected tab change event
- *
+ *
* @param source
* the Source of the event.
*/
@@ -808,7 +814,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* TabSheet where the event occurred.
- *
+ *
* @return the Source of the event.
*/
public TabSheet getTabSheet() {
@@ -820,16 +826,16 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
* Selected tab change event listener. The listener is called whenever
* another tab is selected, including when adding the first tab to a
* tabsheet.
- *
+ *
* @author Vaadin Ltd.
- *
+ *
* @since 3.0
*/
public interface SelectedTabChangeListener extends Serializable {
/**
* Selected (shown) tab in tab sheet has has been changed.
- *
+ *
* @param event
* the selected tab change event.
*/
@@ -838,11 +844,12 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* Adds a tab selection listener
- *
+ *
* @param listener
* the Listener to be added.
*/
- public void addSelectedTabChangeListener(SelectedTabChangeListener listener) {
+ public void addSelectedTabChangeListener(
+ SelectedTabChangeListener listener) {
addListener(SelectedTabChangeEvent.class, listener,
SELECTED_TAB_CHANGE_METHOD);
}
@@ -858,7 +865,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* Removes a tab selection listener
- *
+ *
* @param listener
* the Listener to be removed.
*/
@@ -886,11 +893,11 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* Tab meta-data for a component in a {@link TabSheet}.
- *
+ *
* The meta-data includes the tab caption, icon, visibility and enabledness,
* closability, description (tooltip) and an optional component error shown
* in the tab.
- *
+ *
* Tabs are identified by the component contained on them in most cases, and
* the meta-data can be obtained with {@link TabSheet#getTab(Component)}.
*/
@@ -898,7 +905,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* Returns the visible status for the tab. An invisible tab is not shown
* in the tab bar and cannot be selected.
- *
+ *
* @return true for visible, false for hidden
*/
public boolean isVisible();
@@ -907,7 +914,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
* Sets the visible status for the tab. An invisible tab is not shown in
* the tab bar and cannot be selected, selection is changed
* automatically when there is an attempt to select an invisible tab.
- *
+ *
* @param visible
* true for visible, false for hidden
*/
@@ -915,7 +922,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* Returns the closability status for the tab.
- *
+ *
* @return true if the tab is allowed to be closed by the end user,
* false for not allowing closing
*/
@@ -928,7 +935,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
* <p>
* Note! Currently only supported by TabSheet, not Accordion.
* </p>
- *
+ *
* @param closable
* true if the end user is allowed to close the tab, false
* for not allowing to close. Should default to false.
@@ -938,7 +945,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* Set the component that should automatically focused when the tab is
* selected.
- *
+ *
* @param component
* the component to focus
*/
@@ -947,7 +954,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* Get the component that should be automatically focused when the tab
* is selected.
- *
+ *
* @return the focusable component
*/
public Focusable getDefaultFocusComponent();
@@ -955,7 +962,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* Returns the enabled status for the tab. A disabled tab is shown as
* such in the tab bar and cannot be selected.
- *
+ *
* @return true for enabled, false for disabled
*/
public boolean isEnabled();
@@ -963,7 +970,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* Sets the enabled status for the tab. A disabled tab is shown as such
* in the tab bar and cannot be selected.
- *
+ *
* @param enabled
* true for enabled, false for disabled
*/
@@ -971,7 +978,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* Sets the caption for the tab.
- *
+ *
* @param caption
* the caption to set
*/
@@ -989,7 +996,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* Sets the icon for the tab.
- *
+ *
* @param icon
* the icon to set
*/
@@ -997,7 +1004,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* Sets the icon and alt text for the tab.
- *
+ *
* @param icon
* the icon to set
*/
@@ -1005,16 +1012,16 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* Gets the icon alt text for the tab.
- *
+ *
* @since 7.2
*/
public String getIconAlternateText();
/**
* Sets the icon alt text for the tab.
- *
+ *
* @since 7.2
- *
+ *
* @param iconAltText
* the icon to set
*/
@@ -1024,7 +1031,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
* Gets the description for the tab. The description can be used to
* briefly describe the state of the tab to the user, and is typically
* shown as a tooltip when hovering over the tab.
- *
+ *
* @return the description for the tab
*/
public String getDescription();
@@ -1033,7 +1040,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
* Sets the description for the tab. The description can be used to
* briefly describe the state of the tab to the user, and is typically
* shown as a tooltip when hovering over the tab.
- *
+ *
* @param description
* the new description string for the tab.
*/
@@ -1043,9 +1050,9 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
* Sets an error indicator to be shown in the tab. This can be used e.g.
* to communicate to the user that there is a problem in the contents of
* the tab.
- *
+ *
* @see AbstractComponent#setComponentError(ErrorMessage)
- *
+ *
* @param componentError
* error message or null for none
*/
@@ -1053,9 +1060,9 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* Gets the current error message shown for the tab.
- *
+ *
* TODO currently not sent to the client
- *
+ *
* @see AbstractComponent#setComponentError(ErrorMessage)
*/
public ErrorMessage getComponentError();
@@ -1068,7 +1075,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* Sets a style name for the tab. The style name will be rendered as a
* HTML class name, which can be used in a CSS definition.
- *
+ *
* <pre>
* Tab tab = tabsheet.addTab(tabContent, &quot;Tab text&quot;);
* tab.setStyleName(&quot;mystyle&quot;);
@@ -1080,16 +1087,16 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
* {@code v-tabsheet-tabitemcell-mystyle}" style. You could then style
* the component with:
* </p>
- *
+ *
* <pre>
* .v-tabsheet-tabitemcell-mystyle {font-style: italic;}
* </pre>
- *
+ *
* <p>
* This method will trigger a {@link RepaintRequestEvent} on the
* TabSheet to which the Tab belongs.
* </p>
- *
+ *
* @param styleName
* the new style to be set for tab
* @see #getStyleName()
@@ -1099,7 +1106,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* Gets the user-defined CSS style name of the tab. Built-in style names
* defined in Vaadin or GWT are not returned.
- *
+ *
* @return the style name or of the tab
* @see #setStyleName(String)
*/
@@ -1109,7 +1116,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
* Adds an unique id for component that is used in the client-side for
* testing purposes. Keeping identifiers unique is the responsibility of
* the programmer.
- *
+ *
* @param id
* An alphanumeric id
*/
@@ -1117,7 +1124,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* Gets currently set debug identifier
- *
+ *
* @return current id, null if not set
*/
public String getId();
@@ -1257,8 +1264,8 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
public void setComponentError(ErrorMessage componentError) {
this.componentError = componentError;
- String formattedHtmlMessage = componentError != null ? componentError
- .getFormattedHtmlMessage() : null;
+ String formattedHtmlMessage = componentError != null
+ ? componentError.getFormattedHtmlMessage() : null;
tabState.componentError = formattedHtmlMessage;
markAsDirty();
@@ -1312,17 +1319,17 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* CloseHandler is used to process tab closing events. Default behavior is
* to remove the tab from the TabSheet.
- *
+ *
* @author Jouni Koivuviita / Vaadin Ltd.
* @since 6.2.0
- *
+ *
*/
public interface CloseHandler extends Serializable {
/**
* Called when a user has pressed the close icon of a tab in the client
* side widget.
- *
+ *
* @param tabsheet
* the TabSheet to which the tab belongs to
* @param tabContent
@@ -1336,12 +1343,12 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
* Provide a custom {@link CloseHandler} for this TabSheet if you wish to
* perform some additional tasks when a user clicks on a tabs close button,
* e.g. show a confirmation dialogue before removing the tab.
- *
+ *
* To remove the tab, if you provide your own close handler, you must call
* {@link #removeComponent(Component)} yourself.
- *
+ *
* The default CloseHandler for TabSheet will only remove the tab.
- *
+ *
* @param handler
*/
public void setCloseHandler(CloseHandler handler) {
@@ -1350,7 +1357,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* Sets the position of the tab.
- *
+ *
* @param tab
* The tab
* @param position
@@ -1367,7 +1374,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* Gets the position of the tab
- *
+ *
* @param tab
* The tab
* @return
@@ -1459,7 +1466,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* Copies properties from one Tab to another.
- *
+ *
* @param from
* The tab whose data to copy.
* @param to
@@ -1488,7 +1495,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.AbstractComponent#readDesign(org.jsoup.nodes .Element,
* com.vaadin.ui.declarative.DesignContext)
*/
@@ -1498,8 +1505,8 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
// create new tabs
for (Element tab : design.children()) {
if (!tab.tagName().equals("tab")) {
- throw new DesignException("Invalid tag name for tabsheet tab "
- + tab.tagName());
+ throw new DesignException(
+ "Invalid tag name for tabsheet tab " + tab.tagName());
}
readTabFromDesign(tab, designContext);
}
@@ -1507,9 +1514,9 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* Reads the given tab element from design
- *
+ *
* @since 7.4
- *
+ *
* @param tabElement
* the element to be read
* @param designContext
@@ -1527,32 +1534,32 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
Component child = designContext.readDesign(content);
Tab tab = this.addTab(child);
if (attr.hasKey("visible")) {
- tab.setVisible(DesignAttributeHandler.readAttribute("visible",
- attr, Boolean.class));
+ tab.setVisible(DesignAttributeHandler.readAttribute("visible", attr,
+ Boolean.class));
}
if (attr.hasKey("closable")) {
tab.setClosable(DesignAttributeHandler.readAttribute("closable",
attr, Boolean.class));
}
if (attr.hasKey("caption")) {
- tab.setCaption(DesignAttributeHandler.readAttribute("caption",
- attr, String.class));
+ tab.setCaption(DesignAttributeHandler.readAttribute("caption", attr,
+ String.class));
}
if (attr.hasKey("enabled")) {
- tab.setEnabled(DesignAttributeHandler.readAttribute("enabled",
- attr, Boolean.class));
+ tab.setEnabled(DesignAttributeHandler.readAttribute("enabled", attr,
+ Boolean.class));
}
if (attr.hasKey("icon")) {
tab.setIcon(DesignAttributeHandler.readAttribute("icon", attr,
Resource.class));
}
if (attr.hasKey("icon-alt")) {
- tab.setIconAlternateText(DesignAttributeHandler.readAttribute(
- "icon-alt", attr, String.class));
+ tab.setIconAlternateText(DesignAttributeHandler
+ .readAttribute("icon-alt", attr, String.class));
}
if (attr.hasKey("description")) {
- tab.setDescription(DesignAttributeHandler.readAttribute(
- "description", attr, String.class));
+ tab.setDescription(DesignAttributeHandler
+ .readAttribute("description", attr, String.class));
}
if (attr.hasKey("style-name")) {
tab.setStyleName(DesignAttributeHandler.readAttribute("style-name",
@@ -1573,7 +1580,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/**
* Writes the given tab to design
- *
+ *
* @since 7.4
* @param design
* the design node for tabsheet
@@ -1596,8 +1603,8 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
def.isVisible(), Boolean.class);
DesignAttributeHandler.writeAttribute("closable", attr,
tab.isClosable(), def.isClosable(), Boolean.class);
- DesignAttributeHandler.writeAttribute("caption", attr,
- tab.getCaption(), def.getCaption(), String.class);
+ DesignAttributeHandler.writeAttribute("caption", attr, tab.getCaption(),
+ def.getCaption(), String.class);
DesignAttributeHandler.writeAttribute("enabled", attr, tab.isEnabled(),
def.isEnabled(), Boolean.class);
DesignAttributeHandler.writeAttribute("icon", attr, tab.getIcon(),
@@ -1614,14 +1621,14 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
if (getSelectedTab() != null
&& getSelectedTab().equals(tab.getComponent())) {
// use write attribute to get consistent handling for boolean
- DesignAttributeHandler.writeAttribute("selected", attr, true,
- false, boolean.class);
+ DesignAttributeHandler.writeAttribute("selected", attr, true, false,
+ boolean.class);
}
}
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.AbstractComponent#getCustomAttributes()
*/
@Override
@@ -1633,7 +1640,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.AbstractComponent#writeDesign(org.jsoup.nodes.Element
* , com.vaadin.ui.declarative.DesignContext)
*/
@@ -1661,7 +1668,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
* false, the content is rendered in the browser as plain text.
* <p>
* The default is false, i.e. render tab captions as plain text
- *
+ *
* @param tabCaptionsAsHtml
* true if the tab captions are rendered as HTML, false if
* rendered as plain text
@@ -1675,7 +1682,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
* Checks whether HTML is allowed in the tab captions.
* <p>
* The default is false, i.e. render tab captions as plain text
- *
+ *
* @return true if the tab captions are rendered as HTML, false if rendered
* as plain text
* @since 7.4
diff --git a/server/src/main/java/com/vaadin/ui/Table.java b/server/src/main/java/com/vaadin/ui/Table.java
index f518f4f161..efc138de08 100644
--- a/server/src/main/java/com/vaadin/ui/Table.java
+++ b/server/src/main/java/com/vaadin/ui/Table.java
@@ -82,7 +82,7 @@ import com.vaadin.util.ReflectTools;
* <code>Table</code> is used for representing data or components in a pageable
* and selectable table.
* </p>
- *
+ *
* <p>
* Scalability of the Table is largely dictated by the container. A table does
* not have a limit for the number of items and is just as fast with hundreds of
@@ -90,11 +90,11 @@ import com.vaadin.util.ReflectTools;
* scrolling however limits the number of rows to around 500000, depending on
* the browser and the pixel height of rows.
* </p>
- *
+ *
* <p>
* Components in a Table will not have their caption nor icon rendered.
* </p>
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -621,7 +621,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Creates a new empty table with caption.
- *
+ *
* @param caption
*/
public Table(String caption) {
@@ -631,7 +631,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Creates a new table with caption and connect it to a Container.
- *
+ *
* @param caption
* @param dataSource
*/
@@ -645,11 +645,11 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Gets the array of visible column id:s, including generated columns.
- *
+ *
* <p>
* The columns are show in the order of their appearance in this array.
* </p>
- *
+ *
* @return an array of currently visible propertyIds and generated column
* ids.
*/
@@ -662,11 +662,11 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Sets the array of visible column property id:s.
- *
+ *
* <p>
* The columns are show in the order of their appearance in this array.
* </p>
- *
+ *
* @param visibleColumns
* the Array of shown property id:s.
*/
@@ -708,7 +708,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Gets the headers of the columns.
- *
+ *
* <p>
* The headers match the property id:s given by the set visible column
* headers. The table must be set in either
@@ -717,7 +717,7 @@ public class Table extends AbstractSelect implements Action.Container,
* headers. In the defaults mode any nulls in the headers array are replaced
* with id.toString().
* </p>
- *
+ *
* @return the Array of column headers.
*/
public String[] getColumnHeaders() {
@@ -735,7 +735,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Sets the headers of the columns.
- *
+ *
* <p>
* The headers match the property id:s given by the set visible column
* headers. The table must be set in either
@@ -744,7 +744,7 @@ public class Table extends AbstractSelect implements Action.Container,
* headers. In the defaults mode any nulls in the headers array are replaced
* with id.toString() outputs when rendering.
* </p>
- *
+ *
* @param columnHeaders
* the Array of column headers that match the
* {@link #getVisibleColumns()} method.
@@ -758,8 +758,8 @@ public class Table extends AbstractSelect implements Action.Container,
this.columnHeaders.clear();
int i = 0;
- for (final Iterator<Object> it = visibleColumns.iterator(); it
- .hasNext() && i < columnHeaders.length; i++) {
+ for (final Iterator<Object> it = visibleColumns.iterator(); it.hasNext()
+ && i < columnHeaders.length; i++) {
this.columnHeaders.put(it.next(), columnHeaders[i]);
}
@@ -768,7 +768,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Gets the icons of the columns.
- *
+ *
* <p>
* The icons in headers match the property id:s given by the set visible
* column headers. The table must be set in either
@@ -776,7 +776,7 @@ public class Table extends AbstractSelect implements Action.Container,
* {@link #COLUMN_HEADER_MODE_EXPLICIT_DEFAULTS_ID} mode to show the headers
* with icons.
* </p>
- *
+ *
* @return the Array of icons that match the {@link #getVisibleColumns()}.
*/
public Resource[] getColumnIcons() {
@@ -795,7 +795,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Sets the icons of the columns.
- *
+ *
* <p>
* The icons in headers match the property id:s given by the set visible
* column headers. The table must be set in either
@@ -803,7 +803,7 @@ public class Table extends AbstractSelect implements Action.Container,
* {@link #COLUMN_HEADER_MODE_EXPLICIT_DEFAULTS_ID} mode to show the headers
* with icons.
* </p>
- *
+ *
* @param columnIcons
* the Array of icons that match the {@link #getVisibleColumns()}
* .
@@ -817,8 +817,8 @@ public class Table extends AbstractSelect implements Action.Container,
this.columnIcons.clear();
int i = 0;
- for (final Iterator<Object> it = visibleColumns.iterator(); it
- .hasNext() && i < columnIcons.length; i++) {
+ for (final Iterator<Object> it = visibleColumns.iterator(); it.hasNext()
+ && i < columnIcons.length; i++) {
this.columnIcons.put(it.next(), columnIcons[i]);
}
@@ -827,7 +827,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Gets the array of column alignments.
- *
+ *
* <p>
* The items in the array must match the properties identified by
* {@link #getVisibleColumns()}. The possible values for the alignments
@@ -840,7 +840,7 @@ public class Table extends AbstractSelect implements Action.Container,
* The alignments default to {@link Align#LEFT}: any null values are
* rendered as align lefts.
* </p>
- *
+ *
* @return the Column alignments array.
*/
public Align[] getColumnAlignments() {
@@ -859,7 +859,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Sets the column alignments.
- *
+ *
* <p>
* The amount of items in the array must match the amount of properties
* identified by {@link #getVisibleColumns()}. The possible values for the
@@ -871,7 +871,7 @@ public class Table extends AbstractSelect implements Action.Container,
* </ul>
* The alignments default to {@link Align#LEFT}
* </p>
- *
+ *
* @param columnAlignments
* the Column alignments array.
*/
@@ -885,8 +885,8 @@ public class Table extends AbstractSelect implements Action.Container,
// Resets the alignments
final HashMap<Object, Align> newCA = new HashMap<Object, Align>();
int i = 0;
- for (final Iterator<Object> it = visibleColumns.iterator(); it
- .hasNext() && i < columnAlignments.length; i++) {
+ for (final Iterator<Object> it = visibleColumns.iterator(); it.hasNext()
+ && i < columnAlignments.length; i++) {
newCA.put(it.next(), columnAlignments[i]);
}
this.columnAlignments = newCA;
@@ -900,11 +900,11 @@ public class Table extends AbstractSelect implements Action.Container,
* Sets columns width (in pixels). Theme may not necessarily respect very
* small or very big values. Setting width to -1 (default) means that theme
* will make decision of width.
- *
+ *
* <p>
* Column can either have a fixed width or expand ratio. The latter one set
* is used. See @link {@link #setColumnExpandRatio(Object, float)}.
- *
+ *
* @param propertyId
* columns property id
* @param width
@@ -938,27 +938,27 @@ public class Table extends AbstractSelect implements Action.Container,
* naturally. Excess space is the space that is not used by columns with
* explicit width (see {@link #setColumnWidth(Object, int)}) or with natural
* width (no width nor expand ratio).
- *
+ *
* <p>
* By default (without expand ratios) the excess space is divided
* proportionally to columns natural widths.
- *
+ *
* <p>
* Only expand ratios of visible columns are used in final calculations.
- *
+ *
* <p>
* Column can either have a fixed width or expand ratio. The latter one set
* is used.
- *
+ *
* <p>
* A column with expand ratio is considered to be minimum width by default
* (if no excess space exists). The minimum width is defined by terminal
* implementation.
- *
+ *
* <p>
* If terminal implementation supports re-sizable columns the column becomes
* fixed width column if users resizes the column.
- *
+ *
* @param propertyId
* columns property id
* @param expandRatio
@@ -987,7 +987,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Gets the column expand ratio for a column. See
* {@link #setColumnExpandRatio(Object, float)}
- *
+ *
* @param propertyId
* columns property id
* @return the expandRatio used to divide excess space for this column
@@ -1002,7 +1002,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Gets the pixel width of column
- *
+ *
* @param propertyId
* @return width of column or -1 when value not set
*/
@@ -1021,11 +1021,11 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Gets the page length.
- *
+ *
* <p>
* Setting page length 0 disables paging.
* </p>
- *
+ *
* @return the Length of one page.
*/
public int getPageLength() {
@@ -1034,16 +1034,16 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Sets the page length.
- *
+ *
* <p>
* Setting page length 0 disables paging. The page length defaults to 15.
* </p>
- *
+ *
* <p>
* If Table has height set ({@link #setHeight(float, Unit)} ) the client
* side may update the page length automatically the correct value.
* </p>
- *
+ *
* @param pageLength
* the length of one page.
*/
@@ -1057,18 +1057,18 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* This method adjusts a possible caching mechanism of table implementation.
- *
+ *
* <p>
* Table component may fetch and render some rows outside visible area. With
* complex tables (for example containing layouts and components), the
* client side may become unresponsive. Setting the value lower, UI will
* become more responsive. With higher values scrolling in client will hit
* server less frequently.
- *
+ *
* <p>
* The amount of cached rows will be cacheRate multiplied with pageLength (
* {@link #setPageLength(int)} both below and above visible area..
- *
+ *
* @param cacheRate
* a value over 0 (fastest rendering time). Higher value will
* cache more rows on server (smoother scrolling). Default value
@@ -1087,7 +1087,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* @see #setCacheRate(double)
- *
+ *
* @return the current cache rate value
*/
public double getCacheRate() {
@@ -1096,7 +1096,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Getter for property currentPageFirstItem.
- *
+ *
* @return the Value of property currentPageFirstItem.
*/
public Object getCurrentPageFirstItemId() {
@@ -1124,14 +1124,14 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Returns the item ID for the item represented by the index given. Assumes
* that the current container implements {@link Container.Indexed}.
- *
+ *
* See {@link Container.Indexed#getIdByIndex(int)} for more information
* about the exceptions that can be thrown.
- *
+ *
* @param index
* the index for which the item ID should be fetched
* @return the item ID for the given index
- *
+ *
* @throws ClassCastException
* if container does not implement {@link Container.Indexed}
* @throws IndexOutOfBoundsException
@@ -1144,7 +1144,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Setter for property currentPageFirstItemId.
- *
+ *
* @param currentPageFirstItemId
* the New value of property currentPageFirstItemId.
*/
@@ -1201,7 +1201,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Gets the icon Resource for the specified column.
- *
+ *
* @param propertyId
* the propertyId identifying the column.
* @return the icon for the specified column; null if the column has no icon
@@ -1216,7 +1216,7 @@ public class Table extends AbstractSelect implements Action.Container,
* <p>
* Throws IllegalArgumentException if the specified column is not visible.
* </p>
- *
+ *
* @param propertyId
* the propertyId identifying the column.
* @param icon
@@ -1235,7 +1235,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Gets the header for the specified column.
- *
+ *
* @param propertyId
* the propertyId identifying the column.
* @return the header for the specified column if it has one.
@@ -1246,7 +1246,8 @@ public class Table extends AbstractSelect implements Action.Container,
}
String header = columnHeaders.get(propertyId);
- if ((header == null && getColumnHeaderMode() == ColumnHeaderMode.EXPLICIT_DEFAULTS_ID)
+ if ((header == null
+ && getColumnHeaderMode() == ColumnHeaderMode.EXPLICIT_DEFAULTS_ID)
|| getColumnHeaderMode() == ColumnHeaderMode.ID) {
header = propertyId.toString();
}
@@ -1256,7 +1257,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Sets the column header for the specified column;
- *
+ *
* @param propertyId
* the propertyId identifying the column.
* @param header
@@ -1275,7 +1276,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Gets the specified column's alignment.
- *
+ *
* @param propertyId
* the propertyID identifying the column.
* @return the specified column's alignment if it as one; {@link Align#LEFT}
@@ -1288,13 +1289,13 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Sets the specified column's alignment.
- *
+ *
* <p>
* Throws IllegalArgumentException if the alignment is not one of the
* following: {@link Align#LEFT}, {@link Align#CENTER} or
* {@link Align#RIGHT}
* </p>
- *
+ *
* @param propertyId
* the propertyID identifying the column.
* @param alignment
@@ -1314,7 +1315,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Checks if the specified column is collapsed.
- *
+ *
* @param propertyId
* the propertyID identifying the column.
* @return true if the column is collapsed; false otherwise;
@@ -1326,8 +1327,8 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Sets whether the specified column is collapsed or not.
- *
- *
+ *
+ *
* @param propertyId
* the propertyID identifying the column.
* @param collapsed
@@ -1367,7 +1368,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Checks if column collapsing is allowed.
- *
+ *
* @return true if columns can be collapsed; false otherwise.
*/
public boolean isColumnCollapsingAllowed() {
@@ -1376,7 +1377,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Sets whether column collapsing is allowed or not.
- *
+ *
* @param collapsingAllowed
* specifies whether column collapsing is allowed.
*/
@@ -1398,7 +1399,7 @@ public class Table extends AbstractSelect implements Action.Container,
* {@link #setColumnCollapsed(Object, boolean) setColumnCollapsed()}) if
* {@link #isColumnCollapsingAllowed()} is true. By default all columns are
* collapsible.
- *
+ *
* @param propertyId
* the propertyID identifying the column.
* @param collapsible
@@ -1420,7 +1421,7 @@ public class Table extends AbstractSelect implements Action.Container,
* UI or with {@link #setColumnCollapsed(Object, boolean)
* setColumnCollapsed()}) if {@link #isColumnCollapsingAllowed()} is also
* true.
- *
+ *
* @return true if the column can be collapsed; false otherwise.
*/
public boolean isColumnCollapsible(Object propertyId) {
@@ -1429,7 +1430,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Checks if column reordering is allowed.
- *
+ *
* @return true if columns can be reordered; false otherwise.
*/
public boolean isColumnReorderingAllowed() {
@@ -1438,7 +1439,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Sets whether column reordering is allowed or not.
- *
+ *
* @param columnReorderingAllowed
* specifies whether column reordering is allowed.
*/
@@ -1482,14 +1483,15 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Getter for property currentPageFirstItem.
- *
+ *
* @return the Value of property currentPageFirstItem.
*/
public int getCurrentPageFirstItemIndex() {
return currentPageFirstItemIndex;
}
- void setCurrentPageFirstItemIndex(int newIndex, boolean needsPageBufferReset) {
+ void setCurrentPageFirstItemIndex(int newIndex,
+ boolean needsPageBufferReset) {
if (newIndex < 0) {
newIndex = 0;
@@ -1614,7 +1616,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Setter for property currentPageFirstItem.
- *
+ *
* @param newIndex
* the New value of property currentPageFirstItem.
*/
@@ -1624,12 +1626,12 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Returns whether table is selectable.
- *
+ *
* <p>
* The table is not selectable until it's explicitly set as selectable or at
* least one {@link ValueChangeListener} is added.
* </p>
- *
+ *
* @return whether table is selectable.
*/
public boolean isSelectable() {
@@ -1641,13 +1643,13 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Setter for property selectable.
- *
+ *
* <p>
* The table is not selectable until it's explicitly set as selectable via
* this method or alternatively at least one {@link ValueChangeListener} is
* added.
* </p>
- *
+ *
* @param selectable
* the New value of property selectable.
*/
@@ -1660,7 +1662,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Getter for property columnHeaderMode.
- *
+ *
* @return the Value of property columnHeaderMode.
*/
public ColumnHeaderMode getColumnHeaderMode() {
@@ -1669,7 +1671,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Setter for property columnHeaderMode.
- *
+ *
* @param columnHeaderMode
* the New value of property columnHeaderMode.
*/
@@ -1703,8 +1705,8 @@ public class Table extends AbstractSelect implements Action.Container,
final int pagelen = getPageLength();
int rows, totalRows;
rows = totalRows = size();
- int firstIndex = Math
- .min(getCurrentPageFirstItemIndex(), totalRows - 1);
+ int firstIndex = Math.min(getCurrentPageFirstItemIndex(),
+ totalRows - 1);
if (rows > 0 && firstIndex >= 0) {
rows -= firstIndex;
}
@@ -1778,7 +1780,7 @@ public class Table extends AbstractSelect implements Action.Container,
* occurred exception is set as the cause of this exception. All occurred
* exceptions can be accessed using {@link #getCauses()}.
* </p>
- *
+ *
*/
public static class CacheUpdateException extends RuntimeException {
private Throwable[] causes;
@@ -1802,7 +1804,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Returns the cause(s) for this exception
- *
+ *
* @return the exception(s) which caused this exception
*/
public Throwable[] getCauses() {
@@ -1845,7 +1847,8 @@ public class Table extends AbstractSelect implements Action.Container,
firstCacheRowToRemoveInPageBuffer = maxPageBufferIndex + 1;
}
- if (firstCacheRowToRemoveInPageBuffer - pageBufferFirstIndex < currentlyCachedRowCount) {
+ if (firstCacheRowToRemoveInPageBuffer
+ - pageBufferFirstIndex < currentlyCachedRowCount) {
/*
* Unregister all components that fall beyond the cache limits after
* inserting the new rows.
@@ -1858,11 +1861,11 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Requests that the Table should be repainted as soon as possible.
- *
+ *
* Note that a {@code Table} does not necessarily repaint its contents when
* this method has been called. See {@link #refreshRowCache()} for forcing
* an update of the contents.
- *
+ *
* @deprecated As of 7.0, use {@link #markAsDirty()} instead
*/
@@ -1874,7 +1877,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Requests that the Table should be repainted as soon as possible.
- *
+ *
* Note that a {@code Table} does not necessarily repaint its contents when
* this method has been called. See {@link #refreshRowCache()} for forcing
* an update of the contents.
@@ -1973,7 +1976,8 @@ public class Table extends AbstractSelect implements Action.Container,
pageBuffer = newPageBuffer;
}
- private Object[][] getVisibleCellsUpdateCacheRows(int firstIndex, int rows) {
+ private Object[][] getVisibleCellsUpdateCacheRows(int firstIndex,
+ int rows) {
Object[][] cells = getVisibleCellsNoCache(firstIndex, rows, false);
int cacheIx = firstIndex - pageBufferFirstIndex;
// update the new rows in the cache.
@@ -1996,11 +2000,11 @@ public class Table extends AbstractSelect implements Action.Container,
* too small.
* @return
*/
- private Object[][] getVisibleCellsInsertIntoCache(int firstIndex, int rows) {
- getLogger()
- .log(Level.FINEST,
- "Insert {0} rows at index {1} to existing page buffer requested",
- new Object[] { rows, firstIndex });
+ private Object[][] getVisibleCellsInsertIntoCache(int firstIndex,
+ int rows) {
+ getLogger().log(Level.FINEST,
+ "Insert {0} rows at index {1} to existing page buffer requested",
+ new Object[] { rows, firstIndex });
int minPageBufferIndex = getMinPageBufferIndex();
int maxPageBufferIndex = getMaxPageBufferIndex();
@@ -2050,9 +2054,9 @@ public class Table extends AbstractSelect implements Action.Container,
* IF there is space remaining in the buffer after the rows have been
* inserted, we can keep more rows.
*/
- int numberOfOldRowsAfterInsertedRows = Math.min(pageBufferFirstIndex
- + currentlyCachedRowCount + rows, maxPageBufferIndex + 1)
- - (firstIndex + rows - 1);
+ int numberOfOldRowsAfterInsertedRows = Math.min(
+ pageBufferFirstIndex + currentlyCachedRowCount + rows,
+ maxPageBufferIndex + 1) - (firstIndex + rows - 1);
if (numberOfOldRowsAfterInsertedRows > 0) {
firstCacheRowToRemove += numberOfOldRowsAfterInsertedRows;
}
@@ -2070,11 +2074,12 @@ public class Table extends AbstractSelect implements Action.Container,
// Calculate the new cache size
int newCachedRowCount = maxBufferSize;
- if (pageBufferFirstIndex + currentlyCachedRowCount + rows - 1 < maxPageBufferIndex) {
+ if (pageBufferFirstIndex + currentlyCachedRowCount + rows
+ - 1 < maxPageBufferIndex) {
// there aren't enough rows to fill the whole potential -> use what
// there is
- newCachedRowCount -= maxPageBufferIndex
- - (pageBufferFirstIndex + currentlyCachedRowCount + rows - 1);
+ newCachedRowCount -= maxPageBufferIndex - (pageBufferFirstIndex
+ + currentlyCachedRowCount + rows - 1);
} else if (minPageBufferIndex < pageBufferFirstIndex) {
newCachedRowCount -= pageBufferFirstIndex - minPageBufferIndex;
}
@@ -2104,23 +2109,21 @@ public class Table extends AbstractSelect implements Action.Container,
newPageBuffer[i][row] = cells[i][row
- firstIndexInNewPageBuffer];
}
- for (int row = firstIndexInNewPageBuffer + rows; row < newCachedRowCount; row++) {
+ for (int row = firstIndexInNewPageBuffer
+ + rows; row < newCachedRowCount; row++) {
// Move the old rows down below the newly inserted rows
newPageBuffer[i][row] = pageBuffer[i][rowsFromBeginning + row
- rows];
}
}
pageBuffer = newPageBuffer;
- pageBufferFirstIndex = Math.max(pageBufferFirstIndex
- + rowsFromBeginning, minPageBufferIndex);
+ pageBufferFirstIndex = Math.max(
+ pageBufferFirstIndex + rowsFromBeginning, minPageBufferIndex);
if (getLogger().isLoggable(Level.FINEST)) {
- getLogger().log(
- Level.FINEST,
+ getLogger().log(Level.FINEST,
"Page Buffer now contains {0} rows ({1}-{2})",
- new Object[] {
- pageBuffer[CELL_ITEMID].length,
- pageBufferFirstIndex,
- (pageBufferFirstIndex
+ new Object[] { pageBuffer[CELL_ITEMID].length,
+ pageBufferFirstIndex, (pageBufferFirstIndex
+ pageBuffer[CELL_ITEMID].length - 1) });
}
return cells;
@@ -2163,9 +2166,9 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Render rows with index "firstIndex" to "firstIndex+rows-1" to a new
* buffer.
- *
+ *
* Reuses values from the current page buffer if the rows are found there.
- *
+ *
* @param firstIndex
* @param rows
* @param replaceListeners
@@ -2222,7 +2225,8 @@ public class Table extends AbstractSelect implements Action.Container,
for (int i = 0; i < rows && i < itemIds.size(); i++) {
Object id = itemIds.get(i);
if (id == null) {
- throw new IllegalStateException("Null itemId returned from container");
+ throw new IllegalStateException(
+ "Null itemId returned from container");
}
// Start by parsing the values, id should already be set
parseItemIdToCells(cells, id, i, firstIndex, headmode, cols,
@@ -2271,13 +2275,13 @@ public class Table extends AbstractSelect implements Action.Container,
}
protected List<Object> getItemIds(int firstIndex, int rows) {
- return (List<Object>) ((Container.Indexed) items).getItemIds(
- firstIndex, rows);
+ return (List<Object>) ((Container.Indexed) items).getItemIds(firstIndex,
+ rows);
}
/**
* Update a cache array for a row, register any relevant listeners etc.
- *
+ *
* This is an internal method extracted from
* {@link #getVisibleCellsNoCache(int, int, boolean)} and should be removed
* when the Table is rewritten.
@@ -2310,8 +2314,8 @@ public class Table extends AbstractSelect implements Action.Container,
}
}
- GeneratedRow generatedRow = rowGenerator != null ? rowGenerator
- .generateRow(this, id) : null;
+ GeneratedRow generatedRow = rowGenerator != null
+ ? rowGenerator.generateRow(this, id) : null;
cells[CELL_GENERATED_ROW][i] = generatedRow;
for (int j = 0; j < cols; j++) {
@@ -2350,7 +2354,8 @@ public class Table extends AbstractSelect implements Action.Container,
if (index < firstIndexNotInCache
&& index >= pageBufferFirstIndex
&& pageBuffer[CELL_GENERATED_ROW][indexInOldBuffer] == null
- && id.equals(pageBuffer[CELL_ITEMID][indexInOldBuffer])) {
+ && id.equals(
+ pageBuffer[CELL_ITEMID][indexInOldBuffer])) {
// we already have data in our cache,
// recycle it instead of fetching it via
// getValue/getPropertyValue
@@ -2422,11 +2427,8 @@ public class Table extends AbstractSelect implements Action.Container,
}
protected void registerComponent(Component component) {
- getLogger().log(
- Level.FINEST,
- "Registered {0}: {1}",
- new Object[] { component.getClass().getSimpleName(),
- component.getCaption() });
+ getLogger().log(Level.FINEST, "Registered {0}: {1}", new Object[] {
+ component.getClass().getSimpleName(), component.getCaption() });
if (!equals(component.getParent())) {
component.setParent(this);
}
@@ -2456,7 +2458,8 @@ public class Table extends AbstractSelect implements Action.Container,
* to page buffer.
* @param count
*/
- private void unregisterComponentsAndPropertiesInRows(int firstIx, int count) {
+ private void unregisterComponentsAndPropertiesInRows(int firstIx,
+ int count) {
if (getLogger().isLoggable(Level.FINEST)) {
getLogger().log(Level.FINEST,
"Unregistering components in rows {0}-{1}",
@@ -2495,7 +2498,7 @@ public class Table extends AbstractSelect implements Action.Container,
* Helper method to remove listeners and maintain correct component
* hierarchy. Detaches properties and components if those are no more
* rendered in client.
- *
+ *
* @param oldListenedProperties
* set of properties that where listened in last render
* @param oldVisibleComponents
@@ -2505,8 +2508,8 @@ public class Table extends AbstractSelect implements Action.Container,
HashSet<Property<?>> oldListenedProperties,
HashSet<Component> oldVisibleComponents) {
if (oldVisibleComponents != null) {
- for (final Iterator<Component> i = oldVisibleComponents.iterator(); i
- .hasNext();) {
+ for (final Iterator<Component> i = oldVisibleComponents
+ .iterator(); i.hasNext();) {
Component c = i.next();
if (!visibleComponents.contains(c)) {
unregisterComponent(c);
@@ -2531,21 +2534,18 @@ public class Table extends AbstractSelect implements Action.Container,
* if it is a field, it needs to be detached from its property data source
* in order to allow garbage collection to take care of removing the unused
* component from memory.
- *
+ *
* Override this method and getPropertyValue(Object, Object, Property) with
* custom logic if you need to deal with buffered fields.
- *
+ *
* @see #getPropertyValue(Object, Object, Property)
- *
+ *
* @param component
* component that should be unregistered.
*/
protected void unregisterComponent(Component component) {
- getLogger().log(
- Level.FINEST,
- "Unregistered {0}: {1}",
- new Object[] { component.getClass().getSimpleName(),
- component.getCaption() });
+ getLogger().log(Level.FINEST, "Unregistered {0}: {1}", new Object[] {
+ component.getClass().getSimpleName(), component.getCaption() });
component.setParent(null);
/*
* Also remove property data sources to unregister listeners keeping the
@@ -2587,7 +2587,7 @@ public class Table extends AbstractSelect implements Action.Container,
* </ul>
* The default value is {@link #ROW_HEADER_MODE_HIDDEN}
* </p>
- *
+ *
* @param mode
* the One of the modes listed above.
*/
@@ -2606,7 +2606,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Gets the row header mode.
- *
+ *
* @return the Row header mode.
* @see #setRowHeaderMode
*/
@@ -2617,7 +2617,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Adds the new row to table and fill the visible cells (except generated
* columns) with given values.
- *
+ *
* @param cells
* the Object array that is used for filling the visible cells
* new row. The types must be settable to visible column property
@@ -2686,7 +2686,7 @@ public class Table extends AbstractSelect implements Action.Container,
* <p>
* <i>Note that calling this method is not cheap so avoid calling it
* unnecessarily.</i>
- *
+ *
* @since 6.7.2
*/
public void refreshRowCache() {
@@ -2707,7 +2707,7 @@ public class Table extends AbstractSelect implements Action.Container,
* Keeps propertyValueConverters if the corresponding id exists in the new
* data source and is of a compatible type.
* </p>
- *
+ *
* @param newDataSource
* the new data source.
*/
@@ -2746,11 +2746,11 @@ public class Table extends AbstractSelect implements Action.Container,
* Keeps propertyValueConverters if the corresponding id exists in the new
* data source and is of a compatible type.
* </p>
- *
+ *
* @see Table#setContainerDataSource(Container)
* @see Table#setVisibleColumns(Object[])
* @see Table#setConverter(Object, Converter<String, ?>)
- *
+ *
* @param newDataSource
* the new data source.
* @param visibleIds
@@ -2784,8 +2784,8 @@ public class Table extends AbstractSelect implements Action.Container,
}
}
}
- propertyValueConverters.keySet().retainAll(
- retainableValueConverters);
+ propertyValueConverters.keySet()
+ .retainAll(retainableValueConverters);
}
// Assures that the data source is ordered by making unordered
@@ -2793,8 +2793,8 @@ public class Table extends AbstractSelect implements Action.Container,
if (newDataSource instanceof Container.Ordered) {
super.setContainerDataSource(newDataSource);
} else {
- super.setContainerDataSource(new ContainerOrderedWrapper(
- newDataSource));
+ super.setContainerDataSource(
+ new ContainerOrderedWrapper(newDataSource));
}
// Resets page position
@@ -2825,7 +2825,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Checks if class b can be safely assigned to class a.
- *
+ *
* @param a
* @param b
* @return
@@ -2839,7 +2839,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Gets items ids from a range of key values
- *
+ *
* @param itemId
* The start key
* @param length
@@ -2860,7 +2860,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Handles selection if selection is a multiselection
- *
+ *
* @param variables
* The variables
*/
@@ -2939,7 +2939,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Invoked when the value of a variable has changed.
- *
+ *
* @see com.vaadin.ui.Select#changeVariables(java.lang.Object,
* java.util.Map)
*/
@@ -3031,9 +3031,7 @@ public class Table extends AbstractSelect implements Action.Container,
}
}
if (getLogger().isLoggable(Level.FINEST)) {
- getLogger().log(
- Level.FINEST,
- "Client wants rows {0}-{1}",
+ getLogger().log(Level.FINEST, "Client wants rows {0}-{1}",
new Object[] { reqFirstRowToPaint,
(reqFirstRowToPaint + reqRowsToPaint - 1) });
}
@@ -3045,7 +3043,8 @@ public class Table extends AbstractSelect implements Action.Container,
boolean doSort = false;
if (variables.containsKey("sortcolumn")) {
final String colId = (String) variables.get("sortcolumn");
- if (colId != null && !"".equals(colId) && !"null".equals(colId)) {
+ if (colId != null && !"".equals(colId)
+ && !"null".equals(colId)) {
final Object id = columnIdMap.get(colId);
setSortContainerPropertyId(id, false);
doSort = true;
@@ -3076,8 +3075,8 @@ public class Table extends AbstractSelect implements Action.Container,
for (Object id : ids) {
idSet.add(columnIdMap.get(id.toString()));
}
- for (final Iterator<Object> it = visibleColumns.iterator(); it
- .hasNext();) {
+ for (final Iterator<Object> it = visibleColumns
+ .iterator(); it.hasNext();) {
Object propertyId = it.next();
if (isColumnCollapsed(propertyId)) {
if (!idSet.contains(propertyId)) {
@@ -3141,7 +3140,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Handles click event
- *
+ *
* @param variables
*/
private void handleClickEvent(Map<String, Object> variables) {
@@ -3195,7 +3194,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Handles the column resize event sent by the client.
- *
+ *
* @param variables
*/
private void handleColumnResizeEvent(Map<String, Object> variables) {
@@ -3258,7 +3257,7 @@ public class Table extends AbstractSelect implements Action.Container,
* Go to mode where content updates are not done. This is due we want to
* bypass expensive content for some reason (like when we know we may have
* other content changes on their way).
- *
+ *
* @return true if content refresh flag was enabled prior this call
*/
protected boolean disableContentRefreshing() {
@@ -3269,7 +3268,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Go to mode where content content refreshing has effect.
- *
+ *
* @param refreshContent
* true if content refresh needs to be done
*/
@@ -3293,7 +3292,7 @@ public class Table extends AbstractSelect implements Action.Container,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.AbstractSelect#paintContent(com.vaadin.
* terminal.PaintTarget)
*/
@@ -3365,7 +3364,8 @@ public class Table extends AbstractSelect implements Action.Container,
if (keyMapperReset) {
keyMapperReset = false;
- target.addAttribute(TableConstants.ATTRIBUTE_KEY_MAPPER_RESET, true);
+ target.addAttribute(TableConstants.ATTRIBUTE_KEY_MAPPER_RESET,
+ true);
}
if (dropHandler != null) {
@@ -3383,8 +3383,8 @@ public class Table extends AbstractSelect implements Action.Container,
return rowCacheInvalidated;
}
- private void paintPartialRowUpdate(PaintTarget target, Set<Action> actionSet)
- throws PaintException {
+ private void paintPartialRowUpdate(PaintTarget target,
+ Set<Action> actionSet) throws PaintException {
paintPartialRowUpdates(target, actionSet);
paintPartialRowAdditions(target, actionSet);
}
@@ -3469,7 +3469,7 @@ public class Table extends AbstractSelect implements Action.Container,
* Subclass and override this to enable partial row updates and additions,
* which bypass the normal caching mechanism. This is useful for e.g.
* TreeTable.
- *
+ *
* @return true if this update is a partial row update, false if not. For
* plain Table it is always false.
*/
@@ -3481,7 +3481,7 @@ public class Table extends AbstractSelect implements Action.Container,
* Subclass and override this to enable partial row additions, bypassing the
* normal caching mechanism. This is useful for e.g. TreeTable, where
* expanding a node should only fetch and add the items inside of that node.
- *
+ *
* @return The index of the first added item. For plain Table it is always
* 0.
*/
@@ -3493,7 +3493,7 @@ public class Table extends AbstractSelect implements Action.Container,
* Subclass and override this to enable partial row additions, bypassing the
* normal caching mechanism. This is useful for e.g. TreeTable, where
* expanding a node should only fetch and add the items inside of that node.
- *
+ *
* @return the number of rows to be added, starting at the index returned by
* {@link #getFirstAddedItemIndex()}. For plain Table it is always
* 0.
@@ -3506,11 +3506,11 @@ public class Table extends AbstractSelect implements Action.Container,
* Subclass and override this to enable removing of rows, bypassing the
* normal caching and lazy loading mechanism. This is useful for e.g.
* TreeTable, when you need to hide certain rows as a node is collapsed.
- *
+ *
* This should return true if the rows pointed to by
* {@link #getFirstAddedItemIndex()} and {@link #getAddedRowCount()} should
* be hidden instead of added.
- *
+ *
* @return whether the rows to add (see {@link #getFirstAddedItemIndex()}
* and {@link #getAddedRowCount()}) should be added or hidden. For
* plain Table it is always false.
@@ -3524,7 +3524,7 @@ public class Table extends AbstractSelect implements Action.Container,
* normal caching and lazy loading mechanism. This is useful for updating
* the state of certain rows, e.g. in the TreeTable the collapsed state of a
* single node is updated using this mechanism.
- *
+ *
* @return the index of the first item to be updated. For plain Table it is
* always 0.
*/
@@ -3537,7 +3537,7 @@ public class Table extends AbstractSelect implements Action.Container,
* normal caching and lazy loading mechanism. This is useful for updating
* the state of certain rows, e.g. in the TreeTable the collapsed state of a
* single node is updated using this mechanism.
- *
+ *
* @return the number of rows to update, starting at the index returned by
* {@link #getFirstUpdatedItemIndex()}. For plain table it is always
* 0.
@@ -3560,9 +3560,8 @@ public class Table extends AbstractSelect implements Action.Container,
target.addAttribute("cols", getVisibleColumns().length);
target.addAttribute("rows", rows);
- target.addAttribute("firstrow",
- (reqFirstRowToPaint >= 0 ? reqFirstRowToPaint
- : firstToBeRenderedInClient));
+ target.addAttribute("firstrow", (reqFirstRowToPaint >= 0
+ ? reqFirstRowToPaint : firstToBeRenderedInClient));
target.addAttribute("totalrows", total);
if (getPageLength() != 0) {
target.addAttribute("pagelength", getPageLength());
@@ -3631,8 +3630,8 @@ public class Table extends AbstractSelect implements Action.Container,
}
}
if (!Align.LEFT.equals(getColumnAlignment(colId))) {
- target.addAttribute("align", getColumnAlignment(colId)
- .toString());
+ target.addAttribute("align",
+ getColumnAlignment(colId).toString());
}
paintColumnWidth(target, colId);
paintColumnExpandRatio(target, colId);
@@ -3826,8 +3825,8 @@ public class Table extends AbstractSelect implements Action.Container,
target.addAttribute("multiselectmode", multiSelectMode.ordinal());
}
if (isSelectable()) {
- target.addAttribute("selectmode", (isMultiSelect() ? "multi"
- : "single"));
+ target.addAttribute("selectmode",
+ (isMultiSelect() ? "multi" : "single"));
} else {
target.addAttribute("selectmode", "none");
}
@@ -3899,7 +3898,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Checks whether row headers are visible.
- *
+ *
* @return {@code false} if row headers are hidden, {@code true} otherwise
* @since 7.3.9
*/
@@ -3937,20 +3936,21 @@ public class Table extends AbstractSelect implements Action.Container,
}
}
- if ((iscomponent[currentColumn] || iseditable || cells[CELL_GENERATED_ROW][indexInRowbuffer] != null)
+ if ((iscomponent[currentColumn] || iseditable
+ || cells[CELL_GENERATED_ROW][indexInRowbuffer] != null)
&& Component.class.isInstance(cells[CELL_FIRSTCOL
+ currentColumn][indexInRowbuffer])) {
final Component c = (Component) cells[CELL_FIRSTCOL
+ currentColumn][indexInRowbuffer];
- if (c == null
- || !LegacyCommunicationManager
- .isComponentVisibleToClient(c)) {
+ if (c == null || !LegacyCommunicationManager
+ .isComponentVisibleToClient(c)) {
target.addText("");
} else {
LegacyPaint.paint(c, target);
}
} else {
- target.addText((String) cells[CELL_FIRSTCOL + currentColumn][indexInRowbuffer]);
+ target.addText((String) cells[CELL_FIRSTCOL
+ + currentColumn][indexInRowbuffer]);
}
paintCellTooltips(target, itemId, columnId);
}
@@ -4033,7 +4033,8 @@ public class Table extends AbstractSelect implements Action.Container,
int indexInRowBuffer) throws PaintException {
GeneratedRow generatedRow = (GeneratedRow) cells[CELL_GENERATED_ROW][indexInRowBuffer];
if (generatedRow != null) {
- target.addAttribute("gen_html", generatedRow.isHtmlContentAllowed());
+ target.addAttribute("gen_html",
+ generatedRow.isHtmlContentAllowed());
target.addAttribute("gen_span", generatedRow.isSpanColumns());
target.addAttribute("gen_widget",
generatedRow.getValue() instanceof Component);
@@ -4063,7 +4064,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* A method where extended Table implementations may add their custom
* attributes for rows.
- *
+ *
* @param target
* @param itemId
*/
@@ -4074,7 +4075,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Gets the cached visible table contents.
- *
+ *
* @return the cached visible table contents.
*/
private Object[][] getVisibleCells() {
@@ -4086,11 +4087,11 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Gets the value of property.
- *
+ *
* By default if the table is editable the fieldFactory is used to create
* editors for table cells. Otherwise formatPropertyValue is used to format
* the value representation.
- *
+ *
* @param rowId
* the Id of the row (same as item Id).
* @param colId
@@ -4103,8 +4104,8 @@ public class Table extends AbstractSelect implements Action.Container,
protected Object getPropertyValue(Object rowId, Object colId,
Property property) {
if (isEditable() && fieldFactory != null) {
- final Field<?> f = fieldFactory.createField(
- getContainerDataSource(), rowId, colId, this);
+ final Field<?> f = fieldFactory
+ .createField(getContainerDataSource(), rowId, colId, this);
if (f != null) {
// Remember that we have made this association so we can remove
// it when the component is removed
@@ -4122,7 +4123,7 @@ public class Table extends AbstractSelect implements Action.Container,
* default behavior is to bind property straight to Field. If
* Property.Viewer type property (e.g. PropertyFormatter) is already set for
* field, the property is bound to that Property.Viewer.
- *
+ *
* @param rowId
* @param colId
* @param property
@@ -4147,7 +4148,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Formats table cell property values. By default the property.toString()
* and return a empty string for null properties.
- *
+ *
* @param rowId
* the Id of the row (same as item Id).
* @param colId
@@ -4182,7 +4183,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Registers a new action handler for this container
- *
+ *
* @see com.vaadin.event.Action.Container#addActionHandler(Action.Handler)
*/
@@ -4210,7 +4211,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Removes a previously registered action handler for the contents of this
* container.
- *
+ *
* @see com.vaadin.event.Action.Container#removeActionHandler(Action.Handler)
*/
@@ -4249,9 +4250,9 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Notifies this listener that the Property's value has changed.
- *
+ *
* Also listens changes in rendered items to refresh content area.
- *
+ *
* @see com.vaadin.data.Property.ValueChangeListener#valueChange(Property.ValueChangeEvent)
*/
@@ -4282,7 +4283,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Notifies the component that it is connected to an application.
- *
+ *
* @see com.vaadin.ui.Component#attach()
*/
@@ -4295,7 +4296,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Notifies the component that it is detached from the application
- *
+ *
* @see com.vaadin.ui.Component#detach()
*/
@@ -4306,7 +4307,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Removes all Items from the Container.
- *
+ *
* @see com.vaadin.data.Container#removeAllItems()
*/
@@ -4319,7 +4320,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Removes the Item identified by <code>ItemId</code> from the Container.
- *
+ *
* @see com.vaadin.data.Container#removeItem(Object)
*/
@@ -4327,7 +4328,8 @@ public class Table extends AbstractSelect implements Action.Container,
public boolean removeItem(Object itemId) {
final Object nextItemId = nextItemId(itemId);
final boolean ret = super.removeItem(itemId);
- if (ret && (itemId != null) && (itemId.equals(currentPageFirstItemId))) {
+ if (ret && (itemId != null)
+ && (itemId.equals(currentPageFirstItemId))) {
currentPageFirstItemId = nextItemId;
}
if (!(items instanceof Container.ItemSetChangeNotifier)) {
@@ -4338,7 +4340,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Removes a Property specified by the given Property ID from the Container.
- *
+ *
* @see com.vaadin.data.Container#removeContainerProperty(Object)
*/
@@ -4360,7 +4362,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Adds a new property to the table and show it as a visible column.
- *
+ *
* @param propertyId
* the Id of the property.
* @param type
@@ -4395,7 +4397,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Adds a new property to the table and show it as a visible column.
- *
+ *
* @param propertyId
* the Id of the property
* @param type
@@ -4451,7 +4453,7 @@ public class Table extends AbstractSelect implements Action.Container,
* Also note that getVisibleColumns() will return the generated columns,
* while getContainerPropertyIds() will not.
* </p>
- *
+ *
* @param id
* the id of the column to be added
* @param generatedColumn
@@ -4480,7 +4482,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Returns the ColumnGenerator used to generate the given column.
- *
+ *
* @param columnId
* The id of the generated column
* @return The ColumnGenerator used for the given columnId or null.
@@ -4492,7 +4494,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Removes a generated column previously added with addGeneratedColumn.
- *
+ *
* @param columnId
* id of the generated column to remove
* @return true if the column could be removed (existed in the Table)
@@ -4523,7 +4525,7 @@ public class Table extends AbstractSelect implements Action.Container,
* architecture. Using {@link #getCurrentPageFirstItemId()} combined with
* {@link #getPageLength()} may produce good enough estimates in some
* situations.
- *
+ *
* @see com.vaadin.ui.Select#getVisibleItemIds()
*/
@@ -4547,7 +4549,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Container datasource item set change. Table must flush its buffers on
* change.
- *
+ *
* @see com.vaadin.data.Container.ItemSetChangeListener#containerItemSetChange(com.vaadin.data.Container.ItemSetChangeEvent)
*/
@@ -4572,7 +4574,7 @@ public class Table extends AbstractSelect implements Action.Container,
currentFirstItemIndex = repairOnReAddAllRowsDataScrollPositionItemIndex;
/*
* Reset repairOnReAddAllRowsDataScrollPositionItemIndex.
- *
+ *
* Next string should be commented (removed) if we want to have
* possibility to restore scroll position during adding items to
* container one by one via add() but not only addAll(). The
@@ -4593,7 +4595,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Container datasource property set change. Table must flush its buffers on
* change.
- *
+ *
* @see com.vaadin.data.Container.PropertySetChangeListener#containerPropertySetChange(com.vaadin.data.Container.PropertySetChangeEvent)
*/
@@ -4617,8 +4619,8 @@ public class Table extends AbstractSelect implements Action.Container,
for (Iterator<Object> iterator = newVisibleColumns.iterator(); iterator
.hasNext();) {
Object id = iterator.next();
- if (!(containerPropertyIds.contains(id) || columnGenerators
- .containsKey(id))) {
+ if (!(containerPropertyIds.contains(id)
+ || columnGenerators.containsKey(id))) {
iterator.remove();
}
}
@@ -4627,8 +4629,8 @@ public class Table extends AbstractSelect implements Action.Container,
for (Iterator<Object> iterator = collapsedColumns.iterator(); iterator
.hasNext();) {
Object id = iterator.next();
- if (!(containerPropertyIds.contains(id) || columnGenerators
- .containsKey(id))) {
+ if (!(containerPropertyIds.contains(id)
+ || columnGenerators.containsKey(id))) {
iterator.remove();
}
}
@@ -4639,7 +4641,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Adding new items is not supported.
- *
+ *
* @throws UnsupportedOperationException
* if set to true.
* @see com.vaadin.ui.Select#setNewItemsAllowed(boolean)
@@ -4655,7 +4657,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Gets the ID of the Item following the Item that corresponds to itemId.
- *
+ *
* @see com.vaadin.data.Container.Ordered#nextItemId(java.lang.Object)
*/
@@ -4667,7 +4669,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Gets the ID of the Item preceding the Item that corresponds to the
* itemId.
- *
+ *
* @see com.vaadin.data.Container.Ordered#prevItemId(java.lang.Object)
*/
@@ -4678,7 +4680,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Gets the ID of the first Item in the Container.
- *
+ *
* @see com.vaadin.data.Container.Ordered#firstItemId()
*/
@@ -4689,7 +4691,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Gets the ID of the last Item in the Container.
- *
+ *
* @see com.vaadin.data.Container.Ordered#lastItemId()
*/
@@ -4701,7 +4703,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Tests if the Item corresponding to the given Item ID is the first Item in
* the Container.
- *
+ *
* @see com.vaadin.data.Container.Ordered#isFirstId(java.lang.Object)
*/
@@ -4713,7 +4715,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Tests if the Item corresponding to the given Item ID is the last Item in
* the Container.
- *
+ *
* @see com.vaadin.data.Container.Ordered#isLastId(java.lang.Object)
*/
@@ -4724,7 +4726,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Adds new item after the given item.
- *
+ *
* @see com.vaadin.data.Container.Ordered#addItemAfter(java.lang.Object)
*/
@@ -4741,7 +4743,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Adds new item after the given item.
- *
+ *
* @see com.vaadin.data.Container.Ordered#addItemAfter(java.lang.Object,
* java.lang.Object)
*/
@@ -4759,10 +4761,10 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Sets the TableFieldFactory that is used to create editor for table cells.
- *
+ *
* The TableFieldFactory is only used if the Table is editable. By default
* the DefaultFieldFactory is used.
- *
+ *
* @param fieldFactory
* the field factory to set.
* @see #isEditable
@@ -4777,9 +4779,9 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Gets the TableFieldFactory that is used to create editor for table cells.
- *
+ *
* The FieldFactory is only used if the Table is editable.
- *
+ *
* @return TableFieldFactory used to create the Field instances.
* @see #isEditable
*/
@@ -4789,18 +4791,18 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Is table editable.
- *
+ *
* If table is editable a editor of type Field is created for each table
* cell. The assigned FieldFactory is used to create the instances.
- *
+ *
* To provide custom editors for table cells create a class implementing the
* FieldFactory interface, and assign it to table, and set the editable
* property to true.
- *
+ *
* @return true if table is editable, false otherwise.
* @see Field
* @see FieldFactory
- *
+ *
*/
public boolean isEditable() {
return editable;
@@ -4808,19 +4810,19 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Sets the editable property.
- *
+ *
* If table is editable a editor of type Field is created for each table
* cell. The assigned FieldFactory is used to create the instances.
- *
+ *
* To provide custom editors for table cells create a class implementing the
* FieldFactory interface, and assign it to table, and set the editable
* property to true.
- *
+ *
* @param editable
* true if table should be editable by user.
* @see Field
* @see FieldFactory
- *
+ *
*/
public void setEditable(boolean editable) {
this.editable = editable;
@@ -4831,13 +4833,13 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Sorts the table.
- *
+ *
* @throws UnsupportedOperationException
* if the container data source does not implement
* Container.Sortable
* @see com.vaadin.data.Container.Sortable#sort(java.lang.Object[],
* boolean[])
- *
+ *
*/
@Override
@@ -4869,7 +4871,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Sorts the table by currently selected sorting column.
- *
+ *
* @throws UnsupportedOperationException
* if the container data source does not implement
* Container.Sortable
@@ -4889,7 +4891,7 @@ public class Table extends AbstractSelect implements Action.Container,
* returns. Disabling sorting causes this method to always return an empty
* collection.
* </p>
- *
+ *
* @see com.vaadin.data.Container.Sortable#getSortableContainerPropertyIds()
*/
@@ -4905,7 +4907,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Gets the currently sorted column property ID.
- *
+ *
* @return the Container property id of the currently sorted column.
*/
public Object getSortContainerPropertyId() {
@@ -4914,7 +4916,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Sets the currently sorted column property id.
- *
+ *
* @param propertyId
* the Container property id of the currently sorted column.
*/
@@ -4925,13 +4927,13 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Internal method to set currently sorted column property id. With doSort
* flag actual sorting may be bypassed.
- *
+ *
* @param propertyId
* @param doSort
*/
private void setSortContainerPropertyId(Object propertyId, boolean doSort) {
- if ((sortContainerPropertyId != null && !sortContainerPropertyId
- .equals(propertyId))
+ if ((sortContainerPropertyId != null
+ && !sortContainerPropertyId.equals(propertyId))
|| (sortContainerPropertyId == null && propertyId != null)) {
sortContainerPropertyId = propertyId;
@@ -4946,7 +4948,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Is the table currently sorted in ascending order.
- *
+ *
* @return <code>true</code> if ascending, <code>false</code> if descending.
*/
public boolean isSortAscending() {
@@ -4955,7 +4957,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Sets the table in ascending order.
- *
+ *
* @param ascending
* <code>true</code> if ascending, <code>false</code> if
* descending.
@@ -4967,7 +4969,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Internal method to set sort ascending. With doSort flag actual sort can
* be bypassed.
- *
+ *
* @param ascending
* @param doSort
*/
@@ -4985,10 +4987,10 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Is sorting disabled altogether.
- *
+ *
* True iff no sortable columns are given even in the case where data source
* would support this.
- *
+ *
* @return True iff sorting is disabled.
* @deprecated As of 7.0, use {@link #isSortEnabled()} instead
*/
@@ -4999,7 +5001,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Checks if sorting is enabled.
- *
+ *
* @return true if sorting by the user is allowed, false otherwise
*/
public boolean isSortEnabled() {
@@ -5008,7 +5010,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Disables the sorting by the user altogether.
- *
+ *
* @param sortDisabled
* True iff sorting is disabled.
* @deprecated As of 7.0, use {@link #setSortEnabled(boolean)} instead
@@ -5024,7 +5026,7 @@ public class Table extends AbstractSelect implements Action.Container,
* Setting this to false disallows sorting by the user. It is still possible
* to call {@link #sort()}.
* </p>
- *
+ *
* @param sortEnabled
* true to allow the user to sort the table, false to disallow it
*/
@@ -5039,14 +5041,14 @@ public class Table extends AbstractSelect implements Action.Container,
* Used to create "generated columns"; columns that exist only in the Table,
* not in the underlying Container. Implement this interface and pass it to
* Table.addGeneratedColumn along with an id for the column to be generated.
- *
+ *
*/
public interface ColumnGenerator extends Serializable {
/**
* Called by Table when a cell in a generated column needs to be
* generated.
- *
+ *
* @param source
* the source Table
* @param itemId
@@ -5064,7 +5066,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Set cell style generator for Table.
- *
+ *
* @param cellStyleGenerator
* New cell style generator or null to remove generator.
*/
@@ -5078,7 +5080,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Get the current cell style generator.
- *
+ *
*/
public CellStyleGenerator getCellStyleGenerator() {
return cellStyleGenerator;
@@ -5095,7 +5097,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Called by Table when a cell (and row) is painted.
- *
+ *
* @param source
* the source Table
* @param itemId
@@ -5128,8 +5130,8 @@ public class Table extends AbstractSelect implements Action.Container,
@Override
public void removeItemClickListener(ItemClickListener listener) {
- removeListener(TableConstants.ITEM_CLICK_EVENT_ID,
- ItemClickEvent.class, listener);
+ removeListener(TableConstants.ITEM_CLICK_EVENT_ID, ItemClickEvent.class,
+ listener);
}
/**
@@ -5158,7 +5160,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Sets the drag start mode of the Table. Drag start mode controls how Table
* behaves as a drag source.
- *
+ *
* @param newDragMode
*/
public void setDragMode(TableDragMode newDragMode) {
@@ -5177,9 +5179,9 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Concrete implementation of {@link DataBoundTransferable} for data
* transferred from a table.
- *
+ *
* @see {@link DataBoundTransferable}.
- *
+ *
* @since 6.3
*/
public class TableTransferable extends DataBoundTransferable {
@@ -5241,7 +5243,7 @@ public class Table extends AbstractSelect implements Action.Container,
* Note, that on some clients the mode may not be respected. E.g. on touch
* based devices CTRL/SHIFT base selection method is invalid, so touch based
* browsers always use the {@link MultiSelectMode#SIMPLE}.
- *
+ *
* @param mode
* The select mode of the table
*/
@@ -5252,7 +5254,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Returns the select mode in which multi-select is used.
- *
+ *
* @return The multi select mode
*/
public MultiSelectMode getMultiSelectMode() {
@@ -5264,14 +5266,15 @@ public class Table extends AbstractSelect implements Action.Container,
* from server once per drag and drop operation. Developer must override one
* method that decides on which rows the currently dragged data can be
* dropped.
- *
+ *
* <p>
* Initially pretty much no data is sent to client. On first required
* criterion check (per drag request) the client side data structure is
* initialized from server and no subsequent requests requests are needed
* during that drag and drop operation.
*/
- public static abstract class TableDropCriterion extends ServerSideCriterion {
+ public static abstract class TableDropCriterion
+ extends ServerSideCriterion {
private Table table;
@@ -5279,7 +5282,7 @@ public class Table extends AbstractSelect implements Action.Container,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.event.dd.acceptcriteria.ServerSideCriterion#getIdentifier
* ()
@@ -5292,7 +5295,7 @@ public class Table extends AbstractSelect implements Action.Container,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.event.dd.acceptcriteria.AcceptCriterion#accepts(com.vaadin
* .event.dd.DragAndDropEvent)
@@ -5312,7 +5315,7 @@ public class Table extends AbstractSelect implements Action.Container,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.event.dd.acceptcriteria.AcceptCriterion#paintResponse(
* com.vaadin.server.PaintTarget)
@@ -5381,7 +5384,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Gets the property id of the column which header was pressed
- *
+ *
* @return The column property id
*/
public Object getPropertyId() {
@@ -5415,7 +5418,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Constructor
- *
+ *
* @param source
* The source of the component
* @param propertyId
@@ -5431,7 +5434,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Gets the property id of the column which header was pressed
- *
+ *
* @return The column property id
*/
public Object getPropertyId() {
@@ -5447,7 +5450,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Called when a user clicks a header column cell
- *
+ *
* @param event
* The event which contains information about the column and
* the mouse click event
@@ -5463,7 +5466,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Called when a user clicks a footer column cell
- *
+ *
* @param event
* The event which contains information about the column and
* the mouse click event
@@ -5478,7 +5481,7 @@ public class Table extends AbstractSelect implements Action.Container,
* The listener will receive events which contain information about which
* column was clicked and some details about the mouse event.
* </p>
- *
+ *
* @param listener
* The handler which should handle the header click events.
*/
@@ -5499,7 +5502,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Removes a header click listener
- *
+ *
* @param listener
* The listener to remove.
*/
@@ -5524,7 +5527,7 @@ public class Table extends AbstractSelect implements Action.Container,
* The listener will receive events which contain information about which
* column was clicked and some details about the mouse event.
* </p>
- *
+ *
* @param listener
* The handler which should handle the footer click events.
*/
@@ -5545,7 +5548,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Removes a footer click listener
- *
+ *
* @param listener
* The listener to remove.
*/
@@ -5565,7 +5568,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Gets the footer caption beneath the rows
- *
+ *
* @param propertyId
* The propertyId of the column *
* @return The caption of the footer or NULL if not set
@@ -5577,10 +5580,10 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Sets the column footer caption. The column footer caption is the text
* displayed beneath the column if footers have been set visible.
- *
+ *
* @param propertyId
* The properyId of the column
- *
+ *
* @param footer
* The caption of the footer
*/
@@ -5600,7 +5603,7 @@ public class Table extends AbstractSelect implements Action.Container,
* The footer can be used to add column related data like sums to the bottom
* of the Table using setColumnFooter(Object propertyId, String footer).
* </p>
- *
+ *
* @param visible
* Should the footer be visible
*/
@@ -5613,7 +5616,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Is the footer currently visible?
- *
+ *
* @return Returns true if visible else false
*/
public boolean isFooterVisible() {
@@ -5645,7 +5648,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Constructor
- *
+ *
* @param source
* The source of the event
* @param propertyId
@@ -5665,7 +5668,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Get the column property id of the column that was resized.
- *
+ *
* @return The column property id
*/
public Object getPropertyId() {
@@ -5674,7 +5677,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Get the width in pixels of the column before the resize event
- *
+ *
* @return Width in pixels
*/
public int getPreviousWidth() {
@@ -5683,7 +5686,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Get the width in pixels of the column after the resize event
- *
+ *
* @return Width in pixels
*/
public int getCurrentWidth() {
@@ -5698,7 +5701,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* This method is triggered when the column has been resized
- *
+ *
* @param event
* The event which contains the column property id, the
* previous width of the column and the current width of the
@@ -5710,7 +5713,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Adds a column resize listener to the Table. A column resize listener is
* called when a user resizes a columns width.
- *
+ *
* @param listener
* The listener to attach to the Table
*/
@@ -5731,7 +5734,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Removes a column resize listener from the Table.
- *
+ *
* @param listener
* The listener to remove
*/
@@ -5768,7 +5771,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Constructor
- *
+ *
* @param source
* The source of the event
*/
@@ -5785,7 +5788,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* This method is triggered when the column has been reordered
- *
+ *
* @param event
*/
public void columnReorder(ColumnReorderEvent event);
@@ -5793,7 +5796,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* This event is fired when the collapse state of a column changes.
- *
+ *
* @since 7.6
*/
public static class ColumnCollapseEvent extends Component.Event {
@@ -5805,7 +5808,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Constructor
- *
+ *
* @param source
* The source of the event
* @param propertyId
@@ -5818,7 +5821,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Gets the id of the column whose collapse state changed
- *
+ *
* @return the property id of the column
*/
public Object getPropertyId() {
@@ -5828,7 +5831,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Interface for listening to column collapse events.
- *
+ *
* @since 7.6
*/
public interface ColumnCollapseListener extends Serializable {
@@ -5836,7 +5839,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* This method is triggered when the collapse state for a column has
* changed
- *
+ *
* @param event
*/
public void columnCollapseStateChange(ColumnCollapseEvent event);
@@ -5845,7 +5848,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Adds a column reorder listener to the Table. A column reorder listener is
* called when a user reorders columns.
- *
+ *
* @param listener
* The listener to attach to the Table
*/
@@ -5865,7 +5868,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Removes a column reorder listener from the Table.
- *
+ *
* @param listener
* The listener to remove
*/
@@ -5886,15 +5889,16 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Adds a column collapse listener to the Table. A column collapse listener
* is called when the collapsed state of a column changes.
- *
+ *
* @since 7.6
- *
+ *
* @param listener
* The listener to attach
*/
public void addColumnCollapseListener(ColumnCollapseListener listener) {
addListener(TableConstants.COLUMN_COLLAPSE_EVENT_ID,
- ColumnCollapseEvent.class, listener, ColumnCollapseEvent.METHOD);
+ ColumnCollapseEvent.class, listener,
+ ColumnCollapseEvent.METHOD);
}
/**
@@ -5912,11 +5916,12 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Set the item description generator which generates tooltips for cells and
* rows in the Table
- *
+ *
* @param generator
* The generator to use or null to disable
*/
- public void setItemDescriptionGenerator(ItemDescriptionGenerator generator) {
+ public void setItemDescriptionGenerator(
+ ItemDescriptionGenerator generator) {
if (generator != itemDescriptionGenerator) {
itemDescriptionGenerator = generator;
// Assures the visual refresh. No need to reset the page buffer
@@ -5937,7 +5942,7 @@ public class Table extends AbstractSelect implements Action.Container,
* Row generators can be used to replace certain items in a table with a
* generated string. The generator is called each time the table is
* rendered, which means that new strings can be generated each time.
- *
+ *
* Row generators can be used for e.g. summary rows or grouping of items.
*/
public interface RowGenerator extends Serializable {
@@ -5963,7 +5968,7 @@ public class Table extends AbstractSelect implements Action.Container,
* For custom styling of a generated row you can combine a RowGenerator
* with a CellStyleGenerator.
* <p>
- *
+ *
* @param table
* The Table that is being painted
* @param itemId
@@ -5982,7 +5987,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Creates a new generated row. If only one string is passed in, columns
* are automatically spanned.
- *
+ *
* @param text
*/
public GeneratedRow(String... text) {
@@ -6017,7 +6022,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* If set to true, all strings passed to {@link #setText(String...)}
* will be rendered as HTML.
- *
+ *
* @param htmlContentAllowed
*/
public void setHtmlContentAllowed(boolean htmlContentAllowed) {
@@ -6031,7 +6036,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* If set to true, only one string will be rendered, spanning the entire
* row.
- *
+ *
* @param spanColumns
*/
public void setSpanColumns(boolean spanColumns) {
@@ -6042,7 +6047,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Assigns a row generator to the table. The row generator will be able to
* replace rows in the table when it is rendered.
- *
+ *
* @param generator
* the new row generator
*/
@@ -6064,23 +6069,24 @@ public class Table extends AbstractSelect implements Action.Container,
* The converter is used to format the the data for the given property id
* before displaying it in the table.
* </p>
- *
+ *
* @param propertyId
* The propertyId to format using the converter
* @param converter
* The converter to use for the property id
*/
- public void setConverter(Object propertyId, Converter<String, ?> converter) {
+ public void setConverter(Object propertyId,
+ Converter<String, ?> converter) {
if (!getContainerPropertyIds().contains(propertyId)) {
- throw new IllegalArgumentException("PropertyId " + propertyId
- + " must be in the container");
+ throw new IllegalArgumentException(
+ "PropertyId " + propertyId + " must be in the container");
}
if (!typeIsCompatible(converter.getModelType(), getType(propertyId))) {
- throw new IllegalArgumentException("Property type ("
- + getType(propertyId)
- + ") must match converter source type ("
- + converter.getModelType() + ")");
+ throw new IllegalArgumentException(
+ "Property type (" + getType(propertyId)
+ + ") must match converter source type ("
+ + converter.getModelType() + ")");
}
propertyValueConverters.put(propertyId,
(Converter<String, Object>) converter);
@@ -6089,7 +6095,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Checks if there is a converter set explicitly for the given property id.
- *
+ *
* @param propertyId
* The propertyId to check
* @return true if a converter has been set for the property id, false
@@ -6101,7 +6107,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Returns the converter used to format the given propertyId.
- *
+ *
* @param propertyId
* The propertyId to check
* @return The converter used to format the propertyId or null if no
@@ -6171,10 +6177,8 @@ public class Table extends AbstractSelect implements Action.Container,
addContainerProperty(id, String.class, null);
if (col.hasAttr("width")) {
- setColumnWidth(
- id,
- DesignAttributeHandler.readAttribute("width",
- col.attributes(), Integer.class));
+ setColumnWidth(id, DesignAttributeHandler.readAttribute(
+ "width", col.attributes(), Integer.class));
}
if (col.hasAttr("center")) {
setColumnAlignment(id, Align.CENTER);
@@ -6196,9 +6200,8 @@ public class Table extends AbstractSelect implements Action.Container,
col.attributes(), boolean.class));
}
if (col.hasAttr("collapsed")) {
- setColumnCollapsed(id,
- DesignAttributeHandler.readAttribute("collapsed",
- col.attributes(), boolean.class));
+ setColumnCollapsed(id, DesignAttributeHandler.readAttribute(
+ "collapsed", col.attributes(), boolean.class));
}
}
setVisibleColumns(pIds.toArray());
@@ -6240,14 +6243,13 @@ public class Table extends AbstractSelect implements Action.Container,
}
Iterator<?> propertyIt = propertyIds.iterator();
for (Element e : elems) {
- String columnValue = DesignFormatter.decodeFromTextNode(e
- .html());
+ String columnValue = DesignFormatter
+ .decodeFromTextNode(e.html());
Object propertyId = propertyIt.next();
if (header) {
setColumnHeader(propertyId, columnValue);
if (e.hasAttr("icon")) {
- setColumnIcon(
- propertyId,
+ setColumnIcon(propertyId,
DesignAttributeHandler.readAttribute("icon",
e.attributes(), Resource.class));
}
@@ -6344,9 +6346,9 @@ public class Table extends AbstractSelect implements Action.Container,
col.attributes(), isColumnCollapsible(id),
def.isColumnCollapsible(null), boolean.class);
- DesignAttributeHandler.writeAttribute("collapsed",
- col.attributes(), isColumnCollapsed(id),
- def.isColumnCollapsed(null), boolean.class);
+ DesignAttributeHandler.writeAttribute("collapsed", col.attributes(),
+ isColumnCollapsed(id), def.isColumnCollapsed(null),
+ boolean.class);
}
}
@@ -6438,7 +6440,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Returns the item id of context clicked row.
- *
+ *
* @return item id of clicked row; <code>null</code> if header, footer
* or empty area of Table
*/
@@ -6448,7 +6450,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Returns the property id of context clicked column.
- *
+ *
* @return property id; or <code>null</code> if we've clicked on the
* empty area of the Table
*/
@@ -6458,7 +6460,7 @@ public class Table extends AbstractSelect implements Action.Container,
/**
* Returns the clicked section of Table.
- *
+ *
* @return section of Table
*/
public Section getSection() {
@@ -6506,8 +6508,8 @@ public class Table extends AbstractSelect implements Action.Container,
* Sets whether only collapsible columns should be shown to the user in the
* column collapse menu. The default is
* {@link CollapseMenuContent#ALL_COLUMNS}.
- *
- *
+ *
+ *
* @since 7.6
* @param content
* the desired collapsible menu content setting
@@ -6520,7 +6522,7 @@ public class Table extends AbstractSelect implements Action.Container,
* Checks whether only collapsible columns are shown to the user in the
* column collapse menu. The default is
* {@link CollapseMenuContent#ALL_COLUMNS} .
- *
+ *
* @since 7.6
* @return the current collapsible menu content setting
*/
diff --git a/server/src/main/java/com/vaadin/ui/TableFieldFactory.java b/server/src/main/java/com/vaadin/ui/TableFieldFactory.java
index 3c946dcec2..ea7efeef13 100644
--- a/server/src/main/java/com/vaadin/ui/TableFieldFactory.java
+++ b/server/src/main/java/com/vaadin/ui/TableFieldFactory.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,9 +25,9 @@ import com.vaadin.data.Container;
* for displaying fields). Currently this interface is used by {@link Table},
* but might later be used by some other components for {@link Field}
* generation.
- *
+ *
* <p>
- *
+ *
* @author Vaadin Ltd.
* @since 6.0
* @see FormFieldFactory
@@ -37,7 +37,7 @@ public interface TableFieldFactory extends Serializable {
* Creates a field based on the Container, item id, property id and the
* component responsible for displaying the field (most commonly
* {@link Table}).
- *
+ *
* @param container
* the Container where the property belongs to.
* @param itemId
diff --git a/server/src/main/java/com/vaadin/ui/TextArea.java b/server/src/main/java/com/vaadin/ui/TextArea.java
index d66fbf0668..35f7c727a3 100644
--- a/server/src/main/java/com/vaadin/ui/TextArea.java
+++ b/server/src/main/java/com/vaadin/ui/TextArea.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -37,7 +37,7 @@ public class TextArea extends AbstractTextField {
/**
* Constructs an empty TextArea with given caption.
- *
+ *
* @param caption
* the caption for the field.
*/
@@ -48,7 +48,7 @@ public class TextArea extends AbstractTextField {
/**
* Constructs a TextArea with given property data source.
- *
+ *
* @param dataSource
* the data source for the field
*/
@@ -59,7 +59,7 @@ public class TextArea extends AbstractTextField {
/**
* Constructs a TextArea with given caption and property data source.
- *
+ *
* @param caption
* the caption for the field
* @param dataSource
@@ -72,7 +72,7 @@ public class TextArea extends AbstractTextField {
/**
* Constructs a TextArea with given caption and value.
- *
+ *
* @param caption
* the caption for the field
* @param value
@@ -96,7 +96,7 @@ public class TextArea extends AbstractTextField {
/**
* Sets the number of rows in the text area.
- *
+ *
* @param rows
* the number of rows for this text area.
*/
@@ -109,7 +109,7 @@ public class TextArea extends AbstractTextField {
/**
* Gets the number of rows in the text area.
- *
+ *
* @return number of explicitly set rows.
*/
public int getRows() {
@@ -118,7 +118,7 @@ public class TextArea extends AbstractTextField {
/**
* Sets the text area's word-wrap mode on or off.
- *
+ *
* @param wordwrap
* the boolean value specifying if the text area should be in
* word-wrap mode.
@@ -129,7 +129,7 @@ public class TextArea extends AbstractTextField {
/**
* Tests if the text area is in word-wrap mode.
- *
+ *
* @return <code>true</code> if the component is in word-wrap mode,
* <code>false</code> if not.
*/
@@ -139,7 +139,7 @@ public class TextArea extends AbstractTextField {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.AbstractField#readDesign(org.jsoup.nodes.Element ,
* com.vaadin.ui.declarative.DesignContext)
*/
@@ -152,7 +152,7 @@ public class TextArea extends AbstractTextField {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.AbstractTextField#writeDesign(org.jsoup.nodes.Element
* , com.vaadin.ui.declarative.DesignContext)
*/
diff --git a/server/src/main/java/com/vaadin/ui/TextField.java b/server/src/main/java/com/vaadin/ui/TextField.java
index 8772f95f3d..00628e0593 100644
--- a/server/src/main/java/com/vaadin/ui/TextField.java
+++ b/server/src/main/java/com/vaadin/ui/TextField.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ import com.vaadin.ui.declarative.DesignContext;
* editor supports both multiline and single line modes, default is one-line
* mode.
* </p>
- *
+ *
* <p>
* Since <code>TextField</code> extends <code>AbstractField</code> it implements
* the {@link com.vaadin.data.Buffered} interface. A <code>TextField</code> is
@@ -37,7 +37,7 @@ import com.vaadin.ui.declarative.DesignContext;
* {@link com.vaadin.ui.AbstractField#setWriteThrough(boolean)} must be called
* to enable buffering.
* </p>
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -53,7 +53,7 @@ public class TextField extends AbstractTextField {
/**
* Constructs an empty <code>TextField</code> with given caption.
- *
+ *
* @param caption
* the caption <code>String</code> for the editor.
*/
@@ -65,7 +65,7 @@ public class TextField extends AbstractTextField {
/**
* Constructs a new <code>TextField</code> that's bound to the specified
* <code>Property</code> and has no caption.
- *
+ *
* @param dataSource
* the Property to be edited with this editor.
*/
@@ -76,7 +76,7 @@ public class TextField extends AbstractTextField {
/**
* Constructs a new <code>TextField</code> that's bound to the specified
* <code>Property</code> and has the given caption <code>String</code>.
- *
+ *
* @param caption
* the caption <code>String</code> for the editor.
* @param dataSource
@@ -93,7 +93,7 @@ public class TextField extends AbstractTextField {
* to a Property unless
* {@link com.vaadin.data.Property.Viewer#setPropertyDataSource(Property)}
* is called to bind it.
- *
+ *
* @param caption
* the caption <code>String</code> for the editor.
* @param value
@@ -106,7 +106,7 @@ public class TextField extends AbstractTextField {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.AbstractTextField#readDesign(org.jsoup.nodes.Element,
* com.vaadin.ui.declarative.DesignContext)
*/
@@ -115,15 +115,15 @@ public class TextField extends AbstractTextField {
super.readDesign(design, designContext);
Attributes attr = design.attributes();
if (attr.hasKey("value")) {
- String newFieldValue = DesignAttributeHandler.readAttribute(
- "value", attr, String.class);
+ String newFieldValue = DesignAttributeHandler.readAttribute("value",
+ attr, String.class);
setValue(newFieldValue, false, true);
}
}
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.AbstractTextField#writeDesign(org.jsoup.nodes.Element
* , com.vaadin.ui.declarative.DesignContext)
*/
@@ -139,7 +139,7 @@ public class TextField extends AbstractTextField {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.AbstractField#clear()
*/
@Override
diff --git a/server/src/main/java/com/vaadin/ui/TooltipConfiguration.java b/server/src/main/java/com/vaadin/ui/TooltipConfiguration.java
index ecb8ac7534..968940f702 100644
--- a/server/src/main/java/com/vaadin/ui/TooltipConfiguration.java
+++ b/server/src/main/java/com/vaadin/ui/TooltipConfiguration.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ import com.vaadin.shared.ui.ui.UIState.TooltipConfigurationState;
/**
* Provides method for configuring the tooltip.
- *
+ *
* @author Vaadin Ltd
* @since 7.1
*/
@@ -30,7 +30,7 @@ public interface TooltipConfiguration extends Serializable {
* Returns the time (in ms) the tooltip should be displayed after an event
* that will cause it to be closed (e.g. mouse click outside the component,
* key down).
- *
+ *
* @return The close timeout
*/
public int getCloseTimeout();
@@ -39,7 +39,7 @@ public interface TooltipConfiguration extends Serializable {
* Sets the time (in ms) the tooltip should be displayed after an event that
* will cause it to be closed (e.g. mouse click outside the component, key
* down).
- *
+ *
* @param closeTimeout
* The close timeout
*/
@@ -50,7 +50,7 @@ public interface TooltipConfiguration extends Serializable {
* be used instead of {@link #getOpenDelay()}. The quick open delay is used
* when the tooltip has very recently been shown, is currently hidden but
* about to be shown again.
- *
+ *
* @return The quick open timeout
*/
public int getQuickOpenTimeout();
@@ -60,7 +60,7 @@ public interface TooltipConfiguration extends Serializable {
* should be used instead of {@link #getOpenDelay()}. The quick open delay
* is used when the tooltip has very recently been shown, is currently
* hidden but about to be shown again.
- *
+ *
* @param quickOpenTimeout
* The quick open timeout
*/
@@ -70,7 +70,7 @@ public interface TooltipConfiguration extends Serializable {
* Returns the time (in ms) that should elapse before a tooltip will be
* shown, in the situation when a tooltip has very recently been shown
* (within {@link #getQuickOpenDelay()} ms).
- *
+ *
* @return The quick open delay
*/
public int getQuickOpenDelay();
@@ -79,7 +79,7 @@ public interface TooltipConfiguration extends Serializable {
* Sets the time (in ms) that should elapse before a tooltip will be shown,
* in the situation when a tooltip has very recently been shown (within
* {@link #getQuickOpenDelay()} ms).
- *
+ *
* @param quickOpenDelay
* The quick open delay
*/
@@ -90,7 +90,7 @@ public interface TooltipConfiguration extends Serializable {
* tooltip showing has occurred (e.g. mouse over) before the tooltip is
* shown. If a tooltip has recently been shown, then
* {@link #getQuickOpenDelay()} is used instead of this.
- *
+ *
* @return The open delay
*/
public int getOpenDelay();
@@ -100,7 +100,7 @@ public interface TooltipConfiguration extends Serializable {
* tooltip showing has occurred (e.g. mouse over) before the tooltip is
* shown. If a tooltip has recently been shown, then
* {@link #getQuickOpenDelay()} is used instead of this.
- *
+ *
* @param openDelay
* The open delay
*/
@@ -108,14 +108,14 @@ public interface TooltipConfiguration extends Serializable {
/**
* Returns the maximum width of the tooltip popup.
- *
+ *
* @return The maximum width the tooltip popup
*/
public int getMaxWidth();
/**
* Sets the maximum width of the tooltip popup.
- *
+ *
* @param maxWidth
* The maximum width the tooltip popup
*/
@@ -131,7 +131,7 @@ class TooltipConfigurationImpl implements TooltipConfiguration {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.UI.Tooltip#getCloseTimeout()
*/
@Override
@@ -141,7 +141,7 @@ class TooltipConfigurationImpl implements TooltipConfiguration {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.Tooltip#setCloseTimeout(int)
*/
@Override
@@ -151,7 +151,7 @@ class TooltipConfigurationImpl implements TooltipConfiguration {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.Tooltip#getQuickOpenTimeout()
*/
@Override
@@ -161,7 +161,7 @@ class TooltipConfigurationImpl implements TooltipConfiguration {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.Tooltip#setQuickOpenTimeout(int)
*/
@Override
@@ -171,7 +171,7 @@ class TooltipConfigurationImpl implements TooltipConfiguration {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.Tooltip#getQuickOpenDelay()
*/
@Override
@@ -181,7 +181,7 @@ class TooltipConfigurationImpl implements TooltipConfiguration {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.Tooltip#setQuickOpenDelay(int)
*/
@Override
@@ -191,7 +191,7 @@ class TooltipConfigurationImpl implements TooltipConfiguration {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.Tooltip#getOpenDelay()
*/
@Override
@@ -201,7 +201,7 @@ class TooltipConfigurationImpl implements TooltipConfiguration {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.Tooltip#setOpenDelay(int)
*/
@Override
@@ -211,7 +211,7 @@ class TooltipConfigurationImpl implements TooltipConfiguration {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.Tooltip#getMaxWidth()
*/
@Override
@@ -221,7 +221,7 @@ class TooltipConfigurationImpl implements TooltipConfiguration {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.Tooltip#setMaxWidth(int)
*/
@Override
diff --git a/server/src/main/java/com/vaadin/ui/Tree.java b/server/src/main/java/com/vaadin/ui/Tree.java
index 5e6ac55027..c56acff883 100644
--- a/server/src/main/java/com/vaadin/ui/Tree.java
+++ b/server/src/main/java/com/vaadin/ui/Tree.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -70,7 +70,7 @@ import com.vaadin.util.ReflectTools;
/**
* Tree component. A Tree can be used to select an item (or multiple items) from
* a hierarchical set of items.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -100,7 +100,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Returns the item id of context clicked row.
- *
+ *
* @return item id of clicked row; <code>null</code> if no row is
* present at the location
*/
@@ -200,7 +200,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Creates a new empty tree with caption.
- *
+ *
* @param caption
*/
public Tree(String caption) {
@@ -209,7 +209,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Creates a new tree with caption and connect it to a Container.
- *
+ *
* @param caption
* @param dataSource
*/
@@ -224,12 +224,12 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Sets the icon for an item.
- *
+ *
* @param itemId
* the id of the item to be assigned an icon.
* @param icon
* the icon to use or null.
- *
+ *
* @param altText
* the alternative text for the icon
*/
@@ -250,9 +250,9 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Set the alternate text for an item.
- *
+ *
* Used when the item has an icon.
- *
+ *
* @param itemId
* the id of the item to be assigned an icon.
* @param altText
@@ -270,7 +270,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Return the alternate text of an icon in a tree item.
- *
+ *
* @param itemId
* Object with the ID of the item
* @return String with the alternate text of the icon, or null when no icon
@@ -285,7 +285,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Check is an item is expanded
- *
+ *
* @param itemId
* the item id.
* @return true iff the item is expanded.
@@ -296,7 +296,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Expands an item.
- *
+ *
* @param itemId
* the item id.
* @return True iff the expand operation succeeded
@@ -309,7 +309,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Expands an item.
- *
+ *
* @param itemId
* the item id.
* @param sendChildTree
@@ -356,10 +356,10 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Expands the items recursively
- *
+ *
* Expands all the children recursively starting from an item. Operation
* succeeds only if all expandable items are expanded.
- *
+ *
* @param startItemId
* @return True iff the expand operation succeeded
*/
@@ -387,7 +387,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Collapses an item.
- *
+ *
* @param itemId
* the item id.
* @return True iff the collapse operation succeeded
@@ -409,10 +409,10 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Collapses the items recursively.
- *
+ *
* Collapse all the children recursively starting from an item. Operation
* succeeds only if all expandable items are collapsed.
- *
+ *
* @param startItemId
* @return True iff the collapse operation succeeded
*/
@@ -442,11 +442,11 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
* Returns the current selectable state. Selectable determines if the a node
* can be selected on the client side. Selectable does not affect
* {@link #setValue(Object)} or {@link #select(Object)}.
- *
+ *
* <p>
* The tree is selectable by default.
* </p>
- *
+ *
* @return the current selectable state.
*/
public boolean isSelectable() {
@@ -457,11 +457,11 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
* Sets the selectable state. Selectable determines if the a node can be
* selected on the client side. Selectable does not affect
* {@link #setValue(Object)} or {@link #select(Object)}.
- *
+ *
* <p>
* The tree is selectable by default.
* </p>
- *
+ *
* @param selectable
* The new selectable state.
*/
@@ -474,7 +474,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Sets the behavior of the multiselect mode
- *
+ *
* @param mode
* The mode to set
*/
@@ -488,7 +488,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Returns the mode the multiselect is in. The mode controls how
* multiselection can be done.
- *
+ *
* @return The mode
*/
public MultiSelectMode getMultiselectMode() {
@@ -499,7 +499,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.AbstractSelect#changeVariables(java.lang.Object,
* java.util.Map)
*/
@@ -586,7 +586,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Handles the selection
- *
+ *
* @param variables
* The variables sent to the server from the client
*/
@@ -617,7 +617,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Paints any needed component-specific things to the given UIDL stream.
- *
+ *
* @see com.vaadin.ui.AbstractComponent#paintContent(PaintTarget)
*/
@Override
@@ -637,8 +637,8 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
// Paint tree attributes
if (isSelectable()) {
- target.addAttribute("selectmode", (isMultiSelect() ? "multi"
- : "single"));
+ target.addAttribute("selectmode",
+ (isMultiSelect() ? "multi" : "single"));
if (isMultiSelect()) {
target.addAttribute("multiselectmode",
multiSelectMode.toString());
@@ -737,8 +737,8 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
}
if (itemStyleGenerator != null) {
- String stylename = itemStyleGenerator
- .getStyle(this, itemId);
+ String stylename = itemStyleGenerator.getStyle(this,
+ itemId);
if (stylename != null) {
target.addAttribute(TreeConstants.ATTRIBUTE_NODE_STYLE,
stylename);
@@ -856,7 +856,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Tests if the Item with given ID can have any children.
- *
+ *
* @see com.vaadin.data.Container.Hierarchical#areChildrenAllowed(Object)
*/
@Override
@@ -866,7 +866,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Gets the IDs of all Items that are children of the specified Item.
- *
+ *
* @see com.vaadin.data.Container.Hierarchical#getChildren(Object)
*/
@Override
@@ -876,7 +876,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Gets the ID of the parent Item of the specified Item.
- *
+ *
* @see com.vaadin.data.Container.Hierarchical#getParent(Object)
*/
@Override
@@ -886,7 +886,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Tests if the Item specified with <code>itemId</code> has child Items.
- *
+ *
* @see com.vaadin.data.Container.Hierarchical#hasChildren(Object)
*/
@Override
@@ -896,7 +896,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Tests if the Item specified with <code>itemId</code> is a root Item.
- *
+ *
* @see com.vaadin.data.Container.Hierarchical#isRoot(Object)
*/
@Override
@@ -906,7 +906,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Gets the IDs of all Items in the container that don't have a parent.
- *
+ *
* @see com.vaadin.data.Container.Hierarchical#rootItemIds()
*/
@Override
@@ -916,12 +916,13 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Sets the given Item's capability to have children.
- *
+ *
* @see com.vaadin.data.Container.Hierarchical#setChildrenAllowed(Object,
* boolean)
*/
@Override
- public boolean setChildrenAllowed(Object itemId, boolean areChildrenAllowed) {
+ public boolean setChildrenAllowed(Object itemId,
+ boolean areChildrenAllowed) {
final boolean success = ((Container.Hierarchical) items)
.setChildrenAllowed(itemId, areChildrenAllowed);
if (success) {
@@ -932,14 +933,14 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.data.Container.Hierarchical#setParent(java.lang.Object ,
* java.lang.Object)
*/
@Override
public boolean setParent(Object itemId, Object newParentId) {
- final boolean success = ((Container.Hierarchical) items).setParent(
- itemId, newParentId);
+ final boolean success = ((Container.Hierarchical) items)
+ .setParent(itemId, newParentId);
if (success) {
markAsDirty();
}
@@ -950,7 +951,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Sets the Container that serves as the data source of the viewer.
- *
+ *
* @see com.vaadin.data.Container.Viewer#setContainerDataSource(Container)
*/
@Override
@@ -961,12 +962,12 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
// Assure that the data source is ordered by making unordered
// containers ordered by wrapping them
- if (Container.Hierarchical.class.isAssignableFrom(newDataSource
- .getClass())) {
+ if (Container.Hierarchical.class
+ .isAssignableFrom(newDataSource.getClass())) {
super.setContainerDataSource(newDataSource);
} else {
- super.setContainerDataSource(new ContainerHierarchicalWrapper(
- newDataSource));
+ super.setContainerDataSource(
+ new ContainerHierarchicalWrapper(newDataSource));
}
/*
@@ -998,7 +999,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
* by either adding or removing items to the container. To
* prevent a memory leak we should cleanup the expanded list
* from items which was removed.
- *
+ *
* However, there will still be a leak if the container is
* filtered to show only a subset of the items in the tree and
* later unfiltered items are removed from the container. In
@@ -1022,7 +1023,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
* Event to fired when a node is expanded. ExapandEvent is fired when a node
* is to be expanded. it can me used to dynamically fill the sub-nodes of
* the node.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -1032,7 +1033,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* New instance of options change event
- *
+ *
* @param source
* the Source of the event.
* @param expandedItemId
@@ -1044,7 +1045,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Node where the event occurred.
- *
+ *
* @return the Source of the event.
*/
public Object getItemId() {
@@ -1054,7 +1055,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Expand event listener.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -1065,7 +1066,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* A node has been expanded.
- *
+ *
* @param event
* the Expand event.
*/
@@ -1074,7 +1075,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Adds the expand listener.
- *
+ *
* @param listener
* the Listener to be added.
*/
@@ -1093,7 +1094,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Removes the expand listener.
- *
+ *
* @param listener
* the Listener to be removed.
*/
@@ -1113,7 +1114,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Emits the expand event.
- *
+ *
* @param itemId
* the item id.
*/
@@ -1125,7 +1126,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Collapse event
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -1135,7 +1136,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* New instance of options change event.
- *
+ *
* @param source
* the Source of the event.
* @param collapsedItemId
@@ -1147,7 +1148,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Gets tge Collapsed Item id.
- *
+ *
* @return the collapsed item id.
*/
public Object getItemId() {
@@ -1157,7 +1158,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Collapse event listener.
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -1168,7 +1169,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* A node has been collapsed.
- *
+ *
* @param event
* the Collapse event.
*/
@@ -1177,7 +1178,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Adds the collapse listener.
- *
+ *
* @param listener
* the Listener to be added.
*/
@@ -1197,7 +1198,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Removes the collapse listener.
- *
+ *
* @param listener
* the Listener to be removed.
*/
@@ -1217,7 +1218,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Emits collapse event.
- *
+ *
* @param itemId
* the item id.
*/
@@ -1229,7 +1230,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Adds an action handler.
- *
+ *
* @see com.vaadin.event.Action.Container#addActionHandler(Action.Handler)
*/
@Override
@@ -1251,7 +1252,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Removes an action handler.
- *
+ *
* @see com.vaadin.event.Action.Container#removeActionHandler(Action.Handler)
*/
@Override
@@ -1281,7 +1282,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Gets the visible item ids.
- *
+ *
* @see com.vaadin.ui.Select#getVisibleItemIds()
*/
@Override
@@ -1325,7 +1326,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Tree does not support <code>setNullSelectionItemId</code>.
- *
+ *
* @see com.vaadin.ui.AbstractSelect#setNullSelectionItemId(java.lang.Object)
*/
@Override
@@ -1339,7 +1340,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Adding new items is not supported.
- *
+ *
* @throws UnsupportedOperationException
* if set to true.
* @see com.vaadin.ui.Select#setNewItemsAllowed(boolean)
@@ -1392,7 +1393,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Sets the {@link ItemStyleGenerator} to be used with this tree.
- *
+ *
* @param itemStyleGenerator
* item style generator or null to remove generator
*/
@@ -1420,7 +1421,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Called by Tree when an item is painted.
- *
+ *
* @param source
* the source Tree
* @param itemId
@@ -1449,7 +1450,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* A {@link TargetDetails} implementation with Tree specific api.
- *
+ *
* @since 6.3
*/
public class TreeTargetDetails extends AbstractSelectTargetDetails {
@@ -1496,7 +1497,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
* ), this method returns the item id of the node after the drag was
* targeted. This method is useful when implementing drop into specific
* location (between specific nodes) in tree.
- *
+ *
* @return the id of the item after the user targets the drop or null if
* "target" is a first item in node list (or the first in root
* node list)
@@ -1533,7 +1534,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.event.dd.DropTarget#translateDropTargetDetails(java.util.Map)
*/
@@ -1545,7 +1546,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Helper API for {@link TreeDropCriterion}
- *
+ *
* @param itemId
* @return
*/
@@ -1556,7 +1557,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Sets the drag mode that controls how Tree behaves as a {@link DragSource}
* .
- *
+ *
* @param dragMode
*/
public void setDragMode(TreeDragMode dragMode) {
@@ -1567,7 +1568,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* @return the drag mode that controls how Tree behaves as a
* {@link DragSource}.
- *
+ *
* @see TreeDragMode
*/
public TreeDragMode getDragMode() {
@@ -1577,9 +1578,9 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Concrete implementation of {@link DataBoundTransferable} for data
* transferred from a tree.
- *
+ *
* @see {@link DataBoundTransferable}.
- *
+ *
* @since 6.3
*/
protected class TreeTransferable extends DataBoundTransferable {
@@ -1602,7 +1603,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.event.dd.DragSource#getTransferable(java.util.Map)
*/
@Override
@@ -1621,7 +1622,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
* Lazy loading accept criterion for Tree. Accepted target nodes are loaded
* from server once per drag and drop operation. Developer must override one
* method that decides accepted tree nodes for the whole Tree.
- *
+ *
* <p>
* Initially pretty much no data is sent to client. On first required
* criterion check (per drag request) the client side data structure is
@@ -1636,7 +1637,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.event.dd.acceptCriteria.ServerSideCriterion#getIdentifier
* ()
@@ -1648,7 +1649,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.event.dd.acceptCriteria.AcceptCriterion#accepts(com.vaadin
* .event.dd.DragAndDropEvent)
@@ -1665,7 +1666,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.event.dd.acceptCriteria.AcceptCriterion#paintResponse(
* com.vaadin.server.PaintTarget)
@@ -1695,9 +1696,9 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
* <p>
* Class is singleton, use {@link TargetItemAllowsChildren#get()} to get the
* instance.
- *
+ *
* @see Tree#setChildrenAllowed(Object, boolean)
- *
+ *
* @since 6.3
*/
public static class TargetItemAllowsChildren extends TargetDetailIs {
@@ -1729,7 +1730,8 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
return false;
}
// return true if directly over
- return eventDetails.getDropLocation() == VerticalDropLocation.MIDDLE;
+ return eventDetails
+ .getDropLocation() == VerticalDropLocation.MIDDLE;
} catch (Exception e) {
return false;
}
@@ -1753,7 +1755,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Constructs a criteria that accepts the drag if the targeted Item is a
* descendant of Item identified by given id
- *
+ *
* @param parentItemId
* the item identifier of the parent node
*/
@@ -1764,7 +1766,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Constructs a criteria that accepts drops within given level below the
* subtree root identified by given id.
- *
+ *
* @param rootId
* the item identifier to be sought for
* @param depthToCheck
@@ -1812,11 +1814,12 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Set the item description generator which generates tooltips for the tree
* items
- *
+ *
* @param generator
* The generator to use or null to disable
*/
- public void setItemDescriptionGenerator(ItemDescriptionGenerator generator) {
+ public void setItemDescriptionGenerator(
+ ItemDescriptionGenerator generator) {
if (generator != itemDescriptionGenerator) {
itemDescriptionGenerator = generator;
markAsDirty();
@@ -1847,7 +1850,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Reads an Item from a design and inserts it into the data source.
* Recursively handles any children of the item as well.
- *
+ *
* @since 7.5.0
* @param node
* an element representing the item (tree node).
@@ -1857,7 +1860,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
* @param context
* the DesignContext instance used in parsing
* @return the item id of the new item
- *
+ *
* @throws DesignException
* if the tag name of the {@code node} element is not
* {@code node}.
@@ -1891,7 +1894,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Recursively writes the root items and their children to a design.
- *
+ *
* @since 7.5.0
* @param design
* the element into which to insert the items
@@ -1907,7 +1910,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Recursively writes a data source Item and its children to a design.
- *
+ *
* @since 7.5.0
* @param design
* the element into which to insert the item
@@ -1951,7 +1954,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
* developer is responsible for ensuring no harmful html is used. If set to
* <code>false</code>, the content is passed to the browser as plain text.
* The default setting is <code>false</code>
- *
+ *
* @since 7.6
* @param htmlContentAllowed
* <code>true</code> if the captions are used as html,
@@ -1964,7 +1967,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
/**
* Checks whether captions are interpreted as html or plain text.
- *
+ *
* @since 7.6
* @return <code>true</code> if the captions are displayed as html,
* <code>false</code> if displayed as plain text
diff --git a/server/src/main/java/com/vaadin/ui/TreeTable.java b/server/src/main/java/com/vaadin/ui/TreeTable.java
index bf38148aa9..e36f672988 100644
--- a/server/src/main/java/com/vaadin/ui/TreeTable.java
+++ b/server/src/main/java/com/vaadin/ui/TreeTable.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -123,7 +123,7 @@ public class TreeTable extends Table implements Hierarchical {
/**
* This strategy is used if current container implements {@link Collapsible}
* .
- *
+ *
* open-collapsed logic diverted to container, otherwise use default
* implementations.
*/
@@ -190,7 +190,7 @@ public class TreeTable extends Table implements Hierarchical {
/**
* Strategy for Hierarchical but not Collapsible container like
* {@link HierarchicalContainer}.
- *
+ *
* Store collapsed/open states internally, fool Table to use preorder when
* accessing items from container via Ordered/Indexed methods.
*/
@@ -278,7 +278,7 @@ public class TreeTable extends Table implements Hierarchical {
/**
* Preorder of ids currently visible
- *
+ *
* @return
*/
private List<Object> getPreOrder() {
@@ -296,8 +296,8 @@ public class TreeTable extends Table implements Hierarchical {
private void addVisibleChildTree(Object id) {
if (isNodeOpen(id)) {
- Collection<?> children = getContainerDataSource().getChildren(
- id);
+ Collection<?> children = getContainerDataSource()
+ .getChildren(id);
if (children != null) {
for (Object childId : children) {
preOrder.add(childId);
@@ -336,7 +336,7 @@ public class TreeTable extends Table implements Hierarchical {
/**
* Creates an empty TreeTable with a default container.
- *
+ *
* @param caption
* the caption for the TreeTable
*/
@@ -347,7 +347,7 @@ public class TreeTable extends Table implements Hierarchical {
/**
* Creates a TreeTable instance with given captions and data source.
- *
+ *
* @param caption
* the caption for the component
* @param dataSource
@@ -365,7 +365,7 @@ public class TreeTable extends Table implements Hierarchical {
* The item id that was expanded or collapsed during this request. Reset at
* the end of paint and only used for determining if a partial or full paint
* should be done.
- *
+ *
* Can safely be reset to null whenever a change occurs that would prevent a
* partial update from rendering the correct result, e.g. rows added or
* removed during an expand operation.
@@ -408,7 +408,8 @@ public class TreeTable extends Table implements Hierarchical {
int indexInRowbuffer) throws PaintException {
// always paint if present (in parent only if row headers visible)
if (getRowHeaderMode() == ROW_HEADER_MODE_HIDDEN) {
- Resource itemIcon = getItemIcon(cells[CELL_ITEMID][indexInRowbuffer]);
+ Resource itemIcon = getItemIcon(
+ cells[CELL_ITEMID][indexInRowbuffer]);
if (itemIcon != null) {
target.addAttribute("icon", itemIcon);
}
@@ -531,7 +532,8 @@ public class TreeTable extends Table implements Hierarchical {
@Override
protected int getAddedRowCount() {
- return countSubNodesRecursively(getContainerDataSource(), toggledItemId);
+ return countSubNodesRecursively(getContainerDataSource(),
+ toggledItemId);
}
private int countSubNodesRecursively(Hierarchical hc, Object itemId) {
@@ -567,7 +569,8 @@ public class TreeTable extends Table implements Hierarchical {
return !getContainerStrategy().isNodeOpen(toggledItemId);
}
- private void toggleChildVisibility(Object itemId, boolean forceFullRefresh) {
+ private void toggleChildVisibility(Object itemId,
+ boolean forceFullRefresh) {
getContainerStrategy().toggleChildVisibility(itemId);
// ensure that page still has first item in page, DON'T clear the
// caches.
@@ -604,7 +607,8 @@ public class TreeTable extends Table implements Hierarchical {
// FIXME: This disables partial updates until TreeTable is fixed so it
// does not change component hierarchy during paint
- containerSupportsPartialUpdates = (newDataSource instanceof ItemSetChangeNotifier) && false;
+ containerSupportsPartialUpdates = (newDataSource instanceof ItemSetChangeNotifier)
+ && false;
if (newDataSource != null && !(newDataSource instanceof Hierarchical)) {
newDataSource = new ContainerHierarchicalWrapper(newDataSource);
@@ -709,7 +713,7 @@ public class TreeTable extends Table implements Hierarchical {
/**
* Sets the Item specified by given identifier as collapsed or expanded. If
* the Item is collapsed, its children are not displayed to the user.
- *
+ *
* @param itemId
* the identifier of the Item
* @param collapsed
@@ -734,9 +738,9 @@ public class TreeTable extends Table implements Hierarchical {
/**
* Checks if Item with given identifier is collapsed in the UI.
- *
+ *
* <p>
- *
+ *
* @param itemId
* the identifier of the checked Item
* @return true if the Item with given id is collapsed
@@ -750,7 +754,7 @@ public class TreeTable extends Table implements Hierarchical {
* Explicitly sets the column in which the TreeTable visualizes the
* hierarchy. If hierarchyColumnId is not set, the hierarchy is visualized
* in the first visible column.
- *
+ *
* @param hierarchyColumnId
*/
public void setHierarchyColumn(Object hierarchyColumnId) {
@@ -767,7 +771,7 @@ public class TreeTable extends Table implements Hierarchical {
/**
* Adds an expand listener.
- *
+ *
* @param listener
* the Listener to be added.
*/
@@ -786,7 +790,7 @@ public class TreeTable extends Table implements Hierarchical {
/**
* Removes an expand listener.
- *
+ *
* @param listener
* the Listener to be removed.
*/
@@ -806,7 +810,7 @@ public class TreeTable extends Table implements Hierarchical {
/**
* Emits an expand event.
- *
+ *
* @param itemId
* the item id.
*/
@@ -816,7 +820,7 @@ public class TreeTable extends Table implements Hierarchical {
/**
* Adds a collapse listener.
- *
+ *
* @param listener
* the Listener to be added.
*/
@@ -836,7 +840,7 @@ public class TreeTable extends Table implements Hierarchical {
/**
* Removes a collapse listener.
- *
+ *
* @param listener
* the Listener to be removed.
*/
@@ -856,7 +860,7 @@ public class TreeTable extends Table implements Hierarchical {
/**
* Emits a collapse event.
- *
+ *
* @param itemId
* the item id.
*/
@@ -875,7 +879,7 @@ public class TreeTable extends Table implements Hierarchical {
* Animations can be enabled by passing true to this method. Currently
* expanding rows slide in from the top and collapsing rows slide out the
* same way. NOTE! not supported in Internet Explorer 6 or 7.
- *
+ *
* @param animationsEnabled
* true or false whether to enable animations or not.
*/
@@ -935,8 +939,8 @@ public class TreeTable extends Table implements Hierarchical {
Object itemId = super.readItem(tr, selected, context);
if (tr.hasAttr("collapsed")) {
- boolean collapsed = DesignAttributeHandler.readAttribute(
- "collapsed", tr.attributes(), boolean.class);
+ boolean collapsed = DesignAttributeHandler
+ .readAttribute("collapsed", tr.attributes(), boolean.class);
setCollapsed(itemId, collapsed);
}
diff --git a/server/src/main/java/com/vaadin/ui/TwinColSelect.java b/server/src/main/java/com/vaadin/ui/TwinColSelect.java
index 8086220c94..a7f86ad037 100644
--- a/server/src/main/java/com/vaadin/ui/TwinColSelect.java
+++ b/server/src/main/java/com/vaadin/ui/TwinColSelect.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -38,7 +38,7 @@ public class TwinColSelect extends AbstractSelect {
private String rightColumnCaption;
/**
- *
+ *
*/
public TwinColSelect() {
super();
@@ -69,7 +69,7 @@ public class TwinColSelect extends AbstractSelect {
* Calling {@code setColumns(10);} is roughly equivalent to calling
* {@code setWidth((10*2+4)+"10em");}
* </p>
- *
+ *
* @deprecated As of 7.0. "Columns" does not reflect the exact number of
* characters that will be displayed. It is better to use
* setWidth together with "em" to control the width of the
@@ -90,7 +90,7 @@ public class TwinColSelect extends AbstractSelect {
/**
* Gets the number of columns for the component.
- *
+ *
* @see #setColumns(int)
* @deprecated As of 7.0. "Columns" does not reflect the exact number of
* characters that will be displayed. It is better to use
@@ -115,8 +115,8 @@ public class TwinColSelect extends AbstractSelect {
* {@link #setHeight(float, int)}) it overrides the number of rows. Leave
* the height undefined to use this method. This is the opposite of how
* {@link #setColumns(int)} work.
- *
- *
+ *
+ *
* @param rows
* the number of rows to set.
*/
@@ -168,7 +168,7 @@ public class TwinColSelect extends AbstractSelect {
/**
* Sets the text shown above the right column.
- *
+ *
* @param caption
* The text to show
*/
@@ -179,7 +179,7 @@ public class TwinColSelect extends AbstractSelect {
/**
* Returns the text shown above the right column.
- *
+ *
* @return The text shown or null if not set.
*/
public String getRightColumnCaption() {
@@ -188,7 +188,7 @@ public class TwinColSelect extends AbstractSelect {
/**
* Sets the text shown above the left column.
- *
+ *
* @param caption
* The text to show
*/
@@ -199,7 +199,7 @@ public class TwinColSelect extends AbstractSelect {
/**
* Returns the text shown above the left column.
- *
+ *
* @return The text shown or null if not set.
*/
public String getLeftColumnCaption() {
diff --git a/server/src/main/java/com/vaadin/ui/UI.java b/server/src/main/java/com/vaadin/ui/UI.java
index 0a0cd46816..fcae3c7b2e 100644
--- a/server/src/main/java/com/vaadin/ui/UI.java
+++ b/server/src/main/java/com/vaadin/ui/UI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -98,15 +98,15 @@ import com.vaadin.util.CurrentInstance;
* passing a {@link Component} with the main layout or other content of the view
* to {@link #setContent(Component)} or to the constructor of the UI.
* </p>
- *
+ *
* @see #init(VaadinRequest)
* @see UIProvider
- *
+ *
* @since 7.0
*/
-public abstract class UI extends AbstractSingleComponentContainer implements
- Action.Container, Action.Notifier, PollNotifier, LegacyComponent,
- Focusable {
+public abstract class UI extends AbstractSingleComponentContainer
+ implements Action.Container, Action.Notifier, PollNotifier,
+ LegacyComponent, Focusable {
/**
* The application to which this UI belongs
@@ -128,7 +128,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
* The id of this UI, used to find the server side instance of the UI form
* which a request originates. A negative value indicates that the UI id has
* not yet been assigned by the Application.
- *
+ *
* @see VaadinSession#getNextUIid()
*/
private int uiId = -1;
@@ -214,16 +214,15 @@ public abstract class UI extends AbstractSingleComponentContainer implements
}
}
json.append("]}");
- getRpcProxy(DebugWindowClientRpc.class).reportLayoutProblems(
- json.toString());
+ getRpcProxy(DebugWindowClientRpc.class)
+ .reportLayoutProblems(json.toString());
}
@Override
public void showServerDesign(Connector connector) {
if (!(connector instanceof Component)) {
- getLogger().severe(
- "Tried to output declarative design for " + connector
- + ", which is not a component");
+ getLogger().severe("Tried to output declarative design for "
+ + connector + ", which is not a component");
return;
}
if (connector instanceof UI) {
@@ -234,10 +233,9 @@ public abstract class UI extends AbstractSingleComponentContainer implements
ByteArrayOutputStream baos = new ByteArrayOutputStream();
try {
Design.write((Component) connector, baos);
- getLogger().info(
- "Design for " + connector
- + " requested from debug window:\n"
- + baos.toString("UTF-8"));
+ getLogger().info("Design for " + connector
+ + " requested from debug window:\n"
+ + baos.toString("UTF-8"));
} catch (IOException e) {
getLogger().log(Level.WARNING,
"Error producing design for " + connector, e);
@@ -282,10 +280,10 @@ public abstract class UI extends AbstractSingleComponentContainer implements
/**
* Creates a new UI with the given component (often a layout) as its
* content.
- *
+ *
* @param content
* the component to use as this UIs content.
- *
+ *
* @see #setContent(Component)
*/
public UI(Component content) {
@@ -314,9 +312,9 @@ public abstract class UI extends AbstractSingleComponentContainer implements
/**
* Overridden to return a value instead of referring to the parent.
- *
+ *
* @return this UI
- *
+ *
* @see com.vaadin.ui.AbstractComponent#getUI()
*/
@Override
@@ -326,12 +324,12 @@ public abstract class UI extends AbstractSingleComponentContainer implements
/**
* Gets the application object to which the component is attached.
- *
+ *
* <p>
* The method will return {@code null} if the component is not currently
* attached to an application.
* </p>
- *
+ *
* <p>
* Getting a null value is often a problem in constructors of regular
* components and in the initializers of custom composite components. A
@@ -340,7 +338,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
* Another way is to move the problematic initialization to
* {@link #attach()}, as described in the documentation of the method.
* </p>
- *
+ *
* @return the parent application of the component or <code>null</code>.
* @see #attach()
*/
@@ -360,9 +358,8 @@ public abstract class UI extends AbstractSingleComponentContainer implements
if (pendingFocus != null) {
// ensure focused component is still attached to this main window
- if (equals(pendingFocus.getUI())
- || (pendingFocus.getUI() != null && equals(pendingFocus
- .getUI().getParent()))) {
+ if (equals(pendingFocus.getUI()) || (pendingFocus.getUI() != null
+ && equals(pendingFocus.getUI().getParent()))) {
target.addAttribute("focused", pendingFocus);
}
pendingFocus = null;
@@ -379,7 +376,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
/**
* Fire a click event to all click listeners.
- *
+ *
* @param object
* The raw "value" of the variable change from the client side.
*/
@@ -411,7 +408,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.HasComponents#iterator()
*/
@Override
@@ -431,7 +428,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.ComponentContainer#getComponentCount()
*/
@Override
@@ -445,13 +442,13 @@ public abstract class UI extends AbstractSingleComponentContainer implements
* This method is for internal use by the framework. To explicitly close a
* UI, see {@link #close()}.
* </p>
- *
+ *
* @param session
* the session to set
- *
+ *
* @throws IllegalStateException
* if the session has already been set
- *
+ *
* @see #getSession()
*/
public void setSession(VaadinSession session) {
@@ -504,7 +501,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
* This method is not intended to be overridden. If it is overridden, care
* should be taken since this method might be called in situations where
* {@link UI#getCurrent()} does not return this UI.
- *
+ *
* @return the id of this UI
*/
public int getUIId() {
@@ -514,15 +511,15 @@ public abstract class UI extends AbstractSingleComponentContainer implements
/**
* Adds a window as a subwindow inside this UI. To open a new browser window
* or tab, you should instead use a {@link UIProvider}.
- *
+ *
* @param window
* @throws IllegalArgumentException
* if the window is already added to an application
* @throws NullPointerException
* if the given <code>Window</code> is <code>null</code>.
*/
- public void addWindow(Window window) throws IllegalArgumentException,
- NullPointerException {
+ public void addWindow(Window window)
+ throws IllegalArgumentException, NullPointerException {
if (window == null) {
throw new NullPointerException("Argument must not be null");
@@ -538,7 +535,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
/**
* Helper method to attach a window.
- *
+ *
* @param w
* the window to add
*/
@@ -551,13 +548,13 @@ public abstract class UI extends AbstractSingleComponentContainer implements
/**
* Remove the given subwindow from this UI.
- *
+ *
* Since Vaadin 6.5, {@link Window.CloseListener}s are called also when
* explicitly removing a window by calling this method.
- *
+ *
* Since Vaadin 6.5, returns a boolean indicating if the window was removed
* or not.
- *
+ *
* @param window
* Window to be removed.
* @return true if the subwindow was removed, false otherwise
@@ -577,7 +574,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
/**
* Gets all the windows added to this UI.
- *
+ *
* @return an unmodifiable collection of windows
*/
public Collection<Window> getWindows() {
@@ -612,10 +609,10 @@ public abstract class UI extends AbstractSingleComponentContainer implements
* Component.Focusable) due we want the last focused component to be focused
* in client too. Not the one that is rendered last (the case we'd get if
* implemented in Focusable only).
- *
+ *
* To focus component from Vaadin application, use Focusable.focus(). See
* {@link Focusable}.
- *
+ *
* @param focusable
* to be focused on next paint
*/
@@ -628,7 +625,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
* Scrolls any component between the component and UI to a suitable position
* so the component is visible to the user. The given component must belong
* to this UI.
- *
+ *
* @param component
* the component to be scrolled into view
* @throws IllegalArgumentException
@@ -648,7 +645,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
* Internal initialization method, should not be overridden. This method is
* not declared as final because that would break compatibility with e.g.
* CDI.
- *
+ *
* @param request
* the initialization request
* @param uiId
@@ -656,7 +653,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
* @param embedId
* the embed id of this UI, or <code>null</code> if no id is
* known
- *
+ *
* @see #getUIId()
* @see #getEmbedId()
*/
@@ -702,7 +699,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
* The {@link VaadinRequest} can be used to get information about the
* request that caused this UI to be created.
* </p>
- *
+ *
* @param request
* the Vaadin request that caused this UI to be created
*/
@@ -710,7 +707,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
/**
* Internal reinitialization method, should not be overridden.
- *
+ *
* @since 7.2
* @param request
* the request that caused this UI to be reloaded
@@ -754,7 +751,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
* <p>
* The {@link VaadinRequest} can be used to get information about the
* request that caused this UI to be reloaded.
- *
+ *
* @since 7.2
* @param request
* the request that caused this UI to be reloaded
@@ -773,10 +770,10 @@ public abstract class UI extends AbstractSingleComponentContainer implements
* <p>
* The UI is stored using a weak reference to avoid leaking memory in case
* it is not explicitly cleared.
- *
+ *
* @param ui
* the UI to register as the current UI
- *
+ *
* @see #getCurrent()
* @see ThreadLocal
*/
@@ -791,9 +788,9 @@ public abstract class UI extends AbstractSingleComponentContainer implements
* <p>
* The UI is stored using a weak reference to avoid leaking memory in case
* it is not explicitly cleared.
- *
+ *
* @return the current UI instance if available, otherwise <code>null</code>
- *
+ *
* @see #setCurrent(UI)
*/
public static UI getCurrent() {
@@ -802,7 +799,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
/**
* Set top offset to which the UI should scroll to.
- *
+ *
* @param scrollTop
*/
public void setScrollTop(int scrollTop) {
@@ -822,7 +819,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
/**
* Set left offset to which the UI should scroll to.
- *
+ *
* @param scrollLeft
*/
public void setScrollLeft(int scrollLeft) {
@@ -886,7 +883,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
* When there are active window resize listeners, lazy resize mode should be
* used to avoid a large number of events during resize.
* </p>
- *
+ *
* @param resizeLazy
* true to use a delay before recalculating sizes, false to
* calculate immediately.
@@ -898,7 +895,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
/**
* Checks whether lazy resize is enabled.
- *
+ *
* @return <code>true</code> if lazy resize is enabled, <code>false</code>
* if lazy resize is not enabled
*/
@@ -911,9 +908,9 @@ public abstract class UI extends AbstractSingleComponentContainer implements
* clicks inside the UI. Also when the click targets a component inside the
* UI, provided the targeted component does not prevent the click event from
* propagating.
- *
+ *
* Use {@link #removeListener(ClickListener)} to remove the listener.
- *
+ *
* @param listener
* The listener to add
*/
@@ -934,7 +931,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
/**
* Remove a click listener from the UI. The listener should earlier have
* been added using {@link #addListener(ClickListener)}.
- *
+ *
* @param listener
* The listener to remove
*/
@@ -969,7 +966,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
/**
* Returns the navigator attached to this UI or null if there is no
* navigator.
- *
+ *
* @return
*/
public Navigator getNavigator() {
@@ -978,7 +975,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
/**
* For internal use only.
- *
+ *
* @param navigator
*/
public void setNavigator(Navigator navigator) {
@@ -988,7 +985,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
/**
* Setting the caption of a UI is not supported. To set the title of the
* HTML page, use Page.setTitle
- *
+ *
* @deprecated As of 7.0, use {@link Page#setTitle(String)}
*/
@Override
@@ -1001,16 +998,16 @@ public abstract class UI extends AbstractSingleComponentContainer implements
/**
* Shows a notification message on the middle of the UI. The message
* automatically disappears ("humanized message").
- *
+ *
* Care should be taken to to avoid XSS vulnerabilities as the caption is
* rendered as html.
- *
+ *
* @see #showNotification(Notification)
* @see Notification
- *
+ *
* @param caption
* The message
- *
+ *
* @deprecated As of 7.0, use Notification.show instead but be aware that
* Notification.show does not allow HTML.
*/
@@ -1025,18 +1022,18 @@ public abstract class UI extends AbstractSingleComponentContainer implements
* Shows a notification message the UI. The position and behavior of the
* message depends on the type, which is one of the basic types defined in
* {@link Notification}, for instance Notification.TYPE_WARNING_MESSAGE.
- *
+ *
* Care should be taken to to avoid XSS vulnerabilities as the caption is
* rendered as html.
- *
+ *
* @see #showNotification(Notification)
* @see Notification
- *
+ *
* @param caption
* The message
* @param type
* The message type
- *
+ *
* @deprecated As of 7.0, use Notification.show instead but be aware that
* Notification.show does not allow HTML.
*/
@@ -1051,18 +1048,18 @@ public abstract class UI extends AbstractSingleComponentContainer implements
* Shows a notification consisting of a bigger caption and a smaller
* description on the middle of the UI. The message automatically disappears
* ("humanized message").
- *
+ *
* Care should be taken to to avoid XSS vulnerabilities as the caption and
* description are rendered as html.
- *
+ *
* @see #showNotification(Notification)
* @see Notification
- *
+ *
* @param caption
* The caption of the message
* @param description
* The message description
- *
+ *
* @deprecated As of 7.0, use new Notification(...).show(Page) instead but
* be aware that HTML by default not allowed.
*/
@@ -1078,27 +1075,28 @@ public abstract class UI extends AbstractSingleComponentContainer implements
* description. The position and behavior of the message depends on the
* type, which is one of the basic types defined in {@link Notification} ,
* for instance Notification.TYPE_WARNING_MESSAGE.
- *
+ *
* Care should be taken to to avoid XSS vulnerabilities as the caption and
* description are rendered as html.
- *
+ *
* @see #showNotification(Notification)
* @see Notification
- *
+ *
* @param caption
* The caption of the message
* @param description
* The message description
* @param type
* The message type
- *
+ *
* @deprecated As of 7.0, use new Notification(...).show(Page) instead but
* be aware that HTML by default not allowed.
*/
@Deprecated
public void showNotification(String caption, String description,
Notification.Type type) {
- Notification notification = new Notification(caption, description, type);
+ Notification notification = new Notification(caption, description,
+ type);
notification.setHtmlContentAllowed(true);// Backwards compatibility
getPage().showNotification(notification);
}
@@ -1108,13 +1106,13 @@ public abstract class UI extends AbstractSingleComponentContainer implements
* description. The position and behavior of the message depends on the
* type, which is one of the basic types defined in {@link Notification} ,
* for instance Notification.TYPE_WARNING_MESSAGE.
- *
+ *
* Care should be taken to avoid XSS vulnerabilities if html content is
* allowed.
- *
+ *
* @see #showNotification(Notification)
* @see Notification
- *
+ *
* @param caption
* The message caption
* @param description
@@ -1124,30 +1122,28 @@ public abstract class UI extends AbstractSingleComponentContainer implements
* @param htmlContentAllowed
* Whether html in the caption and description should be
* displayed as html or as plain text
- *
+ *
* @deprecated As of 7.0, use new Notification(...).show(Page).
*/
@Deprecated
public void showNotification(String caption, String description,
Notification.Type type, boolean htmlContentAllowed) {
- getPage()
- .showNotification(
- new Notification(caption, description, type,
- htmlContentAllowed));
+ getPage().showNotification(new Notification(caption, description, type,
+ htmlContentAllowed));
}
/**
* Shows a notification message.
- *
+ *
* @see Notification
* @see #showNotification(String)
* @see #showNotification(String, int)
* @see #showNotification(String, String)
* @see #showNotification(String, String, int)
- *
+ *
* @param notification
* The notification message to show
- *
+ *
* @deprecated As of 7.0, use Notification.show instead
*/
@Deprecated
@@ -1161,9 +1157,9 @@ public abstract class UI extends AbstractSingleComponentContainer implements
* This method is not intended to be overridden. If it is overridden, care
* should be taken since this method might be called in situations where
* {@link UI#getCurrent()} does not return this UI.
- *
+ *
* @see VaadinService#closeInactiveUIs(VaadinSession)
- *
+ *
* @return The time the last heartbeat request occurred, in milliseconds
* since the epoch.
*/
@@ -1179,7 +1175,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
* This method is not intended to be overridden. If it is overridden, care
* should be taken since this method might be called in situations where
* {@link UI#getCurrent()} does not return this UI.
- *
+ *
* @param lastHeartbeat
* The time the last heartbeat request occurred, in milliseconds
* since the epoch.
@@ -1190,7 +1186,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
/**
* Gets the theme currently in use by this UI
- *
+ *
* @return the theme name
*/
public String getTheme() {
@@ -1207,7 +1203,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
* other environment where there are multiple UIs on the same page. The old
* CSS file will be removed even if there are other UIs on the page which
* are still using it.
- *
+ *
* @since 7.3
* @param theme
* The new theme name
@@ -1240,7 +1236,8 @@ public abstract class UI extends AbstractSingleComponentContainer implements
public void close() {
closing = true;
- boolean sessionExpired = (session == null || session.getState() != State.OPEN);
+ boolean sessionExpired = (session == null
+ || session.getState() != State.OPEN);
getRpcProxy(UIClientRpc.class).uiClosed(sessionExpired);
if (getPushConnection() != null) {
// Push the Rpc to the client. The connection will be closed when
@@ -1261,9 +1258,9 @@ public abstract class UI extends AbstractSingleComponentContainer implements
* This method is not intended to be overridden. If it is overridden, care
* should be taken since this method might be called in situations where
* {@link UI#getCurrent()} does not return this UI.
- *
+ *
* @see #close()
- *
+ *
* @return whether this UI is closing.
*/
public boolean isClosing() {
@@ -1274,7 +1271,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
* Called after the UI is added to the session. A UI instance is attached
* exactly once, before its {@link #init(VaadinRequest) init} method is
* called.
- *
+ *
* @see Component#attach
*/
@Override
@@ -1303,7 +1300,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.ui.AbstractSingleComponentContainer#setContent(com.vaadin.
* ui.Component)
@@ -1349,9 +1346,9 @@ public abstract class UI extends AbstractSingleComponentContainer implements
* later point in time.</li>
* </ul>
* </p>
- *
+ *
* @since 7.1
- *
+ *
* @param runnable
* the runnable which accesses the UI
* @throws UIDetachedException
@@ -1359,7 +1356,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
* therefore not be done)
* @throws IllegalStateException
* if the current thread holds the lock for another session
- *
+ *
* @see #access(Runnable)
* @see VaadinSession#accessSynchronously(Runnable)
*/
@@ -1423,14 +1420,14 @@ public abstract class UI extends AbstractSingleComponentContainer implements
* The returned future can be used to check for task completion and to
* cancel the task.
* </p>
- *
+ *
* @see #getCurrent()
* @see #accessSynchronously(Runnable)
* @see VaadinSession#access(Runnable)
* @see VaadinSession#lock()
- *
+ *
* @since 7.1
- *
+ *
* @param runnable
* the runnable which accesses the UI
* @throws UIDetachedException
@@ -1481,7 +1478,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
/**
* Retrieves the object used for configuring tooltips.
- *
+ *
* @return The instance used for tooltip configuration
*/
public TooltipConfiguration getTooltipConfiguration() {
@@ -1490,7 +1487,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
/**
* Retrieves the object used for configuring notifications.
- *
+ *
* @return The instance used for notification configuration
*/
public NotificationConfiguration getNotificationConfiguration() {
@@ -1499,7 +1496,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
/**
* Retrieves the object used for configuring the loading indicator.
- *
+ *
* @return The instance used for configuring the loading indicator
*/
public LoadingIndicatorConfiguration getLoadingIndicatorConfiguration() {
@@ -1518,14 +1515,14 @@ public abstract class UI extends AbstractSingleComponentContainer implements
* return this UI since writing the response may invoke logic in any
* attached component or extension. The recommended way of fulfilling these
* conditions is to use {@link #access(Runnable)}.
- *
+ *
* @throws IllegalStateException
* if push is disabled.
* @throws UIDetachedException
* if this UI is not attached to a session.
- *
+ *
* @see #getPushConfiguration()
- *
+ *
* @since 7.1
*/
public void push() {
@@ -1563,12 +1560,13 @@ public abstract class UI extends AbstractSingleComponentContainer implements
* This method is not intended to be overridden. If it is overridden, care
* should be taken since this method might be called in situations where
* {@link UI#getCurrent()} does not return this UI.
- *
+ *
* @return the push connection used by this UI, or {@code null} if push is
* not available.
*/
public PushConnection getPushConnection() {
- assert !(getPushConfiguration().getPushMode().isEnabled() && pushConnection == null);
+ assert !(getPushConfiguration().getPushMode().isEnabled()
+ && pushConnection == null);
return pushConnection;
}
@@ -1578,7 +1576,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
* <p>
* The {@code pushConnection} argument must be non-null if and only if
* {@code getPushConfiguration().getPushMode().isEnabled()}.
- *
+ *
* @param pushConnection
* the push connection to use for this UI
*/
@@ -1611,7 +1609,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
* application developer. An add-on should not set the poll interval
* directly, rather instruct the user to set it.
* </p>
- *
+ *
* @param intervalInMillis
* The interval (in ms) with which the UI should poll the server
* or -1 to disable polling
@@ -1622,7 +1620,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
/**
* Returns the interval with which the UI polls the server.
- *
+ *
* @return The interval (in ms) with which the UI polls the server or -1 if
* polling is disabled
*/
@@ -1643,7 +1641,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
/**
* Retrieves the object used for configuring the push channel.
- *
+ *
* @since 7.1
* @return The instance used for push configuration
*/
@@ -1653,7 +1651,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
/**
* Retrieves the object used for configuring the reconnect dialog.
- *
+ *
* @since 7.6
* @return The instance used for reconnect dialog configuration
*/
@@ -1664,7 +1662,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
/**
* Get the label that is added to the container element, where tooltip,
* notification and dialogs are added to.
- *
+ *
* @return the label of the container
*/
public String getOverlayContainerLabel() {
@@ -1678,7 +1676,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
* This is helpful for users of assistive devices, as this element is
* reachable for them.
* </p>
- *
+ *
* @param overlayContainerLabel
* label to use for the container
*/
@@ -1689,7 +1687,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
/**
* Returns the locale service which handles transmission of Locale data to
* the client.
- *
+ *
* @since 7.1
* @return The LocaleService for this UI
*/
@@ -1706,7 +1704,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
* it is embedded. The embed identifier is based on the
* <code>window.name</code> DOM attribute of the browser window where the UI
* is displayed and the id of the div element where the UI is embedded.
- *
+ *
* @since 7.2
* @return the embed id for this UI, or <code>null</code> if no id known
*/
@@ -1716,9 +1714,9 @@ public abstract class UI extends AbstractSingleComponentContainer implements
/**
* Gets the last processed server message id.
- *
+ *
* Used internally for communication tracking.
- *
+ *
* @return lastProcessedServerMessageId the id of the last processed server
* message
* @since 7.6
@@ -1729,9 +1727,9 @@ public abstract class UI extends AbstractSingleComponentContainer implements
/**
* Sets the last processed server message id.
- *
+ *
* Used internally for communication tracking.
- *
+ *
* @param lastProcessedServerMessageId
* the id of the last processed server message
* @since 7.6
diff --git a/server/src/main/java/com/vaadin/ui/UIDetachedException.java b/server/src/main/java/com/vaadin/ui/UIDetachedException.java
index 7cd7f0889e..4454f8279e 100644
--- a/server/src/main/java/com/vaadin/ui/UIDetachedException.java
+++ b/server/src/main/java/com/vaadin/ui/UIDetachedException.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -17,7 +17,7 @@ package com.vaadin.ui;
/**
* Exception thrown if the UI has been detached when it should not be.
- *
+ *
* @author Vaadin Ltd
* @since 7.1
*/
diff --git a/server/src/main/java/com/vaadin/ui/UniqueSerializable.java b/server/src/main/java/com/vaadin/ui/UniqueSerializable.java
index f5d68e8a71..8f5fc9c053 100644
--- a/server/src/main/java/com/vaadin/ui/UniqueSerializable.java
+++ b/server/src/main/java/com/vaadin/ui/UniqueSerializable.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,10 +22,10 @@ import java.io.Serializable;
* <p>
* This class is abstract but has no abstract methods to force users to create
* an anonymous inner class. Otherwise each instance will not be unique.
- *
+ *
* @author Vaadin Ltd
* @since 6.8.0
- *
+ *
*/
public abstract class UniqueSerializable implements Serializable {
diff --git a/server/src/main/java/com/vaadin/ui/Upload.java b/server/src/main/java/com/vaadin/ui/Upload.java
index a61bcf1bd9..68db6db979 100644
--- a/server/src/main/java/com/vaadin/ui/Upload.java
+++ b/server/src/main/java/com/vaadin/ui/Upload.java
@@ -73,8 +73,8 @@ import com.vaadin.util.ReflectTools;
* @since 3.0
*/
@SuppressWarnings("serial")
-public class Upload extends AbstractComponent implements Component.Focusable,
- LegacyComponent {
+public class Upload extends AbstractComponent
+ implements Component.Focusable, LegacyComponent {
/**
* Should the field be focused on next repaint?
@@ -233,9 +233,8 @@ public class Upload extends AbstractComponent implements Component.Focusable,
"uploadFailed", new Class[] { FailedEvent.class });
UPLOAD_STARTED_METHOD = StartedListener.class.getDeclaredMethod(
"uploadStarted", new Class[] { StartedEvent.class });
- UPLOAD_SUCCEEDED_METHOD = SucceededListener.class
- .getDeclaredMethod("uploadSucceeded",
- new Class[] { SucceededEvent.class });
+ UPLOAD_SUCCEEDED_METHOD = SucceededListener.class.getDeclaredMethod(
+ "uploadSucceeded", new Class[] { SucceededEvent.class });
} catch (final java.lang.NoSuchMethodException e) {
// This should never happen
throw new java.lang.RuntimeException(
@@ -907,8 +906,8 @@ public class Upload extends AbstractComponent implements Component.Focusable,
// this is implemented differently than other listeners to maintain
// backwards compatibility
if (progressListeners != null) {
- for (Iterator<ProgressListener> it = progressListeners.iterator(); it
- .hasNext();) {
+ for (Iterator<ProgressListener> it = progressListeners
+ .iterator(); it.hasNext();) {
ProgressListener l = it.next();
l.updateProgress(totalBytes, contentLength);
}
@@ -1115,8 +1114,8 @@ public class Upload extends AbstractComponent implements Component.Focusable,
@Override
public boolean listenProgress() {
- return (progressListeners != null && !progressListeners
- .isEmpty());
+ return (progressListeners != null
+ && !progressListeners.isEmpty());
}
@Override
diff --git a/server/src/main/java/com/vaadin/ui/VerticalLayout.java b/server/src/main/java/com/vaadin/ui/VerticalLayout.java
index 7002fbc7e6..fe133c1bb0 100644
--- a/server/src/main/java/com/vaadin/ui/VerticalLayout.java
+++ b/server/src/main/java/com/vaadin/ui/VerticalLayout.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,11 +19,11 @@ import com.vaadin.shared.ui.orderedlayout.VerticalLayoutState;
/**
* Vertical layout
- *
+ *
* <code>VerticalLayout</code> is a component container, which shows the
* subcomponents in the order of their addition (vertically). A vertical layout
* is by default 100% wide.
- *
+ *
* @author Vaadin Ltd.
* @since 5.3
*/
@@ -40,9 +40,9 @@ public class VerticalLayout extends AbstractOrderedLayout {
/**
* Constructs a VerticalLayout with the given components. The components are
* added in the given order.
- *
+ *
* @see AbstractOrderedLayout#addComponents(Component...)
- *
+ *
* @param children
* The components to add.
*/
diff --git a/server/src/main/java/com/vaadin/ui/VerticalSplitPanel.java b/server/src/main/java/com/vaadin/ui/VerticalSplitPanel.java
index e5e6eb60e1..b2e6f115aa 100644
--- a/server/src/main/java/com/vaadin/ui/VerticalSplitPanel.java
+++ b/server/src/main/java/com/vaadin/ui/VerticalSplitPanel.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import com.vaadin.shared.ui.splitpanel.VerticalSplitPanelState;
/**
* A vertical split panel contains two components and lays them vertically. The
* first component is above the second component.
- *
+ *
* <pre>
* +--------------------------+
* | |
@@ -32,7 +32,7 @@ import com.vaadin.shared.ui.splitpanel.VerticalSplitPanelState;
* | |
* +--------------------------+
* </pre>
- *
+ *
*/
public class VerticalSplitPanel extends AbstractSplitPanel {
@@ -43,7 +43,7 @@ public class VerticalSplitPanel extends AbstractSplitPanel {
/**
* Creates a horizontal split panel containing the given components
- *
+ *
* @param firstComponent
* The component to be placed above the splitter
* @param secondComponent
diff --git a/server/src/main/java/com/vaadin/ui/Video.java b/server/src/main/java/com/vaadin/ui/Video.java
index 46a4293b36..1bacc8c5ec 100644
--- a/server/src/main/java/com/vaadin/ui/Video.java
+++ b/server/src/main/java/com/vaadin/ui/Video.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -33,19 +33,19 @@ import com.vaadin.ui.declarative.DesignContext;
* such is only supported in browsers that support HTML5 media markup. Browsers
* that do not support HTML5 display the text or HTML set by calling
* {@link #setAltText(String)}.
- *
+ *
* A flash-player fallback can be implemented by setting HTML content allowed (
* {@link #setHtmlContentAllowed(boolean)} and calling
* {@link #setAltText(String)} with the flash player markup. An example of flash
* fallback can be found at the <a href=
* "https://developer.mozilla.org/En/Using_audio_and_video_in_Firefox#Using_Flash"
* >Mozilla Developer Network</a>.
- *
+ *
* Multiple sources can be specified. Which of the sources is used is selected
- * by the browser depending on which file formats it supports. See <a
- * href="http://en.wikipedia.org/wiki/HTML5_video#Table">wikipedia</a> for a
+ * by the browser depending on which file formats it supports. See
+ * <a href="http://en.wikipedia.org/wiki/HTML5_video#Table">wikipedia</a> for a
* table of formats supported by different browsers.
- *
+ *
* @author Vaadin Ltd
* @since 6.7.0
*/
@@ -83,7 +83,7 @@ public class Video extends AbstractMedia {
/**
* Sets the poster image, which is shown in place of the video before the
* user presses play.
- *
+ *
* @param poster
*/
public void setPoster(Resource poster) {
diff --git a/server/src/main/java/com/vaadin/ui/Window.java b/server/src/main/java/com/vaadin/ui/Window.java
index 70399ae566..38781b2f21 100644
--- a/server/src/main/java/com/vaadin/ui/Window.java
+++ b/server/src/main/java/com/vaadin/ui/Window.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -55,7 +55,8 @@ import com.vaadin.util.ReflectTools;
/**
* A component that represents a floating popup window that can be added to a
* {@link UI}. A window is added to a {@code UI} using
- * {@link UI#addWindow(Window)}. </p>
+ * {@link UI#addWindow(Window)}.
+ * </p>
* <p>
* The contents of a window is set using {@link #setContent(Component)} or by
* using the {@link #Window(String, Component)} constructor.
@@ -71,13 +72,13 @@ import com.vaadin.util.ReflectTools;
* In Vaadin versions prior to 7.0.0, Window was also used as application level
* windows. This function is now covered by the {@link UI} class.
* </p>
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@SuppressWarnings({ "serial", "deprecation" })
-public class Window extends Panel implements FocusNotifier, BlurNotifier,
- LegacyComponent {
+public class Window extends Panel
+ implements FocusNotifier, BlurNotifier, LegacyComponent {
private WindowServerRpc rpc = new WindowServerRpc() {
@@ -105,7 +106,8 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
/**
* Holds registered CloseShortcut instances for query and later removal
*/
- private List<CloseShortcut> closeShortcuts = new ArrayList<CloseShortcut>(4);
+ private List<CloseShortcut> closeShortcuts = new ArrayList<CloseShortcut>(
+ 4);
/**
* Creates a new, empty window
@@ -116,7 +118,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
/**
* Creates a new, empty window with a given title.
- *
+ *
* @param caption
* the title of the window.
*/
@@ -126,7 +128,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
/**
* Creates a new, empty window with the given content and title.
- *
+ *
* @param caption
* the title of the window.
* @param content
@@ -143,7 +145,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.Panel#paintContent(com.vaadin.server.PaintTarget)
*/
@@ -161,10 +163,9 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
/*
* (non-Javadoc)
- *
- * @see
- * com.vaadin.ui.AbstractComponent#setParent(com.vaadin.server.ClientConnector
- * )
+ *
+ * @see com.vaadin.ui.AbstractComponent#setParent(com.vaadin.server.
+ * ClientConnector )
*/
@Override
public void setParent(HasComponents parent) {
@@ -178,7 +179,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.Panel#changeVariables(java.lang.Object, java.util.Map)
*/
@@ -189,14 +190,12 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
boolean sizeHasChanged = false;
// size is handled in super class, but resize events only in windows ->
// so detect if size change occurs before super.changeVariables()
- if (variables.containsKey("height")
- && (getHeightUnits() != Unit.PIXELS || (Integer) variables
- .get("height") != getHeight())) {
+ if (variables.containsKey("height") && (getHeightUnits() != Unit.PIXELS
+ || (Integer) variables.get("height") != getHeight())) {
sizeHasChanged = true;
}
- if (variables.containsKey("width")
- && (getWidthUnits() != Unit.PIXELS || (Integer) variables
- .get("width") != getWidth())) {
+ if (variables.containsKey("width") && (getWidthUnits() != Unit.PIXELS
+ || (Integer) variables.get("width") != getWidth())) {
sizeHasChanged = true;
}
@@ -241,12 +240,12 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
/**
* Method that handles window closing (from UI).
- *
+ *
* <p>
* By default, windows are removed from their respective UIs and thus
* visually closed on browser-side.
* </p>
- *
+ *
* <p>
* To react to a window being closed (after it is closed), register a
* {@link CloseListener}.
@@ -265,7 +264,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
/**
* Gets the distance of Window left border in pixels from left border of the
* containing (main window) when the window is in {@link WindowMode#NORMAL}.
- *
+ *
* @return the Distance of Window left border in pixels from left border of
* the containing (main window).or -1 if unspecified
* @since 4.0.0
@@ -277,7 +276,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
/**
* Sets the position of the window on the screen using
* {@link #setPositionX(int)} and {@link #setPositionY(int)}
- *
+ *
* @since 7.5
* @param x
* The new x coordinate for the window
@@ -293,7 +292,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
* Sets the distance of Window left border in pixels from left border of the
* containing (main window). Has effect only if in {@link WindowMode#NORMAL}
* mode.
- *
+ *
* @param positionX
* the Distance of Window left border in pixels from left border
* of the containing (main window). or -1 if unspecified.
@@ -308,10 +307,10 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
* Gets the distance of Window top border in pixels from top border of the
* containing (main window) when the window is in {@link WindowMode#NORMAL}
* state, or when next set to that state.
- *
+ *
* @return Distance of Window top border in pixels from top border of the
* containing (main window). or -1 if unspecified
- *
+ *
* @since 4.0.0
*/
public int getPositionY() {
@@ -322,11 +321,11 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
* Sets the distance of Window top border in pixels from top border of the
* containing (main window). Has effect only if in {@link WindowMode#NORMAL}
* mode.
- *
+ *
* @param positionY
* the Distance of Window top border in pixels from top border of
* the containing (main window). or -1 if unspecified
- *
+ *
* @since 4.0.0
*/
public void setPositionY(int positionY) {
@@ -349,7 +348,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
public static class CloseEvent extends Component.Event {
/**
- *
+ *
* @param source
*/
public CloseEvent(Component source) {
@@ -358,7 +357,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
/**
* Gets the Window.
- *
+ *
* @return the window.
*/
public Window getWindow() {
@@ -371,7 +370,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
* CloseListener to a window and
* {@link CloseListener#windowClose(CloseEvent)} will be called whenever the
* user closes the window.
- *
+ *
* <p>
* Since Vaadin 6.5, removing a window using {@link #removeWindow(Window)}
* fires the CloseListener.
@@ -382,7 +381,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
* Called when the user closes a window. Use
* {@link CloseEvent#getWindow()} to get a reference to the
* {@link Window} that was closed.
- *
+ *
* @param e
* Event containing
*/
@@ -391,21 +390,21 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
/**
* Adds a CloseListener to the window.
- *
+ *
* For a window the CloseListener is fired when the user closes it (clicks
* on the close button).
- *
+ *
* For a browser level window the CloseListener is fired when the browser
* level window is closed. Note that closing a browser level window does not
* mean it will be destroyed. Also note that Opera does not send events like
* all other browsers and therefore the close listener might not be called
* if Opera is used.
- *
+ *
* <p>
* Since Vaadin 6.5, removing windows using {@link #removeWindow(Window)}
* does fire the CloseListener.
* </p>
- *
+ *
* @param listener
* the CloseListener to add.
*/
@@ -424,11 +423,11 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
/**
* Removes the CloseListener from the window.
- *
+ *
* <p>
* For more information on CloseListeners see {@link CloseListener}.
* </p>
- *
+ *
* @param listener
* the CloseListener to remove.
*/
@@ -451,17 +450,17 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
/**
* Event which is fired when the mode of the Window changes.
- *
+ *
* @author Vaadin Ltd
* @since 7.1
- *
+ *
*/
public static class WindowModeChangeEvent extends Component.Event {
private final WindowMode windowMode;
/**
- *
+ *
* @param source
*/
public WindowModeChangeEvent(Component source, WindowMode windowMode) {
@@ -471,7 +470,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
/**
* Gets the Window.
- *
+ *
* @return the window
*/
public Window getWindow() {
@@ -480,7 +479,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
/**
* Gets the new window mode.
- *
+ *
* @return the new mode
*/
public WindowMode getWindowMode() {
@@ -498,8 +497,8 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
public interface WindowModeChangeListener extends Serializable {
public static final Method windowModeChangeMethod = ReflectTools
- .findMethod(WindowModeChangeListener.class,
- "windowModeChanged", WindowModeChangeEvent.class);
+ .findMethod(WindowModeChangeListener.class, "windowModeChanged",
+ WindowModeChangeEvent.class);
/**
* Called when the user maximizes / restores a window. Use
@@ -507,7 +506,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
* {@link Window} that was maximized / restored. Use
* {@link WindowModeChangeEvent#getWindowMode()} to get a reference to
* the new state.
- *
+ *
* @param event
*/
public void windowModeChanged(WindowModeChangeEvent event);
@@ -515,12 +514,12 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
/**
* Adds a WindowModeChangeListener to the window.
- *
+ *
* The WindowModeChangeEvent is fired when the user changed the display
* state by clicking the maximize/restore button or by double clicking on
* the window header. The event is also fired if the state is changed using
* {@link #setWindowMode(WindowMode)}.
- *
+ *
* @param listener
* the WindowModeChangeListener to add.
*/
@@ -531,17 +530,19 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
/**
* Removes the WindowModeChangeListener from the window.
- *
+ *
* @param listener
* the WindowModeChangeListener to remove.
*/
- public void removeWindowModeChangeListener(WindowModeChangeListener listener) {
+ public void removeWindowModeChangeListener(
+ WindowModeChangeListener listener) {
removeListener(WindowModeChangeEvent.class, listener,
WindowModeChangeListener.windowModeChangeMethod);
}
protected void fireWindowWindowModeChange() {
- fireEvent(new Window.WindowModeChangeEvent(this, getState().windowMode));
+ fireEvent(
+ new Window.WindowModeChangeEvent(this, getState().windowMode));
}
/**
@@ -567,7 +568,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
public static class ResizeEvent extends Component.Event {
/**
- *
+ *
* @param source
*/
public ResizeEvent(Component source) {
@@ -576,7 +577,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
/**
* Get the window form which this event originated
- *
+ *
* @return the window
*/
public Window getWindow() {
@@ -586,7 +587,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
/**
* Listener for window resize events.
- *
+ *
* @see com.vaadin.ui.Window.ResizeEvent
*/
public interface ResizeListener extends Serializable {
@@ -595,7 +596,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
/**
* Add a resize listener.
- *
+ *
* @param listener
*/
public void addResizeListener(ResizeListener listener) {
@@ -613,7 +614,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
/**
* Remove a resize listener.
- *
+ *
* @param listener
*/
public void removeResizeListener(ResizeListener listener) {
@@ -680,7 +681,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
* <p>
* Keyboard navigation is restricted by blocking the tab key at the top and
* bottom of the window by activating the tab stop function internally.
- *
+ *
* @param modal
* true if modality is to be turned on
*/
@@ -698,7 +699,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
/**
* Sets window resizable.
- *
+ *
* @param resizable
* true if resizability is to be turned on
*/
@@ -707,7 +708,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
}
/**
- *
+ *
* @return true if window is resizable by the end-user, otherwise false.
*/
public boolean isResizable() {
@@ -715,7 +716,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
}
/**
- *
+ *
* @return true if a delay is used before recalculating sizes, false if
* sizes are recalculated immediately.
*/
@@ -727,10 +728,10 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
* Should resize operations be lazy, i.e. should there be a delay before
* layout sizes are recalculated. Speeds up resize operations in slow UIs
* with the penalty of slightly decreased usability.
- *
+ *
* Note, some browser send false resize events for the browser window and
* are therefore always lazy.
- *
+ *
* @param resizeLazy
* true to use a delay before recalculating sizes, false to
* calculate immediately.
@@ -757,12 +758,12 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
* typically shows an X in the upper right corner. Clicking on the X sends a
* close event to the server. Setting closable to false will remove the X
* from the window and prevent the user from closing the window.
- *
+ *
* Note! For historical reasons readonly controls the closability of the
* window and therefore readonly and closable affect each other. Setting
* readonly to true will set closable to false and vice versa.
* <p/>
- *
+ *
* @return true if the window can be closed by the user.
*/
public boolean isClosable() {
@@ -774,12 +775,12 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
* typically shows an X in the upper right corner. Clicking on the X sends a
* close event to the server. Setting closable to false will remove the X
* from the window and prevent the user from closing the window.
- *
+ *
* Note! For historical reasons readonly controls the closability of the
* window and therefore readonly and closable affect each other. Setting
* readonly to true will set closable to false and vice versa.
* <p/>
- *
+ *
* @param closable
* determines if the window can be closed by the user.
*/
@@ -791,7 +792,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
* Indicates whether a window can be dragged or not. By default a window is
* draggable.
* <p/>
- *
+ *
* @param draggable
* true if the window can be dragged by the user
*/
@@ -803,7 +804,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
* Enables or disables that a window can be dragged (moved) by the user. By
* default a window is draggable.
* <p/>
- *
+ *
* @param draggable
* true if the window can be dragged by the user
*/
@@ -813,7 +814,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
/**
* Gets the current mode of the window.
- *
+ *
* @see WindowMode
* @return the mode of the window.
*/
@@ -823,7 +824,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
/**
* Sets the mode for the window
- *
+ *
* @see WindowMode
* @param windowMode
* The new mode
@@ -854,13 +855,13 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
* Note that this shortcut only reacts while the window has focus, closing
* itself - if you want to close a window from a UI, use
* {@link UI#addAction(com.vaadin.event.Action)} of the UI instead.
- *
+ *
* @param keyCode
* the keycode for invoking the shortcut
* @param modifiers
* the (optional) modifiers for invoking the shortcut. Can be set
* to null to be explicit about not having modifiers.
- *
+ *
* @deprecated Use {@link #addCloseShortcut(int, int...)} instead.
*/
@Deprecated
@@ -881,7 +882,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
* {@link #removeCloseShortcut(int,int...)},
* {@link #removeAllCloseShortcuts()}, {@link #hasCloseShortcut(int,int...)}
* and {@link #getCloseShortcuts()}.
- *
+ *
* @deprecated Use {@link #removeCloseShortcut(int, int...)} instead.
*/
@Deprecated
@@ -897,7 +898,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
/**
* Adds a close shortcut - pressing this key while holding down all (if any)
* modifiers specified while this Window is in focus will close the Window.
- *
+ *
* @since 7.6
* @param keyCode
* the keycode for invoking the shortcut
@@ -921,7 +922,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
/**
* Removes a close shortcut previously added with
* {@link #addCloseShortcut(int, int...)}.
- *
+ *
* @since 7.6
* @param keyCode
* the keycode for invoking the shortcut
@@ -944,7 +945,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
* It is up to the user to add back any and all keyboard close shortcuts
* they may require. For more fine-grained control over shortcuts, use
* {@link #removeCloseShortcut(int, int...)}.
- *
+ *
* @since 7.6
*/
public void removeAllCloseShortcuts() {
@@ -956,7 +957,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
/**
* Checks if a close window shortcut key has already been registered.
- *
+ *
* @since 7.6
* @param keyCode
* the keycode for invoking the shortcut
@@ -980,7 +981,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
* mainly so that users can implement their own serialization routines. To
* check if a certain combination of keys has been registered as a close
* shortcut, use the {@link #hasCloseShortcut(int, int...)} method instead.
- *
+ *
* @since 7.6
* @return an unmodifiable Collection of CloseShortcut objects.
*/
@@ -991,17 +992,17 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
/**
* A {@link ShortcutListener} specifically made to define a keyboard
* shortcut that closes the window.
- *
+ *
* <pre>
* <code>
* // within the window using helper
* window.setCloseShortcut(KeyCode.ESCAPE, null);
- *
+ *
* // or globally
* getUI().addAction(new Window.CloseShortcut(window, KeyCode.ESCAPE));
* </code>
* </pre>
- *
+ *
*/
public static class CloseShortcut extends ShortcutListener {
protected Window window;
@@ -1009,7 +1010,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
/**
* Creates a keyboard shortcut for closing the given window using the
* shorthand notation defined in {@link ShortcutAction}.
- *
+ *
* @param window
* to be closed when the shortcut is invoked
* @param shorthandCaption
@@ -1023,7 +1024,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
/**
* Creates a keyboard shortcut for closing the given window using the
* given {@link KeyCode} and {@link ModifierKey}s.
- *
+ *
* @param window
* to be closed when the shortcut is invoked
* @param keyCode
@@ -1039,7 +1040,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
/**
* Creates a keyboard shortcut for closing the given window using the
* given {@link KeyCode}.
- *
+ *
* @param window
* to be closed when the shortcut is invoked
* @param keyCode
@@ -1078,7 +1079,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.event.FieldEvents.FocusNotifier#addFocusListener(com.vaadin
* .event.FieldEvents.FocusListener)
@@ -1116,7 +1117,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.event.FieldEvents.BlurNotifier#addBlurListener(com.vaadin.
* event.FieldEvents.BlurListener)
@@ -1153,7 +1154,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
/**
* {@inheritDoc}
- *
+ *
* Cause the window to be brought on top of other windows and gain keyboard
* focus.
*/
@@ -1182,7 +1183,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
* Allows to specify which components contain the description for the
* window. Text contained in these components will be read by assistive
* devices when it is opened.
- *
+ *
* @param components
* the components to use as description
*/
@@ -1199,7 +1200,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
* Gets the components that are used as assistive description. Text
* contained in these components will be read by assistive devices when the
* window is opened.
- *
+ *
* @return array of previously set components
*/
public Component[] getAssistiveDescription() {
@@ -1217,10 +1218,10 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
/**
* Sets the accessibility prefix for the window caption.
- *
+ *
* This prefix is read to assistive device users before the window caption,
* but not visible on the page.
- *
+ *
* @param prefix
* String that is placed before the window caption
*/
@@ -1230,10 +1231,10 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
/**
* Gets the accessibility prefix for the window caption.
- *
+ *
* This prefix is read to assistive device users before the window caption,
* but not visible on the page.
- *
+ *
* @return The accessibility prefix
*/
public String getAssistivePrefix() {
@@ -1242,10 +1243,10 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
/**
* Sets the accessibility postfix for the window caption.
- *
+ *
* This postfix is read to assistive device users after the window caption,
* but not visible on the page.
- *
+ *
* @param prefix
* String that is placed after the window caption
*/
@@ -1255,10 +1256,10 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
/**
* Gets the accessibility postfix for the window caption.
- *
+ *
* This postfix is read to assistive device users after the window caption,
* but not visible on the page.
- *
+ *
* @return The accessibility postfix
*/
public String getAssistivePostfix() {
@@ -1267,14 +1268,14 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
/**
* Sets the WAI-ARIA role the window.
- *
+ *
* This role defines how an assistive device handles a window. Available
- * roles are alertdialog and dialog (@see <a
- * href="http://www.w3.org/TR/2011/CR-wai-aria-20110118/roles">Roles
+ * roles are alertdialog and dialog (@see
+ * <a href="http://www.w3.org/TR/2011/CR-wai-aria-20110118/roles">Roles
* Model</a>).
- *
+ *
* The default role is dialog.
- *
+ *
* @param role
* WAI-ARIA role to set for the window
*/
@@ -1284,12 +1285,12 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
/**
* Gets the WAI-ARIA role the window.
- *
+ *
* This role defines how an assistive device handles a window. Available
- * roles are alertdialog and dialog (@see <a
- * href="http://www.w3.org/TR/2011/CR-wai-aria-20110118/roles">Roles
+ * roles are alertdialog and dialog (@see
+ * <a href="http://www.w3.org/TR/2011/CR-wai-aria-20110118/roles">Roles
* Model</a>).
- *
+ *
* @return WAI-ARIA role set for the window
*/
public WindowRole getAssistiveRole() {
@@ -1305,7 +1306,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
* <p>
* For modal windows, this function is activated automatically, while
* preserving the stored value of tabStop.
- *
+ *
* @param tabStop
* true to keep the focus inside the window when reaching the top
* or bottom, false (default) to allow leaving the window
@@ -1316,7 +1317,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
/**
* Get if it is prevented to leave a window with the tab key.
- *
+ *
* @return true when the focus is limited to inside the window, false when
* focus can leave the window
*/
@@ -1330,7 +1331,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
* is prevented.
* <p>
* This message is not visible on the screen.
- *
+ *
* @param topMessage
* String provided when the user navigates with Shift-Tab keys to
* the top of the window
@@ -1345,7 +1346,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
* key is prevented.
* <p>
* This message is not visible on the screen.
- *
+ *
* @param bottomMessage
* String provided when the user navigates with the Tab key to
* the bottom of the window
@@ -1358,7 +1359,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
* Gets the message that is provided to users of assistive devices when the
* user reaches the top of the window when leaving a window with the tab key
* is prevented.
- *
+ *
* @return the top message
*/
public String getTabStopTopAssistiveText() {
@@ -1369,7 +1370,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
* Gets the message that is provided to users of assistive devices when the
* user reaches the bottom of the window when leaving a window with the tab
* key is prevented.
- *
+ *
* @return the bottom message
*/
public String getTabStopBottomAssistiveText() {
@@ -1393,17 +1394,18 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
if (design.hasAttr("close-shortcut")) {
// Parse shortcuts
- String[] shortcutStrings = DesignAttributeHandler.readAttribute(
- "close-shortcut", design.attributes(), String.class).split(
- "\\s+");
+ String[] shortcutStrings = DesignAttributeHandler
+ .readAttribute("close-shortcut", design.attributes(),
+ String.class)
+ .split("\\s+");
removeAllCloseShortcuts();
for (String part : shortcutStrings) {
if (!part.isEmpty()) {
ShortcutAction shortcut = DesignAttributeHandler
- .getFormatter().parse(part.trim(),
- ShortcutAction.class);
+ .getFormatter()
+ .parse(part.trim(), ShortcutAction.class);
addCloseShortcut(shortcut.getKeyCode(),
shortcut.getModifiers());
}
@@ -1418,22 +1420,23 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
* the list of components used as the assistive description of this Window.
* Otherwise, sets the component as the content of this Window. If there are
* multiple non-description elements, throws a DesignException.
- *
+ *
* @param children
* child elements in a design
* @param context
* the DesignContext instance used to parse the design
- *
+ *
* @throws DesignException
* if there are multiple non-description child elements
* @throws DesignException
* if a child element could not be parsed as a Component
- *
+ *
* @see #setContent(Component)
* @see #setAssistiveDescription(Component...)
*/
@Override
- protected void readDesignChildren(Elements children, DesignContext context) {
+ protected void readDesignChildren(Elements children,
+ DesignContext context) {
List<Component> descriptions = new ArrayList<Component>();
Elements content = new Elements();
@@ -1482,8 +1485,8 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
}
for (Component c : getAssistiveDescription()) {
- Element child = context.createElement(c).attr(
- ":assistive-description", true);
+ Element child = context.createElement(c)
+ .attr(":assistive-description", true);
design.appendChild(child);
}
}
diff --git a/server/src/main/java/com/vaadin/ui/components/calendar/CalendarComponentEvent.java b/server/src/main/java/com/vaadin/ui/components/calendar/CalendarComponentEvent.java
index dfb59e148b..86d9e4951a 100644
--- a/server/src/main/java/com/vaadin/ui/components/calendar/CalendarComponentEvent.java
+++ b/server/src/main/java/com/vaadin/ui/components/calendar/CalendarComponentEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,20 +20,20 @@ import com.vaadin.ui.Component;
/**
* All Calendar events extends this class.
- *
+ *
* @since 7.1
* @author Vaadin Ltd.
- *
+ *
*/
@SuppressWarnings("serial")
public class CalendarComponentEvent extends Component.Event {
/**
* Set the source of the event
- *
+ *
* @param source
* The source calendar
- *
+ *
*/
public CalendarComponentEvent(Calendar source) {
super(source);
@@ -41,7 +41,7 @@ public class CalendarComponentEvent extends Component.Event {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.Component.Event#getComponent()
*/
@Override
diff --git a/server/src/main/java/com/vaadin/ui/components/calendar/CalendarComponentEvents.java b/server/src/main/java/com/vaadin/ui/components/calendar/CalendarComponentEvents.java
index f01b465dd2..1ecf18a682 100644
--- a/server/src/main/java/com/vaadin/ui/components/calendar/CalendarComponentEvents.java
+++ b/server/src/main/java/com/vaadin/ui/components/calendar/CalendarComponentEvents.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,7 +27,7 @@ import com.vaadin.util.ReflectTools;
/**
* Interface for all Vaadin Calendar events.
- *
+ *
* @since 7.1.0
* @author Vaadin Ltd.
*/
@@ -39,7 +39,7 @@ public interface CalendarComponentEvents extends Serializable {
public interface CalendarEventNotifier extends Serializable {
/**
* Get the assigned event handler for the given eventId.
- *
+ *
* @param eventId
* @return the assigned eventHandler, or null if no handler is assigned
*/
@@ -53,7 +53,7 @@ public interface CalendarComponentEvents extends Serializable {
/**
* Set the EventMoveHandler.
- *
+ *
* @param listener
* EventMoveHandler to be added
*/
@@ -77,7 +77,7 @@ public interface CalendarComponentEvents extends Serializable {
/**
* MoveEvent needs the target event and new start date.
- *
+ *
* @param source
* Calendar component.
* @param calendarEvent
@@ -95,7 +95,7 @@ public interface CalendarComponentEvents extends Serializable {
/**
* Get target event.
- *
+ *
* @return Target event.
*/
public CalendarEvent getCalendarEvent() {
@@ -104,7 +104,7 @@ public interface CalendarComponentEvents extends Serializable {
/**
* Get new start date.
- *
+ *
* @return New start date.
*/
public Date getNewStart() {
@@ -114,7 +114,7 @@ public interface CalendarComponentEvents extends Serializable {
/**
* Handler interface for when events are being dragged on the calendar
- *
+ *
*/
public interface EventMoveHandler extends EventListener, Serializable {
@@ -125,7 +125,7 @@ public interface CalendarComponentEvents extends Serializable {
/**
* This method will be called when event has been moved to a new
* position.
- *
+ *
* @param event
* MoveEvent containing specific information of the new
* position and target event.
@@ -136,12 +136,12 @@ public interface CalendarComponentEvents extends Serializable {
/**
* Handler interface for day or time cell drag-marking with mouse.
*/
- public interface RangeSelectNotifier extends Serializable,
- CalendarEventNotifier {
+ public interface RangeSelectNotifier
+ extends Serializable, CalendarEventNotifier {
/**
* Set the RangeSelectHandler that listens for drag-marking.
- *
+ *
* @param listener
* RangeSelectHandler to be added.
*/
@@ -170,7 +170,7 @@ public interface CalendarComponentEvents extends Serializable {
/**
* RangeSelectEvent needs a start and end date.
- *
+ *
* @param source
* Calendar component.
* @param start
@@ -190,7 +190,7 @@ public interface CalendarComponentEvents extends Serializable {
/**
* Get start date.
- *
+ *
* @return Start date.
*/
public Date getStart() {
@@ -199,7 +199,7 @@ public interface CalendarComponentEvents extends Serializable {
/**
* Get end date.
- *
+ *
* @return End date.
*/
public Date getEnd() {
@@ -209,9 +209,9 @@ public interface CalendarComponentEvents extends Serializable {
/**
* Gets the event's view mode. Calendar can be be either in monthly or
* weekly mode, depending on the active date range.
- *
+ *
* @deprecated User {@link Calendar#isMonthlyMode()} instead
- *
+ *
* @return Returns true when monthly view is active.
*/
@Deprecated
@@ -224,14 +224,14 @@ public interface CalendarComponentEvents extends Serializable {
public interface RangeSelectHandler extends EventListener, Serializable {
/** Trigger method for the RangeSelectEvent. */
- public static final Method rangeSelectMethod = ReflectTools
- .findMethod(RangeSelectHandler.class, "rangeSelect",
- RangeSelectEvent.class);
+ public static final Method rangeSelectMethod = ReflectTools.findMethod(
+ RangeSelectHandler.class, "rangeSelect",
+ RangeSelectEvent.class);
/**
* This method will be called when day or time cells are drag-marked
* with mouse.
- *
+ *
* @param event
* RangeSelectEvent that contains range start and end date.
*/
@@ -242,7 +242,7 @@ public interface CalendarComponentEvents extends Serializable {
public interface NavigationNotifier extends Serializable {
/**
* Add a forward navigation listener.
- *
+ *
* @param handler
* ForwardHandler to be added.
*/
@@ -250,7 +250,7 @@ public interface CalendarComponentEvents extends Serializable {
/**
* Add a backward navigation listener.
- *
+ *
* @param handler
* BackwardHandler to be added.
*/
@@ -258,7 +258,7 @@ public interface CalendarComponentEvents extends Serializable {
/**
* Add a date click listener.
- *
+ *
* @param handler
* DateClickHandler to be added.
*/
@@ -266,7 +266,7 @@ public interface CalendarComponentEvents extends Serializable {
/**
* Add a event click listener.
- *
+ *
* @param handler
* EventClickHandler to be added.
*/
@@ -274,7 +274,7 @@ public interface CalendarComponentEvents extends Serializable {
/**
* Add a week click listener.
- *
+ *
* @param handler
* WeekClickHandler to be added.
*/
@@ -291,7 +291,7 @@ public interface CalendarComponentEvents extends Serializable {
/**
* ForwardEvent needs only the source component.
- *
+ *
* @param source
* Calendar component.
*/
@@ -309,7 +309,7 @@ public interface CalendarComponentEvents extends Serializable {
/**
* This method will be called when date range is moved forward.
- *
+ *
* @param event
* ForwardEvent
*/
@@ -326,7 +326,7 @@ public interface CalendarComponentEvents extends Serializable {
/**
* BackwardEvent needs only the source source component.
- *
+ *
* @param source
* Calendar component.
*/
@@ -344,7 +344,7 @@ public interface CalendarComponentEvents extends Serializable {
/**
* This method will be called when date range is moved backwards.
- *
+ *
* @param event
* BackwardEvent
*/
@@ -370,7 +370,7 @@ public interface CalendarComponentEvents extends Serializable {
/**
* Get clicked date.
- *
+ *
* @return Clicked date.
*/
public Date getDate() {
@@ -387,7 +387,7 @@ public interface CalendarComponentEvents extends Serializable {
/**
* This method will be called when a date is clicked.
- *
+ *
* @param event
* DateClickEvent containing the target date.
*/
@@ -413,7 +413,7 @@ public interface CalendarComponentEvents extends Serializable {
/**
* Get the clicked event.
- *
+ *
* @return Clicked event.
*/
public CalendarEvent getCalendarEvent() {
@@ -430,7 +430,7 @@ public interface CalendarComponentEvents extends Serializable {
/**
* This method will be called when an event is clicked.
- *
+ *
* @param event
* EventClick containing the target event.
*/
@@ -453,7 +453,7 @@ public interface CalendarComponentEvents extends Serializable {
/**
* WeekClick needs a target year and week.
- *
+ *
* @param source
* Target source.
* @param week
@@ -470,7 +470,7 @@ public interface CalendarComponentEvents extends Serializable {
/**
* Get week as a integer. See {@link java.util.Calendar} for the allowed
* values.
- *
+ *
* @return Week as a integer.
*/
public int getWeek() {
@@ -480,7 +480,7 @@ public interface CalendarComponentEvents extends Serializable {
/**
* Get year as a integer. See {@link java.util.Calendar} for the allowed
* values.
- *
+ *
* @return Year as a integer
*/
public int getYear() {
@@ -497,7 +497,7 @@ public interface CalendarComponentEvents extends Serializable {
/**
* This method will be called when a week is clicked.
- *
+ *
* @param event
* WeekClick containing the target week and year.
*/
@@ -528,7 +528,7 @@ public interface CalendarComponentEvents extends Serializable {
/**
* Get target event.
- *
+ *
* @return Target event.
*/
public CalendarEvent getCalendarEvent() {
@@ -537,7 +537,7 @@ public interface CalendarComponentEvents extends Serializable {
/**
* @deprecated Use {@link #getNewStart()} instead
- *
+ *
* @return the new start time
*/
@Deprecated
@@ -547,7 +547,7 @@ public interface CalendarComponentEvents extends Serializable {
/**
* Returns the updated start date/time of the event
- *
+ *
* @return The new date for the event
*/
public Date getNewStart() {
@@ -556,7 +556,7 @@ public interface CalendarComponentEvents extends Serializable {
/**
* @deprecated Use {@link #getNewEnd()} instead
- *
+ *
* @return the new end time
*/
@Deprecated
@@ -566,7 +566,7 @@ public interface CalendarComponentEvents extends Serializable {
/**
* Returns the updates end date/time of the event
- *
+ *
* @return The new date for the event
*/
public Date getNewEnd() {
@@ -581,7 +581,7 @@ public interface CalendarComponentEvents extends Serializable {
/**
* Set a EventResizeHandler.
- *
+ *
* @param handler
* EventResizeHandler to be set
*/
diff --git a/server/src/main/java/com/vaadin/ui/components/calendar/CalendarDateRange.java b/server/src/main/java/com/vaadin/ui/components/calendar/CalendarDateRange.java
index 18b98e1f6c..9919dba414 100644
--- a/server/src/main/java/com/vaadin/ui/components/calendar/CalendarDateRange.java
+++ b/server/src/main/java/com/vaadin/ui/components/calendar/CalendarDateRange.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,10 +21,10 @@ import java.util.TimeZone;
/**
* Class for representing a date range.
- *
+ *
* @since 7.1.0
* @author Vaadin Ltd.
- *
+ *
*/
@SuppressWarnings("serial")
public class CalendarDateRange implements Serializable {
@@ -37,7 +37,7 @@ public class CalendarDateRange implements Serializable {
/**
* Constructor
- *
+ *
* @param start
* The start date and time of the date range
* @param end
@@ -52,7 +52,7 @@ public class CalendarDateRange implements Serializable {
/**
* Get the start date of the date range
- *
+ *
* @return the start Date of the range
*/
public Date getStart() {
@@ -61,7 +61,7 @@ public class CalendarDateRange implements Serializable {
/**
* Get the end date of the date range
- *
+ *
* @return the end Date of the range
*/
public Date getEnd() {
@@ -70,7 +70,7 @@ public class CalendarDateRange implements Serializable {
/**
* Is a date in the date range
- *
+ *
* @param date
* The date to check
* @return true if the date range contains a date start and end of range
@@ -86,7 +86,7 @@ public class CalendarDateRange implements Serializable {
/*
* (non-Javadoc)
- *
+ *
* @see java.lang.Object#toString()
*/
@Override
diff --git a/server/src/main/java/com/vaadin/ui/components/calendar/CalendarTargetDetails.java b/server/src/main/java/com/vaadin/ui/components/calendar/CalendarTargetDetails.java
index 3ea6c4d8f4..76598cf79b 100644
--- a/server/src/main/java/com/vaadin/ui/components/calendar/CalendarTargetDetails.java
+++ b/server/src/main/java/com/vaadin/ui/components/calendar/CalendarTargetDetails.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import com.vaadin.ui.Calendar;
* details of the drop point. Specifically, this class gives access to the date
* where the drop happened. If the Calendar was in weekly mode, the date also
* includes the start time of the slot.
- *
+ *
* @since 7.1
* @author Vaadin Ltd.
*/
@@ -52,7 +52,7 @@ public class CalendarTargetDetails extends TargetDetailsImpl {
/**
* Does the dropped item have a time associated with it
- *
+ *
* @param hasDropTime
*/
public void setHasDropTime(boolean hasDropTime) {
diff --git a/server/src/main/java/com/vaadin/ui/components/calendar/ContainerEventProvider.java b/server/src/main/java/com/vaadin/ui/components/calendar/ContainerEventProvider.java
index 2f51b21f7c..f9e4db0510 100644
--- a/server/src/main/java/com/vaadin/ui/components/calendar/ContainerEventProvider.java
+++ b/server/src/main/java/com/vaadin/ui/components/calendar/ContainerEventProvider.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -43,17 +43,17 @@ import com.vaadin.ui.components.calendar.event.CalendarEventProvider.EventSetCha
/**
* A event provider which uses a {@link Container} as a datasource. Container
* used as data source.
- *
+ *
* NOTE: The data source must be sorted by date!
- *
+ *
* @since 7.1.0
* @author Vaadin Ltd.
*/
@SuppressWarnings("serial")
-public class ContainerEventProvider implements CalendarEditableEventProvider,
- EventSetChangeNotifier, EventChangeNotifier, EventMoveHandler,
- EventResizeHandler, Container.ItemSetChangeListener,
- Property.ValueChangeListener {
+public class ContainerEventProvider
+ implements CalendarEditableEventProvider, EventSetChangeNotifier,
+ EventChangeNotifier, EventMoveHandler, EventResizeHandler,
+ Container.ItemSetChangeListener, Property.ValueChangeListener {
// Default property ids
public static final String CAPTION_PROPERTY = "caption";
@@ -66,7 +66,7 @@ public class ContainerEventProvider implements CalendarEditableEventProvider,
/**
* Internal class to keep the container index which item this event
* represents
- *
+ *
*/
private class ContainerCalendarEvent extends BasicEvent {
private final int index;
@@ -111,7 +111,7 @@ public class ContainerEventProvider implements CalendarEditableEventProvider,
/**
* Constructor
- *
+ *
* @param container
* Container to use as a data source.
*/
@@ -122,10 +122,10 @@ public class ContainerEventProvider implements CalendarEditableEventProvider,
/**
* Set the container data source
- *
+ *
* @param container
* The container to use as datasource
- *
+ *
*/
public void setContainerDataSource(Container.Indexed container) {
// Detach the previous container
@@ -137,7 +137,7 @@ public class ContainerEventProvider implements CalendarEditableEventProvider,
/**
* Returns the container used as data source
- *
+ *
*/
public Container.Indexed getContainerDataSource() {
return container;
@@ -170,7 +170,7 @@ public class ContainerEventProvider implements CalendarEditableEventProvider,
/**
* Converts an event in the container to an {@link CalendarEvent}
- *
+ *
* @param index
* The index of the item in the container to get the event for
* @return
@@ -180,7 +180,8 @@ public class ContainerEventProvider implements CalendarEditableEventProvider,
// Check the event cache first
for (CalendarEvent e : eventCache) {
if (e instanceof ContainerCalendarEvent
- && ((ContainerCalendarEvent) e).getContainerIndex() == index) {
+ && ((ContainerCalendarEvent) e)
+ .getContainerIndex() == index) {
return e;
} else if (container.getIdByIndex(index) == e) {
return e;
@@ -206,18 +207,18 @@ public class ContainerEventProvider implements CalendarEditableEventProvider,
// Set values from property values
if (captionProperty != null
&& item.getItemPropertyIds().contains(captionProperty)) {
- basicEvent.setCaption(String.valueOf(item.getItemProperty(
- captionProperty).getValue()));
+ basicEvent.setCaption(String.valueOf(
+ item.getItemProperty(captionProperty).getValue()));
}
- if (descriptionProperty != null
- && item.getItemPropertyIds().contains(descriptionProperty)) {
- basicEvent.setDescription(String.valueOf(item.getItemProperty(
- descriptionProperty).getValue()));
+ if (descriptionProperty != null && item.getItemPropertyIds()
+ .contains(descriptionProperty)) {
+ basicEvent.setDescription(String.valueOf(
+ item.getItemProperty(descriptionProperty).getValue()));
}
if (startDateProperty != null
&& item.getItemPropertyIds().contains(startDateProperty)) {
- basicEvent.setStart((Date) item.getItemProperty(
- startDateProperty).getValue());
+ basicEvent.setStart((Date) item
+ .getItemProperty(startDateProperty).getValue());
}
if (endDateProperty != null
&& item.getItemPropertyIds().contains(endDateProperty)) {
@@ -226,13 +227,13 @@ public class ContainerEventProvider implements CalendarEditableEventProvider,
}
if (styleNameProperty != null
&& item.getItemPropertyIds().contains(styleNameProperty)) {
- basicEvent.setStyleName(String.valueOf(item.getItemProperty(
- styleNameProperty).getValue()));
+ basicEvent.setStyleName(String.valueOf(
+ item.getItemProperty(styleNameProperty).getValue()));
}
if (allDayProperty != null
&& item.getItemPropertyIds().contains(allDayProperty)) {
- basicEvent.setAllDay((Boolean) item.getItemProperty(
- allDayProperty).getValue());
+ basicEvent.setAllDay((Boolean) item
+ .getItemProperty(allDayProperty).getValue());
}
event = basicEvent;
}
@@ -241,7 +242,7 @@ public class ContainerEventProvider implements CalendarEditableEventProvider,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.addon.calendar.event.CalendarEventProvider#getEvents(java.
* util.Date, java.util.Date)
@@ -264,8 +265,8 @@ public class ContainerEventProvider implements CalendarEditableEventProvider,
}
}
if (add && endDate != null) {
- Date eventStart = (Date) item
- .getItemProperty(startDateProperty).getValue();
+ Date eventStart = (Date) item.getItemProperty(startDateProperty)
+ .getValue();
if (eventStart.compareTo(endDate) >= 0) {
break; // because container is sorted, all further events
// will be even later
@@ -280,9 +281,9 @@ public class ContainerEventProvider implements CalendarEditableEventProvider,
/*
* (non-Javadoc)
- *
- * @see
- * com.vaadin.addon.calendar.event.CalendarEventProvider.EventSetChangeNotifier
+ *
+ * @see com.vaadin.addon.calendar.event.CalendarEventProvider.
+ * EventSetChangeNotifier
* #addListener(com.vaadin.addon.calendar.event.CalendarEventProvider.
* EventSetChangeListener)
*/
@@ -295,9 +296,9 @@ public class ContainerEventProvider implements CalendarEditableEventProvider,
/*
* (non-Javadoc)
- *
- * @see
- * com.vaadin.addon.calendar.event.CalendarEventProvider.EventSetChangeNotifier
+ *
+ * @see com.vaadin.addon.calendar.event.CalendarEventProvider.
+ * EventSetChangeNotifier
* #removeListener(com.vaadin.addon.calendar.event.CalendarEventProvider.
* EventSetChangeListener)
*/
@@ -308,9 +309,9 @@ public class ContainerEventProvider implements CalendarEditableEventProvider,
/*
* (non-Javadoc)
- *
- * @see
- * com.vaadin.addon.calendar.event.CalendarEvent.EventChangeNotifier#addListener
+ *
+ * @see com.vaadin.addon.calendar.event.CalendarEvent.EventChangeNotifier#
+ * addListener
* (com.vaadin.addon.calendar.event.CalendarEvent.EventChangeListener)
*/
@Override
@@ -322,7 +323,7 @@ public class ContainerEventProvider implements CalendarEditableEventProvider,
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.addon.calendar.event.CalendarEvent.EventChangeNotifier#
* removeListener
* (com.vaadin.addon.calendar.event.CalendarEvent.EventChangeListener)
@@ -422,7 +423,7 @@ public class ContainerEventProvider implements CalendarEditableEventProvider,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.data.Container.ItemSetChangeListener#containerItemSetChange
* (com.vaadin.data.Container.ItemSetChangeEvent)
@@ -439,7 +440,7 @@ public class ContainerEventProvider implements CalendarEditableEventProvider,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.data.Property.ValueChangeListener#valueChange(com.vaadin.data
* .Property.ValueChangeEvent)
@@ -455,7 +456,7 @@ public class ContainerEventProvider implements CalendarEditableEventProvider,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.addon.calendar.ui.CalendarComponentEvents.EventMoveHandler
* #eventMove
@@ -477,8 +478,8 @@ public class ContainerEventProvider implements CalendarEditableEventProvider,
ignoreContainerEvents();
Item item = container.getItem(container.getIdByIndex(index));
- item.getItemProperty(startDateProperty).setValue(
- event.getNewStart());
+ item.getItemProperty(startDateProperty)
+ .setValue(event.getNewStart());
item.getItemProperty(endDateProperty).setValue(newEnd);
listenToContainerEvents();
}
@@ -486,7 +487,7 @@ public class ContainerEventProvider implements CalendarEditableEventProvider,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.addon.calendar.ui.CalendarComponentEvents.EventResizeHandler
* #eventResize
@@ -504,8 +505,8 @@ public class ContainerEventProvider implements CalendarEditableEventProvider,
}
ignoreContainerEvents();
Item item = container.getItem(container.getIdByIndex(index));
- item.getItemProperty(startDateProperty).setValue(
- event.getNewStart());
+ item.getItemProperty(startDateProperty)
+ .setValue(event.getNewStart());
item.getItemProperty(endDateProperty).setValue(event.getNewEnd());
listenToContainerEvents();
}
@@ -523,7 +524,7 @@ public class ContainerEventProvider implements CalendarEditableEventProvider,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.addon.calendar.event.CalendarEditableEventProvider#addEvent
* (com.vaadin.addon.calendar.event.CalendarEvent)
@@ -539,21 +540,21 @@ public class ContainerEventProvider implements CalendarEditableEventProvider,
item = container.getItem(container.addItem());
}
if (item != null) {
- item.getItemProperty(getCaptionProperty()).setValue(
- event.getCaption());
- item.getItemProperty(getStartDateProperty()).setValue(
- event.getStart());
+ item.getItemProperty(getCaptionProperty())
+ .setValue(event.getCaption());
+ item.getItemProperty(getStartDateProperty())
+ .setValue(event.getStart());
item.getItemProperty(getEndDateProperty()).setValue(event.getEnd());
- item.getItemProperty(getStyleNameProperty()).setValue(
- event.getStyleName());
- item.getItemProperty(getDescriptionProperty()).setValue(
- event.getDescription());
+ item.getItemProperty(getStyleNameProperty())
+ .setValue(event.getStyleName());
+ item.getItemProperty(getDescriptionProperty())
+ .setValue(event.getDescription());
}
}
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.addon.calendar.event.CalendarEditableEventProvider#removeEvent
* (com.vaadin.addon.calendar.event.CalendarEvent)
diff --git a/server/src/main/java/com/vaadin/ui/components/calendar/event/BasicEvent.java b/server/src/main/java/com/vaadin/ui/components/calendar/event/BasicEvent.java
index a1ccad2712..fe734d1246 100644
--- a/server/src/main/java/com/vaadin/ui/components/calendar/event/BasicEvent.java
+++ b/server/src/main/java/com/vaadin/ui/components/calendar/event/BasicEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,10 +22,10 @@ import java.util.List;
import com.vaadin.ui.components.calendar.event.CalendarEvent.EventChangeNotifier;
/**
- * Simple implementation of
- * {@link com.vaadin.addon.calendar.event.CalendarEvent CalendarEvent}. Has
- * setters for all required fields and fires events when this event is changed.
- *
+ * Simple implementation of {@link com.vaadin.addon.calendar.event.CalendarEvent
+ * CalendarEvent}. Has setters for all required fields and fires events when
+ * this event is changed.
+ *
* @since 7.1.0
* @author Vaadin Ltd.
*/
@@ -50,7 +50,7 @@ public class BasicEvent implements EditableCalendarEvent, EventChangeNotifier {
/**
* Constructor for creating an event with the same start and end date
- *
+ *
* @param caption
* The caption for the event
* @param description
@@ -68,7 +68,7 @@ public class BasicEvent implements EditableCalendarEvent, EventChangeNotifier {
/**
* Constructor for creating an event with a start date and an end date.
* Start date should be before the end date
- *
+ *
* @param caption
* The caption for the event
* @param description
@@ -88,7 +88,7 @@ public class BasicEvent implements EditableCalendarEvent, EventChangeNotifier {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.addon.calendar.event.CalendarEvent#getCaption()
*/
@Override
@@ -98,7 +98,7 @@ public class BasicEvent implements EditableCalendarEvent, EventChangeNotifier {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.addon.calendar.event.CalendarEvent#getDescription()
*/
@Override
@@ -108,7 +108,7 @@ public class BasicEvent implements EditableCalendarEvent, EventChangeNotifier {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.addon.calendar.event.CalendarEvent#getEnd()
*/
@Override
@@ -118,7 +118,7 @@ public class BasicEvent implements EditableCalendarEvent, EventChangeNotifier {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.addon.calendar.event.CalendarEvent#getStart()
*/
@Override
@@ -128,7 +128,7 @@ public class BasicEvent implements EditableCalendarEvent, EventChangeNotifier {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.addon.calendar.event.CalendarEvent#getStyleName()
*/
@Override
@@ -138,7 +138,7 @@ public class BasicEvent implements EditableCalendarEvent, EventChangeNotifier {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.addon.calendar.event.CalendarEvent#isAllDay()
*/
@Override
@@ -148,7 +148,7 @@ public class BasicEvent implements EditableCalendarEvent, EventChangeNotifier {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.addon.calendar.event.CalendarEventEditor#setCaption(java.lang
* .String)
@@ -161,7 +161,7 @@ public class BasicEvent implements EditableCalendarEvent, EventChangeNotifier {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.addon.calendar.event.CalendarEventEditor#setDescription(java
* .lang.String)
@@ -174,7 +174,7 @@ public class BasicEvent implements EditableCalendarEvent, EventChangeNotifier {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.addon.calendar.event.CalendarEventEditor#setEnd(java.util.
* Date)
@@ -187,7 +187,7 @@ public class BasicEvent implements EditableCalendarEvent, EventChangeNotifier {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.addon.calendar.event.CalendarEventEditor#setStart(java.util
* .Date)
@@ -200,7 +200,7 @@ public class BasicEvent implements EditableCalendarEvent, EventChangeNotifier {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.addon.calendar.event.CalendarEventEditor#setStyleName(java
* .lang.String)
@@ -213,7 +213,7 @@ public class BasicEvent implements EditableCalendarEvent, EventChangeNotifier {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.addon.calendar.event.CalendarEventEditor#setAllDay(boolean)
*/
@@ -225,7 +225,7 @@ public class BasicEvent implements EditableCalendarEvent, EventChangeNotifier {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.addon.calendar.ui.CalendarComponentEvents.EventChangeNotifier
* #addListener
@@ -239,7 +239,7 @@ public class BasicEvent implements EditableCalendarEvent, EventChangeNotifier {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.addon.calendar.ui.CalendarComponentEvents.EventChangeNotifier
* #removeListener
diff --git a/server/src/main/java/com/vaadin/ui/components/calendar/event/BasicEventProvider.java b/server/src/main/java/com/vaadin/ui/components/calendar/event/BasicEventProvider.java
index 9fa6baadad..d9006ae570 100644
--- a/server/src/main/java/com/vaadin/ui/components/calendar/event/BasicEventProvider.java
+++ b/server/src/main/java/com/vaadin/ui/components/calendar/event/BasicEventProvider.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ import com.vaadin.ui.components.calendar.event.CalendarEventProvider.EventSetCha
* CalendarEventProvider}. Use {@link #addEvent(CalendarEvent)} and
* {@link #removeEvent(CalendarEvent)} to add / remove events.
* </p>
- *
+ *
* <p>
* {@link com.vaadin.addon.calendar.event.CalendarEventProvider.EventSetChangeNotifier
* EventSetChangeNotifier} and
@@ -37,7 +37,7 @@ import com.vaadin.ui.components.calendar.event.CalendarEventProvider.EventSetCha
* EventChangeListener} are also implemented, so the Calendar is notified when
* an event is added, changed or removed.
* </p>
- *
+ *
* @since 7.1.0
* @author Vaadin Ltd.
*/
@@ -51,7 +51,7 @@ public class BasicEventProvider implements CalendarEditableEventProvider,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.addon.calendar.event.CalendarEventProvider#getEvents(java.
* util.Date, java.util.Date)
@@ -81,7 +81,7 @@ public class BasicEventProvider implements CalendarEditableEventProvider,
/**
* Does this event provider container this event
- *
+ *
* @param event
* The event to check for
* @return If this provider has the event then true is returned, else false
@@ -92,12 +92,11 @@ public class BasicEventProvider implements CalendarEditableEventProvider,
/*
* (non-Javadoc)
- *
- * @see
- * com.vaadin.addon.calendar.ui.CalendarComponentEvents.EventSetChangeNotifier
- * #addListener
- * (com.vaadin.addon.calendar.ui.CalendarComponentEvents.EventSetChangeListener
- * )
+ *
+ * @see com.vaadin.addon.calendar.ui.CalendarComponentEvents.
+ * EventSetChangeNotifier #addListener
+ * (com.vaadin.addon.calendar.ui.CalendarComponentEvents.
+ * EventSetChangeListener )
*/
@Override
public void addEventSetChangeListener(EventSetChangeListener listener) {
@@ -107,12 +106,11 @@ public class BasicEventProvider implements CalendarEditableEventProvider,
/*
* (non-Javadoc)
- *
- * @see
- * com.vaadin.addon.calendar.ui.CalendarComponentEvents.EventSetChangeNotifier
- * #removeListener
- * (com.vaadin.addon.calendar.ui.CalendarComponentEvents.EventSetChangeListener
- * )
+ *
+ * @see com.vaadin.addon.calendar.ui.CalendarComponentEvents.
+ * EventSetChangeNotifier #removeListener
+ * (com.vaadin.addon.calendar.ui.CalendarComponentEvents.
+ * EventSetChangeListener )
*/
@Override
public void removeEventSetChangeListener(EventSetChangeListener listener) {
@@ -133,7 +131,7 @@ public class BasicEventProvider implements CalendarEditableEventProvider,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.addon.calendar.ui.CalendarComponentEvents.EventChangeListener
* #eventChange
@@ -147,7 +145,7 @@ public class BasicEventProvider implements CalendarEditableEventProvider,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.addon.calendar.event.CalendarEditableEventProvider#addEvent
* (com.vaadin.addon.calendar.event.CalendarEvent)
@@ -163,7 +161,7 @@ public class BasicEventProvider implements CalendarEditableEventProvider,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.addon.calendar.event.CalendarEditableEventProvider#removeEvent
* (com.vaadin.addon.calendar.event.CalendarEvent)
diff --git a/server/src/main/java/com/vaadin/ui/components/calendar/event/CalendarEditableEventProvider.java b/server/src/main/java/com/vaadin/ui/components/calendar/event/CalendarEditableEventProvider.java
index 920600368e..d161f0d0c7 100644
--- a/server/src/main/java/com/vaadin/ui/components/calendar/event/CalendarEditableEventProvider.java
+++ b/server/src/main/java/com/vaadin/ui/components/calendar/event/CalendarEditableEventProvider.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -18,7 +18,7 @@ package com.vaadin.ui.components.calendar.event;
/**
* An event provider which allows adding and removing events
- *
+ *
* @since 7.1.0
* @author Vaadin Ltd.
*/
@@ -26,7 +26,7 @@ public interface CalendarEditableEventProvider extends CalendarEventProvider {
/**
* Adds an event to the event provider
- *
+ *
* @param event
* The event to add
*/
@@ -34,7 +34,7 @@ public interface CalendarEditableEventProvider extends CalendarEventProvider {
/**
* Removes an event from the event provider
- *
+ *
* @param event
* The event
*/
diff --git a/server/src/main/java/com/vaadin/ui/components/calendar/event/CalendarEvent.java b/server/src/main/java/com/vaadin/ui/components/calendar/event/CalendarEvent.java
index 2ad8c777ff..93592e2ea5 100644
--- a/server/src/main/java/com/vaadin/ui/components/calendar/event/CalendarEvent.java
+++ b/server/src/main/java/com/vaadin/ui/components/calendar/event/CalendarEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,42 +23,42 @@ import java.util.Date;
* Event in the calendar. Customize your own event by implementing this
* interface.
* </p>
- *
+ *
* <li>Start and end fields are mandatory.</li>
- *
+ *
* <li>In "allDay" events longer than one day, starting and ending clock times
* are omitted in UI and only dates are shown.</li>
- *
+ *
* @since 7.1.0
* @author Vaadin Ltd.
- *
+ *
*/
public interface CalendarEvent extends Serializable {
/**
* Gets start date of event.
- *
+ *
* @return Start date.
*/
public Date getStart();
/**
* Get end date of event.
- *
+ *
* @return End date;
*/
public Date getEnd();
/**
* Gets caption of event.
- *
+ *
* @return Caption text
*/
public String getCaption();
/**
* Gets description of event. Shown as a tooltip over the event.
- *
+ *
* @return Description text.
*/
public String getDescription();
@@ -68,13 +68,14 @@ public interface CalendarEvent extends Serializable {
* Gets style name of event. In the client, style name will be set to the
* event's element class name and can be styled by CSS
* </p>
- * Styling example:</br> <code>Java code: </br>
+ * Styling example:</br>
+ * <code>Java code: </br>
* event.setStyleName("color1");
* </br></br>
* CSS:</br>
* .v-calendar-event-color1 {</br>
* &nbsp;&nbsp;&nbsp;background-color: #9effae;</br>}</code>
- *
+ *
* @return Style name.
*/
public String getStyleName();
@@ -83,7 +84,7 @@ public interface CalendarEvent extends Serializable {
* An all-day event typically does not occur at a specific time but targets
* a whole day or days. The rendering of all-day events differs from normal
* events.
- *
+ *
* @return true if this event is an all-day event, false otherwise
*/
public boolean isAllDay();
@@ -128,7 +129,7 @@ public interface CalendarEvent extends Serializable {
/**
* Add a listener to listen for EventChangeEvents. These events are
* fired when a events properties are changed.
- *
+ *
* @param listener
* The listener to add
*/
@@ -136,7 +137,7 @@ public interface CalendarEvent extends Serializable {
/**
* Remove a listener from the event provider.
- *
+ *
* @param listener
* The listener to remove
*/
diff --git a/server/src/main/java/com/vaadin/ui/components/calendar/event/CalendarEventProvider.java b/server/src/main/java/com/vaadin/ui/components/calendar/event/CalendarEventProvider.java
index 2a8ec7e834..802242d2d7 100644
--- a/server/src/main/java/com/vaadin/ui/components/calendar/event/CalendarEventProvider.java
+++ b/server/src/main/java/com/vaadin/ui/components/calendar/event/CalendarEventProvider.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ import java.util.List;
/**
* Interface for querying events. The Vaadin Calendar always has a
* CalendarEventProvider set.
- *
+ *
* @since 7.1.0
* @author Vaadin Ltd.
*/
@@ -34,14 +34,14 @@ public interface CalendarEventProvider extends Serializable {
* shown, which is not guaranteed to be the same as the date range that is
* set.
* </p>
- *
+ *
* <p>
* For example, if you set the date range to be monday 22.2.2010 - wednesday
* 24.2.2010, the used Event Provider will be queried for events between
* monday 22.2.2010 00:00 and sunday 28.2.2010 23:59. Generally you can
* expect the date range to be expanded to whole days and whole weeks.
* </p>
- *
+ *
* @param startDate
* Start date
* @param endDate
@@ -55,7 +55,7 @@ public interface CalendarEventProvider extends Serializable {
* should refresh its view from the
* {@link com.vaadin.addon.calendar.event.CalendarEventProvider
* CalendarEventProvider} .
- *
+ *
*/
@SuppressWarnings("serial")
public class EventSetChangeEvent implements Serializable {
@@ -95,7 +95,7 @@ public interface CalendarEventProvider extends Serializable {
/**
* Add a listener for listening to when new events are adding or removed
* from the event provider.
- *
+ *
* @param listener
* The listener to add
*/
@@ -103,7 +103,7 @@ public interface CalendarEventProvider extends Serializable {
/**
* Remove a listener which listens to {@link EventSetChangeEvent}-events
- *
+ *
* @param listener
* The listener to remove
*/
diff --git a/server/src/main/java/com/vaadin/ui/components/calendar/event/EditableCalendarEvent.java b/server/src/main/java/com/vaadin/ui/components/calendar/event/EditableCalendarEvent.java
index df708697b8..9ff136c3ce 100644
--- a/server/src/main/java/com/vaadin/ui/components/calendar/event/EditableCalendarEvent.java
+++ b/server/src/main/java/com/vaadin/ui/components/calendar/event/EditableCalendarEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,13 +25,13 @@ import java.util.Date;
* CalendarEvent} fields. For descriptions on the fields, refer to the extended
* interface.
* </p>
- *
+ *
* <p>
* This interface is used by some of the basic Calendar event handlers in the
* <code>com.vaadin.addon.calendar.ui.handler</code> package to determine
* whether an event can be edited.
* </p>
- *
+ *
* @since 7.1
* @author Vaadin Ltd.
*/
@@ -39,7 +39,7 @@ public interface EditableCalendarEvent extends CalendarEvent {
/**
* Set the visible text in the calendar for the event.
- *
+ *
* @param caption
* The text to show in the calendar
*/
@@ -48,7 +48,7 @@ public interface EditableCalendarEvent extends CalendarEvent {
/**
* Set the description of the event. This is shown in the calendar when
* hoovering over the event.
- *
+ *
* @param description
* The text which describes the event
*/
@@ -56,7 +56,7 @@ public interface EditableCalendarEvent extends CalendarEvent {
/**
* Set the end date of the event. Must be after the start date.
- *
+ *
* @param end
* The end date to set
*/
@@ -64,7 +64,7 @@ public interface EditableCalendarEvent extends CalendarEvent {
/**
* Set the start date for the event. Must be before the end date
- *
+ *
* @param start
* The start date of the event
*/
@@ -72,16 +72,16 @@ public interface EditableCalendarEvent extends CalendarEvent {
/**
* Set the style name for the event used for styling the event cells
- *
+ *
* @param styleName
* The stylename to use
- *
+ *
*/
void setStyleName(String styleName);
/**
* Does the event span the whole day. If so then set this to true
- *
+ *
* @param isAllDay
* True if the event spans the whole day. In this case the start
* and end times are ignored.
diff --git a/server/src/main/java/com/vaadin/ui/components/calendar/handler/BasicBackwardHandler.java b/server/src/main/java/com/vaadin/ui/components/calendar/handler/BasicBackwardHandler.java
index 0e99b26856..db8cc3627e 100644
--- a/server/src/main/java/com/vaadin/ui/components/calendar/handler/BasicBackwardHandler.java
+++ b/server/src/main/java/com/vaadin/ui/components/calendar/handler/BasicBackwardHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.ui.components.calendar.CalendarComponentEvents.BackwardHandler
/**
* Implements basic functionality needed to enable backwards navigation.
- *
+ *
* @since 7.1
* @author Vaadin Ltd.
*/
@@ -33,7 +33,7 @@ public class BasicBackwardHandler implements BackwardHandler {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.addon.calendar.ui.CalendarComponentEvents.BackwardHandler#
* backward
@@ -45,7 +45,8 @@ public class BasicBackwardHandler implements BackwardHandler {
Date end = event.getComponent().getEndDate();
// calculate amount to move back
- int durationInDays = (int) (((end.getTime()) - start.getTime()) / DateConstants.DAYINMILLIS);
+ int durationInDays = (int) (((end.getTime()) - start.getTime())
+ / DateConstants.DAYINMILLIS);
durationInDays++;
// for week view durationInDays = -7, for day view durationInDays = -1
durationInDays = -durationInDays;
@@ -80,7 +81,7 @@ public class BasicBackwardHandler implements BackwardHandler {
/**
* Set the start and end dates for the event
- *
+ *
* @param event
* The event that the start and end dates should be set
* @param start
diff --git a/server/src/main/java/com/vaadin/ui/components/calendar/handler/BasicDateClickHandler.java b/server/src/main/java/com/vaadin/ui/components/calendar/handler/BasicDateClickHandler.java
index 8d366ed52f..a42d741b04 100644
--- a/server/src/main/java/com/vaadin/ui/components/calendar/handler/BasicDateClickHandler.java
+++ b/server/src/main/java/com/vaadin/ui/components/calendar/handler/BasicDateClickHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.ui.components.calendar.CalendarComponentEvents.DateClickHandle
/**
* Implements basic functionality needed to switch to day view when a single day
* is clicked.
- *
+ *
* @since 7.1
* @author Vaadin Ltd.
*/
@@ -33,7 +33,7 @@ public class BasicDateClickHandler implements DateClickHandler {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.addon.calendar.ui.CalendarComponentEvents.DateClickHandler
* #dateClick
@@ -55,7 +55,7 @@ public class BasicDateClickHandler implements DateClickHandler {
/**
* Set the start and end dates for the event
- *
+ *
* @param event
* The event that the start and end dates should be set
* @param start
diff --git a/server/src/main/java/com/vaadin/ui/components/calendar/handler/BasicEventMoveHandler.java b/server/src/main/java/com/vaadin/ui/components/calendar/handler/BasicEventMoveHandler.java
index 418e03d24a..b9f2758f1d 100644
--- a/server/src/main/java/com/vaadin/ui/components/calendar/handler/BasicEventMoveHandler.java
+++ b/server/src/main/java/com/vaadin/ui/components/calendar/handler/BasicEventMoveHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.ui.components.calendar.event.EditableCalendarEvent;
/**
* Implements basic functionality needed to enable moving events.
- *
+ *
* @since 7.1
* @author Vaadin Ltd.
*/
@@ -33,7 +33,7 @@ public class BasicEventMoveHandler implements EventMoveHandler {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.addon.calendar.ui.CalendarComponentEvents.EventMoveHandler
* #eventMove
@@ -52,14 +52,14 @@ public class BasicEventMoveHandler implements EventMoveHandler {
// Update event dates
long length = editableEvent.getEnd().getTime()
- editableEvent.getStart().getTime();
- setDates(editableEvent, newFromTime, new Date(newFromTime.getTime()
- + length));
+ setDates(editableEvent, newFromTime,
+ new Date(newFromTime.getTime() + length));
}
}
/**
* Set the start and end dates for the event
- *
+ *
* @param event
* The event that the start and end dates should be set
* @param start
diff --git a/server/src/main/java/com/vaadin/ui/components/calendar/handler/BasicEventResizeHandler.java b/server/src/main/java/com/vaadin/ui/components/calendar/handler/BasicEventResizeHandler.java
index 6141c84c5b..96055fa3b6 100644
--- a/server/src/main/java/com/vaadin/ui/components/calendar/handler/BasicEventResizeHandler.java
+++ b/server/src/main/java/com/vaadin/ui/components/calendar/handler/BasicEventResizeHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.ui.components.calendar.event.EditableCalendarEvent;
/**
* Implements basic functionality needed to enable event resizing.
- *
+ *
* @since 7.1
* @author Vaadin Ltd.
*/
@@ -33,7 +33,7 @@ public class BasicEventResizeHandler implements EventResizeHandler {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.addon.calendar.ui.CalendarComponentEvents.EventResizeHandler
* #eventResize
@@ -55,7 +55,7 @@ public class BasicEventResizeHandler implements EventResizeHandler {
/**
* Set the start and end dates for the event
- *
+ *
* @param event
* The event that the start and end dates should be set
* @param start
diff --git a/server/src/main/java/com/vaadin/ui/components/calendar/handler/BasicForwardHandler.java b/server/src/main/java/com/vaadin/ui/components/calendar/handler/BasicForwardHandler.java
index 45b44cb673..242ceca573 100644
--- a/server/src/main/java/com/vaadin/ui/components/calendar/handler/BasicForwardHandler.java
+++ b/server/src/main/java/com/vaadin/ui/components/calendar/handler/BasicForwardHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.ui.components.calendar.CalendarComponentEvents.ForwardHandler;
/**
* Implements basic functionality needed to enable forward navigation.
- *
+ *
* @since 7.1
* @author Vaadin Ltd.
*/
@@ -33,9 +33,9 @@ public class BasicForwardHandler implements ForwardHandler {
/*
* (non-Javadoc)
- *
- * @see
- * com.vaadin.addon.calendar.ui.CalendarComponentEvents.ForwardHandler#forward
+ *
+ * @see com.vaadin.addon.calendar.ui.CalendarComponentEvents.ForwardHandler#
+ * forward
* (com.vaadin.addon.calendar.ui.CalendarComponentEvents.ForwardEvent)
*/
@Override
@@ -44,7 +44,8 @@ public class BasicForwardHandler implements ForwardHandler {
Date end = event.getComponent().getEndDate();
// calculate amount to move forward
- int durationInDays = (int) (((end.getTime()) - start.getTime()) / DateConstants.DAYINMILLIS);
+ int durationInDays = (int) (((end.getTime()) - start.getTime())
+ / DateConstants.DAYINMILLIS);
// for week view durationInDays = 7, for day view durationInDays = 1
durationInDays++;
@@ -78,7 +79,7 @@ public class BasicForwardHandler implements ForwardHandler {
/**
* Set the start and end dates for the event
- *
+ *
* @param event
* The event that the start and end dates should be set
* @param start
diff --git a/server/src/main/java/com/vaadin/ui/components/calendar/handler/BasicWeekClickHandler.java b/server/src/main/java/com/vaadin/ui/components/calendar/handler/BasicWeekClickHandler.java
index c52d0a5a82..824204f632 100644
--- a/server/src/main/java/com/vaadin/ui/components/calendar/handler/BasicWeekClickHandler.java
+++ b/server/src/main/java/com/vaadin/ui/components/calendar/handler/BasicWeekClickHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.ui.components.calendar.CalendarComponentEvents.WeekClickHandle
/**
* Implements basic functionality needed to change to week view when a week
* number is clicked.
- *
+ *
* @since 7.1
* @author Vaadin Ltd.
*/
@@ -34,7 +34,7 @@ public class BasicWeekClickHandler implements WeekClickHandler {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.addon.calendar.ui.CalendarComponentEvents.WeekClickHandler
* #weekClick
@@ -66,7 +66,7 @@ public class BasicWeekClickHandler implements WeekClickHandler {
/**
* Set the start and end dates for the event
- *
+ *
* @param event
* The event that the start and end dates should be set
* @param start
diff --git a/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorChangeEvent.java b/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorChangeEvent.java
index b55b55357f..b94c267b47 100644
--- a/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorChangeEvent.java
+++ b/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorChangeEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ import com.vaadin.ui.Component.Event;
/**
* The color changed event which is passed to the listeners when a color change
* occurs.
- *
+ *
* @since 7.0.0
*/
public class ColorChangeEvent extends Event {
diff --git a/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorChangeListener.java b/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorChangeListener.java
index 6db148989c..316935a727 100644
--- a/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorChangeListener.java
+++ b/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorChangeListener.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,16 +24,16 @@ import java.io.Serializable;
* component using the component's <code>addColorChangeListener</code> method.
* When the colorChange event occurs, that object's appropriate method is
* invoked.
- *
+ *
* @since 7.0.0
- *
+ *
* @see ColorChangeEvent
*/
public interface ColorChangeListener extends Serializable {
/**
* Called when a new color has been selected.
- *
+ *
* @param event
* An event containing information about the color change.
*/
diff --git a/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerGradient.java b/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerGradient.java
index 81b178e4f0..7bdf7afcdc 100644
--- a/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerGradient.java
+++ b/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerGradient.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,11 +25,11 @@ import com.vaadin.ui.AbstractComponent;
/**
* A component that represents a color gradient within a color picker.
- *
+ *
* @since 7.0.0
*/
-public class ColorPickerGradient extends AbstractComponent implements
- ColorSelector {
+public class ColorPickerGradient extends AbstractComponent
+ implements ColorSelector {
private static final Method COLOR_CHANGE_METHOD;
static {
@@ -77,7 +77,7 @@ public class ColorPickerGradient extends AbstractComponent implements
/**
* Instantiates a new color picker gradient.
- *
+ *
* @param id
* the id
* @param converter
@@ -114,7 +114,7 @@ public class ColorPickerGradient extends AbstractComponent implements
/**
* Sets the background color.
- *
+ *
* @param color
* the new background color
*/
@@ -129,7 +129,7 @@ public class ColorPickerGradient extends AbstractComponent implements
/**
* Notifies the listeners that the color has changed
- *
+ *
* @param color
* The color which it changed to
*/
diff --git a/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerGrid.java b/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerGrid.java
index 002f36d99d..41c1cacf36 100644
--- a/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerGrid.java
+++ b/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerGrid.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,10 +27,11 @@ import com.vaadin.ui.AbstractComponent;
/**
* A component that represents a color selection grid within a color picker.
- *
+ *
* @since 7.0.0
*/
-public class ColorPickerGrid extends AbstractComponent implements ColorSelector {
+public class ColorPickerGrid extends AbstractComponent
+ implements ColorSelector {
private static final String STYLENAME = "v-colorpicker-grid";
@@ -98,7 +99,7 @@ public class ColorPickerGrid extends AbstractComponent implements ColorSelector
/**
* Instantiates a new color picker grid.
- *
+ *
* @param rows
* the rows
* @param columns
@@ -113,7 +114,7 @@ public class ColorPickerGrid extends AbstractComponent implements ColorSelector
/**
* Instantiates a new color picker grid.
- *
+ *
* @param colors
* the colors
*/
@@ -162,7 +163,7 @@ public class ColorPickerGrid extends AbstractComponent implements ColorSelector
/**
* Sets the color grid.
- *
+ *
* @param colors
* the new color grid
*/
@@ -183,7 +184,7 @@ public class ColorPickerGrid extends AbstractComponent implements ColorSelector
/**
* Adds a color change listener
- *
+ *
* @param listener
* The color change listener
*/
@@ -199,7 +200,7 @@ public class ColorPickerGrid extends AbstractComponent implements ColorSelector
/**
* Removes a color change listener
- *
+ *
* @param listener
* The listener
*/
@@ -218,7 +219,7 @@ public class ColorPickerGrid extends AbstractComponent implements ColorSelector
/**
* Sets the position.
- *
+ *
* @param x
* the x
* @param y
@@ -233,7 +234,7 @@ public class ColorPickerGrid extends AbstractComponent implements ColorSelector
/**
* Gets the position.
- *
+ *
* @return the position
*/
public int[] getPosition() {
@@ -242,7 +243,7 @@ public class ColorPickerGrid extends AbstractComponent implements ColorSelector
/**
* Notifies the listeners that a color change has occurred
- *
+ *
* @param color
* The color which it changed to
*/
diff --git a/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerHistory.java b/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerHistory.java
index a3297a282c..e1b312c1e5 100644
--- a/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerHistory.java
+++ b/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerHistory.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,11 +28,11 @@ import com.vaadin.ui.CustomComponent;
/**
* A component that represents color selection history within a color picker.
- *
+ *
* @since 7.0.0
*/
-public class ColorPickerHistory extends CustomComponent implements
- ColorSelector, ColorChangeListener {
+public class ColorPickerHistory extends CustomComponent
+ implements ColorSelector, ColorChangeListener {
private static final String STYLENAME = "v-colorpicker-history";
@@ -96,8 +96,8 @@ public class ColorPickerHistory extends CustomComponent implements
@SuppressWarnings("unchecked")
private ArrayBlockingQueue<Color> getColorHistory() {
if (isAttached()) {
- Object colorHistory = getSession().getAttribute(
- "colorPickerHistory");
+ Object colorHistory = getSession()
+ .getAttribute("colorPickerHistory");
if (colorHistory instanceof ArrayBlockingQueue<?>) {
return (ArrayBlockingQueue<Color>) colorHistory;
}
@@ -167,7 +167,7 @@ public class ColorPickerHistory extends CustomComponent implements
/**
* Gets the history.
- *
+ *
* @return the history
*/
public List<Color> getHistory() {
@@ -178,10 +178,10 @@ public class ColorPickerHistory extends CustomComponent implements
/**
* Checks if the history contains given color.
- *
+ *
* @param c
* the color
- *
+ *
* @return true, if successful
*/
public boolean hasColor(Color c) {
@@ -190,7 +190,7 @@ public class ColorPickerHistory extends CustomComponent implements
/**
* Adds a color change listener
- *
+ *
* @param listener
* The listener
*/
@@ -201,7 +201,7 @@ public class ColorPickerHistory extends CustomComponent implements
/**
* Removes a color change listener
- *
+ *
* @param listener
* The listener
*/
diff --git a/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerPopup.java b/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerPopup.java
index 86ac0111ad..2378c90b77 100644
--- a/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerPopup.java
+++ b/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerPopup.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -45,11 +45,11 @@ import com.vaadin.ui.Window;
/**
* A component that represents color selection popup within a color picker.
- *
+ *
* @since 7.0.0
*/
-public class ColorPickerPopup extends Window implements ClickListener,
- ColorChangeListener, ColorSelector {
+public class ColorPickerPopup extends Window
+ implements ClickListener, ColorChangeListener, ColorSelector {
private static final String STYLENAME = "v-colorpicker-popup";
@@ -256,7 +256,7 @@ public class ColorPickerPopup extends Window implements ClickListener,
/**
* Creates the RGB tab.
- *
+ *
* @return the component
*/
private Component createRGBTab(Color color) {
@@ -286,8 +286,8 @@ public class ColorPickerPopup extends Window implements ClickListener,
public void valueChange(ValueChangeEvent event) {
double red = (Double) event.getProperty().getValue();
if (!updatingColors) {
- Color newColor = new Color((int) red, selectedColor
- .getGreen(), selectedColor.getBlue());
+ Color newColor = new Color((int) red,
+ selectedColor.getGreen(), selectedColor.getBlue());
setColor(newColor);
}
}
@@ -337,7 +337,7 @@ public class ColorPickerPopup extends Window implements ClickListener,
/**
* Creates the hsv tab.
- *
+ *
* @return the component
*/
private Component createHSVTab(Color color) {
@@ -371,16 +371,18 @@ public class ColorPickerPopup extends Window implements ClickListener,
@Override
public void valueChange(ValueChangeEvent event) {
if (!updatingColors) {
- float hue = (Float.parseFloat(event.getProperty()
- .getValue().toString())) / 360f;
- float saturation = (Float.parseFloat(saturationSlider
- .getValue().toString())) / 100f;
- float value = (Float.parseFloat(valueSlider.getValue()
- .toString())) / 100f;
+ float hue = (Float.parseFloat(
+ event.getProperty().getValue().toString())) / 360f;
+ float saturation = (Float
+ .parseFloat(saturationSlider.getValue().toString()))
+ / 100f;
+ float value = (Float
+ .parseFloat(valueSlider.getValue().toString()))
+ / 100f;
// Set the color
- Color color = new Color(Color.HSVtoRGB(hue, saturation,
- value));
+ Color color = new Color(
+ Color.HSVtoRGB(hue, saturation, value));
setColor(color);
/*
@@ -402,14 +404,16 @@ public class ColorPickerPopup extends Window implements ClickListener,
@Override
public void valueChange(ValueChangeEvent event) {
if (!updatingColors) {
- float hue = (Float.parseFloat(hueSlider.getValue()
- .toString())) / 360f;
- float saturation = (Float.parseFloat(event.getProperty()
- .getValue().toString())) / 100f;
- float value = (Float.parseFloat(valueSlider.getValue()
- .toString())) / 100f;
- Color color = new Color(Color.HSVtoRGB(hue, saturation,
- value));
+ float hue = (Float
+ .parseFloat(hueSlider.getValue().toString()))
+ / 360f;
+ float saturation = (Float.parseFloat(
+ event.getProperty().getValue().toString())) / 100f;
+ float value = (Float
+ .parseFloat(valueSlider.getValue().toString()))
+ / 100f;
+ Color color = new Color(
+ Color.HSVtoRGB(hue, saturation, value));
setColor(color);
}
}
@@ -423,15 +427,17 @@ public class ColorPickerPopup extends Window implements ClickListener,
@Override
public void valueChange(ValueChangeEvent event) {
if (!updatingColors) {
- float hue = (Float.parseFloat(hueSlider.getValue()
- .toString())) / 360f;
- float saturation = (Float.parseFloat(saturationSlider
- .getValue().toString())) / 100f;
- float value = (Float.parseFloat(event.getProperty()
- .getValue().toString())) / 100f;
-
- Color color = new Color(Color.HSVtoRGB(hue, saturation,
- value));
+ float hue = (Float
+ .parseFloat(hueSlider.getValue().toString()))
+ / 360f;
+ float saturation = (Float
+ .parseFloat(saturationSlider.getValue().toString()))
+ / 100f;
+ float value = (Float.parseFloat(
+ event.getProperty().getValue().toString())) / 100f;
+
+ Color color = new Color(
+ Color.HSVtoRGB(hue, saturation, value));
setColor(color);
}
}
@@ -445,7 +451,7 @@ public class ColorPickerPopup extends Window implements ClickListener,
/**
* Creates the select tab.
- *
+ *
* @return the component
*/
private Component createSelectTab() {
@@ -504,7 +510,7 @@ public class ColorPickerPopup extends Window implements ClickListener,
/**
* Gets the history.
- *
+ *
* @return the history
*/
public ColorPickerHistory getHistory() {
@@ -535,7 +541,7 @@ public class ColorPickerPopup extends Window implements ClickListener,
/**
* Gets the color history.
- *
+ *
* @return the color history
*/
public List<Color> getColorHistory() {
@@ -568,10 +574,10 @@ public class ColorPickerPopup extends Window implements ClickListener,
blueSlider.setValue(((Integer) color.getBlue()).doubleValue());
greenSlider.setValue(((Integer) color.getGreen()).doubleValue());
} catch (ValueOutOfBoundsException e) {
- getLogger().log(
- Level.WARNING,
+ getLogger().log(Level.WARNING,
"Unable to set RGB color value to " + color.getRed() + ","
- + color.getGreen() + "," + color.getBlue(), e);
+ + color.getGreen() + "," + color.getBlue(),
+ e);
}
}
@@ -581,10 +587,8 @@ public class ColorPickerPopup extends Window implements ClickListener,
saturationSlider.setValue(((Float) (hsv[1] * 100f)).doubleValue());
valueSlider.setValue(((Float) (hsv[2] * 100f)).doubleValue());
} catch (ValueOutOfBoundsException e) {
- getLogger().log(
- Level.WARNING,
- "Unable to set HSV color value to " + hsv[0] + "," + hsv[1]
- + "," + hsv[2], e);
+ getLogger().log(Level.WARNING, "Unable to set HSV color value to "
+ + hsv[0] + "," + hsv[1] + "," + hsv[2], e);
}
}
@@ -600,7 +604,7 @@ public class ColorPickerPopup extends Window implements ClickListener,
/**
* Checks the visibility of the given tab
- *
+ *
* @param tab
* The tab to check
* @return true if tab is visible, false otherwise
@@ -617,7 +621,7 @@ public class ColorPickerPopup extends Window implements ClickListener,
/**
* How many tabs are visible
- *
+ *
* @return The number of tabs visible
*/
private int tabsNumVisible() {
@@ -639,7 +643,7 @@ public class ColorPickerPopup extends Window implements ClickListener,
/**
* Set RGB tab visibility
- *
+ *
* @param visible
* The visibility of the RGB tab
*/
@@ -655,7 +659,7 @@ public class ColorPickerPopup extends Window implements ClickListener,
/**
* Set HSV tab visibility
- *
+ *
* @param visible
* The visibility of the HSV tab
*/
@@ -671,7 +675,7 @@ public class ColorPickerPopup extends Window implements ClickListener,
/**
* Set Swatches tab visibility
- *
+ *
* @param visible
* The visibility of the Swatches tab
*/
@@ -687,7 +691,7 @@ public class ColorPickerPopup extends Window implements ClickListener,
/**
* Set the History visibility
- *
+ *
* @param visible
*/
public void setHistoryVisible(boolean visible) {
@@ -697,7 +701,7 @@ public class ColorPickerPopup extends Window implements ClickListener,
/**
* Set the preview visibility
- *
+ *
* @param visible
*/
public void setPreviewVisible(boolean visible) {
@@ -765,7 +769,8 @@ public class ColorPickerPopup extends Window implements ClickListener,
public Color calculate(int x, int y) {
float saturation = 1f - (y / 220.0f);
float value = (x / 220.0f);
- float hue = Float.parseFloat(hueSlider.getValue().toString()) / 360f;
+ float hue = Float.parseFloat(hueSlider.getValue().toString())
+ / 360f;
Color color = new Color(Color.HSVtoRGB(hue, saturation, value));
return color;
diff --git a/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerPreview.java b/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerPreview.java
index 21a3630de2..a4af3f6264 100644
--- a/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerPreview.java
+++ b/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerPreview.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,11 +26,11 @@ import com.vaadin.ui.TextField;
/**
* A component that represents color selection preview within a color picker.
- *
+ *
* @since 7.0.0
*/
-public class ColorPickerPreview extends CssLayout implements ColorSelector,
- ValueChangeListener {
+public class ColorPickerPreview extends CssLayout
+ implements ColorSelector, ValueChangeListener {
private static final String STYLE_DARK_COLOR = "v-textfield-dark";
private static final String STYLE_LIGHT_COLOR = "v-textfield-light";
@@ -98,7 +98,8 @@ public class ColorPickerPreview extends CssLayout implements ColorSelector,
// Set the text color
field.removeStyleName(STYLE_DARK_COLOR);
field.removeStyleName(STYLE_LIGHT_COLOR);
- if (this.color.getRed() + this.color.getGreen() + this.color.getBlue() < 3 * 128) {
+ if (this.color.getRed() + this.color.getGreen()
+ + this.color.getBlue() < 3 * 128) {
field.addStyleName(STYLE_DARK_COLOR);
} else {
field.addStyleName(STYLE_LIGHT_COLOR);
@@ -147,7 +148,8 @@ public class ColorPickerPreview extends CssLayout implements ColorSelector,
int green = Integer.parseInt(colors[1]);
int blue = Integer.parseInt(colors[2]);
if (colors.length > 3) {
- int alpha = (int) (Double.parseDouble(colors[3]) * 255d);
+ int alpha = (int) (Double.parseDouble(colors[3])
+ * 255d);
color = new Color(red, green, blue, alpha);
} else {
color = new Color(red, green, blue);
@@ -159,14 +161,15 @@ public class ColorPickerPreview extends CssLayout implements ColorSelector,
value.length() - 1).split(",");
int hue = Integer.parseInt(colors[0]);
- int saturation = Integer.parseInt(colors[1]
- .replace("%", ""));
+ int saturation = Integer
+ .parseInt(colors[1].replace("%", ""));
int lightness = Integer
.parseInt(colors[2].replace("%", ""));
int rgb = Color.HSLtoRGB(hue, saturation, lightness);
if (colors.length > 3) {
- int alpha = (int) (Double.parseDouble(colors[3]) * 255d);
+ int alpha = (int) (Double.parseDouble(colors[3])
+ * 255d);
color = new Color(rgb);
color.setAlpha(alpha);
} else {
diff --git a/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerSelect.java b/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerSelect.java
index 8e441b25ee..f247e9c6a7 100644
--- a/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerSelect.java
+++ b/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerSelect.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,11 +24,11 @@ import com.vaadin.ui.VerticalLayout;
/**
* A component that represents color selection swatches within a color picker.
- *
+ *
* @since 7.0.0
*/
-public class ColorPickerSelect extends CustomComponent implements
- ColorSelector, ValueChangeListener {
+public class ColorPickerSelect extends CustomComponent
+ implements ColorSelector, ValueChangeListener {
/** The range. */
private final ComboBox range;
@@ -48,7 +48,7 @@ public class ColorPickerSelect extends CustomComponent implements
/**
* Instantiates a new color range property id.
- *
+ *
* @param caption
* the caption
*/
@@ -64,7 +64,7 @@ public class ColorPickerSelect extends CustomComponent implements
/**
* Instantiates a new color picker select.
- *
+ *
* @param rows
* the rows
* @param columns
@@ -101,12 +101,12 @@ public class ColorPickerSelect extends CustomComponent implements
/**
* Creates the all colors.
- *
+ *
* @param rows
* the rows
* @param columns
* the columns
- *
+ *
* @return the color[][]
*/
private Color[][] createAllColors(int rows, int columns) {
@@ -130,8 +130,8 @@ public class ColorPickerSelect extends CustomComponent implements
value = 1f - ((row - (rows / 2f)) / (rows / 2f));
}
- colors[row][col] = new Color(Color.HSVtoRGB(hue,
- saturation, value));
+ colors[row][col] = new Color(
+ Color.HSVtoRGB(hue, saturation, value));
}
// The last row should have the black&white gradient
@@ -140,8 +140,8 @@ public class ColorPickerSelect extends CustomComponent implements
float saturation = 0f;
float value = 1f - ((float) col / (float) columns);
- colors[row][col] = new Color(Color.HSVtoRGB(hue,
- saturation, value));
+ colors[row][col] = new Color(
+ Color.HSVtoRGB(hue, saturation, value));
}
}
}
@@ -151,14 +151,14 @@ public class ColorPickerSelect extends CustomComponent implements
/**
* Creates the color.
- *
+ *
* @param color
* the color
* @param rows
* the rows
* @param columns
* the columns
- *
+ *
* @return the color[][]
*/
private Color[][] createColors(Color color, int rows, int columns) {
@@ -182,12 +182,12 @@ public class ColorPickerSelect extends CustomComponent implements
/ (((float) rows * (float) columns) / 2f);
} else {
index -= ((rows * columns) / 2);
- value = 1f - index
- / (((float) rows * (float) columns) / 2f);
+ value = 1f
+ - index / (((float) rows * (float) columns) / 2f);
}
- colors[row][col] = new Color(Color.HSVtoRGB(hue, saturation,
- value));
+ colors[row][col] = new Color(
+ Color.HSVtoRGB(hue, saturation, value));
}
}
@@ -224,9 +224,11 @@ public class ColorPickerSelect extends CustomComponent implements
grid.setColorGrid(createAllColors(14, 10));
} else if (event.getProperty().getValue() == ColorRangePropertyId.RED) {
grid.setColorGrid(createColors(new Color(0xFF, 0, 0), 14, 10));
- } else if (event.getProperty().getValue() == ColorRangePropertyId.GREEN) {
+ } else if (event.getProperty()
+ .getValue() == ColorRangePropertyId.GREEN) {
grid.setColorGrid(createColors(new Color(0, 0xFF, 0), 14, 10));
- } else if (event.getProperty().getValue() == ColorRangePropertyId.BLUE) {
+ } else if (event.getProperty()
+ .getValue() == ColorRangePropertyId.BLUE) {
grid.setColorGrid(createColors(new Color(0, 0, 0xFF), 14, 10));
}
}
diff --git a/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorSelector.java b/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorSelector.java
index c282c22f62..28e6781aee 100644
--- a/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorSelector.java
+++ b/server/src/main/java/com/vaadin/ui/components/colorpicker/ColorSelector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,14 +21,14 @@ import com.vaadin.shared.ui.colorpicker.Color;
/**
* An interface for a color selector.
- *
+ *
* @since 7.0.0
*/
public interface ColorSelector extends Serializable, HasColorChangeListener {
/**
* Sets the color.
- *
+ *
* @param color
* the new color
*/
@@ -36,7 +36,7 @@ public interface ColorSelector extends Serializable, HasColorChangeListener {
/**
* Gets the color.
- *
+ *
* @return the color
*/
public Color getColor();
diff --git a/server/src/main/java/com/vaadin/ui/components/colorpicker/HasColorChangeListener.java b/server/src/main/java/com/vaadin/ui/components/colorpicker/HasColorChangeListener.java
index eb16d8cbbe..c34a191175 100644
--- a/server/src/main/java/com/vaadin/ui/components/colorpicker/HasColorChangeListener.java
+++ b/server/src/main/java/com/vaadin/ui/components/colorpicker/HasColorChangeListener.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,14 +21,14 @@ public interface HasColorChangeListener extends Serializable {
/**
* Adds a {@link ColorChangeListener} to the component.
- *
+ *
* @param listener
*/
void addColorChangeListener(ColorChangeListener listener);
/**
* Removes a {@link ColorChangeListener} from the component.
- *
+ *
* @param listener
*/
void removeColorChangeListener(ColorChangeListener listener);
diff --git a/server/src/main/java/com/vaadin/ui/declarative/Design.java b/server/src/main/java/com/vaadin/ui/declarative/Design.java
index a12cd65557..7641a84cf2 100644
--- a/server/src/main/java/com/vaadin/ui/declarative/Design.java
+++ b/server/src/main/java/com/vaadin/ui/declarative/Design.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -45,18 +45,18 @@ import com.vaadin.ui.declarative.DesignContext.ComponentCreationListener;
* Design is used for reading a component hierarchy from an html string or input
* stream and, conversely, for writing an html representation corresponding to a
* given component hierarchy.
- *
+ *
* <p>
* In html form a valid nonempty component hierarchy contains a single root
* element located under the &lt;body&gt; tag. A hierarchy of components is
* achieved by nesting other elements under the root element. An empty component
* hierarchy is represented as no elements under the &lt;body&gt; tag.
- *
+ *
* <p>
* For writing a component hierarchy the root element is specified as a
* Component parameter or as a DesignContext object containing the root
* Component. An empty hierarchy can be written by giving a null root Component.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -73,19 +73,19 @@ public class Design implements Serializable {
* <p>
* Use {@link Design#setComponentFactory(ComponentFactory)} to configure
* Vaadin to use a custom component factory.
- *
+ *
* @since 7.4.1
*/
public interface ComponentFactory extends Serializable {
/**
* Creates a component based on the fully qualified name derived from
* the tag name in the design.
- *
+ *
* @param fullyQualifiedClassName
* the fully qualified name of the component to create
* @param context
* the design context for which the component is created
- *
+ *
* @return a newly created component
*/
public Component createComponent(String fullyQualifiedClassName,
@@ -98,7 +98,7 @@ public class Design implements Serializable {
* <p>
* Use {@link Design#setComponentMapper(ComponentMapper)} to configure
* Vaadin to use a custom component mapper.
- *
+ *
* @since 7.5.0
* @author Vaadin Ltd
*/
@@ -111,7 +111,7 @@ public class Design implements Serializable {
* {@link #componentToTag(Component, DesignContext)} so that the
* resolved tag for a created component is the same as the tag for which
* the component was created.
- *
+ *
* @param tag
* the tag name to create a component for
* @param componentFactory
@@ -126,21 +126,22 @@ public class Design implements Serializable {
/**
* Resolves a tag name from a component.
- *
+ *
* @param component
* the component to get a tag name for
* @param context
* the design context for which the tag name is needed
* @return the tag name corresponding to the component
*/
- public String componentToTag(Component component, DesignContext context);
+ public String componentToTag(Component component,
+ DesignContext context);
}
/**
* Default implementation of {@link ComponentFactory}, using
* <code>Class.forName(className).newInstance()</code> for finding the
* component class and creating a component instance.
- *
+ *
* @since 7.4.1
*/
public static class DefaultComponentFactory implements ComponentFactory {
@@ -156,8 +157,7 @@ public class Design implements Serializable {
int lastDot = fullyQualifiedClassName.lastIndexOf('.');
if (lastDot != -1) {
String qualifiedInnerClassName = fullyQualifiedClassName
- .substring(0, lastDot)
- + "$"
+ .substring(0, lastDot) + "$"
+ fullyQualifiedClassName.substring(lastDot + 1);
return createComponent(qualifiedInnerClassName, context);
} else {
@@ -165,21 +165,24 @@ public class Design implements Serializable {
}
}
- assert Component.class.isAssignableFrom(componentClass) : "resolveComponentClass returned "
- + componentClass + " which is not a Vaadin Component class";
+ assert Component.class.isAssignableFrom(
+ componentClass) : "resolveComponentClass returned "
+ + componentClass
+ + " which is not a Vaadin Component class";
try {
return componentClass.newInstance();
} catch (Exception e) {
- throw new DesignException("Could not create component "
- + fullyQualifiedClassName, e);
+ throw new DesignException(
+ "Could not create component " + fullyQualifiedClassName,
+ e);
}
}
/**
* Resolves a component class based on the fully qualified name of the
* class.
- *
+ *
* @param qualifiedClassName
* the fully qualified name of the resolved class
* @param context
@@ -192,8 +195,8 @@ public class Design implements Serializable {
Class<?> componentClass = Class.forName(qualifiedClassName);
return componentClass.asSubclass(Component.class);
} catch (ClassNotFoundException e) {
- throw new DesignException(
- "Unable to load component for design", e);
+ throw new DesignException("Unable to load component for design",
+ e);
}
}
@@ -201,7 +204,7 @@ public class Design implements Serializable {
/**
* Default implementation of {@link ComponentMapper},
- *
+ *
* @since 7.5.0
*/
public static class DefaultComponentMapper implements ComponentMapper {
@@ -235,8 +238,8 @@ public class Design implements Serializable {
}
String qualifiedClassName = packageName + "." + className;
- Component component = componentFactory.createComponent(
- qualifiedClassName, context);
+ Component component = componentFactory
+ .createComponent(qualifiedClassName, context);
if (component == null) {
throw new DesignException("Got unexpected null component from "
@@ -248,18 +251,19 @@ public class Design implements Serializable {
}
@Override
- public String componentToTag(Component component, DesignContext context) {
+ public String componentToTag(Component component,
+ DesignContext context) {
Class<?> componentClass = component.getClass();
String packageName = getPackageName(componentClass);
String prefix = context.getPackagePrefix(packageName);
if (prefix == null) {
- prefix = packageName.replace('.', '_').toLowerCase(
- Locale.ENGLISH);
+ prefix = packageName.replace('.', '_')
+ .toLowerCase(Locale.ENGLISH);
context.addPackagePrefix(prefix, packageName);
}
prefix = prefix + "-";
- String className = classNameToElementName(componentClass
- .getSimpleName());
+ String className = classNameToElementName(
+ componentClass.getSimpleName());
String tagName = prefix + className;
return tagName;
@@ -280,7 +284,7 @@ public class Design implements Serializable {
* name. The name is derived by converting each uppercase letter to
* lowercase and inserting a dash before the letter. No dash is inserted
* before the first letter of the class name.
- *
+ *
* @param className
* the name of the class without a package name
* @return the html tag name corresponding to className
@@ -311,10 +315,10 @@ public class Design implements Serializable {
* <p>
* Please note that this setting is global, so care should be taken to avoid
* conflicting changes.
- *
+ *
* @param componentFactory
* the component factory to set; not <code>null</code>
- *
+ *
* @since 7.4.1
*/
public static void setComponentFactory(ComponentFactory componentFactory) {
@@ -327,11 +331,11 @@ public class Design implements Serializable {
/**
* Gets the currently used component factory.
- *
+ *
* @see #setComponentFactory(ComponentFactory)
- *
+ *
* @return the component factory
- *
+ *
* @since 7.4.1
*/
public static ComponentFactory getComponentFactory() {
@@ -344,10 +348,10 @@ public class Design implements Serializable {
* <p>
* Please note that this setting is global, so care should be taken to avoid
* conflicting changes.
- *
+ *
* @param componentMapper
* the component mapper to set; not <code>null</code>
- *
+ *
* @since 7.5.0
*/
public static void setComponentMapper(ComponentMapper componentMapper) {
@@ -360,11 +364,11 @@ public class Design implements Serializable {
/**
* Gets the currently used component mapper.
- *
+ *
* @see #setComponentMapper(ComponentMapper)
- *
+ *
* @return the component mapper
- *
+ *
* @since 7.5.0
*/
public static ComponentMapper getComponentMapper() {
@@ -373,7 +377,7 @@ public class Design implements Serializable {
/**
* Parses the given input stream into a jsoup document
- *
+ *
* @param html
* the stream containing the design
* @return the parsed jsoup document
@@ -392,12 +396,12 @@ public class Design implements Serializable {
/**
* Constructs a component hierarchy from the design specified as an html
* tree.
- *
+ *
* <p>
* If a component root is given, the component instances created during
* reading the design are assigned to its member fields based on their id,
* local id, and caption
- *
+ *
* @param doc
* the html tree
* @param componentRoot
@@ -420,12 +424,12 @@ public class Design implements Serializable {
/**
* Constructs a component hierarchy from the design specified as an html
* tree.
- *
+ *
* <p>
* If a component root is given, the component instances created during
* reading the design are assigned to its member fields based on their id,
* local id, and caption
- *
+ *
* @param doc
* the html tree
* @param componentRoot
@@ -488,8 +492,8 @@ public class Design implements Serializable {
designContext.removeComponentCreationListener(creationListener);
} else {
// createChild creates the entire component hierarchy
- componentRoot = element == null ? null : designContext
- .readDesign(element);
+ componentRoot = element == null ? null
+ : designContext.readDesign(element);
}
designContext.setRootComponent(componentRoot);
return designContext;
@@ -500,8 +504,8 @@ public class Design implements Serializable {
* the root designContext.getRootComponent(). The hierarchy is stored under
* &lt;body&gt; in the tree. The generated tree represents a valid html
* document.
- *
- *
+ *
+ *
* @param designContext
* a DesignContext object specifying the root component
* (designContext.getRootComponent()) of the hierarchy
@@ -545,7 +549,7 @@ public class Design implements Serializable {
* id/local id/caption in the design file.
* <p>
* The type of the root component must match the root element in the design
- *
+ *
* @param rootComponent
* The root component of the layout
* @return The design context used in the load operation
@@ -559,10 +563,9 @@ public class Design implements Serializable {
Class<? extends Component> annotatedClass = findClassWithAnnotation(
rootComponent.getClass(), DesignRoot.class);
if (annotatedClass == null) {
- throw new IllegalArgumentException(
- "The class "
- + rootComponent.getClass().getName()
- + " or any of its superclasses do not have an @DesignRoot annotation");
+ throw new IllegalArgumentException("The class "
+ + rootComponent.getClass().getName()
+ + " or any of its superclasses do not have an @DesignRoot annotation");
}
DesignRoot designAnnotation = annotatedClass
@@ -600,7 +603,7 @@ public class Design implements Serializable {
/**
* Find the first class with the given annotation, starting the search from
* the given class and moving upwards in the class hierarchy.
- *
+ *
* @param componentClass
* the class to check
* @param annotationClass
@@ -637,7 +640,7 @@ public class Design implements Serializable {
* id/local id/caption in the design file.
* <p>
* The type of the root component must match the root element in the design.
- *
+ *
* @param filename
* The file name to load. Loaded from the same package as the
* root component
@@ -649,12 +652,12 @@ public class Design implements Serializable {
*/
public static DesignContext read(String filename, Component rootComponent)
throws DesignException {
- InputStream stream = rootComponent.getClass().getResourceAsStream(
- filename);
+ InputStream stream = rootComponent.getClass()
+ .getResourceAsStream(filename);
if (stream == null) {
- throw new DesignException("File " + filename
- + " was not found in the package "
- + rootComponent.getClass().getPackage().getName());
+ throw new DesignException(
+ "File " + filename + " was not found in the package "
+ + rootComponent.getClass().getPackage().getName());
}
try {
return read(stream, rootComponent);
@@ -678,7 +681,7 @@ public class Design implements Serializable {
* <p>
* If rootComponent is not null, its type must match the type of the root
* element in the design
- *
+ *
* @param stream
* The stream to read the design from
* @param rootComponent
@@ -687,7 +690,8 @@ public class Design implements Serializable {
* @throws DesignException
* If the design could not be loaded
*/
- public static DesignContext read(InputStream stream, Component rootComponent) {
+ public static DesignContext read(InputStream stream,
+ Component rootComponent) {
if (stream == null) {
throw new DesignException("Stream cannot be null");
}
@@ -699,7 +703,7 @@ public class Design implements Serializable {
/**
* Loads a design from the given input stream
- *
+ *
* @param design
* The stream to read the design from
* @return The root component of the design
@@ -712,7 +716,7 @@ public class Design implements Serializable {
/**
* Writes the given component tree in design format to the given output
* stream.
- *
+ *
* @param component
* the root component of the component tree, null can be used for
* generating an empty design
@@ -733,7 +737,7 @@ public class Design implements Serializable {
* Writes the component, given in the design context, in design format to
* the given output stream. The design context is used for writing local ids
* and other information not available in the component tree.
- *
+ *
* @param designContext
* The DesignContext object specifying the component hierarchy
* and the local id values of the objects. If
@@ -753,7 +757,7 @@ public class Design implements Serializable {
/**
* Writes the given jsoup document to the output stream (in UTF-8)
- *
+ *
* @param doc
* the document to write
* @param outputStream
diff --git a/server/src/main/java/com/vaadin/ui/declarative/DesignAttributeHandler.java b/server/src/main/java/com/vaadin/ui/declarative/DesignAttributeHandler.java
index bbfd90b2cc..6a8b4fb5d4 100644
--- a/server/src/main/java/com/vaadin/ui/declarative/DesignAttributeHandler.java
+++ b/server/src/main/java/com/vaadin/ui/declarative/DesignAttributeHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -45,7 +45,7 @@ import com.vaadin.ui.Alignment;
* Default attribute handler implementation used when parsing designs to
* component trees. Handles all the component attributes that do not require
* custom handling.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -63,7 +63,7 @@ public class DesignAttributeHandler implements Serializable {
/**
* Returns the currently used formatter. All primitive types and all types
* needed by Vaadin components are handled by that formatter.
- *
+ *
* @return An instance of the formatter.
*/
public static DesignFormatter getFormatter() {
@@ -72,7 +72,7 @@ public class DesignAttributeHandler implements Serializable {
/**
* Clears the children and attributes of the given element
- *
+ *
* @param design
* the element to be cleared
*/
@@ -90,7 +90,7 @@ public class DesignAttributeHandler implements Serializable {
/**
* Assigns the specified design attribute to the given component.
- *
+ *
* @param target
* the target to which the attribute should be set
* @param attribute
@@ -107,7 +107,8 @@ public class DesignAttributeHandler implements Serializable {
}
boolean success = false;
try {
- Method setter = findSetterForAttribute(target.getClass(), attribute);
+ Method setter = findSetterForAttribute(target.getClass(),
+ attribute);
if (setter == null) {
// if we don't have the setter, there is no point in continuing
success = false;
@@ -119,15 +120,12 @@ public class DesignAttributeHandler implements Serializable {
success = true;
}
} catch (Exception e) {
- getLogger().log(
- Level.WARNING,
- "Failed to set value \"" + value + "\" to attribute "
- + attribute, e);
+ getLogger().log(Level.WARNING, "Failed to set value \"" + value
+ + "\" to attribute " + attribute, e);
}
if (!success) {
- getLogger().info(
- "property " + attribute
- + " ignored by default attribute handler");
+ getLogger().info("property " + attribute
+ + " ignored by default attribute handler");
}
return success;
}
@@ -135,7 +133,7 @@ public class DesignAttributeHandler implements Serializable {
/**
* Searches for supported setter and getter types from the specified class
* and returns the list of corresponding design attributes
- *
+ *
* @param clazz
* the class scanned for setters
* @return the list of supported design attributes
@@ -149,7 +147,7 @@ public class DesignAttributeHandler implements Serializable {
* Resolves the supported attributes and corresponding getters and setters
* for the class using introspection. After resolving, the information is
* cached internally by this class
- *
+ *
* @param clazz
* the class to resolve the supported attributes for
*/
@@ -170,11 +168,12 @@ public class DesignAttributeHandler implements Serializable {
+ clazz.getName());
}
AttributeCacheEntry entry = new AttributeCacheEntry();
- for (PropertyDescriptor descriptor : beanInfo.getPropertyDescriptors()) {
+ for (PropertyDescriptor descriptor : beanInfo
+ .getPropertyDescriptors()) {
Method getter = descriptor.getReadMethod();
Method setter = descriptor.getWriteMethod();
- if (getter != null && setter != null
- && getFormatter().canConvert(descriptor.getPropertyType())) {
+ if (getter != null && setter != null && getFormatter()
+ .canConvert(descriptor.getPropertyType())) {
String attribute = toAttributeName(descriptor.getName());
entry.addAttribute(attribute, getter, setter);
}
@@ -185,7 +184,7 @@ public class DesignAttributeHandler implements Serializable {
/**
* Writes the specified attribute to the design if it differs from the
* default value got from the <code> defaultInstance <code>
- *
+ *
* @param component
* the component used to get the attribute value
* @param attribute
@@ -210,10 +209,9 @@ public class DesignAttributeHandler implements Serializable {
writeAttribute(attribute, attr, value, defaultValue,
(Class) getter.getReturnType());
} catch (Exception e) {
- getLogger()
- .log(Level.SEVERE,
- "Failed to invoke getter for attribute "
- + attribute, e);
+ getLogger().log(Level.SEVERE,
+ "Failed to invoke getter for attribute " + attribute,
+ e);
}
}
}
@@ -221,7 +219,7 @@ public class DesignAttributeHandler implements Serializable {
/**
* Writes the given attribute value to a set of attributes if it differs
* from the default attribute value.
- *
+ *
* @param attribute
* the attribute key
* @param attributes
@@ -234,15 +232,16 @@ public class DesignAttributeHandler implements Serializable {
* the type of the input value
*/
public static <T> void writeAttribute(String attribute,
- Attributes attributes, T value, T defaultValue, Class<T> inputType) {
+ Attributes attributes, T value, T defaultValue,
+ Class<T> inputType) {
if (!getFormatter().canConvert(inputType)) {
- throw new IllegalArgumentException("input type: "
- + inputType.getName() + " not supported");
+ throw new IllegalArgumentException(
+ "input type: " + inputType.getName() + " not supported");
}
if (!SharedUtil.equals(value, defaultValue)) {
String attributeValue = toAttributeValue(inputType, value);
- if ("".equals(attributeValue)
- && (inputType == boolean.class || inputType == Boolean.class)) {
+ if ("".equals(attributeValue) && (inputType == boolean.class
+ || inputType == Boolean.class)) {
attributes.put(attribute, true);
} else {
attributes.put(attribute, attributeValue);
@@ -253,7 +252,7 @@ public class DesignAttributeHandler implements Serializable {
/**
* Reads the given attribute from a set of attributes. If attribute does not
* exist return a given default value.
- *
+ *
* @param attribute
* the attribute key
* @param attributes
@@ -276,7 +275,7 @@ public class DesignAttributeHandler implements Serializable {
/**
* Reads the given attribute from a set of attributes.
- *
+ *
* @param attribute
* the attribute key
* @param attributes
@@ -288,8 +287,8 @@ public class DesignAttributeHandler implements Serializable {
public static <T> T readAttribute(String attribute, Attributes attributes,
Class<T> outputType) {
if (!getFormatter().canConvert(outputType)) {
- throw new IllegalArgumentException("output type: "
- + outputType.getName() + " not supported");
+ throw new IllegalArgumentException(
+ "output type: " + outputType.getName() + " not supported");
}
if (!attributes.hasKey(attribute)) {
return null;
@@ -298,8 +297,8 @@ public class DesignAttributeHandler implements Serializable {
String value = attributes.get(attribute);
return getFormatter().parse(value, outputType);
} catch (Exception e) {
- throw new DesignException("Failed to read attribute "
- + attribute, e);
+ throw new DesignException(
+ "Failed to read attribute " + attribute, e);
}
}
}
@@ -308,7 +307,7 @@ public class DesignAttributeHandler implements Serializable {
* Returns the design attribute name corresponding the given method name.
* For example given a method name <code>setPrimaryStyleName</code> the
* return value would be <code>primary-style-name</code>
- *
+ *
* @param propertyName
* the property name returned by {@link IntroSpector}
* @return the design attribute name corresponding the given method name
@@ -330,7 +329,7 @@ public class DesignAttributeHandler implements Serializable {
* Replaces subsequent UPPERCASE strings of length 2 or more followed either
* by another uppercase letter or an end of string. This is to generalise
* handling of method names like <tt>showISOWeekNumbers</tt>.
- *
+ *
* @param param
* Input string.
* @return Input string with sequences of UPPERCASE turned into Normalcase.
@@ -346,13 +345,12 @@ public class DesignAttributeHandler implements Serializable {
// if this is a beginning of the string, the whole matched group is
// written in lower case
if (matcher.group(1).isEmpty()) {
- matcher.appendReplacement(result, matched.toLowerCase()
- + matcher.group(3));
+ matcher.appendReplacement(result,
+ matched.toLowerCase() + matcher.group(3));
// otherwise the first character of the group stays uppercase,
// while the others are lower case
} else {
- matcher.appendReplacement(
- result,
+ matcher.appendReplacement(result,
matcher.group(1) + matched.substring(0, 1)
+ matched.substring(1).toLowerCase()
+ matcher.group(3));
@@ -368,7 +366,7 @@ public class DesignAttributeHandler implements Serializable {
/**
* Serializes the given value to valid design attribute representation
- *
+ *
* @param sourceType
* the type of the value
* @param value
@@ -381,8 +379,8 @@ public class DesignAttributeHandler implements Serializable {
// value is not null. How to represent null value in attributes?
return "";
}
- Converter<String, Object> converter = getFormatter().findConverterFor(
- sourceType);
+ Converter<String, Object> converter = getFormatter()
+ .findConverterFor(sourceType);
if (converter != null) {
return converter.convertToPresentation(value, String.class, null);
} else {
@@ -393,7 +391,7 @@ public class DesignAttributeHandler implements Serializable {
/**
* Returns a setter that can be used for assigning the given design
* attribute to the class
- *
+ *
* @param clazz
* the class that is scanned for setters
* @param attribute
@@ -409,7 +407,7 @@ public class DesignAttributeHandler implements Serializable {
/**
* Returns a getter that can be used for reading the given design attribute
* value from the class
- *
+ *
* @param clazz
* the class that is scanned for getters
* @param attribute
@@ -425,13 +423,14 @@ public class DesignAttributeHandler implements Serializable {
/**
* Cache object for caching supported attributes and their getters and
* setters
- *
+ *
* @author Vaadin Ltd
*/
private static class AttributeCacheEntry implements Serializable {
private Map<String, Method[]> accessMethods = new ConcurrentHashMap<String, Method[]>();
- private void addAttribute(String attribute, Method getter, Method setter) {
+ private void addAttribute(String attribute, Method getter,
+ Method setter) {
Method[] methods = new Method[2];
methods[0] = getter;
methods[1] = setter;
@@ -457,7 +456,7 @@ public class DesignAttributeHandler implements Serializable {
/**
* Read the alignment from the given child component attributes.
- *
+ *
* @since 7.6.4
* @param attr
* the child component attributes
@@ -485,14 +484,15 @@ public class DesignAttributeHandler implements Serializable {
/**
* Writes the alignment to the given child element attributes.
- *
+ *
* @since 7.6.4
* @param childElement
* the child element
* @param alignment
* the component alignment
*/
- public static void writeAlignment(Element childElement, Alignment alignment) {
+ public static void writeAlignment(Element childElement,
+ Alignment alignment) {
if (alignment.isMiddle()) {
childElement.attr(":middle", true);
} else if (alignment.isBottom()) {
diff --git a/server/src/main/java/com/vaadin/ui/declarative/DesignContext.java b/server/src/main/java/com/vaadin/ui/declarative/DesignContext.java
index 82f1450adc..a9eeddb416 100644
--- a/server/src/main/java/com/vaadin/ui/declarative/DesignContext.java
+++ b/server/src/main/java/com/vaadin/ui/declarative/DesignContext.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -44,13 +44,13 @@ import com.vaadin.ui.declarative.Design.ComponentMapper;
* mappings from local ids, global ids and captions to components , as well as a
* mapping between prefixes and package names (such as "vaadin" ->
* "com.vaadin.ui").
- *
+ *
* Versions prior to 7.6 use "v" as the default prefix. Versions starting with
* 7.6 support reading designs with either "v" or "vaadin" as the prefix, but
* only write "vaadin" by default. Writing with the legacy prefix can be
* activated with the property or context parameter
* {@link Constants#SERVLET_PARAMETER_LEGACY_DESIGN_PREFIX}.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -111,7 +111,7 @@ public class DesignContext implements Serializable {
/**
* Returns a component having the specified local id. If no component is
* found, returns null.
- *
+ *
* @param localId
* The local id of the component
* @return a component whose local id equals localId
@@ -123,7 +123,7 @@ public class DesignContext implements Serializable {
/**
* Returns a component having the specified global id. If no component is
* found, returns null.
- *
+ *
* @param globalId
* The global id of the component
* @return a component whose global id equals globalId
@@ -135,7 +135,7 @@ public class DesignContext implements Serializable {
/**
* Returns a component having the specified caption. If no component is
* found, returns null.
- *
+ *
* @param caption
* The caption of the component
* @return a component whose caption equals the caption given as a parameter
@@ -148,15 +148,15 @@ public class DesignContext implements Serializable {
* Creates a mapping between the given global id and the component. Returns
* true if globalId was already mapped to some component. Otherwise returns
* false. Also sets the id of the component to globalId.
- *
+ *
* If there is a mapping from the component to a global id (gid) different
* from globalId, the mapping from gid to component is removed.
- *
+ *
* If the string was mapped to a component c different from the given
* component, the mapping from c to the string is removed. Similarly, if
* component was mapped to some string s different from globalId, the
* mapping from s to component is removed.
- *
+ *
* @param globalId
* The new global id of the component.
* @param component
@@ -182,19 +182,19 @@ public class DesignContext implements Serializable {
* Creates a mapping between the given local id and the component. Returns
* true if localId was already mapped to some component or if component was
* mapped to some string. Otherwise returns false.
- *
+ *
* If the string was mapped to a component c different from the given
* component, the mapping from c to the string is removed. Similarly, if
* component was mapped to some string s different from localId, the mapping
* from s to component is removed.
- *
+ *
* @since 7.5.0
- *
+ *
* @param component
* The component whose local id is to be set.
* @param localId
* The new local id of the component.
- *
+ *
* @return true, if there already was a local id mapping from the string to
* some component or from the component to some string. Otherwise
* returns false.
@@ -206,9 +206,9 @@ public class DesignContext implements Serializable {
/**
* Returns the local id for a component.
- *
+ *
* @since 7.5.0
- *
+ *
* @param component
* The component whose local id to get.
* @return the local id of the component, or null if the component has no
@@ -221,13 +221,13 @@ public class DesignContext implements Serializable {
/**
* Creates a mapping between the given caption and the component. Returns
* true if caption was already mapped to some component.
- *
+ *
* Note that unlike mapGlobalId, if some component already has the given
* caption, the caption is not cleared from the component. This allows
* non-unique captions. However, only one of the components corresponding to
* a given caption can be found using the map captionToComponent. Hence, any
* captions that are used to identify an object should be unique.
- *
+ *
* @param caption
* The new caption of the component.
* @param component
@@ -245,10 +245,10 @@ public class DesignContext implements Serializable {
* value v different from the given value, the mapping from v to key is
* removed. Similarly, if value was mapped to some key k different from key,
* the mapping from k to value is removed.
- *
+ *
* Returns true if there already was a mapping from key to some value v or
* if there was a mapping from value to some key k. Otherwise returns false.
- *
+ *
* @param key
* The new key in keyToValue.
* @param value
@@ -275,18 +275,18 @@ public class DesignContext implements Serializable {
/**
* Creates a two-way mapping between a prefix and a package name.
- *
+ *
* Note that modifying the mapping for {@value #VAADIN_UI_PACKAGE} may
* invalidate the backwards compatibility mechanism supporting reading such
* components with either {@value #LEGACY_PREFIX} or {@value #VAADIN_PREFIX}
* as prefix.
- *
+ *
* @param prefix
* the prefix name without an ending dash (for instance, "vaadin"
* is by default used for "com.vaadin.ui")
* @param packageName
* the name of the package corresponding to prefix
- *
+ *
* @see #getPackagePrefixes()
* @see #getPackagePrefix(String)
* @see #getPackage(String)
@@ -299,10 +299,10 @@ public class DesignContext implements Serializable {
/**
* Gets the prefix mapping for a given package, or <code>null</code> if
* there is no mapping for the package.
- *
+ *
* @see #addPackagePrefix(String, String)
* @see #getPackagePrefixes()
- *
+ *
* @since 7.5.0
* @param packageName
* the package name to get a prefix for
@@ -319,8 +319,8 @@ public class DesignContext implements Serializable {
/**
* Gets all registered package prefixes.
- *
- *
+ *
+ *
* @since 7.5.0
* @see #getPackage(String)
* @return a collection of package prefixes
@@ -332,7 +332,7 @@ public class DesignContext implements Serializable {
/**
* Gets the package corresponding to the give prefix, or <code>null</code>
* no package has been registered for the prefix
- *
+ *
* @since 7.5.0
* @see #addPackagePrefix(String, String)
* @param prefix
@@ -347,7 +347,7 @@ public class DesignContext implements Serializable {
/**
* Returns the default instance for the given class. The instance must not
* be modified by the caller.
- *
+ *
* @param abstractComponent
* @return the default instance for the given class. The return value must
* not be modified by the caller
@@ -391,8 +391,8 @@ public class DesignContext implements Serializable {
if ("meta".equals(childElement.tagName())) {
Attributes attributes = childElement.attributes();
if (attributes.hasKey("name")
- && attributes.hasKey("content")
- && "package-mapping".equals(attributes.get("name"))) {
+ && attributes.hasKey("content") && "package-mapping"
+ .equals(attributes.get("name"))) {
String contentString = attributes.get("content");
String[] parts = contentString.split(":");
if (parts.length != 2) {
@@ -413,7 +413,7 @@ public class DesignContext implements Serializable {
* the specified document.
* <p>
* The prefixes are stored as <meta> tags under <head> in the document.
- *
+ *
* @param doc
* the Jsoup document tree where the package mappings are written
*/
@@ -422,7 +422,8 @@ public class DesignContext implements Serializable {
for (String prefix : getPackagePrefixes()) {
// Only store the prefix-name mapping if it is not a default mapping
// (such as "vaadin" -> "com.vaadin.ui")
- if (!VAADIN_PREFIX.equals(prefix) && !LEGACY_PREFIX.equals(prefix)) {
+ if (!VAADIN_PREFIX.equals(prefix)
+ && !LEGACY_PREFIX.equals(prefix)) {
Node newNode = doc.createElement("meta");
newNode.attr("name", "package-mapping");
String prefixToPackageName = prefix + ":" + getPackage(prefix);
@@ -437,7 +438,7 @@ public class DesignContext implements Serializable {
* be used when writing designs. The property or context parameter
* {@link Constants#SERVLET_PARAMETER_LEGACY_DESIGN_PREFIX} can be used to
* switch to the legacy prefix.
- *
+ *
* @since 7.5.7
* @return true to use the legacy prefix, false by default
*/
@@ -462,7 +463,7 @@ public class DesignContext implements Serializable {
* initializes its attributes by calling writeDesign. As a result of the
* writeDesign() call, this method creates the entire subtree rooted at the
* returned Node.
- *
+ *
* @param childComponent
* The component with state that is written in to the node
* @return An html tree node corresponding to the given component. The tag
@@ -487,7 +488,7 @@ public class DesignContext implements Serializable {
/**
* Reads the given design node and creates the corresponding component tree
- *
+ *
* @param componentDesign
* The design element containing the description of the component
* to be created.
@@ -502,13 +503,13 @@ public class DesignContext implements Serializable {
}
/**
- *
+ *
* Reads the given design node and populates the given component with the
* corresponding component tree
* <p>
* Additionally registers the component id, local id and caption of the
* given component and all its children in the context
- *
+ *
* @param componentDesign
* The design element containing the description of the component
* to be created
@@ -550,7 +551,7 @@ public class DesignContext implements Serializable {
/**
* Creates a Component corresponding to the given node. Does not set the
* attributes for the created object.
- *
+ *
* @param node
* a node of an html tree
* @return a Component corresponding to node, with no attributes set.
@@ -579,7 +580,7 @@ public class DesignContext implements Serializable {
/**
* Instantiates given class via ComponentFactory.
- *
+ *
* @param qualifiedClassName
* class name to instantiate
* @return instance of a given class
@@ -599,7 +600,7 @@ public class DesignContext implements Serializable {
/**
* Returns the root component of a created component hierarchy.
- *
+ *
* @return the root component of the hierarchy
*/
public Component getRootComponent() {
@@ -608,7 +609,7 @@ public class DesignContext implements Serializable {
/**
* Sets the root component of a created component hierarchy.
- *
+ *
* @param rootComponent
* the root component of the hierarchy
*/
@@ -619,17 +620,18 @@ public class DesignContext implements Serializable {
/**
* Adds a component creation listener. The listener will be notified when
* components are created while parsing a design template
- *
+ *
* @param listener
* the component creation listener to be added
*/
- public void addComponentCreationListener(ComponentCreationListener listener) {
+ public void addComponentCreationListener(
+ ComponentCreationListener listener) {
listeners.add(listener);
}
/**
* Removes a component creation listener.
- *
+ *
* @param listener
* the component creation listener to be removed
*/
@@ -640,13 +642,14 @@ public class DesignContext implements Serializable {
/**
* Fires component creation event
- *
+ *
* @param localId
* localId of the component
* @param component
* the component that was created
*/
- private void fireComponentCreatedEvent(String localId, Component component) {
+ private void fireComponentCreatedEvent(String localId,
+ Component component) {
ComponentCreatedEvent event = new ComponentCreatedEvent(localId,
component);
for (ComponentCreationListener listener : listeners) {
@@ -656,14 +659,14 @@ public class DesignContext implements Serializable {
/**
* Interface to be implemented by component creation listeners
- *
+ *
* @author Vaadin Ltd
*/
public interface ComponentCreationListener extends Serializable {
/**
* Called when component has been created in the design context
- *
+ *
* @param event
* the component creation event containing information on the
* created component
@@ -674,7 +677,7 @@ public class DesignContext implements Serializable {
/**
* Component creation event that is fired when a component is created in the
* context
- *
+ *
* @author Vaadin Ltd
*/
public class ComponentCreatedEvent implements Serializable {
@@ -684,7 +687,7 @@ public class DesignContext implements Serializable {
/**
* Creates a new instance of ComponentCreatedEvent
- *
+ *
* @param localId
* the local id of the created component
* @param component
@@ -698,7 +701,7 @@ public class DesignContext implements Serializable {
/**
* Returns the local id of the created component or null if not exist
- *
+ *
* @return the localId
*/
public String getLocalId() {
@@ -707,7 +710,7 @@ public class DesignContext implements Serializable {
/**
* Returns the created component
- *
+ *
* @return the component
*/
public Component getComponent() {
@@ -718,7 +721,7 @@ public class DesignContext implements Serializable {
/**
* Helper method for component write implementors to determine whether their
* children should be written out or not
- *
+ *
* @param c
* The component being written
* @param defaultC
@@ -748,7 +751,7 @@ public class DesignContext implements Serializable {
* delegate assumes that all component data is provided by a data source
* connected to a back end system and that the data should thus not be
* written.
- *
+ *
* @since 7.5.0
* @see #setShouldWriteDataDelegate(ShouldWriteDataDelegate)
* @param component
@@ -763,7 +766,7 @@ public class DesignContext implements Serializable {
/**
* Sets the delegate that determines whether the container data of a
* component should be written out.
- *
+ *
* @since 7.5.0
* @see #shouldWriteChildren(Component, Component)
* @see #getShouldWriteDataDelegate()
@@ -783,7 +786,7 @@ public class DesignContext implements Serializable {
/**
* Gets the delegate that determines whether the container data of a
* component should be written out.
- *
+ *
* @since 7.5.0
* @see #setShouldWriteDataDelegate(ShouldWriteDataDelegate)
* @see #shouldWriteChildren(Component, Component)
@@ -795,7 +798,7 @@ public class DesignContext implements Serializable {
/**
* Gets the attributes that the component did not handle
- *
+ *
* @since 7.7
* @param component
* the component to get the attributes for
@@ -808,7 +811,7 @@ public class DesignContext implements Serializable {
/**
* Sets a custom attribute not handled by the component. These attributes
* are directly written to the component tag.
- *
+ *
* @since 7.7
* @param component
* the component to set the attribute for
diff --git a/server/src/main/java/com/vaadin/ui/declarative/DesignException.java b/server/src/main/java/com/vaadin/ui/declarative/DesignException.java
index 01482f84b0..b80e13ef0a 100644
--- a/server/src/main/java/com/vaadin/ui/declarative/DesignException.java
+++ b/server/src/main/java/com/vaadin/ui/declarative/DesignException.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -18,8 +18,8 @@ package com.vaadin.ui.declarative;
@SuppressWarnings("serial")
/**
* An exception that is used when reading or writing a design fails.
- *
- * @since 7.4
+ *
+ * @since 7.4
* @author Vaadin Ltd
*/
public class DesignException extends RuntimeException {
diff --git a/server/src/main/java/com/vaadin/ui/declarative/DesignFormatter.java b/server/src/main/java/com/vaadin/ui/declarative/DesignFormatter.java
index 509015130d..b2db59a2a1 100644
--- a/server/src/main/java/com/vaadin/ui/declarative/DesignFormatter.java
+++ b/server/src/main/java/com/vaadin/ui/declarative/DesignFormatter.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -49,7 +49,7 @@ import com.vaadin.ui.declarative.converters.DesignToStringConverter;
* Class focused on flexible and consistent formatting and parsing of different
* values throughout reading and writing {@link Design}. An instance of this
* class is used by {@link DesignAttributeHandler}.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -68,7 +68,7 @@ public class DesignFormatter implements Serializable {
/**
* Maps default types to their converters.
- *
+ *
*/
protected void mapDefaultTypes() {
// numbers use standard toString/valueOf approach
@@ -205,7 +205,7 @@ public class DesignFormatter implements Serializable {
/**
* Adds a converter for a new type.
- *
+ *
* @param converter
* Converter to add.
*/
@@ -215,7 +215,7 @@ public class DesignFormatter implements Serializable {
/**
* Adds a converter for a given type.
- *
+ *
* @param type
* Type to convert to/from.
* @param converter
@@ -228,7 +228,7 @@ public class DesignFormatter implements Serializable {
/**
* Removes the converter for given type, if it was present.
- *
+ *
* @param type
* Type to remove converter for.
*/
@@ -240,7 +240,7 @@ public class DesignFormatter implements Serializable {
* Returns a set of classes that have a converter registered. This is <b>not
* the same</b> as the list of supported classes - subclasses of classes in
* this set are also supported.
- *
+ *
* @return An unmodifiable set of classes that have a converter registered.
*/
protected Set<Class<?>> getRegisteredClasses() {
@@ -249,7 +249,7 @@ public class DesignFormatter implements Serializable {
/**
* Parses a given string as a value of given type
- *
+ *
* @param value
* String value to convert.
* @param type
@@ -268,19 +268,20 @@ public class DesignFormatter implements Serializable {
/**
* Finds a formatter for a given object and attempts to format it.
- *
+ *
* @param object
* Object to format.
* @return String representation of the object, as returned by the
* registered converter.
*/
public String format(Object object) {
- return format(object, object == null ? Object.class : object.getClass());
+ return format(object,
+ object == null ? Object.class : object.getClass());
}
/**
* Formats an object according to a converter suitable for a given type.
- *
+ *
* @param object
* Object to format.
* @param type
@@ -292,8 +293,8 @@ public class DesignFormatter implements Serializable {
if (object == null) {
return null;
} else {
- Converter<String, Object> converter = findConverterFor(object
- .getClass());
+ Converter<String, Object> converter = findConverterFor(
+ object.getClass());
return converter.convertToPresentation(object, String.class, null);
}
}
@@ -301,7 +302,7 @@ public class DesignFormatter implements Serializable {
/**
* Checks whether or not a value of a given type can be converted. If a
* converter for a superclass is found, this will return true.
- *
+ *
* @param type
* Type to check.
* @return <b>true</b> when either a given type or its supertype has a
@@ -314,7 +315,7 @@ public class DesignFormatter implements Serializable {
/**
* Finds a converter for a given type. May return a converter for a
* superclass instead, if one is found and {@code strict} is false.
- *
+ *
* @param sourceType
* Type to find a converter for.
* @param strict
@@ -353,7 +354,7 @@ public class DesignFormatter implements Serializable {
/**
* Finds a converter for a given type. May return a converter for a
* superclass instead, if one is found.
- *
+ *
* @param sourceType
* Type to find a converter for.
* @return A valid converter for a given type or its subtype, <b>null</b> if
@@ -378,7 +379,7 @@ public class DesignFormatter implements Serializable {
* Typically, this method will be used by components to encode data (like
* option items in {@link AbstractSelect}) when dumping to HTML format
* </p>
- *
+ *
* @since 7.5.7
* @param input
* String to be encoded
@@ -388,8 +389,8 @@ public class DesignFormatter implements Serializable {
if (input == null) {
return null;
}
- return input.replace("&", "&amp;").replace(">", "&gt;")
- .replace("<", "&lt;");
+ return input.replace("&", "&amp;").replace(">", "&gt;").replace("<",
+ "&lt;");
}
/**
@@ -397,13 +398,13 @@ public class DesignFormatter implements Serializable {
* Decodes HTML entities in a text from text node and replaces them with
* actual characters.
* </p>
- *
+ *
* <p>
* Typically this method will be used by components to read back data (like
* option items in {@link AbstractSelect}) from HTML. Note that this method
* unencodes more characters than {@link #encodeForTextNode(String)} encodes
* </p>
- *
+ *
* @since 7.6
* @param input
* @return
diff --git a/server/src/main/java/com/vaadin/ui/declarative/FieldBinder.java b/server/src/main/java/com/vaadin/ui/declarative/FieldBinder.java
index 3766458175..f9955928d9 100644
--- a/server/src/main/java/com/vaadin/ui/declarative/FieldBinder.java
+++ b/server/src/main/java/com/vaadin/ui/declarative/FieldBinder.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,7 +31,7 @@ import com.vaadin.ui.Component;
/**
* Binder utility that binds member fields of a design class instance to given
* component instances. Only fields of type {@link Component} are bound
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -44,7 +44,7 @@ public class FieldBinder implements Serializable {
/**
* Creates a new instance of LayoutFieldBinder.
- *
+ *
* @param design
* the design class instance containing the fields to bind
* @throws IntrospectionException
@@ -56,7 +56,7 @@ public class FieldBinder implements Serializable {
/**
* Creates a new instance of LayoutFieldBinder.
- *
+ *
* @param design
* the instance containing the fields
* @param classWithFields
@@ -75,7 +75,7 @@ public class FieldBinder implements Serializable {
/**
* Returns a collection of field names that are not bound.
- *
+ *
* @return a collection of fields assignable to Component that are not bound
*/
public Collection<String> getUnboundFields() throws FieldBindingException {
@@ -117,7 +117,7 @@ public class FieldBinder implements Serializable {
* id or caption of the instance, depending on which one is defined. If a
* field is already bound (not null), {@link FieldBindingException} is
* thrown.
- *
+ *
* @param instance
* the instance to be bound to a field
* @return true on success, otherwise false
@@ -131,7 +131,7 @@ public class FieldBinder implements Serializable {
/**
* Tries to bind the given {@link Component} instance to a member field of
* the bind target. The fields are matched based on localId, id and caption.
- *
+ *
* @param instance
* the instance to be bound to a field
* @param localId
@@ -152,9 +152,8 @@ public class FieldBinder implements Serializable {
if (!success) {
String idInfo = "localId: " + localId + " id: " + instance.getId()
+ " caption: " + instance.getCaption();
- getLogger().finest(
- "Could not bind component to a field "
- + instance.getClass().getName() + " " + idInfo);
+ getLogger().finest("Could not bind component to a field "
+ + instance.getClass().getName() + " " + idInfo);
}
return success;
}
@@ -164,7 +163,7 @@ public class FieldBinder implements Serializable {
* the bind target. The field is matched based on the given identifier. If a
* field is already bound (not null), {@link FieldBindingException} is
* thrown.
- *
+ *
* @param identifier
* the identifier for the field.
* @param instance
@@ -173,7 +172,8 @@ public class FieldBinder implements Serializable {
* @throws FieldBindingException
* if error occurs when trying to bind the instance to a field
*/
- private boolean bindFieldByIdentifier(String identifier, Component instance) {
+ private boolean bindFieldByIdentifier(String identifier,
+ Component instance) {
try {
// create and validate field name
String fieldName = asFieldName(identifier);
@@ -183,27 +183,26 @@ public class FieldBinder implements Serializable {
// validate that the field can be found
Field field = fieldMap.get(fieldName.toLowerCase(Locale.ENGLISH));
if (field == null) {
- getLogger().fine(
- "No field was found by identifier " + identifier);
+ getLogger()
+ .fine("No field was found by identifier " + identifier);
return false;
}
// validate that the field is not set
Object fieldValue = getFieldValue(bindTarget, field);
if (fieldValue != null) {
- getLogger().fine(
- "The field \"" + fieldName
- + "\" was already mapped. Ignoring.");
+ getLogger().fine("The field \"" + fieldName
+ + "\" was already mapped. Ignoring.");
} else {
// set the field value
field.set(bindTarget, instance);
}
return true;
} catch (IllegalAccessException e) {
- throw new FieldBindingException("Field binding failed for "
- + identifier, e);
+ throw new FieldBindingException(
+ "Field binding failed for " + identifier, e);
} catch (IllegalArgumentException e) {
- throw new FieldBindingException("Field binding failed for "
- + identifier, e);
+ throw new FieldBindingException(
+ "Field binding failed for " + identifier, e);
}
}
@@ -219,7 +218,7 @@ public class FieldBinder implements Serializable {
/**
* Converts the given identifier to a valid field name by stripping away
* illegal character and setting the first letter of the name to lower case.
- *
+ *
* @param identifier
* the identifier to be converted to field name
* @return the field name corresponding the identifier
@@ -246,7 +245,7 @@ public class FieldBinder implements Serializable {
* Returns a list containing Field objects reflecting all the fields of the
* class or interface represented by this Class object. The fields in
* superclasses are excluded.
- *
+ *
* @param searchClass
* the class to be scanned for fields
* @return the list of fields in this class
diff --git a/server/src/main/java/com/vaadin/ui/declarative/FieldBindingException.java b/server/src/main/java/com/vaadin/ui/declarative/FieldBindingException.java
index d8b587a14c..12b830ffef 100644
--- a/server/src/main/java/com/vaadin/ui/declarative/FieldBindingException.java
+++ b/server/src/main/java/com/vaadin/ui/declarative/FieldBindingException.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -18,7 +18,7 @@ package com.vaadin.ui.declarative;
/**
* Exception that is thrown when an error occurs during field binding when
* reading a design template
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
diff --git a/server/src/main/java/com/vaadin/ui/declarative/ShouldWriteDataDelegate.java b/server/src/main/java/com/vaadin/ui/declarative/ShouldWriteDataDelegate.java
index 9cb1f1c605..5fbcba0d0c 100644
--- a/server/src/main/java/com/vaadin/ui/declarative/ShouldWriteDataDelegate.java
+++ b/server/src/main/java/com/vaadin/ui/declarative/ShouldWriteDataDelegate.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,9 +22,9 @@ import com.vaadin.ui.Component;
/**
* Delegate used by {@link DesignContext} to determine whether container data
* should be written out for a component.
- *
+ *
* @see DesignContext#shouldWriteData(Component)
- *
+ *
* @since 7.5.0
* @author Vaadin Ltd
*/
@@ -45,7 +45,7 @@ public interface ShouldWriteDataDelegate extends Serializable {
/**
* Determines whether the container data of a component should be written
* out.
- *
+ *
* @param component
* the component to check
* @return <code>true</code> if container data should be written out for the
diff --git a/server/src/main/java/com/vaadin/ui/declarative/converters/DesignDateConverter.java b/server/src/main/java/com/vaadin/ui/declarative/converters/DesignDateConverter.java
index d2d63ad16e..65d1b73202 100644
--- a/server/src/main/java/com/vaadin/ui/declarative/converters/DesignDateConverter.java
+++ b/server/src/main/java/com/vaadin/ui/declarative/converters/DesignDateConverter.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ import com.vaadin.ui.declarative.DesignAttributeHandler;
/**
* A date converter to be used by {@link DesignAttributeHandler}. Provides
* ISO-compliant way of storing date and time.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
diff --git a/server/src/main/java/com/vaadin/ui/declarative/converters/DesignEnumConverter.java b/server/src/main/java/com/vaadin/ui/declarative/converters/DesignEnumConverter.java
index 9f07ff9560..acfb2224f8 100644
--- a/server/src/main/java/com/vaadin/ui/declarative/converters/DesignEnumConverter.java
+++ b/server/src/main/java/com/vaadin/ui/declarative/converters/DesignEnumConverter.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.ui.declarative.DesignAttributeHandler;
/**
* An converter for Enum to/from String for {@link DesignAttributeHandler} to
* use internally.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
diff --git a/server/src/main/java/com/vaadin/ui/declarative/converters/DesignObjectConverter.java b/server/src/main/java/com/vaadin/ui/declarative/converters/DesignObjectConverter.java
index f11585d6b8..dfa0b5ca73 100644
--- a/server/src/main/java/com/vaadin/ui/declarative/converters/DesignObjectConverter.java
+++ b/server/src/main/java/com/vaadin/ui/declarative/converters/DesignObjectConverter.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.ui.declarative.DesignAttributeHandler;
/**
* An converter for Object to/from String for {@link DesignAttributeHandler} to
* use internally.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
diff --git a/server/src/main/java/com/vaadin/ui/declarative/converters/DesignResourceConverter.java b/server/src/main/java/com/vaadin/ui/declarative/converters/DesignResourceConverter.java
index ffa51fedd1..40a6911015 100644
--- a/server/src/main/java/com/vaadin/ui/declarative/converters/DesignResourceConverter.java
+++ b/server/src/main/java/com/vaadin/ui/declarative/converters/DesignResourceConverter.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -35,7 +35,7 @@ import com.vaadin.ui.declarative.DesignAttributeHandler;
/**
* A converter for {@link Resource} implementations supported by
* {@link DesignAttributeHandler}.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -73,8 +73,8 @@ public class DesignResourceConverter implements Converter<String, Resource> {
if (byType != null) {
return byType.format(value);
} else {
- throw new Converter.ConversionException("unknown Resource type - "
- + value.getClass().getName());
+ throw new Converter.ConversionException(
+ "unknown Resource type - " + value.getClass().getName());
}
}
@@ -94,8 +94,8 @@ public class DesignResourceConverter implements Converter<String, Resource> {
public Resource parse(String value);
}
- private static enum ResourceConverterByProtocol implements
- ProtocolResourceConverter {
+ private static enum ResourceConverterByProtocol
+ implements ProtocolResourceConverter {
HTTP, HTTPS, FTP, FTPS, THEME {
@@ -125,7 +125,8 @@ public class DesignResourceConverter implements Converter<String, Resource> {
} catch (IllegalArgumentException iae) {
throw new ConversionException(
"Unknown codepoint in FontAwesome: "
- + codepoint, iae);
+ + codepoint,
+ iae);
}
}
@@ -154,17 +155,17 @@ public class DesignResourceConverter implements Converter<String, Resource> {
try {
return FontAwesome.valueOf(iconName);
} catch (IllegalArgumentException iae) {
- throw new ConversionException("Unknown FontIcon constant: "
- + iconName, iae);
+ throw new ConversionException(
+ "Unknown FontIcon constant: " + iconName, iae);
}
}
@Override
public String format(Resource value)
throws Converter.ConversionException {
- throw new UnsupportedOperationException("Use "
- + ResourceConverterByProtocol.FONTICON.toString()
- + " instead");
+ throw new UnsupportedOperationException(
+ "Use " + ResourceConverterByProtocol.FONTICON.toString()
+ + " instead");
}
},
FILE {
diff --git a/server/src/main/java/com/vaadin/ui/declarative/converters/DesignShortcutActionConverter.java b/server/src/main/java/com/vaadin/ui/declarative/converters/DesignShortcutActionConverter.java
index d6f2f65938..8fc98ad410 100644
--- a/server/src/main/java/com/vaadin/ui/declarative/converters/DesignShortcutActionConverter.java
+++ b/server/src/main/java/com/vaadin/ui/declarative/converters/DesignShortcutActionConverter.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,12 +28,12 @@ import com.vaadin.event.ShortcutAction.ModifierKey;
/**
* Converter for {@link ShortcutActions}.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
-public class DesignShortcutActionConverter implements
- Converter<String, ShortcutAction> {
+public class DesignShortcutActionConverter
+ implements Converter<String, ShortcutAction> {
private final Map<Integer, String> keyCodeMap;
private final Map<String, Integer> presentationMap;
@@ -135,8 +135,8 @@ public class DesignShortcutActionConverter implements
String keyCodePart = parts[parts.length - 1];
int keyCode = getKeycodeForString(keyCodePart);
if (keyCode < 0) {
- throw new IllegalArgumentException("Invalid key '"
- + keyCodePart + "'");
+ throw new IllegalArgumentException(
+ "Invalid key '" + keyCodePart + "'");
}
// handle modifiers
int[] modifiers = null;
@@ -148,14 +148,15 @@ public class DesignShortcutActionConverter implements
if (modifier > 0) {
modifiers[i] = modifier;
} else {
- throw new IllegalArgumentException("Invalid modifier '"
- + parts[i] + "'");
+ throw new IllegalArgumentException(
+ "Invalid modifier '" + parts[i] + "'");
}
}
return new ShortcutAction(data.length == 2 ? data[1] : null,
keyCode, modifiers);
} catch (Exception e) {
- throw new ConversionException("Invalid shortcut '" + value + "'", e);
+ throw new ConversionException("Invalid shortcut '" + value + "'",
+ e);
}
}
diff --git a/server/src/main/java/com/vaadin/ui/declarative/converters/DesignTimeZoneConverter.java b/server/src/main/java/com/vaadin/ui/declarative/converters/DesignTimeZoneConverter.java
index 51f47edac9..cbd9892fa7 100644
--- a/server/src/main/java/com/vaadin/ui/declarative/converters/DesignTimeZoneConverter.java
+++ b/server/src/main/java/com/vaadin/ui/declarative/converters/DesignTimeZoneConverter.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.ui.declarative.DesignAttributeHandler;
/**
* Utility class for {@link DesignAttributeHandler} that deals with converting
* various TimeZones to string.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
diff --git a/server/src/main/java/com/vaadin/ui/declarative/converters/DesignToStringConverter.java b/server/src/main/java/com/vaadin/ui/declarative/converters/DesignToStringConverter.java
index 0c6cf55bed..94ed4ea74b 100644
--- a/server/src/main/java/com/vaadin/ui/declarative/converters/DesignToStringConverter.java
+++ b/server/src/main/java/com/vaadin/ui/declarative/converters/DesignToStringConverter.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.ui.declarative.DesignAttributeHandler;
/**
* Utility class for {@link DesignAttributeHandler} that deals with converting
* various types to string.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
* @param <TYPE>
@@ -45,7 +45,7 @@ public class DesignToStringConverter<TYPE> implements Converter<String, TYPE> {
* Constructs the converter for a given type. Implicitly requires that a
* static method {@code valueOf(String)} is present in the type to do the
* conversion.
- *
+ *
* @param type
* Type of values to convert.
*/
@@ -56,7 +56,7 @@ public class DesignToStringConverter<TYPE> implements Converter<String, TYPE> {
/**
* Constructs the converter for a given type, giving the name of the public
* static method that does the conversion from String.
- *
+ *
* @param type
* Type to convert.
* @param staticMethodName
@@ -74,9 +74,8 @@ public class DesignToStringConverter<TYPE> implements Converter<String, TYPE> {
public TYPE convertToModel(String value, Class<? extends TYPE> targetType,
Locale locale) throws Converter.ConversionException {
try {
- return type.cast(type
- .getMethod(this.staticMethodName, String.class).invoke(
- null, value));
+ return type.cast(type.getMethod(this.staticMethodName, String.class)
+ .invoke(null, value));
} catch (IllegalAccessException e) {
throw new Converter.ConversionException(e);
} catch (IllegalArgumentException e) {
diff --git a/server/src/main/java/com/vaadin/ui/declarative/converters/ShortcutKeyMapper.java b/server/src/main/java/com/vaadin/ui/declarative/converters/ShortcutKeyMapper.java
index 2940c82c06..7796ce90d7 100644
--- a/server/src/main/java/com/vaadin/ui/declarative/converters/ShortcutKeyMapper.java
+++ b/server/src/main/java/com/vaadin/ui/declarative/converters/ShortcutKeyMapper.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.event.ShortcutAction.ModifierKey;
/**
* Provides mappings between shortcut keycodes and their representation in
* design attributes. Contains a default framework implementation as a field.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -33,7 +33,7 @@ public interface ShortcutKeyMapper extends Serializable {
/**
* Gets the key code for a given string.
- *
+ *
* @param attributePresentation
* String
* @return Key code.
@@ -42,7 +42,7 @@ public interface ShortcutKeyMapper extends Serializable {
/**
* Returns a string for a given key code.
- *
+ *
* @param keyCode
* Key code.
* @return String.
diff --git a/server/src/main/java/com/vaadin/ui/renderers/AbstractJavaScriptRenderer.java b/server/src/main/java/com/vaadin/ui/renderers/AbstractJavaScriptRenderer.java
index 91a5c0ea45..e196d861c1 100644
--- a/server/src/main/java/com/vaadin/ui/renderers/AbstractJavaScriptRenderer.java
+++ b/server/src/main/java/com/vaadin/ui/renderers/AbstractJavaScriptRenderer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -42,7 +42,7 @@ import elemental.json.JsonValue;
* <code>com_example_SuperRenderer</code> will also be attempted if
* <code>com_example_MyRenderer</code> has not been defined.
* <p>
- *
+ *
* In addition to the general JavaScript extension functionality explained in
* {@link AbstractJavaScriptExtension}, this class also provides some
* functionality specific for renderers.
@@ -90,7 +90,7 @@ import elemental.json.JsonValue;
* {@link com.vaadin.client.renderers.ComplexRenderer#onBrowserEvent(com.vaadin.client.widget.grid.CellReference, com.google.gwt.dom.client.NativeEvent)}
* .</li>
* </ul>
- *
+ *
* <p>
* The cell object passed to functions defined by the renderer has these
* properties:
@@ -105,11 +105,12 @@ import elemental.json.JsonValue;
* supported in the object passed to the <code>render</code> function - other
* functions should not use the property. Readable and writable.
* </ul>
- *
+ *
* @author Vaadin Ltd
* @since 7.4
*/
-public abstract class AbstractJavaScriptRenderer<T> extends AbstractRenderer<T> {
+public abstract class AbstractJavaScriptRenderer<T>
+ extends AbstractRenderer<T> {
private JavaScriptCallbackHelper callbackHelper = new JavaScriptCallbackHelper(
this);
@@ -136,14 +137,15 @@ public abstract class AbstractJavaScriptRenderer<T> extends AbstractRenderer<T>
* available as <code>this</code>). Calling that JavaScript function will
* cause the call method in the registered {@link JavaScriptFunction} to be
* invoked with the same arguments.
- *
+ *
* @param functionName
* the name that should be used for client-side callback
* @param function
* the {@link JavaScriptFunction} object that will be invoked
* when the JavaScript function is called
*/
- protected void addFunction(String functionName, JavaScriptFunction function) {
+ protected void addFunction(String functionName,
+ JavaScriptFunction function) {
callbackHelper.registerCallback(functionName, function);
}
@@ -156,7 +158,7 @@ public abstract class AbstractJavaScriptRenderer<T> extends AbstractRenderer<T>
* before sending. This can be done either with
* {@link JsonCodec#encode(Object, JsonValue, java.lang.reflect.Type, com.vaadin.ui.ConnectorTracker)}
* or using the factory methods in {@link Json}.
- *
+ *
* @param name
* the name of the function
* @param arguments
diff --git a/server/src/main/java/com/vaadin/ui/renderers/ButtonRenderer.java b/server/src/main/java/com/vaadin/ui/renderers/ButtonRenderer.java
index e7e723ebd6..3c24ecab01 100644
--- a/server/src/main/java/com/vaadin/ui/renderers/ButtonRenderer.java
+++ b/server/src/main/java/com/vaadin/ui/renderers/ButtonRenderer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ import elemental.json.JsonValue;
* A Renderer that displays a button with a textual caption. The value of the
* corresponding property is used as the caption. Click listeners can be added
* to the renderer, invoked when any of the rendered buttons is clicked.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -39,7 +39,7 @@ public class ButtonRenderer extends ClickableRenderer<String> {
/**
* Creates a new button renderer and adds the given click listener to it.
- *
+ *
* @param listener
* the click listener to register
* @param nullRepresentation
diff --git a/server/src/main/java/com/vaadin/ui/renderers/ClickableRenderer.java b/server/src/main/java/com/vaadin/ui/renderers/ClickableRenderer.java
index 7210eb7840..072fe2d471 100644
--- a/server/src/main/java/com/vaadin/ui/renderers/ClickableRenderer.java
+++ b/server/src/main/java/com/vaadin/ui/renderers/ClickableRenderer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,10 +30,10 @@ import com.vaadin.util.ReflectTools;
* An abstract superclass for Renderers that render clickable items. Click
* listeners can be added to a renderer to be notified when any of the rendered
* items is clicked.
- *
+ *
* @param <T>
* the type presented by the renderer
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -42,7 +42,7 @@ public class ClickableRenderer<T> extends AbstractRenderer<T> {
/**
* An interface for listening to {@link RendererClickEvent renderer click
* events}.
- *
+ *
* @see {@link ButtonRenderer#addClickListener(RendererClickListener)}
*/
public interface RendererClickListener extends ConnectorEventListener {
@@ -52,7 +52,7 @@ public class ClickableRenderer<T> extends AbstractRenderer<T> {
/**
* Called when a rendered button is clicked.
- *
+ *
* @param event
* the event representing the click
*/
@@ -76,7 +76,7 @@ public class ClickableRenderer<T> extends AbstractRenderer<T> {
/**
* Returns the item ID of the row where the click event originated.
- *
+ *
* @return the item ID of the clicked row
*/
public Object getItemId() {
@@ -85,7 +85,7 @@ public class ClickableRenderer<T> extends AbstractRenderer<T> {
/**
* Returns the {@link Column} where the click event originated.
- *
+ *
* @return the column of the click event
*/
public Column getColumn() {
@@ -94,7 +94,7 @@ public class ClickableRenderer<T> extends AbstractRenderer<T> {
/**
* Returns the property ID where the click event originated.
- *
+ *
* @return the property ID of the clicked cell
*/
public Object getPropertyId() {
@@ -122,7 +122,7 @@ public class ClickableRenderer<T> extends AbstractRenderer<T> {
/**
* Adds a click listener to this button renderer. The listener is invoked
* every time one of the buttons rendered by this renderer is clicked.
- *
+ *
* @param listener
* the click listener to be added
*/
@@ -133,7 +133,7 @@ public class ClickableRenderer<T> extends AbstractRenderer<T> {
/**
* Removes the given click listener from this renderer.
- *
+ *
* @param listener
* the click listener to be removed
*/
diff --git a/server/src/main/java/com/vaadin/ui/renderers/DateRenderer.java b/server/src/main/java/com/vaadin/ui/renderers/DateRenderer.java
index dddeb6cd77..0c7acb4c17 100644
--- a/server/src/main/java/com/vaadin/ui/renderers/DateRenderer.java
+++ b/server/src/main/java/com/vaadin/ui/renderers/DateRenderer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import elemental.json.JsonValue;
/**
* A renderer for presenting date values.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -49,7 +49,7 @@ public class DateRenderer extends AbstractRenderer<Date> {
* <p>
* The renderer is configured to render with the {@link Date#toString()}
* representation for the given locale.
- *
+ *
* @param locale
* the locale in which to present dates
* @throws IllegalArgumentException
@@ -82,13 +82,13 @@ public class DateRenderer extends AbstractRenderer<Date> {
* <p>
* The renderer is configured to render with the given string format, as
* displayed in the default locale.
- *
+ *
* @param formatString
* the format string with which to format the date
* @throws IllegalArgumentException
* if {@code formatString} is {@code null}
- * @see <a
- * href="http://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html#syntax">Format
+ * @see <a href=
+ * "http://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html#syntax">Format
* String Syntax</a>
*/
public DateRenderer(String formatString) throws IllegalArgumentException {
@@ -107,8 +107,8 @@ public class DateRenderer extends AbstractRenderer<Date> {
* the textual representation of {@code null} value
* @throws IllegalArgumentException
* if {@code formatString} is {@code null}
- * @see <a
- * href="http://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html#syntax">Format
+ * @see <a href=
+ * "http://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html#syntax">Format
* String Syntax</a>
*/
public DateRenderer(String formatString, String nullRepresentation)
@@ -121,15 +121,15 @@ public class DateRenderer extends AbstractRenderer<Date> {
* <p>
* The renderer is configured to render with the given string format, as
* displayed in the given locale.
- *
+ *
* @param formatString
* the format string to format the date with
* @param locale
* the locale to use
* @throws IllegalArgumentException
* if either argument is {@code null}
- * @see <a
- * href="http://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html#syntax">Format
+ * @see <a href=
+ * "http://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html#syntax">Format
* String Syntax</a>
*/
public DateRenderer(String formatString, Locale locale)
@@ -151,8 +151,8 @@ public class DateRenderer extends AbstractRenderer<Date> {
* the textual representation of {@code null} value
* @throws IllegalArgumentException
* if either argument is {@code null}
- * @see <a
- * href="http://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html#syntax">Format
+ * @see <a href=
+ * "http://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html#syntax">Format
* String Syntax</a>
*/
public DateRenderer(String formatString, Locale locale,
@@ -176,7 +176,7 @@ public class DateRenderer extends AbstractRenderer<Date> {
* Creates a new date renderer.
* <p>
* The renderer is configured to render with he given date format.
- *
+ *
* @param dateFormat
* the date format to use when rendering dates
* @throws IllegalArgumentException
diff --git a/server/src/main/java/com/vaadin/ui/renderers/HtmlRenderer.java b/server/src/main/java/com/vaadin/ui/renderers/HtmlRenderer.java
index 2ec43800c0..bbee5865dd 100644
--- a/server/src/main/java/com/vaadin/ui/renderers/HtmlRenderer.java
+++ b/server/src/main/java/com/vaadin/ui/renderers/HtmlRenderer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/main/java/com/vaadin/ui/renderers/ImageRenderer.java b/server/src/main/java/com/vaadin/ui/renderers/ImageRenderer.java
index ad7d5cae2b..87e89af8a5 100644
--- a/server/src/main/java/com/vaadin/ui/renderers/ImageRenderer.java
+++ b/server/src/main/java/com/vaadin/ui/renderers/ImageRenderer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ import elemental.json.JsonValue;
* The image for each rendered cell is read from a Resource-typed property in
* the data source. Only {@link ExternalResource}s and {@link ThemeResource}s
* are currently supported.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -44,7 +44,7 @@ public class ImageRenderer extends ClickableRenderer<Resource> {
/**
* Creates a new image renderer and adds the given click listener to it.
- *
+ *
* @param listener
* the click listener to register
*/
@@ -55,7 +55,8 @@ public class ImageRenderer extends ClickableRenderer<Resource> {
@Override
public JsonValue encode(Resource resource) {
- if (!(resource == null || resource instanceof ExternalResource || resource instanceof ThemeResource)) {
+ if (!(resource == null || resource instanceof ExternalResource
+ || resource instanceof ThemeResource)) {
throw new IllegalArgumentException(
"ImageRenderer only supports ExternalResource and ThemeResource ("
+ resource.getClass().getSimpleName() + " given)");
diff --git a/server/src/main/java/com/vaadin/ui/renderers/NumberRenderer.java b/server/src/main/java/com/vaadin/ui/renderers/NumberRenderer.java
index b1ba309c9a..885cb00f24 100644
--- a/server/src/main/java/com/vaadin/ui/renderers/NumberRenderer.java
+++ b/server/src/main/java/com/vaadin/ui/renderers/NumberRenderer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -128,8 +128,8 @@ public class NumberRenderer extends AbstractRenderer<Number> {
* the format string with which to format the number
* @throws IllegalArgumentException
* if {@code formatString} is {@code null}
- * @see <a
- * href="http://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html#syntax">Format
+ * @see <a href=
+ * "http://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html#syntax">Format
* String Syntax</a>
*/
public NumberRenderer(String formatString) throws IllegalArgumentException {
@@ -148,8 +148,8 @@ public class NumberRenderer extends AbstractRenderer<Number> {
* the locale in which to present numbers
* @throws IllegalArgumentException
* if either argument is {@code null}
- * @see <a
- * href="http://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html#syntax">Format
+ * @see <a href=
+ * "http://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html#syntax">Format
* String Syntax</a>
*/
public NumberRenderer(String formatString, Locale locale,
@@ -179,9 +179,9 @@ public class NumberRenderer extends AbstractRenderer<Number> {
} else if (numberFormat != null) {
stringValue = numberFormat.format(value);
} else {
- throw new IllegalStateException(String.format("Internal bug: "
- + "%s is in an illegal state: "
- + "[locale: %s, numberFormat: %s, formatString: %s]",
+ throw new IllegalStateException(String.format(
+ "Internal bug: " + "%s is in an illegal state: "
+ + "[locale: %s, numberFormat: %s, formatString: %s]",
getClass().getSimpleName(), locale, numberFormat,
formatString));
}
diff --git a/server/src/main/java/com/vaadin/ui/renderers/ProgressBarRenderer.java b/server/src/main/java/com/vaadin/ui/renderers/ProgressBarRenderer.java
index 1566c47222..edcc44c719 100644
--- a/server/src/main/java/com/vaadin/ui/renderers/ProgressBarRenderer.java
+++ b/server/src/main/java/com/vaadin/ui/renderers/ProgressBarRenderer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/main/java/com/vaadin/ui/renderers/Renderer.java b/server/src/main/java/com/vaadin/ui/renderers/Renderer.java
index ac85174618..2a4d303ca2 100644
--- a/server/src/main/java/com/vaadin/ui/renderers/Renderer.java
+++ b/server/src/main/java/com/vaadin/ui/renderers/Renderer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,10 +26,10 @@ import elemental.json.JsonValue;
* currently extend the Extension interface, but this fact should be regarded as
* an implementation detail and subject to change in a future major or minor
* Vaadin revision.
- *
+ *
* @param <T>
* the type this renderer knows how to present
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -37,14 +37,14 @@ public interface Renderer<T> extends Extension {
/**
* Returns the class literal corresponding to the presentation type T.
- *
+ *
* @return the class literal of T
*/
Class<T> getPresentationType();
/**
* Encodes the given value into a {@link JsonValue}.
- *
+ *
* @param value
* the value to encode
* @return a JSON representation of the given value
diff --git a/server/src/main/java/com/vaadin/ui/renderers/TextRenderer.java b/server/src/main/java/com/vaadin/ui/renderers/TextRenderer.java
index ce8a73d057..d2d4b38b2d 100644
--- a/server/src/main/java/com/vaadin/ui/renderers/TextRenderer.java
+++ b/server/src/main/java/com/vaadin/ui/renderers/TextRenderer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import elemental.json.JsonValue;
/**
* A renderer for presenting simple plain-text string values.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -35,7 +35,7 @@ public class TextRenderer extends AbstractRenderer<String> {
/**
* Creates a new text renderer
- *
+ *
* @param nullRepresentation
* the textual representation of {@code null} value
*/
diff --git a/server/src/main/java/com/vaadin/ui/themes/BaseTheme.java b/server/src/main/java/com/vaadin/ui/themes/BaseTheme.java
index 9421cf2341..5ec3f9dd88 100644
--- a/server/src/main/java/com/vaadin/ui/themes/BaseTheme.java
+++ b/server/src/main/java/com/vaadin/ui/themes/BaseTheme.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,9 +30,9 @@ package com.vaadin.ui.themes;
* <p>
* All theme class files should follow the convention of specifying the theme
* name as a string constant <code>THEME_NAME</code>.
- *
+ *
* @since 6.3.0
- *
+ *
*/
public class BaseTheme {
diff --git a/server/src/main/java/com/vaadin/ui/themes/ChameleonTheme.java b/server/src/main/java/com/vaadin/ui/themes/ChameleonTheme.java
index 6e230c426e..766a6b5486 100644
--- a/server/src/main/java/com/vaadin/ui/themes/ChameleonTheme.java
+++ b/server/src/main/java/com/vaadin/ui/themes/ChameleonTheme.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -313,9 +313,9 @@ public class ChameleonTheme extends BaseTheme {
* segment, and add "<code>first</code>" and "<code>last</code>" style names
* for the first and last button in the segment. Then use the
* {@link #BUTTON_DOWN} style to indicate button states.
- *
+ *
* E.g.
- *
+ *
* <pre>
* HorizontalLayout ("segment")
* + Button ("first down")
@@ -324,7 +324,7 @@ public class ChameleonTheme extends BaseTheme {
* ...
* + Button ("last")
* </pre>
- *
+ *
* You can also use most of the different button styles for the contained
* buttons (e.g. {@link #BUTTON_BIG}, {@link #BUTTON_ICON_ONLY} etc.).
*/
@@ -335,9 +335,9 @@ public class ChameleonTheme extends BaseTheme {
* {@link #COMPOUND_HORIZONTAL_LAYOUT_SEGMENT} style to make buttons with
* the "down" style use the themes alternate color (e.g. blue instead of
* gray).
- *
+ *
* E.g.
- *
+ *
* <pre>
* HorizontalLayout ("segment segment-alternate")
* + Button ("first down")
@@ -352,9 +352,9 @@ public class ChameleonTheme extends BaseTheme {
/**
* Creates an iTunes-like menu from a CssLayout or a VerticalLayout. Place
* plain Labels and NativeButtons inside the layout, and you're all set.
- *
+ *
* E.g.
- *
+ *
* <pre>
* CssLayout ("sidebar-menu")
* + Label
diff --git a/server/src/main/java/com/vaadin/ui/themes/LiferayTheme.java b/server/src/main/java/com/vaadin/ui/themes/LiferayTheme.java
index de56be39ac..e1368ea726 100644
--- a/server/src/main/java/com/vaadin/ui/themes/LiferayTheme.java
+++ b/server/src/main/java/com/vaadin/ui/themes/LiferayTheme.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,9 +20,9 @@ public class LiferayTheme extends BaseTheme {
public static final String THEME_NAME = "liferay";
/***************************************************************************
- *
+ *
* Panel styles
- *
+ *
**************************************************************************/
/**
@@ -31,9 +31,9 @@ public class LiferayTheme extends BaseTheme {
public static final String PANEL_LIGHT = "light";
/***************************************************************************
- *
+ *
* SplitPanel styles
- *
+ *
**************************************************************************/
/**
diff --git a/server/src/main/java/com/vaadin/ui/themes/Reindeer.java b/server/src/main/java/com/vaadin/ui/themes/Reindeer.java
index e0ab792a15..264edd49c5 100644
--- a/server/src/main/java/com/vaadin/ui/themes/Reindeer.java
+++ b/server/src/main/java/com/vaadin/ui/themes/Reindeer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,9 +20,9 @@ public class Reindeer extends BaseTheme {
public static final String THEME_NAME = "reindeer";
/***************************************************************************
- *
+ *
* Label styles
- *
+ *
**************************************************************************/
/**
@@ -41,9 +41,9 @@ public class Reindeer extends BaseTheme {
public static final String LABEL_SMALL = "light";
/***************************************************************************
- *
+ *
* Button styles
- *
+ *
**************************************************************************/
/**
@@ -59,9 +59,9 @@ public class Reindeer extends BaseTheme {
public static final String BUTTON_SMALL = "small";
/***************************************************************************
- *
+ *
* TextField styles
- *
+ *
**************************************************************************/
/**
@@ -70,9 +70,9 @@ public class Reindeer extends BaseTheme {
public static final String TEXTFIELD_SMALL = "small";
/***************************************************************************
- *
+ *
* Panel styles
- *
+ *
**************************************************************************/
/**
@@ -81,9 +81,9 @@ public class Reindeer extends BaseTheme {
public static final String PANEL_LIGHT = "light";
/***************************************************************************
- *
+ *
* ProgressBar Styles
- *
+ *
**************************************************************************/
/**
@@ -93,9 +93,9 @@ public class Reindeer extends BaseTheme {
public static final String PROGRESSBAR_STATIC = "static";
/***************************************************************************
- *
+ *
* SplitPanel styles
- *
+ *
**************************************************************************/
/**
@@ -104,9 +104,9 @@ public class Reindeer extends BaseTheme {
public static final String SPLITPANEL_SMALL = "small";
/***************************************************************************
- *
+ *
* TabSheet styles
- *
+ *
**************************************************************************/
/**
@@ -138,9 +138,9 @@ public class Reindeer extends BaseTheme {
public static final String TABSHEET_SELECTED_CLOSABLE = "selected-closable";
/***************************************************************************
- *
+ *
* Table styles
- *
+ *
**************************************************************************/
/**
@@ -154,9 +154,9 @@ public class Reindeer extends BaseTheme {
public static final String TABLE_STRONG = "strong";
/***************************************************************************
- *
+ *
* Layout styles
- *
+ *
**************************************************************************/
/**
@@ -165,7 +165,7 @@ public class Reindeer extends BaseTheme {
* {@link FormLayout}, {@link CssLayout}, {@link VerticalSplitPanel} and
* {@link HorizontalSplitPanel}.
* <p>
- * <em>Does not revert any contained components back to normal if some
+ * <em>Does not revert any contained components back to normal if some
* parent layout has style {@link #LAYOUT_BLACK} applied.</em>
*/
public static final String LAYOUT_WHITE = "white";
@@ -176,7 +176,7 @@ public class Reindeer extends BaseTheme {
* {@link FormLayout}, {@link CssLayout}, {@link VerticalSplitPanel} and
* {@link HorizontalSplitPanel}.
* <p>
- * <em>Does not revert any contained components back to normal if some
+ * <em>Does not revert any contained components back to normal if some
* parent layout has style {@link #LAYOUT_BLACK} applied.</em>
*/
public static final String LAYOUT_BLUE = "blue";
@@ -192,14 +192,14 @@ public class Reindeer extends BaseTheme {
* Applies to {@link VerticalLayout}, {@link HorizontalLayout},
* {@link GridLayout}, {@link FormLayout} and {@link CssLayout}.
* </p>
- *
+ *
*/
public static final String LAYOUT_BLACK = "black";
/***************************************************************************
- *
+ *
* Window styles
- *
+ *
**************************************************************************/
/**
diff --git a/server/src/main/java/com/vaadin/ui/themes/Runo.java b/server/src/main/java/com/vaadin/ui/themes/Runo.java
index 6f8d5f37d9..e36a7c49af 100644
--- a/server/src/main/java/com/vaadin/ui/themes/Runo.java
+++ b/server/src/main/java/com/vaadin/ui/themes/Runo.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,9 +24,9 @@ public class Runo extends BaseTheme {
}
/***************************************************************************
- *
+ *
* Button styles
- *
+ *
**************************************************************************/
/**
@@ -47,9 +47,9 @@ public class Runo extends BaseTheme {
public static final String BUTTON_DEFAULT = "default";
/***************************************************************************
- *
+ *
* Panel styles
- *
+ *
**************************************************************************/
/**
@@ -58,9 +58,9 @@ public class Runo extends BaseTheme {
public static final String PANEL_LIGHT = "light";
/***************************************************************************
- *
+ *
* ProgressBar Styles
- *
+ *
**************************************************************************/
/**
@@ -70,9 +70,9 @@ public class Runo extends BaseTheme {
public static final String PROGRESSBAR_STATIC = "static";
/***************************************************************************
- *
+ *
* TabSheet styles
- *
+ *
**************************************************************************/
/**
@@ -81,9 +81,9 @@ public class Runo extends BaseTheme {
public static final String TABSHEET_SMALL = "light";
/***************************************************************************
- *
+ *
* SplitPanel styles
- *
+ *
**************************************************************************/
/**
@@ -99,9 +99,9 @@ public class Runo extends BaseTheme {
public static final String SPLITPANEL_SMALL = "small";
/***************************************************************************
- *
+ *
* Label styles
- *
+ *
**************************************************************************/
/**
@@ -123,9 +123,9 @@ public class Runo extends BaseTheme {
public static final String LABEL_SMALL = "small";
/***************************************************************************
- *
+ *
* Layout styles
- *
+ *
**************************************************************************/
/**
@@ -153,9 +153,9 @@ public class Runo extends BaseTheme {
public static final String CSSLAYOUT_SELECTABLE_SELECTED = "selectable-selected";
/***************************************************************************
- *
+ *
* TextField styles
- *
+ *
**************************************************************************/
/**
@@ -164,9 +164,9 @@ public class Runo extends BaseTheme {
public static final String TEXTFIELD_SMALL = "small";
/***************************************************************************
- *
+ *
* Table styles
- *
+ *
**************************************************************************/
/**
@@ -181,9 +181,9 @@ public class Runo extends BaseTheme {
public static final String TABLE_BORDERLESS = "borderless";
/***************************************************************************
- *
+ *
* Accordion styles
- *
+ *
**************************************************************************/
/**
@@ -194,9 +194,9 @@ public class Runo extends BaseTheme {
public static final String ACCORDION_LIGHT = "light";
/***************************************************************************
- *
+ *
* Window styles
- *
+ *
**************************************************************************/
/**
diff --git a/server/src/main/java/com/vaadin/ui/themes/ValoTheme.java b/server/src/main/java/com/vaadin/ui/themes/ValoTheme.java
index 3a9986c632..335c9daee8 100644
--- a/server/src/main/java/com/vaadin/ui/themes/ValoTheme.java
+++ b/server/src/main/java/com/vaadin/ui/themes/ValoTheme.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,23 +23,23 @@ import com.vaadin.ui.Table.ColumnHeaderMode;
* <p>
* Additional style names which can be used with the Valo theme.
* </p>
- *
+ *
* <p>
* These styles are only available if the
* <code>$v-included-additional-styles</code> Sass list variable contains the
* name of the component for that additional style name (e.g.
* <code>button, textfield, table</code>).
* </p>
- *
+ *
* <p>
* Most of these additional style names can be included individually into your
* custom theme using the component specific Sass mixins, in which case you can
* also define the style names yourself. See the Valo theme Sass API
* documentation for additional information.
* </p>
- *
+ *
* TODO link to Sass API documentation
- *
+ *
* @since 7.3
* @author Vaadin Ltd
*/
@@ -48,9 +48,9 @@ public class ValoTheme {
public static final String THEME_NAME = "valo";
/***************************************************************************
- *
+ *
* Notification styles
- *
+ *
**************************************************************************/
/**
@@ -113,9 +113,9 @@ public class ValoTheme {
public static final String NOTIFICATION_FAILURE = "failure";
/***************************************************************************
- *
+ *
* Label styles
- *
+ *
**************************************************************************/
/**
@@ -206,9 +206,9 @@ public class ValoTheme {
/**
* Spinner style. Add this style name to an empty Label to create a spinner.
- *
+ *
* <h4>Example</h4>
- *
+ *
* <pre>
* Label spinner = new Label();
* spinner.addStyleName(ValoTheme.LABEL_SPINNER);
@@ -217,9 +217,9 @@ public class ValoTheme {
public static final String LABEL_SPINNER = "spinner";
/***************************************************************************
- *
+ *
* Button styles
- *
+ *
**************************************************************************/
/**
@@ -307,9 +307,9 @@ public class ValoTheme {
public static final String BUTTON_ICON_ONLY = "icon-only";
/***************************************************************************
- *
+ *
* Link styles
- *
+ *
**************************************************************************/
/**
@@ -323,9 +323,9 @@ public class ValoTheme {
public static final String LINK_LARGE = "large";
/***************************************************************************
- *
+ *
* TextField styles
- *
+ *
**************************************************************************/
/**
@@ -373,9 +373,9 @@ public class ValoTheme {
public static final String TEXTFIELD_INLINE_ICON = "inline-icon";
/***************************************************************************
- *
+ *
* TextArea styles
- *
+ *
**************************************************************************/
/**
@@ -417,9 +417,9 @@ public class ValoTheme {
public static final String TEXTAREA_ALIGN_CENTER = "align-center";
/***************************************************************************
- *
+ *
* DateField styles
- *
+ *
**************************************************************************/
/**
@@ -461,9 +461,9 @@ public class ValoTheme {
public static final String DATEFIELD_ALIGN_CENTER = "align-center";
/***************************************************************************
- *
+ *
* ComboBox styles
- *
+ *
**************************************************************************/
/**
@@ -505,9 +505,9 @@ public class ValoTheme {
public static final String COMBOBOX_ALIGN_CENTER = "align-center";
/***************************************************************************
- *
+ *
* CheckBox styles
- *
+ *
**************************************************************************/
/**
@@ -521,9 +521,9 @@ public class ValoTheme {
public static final String CHECKBOX_LARGE = "large";
/***************************************************************************
- *
+ *
* OptionGroup styles
- *
+ *
**************************************************************************/
/**
@@ -545,9 +545,9 @@ public class ValoTheme {
public static final String OPTIONGROUP_HORIZONTAL = "horizontal";
/***************************************************************************
- *
+ *
* Slider styles
- *
+ *
**************************************************************************/
/**
@@ -557,9 +557,9 @@ public class ValoTheme {
public static final String SLIDER_NO_INDICATOR = "no-indicator";
/***************************************************************************
- *
+ *
* ProgressBar styles
- *
+ *
**************************************************************************/
/**
@@ -569,9 +569,9 @@ public class ValoTheme {
public static final String PROGRESSBAR_POINT = "point";
/***************************************************************************
- *
+ *
* MenuBar styles
- *
+ *
**************************************************************************/
/**
@@ -585,9 +585,9 @@ public class ValoTheme {
public static final String MENUBAR_BORDERLESS = "borderless";
/***************************************************************************
- *
+ *
* Table and TreeTable styles
- *
+ *
**************************************************************************/
/**
@@ -669,9 +669,9 @@ public class ValoTheme {
public static final String TREETABLE_SMALL = TABLE_SMALL;
/***************************************************************************
- *
+ *
* DragAndDropWrapper styles
- *
+ *
**************************************************************************/
/**
@@ -693,9 +693,9 @@ public class ValoTheme {
public static final String DRAG_AND_DROP_WRAPPER_NO_HORIZONTAL_DRAG_HINTS = "no-horizontal-drag-hints";
/***************************************************************************
- *
+ *
* Panel styles
- *
+ *
**************************************************************************/
/**
@@ -717,9 +717,9 @@ public class ValoTheme {
public static final String PANEL_WELL = "well";
/***************************************************************************
- *
+ *
* SplitPanel styles
- *
+ *
**************************************************************************/
/**
@@ -728,9 +728,9 @@ public class ValoTheme {
public static final String SPLITPANEL_LARGE = "large";
/***************************************************************************
- *
+ *
* TabSheet styles
- *
+ *
**************************************************************************/
/**
@@ -783,9 +783,9 @@ public class ValoTheme {
public static final String TABSHEET_ONLY_SELECTED_TAB_IS_CLOSABLE = "only-selected-closable";
/***************************************************************************
- *
+ *
* Accordion styles
- *
+ *
**************************************************************************/
/**
@@ -795,9 +795,9 @@ public class ValoTheme {
public static final String ACCORDION_BORDERLESS = "borderless";
/***************************************************************************
- *
+ *
* Window and related styles
- *
+ *
**************************************************************************/
/**
@@ -817,9 +817,9 @@ public class ValoTheme {
public static final String WINDOW_BOTTOM_TOOLBAR = "v-window-bottom-toolbar";
/***************************************************************************
- *
+ *
* FormLayout styles
- *
+ *
**************************************************************************/
/**
@@ -830,9 +830,9 @@ public class ValoTheme {
public static final String FORMLAYOUT_LIGHT = "light";
/***************************************************************************
- *
+ *
* Layout styles
- *
+ *
**************************************************************************/
/**
@@ -858,16 +858,16 @@ public class ValoTheme {
/**
* Add this style name to a CssLayout to create a grouped set of components,
* i.e. a row of components which are joined seamlessly together.
- *
+ *
* <h4>Example</h4>
- *
+ *
* <pre>
* CssLayout group = new CssLayout();
* group.addStyleName(ValoTheme.LAYOUT_COMPONENT_GROUP);
- *
+ *
* TextField field = new TextField();
* group.addComponent(field);
- *
+ *
* Button button = new Button(&quot;Action&quot;);
* group.addComponent(button);
* </pre>
@@ -875,9 +875,9 @@ public class ValoTheme {
public static final String LAYOUT_COMPONENT_GROUP = "v-component-group";
/***************************************************************************
- *
+ *
* Valo menu styles
- *
+ *
**************************************************************************/
/**
@@ -885,19 +885,19 @@ public class ValoTheme {
* When you use the Valo menu and wish to enable responsive features of the
* menu, you need to add this style name to the UI containing the menu.
* </p>
- *
+ *
* <p>
* You only need to add this style name to the UI containing a Valo menu, if
* you're using the Responsive extension with the UI.
* </p>
- *
+ *
* <h4>Example</h4>
- *
+ *
* <p>
* To enable responsivity in the Valo menu, the following example code
* should be executed in your UI containing the menu.
* </p>
- *
+ *
* <pre>
* Responsive.makeResponsive(this);
* addStyleName(ValoTheme.UI_WITH_MENU);
@@ -910,7 +910,7 @@ public class ValoTheme {
* Set the <em><b>primary</b></em> style name of a CssLayout to this, and
* add any number of layouts with the {@link #MENU_PART} style inside it.
* </p>
- *
+ *
* <p>
* The menu style is used to create a sidebar navigation menu for the
* application, usually action as the main navigation for the different
@@ -918,9 +918,9 @@ public class ValoTheme {
* {@link #MENU_ITEM}s, and possibly some {@link #MENU_SUBTITLE}s and a
* {@link #MENU_TITLE}.
* </p>
- *
+ *
* <h4>Example</h4>
- *
+ *
* <pre>
* CssLayout menuArea = new CssLayout();
* menuArea.setPrimaryStyleName(ValoTheme.MENU_ROOT);
@@ -932,9 +932,9 @@ public class ValoTheme {
* Add this style name to any layout and place it inside a layout with the
* {@link #MENU_ROOT} style to build a menu component. Use the additional
* MENU styles for individual components inside the layout.
- *
+ *
* <h4>Example</h4>
- *
+ *
* <pre>
* CssLayout menu = new CssLayout();
* menu.addStyleName(ValoTheme.MENU_PART);
@@ -948,9 +948,9 @@ public class ValoTheme {
* captions. Useful on narrower viewport widths, since the menu width is
* decreased quite dramatically, making more space for the content of the
* application.
- *
+ *
* <h4>Example</h4>
- *
+ *
* <pre>
* CssLayout menu = new CssLayout();
* menu.addStyleName(ValoTheme.MENU_PART);
@@ -965,7 +965,7 @@ public class ValoTheme {
* (intended to be placed in side a {@link #MENU_PART} layout). You can add
* any components inside it, but usually you would place a Label inside.
* </p>
- *
+ *
* <p>
* Any MenuBar component that you place inside this layout will match the
* style of the title, allowing an easy way to add a toolbar to the title
@@ -985,15 +985,15 @@ public class ValoTheme {
* Set the <em><b>primary</b></em> style name of a Button to this style name
* to create a clickable menu item in the menu.
* </p>
- *
+ *
* <h4>Selected item</h4>
* <p>
* Add an additional style name <b><code>selected</code></b> to it to make
* it the selected item in the menu.
* </p>
- *
+ *
* <h4>Example</h4>
- *
+ *
* <pre>
* Button item = new Button();
* item.setPrimaryStyleName(ValoTheme.MENU_ITEM);
@@ -1007,9 +1007,9 @@ public class ValoTheme {
* or {@link #MENU_ITEM} to add an additional badge indicator to the
* subtitle/item. The Label/Button needs to allow HTML content in order to
* use this style name.
- *
+ *
* <h4>Examples</h4>
- *
+ *
* <pre>
* Button item = new Button();
* item.setPrimaryStyleName(ValoTheme.MENU_ITEM);
@@ -1017,7 +1017,7 @@ public class ValoTheme {
* item.setCaption(&quot;Item Caption &lt;span class=\&quot;&quot; + ValoTheme.MENU_BADGE
* + &quot;\&quot;&gt;Badge text&lt;/span&gt;&quot;);
* </pre>
- *
+ *
* <pre>
* Label item = new Label();
* item.setPrimaryStyleName(ValoTheme.MENU_ITEM);
@@ -1034,7 +1034,7 @@ public class ValoTheme {
* style name to create an application logo. The logo is designed to be
* placed inside a {@link #MENU_PART} layout.
* </p>
- *
+ *
* <p>
* The text content of the logo should be very short, since the logo area
* only shows approximately three letters. Using one of the
@@ -1042,9 +1042,9 @@ public class ValoTheme {
* application.
* </p>
* </p>
- *
+ *
* <h4>Example</h4>
- *
+ *
* <pre>
* Label logo = new Label(FontAwesome.ROCKET.getHtml(), ContentMode.HTML);
* logo.setSizeUndefined();
diff --git a/server/src/main/java/com/vaadin/util/ConnectorHelper.java b/server/src/main/java/com/vaadin/util/ConnectorHelper.java
index b3457068c3..c2a5105072 100644
--- a/server/src/main/java/com/vaadin/util/ConnectorHelper.java
+++ b/server/src/main/java/com/vaadin/util/ConnectorHelper.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.ui.Component;
/**
* Provides various helper methods for connectors. Meant for internal use.
- *
+ *
* @since 7.1
* @author Vaadin Ltd
*/
@@ -31,7 +31,7 @@ public class ConnectorHelper {
/**
* Creates a string containing debug info for the connector
- *
+ *
* @since 7.1
* @param connector
* The connector to print debug info about
@@ -57,7 +57,7 @@ public class ConnectorHelper {
/**
* Creates a string containing hierarchy information for the connector
- *
+ *
* @since 7.1
* @param connector
* The connector to get hierarchy information for
diff --git a/server/src/main/java/com/vaadin/util/CurrentInstance.java b/server/src/main/java/com/vaadin/util/CurrentInstance.java
index e6b58ec65c..d3e0de104a 100644
--- a/server/src/main/java/com/vaadin/util/CurrentInstance.java
+++ b/server/src/main/java/com/vaadin/util/CurrentInstance.java
@@ -112,7 +112,7 @@ public class CurrentInstance implements Serializable {
* ThreadLocal should only outlive the referenced object on
* threads that are not doing anything related to Vaadin, which
* should thus never invoke CurrentInstance.get().
- *
+ *
* At this point, there might also be other values that have
* been collected, so we'll scan the entire map and remove stale
* CurrentInstance objects. Using a ReferenceQueue could make
@@ -134,7 +134,8 @@ public class CurrentInstance implements Serializable {
}
}
- private static void removeStaleInstances(Map<Class<?>, CurrentInstance> map) {
+ private static void removeStaleInstances(
+ Map<Class<?>, CurrentInstance> map) {
for (Iterator<Entry<Class<?>, CurrentInstance>> iterator = map
.entrySet().iterator(); iterator.hasNext();) {
Entry<Class<?>, CurrentInstance> entry = iterator.next();
@@ -203,14 +204,12 @@ public class CurrentInstance implements Serializable {
instances.set(map);
}
- previousInstance = map.put(type, new CurrentInstance(instance,
- inheritable));
+ previousInstance = map.put(type,
+ new CurrentInstance(instance, inheritable));
if (previousInstance != null) {
assert previousInstance.inheritable == inheritable : "Inheritable status mismatch for "
- + type
- + " (previous was "
- + previousInstance.inheritable
- + ", new is "
+ + type + " (previous was "
+ + previousInstance.inheritable + ", new is "
+ inheritable + ")";
}
}
@@ -250,7 +249,7 @@ public class CurrentInstance implements Serializable {
* CurrentInstance. Without this a reference to an already
* collected instance may be left in the CurrentInstance when it
* really should be restored to null.
- *
+ *
* One example case that this fixes:
* VaadinService.runPendingAccessTasks() clears all current
* instances and then sets everything but the UI. This makes
diff --git a/server/src/main/java/com/vaadin/util/FileTypeResolver.java b/server/src/main/java/com/vaadin/util/FileTypeResolver.java
index a49a0e2d01..56cd186fab 100644
--- a/server/src/main/java/com/vaadin/util/FileTypeResolver.java
+++ b/server/src/main/java/com/vaadin/util/FileTypeResolver.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,7 +32,7 @@ import com.vaadin.server.ThemeResource;
* Note : The icons are associated purely to mime-types, so a file may not have
* a custom icon accessible with this class.
* </p>
- *
+ *
* @author Vaadin Ltd.
* @since 3.0
*/
@@ -241,7 +241,7 @@ public class FileTypeResolver implements Serializable {
/**
* Gets the mime-type of a file. Currently the mime-type is resolved based
* only on the file name extension.
- *
+ *
* @param fileName
* the name of the file whose mime-type is requested.
* @return mime-type <code>String</code> for the given filename
@@ -284,7 +284,7 @@ public class FileTypeResolver implements Serializable {
* the mime-type for the given filename is resolved, and then the
* corresponding icon is fetched from the internal icon storage. If it is
* not found the default icon is returned.
- *
+ *
* @param fileName
* the name of the file whose icon is requested.
* @return the icon corresponding to the given file
@@ -309,7 +309,7 @@ public class FileTypeResolver implements Serializable {
* the given file name is resolved, and then the corresponding icon is
* fetched from the internal icon storage. If it is not found the default
* icon is returned.
- *
+ *
* @param file
* the file whose icon is requested.
* @return the icon corresponding to the given file
@@ -321,7 +321,7 @@ public class FileTypeResolver implements Serializable {
/**
* Gets the mime-type for a file. Currently the returned file type is
* resolved by the filename extension only.
- *
+ *
* @param file
* the file whose mime-type is requested.
* @return the files mime-type <code>String</code>
@@ -350,7 +350,7 @@ public class FileTypeResolver implements Serializable {
/**
* Adds a mime-type mapping for the given filename extension. If the
* extension is already in the internal mapping it is overwritten.
- *
+ *
* @param extension
* the filename extension to be associated with
* <code>MIMEType</code>.
@@ -364,7 +364,7 @@ public class FileTypeResolver implements Serializable {
/**
* Adds a icon for the given mime-type. If the mime-type also has a
* corresponding icon, it is replaced with the new icon.
- *
+ *
* @param MIMEType
* the mime-type whose icon is to be changed.
* @param icon
@@ -376,7 +376,7 @@ public class FileTypeResolver implements Serializable {
/**
* Gets the internal file extension to mime-type mapping.
- *
+ *
* @return unmodifiable map containing the current file extension to
* mime-type mapping
*/
@@ -386,7 +386,7 @@ public class FileTypeResolver implements Serializable {
/**
* Gets the internal mime-type to icon mapping.
- *
+ *
* @return unmodifiable map containing the current mime-type to icon mapping
*/
public static Map<String, Resource> getMIMETypeToIconMapping() {
diff --git a/server/src/main/java/com/vaadin/util/ReflectTools.java b/server/src/main/java/com/vaadin/util/ReflectTools.java
index 2e2d3fe238..ad1aae1a69 100644
--- a/server/src/main/java/com/vaadin/util/ReflectTools.java
+++ b/server/src/main/java/com/vaadin/util/ReflectTools.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import java.lang.reflect.Method;
* An util class with helpers for reflection operations. Used internally by
* Vaadin and should not be used by application developers. Subject to change at
* any time.
- *
+ *
* @since 6.2
*/
public class ReflectTools implements Serializable {
@@ -33,7 +33,7 @@ public class ReflectTools implements Serializable {
* Locates the method in the given class. Returns null if the method is not
* found. Throws an ExceptionInInitializerError if there is a problem
* locating the method as this is mainly called from static blocks.
- *
+ *
* @param cls
* Class that contains the method
* @param methodName
@@ -59,7 +59,7 @@ public class ReflectTools implements Serializable {
* <p>
* Uses getter if present, otherwise tries to access even private fields
* directly.
- *
+ *
* @param object
* The object containing the field
* @param field
@@ -101,7 +101,7 @@ public class ReflectTools implements Serializable {
* Uses getter if a getter for the correct return type is present, otherwise
* tries to access even private fields directly. If the java field is not
* assignable to the property type throws an IllegalArgumentException.
- *
+ *
* @param object
* The object containing the field
* @param field
@@ -149,7 +149,7 @@ public class ReflectTools implements Serializable {
* <p>
* Uses setter if present, otherwise tries to access even private fields
* directly.
- *
+ *
* @param object
* The object containing the field
* @param field
diff --git a/server/src/main/java/com/vaadin/util/SerializerHelper.java b/server/src/main/java/com/vaadin/util/SerializerHelper.java
index 793488d892..3470684405 100644
--- a/server/src/main/java/com/vaadin/util/SerializerHelper.java
+++ b/server/src/main/java/com/vaadin/util/SerializerHelper.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import java.io.ObjectOutputStream;
* Helper class for performing serialization. Most of the methods are here are
* workarounds for problems in Google App Engine. Used internally by Vaadin and
* should not be used by application developers. Subject to change at any time.
- *
+ *
* @since 6.0
*/
public class SerializerHelper {
@@ -31,7 +31,7 @@ public class SerializerHelper {
/**
* Serializes the class reference so {@link #readClass(ObjectInputStream)}
* can deserialize it. Supports null class references.
- *
+ *
* @param out
* The {@link ObjectOutputStream} to serialize to.
* @param cls
@@ -53,7 +53,7 @@ public class SerializerHelper {
* Serializes the class references so
* {@link #readClassArray(ObjectInputStream)} can deserialize it. Supports
* null class arrays.
- *
+ *
* @param out
* The {@link ObjectOutputStream} to serialize to.
* @param classes
@@ -78,7 +78,7 @@ public class SerializerHelper {
* Deserializes a class references serialized by
* {@link #writeClassArray(ObjectOutputStream, Class[])}. Supports null
* class arrays.
- *
+ *
* @param in
* {@link ObjectInputStream} to read from.
* @return Class array with the class references or null.
@@ -111,7 +111,7 @@ public class SerializerHelper {
/**
* Resolves the class given by {@code className}.
- *
+ *
* @param className
* The fully qualified class name.
* @return A {@code Class} reference.
@@ -133,7 +133,7 @@ public class SerializerHelper {
* Deserializes a class reference serialized by
* {@link #writeClass(ObjectOutputStream, Class)}. Supports null class
* references.
- *
+ *
* @param in
* {@code ObjectInputStream} to read from.
* @return Class reference to the resolved class
@@ -142,8 +142,8 @@ public class SerializerHelper {
* @throws IOException
* Rethrows IOExceptions from the ObjectInputStream
*/
- public static Class<?> readClass(ObjectInputStream in) throws IOException,
- ClassNotFoundException {
+ public static Class<?> readClass(ObjectInputStream in)
+ throws IOException, ClassNotFoundException {
String className = (String) in.readObject();
if (className == null) {
return null;
diff --git a/server/src/test/java/ClassInDefaultPackage.java b/server/src/test/java/ClassInDefaultPackage.java
index 52dc87e0e2..4c6a2fe1aa 100644
--- a/server/src/test/java/ClassInDefaultPackage.java
+++ b/server/src/test/java/ClassInDefaultPackage.java
@@ -2,13 +2,13 @@ import org.junit.Ignore;
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -17,9 +17,9 @@ import org.junit.Ignore;
*/
/**
- *
+ *
* This class is test data. Don't delete it.
- *
+ *
* @author Vaadin Ltd
* @since 7.2
*/
diff --git a/server/src/test/java/com/vaadin/benchmarks/PerformanceTester8759.java b/server/src/test/java/com/vaadin/benchmarks/PerformanceTester8759.java
index 968edd4b24..af7e613bbf 100644
--- a/server/src/test/java/com/vaadin/benchmarks/PerformanceTester8759.java
+++ b/server/src/test/java/com/vaadin/benchmarks/PerformanceTester8759.java
@@ -7,17 +7,17 @@ import com.vaadin.ui.Label;
* Your results will vary.
* The real world use case motivating it was a 10k Row table, which generated labels for 10 columns.
* This is 1/10th of what this performance tester demonstrates.
- *
+ *
* Please run with -server and -Xloggc:/tmp/gclog.vgc -verbose:gc -XX:+PrintCompilation
- *
+ *
* My results Win 7 64, i7 2760QM 2.4Ghz, Java 7 21.
- *
+ *
* Proposed Patch with StringTokenizer:
* 13 GC activations, 1.009GB allocated memory over time, total time 948ms
- *
+ *
* Current String.split implementation:
* 31 GC activations, 2.277 GB allocated memory over time, total time 1557ms
- *
+ *
*/
public class PerformanceTester8759 {
diff --git a/server/src/test/java/com/vaadin/data/DefaultFieldGroupFieldFactoryTest.java b/server/src/test/java/com/vaadin/data/DefaultFieldGroupFieldFactoryTest.java
index fc258ab138..44665eb9dd 100644
--- a/server/src/test/java/com/vaadin/data/DefaultFieldGroupFieldFactoryTest.java
+++ b/server/src/test/java/com/vaadin/data/DefaultFieldGroupFieldFactoryTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -46,8 +46,8 @@ public class DefaultFieldGroupFieldFactoryTest {
Class<DefaultFieldGroupFieldFactory> clazz = DefaultFieldGroupFieldFactory.class;
Constructor<?>[] constructors = clazz.getConstructors();
Assert.assertEquals(
- "DefaultFieldGroupFieldFactory contains public constructors",
- 0, constructors.length);
+ "DefaultFieldGroupFieldFactory contains public constructors", 0,
+ constructors.length);
}
@Test
@@ -105,8 +105,8 @@ public class DefaultFieldGroupFieldFactoryTest {
@Test
public void testEnumAnySelect() {
- Field f = fieldFactory
- .createField(SomeEnum.class, AbstractSelect.class);
+ Field f = fieldFactory.createField(SomeEnum.class,
+ AbstractSelect.class);
Assert.assertNotNull(f);
Assert.assertEquals(ListSelect.class, f.getClass());
}
diff --git a/server/src/test/java/com/vaadin/data/fieldgroup/FieldGroupDateTest.java b/server/src/test/java/com/vaadin/data/fieldgroup/FieldGroupDateTest.java
index ce76f8427b..87df063068 100644
--- a/server/src/test/java/com/vaadin/data/fieldgroup/FieldGroupDateTest.java
+++ b/server/src/test/java/com/vaadin/data/fieldgroup/FieldGroupDateTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/data/fieldgroup/FieldGroupExceptionTest.java b/server/src/test/java/com/vaadin/data/fieldgroup/FieldGroupExceptionTest.java
index 636162de54..cd6626947c 100644
--- a/server/src/test/java/com/vaadin/data/fieldgroup/FieldGroupExceptionTest.java
+++ b/server/src/test/java/com/vaadin/data/fieldgroup/FieldGroupExceptionTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/data/fieldgroup/FieldGroupTest.java b/server/src/test/java/com/vaadin/data/fieldgroup/FieldGroupTest.java
index f8e4d1c2d0..866d0aed5e 100644
--- a/server/src/test/java/com/vaadin/data/fieldgroup/FieldGroupTest.java
+++ b/server/src/test/java/com/vaadin/data/fieldgroup/FieldGroupTest.java
@@ -67,13 +67,14 @@ public class FieldGroupTest {
group.bind(field, "name");
Property propertyDataSource = field.getPropertyDataSource();
- Assert.assertTrue("Custom implementation of transactional property "
- + "has not been used",
+ Assert.assertTrue(
+ "Custom implementation of transactional property "
+ + "has not been used",
propertyDataSource instanceof TransactionalPropertyImpl);
}
- public static class TransactionalPropertyImpl<T> extends
- TransactionalPropertyWrapper<T> {
+ public static class TransactionalPropertyImpl<T>
+ extends TransactionalPropertyWrapper<T> {
public TransactionalPropertyImpl(Property<T> wrappedProperty) {
super(wrappedProperty);
diff --git a/server/src/test/java/com/vaadin/data/util/AbstractBeanContainerTestBase.java b/server/src/test/java/com/vaadin/data/util/AbstractBeanContainerTestBase.java
index 3d8f08a7ef..4a9e4f9891 100644
--- a/server/src/test/java/com/vaadin/data/util/AbstractBeanContainerTestBase.java
+++ b/server/src/test/java/com/vaadin/data/util/AbstractBeanContainerTestBase.java
@@ -2,12 +2,12 @@ package com.vaadin.data.util;
/**
* Automated test for {@link AbstractBeanContainer}.
- *
+ *
* Only a limited subset of the functionality is tested here, the rest in tests
* of subclasses including {@link BeanItemContainer} and {@link BeanContainer}.
*/
-public abstract class AbstractBeanContainerTestBase extends
- AbstractInMemoryContainerTestBase {
+public abstract class AbstractBeanContainerTestBase
+ extends AbstractInMemoryContainerTestBase {
public static class Person {
private String name;
diff --git a/server/src/test/java/com/vaadin/data/util/AbstractContainerTestBase.java b/server/src/test/java/com/vaadin/data/util/AbstractContainerTestBase.java
index 644f703d9e..955b609735 100644
--- a/server/src/test/java/com/vaadin/data/util/AbstractContainerTestBase.java
+++ b/server/src/test/java/com/vaadin/data/util/AbstractContainerTestBase.java
@@ -82,8 +82,8 @@ public abstract class AbstractContainerTestBase {
// current containers
protected void validateContainer(Container container,
Object expectedFirstItemId, Object expectedLastItemId,
- Object itemIdInSet, Object itemIdNotInSet,
- boolean checkGetItemNull, int expectedSize) {
+ Object itemIdInSet, Object itemIdNotInSet, boolean checkGetItemNull,
+ int expectedSize) {
Container.Indexed indexed = null;
if (container instanceof Container.Indexed) {
indexed = (Container.Indexed) container;
@@ -115,8 +115,8 @@ public abstract class AbstractContainerTestBase {
// getContainerProperty
for (Object propId : container.getContainerPropertyIds()) {
if (checkGetItemNull) {
- assertNull(container.getContainerProperty(itemIdNotInSet,
- propId));
+ assertNull(
+ container.getContainerProperty(itemIdNotInSet, propId));
}
assertNotNull(container.getContainerProperty(itemIdInSet, propId));
}
@@ -154,8 +154,8 @@ public abstract class AbstractContainerTestBase {
}
// getItemProperty
- Assert.assertNull(container.getItem(itemIdInSet).getItemProperty(
- "notinset"));
+ Assert.assertNull(
+ container.getItem(itemIdInSet).getItemProperty("notinset"));
}
@@ -271,7 +271,8 @@ public abstract class AbstractContainerTestBase {
Assert.assertNotNull(item);
Assert.assertTrue(container.containsId("foo"));
Assert.assertEquals(item, container.getItem("foo"));
- Assert.assertEquals("foo", container.getItemIds().iterator().next());
+ Assert.assertEquals("foo",
+ container.getItemIds().iterator().next());
Item itemAtEnd = container.addItemAfter(0, "atend");
Assert.assertNotNull(itemAtEnd);
@@ -466,7 +467,8 @@ public abstract class AbstractContainerTestBase {
container.addItemAt(itemPosition, newItemId);
Assert.assertEquals(itemPosition, container.indexOfId(newItemId));
Assert.assertEquals(itemPosition + 1, container.indexOfId(itemId));
- Assert.assertEquals(newItemId, container.getIdByIndex(itemPosition));
+ Assert.assertEquals(newItemId,
+ container.getIdByIndex(itemPosition));
Assert.assertEquals(itemId,
container.getIdByIndex(itemPosition + 1));
Assert.assertTrue(container.removeItem(newItemId));
@@ -504,7 +506,8 @@ public abstract class AbstractContainerTestBase {
container.addContainerFilter(filter1);
assertTrue(container.getContainerFilters().size() == 1);
- assertEquals(filter1, container.getContainerFilters().iterator().next());
+ assertEquals(filter1,
+ container.getContainerFilters().iterator().next());
validateContainer(container, "com.vaadin.data.BufferedValidatable",
"com.vaadin.ui.TabSheet",
@@ -521,7 +524,8 @@ public abstract class AbstractContainerTestBase {
container.addContainerFilter(filter2);
assertTrue(container.getContainerFilters().size() == 1);
- assertEquals(filter2, container.getContainerFilters().iterator().next());
+ assertEquals(filter2,
+ container.getContainerFilters().iterator().next());
validateContainer(container, "com.vaadin.data.Buffered",
"com.vaadin.server.ComponentSizeValidator",
@@ -540,7 +544,8 @@ public abstract class AbstractContainerTestBase {
return true;
}
- protected void testContainerSortingAndFiltering(Container.Sortable sortable) {
+ protected void testContainerSortingAndFiltering(
+ Container.Sortable sortable) {
Filterable filterable = (Filterable) sortable;
initializeContainer(sortable);
@@ -550,8 +555,8 @@ public abstract class AbstractContainerTestBase {
FULLY_QUALIFIED_NAME, "ab", false, false));
// Must be able to sort based on PROP1 for this test
- assertTrue(sortable.getSortableContainerPropertyIds().contains(
- FULLY_QUALIFIED_NAME));
+ assertTrue(sortable.getSortableContainerPropertyIds()
+ .contains(FULLY_QUALIFIED_NAME));
sortable.sort(new Object[] { FULLY_QUALIFIED_NAME },
new boolean[] { true });
@@ -568,10 +573,10 @@ public abstract class AbstractContainerTestBase {
initializeContainer(container);
// Must be able to sort based on PROP1 for this test
- assertTrue(sortable.getSortableContainerPropertyIds().contains(
- FULLY_QUALIFIED_NAME));
- assertTrue(sortable.getSortableContainerPropertyIds().contains(
- REVERSE_FULLY_QUALIFIED_NAME));
+ assertTrue(sortable.getSortableContainerPropertyIds()
+ .contains(FULLY_QUALIFIED_NAME));
+ assertTrue(sortable.getSortableContainerPropertyIds()
+ .contains(REVERSE_FULLY_QUALIFIED_NAME));
sortable.sort(new Object[] { FULLY_QUALIFIED_NAME },
new boolean[] { true });
@@ -609,10 +614,10 @@ public abstract class AbstractContainerTestBase {
Item item = container.addItem(id);
item.getItemProperty(FULLY_QUALIFIED_NAME).setValue(sampleData[i]);
- item.getItemProperty(SIMPLE_NAME).setValue(
- getSimpleName(sampleData[i]));
- item.getItemProperty(REVERSE_FULLY_QUALIFIED_NAME).setValue(
- reverse(sampleData[i]));
+ item.getItemProperty(SIMPLE_NAME)
+ .setValue(getSimpleName(sampleData[i]));
+ item.getItemProperty(REVERSE_FULLY_QUALIFIED_NAME)
+ .setValue(reverse(sampleData[i]));
item.getItemProperty(ID_NUMBER).setValue(i);
}
}
@@ -817,13 +822,11 @@ public abstract class AbstractContainerTestBase {
"com.vaadin.server.widgetsetutils.WidgetMapGenerator",
"com.vaadin.server.widgetsetutils.WidgetSetBuilder",
"com.vaadin.server.KeyMapper", "com.vaadin.server.Paintable",
- "com.vaadin.server.PaintException",
- "com.vaadin.server.PaintTarget",
+ "com.vaadin.server.PaintException", "com.vaadin.server.PaintTarget",
"com.vaadin.server.ParameterHandler", "com.vaadin.server.Resource",
"com.vaadin.server.Scrollable", "com.vaadin.server.Sizeable",
- "com.vaadin.server.StreamResource",
- "com.vaadin.server.SystemError", "com.vaadin.server.Terminal",
- "com.vaadin.server.ThemeResource",
+ "com.vaadin.server.StreamResource", "com.vaadin.server.SystemError",
+ "com.vaadin.server.Terminal", "com.vaadin.server.ThemeResource",
"com.vaadin.server.UploadStream", "com.vaadin.server.URIHandler",
"com.vaadin.server.UserError", "com.vaadin.server.VariableOwner",
"com.vaadin.tools.ReflectTools",
@@ -845,19 +848,19 @@ public abstract class AbstractContainerTestBase {
"com.vaadin.ui.Form", "com.vaadin.ui.FormFieldFactory",
"com.vaadin.ui.FormLayout", "com.vaadin.ui.GridLayout",
"com.vaadin.ui.HorizontalLayout", "com.vaadin.ui.InlineDateField",
- "com.vaadin.ui.Label", "com.vaadin.ui.Layout",
- "com.vaadin.ui.Link", "com.vaadin.ui.ListSelect",
- "com.vaadin.ui.LoginForm", "com.vaadin.ui.MenuBar",
- "com.vaadin.ui.NativeButton", "com.vaadin.ui.NativeSelect",
- "com.vaadin.ui.OptionGroup", "com.vaadin.ui.OrderedLayout",
- "com.vaadin.ui.Panel", "com.vaadin.ui.PopupDateField",
- "com.vaadin.ui.PopupView", "com.vaadin.ui.ProgressIndicator",
- "com.vaadin.ui.RichTextArea", "com.vaadin.ui.Select",
- "com.vaadin.ui.Slider", "com.vaadin.ui.SplitPanel",
- "com.vaadin.ui.Table", "com.vaadin.ui.TableFieldFactory",
- "com.vaadin.ui.TabSheet", "com.vaadin.ui.TextField",
- "com.vaadin.ui.Tree", "com.vaadin.ui.TwinColSelect",
- "com.vaadin.ui.Upload", "com.vaadin.ui.UriFragmentUtility",
- "com.vaadin.ui.VerticalLayout", "com.vaadin.ui.Window",
- "com.vaadin.util.SerializerHelper", "org.vaadin.test.LastClass" };
+ "com.vaadin.ui.Label", "com.vaadin.ui.Layout", "com.vaadin.ui.Link",
+ "com.vaadin.ui.ListSelect", "com.vaadin.ui.LoginForm",
+ "com.vaadin.ui.MenuBar", "com.vaadin.ui.NativeButton",
+ "com.vaadin.ui.NativeSelect", "com.vaadin.ui.OptionGroup",
+ "com.vaadin.ui.OrderedLayout", "com.vaadin.ui.Panel",
+ "com.vaadin.ui.PopupDateField", "com.vaadin.ui.PopupView",
+ "com.vaadin.ui.ProgressIndicator", "com.vaadin.ui.RichTextArea",
+ "com.vaadin.ui.Select", "com.vaadin.ui.Slider",
+ "com.vaadin.ui.SplitPanel", "com.vaadin.ui.Table",
+ "com.vaadin.ui.TableFieldFactory", "com.vaadin.ui.TabSheet",
+ "com.vaadin.ui.TextField", "com.vaadin.ui.Tree",
+ "com.vaadin.ui.TwinColSelect", "com.vaadin.ui.Upload",
+ "com.vaadin.ui.UriFragmentUtility", "com.vaadin.ui.VerticalLayout",
+ "com.vaadin.ui.Window", "com.vaadin.util.SerializerHelper",
+ "org.vaadin.test.LastClass" };
}
diff --git a/server/src/test/java/com/vaadin/data/util/AbstractHierarchicalContainerTestBase.java b/server/src/test/java/com/vaadin/data/util/AbstractHierarchicalContainerTestBase.java
index 7a07c553f7..f3eda74100 100644
--- a/server/src/test/java/com/vaadin/data/util/AbstractHierarchicalContainerTestBase.java
+++ b/server/src/test/java/com/vaadin/data/util/AbstractHierarchicalContainerTestBase.java
@@ -13,8 +13,8 @@ import com.vaadin.data.Container.Hierarchical;
import com.vaadin.data.Container.Sortable;
import com.vaadin.data.Item;
-public abstract class AbstractHierarchicalContainerTestBase extends
- AbstractContainerTestBase {
+public abstract class AbstractHierarchicalContainerTestBase
+ extends AbstractContainerTestBase {
/**
* @param container
@@ -45,9 +45,8 @@ public abstract class AbstractHierarchicalContainerTestBase extends
*/
protected void validateHierarchicalContainer(Hierarchical container,
Object expectedFirstItemId, Object expectedLastItemId,
- Object itemIdInSet, Object itemIdNotInSet,
- boolean checkGetItemNull, int expectedSize, int expectedRootSize,
- boolean rootsHaveChildren) {
+ Object itemIdInSet, Object itemIdNotInSet, boolean checkGetItemNull,
+ int expectedSize, int expectedRootSize, boolean rootsHaveChildren) {
validateContainer(container, expectedFirstItemId, expectedLastItemId,
itemIdInSet, itemIdNotInSet, checkGetItemNull, expectedSize);
@@ -166,10 +165,10 @@ public abstract class AbstractHierarchicalContainerTestBase extends
initializeContainer(container);
// Must be able to sort based on PROP1 and PROP2 for this test
- assertTrue(sortable.getSortableContainerPropertyIds().contains(
- FULLY_QUALIFIED_NAME));
- assertTrue(sortable.getSortableContainerPropertyIds().contains(
- REVERSE_FULLY_QUALIFIED_NAME));
+ assertTrue(sortable.getSortableContainerPropertyIds()
+ .contains(FULLY_QUALIFIED_NAME));
+ assertTrue(sortable.getSortableContainerPropertyIds()
+ .contains(REVERSE_FULLY_QUALIFIED_NAME));
sortable.sort(new Object[] { FULLY_QUALIFIED_NAME },
new boolean[] { true });
@@ -218,8 +217,8 @@ public abstract class AbstractHierarchicalContainerTestBase extends
Item item = container.getItem(path);
item.getItemProperty(FULLY_QUALIFIED_NAME).setValue(path);
item.getItemProperty(SIMPLE_NAME).setValue(getSimpleName(path));
- item.getItemProperty(REVERSE_FULLY_QUALIFIED_NAME).setValue(
- reverse(path));
+ item.getItemProperty(REVERSE_FULLY_QUALIFIED_NAME)
+ .setValue(reverse(path));
item.getItemProperty(ID_NUMBER).setValue(1);
}
for (int j = 1; j < paths.length; j++) {
@@ -233,16 +232,15 @@ public abstract class AbstractHierarchicalContainerTestBase extends
Item item = container.getItem(path);
item.getItemProperty(FULLY_QUALIFIED_NAME).setValue(path);
- item.getItemProperty(SIMPLE_NAME).setValue(
- getSimpleName(path));
+ item.getItemProperty(SIMPLE_NAME)
+ .setValue(getSimpleName(path));
item.getItemProperty(REVERSE_FULLY_QUALIFIED_NAME)
.setValue(reverse(path));
item.getItemProperty(ID_NUMBER).setValue(1);
}
assertTrue(container.setChildrenAllowed(parent, true));
- assertTrue(
- "Failed to set " + parent + " as parent for " + path,
+ assertTrue("Failed to set " + parent + " as parent for " + path,
container.setParent(path, parent));
}
@@ -251,10 +249,10 @@ public abstract class AbstractHierarchicalContainerTestBase extends
String parent = id.substring(0, id.lastIndexOf('.'));
assertTrue(container.setParent(id, parent));
item.getItemProperty(FULLY_QUALIFIED_NAME).setValue(sampleData[i]);
- item.getItemProperty(SIMPLE_NAME).setValue(
- getSimpleName(sampleData[i]));
- item.getItemProperty(REVERSE_FULLY_QUALIFIED_NAME).setValue(
- reverse(sampleData[i]));
+ item.getItemProperty(SIMPLE_NAME)
+ .setValue(getSimpleName(sampleData[i]));
+ item.getItemProperty(REVERSE_FULLY_QUALIFIED_NAME)
+ .setValue(reverse(sampleData[i]));
item.getItemProperty(ID_NUMBER).setValue(i % 2);
}
}
diff --git a/server/src/test/java/com/vaadin/data/util/AbstractInMemoryContainerTestBase.java b/server/src/test/java/com/vaadin/data/util/AbstractInMemoryContainerTestBase.java
index d2c1a17bf8..3858504bc7 100644
--- a/server/src/test/java/com/vaadin/data/util/AbstractInMemoryContainerTestBase.java
+++ b/server/src/test/java/com/vaadin/data/util/AbstractInMemoryContainerTestBase.java
@@ -1,6 +1,6 @@
package com.vaadin.data.util;
-public abstract class AbstractInMemoryContainerTestBase extends
- AbstractContainerTestBase {
+public abstract class AbstractInMemoryContainerTestBase
+ extends AbstractContainerTestBase {
}
diff --git a/server/src/test/java/com/vaadin/data/util/BeanContainerTest.java b/server/src/test/java/com/vaadin/data/util/BeanContainerTest.java
index d990f3d123..bdf6ba1958 100644
--- a/server/src/test/java/com/vaadin/data/util/BeanContainerTest.java
+++ b/server/src/test/java/com/vaadin/data/util/BeanContainerTest.java
@@ -23,8 +23,8 @@ import com.vaadin.data.util.AbstractBeanContainer.BeanIdResolver;
public class BeanContainerTest extends AbstractBeanContainerTestBase {
- protected static class PersonNameResolver implements
- BeanIdResolver<String, Person> {
+ protected static class PersonNameResolver
+ implements BeanIdResolver<String, Person> {
@Override
public String getIdForBean(Person bean) {
@@ -33,8 +33,8 @@ public class BeanContainerTest extends AbstractBeanContainerTestBase {
}
- protected static class NullResolver implements
- BeanIdResolver<String, Person> {
+ protected static class NullResolver
+ implements BeanIdResolver<String, Person> {
@Override
public String getIdForBean(Person bean) {
@@ -367,8 +367,8 @@ public class BeanContainerTest extends AbstractBeanContainerTestBase {
BeanContainer<String, Person> container = new BeanContainer<String, Person>(
Person.class);
// resolver that returns null as item id
- container
- .setBeanIdResolver(new BeanIdResolver<String, AbstractBeanContainerTestBase.Person>() {
+ container.setBeanIdResolver(
+ new BeanIdResolver<String, AbstractBeanContainerTestBase.Person>() {
@Override
public String getIdForBean(Person bean) {
@@ -434,8 +434,8 @@ public class BeanContainerTest extends AbstractBeanContainerTestBase {
assertNotNull(container.addBeanAfter(null, new Person("Jane")));
assertNotNull(container.addBeanAt(0, new Person("Jack")));
- container.addAll(Arrays.asList(new Person[] { new Person("Jill"),
- new Person("Joe") }));
+ container.addAll(Arrays.asList(
+ new Person[] { new Person("Jill"), new Person("Joe") }));
assertTrue(container.containsId("John"));
assertTrue(container.containsId("Jane"));
@@ -470,8 +470,8 @@ public class BeanContainerTest extends AbstractBeanContainerTestBase {
assertNotNull(container.addBeanAfter(null, new Person("Jane")));
assertNotNull(container.addBeanAt(0, new Person("Jack")));
- container.addAll(Arrays.asList(new Person[] { new Person("Jill"),
- new Person("Joe") }));
+ container.addAll(Arrays.asList(
+ new Person[] { new Person("Jill"), new Person("Joe") }));
assertTrue(container.containsId("John"));
assertTrue(container.containsId("Jane"));
@@ -493,9 +493,8 @@ public class BeanContainerTest extends AbstractBeanContainerTestBase {
new NestedMethodPropertyTest.Address("Ruukinkatu 2-4", 20540)));
assertTrue(container.addNestedContainerProperty("address.street"));
- assertEquals("Ruukinkatu 2-4",
- container.getContainerProperty("John", "address.street")
- .getValue());
+ assertEquals("Ruukinkatu 2-4", container
+ .getContainerProperty("John", "address.street").getValue());
}
@Test
diff --git a/server/src/test/java/com/vaadin/data/util/BeanItemContainerTest.java b/server/src/test/java/com/vaadin/data/util/BeanItemContainerTest.java
index 0298e57dcc..19b0835fd6 100644
--- a/server/src/test/java/com/vaadin/data/util/BeanItemContainerTest.java
+++ b/server/src/test/java/com/vaadin/data/util/BeanItemContainerTest.java
@@ -30,7 +30,7 @@ import com.vaadin.data.util.filter.Compare;
/**
* Test basic functionality of BeanItemContainer.
- *
+ *
* Most sorting related tests are in {@link BeanItemContainerSortTest}.
*/
public class BeanItemContainerTest extends AbstractBeanContainerTestBase {
@@ -69,16 +69,15 @@ public class BeanItemContainerTest extends AbstractBeanContainerTestBase {
@Override
protected void validateContainer(Container container,
Object expectedFirstItemId, Object expectedLastItemId,
- Object itemIdInSet, Object itemIdNotInSet,
- boolean checkGetItemNull, int expectedSize) {
+ Object itemIdInSet, Object itemIdNotInSet, boolean checkGetItemNull,
+ int expectedSize) {
Object notInSet = nameToBean.get(itemIdNotInSet);
if (notInSet == null && itemIdNotInSet != null) {
notInSet = new ClassName(String.valueOf(itemIdNotInSet), 9999);
}
super.validateContainer(container, nameToBean.get(expectedFirstItemId),
- nameToBean.get(expectedLastItemId),
- nameToBean.get(itemIdInSet), notInSet, checkGetItemNull,
- expectedSize);
+ nameToBean.get(expectedLastItemId), nameToBean.get(itemIdInSet),
+ notInSet, checkGetItemNull, expectedSize);
}
@Override
@@ -236,13 +235,15 @@ public class BeanItemContainerTest extends AbstractBeanContainerTestBase {
public void testEmptyCollectionConstructor() {
try {
new BeanItemContainer<ClassName>((Collection<ClassName>) null);
- Assert.fail("Initializing BeanItemContainer from a null collection should not work!");
+ Assert.fail(
+ "Initializing BeanItemContainer from a null collection should not work!");
} catch (IllegalArgumentException e) {
// success
}
try {
new BeanItemContainer<ClassName>(new ArrayList<ClassName>());
- Assert.fail("Initializing BeanItemContainer from an empty collection should not work!");
+ Assert.fail(
+ "Initializing BeanItemContainer from an empty collection should not work!");
} catch (IllegalArgumentException e) {
// success
}
@@ -276,8 +277,7 @@ public class BeanItemContainerTest extends AbstractBeanContainerTestBase {
counter.reset();
container.addItemAfter(null, cn1);
counter.assertOnce();
- Assert.assertEquals(
- "com.example.Test",
+ Assert.assertEquals("com.example.Test",
container.getContainerProperty(container.firstItemId(),
FULLY_QUALIFIED_NAME).getValue());
@@ -285,8 +285,7 @@ public class BeanItemContainerTest extends AbstractBeanContainerTestBase {
counter.reset();
container.addItemAfter(container.firstItemId(), cn1);
counter.assertOnce();
- Assert.assertEquals(
- "com.example.Test",
+ Assert.assertEquals("com.example.Test",
container.getContainerProperty(container.getIdByIndex(1),
FULLY_QUALIFIED_NAME).getValue());
@@ -294,8 +293,7 @@ public class BeanItemContainerTest extends AbstractBeanContainerTestBase {
counter.reset();
container.addItemAfter(container.lastItemId(), cn1);
counter.assertOnce();
- Assert.assertEquals(
- "com.example.Test",
+ Assert.assertEquals("com.example.Test",
container.getContainerProperty(container.lastItemId(),
FULLY_QUALIFIED_NAME).getValue());
@@ -303,8 +301,7 @@ public class BeanItemContainerTest extends AbstractBeanContainerTestBase {
counter.reset();
container.addItemAt(0, cn1);
counter.assertOnce();
- Assert.assertEquals(
- "com.example.Test",
+ Assert.assertEquals("com.example.Test",
container.getContainerProperty(container.firstItemId(),
FULLY_QUALIFIED_NAME).getValue());
@@ -312,8 +309,7 @@ public class BeanItemContainerTest extends AbstractBeanContainerTestBase {
counter.reset();
container.addItemAt(1, cn1);
counter.assertOnce();
- Assert.assertEquals(
- "com.example.Test",
+ Assert.assertEquals("com.example.Test",
container.getContainerProperty(container.getIdByIndex(1),
FULLY_QUALIFIED_NAME).getValue());
@@ -321,8 +317,7 @@ public class BeanItemContainerTest extends AbstractBeanContainerTestBase {
counter.reset();
container.addItemAt(container.size(), cn1);
counter.assertOnce();
- Assert.assertEquals(
- "com.example.Test",
+ Assert.assertEquals("com.example.Test",
container.getContainerProperty(container.lastItemId(),
FULLY_QUALIFIED_NAME).getValue());
@@ -408,8 +403,7 @@ public class BeanItemContainerTest extends AbstractBeanContainerTestBase {
counter.reset();
container.addItemAfter(null, cn1);
counter.assertOnce();
- Assert.assertEquals(
- "com.example.Test",
+ Assert.assertEquals("com.example.Test",
container.getContainerProperty(container.firstItemId(),
FULLY_QUALIFIED_NAME).getValue());
@@ -417,8 +411,7 @@ public class BeanItemContainerTest extends AbstractBeanContainerTestBase {
counter.reset();
container.addItemAfter(container.firstItemId(), cn1);
counter.assertOnce();
- Assert.assertEquals(
- "com.example.Test",
+ Assert.assertEquals("com.example.Test",
container.getContainerProperty(container.getIdByIndex(1),
FULLY_QUALIFIED_NAME).getValue());
@@ -426,8 +419,7 @@ public class BeanItemContainerTest extends AbstractBeanContainerTestBase {
counter.reset();
container.addItemAfter(container.lastItemId(), cn1);
counter.assertOnce();
- Assert.assertEquals(
- "com.example.Test",
+ Assert.assertEquals("com.example.Test",
container.getContainerProperty(container.lastItemId(),
FULLY_QUALIFIED_NAME).getValue());
@@ -435,8 +427,7 @@ public class BeanItemContainerTest extends AbstractBeanContainerTestBase {
counter.reset();
container.addItemAt(0, cn1);
counter.assertOnce();
- Assert.assertEquals(
- "com.example.Test",
+ Assert.assertEquals("com.example.Test",
container.getContainerProperty(container.firstItemId(),
FULLY_QUALIFIED_NAME).getValue());
@@ -444,8 +435,7 @@ public class BeanItemContainerTest extends AbstractBeanContainerTestBase {
counter.reset();
container.addItemAt(1, cn1);
counter.assertOnce();
- Assert.assertEquals(
- "com.example.Test",
+ Assert.assertEquals("com.example.Test",
container.getContainerProperty(container.getIdByIndex(1),
FULLY_QUALIFIED_NAME).getValue());
@@ -453,8 +443,7 @@ public class BeanItemContainerTest extends AbstractBeanContainerTestBase {
counter.reset();
container.addItemAt(container.size(), cn1);
counter.assertOnce();
- Assert.assertEquals(
- "com.example.Test",
+ Assert.assertEquals("com.example.Test",
container.getContainerProperty(container.lastItemId(),
FULLY_QUALIFIED_NAME).getValue());
@@ -704,8 +693,8 @@ public class BeanItemContainerTest extends AbstractBeanContainerTestBase {
Person john = new Person("John");
container.addBean(john);
- Assert.assertEquals("John", container
- .getContainerProperty(john, "name").getValue());
+ Assert.assertEquals("John",
+ container.getContainerProperty(john, "name").getValue());
Assert.assertTrue(container.removeContainerProperty("name"));
Assert.assertNull(container.getContainerProperty(john, "name"));
@@ -749,14 +738,13 @@ public class BeanItemContainerTest extends AbstractBeanContainerTestBase {
NestedMethodPropertyTest.Person.class);
NestedMethodPropertyTest.Person john = new NestedMethodPropertyTest.Person(
- "John", new NestedMethodPropertyTest.Address("Ruukinkatu 2-4",
- 20540));
+ "John",
+ new NestedMethodPropertyTest.Address("Ruukinkatu 2-4", 20540));
container.addBean(john);
assertTrue(container.addNestedContainerProperty("address.street"));
- assertEquals("Ruukinkatu 2-4",
- container.getContainerProperty(john, "address.street")
- .getValue());
+ assertEquals("Ruukinkatu 2-4", container
+ .getContainerProperty(john, "address.street").getValue());
}
@Test
@@ -839,8 +827,8 @@ public class BeanItemContainerTest extends AbstractBeanContainerTestBase {
ItemSetChangeListener addListener = createListenerMockFor(container);
Capture<ItemAddEvent> capturedEvent = captureAddEvent(addListener);
EasyMock.replay(addListener);
- List<Person> beans = Arrays.asList(new Person("Jack"), new Person(
- "John"));
+ List<Person> beans = Arrays.asList(new Person("Jack"),
+ new Person("John"));
container.addAll(beans);
@@ -854,8 +842,8 @@ public class BeanItemContainerTest extends AbstractBeanContainerTestBase {
ItemSetChangeListener addListener = createListenerMockFor(container);
Capture<ItemAddEvent> capturedEvent = captureAddEvent(addListener);
EasyMock.replay(addListener);
- List<Person> beans = Arrays.asList(new Person("Jack"), new Person(
- "John"));
+ List<Person> beans = Arrays.asList(new Person("Jack"),
+ new Person("John"));
container.addFilter(new Compare.Equal("name", "John"));
container.addAll(beans);
@@ -886,8 +874,8 @@ public class BeanItemContainerTest extends AbstractBeanContainerTestBase {
Person bean = new Person("John");
container.addItem(bean);
ItemSetChangeListener removeListener = createListenerMockFor(container);
- removeListener.containerItemSetChange(EasyMock
- .isA(ItemRemoveEvent.class));
+ removeListener
+ .containerItemSetChange(EasyMock.isA(ItemRemoveEvent.class));
EasyMock.replay(removeListener);
container.removeItem(bean);
@@ -902,7 +890,8 @@ public class BeanItemContainerTest extends AbstractBeanContainerTestBase {
Person bean = new Person("John");
container.addItem(bean);
ItemSetChangeListener removeListener = createListenerMockFor(container);
- Capture<ItemRemoveEvent> capturedEvent = captureRemoveEvent(removeListener);
+ Capture<ItemRemoveEvent> capturedEvent = captureRemoveEvent(
+ removeListener);
EasyMock.replay(removeListener);
container.removeItem(bean);
@@ -918,7 +907,8 @@ public class BeanItemContainerTest extends AbstractBeanContainerTestBase {
Person secondBean = new Person("John");
container.addItem(secondBean);
ItemSetChangeListener removeListener = createListenerMockFor(container);
- Capture<ItemRemoveEvent> capturedEvent = captureRemoveEvent(removeListener);
+ Capture<ItemRemoveEvent> capturedEvent = captureRemoveEvent(
+ removeListener);
EasyMock.replay(removeListener);
container.removeItem(secondBean);
@@ -933,7 +923,8 @@ public class BeanItemContainerTest extends AbstractBeanContainerTestBase {
container.addItem(new Person("Jack"));
container.addItem(new Person("John"));
ItemSetChangeListener removeListener = createListenerMockFor(container);
- Capture<ItemRemoveEvent> capturedEvent = captureRemoveEvent(removeListener);
+ Capture<ItemRemoveEvent> capturedEvent = captureRemoveEvent(
+ removeListener);
EasyMock.replay(removeListener);
container.removeAllItems();
@@ -970,8 +961,8 @@ public class BeanItemContainerTest extends AbstractBeanContainerTestBase {
container.addNestedContainerBean("address");
- assertTrue(container.getContainerPropertyIds().contains(
- "address.street"));
+ assertTrue(
+ container.getContainerPropertyIds().contains("address.street"));
NestedMethodPropertyTest.Person john = new NestedMethodPropertyTest.Person(
"John", new Address("streetname", 12345));
@@ -979,9 +970,8 @@ public class BeanItemContainerTest extends AbstractBeanContainerTestBase {
assertTrue(container.getItem(john).getItemPropertyIds()
.contains("address.street"));
- assertEquals("streetname",
- container.getItem(john).getItemProperty("address.street")
- .getValue());
+ assertEquals("streetname", container.getItem(john)
+ .getItemProperty("address.street").getValue());
}
@@ -996,13 +986,12 @@ public class BeanItemContainerTest extends AbstractBeanContainerTestBase {
container.addNestedContainerBean("address");
- assertTrue(container.getContainerPropertyIds().contains(
- "address.street"));
+ assertTrue(
+ container.getContainerPropertyIds().contains("address.street"));
assertTrue(container.getItem(john).getItemPropertyIds()
.contains("address.street"));
- assertEquals("streetname",
- container.getItem(john).getItemProperty("address.street")
- .getValue());
+ assertEquals("streetname", container.getItem(john)
+ .getItemProperty("address.street").getValue());
}
}
diff --git a/server/src/test/java/com/vaadin/data/util/BeanItemTest.java b/server/src/test/java/com/vaadin/data/util/BeanItemTest.java
index e78d518a25..1bbe74818c 100644
--- a/server/src/test/java/com/vaadin/data/util/BeanItemTest.java
+++ b/server/src/test/java/com/vaadin/data/util/BeanItemTest.java
@@ -16,9 +16,9 @@ import com.vaadin.data.Property;
/**
* Test BeanItem specific features.
- *
+ *
* Only public API is tested, not the methods with package visibility.
- *
+ *
* See also {@link PropertySetItemTest}, which tests the base class.
*/
public class BeanItemTest {
@@ -148,8 +148,8 @@ public class BeanItemTest {
}
}
- protected static interface MySubInterface extends MySuperInterface,
- MySuperInterface2 {
+ protected static interface MySubInterface
+ extends MySuperInterface, MySuperInterface2 {
public int getSub();
public void setSub(int i);
@@ -203,8 +203,8 @@ public class BeanItemTest {
public void testGetInterfaceProperties() throws SecurityException,
NoSuchMethodException, IllegalArgumentException,
IllegalAccessException, InvocationTargetException {
- Method method = BeanItem.class.getDeclaredMethod(
- "getPropertyDescriptors", Class.class);
+ Method method = BeanItem.class
+ .getDeclaredMethod("getPropertyDescriptors", Class.class);
method.setAccessible(true);
LinkedHashMap<String, VaadinPropertyDescriptor<Class>> propertyDescriptors = (LinkedHashMap<String, VaadinPropertyDescriptor<Class>>) method
.invoke(null, MySuperInterface.class);
@@ -222,8 +222,8 @@ public class BeanItemTest {
public void testGetSuperInterfaceProperties() throws SecurityException,
NoSuchMethodException, IllegalArgumentException,
IllegalAccessException, InvocationTargetException {
- Method method = BeanItem.class.getDeclaredMethod(
- "getPropertyDescriptors", Class.class);
+ Method method = BeanItem.class
+ .getDeclaredMethod("getPropertyDescriptors", Class.class);
method.setAccessible(true);
LinkedHashMap<String, VaadinPropertyDescriptor<Class>> propertyDescriptors = (LinkedHashMap<String, VaadinPropertyDescriptor<Class>>) method
.invoke(null, MySubInterface.class);
@@ -314,14 +314,14 @@ public class BeanItemTest {
public void testPropertyTypes() {
BeanItem<MyClass> item = new BeanItem<MyClass>(new MyClass("bean1"));
- Assert.assertTrue(Integer.class.equals(item.getItemProperty(
- "superPrivate").getType()));
- Assert.assertTrue(Double.class.equals(item.getItemProperty(
- "superProtected").getType()));
- Assert.assertTrue(Boolean.class.equals(item.getItemProperty(
- "superPublic").getType()));
- Assert.assertTrue(String.class.equals(item.getItemProperty("name")
- .getType()));
+ Assert.assertTrue(Integer.class
+ .equals(item.getItemProperty("superPrivate").getType()));
+ Assert.assertTrue(Double.class
+ .equals(item.getItemProperty("superProtected").getType()));
+ Assert.assertTrue(Boolean.class
+ .equals(item.getItemProperty("superPublic").getType()));
+ Assert.assertTrue(
+ String.class.equals(item.getItemProperty("name").getType()));
}
@Test
@@ -335,12 +335,12 @@ public class BeanItemTest {
@Test
public void testCustomProperties() throws Exception {
LinkedHashMap<String, VaadinPropertyDescriptor<MyClass>> propertyDescriptors = new LinkedHashMap<String, VaadinPropertyDescriptor<MyClass>>();
- propertyDescriptors.put(
- "myname",
+ propertyDescriptors.put("myname",
new MethodPropertyDescriptor<BeanItemTest.MyClass>("myname",
- MyClass.class, MyClass.class
- .getDeclaredMethod("getName"), MyClass.class
- .getDeclaredMethod("setName", String.class)));
+ MyClass.class,
+ MyClass.class.getDeclaredMethod("getName"),
+ MyClass.class.getDeclaredMethod("setName",
+ String.class)));
MyClass instance = new MyClass("bean1");
Constructor<BeanItem> constructor = BeanItem.class
.getDeclaredConstructor(Object.class, Map.class);
diff --git a/server/src/test/java/com/vaadin/data/util/ContainerHierarchicalWrapperTest.java b/server/src/test/java/com/vaadin/data/util/ContainerHierarchicalWrapperTest.java
index a6fec6670b..e41f751bfd 100644
--- a/server/src/test/java/com/vaadin/data/util/ContainerHierarchicalWrapperTest.java
+++ b/server/src/test/java/com/vaadin/data/util/ContainerHierarchicalWrapperTest.java
@@ -2,25 +2,25 @@ package com.vaadin.data.util;
import org.junit.Test;
-public class ContainerHierarchicalWrapperTest extends
- AbstractHierarchicalContainerTestBase {
+public class ContainerHierarchicalWrapperTest
+ extends AbstractHierarchicalContainerTestBase {
@Test
public void testBasicOperations() {
- testBasicContainerOperations(new ContainerHierarchicalWrapper(
- new IndexedContainer()));
+ testBasicContainerOperations(
+ new ContainerHierarchicalWrapper(new IndexedContainer()));
}
@Test
public void testHierarchicalContainer() {
- testHierarchicalContainer(new ContainerHierarchicalWrapper(
- new IndexedContainer()));
+ testHierarchicalContainer(
+ new ContainerHierarchicalWrapper(new IndexedContainer()));
}
@Test
public void testRemoveSubtree() {
- testRemoveHierarchicalWrapperSubtree(new ContainerHierarchicalWrapper(
- new IndexedContainer()));
+ testRemoveHierarchicalWrapperSubtree(
+ new ContainerHierarchicalWrapper(new IndexedContainer()));
}
}
diff --git a/server/src/test/java/com/vaadin/data/util/ContainerOrderedWrapperTest.java b/server/src/test/java/com/vaadin/data/util/ContainerOrderedWrapperTest.java
index 7e720071be..c3a8b2c4f9 100644
--- a/server/src/test/java/com/vaadin/data/util/ContainerOrderedWrapperTest.java
+++ b/server/src/test/java/com/vaadin/data/util/ContainerOrderedWrapperTest.java
@@ -56,7 +56,8 @@ public class ContainerOrderedWrapperTest extends AbstractContainerTestBase {
}
@Override
- public Item addItem(Object itemId) throws UnsupportedOperationException {
+ public Item addItem(Object itemId)
+ throws UnsupportedOperationException {
return container.addItem(itemId);
}
@@ -93,14 +94,14 @@ public class ContainerOrderedWrapperTest extends AbstractContainerTestBase {
@Test
public void testBasicOperations() {
- testBasicContainerOperations(new ContainerOrderedWrapper(
- new NotOrderedContainer()));
+ testBasicContainerOperations(
+ new ContainerOrderedWrapper(new NotOrderedContainer()));
}
@Test
public void testOrdered() {
- testContainerOrdered(new ContainerOrderedWrapper(
- new NotOrderedContainer()));
+ testContainerOrdered(
+ new ContainerOrderedWrapper(new NotOrderedContainer()));
}
}
diff --git a/server/src/test/java/com/vaadin/data/util/ContainerSizeAssertTest.java b/server/src/test/java/com/vaadin/data/util/ContainerSizeAssertTest.java
index 04fd8d3cd1..4e97328206 100644
--- a/server/src/test/java/com/vaadin/data/util/ContainerSizeAssertTest.java
+++ b/server/src/test/java/com/vaadin/data/util/ContainerSizeAssertTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/data/util/ContainerSortingTest.java b/server/src/test/java/com/vaadin/data/util/ContainerSortingTest.java
index dced4b4e72..1c4dc1de5e 100644
--- a/server/src/test/java/com/vaadin/data/util/ContainerSortingTest.java
+++ b/server/src/test/java/com/vaadin/data/util/ContainerSortingTest.java
@@ -66,15 +66,15 @@ public class ContainerSortingTest {
ITEM_STRING_1, ITEM_STRING_2, ITEM_STRING_NULL2 });
ic.sort(new Object[] { PROPERTY_INTEGER_NOT_NULL,
- PROPERTY_INTEGER_NULL2, PROPERTY_STRING_ID }, new boolean[] {
- true, false, true });
+ PROPERTY_INTEGER_NULL2, PROPERTY_STRING_ID },
+ new boolean[] { true, false, true });
verifyOrder(ic, new String[] { ITEM_DATA_MINUS2, ITEM_DATA_MINUS2_NULL,
ITEM_DATA_MINUS1, ITEM_DATA_MINUS1_NULL, ITEM_ANOTHER_NULL,
ITEM_STRING_NULL2, ITEM_STRING_1, ITEM_STRING_2 });
ic.sort(new Object[] { PROPERTY_INTEGER_NOT_NULL,
- PROPERTY_INTEGER_NULL2, PROPERTY_STRING_ID }, new boolean[] {
- true, true, true });
+ PROPERTY_INTEGER_NULL2, PROPERTY_STRING_ID },
+ new boolean[] { true, true, true });
verifyOrder(ic, new String[] { ITEM_DATA_MINUS2_NULL, ITEM_DATA_MINUS2,
ITEM_DATA_MINUS1_NULL, ITEM_DATA_MINUS1, ITEM_ANOTHER_NULL,
ITEM_STRING_NULL2, ITEM_STRING_1, ITEM_STRING_2 });
@@ -86,18 +86,17 @@ public class ContainerSortingTest {
HierarchicalContainer hc = new HierarchicalContainer();
populateContainer(hc);
hc.sort(new Object[] { "name" }, new boolean[] { true });
- verifyOrder(hc, new String[] { "Audi", "C++", "Call of Duty", "Cars",
- "English", "Fallout", "Finnish", "Ford", "Games", "Java",
- "Might and Magic", "Natural languages", "PHP",
- "Programming languages", "Python", "Red Alert", "Swedish",
- "Toyota", "Volvo" });
- TestUtil.assertArrays(
- hc.rootItemIds().toArray(),
+ verifyOrder(hc,
+ new String[] { "Audi", "C++", "Call of Duty", "Cars", "English",
+ "Fallout", "Finnish", "Ford", "Games", "Java",
+ "Might and Magic", "Natural languages", "PHP",
+ "Programming languages", "Python", "Red Alert",
+ "Swedish", "Toyota", "Volvo" });
+ TestUtil.assertArrays(hc.rootItemIds().toArray(),
new Integer[] { nameToId.get("Cars"), nameToId.get("Games"),
nameToId.get("Natural languages"),
nameToId.get("Programming languages") });
- TestUtil.assertArrays(
- hc.getChildren(nameToId.get("Games")).toArray(),
+ TestUtil.assertArrays(hc.getChildren(nameToId.get("Games")).toArray(),
new Integer[] { nameToId.get("Call of Duty"),
nameToId.get("Fallout"),
nameToId.get("Might and Magic"),
diff --git a/server/src/test/java/com/vaadin/data/util/FileSystemContainerTest.java b/server/src/test/java/com/vaadin/data/util/FileSystemContainerTest.java
index f4bb794e5c..992b265702 100644
--- a/server/src/test/java/com/vaadin/data/util/FileSystemContainerTest.java
+++ b/server/src/test/java/com/vaadin/data/util/FileSystemContainerTest.java
@@ -9,8 +9,8 @@ public class FileSystemContainerTest {
@Test
public void nonExistingDirectory() {
- FilesystemContainer fsc = new FilesystemContainer(new File(
- "/non/existing"));
+ FilesystemContainer fsc = new FilesystemContainer(
+ new File("/non/existing"));
Assert.assertTrue(fsc.getItemIds().isEmpty());
}
}
diff --git a/server/src/test/java/com/vaadin/data/util/GeneratedPropertyContainerBasicTest.java b/server/src/test/java/com/vaadin/data/util/GeneratedPropertyContainerBasicTest.java
index 5f7f965c69..11335314f0 100644
--- a/server/src/test/java/com/vaadin/data/util/GeneratedPropertyContainerBasicTest.java
+++ b/server/src/test/java/com/vaadin/data/util/GeneratedPropertyContainerBasicTest.java
@@ -20,8 +20,8 @@ import com.vaadin.data.Container.ItemSetChangeNotifier;
import com.vaadin.data.Item;
import com.vaadin.data.util.filter.SimpleStringFilter;
-public class GeneratedPropertyContainerBasicTest extends
- AbstractInMemoryContainerTestBase {
+public class GeneratedPropertyContainerBasicTest
+ extends AbstractInMemoryContainerTestBase {
@Test
public void testBasicOperations() {
@@ -147,8 +147,8 @@ public class GeneratedPropertyContainerBasicTest extends
counter.assertOnce();
container.removeContainerFilter(filter);
counter.assertOnce();
- container.addContainerFilter(new SimpleStringFilter(SIMPLE_NAME, "a",
- true, false));
+ container.addContainerFilter(
+ new SimpleStringFilter(SIMPLE_NAME, "a", true, false));
counter.assertOnce();
container.removeAllContainerFilters();
counter.assertOnce();
@@ -164,8 +164,8 @@ public class GeneratedPropertyContainerBasicTest extends
counter.reset();
((Container.Filterable) container)
- .addContainerFilter(new SimpleStringFilter(
- FULLY_QUALIFIED_NAME, "Test", true, false));
+ .addContainerFilter(new SimpleStringFilter(FULLY_QUALIFIED_NAME,
+ "Test", true, false));
// no real change, so no notification required
counter.assertNone();
@@ -380,8 +380,8 @@ public class GeneratedPropertyContainerBasicTest extends
GeneratedPropertyContainer container = createContainer();
Object itemId = container.addItem();
ItemSetChangeListener removeListener = createListenerMockFor(container);
- removeListener.containerItemSetChange(EasyMock
- .isA(ItemRemoveEvent.class));
+ removeListener
+ .containerItemSetChange(EasyMock.isA(ItemRemoveEvent.class));
EasyMock.replay(removeListener);
container.removeItem(itemId);
@@ -394,7 +394,8 @@ public class GeneratedPropertyContainerBasicTest extends
GeneratedPropertyContainer container = createContainer();
Object itemId = container.addItem();
ItemSetChangeListener removeListener = createListenerMockFor(container);
- Capture<ItemRemoveEvent> capturedEvent = captureRemoveEvent(removeListener);
+ Capture<ItemRemoveEvent> capturedEvent = captureRemoveEvent(
+ removeListener);
EasyMock.replay(removeListener);
container.removeItem(itemId);
@@ -408,7 +409,8 @@ public class GeneratedPropertyContainerBasicTest extends
container.addItem();
Object secondItemId = container.addItem();
ItemSetChangeListener removeListener = createListenerMockFor(container);
- Capture<ItemRemoveEvent> capturedEvent = captureRemoveEvent(removeListener);
+ Capture<ItemRemoveEvent> capturedEvent = captureRemoveEvent(
+ removeListener);
EasyMock.replay(removeListener);
container.removeItem(secondItemId);
@@ -422,7 +424,8 @@ public class GeneratedPropertyContainerBasicTest extends
container.addItem();
container.addItem();
ItemSetChangeListener removeListener = createListenerMockFor(container);
- Capture<ItemRemoveEvent> capturedEvent = captureRemoveEvent(removeListener);
+ Capture<ItemRemoveEvent> capturedEvent = captureRemoveEvent(
+ removeListener);
EasyMock.replay(removeListener);
container.removeAllItems();
diff --git a/server/src/test/java/com/vaadin/data/util/GeneratedPropertyContainerTest.java b/server/src/test/java/com/vaadin/data/util/GeneratedPropertyContainerTest.java
index b08437a953..24091f5d5a 100644
--- a/server/src/test/java/com/vaadin/data/util/GeneratedPropertyContainerTest.java
+++ b/server/src/test/java/com/vaadin/data/util/GeneratedPropertyContainerTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -41,8 +41,8 @@ public class GeneratedPropertyContainerTest {
Indexed wrappedContainer;
private static double MILES_CONVERSION = 0.6214d;
- private class GeneratedPropertyListener implements
- PropertySetChangeListener {
+ private class GeneratedPropertyListener
+ implements PropertySetChangeListener {
private int callCount = 0;
@@ -99,8 +99,9 @@ public class GeneratedPropertyContainerTest {
});
Object itemId = container.addItem();
- assertEquals("Expected value not in item.", container.getItem(itemId)
- .getItemProperty("hello").getValue(), "Hello World!");
+ assertEquals("Expected value not in item.",
+ container.getItem(itemId).getItemProperty("hello").getValue(),
+ "Hello World!");
}
@Test
@@ -123,8 +124,8 @@ public class GeneratedPropertyContainerTest {
@Override
public SortOrder[] getSortProperties(SortOrder order) {
SortOrder[] sortOrder = new SortOrder[1];
- sortOrder[0] = new SortOrder("bar", order
- .getDirection());
+ sortOrder[0] = new SortOrder("bar",
+ order.getDirection());
return sortOrder;
}
});
@@ -159,7 +160,8 @@ public class GeneratedPropertyContainerTest {
}
});
- assertFalse(container.getSortableContainerPropertyIds().contains("bar"));
+ assertFalse(
+ container.getSortableContainerPropertyIds().contains("bar"));
}
@Test
@@ -273,8 +275,8 @@ public class GeneratedPropertyContainerTest {
@Test
public void testRemoveProperty() {
container.removeContainerProperty("foo");
- assertFalse("Container contained removed property", container
- .getContainerPropertyIds().contains("foo"));
+ assertFalse("Container contained removed property",
+ container.getContainerPropertyIds().contains("foo"));
assertTrue("Wrapped container did not contain removed property",
wrappedContainer.getContainerPropertyIds().contains("foo"));
@@ -282,8 +284,8 @@ public class GeneratedPropertyContainerTest {
.getItemPropertyIds().contains("foo"));
container.addContainerProperty("foo", null, null);
- assertTrue("Container did not contain returned property", container
- .getContainerPropertyIds().contains("foo"));
+ assertTrue("Container did not contain returned property",
+ container.getContainerPropertyIds().contains("foo"));
}
@Test
diff --git a/server/src/test/java/com/vaadin/data/util/HierarchicalContainerOrderedWrapperTest.java b/server/src/test/java/com/vaadin/data/util/HierarchicalContainerOrderedWrapperTest.java
index 8c7970e554..54984f07ad 100644
--- a/server/src/test/java/com/vaadin/data/util/HierarchicalContainerOrderedWrapperTest.java
+++ b/server/src/test/java/com/vaadin/data/util/HierarchicalContainerOrderedWrapperTest.java
@@ -2,8 +2,8 @@ package com.vaadin.data.util;
import org.junit.Test;
-public class HierarchicalContainerOrderedWrapperTest extends
- AbstractHierarchicalContainerTestBase {
+public class HierarchicalContainerOrderedWrapperTest
+ extends AbstractHierarchicalContainerTestBase {
private HierarchicalContainerOrderedWrapper createContainer() {
return new HierarchicalContainerOrderedWrapper(
diff --git a/server/src/test/java/com/vaadin/data/util/HierarchicalContainerTest.java b/server/src/test/java/com/vaadin/data/util/HierarchicalContainerTest.java
index 280c46efcc..7ab20ca3dd 100644
--- a/server/src/test/java/com/vaadin/data/util/HierarchicalContainerTest.java
+++ b/server/src/test/java/com/vaadin/data/util/HierarchicalContainerTest.java
@@ -9,8 +9,8 @@ import org.junit.Test;
import com.vaadin.data.Container.Filter;
import com.vaadin.data.Item;
-public class HierarchicalContainerTest extends
- AbstractHierarchicalContainerTestBase {
+public class HierarchicalContainerTest
+ extends AbstractHierarchicalContainerTestBase {
@Test
public void testBasicOperations() {
@@ -142,8 +142,8 @@ public class HierarchicalContainerTest extends
validateHierarchicalContainer(container, "com",
"com.vaadin.terminal.gwt.client.WidgetSet",
- "com.vaadin.terminal.gwt.client.ui.VSplitPanelVertical",
- "blah", true, expectedSize, expectedRoots, true);
+ "com.vaadin.terminal.gwt.client.ui.VSplitPanelVertical", "blah",
+ true, expectedSize, expectedRoots, true);
// Additionally remove all without 'm' in the simple name.
container.addContainerFilter(SIMPLE_NAME, "m", false, false);
@@ -151,9 +151,7 @@ public class HierarchicalContainerTest extends
expectedSize = 7 + 18;
expectedRoots = 1;
- validateHierarchicalContainer(
- container,
- "com",
+ validateHierarchicalContainer(container, "com",
"com.vaadin.terminal.gwt.client.ui.VUriFragmentUtility",
"com.vaadin.terminal.gwt.client.ui.layout.ChildComponentContainer",
"blah", true, expectedSize, expectedRoots, true);
@@ -249,10 +247,9 @@ public class HierarchicalContainerTest extends
int expectedRoots = 20;
validateHierarchicalContainer(container,
- "com.vaadin.data.BufferedValidatable",
- "com.vaadin.ui.TabSheet",
- "com.vaadin.terminal.gwt.client.ui.VTabsheetBase", "blah",
- true, expectedSize, expectedRoots, false);
+ "com.vaadin.data.BufferedValidatable", "com.vaadin.ui.TabSheet",
+ "com.vaadin.terminal.gwt.client.ui.VTabsheetBase", "blah", true,
+ expectedSize, expectedRoots, false);
// only include .gwt.client classes
container.removeAllContainerFilters();
diff --git a/server/src/test/java/com/vaadin/data/util/IndexedContainerTest.java b/server/src/test/java/com/vaadin/data/util/IndexedContainerTest.java
index 27632846de..b19a425518 100644
--- a/server/src/test/java/com/vaadin/data/util/IndexedContainerTest.java
+++ b/server/src/test/java/com/vaadin/data/util/IndexedContainerTest.java
@@ -366,8 +366,8 @@ public class IndexedContainerTest extends AbstractInMemoryContainerTestBase {
IndexedContainer container = new IndexedContainer();
Object itemId = container.addItem();
ItemSetChangeListener removeListener = createListenerMockFor(container);
- removeListener.containerItemSetChange(EasyMock
- .isA(ItemRemoveEvent.class));
+ removeListener
+ .containerItemSetChange(EasyMock.isA(ItemRemoveEvent.class));
EasyMock.replay(removeListener);
container.removeItem(itemId);
@@ -380,7 +380,8 @@ public class IndexedContainerTest extends AbstractInMemoryContainerTestBase {
IndexedContainer container = new IndexedContainer();
Object itemId = container.addItem();
ItemSetChangeListener removeListener = createListenerMockFor(container);
- Capture<ItemRemoveEvent> capturedEvent = captureRemoveEvent(removeListener);
+ Capture<ItemRemoveEvent> capturedEvent = captureRemoveEvent(
+ removeListener);
EasyMock.replay(removeListener);
container.removeItem(itemId);
@@ -394,7 +395,8 @@ public class IndexedContainerTest extends AbstractInMemoryContainerTestBase {
container.addItem();
Object secondItemId = container.addItem();
ItemSetChangeListener removeListener = createListenerMockFor(container);
- Capture<ItemRemoveEvent> capturedEvent = captureRemoveEvent(removeListener);
+ Capture<ItemRemoveEvent> capturedEvent = captureRemoveEvent(
+ removeListener);
EasyMock.replay(removeListener);
container.removeItem(secondItemId);
@@ -408,7 +410,8 @@ public class IndexedContainerTest extends AbstractInMemoryContainerTestBase {
container.addItem();
container.addItem();
ItemSetChangeListener removeListener = createListenerMockFor(container);
- Capture<ItemRemoveEvent> capturedEvent = captureRemoveEvent(removeListener);
+ Capture<ItemRemoveEvent> capturedEvent = captureRemoveEvent(
+ removeListener);
EasyMock.replay(removeListener);
container.removeAllItems();
diff --git a/server/src/test/java/com/vaadin/data/util/MethodPropertyMemoryConsumptionTest.java b/server/src/test/java/com/vaadin/data/util/MethodPropertyMemoryConsumptionTest.java
index b4621b823a..61e939701a 100644
--- a/server/src/test/java/com/vaadin/data/util/MethodPropertyMemoryConsumptionTest.java
+++ b/server/src/test/java/com/vaadin/data/util/MethodPropertyMemoryConsumptionTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,15 +28,16 @@ import org.junit.Test;
/**
* Test for MethodProperty: don't allocate unnecessary Object arrays.
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
public class MethodPropertyMemoryConsumptionTest {
@Test
- public void testSetArguments() throws NoSuchFieldException,
- SecurityException, IllegalArgumentException, IllegalAccessException {
+ public void testSetArguments()
+ throws NoSuchFieldException, SecurityException,
+ IllegalArgumentException, IllegalAccessException {
TestBean bean = new TestBean();
TestMethodProperty<String> property = new TestMethodProperty<String>(
bean, "name");
@@ -51,12 +52,14 @@ public class MethodPropertyMemoryConsumptionTest {
.getDeclaredField("setArgs");
setArgsField.setAccessible(true);
- Assert.assertSame("setArguments method sets non-default instance"
- + " of empty Object array for getArgs",
+ Assert.assertSame(
+ "setArguments method sets non-default instance"
+ + " of empty Object array for getArgs",
getArgsField.get(property), getArgs);
- Assert.assertSame("setArguments method sets non-default instance"
- + " of empty Object array for setArgs",
+ Assert.assertSame(
+ "setArguments method sets non-default instance"
+ + " of empty Object array for setArgs",
setArgsField.get(property), setArgs);
}
@@ -72,17 +75,19 @@ public class MethodPropertyMemoryConsumptionTest {
TestBean otherBean = new TestBean();
TestMethodProperty<String> otherProperty = new TestMethodProperty<String>(
otherBean, "name");
- Assert.assertSame("setArguments method uses different instance"
- + " of empty Object array for getArgs", getArgs,
- otherProperty.getGetArgs());
- Assert.assertSame("setArguments method uses different instance"
- + " of empty Object array for setArgs", setArgs,
- otherProperty.getSetArgs());
+ Assert.assertSame(
+ "setArguments method uses different instance"
+ + " of empty Object array for getArgs",
+ getArgs, otherProperty.getGetArgs());
+ Assert.assertSame(
+ "setArguments method uses different instance"
+ + " of empty Object array for setArgs",
+ setArgs, otherProperty.getSetArgs());
}
@Test
- public void testDefaultArgsSerialization() throws IOException,
- ClassNotFoundException {
+ public void testDefaultArgsSerialization()
+ throws IOException, ClassNotFoundException {
TestBean bean = new TestBean();
TestMethodProperty<String> property = new TestMethodProperty<String>(
bean, "name");
diff --git a/server/src/test/java/com/vaadin/data/util/NestedMethodPropertyTest.java b/server/src/test/java/com/vaadin/data/util/NestedMethodPropertyTest.java
index 79ce425bae..4a1e2a1784 100644
--- a/server/src/test/java/com/vaadin/data/util/NestedMethodPropertyTest.java
+++ b/server/src/test/java/com/vaadin/data/util/NestedMethodPropertyTest.java
@@ -323,8 +323,8 @@ public class NestedMethodPropertyTest {
}
@Test
- public void testSerializationWithIntermediateNull() throws IOException,
- ClassNotFoundException {
+ public void testSerializationWithIntermediateNull()
+ throws IOException, ClassNotFoundException {
vaadin.setManager(null);
NestedMethodProperty<String> streetProperty = new NestedMethodProperty<String>(
vaadin, "manager.address.street");
diff --git a/server/src/test/java/com/vaadin/data/util/PerformanceTestIndexedContainerTest.java b/server/src/test/java/com/vaadin/data/util/PerformanceTestIndexedContainerTest.java
index fdfc2199b6..5f64c0e8d8 100644
--- a/server/src/test/java/com/vaadin/data/util/PerformanceTestIndexedContainerTest.java
+++ b/server/src/test/java/com/vaadin/data/util/PerformanceTestIndexedContainerTest.java
@@ -104,8 +104,8 @@ public class PerformanceTestIndexedContainerTest {
private void checkMedian(int items, Collection<Long> times,
String methodName, long threshold) {
long median = median(times);
- System.out.println(methodName + " timings (ms) for " + items
- + " items: " + times);
+ System.out.println(
+ methodName + " timings (ms) for " + items + " items: " + times);
Assert.assertTrue(methodName + " too slow, median time " + median
+ "ms for " + items + " items", median <= threshold);
}
diff --git a/server/src/test/java/com/vaadin/data/util/PropertyDescriptorTest.java b/server/src/test/java/com/vaadin/data/util/PropertyDescriptorTest.java
index 86f3968116..af9db229c5 100644
--- a/server/src/test/java/com/vaadin/data/util/PropertyDescriptorTest.java
+++ b/server/src/test/java/com/vaadin/data/util/PropertyDescriptorTest.java
@@ -36,8 +36,8 @@ public class PropertyDescriptorTest {
VaadinPropertyDescriptor<Person> descriptor2 = (VaadinPropertyDescriptor<Person>) new ObjectInputStream(
new ByteArrayInputStream(baos.toByteArray())).readObject();
- Property<?> property = descriptor2.createProperty(new Person("John",
- null));
+ Property<?> property = descriptor2
+ .createProperty(new Person("John", null));
Assert.assertEquals("John", property.getValue());
}
diff --git a/server/src/test/java/com/vaadin/data/util/PropertySetItemTest.java b/server/src/test/java/com/vaadin/data/util/PropertySetItemTest.java
index b957cb7f20..fc91a20dd0 100644
--- a/server/src/test/java/com/vaadin/data/util/PropertySetItemTest.java
+++ b/server/src/test/java/com/vaadin/data/util/PropertySetItemTest.java
@@ -181,8 +181,8 @@ public class PropertySetItemTest {
PropertysetItem item = createPropertySetItem();
// Expectations and start test
- propertySetListenerMock.itemPropertySetChange(EasyMock
- .isA(PropertySetChangeEvent.class));
+ propertySetListenerMock.itemPropertySetChange(
+ EasyMock.isA(PropertySetChangeEvent.class));
EasyMock.replay(propertySetListenerMock);
// Add listener and add a property -> should end up in listener once
@@ -209,8 +209,8 @@ public class PropertySetItemTest {
item.addItemProperty(ID2, prop2);
// Expectations and start test
- propertySetListenerMock.itemPropertySetChange(EasyMock
- .isA(PropertySetChangeEvent.class));
+ propertySetListenerMock.itemPropertySetChange(
+ EasyMock.isA(PropertySetChangeEvent.class));
EasyMock.replay(propertySetListenerMock);
// Add listener and add a property -> should end up in listener once
@@ -425,9 +425,8 @@ public class PropertySetItemTest {
item.addItemProperty(ID2, prop2);
- Assert.assertEquals(
- String.valueOf(prop1.getValue()) + " "
- + String.valueOf(prop2.getValue()), item.toString());
+ Assert.assertEquals(String.valueOf(prop1.getValue()) + " "
+ + String.valueOf(prop2.getValue()), item.toString());
}
}
diff --git a/server/src/test/java/com/vaadin/data/util/ReflectToolsGetSuperFieldTest.java b/server/src/test/java/com/vaadin/data/util/ReflectToolsGetSuperFieldTest.java
index 5f31150210..c3efab9114 100644
--- a/server/src/test/java/com/vaadin/data/util/ReflectToolsGetSuperFieldTest.java
+++ b/server/src/test/java/com/vaadin/data/util/ReflectToolsGetSuperFieldTest.java
@@ -21,8 +21,8 @@ public class ReflectToolsGetSuperFieldTest {
}
PropertysetItem item = new PropertysetItem();
- item.addItemProperty("testProperty", new ObjectProperty<String>(
- "Value of testProperty"));
+ item.addItemProperty("testProperty",
+ new ObjectProperty<String>("Value of testProperty"));
MySubClass form = new MySubClass();
diff --git a/server/src/test/java/com/vaadin/data/util/TransactionalPropertyWrapperTest.java b/server/src/test/java/com/vaadin/data/util/TransactionalPropertyWrapperTest.java
index 5297cd807c..38efe4ba7b 100644
--- a/server/src/test/java/com/vaadin/data/util/TransactionalPropertyWrapperTest.java
+++ b/server/src/test/java/com/vaadin/data/util/TransactionalPropertyWrapperTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,15 +28,15 @@ import com.vaadin.ui.TextField;
/**
* Test verifying that TransactionalPropertyWrapper removes it's listener from
* wrapped Property
- *
+ *
* @since 7.1.15
* @author Vaadin Ltd
*/
public class TransactionalPropertyWrapperTest {
@SuppressWarnings("serial")
- public class TestingProperty<T extends Object> extends
- ObjectProperty<Object> {
+ public class TestingProperty<T extends Object>
+ extends ObjectProperty<Object> {
private List<ValueChangeListener> listeners = new ArrayList<ValueChangeListener>();
@@ -72,8 +72,8 @@ public class TransactionalPropertyWrapperTest {
@Test
public void fieldGroupBindAndUnbind() {
- item.addItemProperty("name", new TestingProperty<String>(
- "Just some text"));
+ item.addItemProperty("name",
+ new TestingProperty<String>("Just some text"));
item.addItemProperty("age", new TestingProperty<String>("42"));
final FieldGroup binder = new FieldGroup(item);
@@ -97,7 +97,7 @@ public class TransactionalPropertyWrapperTest {
/**
* Check that all listeners have same hasListeners() response
- *
+ *
* @param expected
* expected response
* @return true if all are the same as expected. false if not
diff --git a/server/src/test/java/com/vaadin/data/util/filter/AbstractFilterTestBase.java b/server/src/test/java/com/vaadin/data/util/filter/AbstractFilterTestBase.java
index ebd843fb53..979f472e20 100644
--- a/server/src/test/java/com/vaadin/data/util/filter/AbstractFilterTestBase.java
+++ b/server/src/test/java/com/vaadin/data/util/filter/AbstractFilterTestBase.java
@@ -8,8 +8,8 @@ import com.vaadin.data.Property;
import com.vaadin.data.util.ObjectProperty;
import com.vaadin.data.util.PropertysetItem;
-public abstract class AbstractFilterTestBase<FILTERTYPE extends Filter> extends
- TestCase {
+public abstract class AbstractFilterTestBase<FILTERTYPE extends Filter>
+ extends TestCase {
protected static final String PROPERTY1 = "property1";
protected static final String PROPERTY2 = "property2";
diff --git a/server/src/test/java/com/vaadin/data/util/filter/AndOrFilterTest.java b/server/src/test/java/com/vaadin/data/util/filter/AndOrFilterTest.java
index 21ce685445..f825ef64c6 100644
--- a/server/src/test/java/com/vaadin/data/util/filter/AndOrFilterTest.java
+++ b/server/src/test/java/com/vaadin/data/util/filter/AndOrFilterTest.java
@@ -7,8 +7,8 @@ import com.vaadin.data.Container.Filter;
import com.vaadin.data.Item;
import com.vaadin.data.util.BeanItem;
-public class AndOrFilterTest extends
- AbstractFilterTestBase<AbstractJunctionFilter> {
+public class AndOrFilterTest
+ extends AbstractFilterTestBase<AbstractJunctionFilter> {
protected Item item1 = new BeanItem<Integer>(1);
protected Item item2 = new BeanItem<Integer>(2);
@@ -30,10 +30,10 @@ public class AndOrFilterTest extends
@Test
public void testTwoFilterAnd() {
- Filter filter1 = new And(new SameItemFilter(item1), new SameItemFilter(
- item1));
- Filter filter2 = new And(new SameItemFilter(item1), new SameItemFilter(
- item2));
+ Filter filter1 = new And(new SameItemFilter(item1),
+ new SameItemFilter(item1));
+ Filter filter2 = new And(new SameItemFilter(item1),
+ new SameItemFilter(item2));
Assert.assertTrue(filter1.passesFilter(null, item1));
Assert.assertFalse(filter1.passesFilter(null, item2));
@@ -44,10 +44,10 @@ public class AndOrFilterTest extends
@Test
public void testThreeFilterAnd() {
- Filter filter1 = new And(new SameItemFilter(item1), new SameItemFilter(
- item1), new SameItemFilter(item1));
- Filter filter2 = new And(new SameItemFilter(item1), new SameItemFilter(
- item1), new SameItemFilter(item2));
+ Filter filter1 = new And(new SameItemFilter(item1),
+ new SameItemFilter(item1), new SameItemFilter(item1));
+ Filter filter2 = new And(new SameItemFilter(item1),
+ new SameItemFilter(item1), new SameItemFilter(item2));
Assert.assertTrue(filter1.passesFilter(null, item1));
Assert.assertFalse(filter1.passesFilter(null, item2));
@@ -73,10 +73,10 @@ public class AndOrFilterTest extends
@Test
public void testTwoFilterOr() {
- Filter filter1 = new Or(new SameItemFilter(item1), new SameItemFilter(
- item1));
- Filter filter2 = new Or(new SameItemFilter(item1), new SameItemFilter(
- item2));
+ Filter filter1 = new Or(new SameItemFilter(item1),
+ new SameItemFilter(item1));
+ Filter filter2 = new Or(new SameItemFilter(item1),
+ new SameItemFilter(item2));
Assert.assertTrue(filter1.passesFilter(null, item1));
Assert.assertFalse(filter1.passesFilter(null, item2));
@@ -87,10 +87,10 @@ public class AndOrFilterTest extends
@Test
public void testThreeFilterOr() {
- Filter filter1 = new Or(new SameItemFilter(item1), new SameItemFilter(
- item1), new SameItemFilter(item1));
- Filter filter2 = new Or(new SameItemFilter(item1), new SameItemFilter(
- item1), new SameItemFilter(item2));
+ Filter filter1 = new Or(new SameItemFilter(item1),
+ new SameItemFilter(item1), new SameItemFilter(item1));
+ Filter filter2 = new Or(new SameItemFilter(item1),
+ new SameItemFilter(item1), new SameItemFilter(item2));
Assert.assertTrue(filter1.passesFilter(null, item1));
Assert.assertFalse(filter1.passesFilter(null, item2));
@@ -146,10 +146,10 @@ public class AndOrFilterTest extends
Filter filter1a = new Or(new SameItemFilter(item1));
Filter filter1a2 = new Or(new SameItemFilter(item1));
Filter filter1b = new Or(new SameItemFilter(item2));
- Filter filter2a = new Or(new SameItemFilter(item1), new SameItemFilter(
- item1));
- Filter filter2b = new Or(new SameItemFilter(item1), new SameItemFilter(
- item2));
+ Filter filter2a = new Or(new SameItemFilter(item1),
+ new SameItemFilter(item1));
+ Filter filter2b = new Or(new SameItemFilter(item1),
+ new SameItemFilter(item2));
Filter filter2b2 = new Or(new SameItemFilter(item1),
new SameItemFilter(item2));
Filter other0 = new And();
diff --git a/server/src/test/java/com/vaadin/data/util/filter/CompareFilterDateTest.java b/server/src/test/java/com/vaadin/data/util/filter/CompareFilterDateTest.java
index 5908c7d8d4..7c3dba9db3 100644
--- a/server/src/test/java/com/vaadin/data/util/filter/CompareFilterDateTest.java
+++ b/server/src/test/java/com/vaadin/data/util/filter/CompareFilterDateTest.java
@@ -16,7 +16,6 @@ import com.vaadin.data.util.filter.Compare.GreaterOrEqual;
import com.vaadin.data.util.filter.Compare.Less;
import com.vaadin.data.util.filter.Compare.LessOrEqual;
-
public class CompareFilterDateTest extends AbstractFilterTestBase<Compare> {
protected Item itemNullUtilDate;
@@ -51,20 +50,20 @@ public class CompareFilterDateTest extends AbstractFilterTestBase<Compare> {
lessEqualCompUtilDate = new LessOrEqual(PROPERTY1,
formatter.parse("26072016"));
- equalCompSqlDate = new Equal(PROPERTY1, new java.sql.Date(formatter
- .parse("26072016").getTime()));
- greaterCompSqlDate = new Greater(PROPERTY1, new java.sql.Date(formatter
- .parse("26072016").getTime()));
- lessCompSqlDate = new Less(PROPERTY1, new java.sql.Date(formatter
- .parse("26072016").getTime()));
+ equalCompSqlDate = new Equal(PROPERTY1,
+ new java.sql.Date(formatter.parse("26072016").getTime()));
+ greaterCompSqlDate = new Greater(PROPERTY1,
+ new java.sql.Date(formatter.parse("26072016").getTime()));
+ lessCompSqlDate = new Less(PROPERTY1,
+ new java.sql.Date(formatter.parse("26072016").getTime()));
greaterEqualCompSqlDate = new GreaterOrEqual(PROPERTY1,
new java.sql.Date(formatter.parse("26072016").getTime()));
- lessEqualCompSqlDate = new LessOrEqual(PROPERTY1, new java.sql.Date(
- formatter.parse("26072016").getTime()));
+ lessEqualCompSqlDate = new LessOrEqual(PROPERTY1,
+ new java.sql.Date(formatter.parse("26072016").getTime()));
itemNullUtilDate = new PropertysetItem();
- itemNullUtilDate.addItemProperty(PROPERTY1, new ObjectProperty<Date>(
- null, Date.class));
+ itemNullUtilDate.addItemProperty(PROPERTY1,
+ new ObjectProperty<Date>(null, Date.class));
itemNullSqlDate = new PropertysetItem();
itemNullSqlDate.addItemProperty(PROPERTY1,
new ObjectProperty<java.sql.Date>(null, java.sql.Date.class));
@@ -73,8 +72,10 @@ public class CompareFilterDateTest extends AbstractFilterTestBase<Compare> {
formatter.parse("25072016"), Date.class));
itemSqlDate = new PropertysetItem();
itemSqlDate.addItemProperty(PROPERTY1,
- new ObjectProperty<java.sql.Date>(new java.sql.Date(formatter
- .parse("25072016").getTime()), java.sql.Date.class));
+ new ObjectProperty<java.sql.Date>(
+ new java.sql.Date(
+ formatter.parse("25072016").getTime()),
+ java.sql.Date.class));
}
@Override
@@ -88,50 +89,54 @@ public class CompareFilterDateTest extends AbstractFilterTestBase<Compare> {
@Test
public void testCompareUtilDatesAndUtilDates() {
- Assert.assertFalse(equalCompUtilDate.passesFilter(null,
- itemNullUtilDate));
+ Assert.assertFalse(
+ equalCompUtilDate.passesFilter(null, itemNullUtilDate));
Assert.assertFalse(equalCompUtilDate.passesFilter(null, itemUtilDate));
- Assert.assertFalse(greaterCompUtilDate.passesFilter(null, itemUtilDate));
+ Assert.assertFalse(
+ greaterCompUtilDate.passesFilter(null, itemUtilDate));
Assert.assertTrue(lessCompUtilDate.passesFilter(null, itemUtilDate));
- Assert.assertFalse(greaterEqualCompUtilDate.passesFilter(null,
- itemUtilDate));
- Assert.assertTrue(lessEqualCompUtilDate
- .passesFilter(null, itemUtilDate));
+ Assert.assertFalse(
+ greaterEqualCompUtilDate.passesFilter(null, itemUtilDate));
+ Assert.assertTrue(
+ lessEqualCompUtilDate.passesFilter(null, itemUtilDate));
}
@Test
public void testCompareUtilDatesAndSqlDates() {
- Assert.assertFalse(equalCompUtilDate
- .passesFilter(null, itemNullSqlDate));
+ Assert.assertFalse(
+ equalCompUtilDate.passesFilter(null, itemNullSqlDate));
Assert.assertFalse(equalCompUtilDate.passesFilter(null, itemSqlDate));
Assert.assertFalse(greaterCompUtilDate.passesFilter(null, itemSqlDate));
Assert.assertTrue(lessCompUtilDate.passesFilter(null, itemSqlDate));
- Assert.assertFalse(greaterEqualCompUtilDate.passesFilter(null,
- itemSqlDate));
- Assert.assertTrue(lessEqualCompUtilDate.passesFilter(null, itemSqlDate));
+ Assert.assertFalse(
+ greaterEqualCompUtilDate.passesFilter(null, itemSqlDate));
+ Assert.assertTrue(
+ lessEqualCompUtilDate.passesFilter(null, itemSqlDate));
}
@Test
public void testCompareSqlDatesAndSqlDates() {
- Assert.assertFalse(equalCompSqlDate.passesFilter(null, itemNullSqlDate));
+ Assert.assertFalse(
+ equalCompSqlDate.passesFilter(null, itemNullSqlDate));
Assert.assertFalse(equalCompSqlDate.passesFilter(null, itemSqlDate));
Assert.assertFalse(greaterCompSqlDate.passesFilter(null, itemSqlDate));
Assert.assertTrue(lessCompSqlDate.passesFilter(null, itemSqlDate));
- Assert.assertFalse(greaterEqualCompSqlDate.passesFilter(null,
- itemSqlDate));
+ Assert.assertFalse(
+ greaterEqualCompSqlDate.passesFilter(null, itemSqlDate));
Assert.assertTrue(lessEqualCompSqlDate.passesFilter(null, itemSqlDate));
}
@Test
public void testCompareSqlDatesAndUtilDates() {
- Assert.assertFalse(equalCompSqlDate
- .passesFilter(null, itemNullUtilDate));
+ Assert.assertFalse(
+ equalCompSqlDate.passesFilter(null, itemNullUtilDate));
Assert.assertFalse(equalCompSqlDate.passesFilter(null, itemUtilDate));
Assert.assertFalse(greaterCompSqlDate.passesFilter(null, itemUtilDate));
Assert.assertTrue(lessCompSqlDate.passesFilter(null, itemUtilDate));
- Assert.assertFalse(greaterEqualCompSqlDate.passesFilter(null,
- itemUtilDate));
- Assert.assertTrue(lessEqualCompSqlDate.passesFilter(null, itemUtilDate));
+ Assert.assertFalse(
+ greaterEqualCompSqlDate.passesFilter(null, itemUtilDate));
+ Assert.assertTrue(
+ lessEqualCompSqlDate.passesFilter(null, itemUtilDate));
}
}
diff --git a/server/src/test/java/com/vaadin/data/util/filter/CompareFilterTest.java b/server/src/test/java/com/vaadin/data/util/filter/CompareFilterTest.java
index 116d70e188..4bdad3c54d 100644
--- a/server/src/test/java/com/vaadin/data/util/filter/CompareFilterTest.java
+++ b/server/src/test/java/com/vaadin/data/util/filter/CompareFilterTest.java
@@ -41,20 +41,20 @@ public class CompareFilterTest extends AbstractFilterTestBase<Compare> {
protected void setUp() throws Exception {
super.setUp();
itemNull = new PropertysetItem();
- itemNull.addItemProperty(PROPERTY1, new ObjectProperty<String>(null,
- String.class));
+ itemNull.addItemProperty(PROPERTY1,
+ new ObjectProperty<String>(null, String.class));
itemEmpty = new PropertysetItem();
- itemEmpty.addItemProperty(PROPERTY1, new ObjectProperty<String>("",
- String.class));
+ itemEmpty.addItemProperty(PROPERTY1,
+ new ObjectProperty<String>("", String.class));
itemA = new PropertysetItem();
- itemA.addItemProperty(PROPERTY1, new ObjectProperty<String>("a",
- String.class));
+ itemA.addItemProperty(PROPERTY1,
+ new ObjectProperty<String>("a", String.class));
itemB = new PropertysetItem();
- itemB.addItemProperty(PROPERTY1, new ObjectProperty<String>("b",
- String.class));
+ itemB.addItemProperty(PROPERTY1,
+ new ObjectProperty<String>("b", String.class));
itemC = new PropertysetItem();
- itemC.addItemProperty(PROPERTY1, new ObjectProperty<String>("c",
- String.class));
+ itemC.addItemProperty(PROPERTY1,
+ new ObjectProperty<String>("c", String.class));
}
@Override
@@ -123,14 +123,14 @@ public class CompareFilterTest extends AbstractFilterTestBase<Compare> {
int positive = 1;
Item itemNegative = new PropertysetItem();
- itemNegative.addItemProperty(PROPERTY1, new ObjectProperty<Integer>(
- negative, Integer.class));
+ itemNegative.addItemProperty(PROPERTY1,
+ new ObjectProperty<Integer>(negative, Integer.class));
Item itemZero = new PropertysetItem();
- itemZero.addItemProperty(PROPERTY1, new ObjectProperty<Integer>(zero,
- Integer.class));
+ itemZero.addItemProperty(PROPERTY1,
+ new ObjectProperty<Integer>(zero, Integer.class));
Item itemPositive = new PropertysetItem();
- itemPositive.addItemProperty(PROPERTY1, new ObjectProperty<Integer>(
- positive, Integer.class));
+ itemPositive.addItemProperty(PROPERTY1,
+ new ObjectProperty<Integer>(positive, Integer.class));
Filter equalZero = new Equal(PROPERTY1, zero);
Assert.assertFalse(equalZero.passesFilter(null, itemNegative));
@@ -167,14 +167,14 @@ public class CompareFilterTest extends AbstractFilterTestBase<Compare> {
BigDecimal positiveScaleTwo = new BigDecimal(1).setScale(2);
Item itemNegative = new PropertysetItem();
- itemNegative.addItemProperty(PROPERTY1, new ObjectProperty<BigDecimal>(
- negative, BigDecimal.class));
+ itemNegative.addItemProperty(PROPERTY1,
+ new ObjectProperty<BigDecimal>(negative, BigDecimal.class));
Item itemZero = new PropertysetItem();
- itemZero.addItemProperty(PROPERTY1, new ObjectProperty<BigDecimal>(
- zero, BigDecimal.class));
+ itemZero.addItemProperty(PROPERTY1,
+ new ObjectProperty<BigDecimal>(zero, BigDecimal.class));
Item itemPositive = new PropertysetItem();
- itemPositive.addItemProperty(PROPERTY1, new ObjectProperty<BigDecimal>(
- positive, BigDecimal.class));
+ itemPositive.addItemProperty(PROPERTY1,
+ new ObjectProperty<BigDecimal>(positive, BigDecimal.class));
Item itemPositiveScaleTwo = new PropertysetItem();
itemPositiveScaleTwo.addItemProperty(PROPERTY1,
new ObjectProperty<BigDecimal>(positiveScaleTwo,
@@ -206,8 +206,8 @@ public class CompareFilterTest extends AbstractFilterTestBase<Compare> {
Assert.assertFalse(isNonPositive.passesFilter(null, itemPositive));
Filter isPositiveScaleTwo = new Equal(PROPERTY1, positiveScaleTwo);
- Assert.assertTrue(isPositiveScaleTwo.passesFilter(null,
- itemPositiveScaleTwo));
+ Assert.assertTrue(
+ isPositiveScaleTwo.passesFilter(null, itemPositiveScaleTwo));
Assert.assertTrue(isPositiveScaleTwo.passesFilter(null, itemPositive));
}
@@ -221,14 +221,14 @@ public class CompareFilterTest extends AbstractFilterTestBase<Compare> {
Date later = new Date(now.getTime() + 1);
Item itemEarlier = new PropertysetItem();
- itemEarlier.addItemProperty(PROPERTY1, new ObjectProperty<Date>(
- earlier, Date.class));
+ itemEarlier.addItemProperty(PROPERTY1,
+ new ObjectProperty<Date>(earlier, Date.class));
Item itemNow = new PropertysetItem();
- itemNow.addItemProperty(PROPERTY1, new ObjectProperty<Date>(now,
- Date.class));
+ itemNow.addItemProperty(PROPERTY1,
+ new ObjectProperty<Date>(now, Date.class));
Item itemLater = new PropertysetItem();
- itemLater.addItemProperty(PROPERTY1, new ObjectProperty<Date>(later,
- Date.class));
+ itemLater.addItemProperty(PROPERTY1,
+ new ObjectProperty<Date>(later, Date.class));
Filter equalNow = new Equal(PROPERTY1, now);
Assert.assertFalse(equalNow.passesFilter(null, itemEarlier));
diff --git a/server/src/test/java/com/vaadin/data/util/filter/IsNullFilterTest.java b/server/src/test/java/com/vaadin/data/util/filter/IsNullFilterTest.java
index 7a2ab3af7e..18013cd41c 100644
--- a/server/src/test/java/com/vaadin/data/util/filter/IsNullFilterTest.java
+++ b/server/src/test/java/com/vaadin/data/util/filter/IsNullFilterTest.java
@@ -13,15 +13,15 @@ public class IsNullFilterTest extends AbstractFilterTestBase<IsNull> {
@Test
public void testIsNull() {
Item item1 = new PropertysetItem();
- item1.addItemProperty("a", new ObjectProperty<String>(null,
- String.class));
+ item1.addItemProperty("a",
+ new ObjectProperty<String>(null, String.class));
item1.addItemProperty("b",
new ObjectProperty<String>("b", String.class));
Item item2 = new PropertysetItem();
item2.addItemProperty("a",
new ObjectProperty<String>("a", String.class));
- item2.addItemProperty("b", new ObjectProperty<String>(null,
- String.class));
+ item2.addItemProperty("b",
+ new ObjectProperty<String>(null, String.class));
Filter filter1 = new IsNull("a");
Filter filter2 = new IsNull("b");
diff --git a/server/src/test/java/com/vaadin/data/util/filter/LikeFilterTest.java b/server/src/test/java/com/vaadin/data/util/filter/LikeFilterTest.java
index d43650101d..12faedee06 100644
--- a/server/src/test/java/com/vaadin/data/util/filter/LikeFilterTest.java
+++ b/server/src/test/java/com/vaadin/data/util/filter/LikeFilterTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -36,8 +36,8 @@ public class LikeFilterTest extends AbstractFilterTestBase<Like> {
item1.addItemProperty("value", new ObjectProperty<String>("a"));
item2.addItemProperty("value", new ObjectProperty<String>("b"));
- item3.addItemProperty("value", new ObjectProperty<String>(null,
- String.class));
+ item3.addItemProperty("value",
+ new ObjectProperty<String>(null, String.class));
Assert.assertTrue(filter.passesFilter(null, item1));
Assert.assertFalse(filter.passesFilter(null, item2));
diff --git a/server/src/test/java/com/vaadin/data/util/filter/SimpleStringFilterTest.java b/server/src/test/java/com/vaadin/data/util/filter/SimpleStringFilterTest.java
index e085c934c9..dd8267107a 100644
--- a/server/src/test/java/com/vaadin/data/util/filter/SimpleStringFilterTest.java
+++ b/server/src/test/java/com/vaadin/data/util/filter/SimpleStringFilterTest.java
@@ -3,8 +3,8 @@ package com.vaadin.data.util.filter;
import org.junit.Assert;
import org.junit.Test;
-public class SimpleStringFilterTest extends
- AbstractFilterTestBase<SimpleStringFilter> {
+public class SimpleStringFilterTest
+ extends AbstractFilterTestBase<SimpleStringFilter> {
protected static TestItem<String, String> createTestItem() {
return new TestItem<String, String>("abcde", "TeSt");
@@ -132,8 +132,8 @@ public class SimpleStringFilterTest extends
TestItem<String, String> item = createTestItem();
item.addItemProperty("other1", new NullProperty());
- Assert.assertFalse(f("other1", "ab", false, true).passesFilter(null,
- item));
+ Assert.assertFalse(
+ f("other1", "ab", false, true).passesFilter(null, item));
}
}
diff --git a/server/src/test/java/com/vaadin/data/util/sqlcontainer/ColumnPropertyTest.java b/server/src/test/java/com/vaadin/data/util/sqlcontainer/ColumnPropertyTest.java
index 7cad310d37..edc56035e1 100644
--- a/server/src/test/java/com/vaadin/data/util/sqlcontainer/ColumnPropertyTest.java
+++ b/server/src/test/java/com/vaadin/data/util/sqlcontainer/ColumnPropertyTest.java
@@ -19,8 +19,8 @@ public class ColumnPropertyTest {
@Test
public void constructor_legalParameters_shouldSucceed() {
- ColumnProperty cp = new ColumnProperty("NAME", false, true, true,
- false, "Ville", String.class);
+ ColumnProperty cp = new ColumnProperty("NAME", false, true, true, false,
+ "Ville", String.class);
Assert.assertNotNull(cp);
}
@@ -37,15 +37,15 @@ public class ColumnPropertyTest {
@Test
public void getValue_defaultValue_returnsVille() {
- ColumnProperty cp = new ColumnProperty("NAME", false, true, true,
- false, "Ville", String.class);
+ ColumnProperty cp = new ColumnProperty("NAME", false, true, true, false,
+ "Ville", String.class);
Assert.assertEquals("Ville", cp.getValue());
}
@Test
public void setValue_readWriteNullable_returnsKalle() {
- ColumnProperty cp = new ColumnProperty("NAME", false, true, true,
- false, "Ville", String.class);
+ ColumnProperty cp = new ColumnProperty("NAME", false, true, true, false,
+ "Ville", String.class);
SQLContainer container = EasyMock.createMock(SQLContainer.class);
RowItem owner = new RowItem(container, new RowId(new Object[] { 1 }),
Arrays.asList(cp));
@@ -61,7 +61,8 @@ public class ColumnPropertyTest {
ColumnProperty cp = new ColumnProperty("NAME", true, true, true, false,
"Ville", String.class);
SQLContainer container = EasyMock.createMock(SQLContainer.class);
- new RowItem(container, new RowId(new Object[] { 1 }), Arrays.asList(cp));
+ new RowItem(container, new RowId(new Object[] { 1 }),
+ Arrays.asList(cp));
EasyMock.replay(container);
cp.setValue("Kalle");
EasyMock.verify(container);
@@ -69,8 +70,8 @@ public class ColumnPropertyTest {
@Test
public void setValue_readWriteNullable_nullShouldWork() {
- ColumnProperty cp = new ColumnProperty("NAME", false, true, true,
- false, "Ville", String.class);
+ ColumnProperty cp = new ColumnProperty("NAME", false, true, true, false,
+ "Ville", String.class);
SQLContainer container = EasyMock.createMock(SQLContainer.class);
RowItem owner = new RowItem(container, new RowId(new Object[] { 1 }),
Arrays.asList(cp));
@@ -97,15 +98,15 @@ public class ColumnPropertyTest {
@Test
public void getType_normal_returnsStringClass() {
- ColumnProperty cp = new ColumnProperty("NAME", false, true, true,
- false, "Ville", String.class);
+ ColumnProperty cp = new ColumnProperty("NAME", false, true, true, false,
+ "Ville", String.class);
Assert.assertSame(String.class, cp.getType());
}
@Test
public void isReadOnly_readWriteNullable_returnsTrue() {
- ColumnProperty cp = new ColumnProperty("NAME", false, true, true,
- false, "Ville", String.class);
+ ColumnProperty cp = new ColumnProperty("NAME", false, true, true, false,
+ "Ville", String.class);
Assert.assertFalse(cp.isReadOnly());
}
@@ -118,8 +119,8 @@ public class ColumnPropertyTest {
@Test
public void setReadOnly_readOnlyChangeAllowed_shouldSucceed() {
- ColumnProperty cp = new ColumnProperty("NAME", false, true, true,
- false, "Ville", String.class);
+ ColumnProperty cp = new ColumnProperty("NAME", false, true, true, false,
+ "Ville", String.class);
cp.setReadOnly(true);
Assert.assertTrue(cp.isReadOnly());
}
@@ -141,8 +142,8 @@ public class ColumnPropertyTest {
@Test
public void isModified_valueModified_returnsTrue() {
- ColumnProperty cp = new ColumnProperty("NAME", false, true, true,
- false, "Ville", String.class);
+ ColumnProperty cp = new ColumnProperty("NAME", false, true, true, false,
+ "Ville", String.class);
SQLContainer container = EasyMock.createMock(SQLContainer.class);
RowItem owner = new RowItem(container, new RowId(new Object[] { 1 }),
Arrays.asList(cp));
@@ -163,20 +164,22 @@ public class ColumnPropertyTest {
@Test
public void setValue_nullOnNullable_shouldWork() {
- ColumnProperty cp = new ColumnProperty("NAME", false, true, true,
- false, "asdf", String.class);
+ ColumnProperty cp = new ColumnProperty("NAME", false, true, true, false,
+ "asdf", String.class);
SQLContainer container = EasyMock.createMock(SQLContainer.class);
- new RowItem(container, new RowId(new Object[] { 1 }), Arrays.asList(cp));
+ new RowItem(container, new RowId(new Object[] { 1 }),
+ Arrays.asList(cp));
cp.setValue(null);
Assert.assertNull(cp.getValue());
}
@Test
public void setValue_resetTonullOnNullable_shouldWork() {
- ColumnProperty cp = new ColumnProperty("NAME", false, true, true,
- false, null, String.class);
+ ColumnProperty cp = new ColumnProperty("NAME", false, true, true, false,
+ null, String.class);
SQLContainer container = EasyMock.createMock(SQLContainer.class);
- new RowItem(container, new RowId(new Object[] { 1 }), Arrays.asList(cp));
+ new RowItem(container, new RowId(new Object[] { 1 }),
+ Arrays.asList(cp));
cp.setValue("asdf");
Assert.assertEquals("asdf", cp.getValue());
cp.setValue(null);
diff --git a/server/src/test/java/com/vaadin/data/util/sqlcontainer/DataGenerator.java b/server/src/test/java/com/vaadin/data/util/sqlcontainer/DataGenerator.java
index f6619a33b6..8ce298c065 100644
--- a/server/src/test/java/com/vaadin/data/util/sqlcontainer/DataGenerator.java
+++ b/server/src/test/java/com/vaadin/data/util/sqlcontainer/DataGenerator.java
@@ -39,14 +39,14 @@ public class DataGenerator {
statement.executeUpdate("insert into people values('Pelle', '18')");
statement.executeUpdate("insert into people values('Börje', '64')");
} else {
- statement
- .executeUpdate("insert into people values(default, 'Ville', '23')");
- statement
- .executeUpdate("insert into people values(default, 'Kalle', '7')");
- statement
- .executeUpdate("insert into people values(default, 'Pelle', '18')");
- statement
- .executeUpdate("insert into people values(default, 'Börje', '64')");
+ statement.executeUpdate(
+ "insert into people values(default, 'Ville', '23')");
+ statement.executeUpdate(
+ "insert into people values(default, 'Kalle', '7')");
+ statement.executeUpdate(
+ "insert into people values(default, 'Pelle', '18')");
+ statement.executeUpdate(
+ "insert into people values(default, 'Börje', '64')");
}
statement.close();
statement = conn.createStatement();
@@ -63,12 +63,12 @@ public class DataGenerator {
Statement statement = conn.createStatement();
for (int i = 4; i < 5000; i++) {
if (SQLTestsConstants.db == DB.MSSQL) {
- statement.executeUpdate("insert into people values('Person "
- + i + "', '" + i % 99 + "')");
+ statement.executeUpdate("insert into people values('Person " + i
+ + "', '" + i % 99 + "')");
} else {
- statement
- .executeUpdate("insert into people values(default, 'Person "
- + i + "', '" + i % 99 + "')");
+ statement.executeUpdate(
+ "insert into people values(default, 'Person " + i
+ + "', '" + i % 99 + "')");
}
}
statement.close();
@@ -94,11 +94,11 @@ public class DataGenerator {
statement.execute(stmtString);
}
if (SQLTestsConstants.db == DB.MSSQL) {
- statement
- .executeUpdate("insert into VERSIONED values('Junk', default)");
+ statement.executeUpdate(
+ "insert into VERSIONED values('Junk', default)");
} else {
- statement
- .executeUpdate("insert into VERSIONED values(default, 'Junk', default)");
+ statement.executeUpdate(
+ "insert into VERSIONED values(default, 'Junk', default)");
}
statement.close();
statement = conn.createStatement();
diff --git a/server/src/test/java/com/vaadin/data/util/sqlcontainer/FreeformQueryUtil.java b/server/src/test/java/com/vaadin/data/util/sqlcontainer/FreeformQueryUtil.java
index 288cb65fae..8688c9ae64 100644
--- a/server/src/test/java/com/vaadin/data/util/sqlcontainer/FreeformQueryUtil.java
+++ b/server/src/test/java/com/vaadin/data/util/sqlcontainer/FreeformQueryUtil.java
@@ -25,7 +25,8 @@ public class FreeformQueryUtil {
query.append(") AS rownum, * FROM \"PEOPLE\"");
if (!filters.isEmpty()) {
- query.append(QueryBuilder.getWhereStringForFilters(filters, sh));
+ query.append(
+ QueryBuilder.getWhereStringForFilters(filters, sh));
}
query.append(") AS a WHERE a.rownum BETWEEN ").append(offset)
.append(" AND ").append(Integer.toString(offset + limit));
@@ -40,7 +41,8 @@ public class FreeformQueryUtil {
query.append("SELECT * FROM (SELECT x.*, ROWNUM AS "
+ "\"rownum\" FROM (SELECT * FROM \"PEOPLE\"");
if (!filters.isEmpty()) {
- query.append(QueryBuilder.getWhereStringForFilters(filters, sh));
+ query.append(
+ QueryBuilder.getWhereStringForFilters(filters, sh));
}
query.append(") x) WHERE \"rownum\" BETWEEN ? AND ?");
sh.addParameterValue(offset);
@@ -50,7 +52,8 @@ public class FreeformQueryUtil {
} else {
StringBuilder query = new StringBuilder("SELECT * FROM people");
if (!filters.isEmpty()) {
- query.append(QueryBuilder.getWhereStringForFilters(filters, sh));
+ query.append(
+ QueryBuilder.getWhereStringForFilters(filters, sh));
}
if (limit != 0 || offset != 0) {
query.append(" LIMIT ? OFFSET ?");
diff --git a/server/src/test/java/com/vaadin/data/util/sqlcontainer/RowIdTest.java b/server/src/test/java/com/vaadin/data/util/sqlcontainer/RowIdTest.java
index 73f7be9fb2..e93048157b 100644
--- a/server/src/test/java/com/vaadin/data/util/sqlcontainer/RowIdTest.java
+++ b/server/src/test/java/com/vaadin/data/util/sqlcontainer/RowIdTest.java
@@ -54,7 +54,7 @@ public class RowIdTest {
@Test
public void toString_defaultCtor_noException() {
RowId rowId = new RowId();
- Assert.assertTrue("Unexpected to string for empty Row Id", rowId
- .toString().isEmpty());
+ Assert.assertTrue("Unexpected to string for empty Row Id",
+ rowId.toString().isEmpty());
}
}
diff --git a/server/src/test/java/com/vaadin/data/util/sqlcontainer/SQLContainerTableQueryTest.java b/server/src/test/java/com/vaadin/data/util/sqlcontainer/SQLContainerTableQueryTest.java
index b2cc9a5d0c..9de97b4631 100644
--- a/server/src/test/java/com/vaadin/data/util/sqlcontainer/SQLContainerTableQueryTest.java
+++ b/server/src/test/java/com/vaadin/data/util/sqlcontainer/SQLContainerTableQueryTest.java
@@ -241,8 +241,8 @@ public class SQLContainerTableQueryTest {
if (SQLTestsConstants.db == DB.MSSQL) {
statement.executeUpdate("insert into people values('Bengt', 30)");
} else {
- statement
- .executeUpdate("insert into people values(default, 'Bengt', 30)");
+ statement.executeUpdate(
+ "insert into people values(default, 'Bengt', 30)");
}
statement.close();
conn.commit();
@@ -255,11 +255,11 @@ public class SQLContainerTableQueryTest {
public void indexOfId_tableWithParameterThree_returnsThree()
throws SQLException {
if (SQLTestsConstants.db == DB.ORACLE) {
- assertEquals(3, container.indexOfId(new RowId(
- new Object[] { new BigDecimal(3 + offset) })));
+ assertEquals(3, container.indexOfId(
+ new RowId(new Object[] { new BigDecimal(3 + offset) })));
} else {
- assertEquals(3,
- container.indexOfId(new RowId(new Object[] { 3 + offset })));
+ assertEquals(3, container
+ .indexOfId(new RowId(new Object[] { 3 + offset })));
}
}
@@ -269,14 +269,14 @@ public class SQLContainerTableQueryTest {
DataGenerator.addFiveThousandPeople(connectionPool);
if (SQLTestsConstants.db == DB.ORACLE) {
- container.getItem(new RowId(new Object[] { new BigDecimal(
- 1337 + offset) }));
- assertEquals(1337, container.indexOfId(new RowId(
- new Object[] { new BigDecimal(1337 + offset) })));
+ container.getItem(
+ new RowId(new Object[] { new BigDecimal(1337 + offset) }));
+ assertEquals(1337, container.indexOfId(
+ new RowId(new Object[] { new BigDecimal(1337 + offset) })));
} else {
container.getItem(new RowId(new Object[] { 1337 + offset }));
- assertEquals(1337, container.indexOfId(new RowId(
- new Object[] { 1337 + offset })));
+ assertEquals(1337, container
+ .indexOfId(new RowId(new Object[] { 1337 + offset })));
}
}
@@ -365,44 +365,44 @@ public class SQLContainerTableQueryTest {
@Test
public void isFirstId_tableActualFirstId_returnsTrue() throws SQLException {
if (SQLTestsConstants.db == DB.ORACLE) {
- assertTrue(container.isFirstId(new RowId(
- new Object[] { new BigDecimal(0 + offset) })));
+ assertTrue(container.isFirstId(
+ new RowId(new Object[] { new BigDecimal(0 + offset) })));
} else {
- assertTrue(container.isFirstId(new RowId(
- new Object[] { 0 + offset })));
+ assertTrue(container
+ .isFirstId(new RowId(new Object[] { 0 + offset })));
}
}
@Test
public void isFirstId_tableSecondId_returnsFalse() throws SQLException {
if (SQLTestsConstants.db == DB.ORACLE) {
- Assert.assertFalse(container.isFirstId(new RowId(
- new Object[] { new BigDecimal(1 + offset) })));
+ Assert.assertFalse(container.isFirstId(
+ new RowId(new Object[] { new BigDecimal(1 + offset) })));
} else {
- Assert.assertFalse(container.isFirstId(new RowId(
- new Object[] { 1 + offset })));
+ Assert.assertFalse(container
+ .isFirstId(new RowId(new Object[] { 1 + offset })));
}
}
@Test
public void isLastId_tableSecondId_returnsFalse() throws SQLException {
if (SQLTestsConstants.db == DB.ORACLE) {
- Assert.assertFalse(container.isLastId(new RowId(
- new Object[] { new BigDecimal(1 + offset) })));
+ Assert.assertFalse(container.isLastId(
+ new RowId(new Object[] { new BigDecimal(1 + offset) })));
} else {
- Assert.assertFalse(container.isLastId(new RowId(
- new Object[] { 1 + offset })));
+ Assert.assertFalse(
+ container.isLastId(new RowId(new Object[] { 1 + offset })));
}
}
@Test
public void isLastId_tableLastId_returnsTrue() throws SQLException {
if (SQLTestsConstants.db == DB.ORACLE) {
- assertTrue(container.isLastId(new RowId(
- new Object[] { new BigDecimal(3 + offset) })));
+ assertTrue(container.isLastId(
+ new RowId(new Object[] { new BigDecimal(3 + offset) })));
} else {
- assertTrue(container
- .isLastId(new RowId(new Object[] { 3 + offset })));
+ assertTrue(
+ container.isLastId(new RowId(new Object[] { 3 + offset })));
}
}
@@ -410,11 +410,11 @@ public class SQLContainerTableQueryTest {
public void isLastId_table5000RowsLastId_returnsTrue() throws SQLException {
DataGenerator.addFiveThousandPeople(connectionPool);
if (SQLTestsConstants.db == DB.ORACLE) {
- assertTrue(container.isLastId(new RowId(
- new Object[] { new BigDecimal(4999 + offset) })));
+ assertTrue(container.isLastId(
+ new RowId(new Object[] { new BigDecimal(4999 + offset) })));
} else {
- assertTrue(container.isLastId(new RowId(
- new Object[] { 4999 + offset })));
+ assertTrue(container
+ .isLastId(new RowId(new Object[] { 4999 + offset })));
}
}
@@ -481,7 +481,8 @@ public class SQLContainerTableQueryTest {
}
@Test(expected = UnsupportedOperationException.class)
- public void addContainerProperty_normal_isUnsupported() throws SQLException {
+ public void addContainerProperty_normal_isUnsupported()
+ throws SQLException {
container.addContainerProperty("asdf", String.class, "");
}
@@ -579,7 +580,8 @@ public class SQLContainerTableQueryTest {
}
@Test
- public void indexOfId_tableNewlyAddedItem_returnsFour() throws SQLException {
+ public void indexOfId_tableNewlyAddedItem_returnsFour()
+ throws SQLException {
Object id = container.addItem();
assertEquals(4, container.indexOfId(id));
}
@@ -604,8 +606,8 @@ public class SQLContainerTableQueryTest {
Object id = container.addItem();
Item item = container.getItem(id);
item.getItemProperty(NAME).setValue("asdf");
- assertEquals("asdf", container.getContainerProperty(id, NAME)
- .getValue());
+ assertEquals("asdf",
+ container.getContainerProperty(id, NAME).getValue());
}
@Test
@@ -710,7 +712,8 @@ public class SQLContainerTableQueryTest {
}
@Test
- public void getItem_tableAddedItemRemoved_returnsNull() throws SQLException {
+ public void getItem_tableAddedItemRemoved_returnsNull()
+ throws SQLException {
Object id = container.addItem();
Assert.assertNotNull(container.getItem(id));
@@ -958,7 +961,8 @@ public class SQLContainerTableQueryTest {
}
@Test
- public void commit_tableAddedItem_shouldBeWrittenToDB() throws SQLException {
+ public void commit_tableAddedItem_shouldBeWrittenToDB()
+ throws SQLException {
Object id = container.addItem();
container.getContainerProperty(id, NAME).setValue("New Name");
@@ -966,9 +970,8 @@ public class SQLContainerTableQueryTest {
Assert.assertSame(id, container.lastItemId());
container.commit();
Assert.assertFalse(container.lastItemId() instanceof TemporaryRowId);
- assertEquals("New Name",
- container.getContainerProperty(container.lastItemId(), NAME)
- .getValue());
+ assertEquals("New Name", container
+ .getContainerProperty(container.lastItemId(), NAME).getValue());
}
@Test
@@ -984,12 +987,11 @@ public class SQLContainerTableQueryTest {
Object nextToLast = container.getIdByIndex(container.size() - 2);
Assert.assertFalse(nextToLast instanceof TemporaryRowId);
- assertEquals("Herbert", container
- .getContainerProperty(nextToLast, NAME).getValue());
+ assertEquals("Herbert",
+ container.getContainerProperty(nextToLast, NAME).getValue());
Assert.assertFalse(container.lastItemId() instanceof TemporaryRowId);
- assertEquals("Larry",
- container.getContainerProperty(container.lastItemId(), NAME)
- .getValue());
+ assertEquals("Larry", container
+ .getContainerProperty(container.lastItemId(), NAME).getValue());
}
@Test
@@ -1009,9 +1011,8 @@ public class SQLContainerTableQueryTest {
container.getContainerProperty(last, NAME).setValue("Donald");
container.commit();
- assertEquals("Donald",
- container.getContainerProperty(container.lastItemId(), NAME)
- .getValue());
+ assertEquals("Donald", container
+ .getContainerProperty(container.lastItemId(), NAME).getValue());
}
@Test
@@ -1027,15 +1028,17 @@ public class SQLContainerTableQueryTest {
}
@Test
- public void rollback_tableItemAdded_discardsAddedItem() throws SQLException {
+ public void rollback_tableItemAdded_discardsAddedItem()
+ throws SQLException {
int size = container.size();
Object id = container.addItem();
container.getContainerProperty(id, NAME).setValue("foo");
assertEquals(size + 1, container.size());
container.rollback();
assertEquals(size, container.size());
- Assert.assertFalse("foo".equals(container.getContainerProperty(
- container.lastItemId(), NAME).getValue()));
+ Assert.assertFalse("foo".equals(
+ container.getContainerProperty(container.lastItemId(), NAME)
+ .getValue()));
}
@Test
@@ -1051,12 +1054,14 @@ public class SQLContainerTableQueryTest {
}
@Test
- public void rollback_tableItemChanged_discardsChanges() throws SQLException {
+ public void rollback_tableItemChanged_discardsChanges()
+ throws SQLException {
Object last = container.lastItemId();
container.getContainerProperty(last, NAME).setValue("foo");
container.rollback();
- Assert.assertFalse("foo".equals(container.getContainerProperty(
- container.lastItemId(), NAME).getValue()));
+ Assert.assertFalse("foo".equals(
+ container.getContainerProperty(container.lastItemId(), NAME)
+ .getValue()));
}
@Test
@@ -1126,8 +1131,8 @@ public class SQLContainerTableQueryTest {
@Test
public void isModified_tableChangedItem_returnsTrue() throws SQLException {
Assert.assertFalse(container.isModified());
- container.getContainerProperty(container.lastItemId(), NAME).setValue(
- "foo");
+ container.getContainerProperty(container.lastItemId(), NAME)
+ .setValue("foo");
assertTrue(container.isModified());
}
@@ -1151,18 +1156,16 @@ public class SQLContainerTableQueryTest {
assertEquals("Ville",
container.getContainerProperty(container.firstItemId(), NAME)
.getValue());
- assertEquals("Börje",
- container.getContainerProperty(container.lastItemId(), NAME)
- .getValue());
+ assertEquals("Börje", container
+ .getContainerProperty(container.lastItemId(), NAME).getValue());
container.addOrderBy(new OrderBy(NAME, true));
// Börje, Kalle, Pelle, Ville
assertEquals("Börje",
container.getContainerProperty(container.firstItemId(), NAME)
.getValue());
- assertEquals("Ville",
- container.getContainerProperty(container.lastItemId(), NAME)
- .getValue());
+ assertEquals("Ville", container
+ .getContainerProperty(container.lastItemId(), NAME).getValue());
}
@Test(expected = IllegalArgumentException.class)
@@ -1176,9 +1179,8 @@ public class SQLContainerTableQueryTest {
assertEquals("Ville",
container.getContainerProperty(container.firstItemId(), NAME)
.getValue());
- assertEquals("Börje",
- container.getContainerProperty(container.lastItemId(), NAME)
- .getValue());
+ assertEquals("Börje", container
+ .getContainerProperty(container.lastItemId(), NAME).getValue());
container.sort(new Object[] { NAME }, new boolean[] { true });
@@ -1186,25 +1188,22 @@ public class SQLContainerTableQueryTest {
assertEquals("Börje",
container.getContainerProperty(container.firstItemId(), NAME)
.getValue());
- assertEquals("Ville",
- container.getContainerProperty(container.lastItemId(), NAME)
- .getValue());
+ assertEquals("Ville", container
+ .getContainerProperty(container.lastItemId(), NAME).getValue());
}
@Test
public void addFilter_table_filtersResults() throws SQLException {
// Ville, Kalle, Pelle, Börje
assertEquals(4, container.size());
- assertEquals("Börje",
- container.getContainerProperty(container.lastItemId(), NAME)
- .getValue());
+ assertEquals("Börje", container
+ .getContainerProperty(container.lastItemId(), NAME).getValue());
container.addContainerFilter(new Like(NAME, "%lle"));
// Ville, Kalle, Pelle
assertEquals(3, container.size());
- assertEquals("Pelle",
- container.getContainerProperty(container.lastItemId(), NAME)
- .getValue());
+ assertEquals("Pelle", container
+ .getContainerProperty(container.lastItemId(), NAME).getValue());
}
@Test
@@ -1216,9 +1215,8 @@ public class SQLContainerTableQueryTest {
// Ville
assertEquals(1, container.size());
- assertEquals("Ville",
- container.getContainerProperty(container.lastItemId(), NAME)
- .getValue());
+ assertEquals("Ville", container
+ .getContainerProperty(container.lastItemId(), NAME).getValue());
}
@Test
@@ -1231,9 +1229,8 @@ public class SQLContainerTableQueryTest {
// Ville
assertEquals(1, container.size());
- assertEquals("Ville",
- container.getContainerProperty(container.lastItemId(), NAME)
- .getValue());
+ assertEquals("Ville", container
+ .getContainerProperty(container.lastItemId(), NAME).getValue());
}
@Test
@@ -1246,16 +1243,14 @@ public class SQLContainerTableQueryTest {
// Ville
assertEquals(1, container.size());
- assertEquals("Ville",
- container.getContainerProperty(container.lastItemId(), NAME)
- .getValue());
+ assertEquals("Ville", container
+ .getContainerProperty(container.lastItemId(), NAME).getValue());
container.removeAllContainerFilters();
assertEquals(4, container.size());
- assertEquals("Börje",
- container.getContainerProperty(container.lastItemId(), NAME)
- .getValue());
+ assertEquals("Börje", container
+ .getContainerProperty(container.lastItemId(), NAME).getValue());
}
@Test
@@ -1267,16 +1262,14 @@ public class SQLContainerTableQueryTest {
// Ville
assertEquals(1, container.size());
- assertEquals("Ville",
- container.getContainerProperty(container.lastItemId(), NAME)
- .getValue());
+ assertEquals("Ville", container
+ .getContainerProperty(container.lastItemId(), NAME).getValue());
container.removeContainerFilters(NAME);
assertEquals(4, container.size());
- assertEquals("Börje",
- container.getContainerProperty(container.lastItemId(), NAME)
- .getValue());
+ assertEquals("Börje", container
+ .getContainerProperty(container.lastItemId(), NAME).getValue());
}
@Test
@@ -1284,9 +1277,8 @@ public class SQLContainerTableQueryTest {
throws SQLException {
// Ville, Kalle, Pelle, Börje
assertEquals(4, container.size());
- assertEquals("Börje",
- container.getContainerProperty(container.lastItemId(), NAME)
- .getValue());
+ assertEquals("Börje", container
+ .getContainerProperty(container.lastItemId(), NAME).getValue());
Object id1 = container.addItem();
container.getContainerProperty(id1, NAME).setValue("Palle");
@@ -1312,7 +1304,8 @@ public class SQLContainerTableQueryTest {
try {
container.getIdByIndex(4);
- Assert.fail("SQLContainer.getIdByIndex() returned a value for an index beyond the end of the container");
+ Assert.fail(
+ "SQLContainer.getIdByIndex() returned a value for an index beyond the end of the container");
} catch (IndexOutOfBoundsException e) {
// should throw exception - item is filtered out
}
@@ -1335,9 +1328,8 @@ public class SQLContainerTableQueryTest {
assertEquals("Ville",
container.getContainerProperty(container.firstItemId(), NAME)
.getValue());
- assertEquals("Börje",
- container.getContainerProperty(container.lastItemId(), NAME)
- .getValue());
+ assertEquals("Börje", container
+ .getContainerProperty(container.lastItemId(), NAME).getValue());
Object id1 = container.addItem();
container.getContainerProperty(id1, NAME).setValue("Wilbert");
@@ -1350,14 +1342,12 @@ public class SQLContainerTableQueryTest {
assertEquals("Börje",
container.getContainerProperty(container.firstItemId(), NAME)
.getValue());
- assertEquals(
- "Wilbert",
+ assertEquals("Wilbert",
container.getContainerProperty(
container.getIdByIndex(container.size() - 2), NAME)
.getValue());
- assertEquals("Albert",
- container.getContainerProperty(container.lastItemId(), NAME)
- .getValue());
+ assertEquals("Albert", container
+ .getContainerProperty(container.lastItemId(), NAME).getValue());
}
}
diff --git a/server/src/test/java/com/vaadin/data/util/sqlcontainer/SQLContainerTest.java b/server/src/test/java/com/vaadin/data/util/sqlcontainer/SQLContainerTest.java
index a332d9d9ee..d499ceed92 100644
--- a/server/src/test/java/com/vaadin/data/util/sqlcontainer/SQLContainerTest.java
+++ b/server/src/test/java/com/vaadin/data/util/sqlcontainer/SQLContainerTest.java
@@ -73,8 +73,8 @@ public class SQLContainerTest {
@Test(expected = SQLException.class)
public void constructor_withIllegalFreeformQuery_shouldFail()
throws SQLException {
- SQLContainer c = new SQLContainer(new FreeformQuery(
- "SELECT * FROM asdf", connectionPool, "ID"));
+ SQLContainer c = new SQLContainer(
+ new FreeformQuery("SELECT * FROM asdf", connectionPool, "ID"));
c.getItem(c.firstItemId());
}
@@ -91,8 +91,8 @@ public class SQLContainerTest {
throws SQLException {
SQLContainer container = new SQLContainer(new FreeformQuery(
"SELECT * FROM people", connectionPool, "ID"));
- Assert.assertFalse(container
- .containsId(new RowId(new Object[] { 1337 })));
+ Assert.assertFalse(
+ container.containsId(new RowId(new Object[] { 1337 })));
}
@Test
@@ -101,15 +101,12 @@ public class SQLContainerTest {
SQLContainer container = new SQLContainer(new FreeformQuery(
"SELECT * FROM people", connectionPool, "ID"));
if (SQLTestsConstants.db == DB.ORACLE) {
- Assert.assertEquals(
- "Ville",
- container
- .getContainerProperty(
- new RowId(new Object[] { new BigDecimal(
- 0 + offset) }), "NAME").getValue());
+ Assert.assertEquals("Ville",
+ container.getContainerProperty(new RowId(
+ new Object[] { new BigDecimal(0 + offset) }),
+ "NAME").getValue());
} else {
- Assert.assertEquals(
- "Ville",
+ Assert.assertEquals("Ville",
container.getContainerProperty(
new RowId(new Object[] { 0 + offset }), "NAME")
.getValue());
@@ -121,8 +118,8 @@ public class SQLContainerTest {
throws SQLException {
SQLContainer container = new SQLContainer(new FreeformQuery(
"SELECT * FROM people", connectionPool, "ID"));
- Assert.assertNull(container.getContainerProperty(new RowId(
- new Object[] { 1 + offset }), "asdf"));
+ Assert.assertNull(container.getContainerProperty(
+ new RowId(new Object[] { 1 + offset }), "asdf"));
}
@Test
@@ -130,8 +127,8 @@ public class SQLContainerTest {
throws SQLException {
SQLContainer container = new SQLContainer(new FreeformQuery(
"SELECT * FROM people", connectionPool, "ID"));
- Assert.assertNull(container.getContainerProperty(new RowId(
- new Object[] { 1337 + offset }), "NAME"));
+ Assert.assertNull(container.getContainerProperty(
+ new RowId(new Object[] { 1337 + offset }), "NAME"));
}
@Test
@@ -152,8 +149,8 @@ public class SQLContainerTest {
"SELECT * FROM people", connectionPool, "ID"));
Item item;
if (SQLTestsConstants.db == DB.ORACLE) {
- item = container.getItem(new RowId(new Object[] { new BigDecimal(
- 0 + offset) }));
+ item = container.getItem(
+ new RowId(new Object[] { new BigDecimal(0 + offset) }));
} else {
item = container.getItem(new RowId(new Object[] { 0 + offset }));
}
@@ -187,19 +184,19 @@ public class SQLContainerTest {
"SELECT * FROM people", connectionPool, "ID"));
Item item;
if (SQLTestsConstants.db == DB.ORACLE) {
- item = container.getItem(new RowId(new Object[] { new BigDecimal(
- 1337 + offset) }));
+ item = container.getItem(
+ new RowId(new Object[] { new BigDecimal(1337 + offset) }));
Assert.assertNotNull(item);
- Assert.assertEquals(new BigDecimal(1337 + offset), item
- .getItemProperty("ID").getValue());
+ Assert.assertEquals(new BigDecimal(1337 + offset),
+ item.getItemProperty("ID").getValue());
} else {
item = container.getItem(new RowId(new Object[] { 1337 + offset }));
Assert.assertNotNull(item);
- Assert.assertEquals(1337 + offset, item.getItemProperty("ID")
- .getValue());
+ Assert.assertEquals(1337 + offset,
+ item.getItemProperty("ID").getValue());
}
- Assert.assertEquals("Person 1337", item.getItemProperty("NAME")
- .getValue());
+ Assert.assertEquals("Person 1337",
+ item.getItemProperty("NAME").getValue());
}
@Test
@@ -268,8 +265,8 @@ public class SQLContainerTest {
if (SQLTestsConstants.db == DB.MSSQL) {
statement.executeUpdate("insert into people values('Bengt', '42')");
} else {
- statement
- .executeUpdate("insert into people values(default, 'Bengt', '42')");
+ statement.executeUpdate(
+ "insert into people values(default, 'Bengt', '42')");
}
statement.close();
conn.commit();
@@ -286,11 +283,11 @@ public class SQLContainerTest {
SQLContainer container = new SQLContainer(new FreeformQuery(
"SELECT * FROM people", connectionPool, "ID"));
if (SQLTestsConstants.db == DB.ORACLE) {
- Assert.assertEquals(3, container.indexOfId(new RowId(
- new Object[] { new BigDecimal(3 + offset) })));
+ Assert.assertEquals(3, container.indexOfId(
+ new RowId(new Object[] { new BigDecimal(3 + offset) })));
} else {
- Assert.assertEquals(3,
- container.indexOfId(new RowId(new Object[] { 3 + offset })));
+ Assert.assertEquals(3, container
+ .indexOfId(new RowId(new Object[] { 3 + offset })));
}
}
@@ -298,18 +295,18 @@ public class SQLContainerTest {
public void indexOfId_freeform5000RowsWithParameter1337_returns1337()
throws SQLException {
DataGenerator.addFiveThousandPeople(connectionPool);
- SQLContainer container = new SQLContainer(new FreeformQuery(
- "SELECT * FROM people ORDER BY \"ID\" ASC", connectionPool,
- "ID"));
+ SQLContainer container = new SQLContainer(
+ new FreeformQuery("SELECT * FROM people ORDER BY \"ID\" ASC",
+ connectionPool, "ID"));
if (SQLTestsConstants.db == DB.ORACLE) {
- container.getItem(new RowId(new Object[] { new BigDecimal(
- 1337 + offset) }));
- Assert.assertEquals(1337, container.indexOfId(new RowId(
- new Object[] { new BigDecimal(1337 + offset) })));
+ container.getItem(
+ new RowId(new Object[] { new BigDecimal(1337 + offset) }));
+ Assert.assertEquals(1337, container.indexOfId(
+ new RowId(new Object[] { new BigDecimal(1337 + offset) })));
} else {
container.getItem(new RowId(new Object[] { 1337 + offset }));
- Assert.assertEquals(1337, container.indexOfId(new RowId(
- new Object[] { 1337 + offset })));
+ Assert.assertEquals(1337, container
+ .indexOfId(new RowId(new Object[] { 1337 + offset })));
}
}
@@ -317,13 +314,14 @@ public class SQLContainerTest {
public void getIdByIndex_freeform5000rowsIndex1337_returnsRowId1337()
throws SQLException {
DataGenerator.addFiveThousandPeople(connectionPool);
- SQLContainer container = new SQLContainer(new FreeformQuery(
- "SELECT * FROM people ORDER BY \"ID\" ASC", connectionPool,
- "ID"));
+ SQLContainer container = new SQLContainer(
+ new FreeformQuery("SELECT * FROM people ORDER BY \"ID\" ASC",
+ connectionPool, "ID"));
Object itemId = container.getIdByIndex(1337);
if (SQLTestsConstants.db == DB.ORACLE) {
- Assert.assertEquals(new RowId(new Object[] { new BigDecimal(
- 1337 + offset) }), itemId);
+ Assert.assertEquals(
+ new RowId(new Object[] { new BigDecimal(1337 + offset) }),
+ itemId);
} else {
Assert.assertEquals(new RowId(new Object[] { 1337 + offset }),
itemId);
@@ -352,8 +350,7 @@ public class SQLContainerTest {
int end = offset + limit + 1;
String q = "SELECT * FROM (SELECT row_number() OVER"
+ " ( ORDER BY \"ID\" ASC) AS rownum, * FROM people)"
- + " AS a WHERE a.rownum BETWEEN "
- + start
+ + " AS a WHERE a.rownum BETWEEN " + start
+ " AND " + end;
return q;
} else if (SQLTestsConstants.db == DB.ORACLE) {
@@ -361,9 +358,7 @@ public class SQLContainerTest {
int end = offset + limit + 1;
String q = "SELECT * FROM (SELECT x.*, ROWNUM AS r FROM"
+ " (SELECT * FROM people ORDER BY \"ID\" ASC) x) "
- + " WHERE r BETWEEN "
- + start
- + " AND "
+ + " WHERE r BETWEEN " + start + " AND "
+ end;
return q;
} else {
@@ -400,9 +395,9 @@ public class SQLContainerTest {
public void nextItemId_freeformCurrentItem1337_returnsItem1338()
throws SQLException {
DataGenerator.addFiveThousandPeople(connectionPool);
- SQLContainer container = new SQLContainer(new FreeformQuery(
- "SELECT * FROM people ORDER BY \"ID\" ASC", connectionPool,
- "ID"));
+ SQLContainer container = new SQLContainer(
+ new FreeformQuery("SELECT * FROM people ORDER BY \"ID\" ASC",
+ connectionPool, "ID"));
Object itemId = container.getIdByIndex(1337);
if (SQLTestsConstants.db == DB.ORACLE) {
Assert.assertEquals(
@@ -418,9 +413,9 @@ public class SQLContainerTest {
public void prevItemId_freeformCurrentItem1337_returns1336()
throws SQLException {
DataGenerator.addFiveThousandPeople(connectionPool);
- SQLContainer container = new SQLContainer(new FreeformQuery(
- "SELECT * FROM people ORDER BY \"ID\" ASC", connectionPool,
- "ID"));
+ SQLContainer container = new SQLContainer(
+ new FreeformQuery("SELECT * FROM people ORDER BY \"ID\" ASC",
+ connectionPool, "ID"));
Object itemId = container.getIdByIndex(1337);
if (SQLTestsConstants.db == DB.ORACLE) {
Assert.assertEquals(
@@ -451,9 +446,9 @@ public class SQLContainerTest {
throws SQLException {
DataGenerator.addFiveThousandPeople(connectionPool);
- SQLContainer container = new SQLContainer(new FreeformQuery(
- "SELECT * FROM people ORDER BY \"ID\" ASC", connectionPool,
- "ID"));
+ SQLContainer container = new SQLContainer(
+ new FreeformQuery("SELECT * FROM people ORDER BY \"ID\" ASC",
+ connectionPool, "ID"));
if (SQLTestsConstants.db == DB.ORACLE) {
Assert.assertEquals(
new RowId(new Object[] { 4999 + offset }).toString(),
@@ -470,11 +465,11 @@ public class SQLContainerTest {
SQLContainer container = new SQLContainer(new FreeformQuery(
"SELECT * FROM people", connectionPool, "ID"));
if (SQLTestsConstants.db == DB.ORACLE) {
- Assert.assertTrue(container.isFirstId(new RowId(
- new Object[] { new BigDecimal(0 + offset) })));
+ Assert.assertTrue(container.isFirstId(
+ new RowId(new Object[] { new BigDecimal(0 + offset) })));
} else {
- Assert.assertTrue(container.isFirstId(new RowId(
- new Object[] { 0 + offset })));
+ Assert.assertTrue(container
+ .isFirstId(new RowId(new Object[] { 0 + offset })));
}
}
@@ -483,11 +478,11 @@ public class SQLContainerTest {
SQLContainer container = new SQLContainer(new FreeformQuery(
"SELECT * FROM people", connectionPool, "ID"));
if (SQLTestsConstants.db == DB.ORACLE) {
- Assert.assertFalse(container.isFirstId(new RowId(
- new Object[] { new BigDecimal(1 + offset) })));
+ Assert.assertFalse(container.isFirstId(
+ new RowId(new Object[] { new BigDecimal(1 + offset) })));
} else {
- Assert.assertFalse(container.isFirstId(new RowId(
- new Object[] { 1 + offset })));
+ Assert.assertFalse(container
+ .isFirstId(new RowId(new Object[] { 1 + offset })));
}
}
@@ -496,11 +491,11 @@ public class SQLContainerTest {
SQLContainer container = new SQLContainer(new FreeformQuery(
"SELECT * FROM people", connectionPool, "ID"));
if (SQLTestsConstants.db == DB.ORACLE) {
- Assert.assertFalse(container.isLastId(new RowId(
- new Object[] { new BigDecimal(1 + offset) })));
+ Assert.assertFalse(container.isLastId(
+ new RowId(new Object[] { new BigDecimal(1 + offset) })));
} else {
- Assert.assertFalse(container.isLastId(new RowId(
- new Object[] { 1 + offset })));
+ Assert.assertFalse(
+ container.isLastId(new RowId(new Object[] { 1 + offset })));
}
}
@@ -509,11 +504,11 @@ public class SQLContainerTest {
SQLContainer container = new SQLContainer(new FreeformQuery(
"SELECT * FROM people", connectionPool, "ID"));
if (SQLTestsConstants.db == DB.ORACLE) {
- Assert.assertTrue(container.isLastId(new RowId(
- new Object[] { new BigDecimal(3 + offset) })));
+ Assert.assertTrue(container.isLastId(
+ new RowId(new Object[] { new BigDecimal(3 + offset) })));
} else {
- Assert.assertTrue(container.isLastId(new RowId(
- new Object[] { 3 + offset })));
+ Assert.assertTrue(
+ container.isLastId(new RowId(new Object[] { 3 + offset })));
}
}
@@ -521,15 +516,15 @@ public class SQLContainerTest {
public void isLastId_freeform5000RowsLastId_returnsTrue()
throws SQLException {
DataGenerator.addFiveThousandPeople(connectionPool);
- SQLContainer container = new SQLContainer(new FreeformQuery(
- "SELECT * FROM people ORDER BY \"ID\" ASC", connectionPool,
- "ID"));
+ SQLContainer container = new SQLContainer(
+ new FreeformQuery("SELECT * FROM people ORDER BY \"ID\" ASC",
+ connectionPool, "ID"));
if (SQLTestsConstants.db == DB.ORACLE) {
- Assert.assertTrue(container.isLastId(new RowId(
- new Object[] { new BigDecimal(4999 + offset) })));
+ Assert.assertTrue(container.isLastId(
+ new RowId(new Object[] { new BigDecimal(4999 + offset) })));
} else {
- Assert.assertTrue(container.isLastId(new RowId(
- new Object[] { 4999 + offset })));
+ Assert.assertTrue(container
+ .isLastId(new RowId(new Object[] { 4999 + offset })));
}
}
@@ -585,7 +580,8 @@ public class SQLContainerTest {
}
@Test(expected = UnsupportedOperationException.class)
- public void addContainerProperty_normal_isUnsupported() throws SQLException {
+ public void addContainerProperty_normal_isUnsupported()
+ throws SQLException {
SQLContainer container = new SQLContainer(new FreeformQuery(
"SELECT * FROM people", connectionPool, "ID"));
container.addContainerProperty("asdf", String.class, "");
@@ -743,8 +739,8 @@ public class SQLContainerTest {
Object id = container.addItem();
Item item = container.getItem(id);
item.getItemProperty("NAME").setValue("asdf");
- Assert.assertEquals("asdf", container.getContainerProperty(id, "NAME")
- .getValue());
+ Assert.assertEquals("asdf",
+ container.getContainerProperty(id, "NAME").getValue());
}
@Test
@@ -1148,15 +1144,14 @@ public class SQLContainerTest {
throws SQLException {
FreeformQueryDelegate delegate = EasyMock
.createMock(FreeformQueryDelegate.class);
- EasyMock.expect(
- delegate.storeRow(EasyMock.isA(Connection.class),
- EasyMock.isA(RowItem.class)))
- .andAnswer(new IAnswer<Integer>() {
+ EasyMock.expect(delegate.storeRow(EasyMock.isA(Connection.class),
+ EasyMock.isA(RowItem.class))).andAnswer(new IAnswer<Integer>() {
@Override
public Integer answer() throws Throwable {
Connection conn = (Connection) EasyMock
.getCurrentArguments()[0];
- RowItem item = (RowItem) EasyMock.getCurrentArguments()[1];
+ RowItem item = (RowItem) EasyMock
+ .getCurrentArguments()[1];
Statement statement = conn.createStatement();
if (SQLTestsConstants.db == DB.MSSQL) {
statement
@@ -1165,15 +1160,17 @@ public class SQLContainerTest {
.getValue()
+ "', '"
+ item.getItemProperty("AGE")
- .getValue() + "')");
+ .getValue()
+ + "')");
} else {
- statement
- .executeUpdate("insert into people values(default, '"
+ statement.executeUpdate(
+ "insert into people values(default, '"
+ item.getItemProperty("NAME")
.getValue()
+ "', '"
+ item.getItemProperty("AGE")
- .getValue() + "')");
+ .getValue()
+ + "')");
}
statement.close();
conn.commit();
@@ -1194,8 +1191,7 @@ public class SQLContainerTest {
int end = offset + limit + 1;
String q = "SELECT * FROM (SELECT row_number() OVER"
+ " ( ORDER BY \"ID\" ASC) AS rownum, * FROM people)"
- + " AS a WHERE a.rownum BETWEEN "
- + start
+ + " AS a WHERE a.rownum BETWEEN " + start
+ " AND " + end;
return q;
} else if (SQLTestsConstants.db == DB.ORACLE) {
@@ -1203,9 +1199,7 @@ public class SQLContainerTest {
int end = offset + limit + 1;
String q = "SELECT * FROM (SELECT x.*, ROWNUM AS r FROM"
+ " (SELECT * FROM people ORDER BY \"ID\" ASC) x) "
- + " WHERE r BETWEEN "
- + start
- + " AND "
+ + " WHERE r BETWEEN " + start + " AND "
+ end;
return q;
} else {
@@ -1249,15 +1243,14 @@ public class SQLContainerTest {
throws SQLException {
FreeformQueryDelegate delegate = EasyMock
.createMock(FreeformQueryDelegate.class);
- EasyMock.expect(
- delegate.storeRow(EasyMock.isA(Connection.class),
- EasyMock.isA(RowItem.class)))
- .andAnswer(new IAnswer<Integer>() {
+ EasyMock.expect(delegate.storeRow(EasyMock.isA(Connection.class),
+ EasyMock.isA(RowItem.class))).andAnswer(new IAnswer<Integer>() {
@Override
public Integer answer() throws Throwable {
Connection conn = (Connection) EasyMock
.getCurrentArguments()[0];
- RowItem item = (RowItem) EasyMock.getCurrentArguments()[1];
+ RowItem item = (RowItem) EasyMock
+ .getCurrentArguments()[1];
Statement statement = conn.createStatement();
if (SQLTestsConstants.db == DB.MSSQL) {
statement
@@ -1266,15 +1259,17 @@ public class SQLContainerTest {
.getValue()
+ "', '"
+ item.getItemProperty("AGE")
- .getValue() + "')");
+ .getValue()
+ + "')");
} else {
- statement
- .executeUpdate("insert into people values(default, '"
+ statement.executeUpdate(
+ "insert into people values(default, '"
+ item.getItemProperty("NAME")
.getValue()
+ "', '"
+ item.getItemProperty("AGE")
- .getValue() + "')");
+ .getValue()
+ + "')");
}
statement.close();
conn.commit();
@@ -1295,8 +1290,7 @@ public class SQLContainerTest {
int end = offset + limit + 1;
String q = "SELECT * FROM (SELECT row_number() OVER"
+ " ( ORDER BY \"ID\" ASC) AS rownum, * FROM people)"
- + " AS a WHERE a.rownum BETWEEN "
- + start
+ + " AS a WHERE a.rownum BETWEEN " + start
+ " AND " + end;
return q;
} else if (SQLTestsConstants.db == DB.ORACLE) {
@@ -1304,9 +1298,7 @@ public class SQLContainerTest {
int end = offset + limit + 1;
String q = "SELECT * FROM (SELECT x.*, ROWNUM AS r FROM"
+ " (SELECT * FROM people ORDER BY \"ID\" ASC) x) "
- + " WHERE r BETWEEN "
- + start
- + " AND "
+ + " WHERE r BETWEEN " + start + " AND "
+ end;
return q;
} else {
@@ -1357,19 +1349,18 @@ public class SQLContainerTest {
throws SQLException {
FreeformQueryDelegate delegate = EasyMock
.createMock(FreeformQueryDelegate.class);
- EasyMock.expect(
- delegate.removeRow(EasyMock.isA(Connection.class),
- EasyMock.isA(RowItem.class)))
- .andAnswer(new IAnswer<Boolean>() {
+ EasyMock.expect(delegate.removeRow(EasyMock.isA(Connection.class),
+ EasyMock.isA(RowItem.class))).andAnswer(new IAnswer<Boolean>() {
@Override
public Boolean answer() throws Throwable {
Connection conn = (Connection) EasyMock
.getCurrentArguments()[0];
- RowItem item = (RowItem) EasyMock.getCurrentArguments()[1];
+ RowItem item = (RowItem) EasyMock
+ .getCurrentArguments()[1];
Statement statement = conn.createStatement();
- statement
- .executeUpdate("DELETE FROM people WHERE \"ID\"="
- + item.getItemProperty("ID").getValue());
+ statement.executeUpdate(
+ "DELETE FROM people WHERE \"ID\"=" + item
+ .getItemProperty("ID").getValue());
statement.close();
return true;
}
@@ -1387,8 +1378,7 @@ public class SQLContainerTest {
int end = offset + limit + 1;
String q = "SELECT * FROM (SELECT row_number() OVER"
+ " ( ORDER BY \"ID\" ASC) AS rownum, * FROM people)"
- + " AS a WHERE a.rownum BETWEEN "
- + start
+ + " AS a WHERE a.rownum BETWEEN " + start
+ " AND " + end;
return q;
} else if (SQLTestsConstants.db == DB.ORACLE) {
@@ -1396,9 +1386,7 @@ public class SQLContainerTest {
int end = offset + limit + 1;
String q = "SELECT * FROM (SELECT x.*, ROWNUM AS r FROM"
+ " (SELECT * FROM people ORDER BY \"ID\" ASC) x) "
- + " WHERE r BETWEEN "
- + start
- + " AND "
+ + " WHERE r BETWEEN " + start + " AND "
+ end;
return q;
} else {
@@ -1436,15 +1424,14 @@ public class SQLContainerTest {
throws SQLException {
FreeformQueryDelegate delegate = EasyMock
.createMock(FreeformQueryDelegate.class);
- EasyMock.expect(
- delegate.storeRow(EasyMock.isA(Connection.class),
- EasyMock.isA(RowItem.class)))
- .andAnswer(new IAnswer<Integer>() {
+ EasyMock.expect(delegate.storeRow(EasyMock.isA(Connection.class),
+ EasyMock.isA(RowItem.class))).andAnswer(new IAnswer<Integer>() {
@Override
public Integer answer() throws Throwable {
Connection conn = (Connection) EasyMock
.getCurrentArguments()[0];
- RowItem item = (RowItem) EasyMock.getCurrentArguments()[1];
+ RowItem item = (RowItem) EasyMock
+ .getCurrentArguments()[1];
Statement statement = conn.createStatement();
statement.executeUpdate("UPDATE people SET \"NAME\"='"
+ item.getItemProperty("NAME").getValue()
@@ -1469,8 +1456,7 @@ public class SQLContainerTest {
int end = offset + limit + 1;
String q = "SELECT * FROM (SELECT row_number() OVER"
+ " ( ORDER BY \"ID\" ASC) AS rownum, * FROM people)"
- + " AS a WHERE a.rownum BETWEEN "
- + start
+ + " AS a WHERE a.rownum BETWEEN " + start
+ " AND " + end;
return q;
} else if (SQLTestsConstants.db == DB.ORACLE) {
@@ -1478,9 +1464,7 @@ public class SQLContainerTest {
int end = offset + limit + 1;
String q = "SELECT * FROM (SELECT x.*, ROWNUM AS r FROM"
+ " (SELECT * FROM people ORDER BY \"ID\" ASC) x) "
- + " WHERE r BETWEEN "
- + start
- + " AND "
+ + " WHERE r BETWEEN " + start + " AND "
+ end;
return q;
} else {
@@ -1525,8 +1509,9 @@ public class SQLContainerTest {
Assert.assertEquals(size + 1, container.size());
container.rollback();
Assert.assertEquals(size, container.size());
- Assert.assertFalse("foo".equals(container.getContainerProperty(
- container.lastItemId(), "NAME").getValue()));
+ Assert.assertFalse("foo".equals(
+ container.getContainerProperty(container.lastItemId(), "NAME")
+ .getValue()));
}
@Test
@@ -1551,8 +1536,9 @@ public class SQLContainerTest {
Object last = container.lastItemId();
container.getContainerProperty(last, "NAME").setValue("foo");
container.rollback();
- Assert.assertFalse("foo".equals(container.getContainerProperty(
- container.lastItemId(), "NAME").getValue()));
+ Assert.assertFalse("foo".equals(
+ container.getContainerProperty(container.lastItemId(), "NAME")
+ .getValue()));
}
@Test
@@ -1694,12 +1680,14 @@ public class SQLContainerTest {
if (orderBys == null || orderBys.isEmpty()) {
List<OrderBy> ob = new ArrayList<OrderBy>();
ob.add(new OrderBy("ID", true));
- return gen.generateSelectQuery("people", null,
- ob, offset, limit, null)
+ return gen
+ .generateSelectQuery("people", null, ob,
+ offset, limit, null)
.getQueryString();
} else {
- return gen.generateSelectQuery("people", null,
- orderBys, offset, limit, null)
+ return gen
+ .generateSelectQuery("people", null,
+ orderBys, offset, limit, null)
.getQueryString();
}
} else if (SQLTestsConstants.db == DB.ORACLE) {
@@ -1707,12 +1695,14 @@ public class SQLContainerTest {
if (orderBys == null || orderBys.isEmpty()) {
List<OrderBy> ob = new ArrayList<OrderBy>();
ob.add(new OrderBy("ID", true));
- return gen.generateSelectQuery("people", null,
- ob, offset, limit, null)
+ return gen
+ .generateSelectQuery("people", null, ob,
+ offset, limit, null)
.getQueryString();
} else {
- return gen.generateSelectQuery("people", null,
- orderBys, offset, limit, null)
+ return gen
+ .generateSelectQuery("people", null,
+ orderBys, offset, limit, null)
.getQueryString();
}
} else {
@@ -1721,8 +1711,8 @@ public class SQLContainerTest {
if (!orderBys.isEmpty()) {
query.append(" ORDER BY ");
for (OrderBy orderBy : orderBys) {
- query.append("\"" + orderBy.getColumn()
- + "\"");
+ query.append(
+ "\"" + orderBy.getColumn() + "\"");
if (orderBy.isAscending()) {
query.append(" ASC");
} else {
@@ -1808,12 +1798,14 @@ public class SQLContainerTest {
if (orderBys == null || orderBys.isEmpty()) {
List<OrderBy> ob = new ArrayList<OrderBy>();
ob.add(new OrderBy("ID", true));
- return gen.generateSelectQuery("people", null,
- ob, offset, limit, null)
+ return gen
+ .generateSelectQuery("people", null, ob,
+ offset, limit, null)
.getQueryString();
} else {
- return gen.generateSelectQuery("people", null,
- orderBys, offset, limit, null)
+ return gen
+ .generateSelectQuery("people", null,
+ orderBys, offset, limit, null)
.getQueryString();
}
} else if (SQLTestsConstants.db == DB.ORACLE) {
@@ -1821,12 +1813,14 @@ public class SQLContainerTest {
if (orderBys == null || orderBys.isEmpty()) {
List<OrderBy> ob = new ArrayList<OrderBy>();
ob.add(new OrderBy("ID", true));
- return gen.generateSelectQuery("people", null,
- ob, offset, limit, null)
+ return gen
+ .generateSelectQuery("people", null, ob,
+ offset, limit, null)
.getQueryString();
} else {
- return gen.generateSelectQuery("people", null,
- orderBys, offset, limit, null)
+ return gen
+ .generateSelectQuery("people", null,
+ orderBys, offset, limit, null)
.getQueryString();
}
} else {
@@ -1835,8 +1829,8 @@ public class SQLContainerTest {
if (!orderBys.isEmpty()) {
query.append(" ORDER BY ");
for (OrderBy orderBy : orderBys) {
- query.append("\"" + orderBy.getColumn()
- + "\"");
+ query.append(
+ "\"" + orderBy.getColumn() + "\"");
if (orderBy.isAscending()) {
query.append(" ASC");
} else {
@@ -1902,9 +1896,8 @@ public class SQLContainerTest {
return null;
}
}).anyTimes();
- EasyMock.expect(
- delegate.getQueryStatement(EasyMock.anyInt(), EasyMock.anyInt()))
- .andAnswer(new IAnswer<StatementHelper>() {
+ EasyMock.expect(delegate.getQueryStatement(EasyMock.anyInt(),
+ EasyMock.anyInt())).andAnswer(new IAnswer<StatementHelper>() {
@Override
public StatementHelper answer() throws Throwable {
Object[] args = EasyMock.getCurrentArguments();
@@ -1922,8 +1915,8 @@ public class SQLContainerTest {
StringBuffer query = new StringBuffer(
"SELECT COUNT(*) FROM people");
if (!filters.isEmpty()) {
- query.append(QueryBuilder.getWhereStringForFilters(
- filters, sh));
+ query.append(QueryBuilder
+ .getWhereStringForFilters(filters, sh));
}
sh.setQueryString(query.toString());
return sh;
@@ -1974,9 +1967,8 @@ public class SQLContainerTest {
return null;
}
}).anyTimes();
- EasyMock.expect(
- delegate.getQueryStatement(EasyMock.anyInt(), EasyMock.anyInt()))
- .andAnswer(new IAnswer<StatementHelper>() {
+ EasyMock.expect(delegate.getQueryStatement(EasyMock.anyInt(),
+ EasyMock.anyInt())).andAnswer(new IAnswer<StatementHelper>() {
@Override
public StatementHelper answer() throws Throwable {
Object[] args = EasyMock.getCurrentArguments();
@@ -1994,8 +1986,8 @@ public class SQLContainerTest {
StringBuffer query = new StringBuffer(
"SELECT COUNT(*) FROM people");
if (!filters.isEmpty()) {
- query.append(QueryBuilder.getWhereStringForFilters(
- filters, sh));
+ query.append(QueryBuilder
+ .getWhereStringForFilters(filters, sh));
}
sh.setQueryString(query.toString());
return sh;
@@ -2045,9 +2037,8 @@ public class SQLContainerTest {
return null;
}
}).anyTimes();
- EasyMock.expect(
- delegate.getQueryStatement(EasyMock.anyInt(), EasyMock.anyInt()))
- .andAnswer(new IAnswer<StatementHelper>() {
+ EasyMock.expect(delegate.getQueryStatement(EasyMock.anyInt(),
+ EasyMock.anyInt())).andAnswer(new IAnswer<StatementHelper>() {
@Override
public StatementHelper answer() throws Throwable {
Object[] args = EasyMock.getCurrentArguments();
@@ -2065,8 +2056,8 @@ public class SQLContainerTest {
StringBuffer query = new StringBuffer(
"SELECT COUNT(*) FROM people");
if (!filters.isEmpty()) {
- query.append(QueryBuilder.getWhereStringForFilters(
- filters, sh));
+ query.append(QueryBuilder
+ .getWhereStringForFilters(filters, sh));
}
sh.setQueryString(query.toString());
return sh;
@@ -2117,9 +2108,8 @@ public class SQLContainerTest {
return null;
}
}).anyTimes();
- EasyMock.expect(
- delegate.getQueryStatement(EasyMock.anyInt(), EasyMock.anyInt()))
- .andAnswer(new IAnswer<StatementHelper>() {
+ EasyMock.expect(delegate.getQueryStatement(EasyMock.anyInt(),
+ EasyMock.anyInt())).andAnswer(new IAnswer<StatementHelper>() {
@Override
public StatementHelper answer() throws Throwable {
Object[] args = EasyMock.getCurrentArguments();
@@ -2137,8 +2127,8 @@ public class SQLContainerTest {
StringBuffer query = new StringBuffer(
"SELECT COUNT(*) FROM people");
if (!filters.isEmpty()) {
- query.append(QueryBuilder.getWhereStringForFilters(
- filters, sh));
+ query.append(QueryBuilder
+ .getWhereStringForFilters(filters, sh));
}
sh.setQueryString(query.toString());
return sh;
@@ -2195,9 +2185,8 @@ public class SQLContainerTest {
return null;
}
}).anyTimes();
- EasyMock.expect(
- delegate.getQueryStatement(EasyMock.anyInt(), EasyMock.anyInt()))
- .andAnswer(new IAnswer<StatementHelper>() {
+ EasyMock.expect(delegate.getQueryStatement(EasyMock.anyInt(),
+ EasyMock.anyInt())).andAnswer(new IAnswer<StatementHelper>() {
@Override
public StatementHelper answer() throws Throwable {
Object[] args = EasyMock.getCurrentArguments();
@@ -2215,8 +2204,8 @@ public class SQLContainerTest {
StringBuffer query = new StringBuffer(
"SELECT COUNT(*) FROM people");
if (!filters.isEmpty()) {
- query.append(QueryBuilder.getWhereStringForFilters(
- filters, sh));
+ query.append(QueryBuilder
+ .getWhereStringForFilters(filters, sh));
}
sh.setQueryString(query.toString());
return sh;
@@ -2273,9 +2262,8 @@ public class SQLContainerTest {
return null;
}
}).anyTimes();
- EasyMock.expect(
- delegate.getQueryStatement(EasyMock.anyInt(), EasyMock.anyInt()))
- .andAnswer(new IAnswer<StatementHelper>() {
+ EasyMock.expect(delegate.getQueryStatement(EasyMock.anyInt(),
+ EasyMock.anyInt())).andAnswer(new IAnswer<StatementHelper>() {
@Override
public StatementHelper answer() throws Throwable {
Object[] args = EasyMock.getCurrentArguments();
@@ -2293,8 +2281,8 @@ public class SQLContainerTest {
StringBuffer query = new StringBuffer(
"SELECT COUNT(*) FROM people");
if (!filters.isEmpty()) {
- query.append(QueryBuilder.getWhereStringForFilters(
- filters, sh));
+ query.append(QueryBuilder
+ .getWhereStringForFilters(filters, sh));
}
sh.setQueryString(query.toString());
return sh;
@@ -2319,26 +2307,27 @@ public class SQLContainerTest {
// Ville, Kalle, Pelle, Palle
Assert.assertEquals(4, container.size());
- Assert.assertEquals(
- "Ville",
- container.getContainerProperty(container.getIdByIndex(0),
- "NAME").getValue());
- Assert.assertEquals(
- "Kalle",
- container.getContainerProperty(container.getIdByIndex(1),
- "NAME").getValue());
- Assert.assertEquals(
- "Pelle",
- container.getContainerProperty(container.getIdByIndex(2),
- "NAME").getValue());
- Assert.assertEquals(
- "Palle",
- container.getContainerProperty(container.getIdByIndex(3),
- "NAME").getValue());
+ Assert.assertEquals("Ville",
+ container
+ .getContainerProperty(container.getIdByIndex(0), "NAME")
+ .getValue());
+ Assert.assertEquals("Kalle",
+ container
+ .getContainerProperty(container.getIdByIndex(1), "NAME")
+ .getValue());
+ Assert.assertEquals("Pelle",
+ container
+ .getContainerProperty(container.getIdByIndex(2), "NAME")
+ .getValue());
+ Assert.assertEquals("Palle",
+ container
+ .getContainerProperty(container.getIdByIndex(3), "NAME")
+ .getValue());
try {
container.getIdByIndex(4);
- Assert.fail("SQLContainer.getIdByIndex() returned a value for an index beyond the end of the container");
+ Assert.fail(
+ "SQLContainer.getIdByIndex() returned a value for an index beyond the end of the container");
} catch (IndexOutOfBoundsException e) {
// should throw exception - item is filtered out
}
@@ -2395,12 +2384,14 @@ public class SQLContainerTest {
if (orderBys == null || orderBys.isEmpty()) {
List<OrderBy> ob = new ArrayList<OrderBy>();
ob.add(new OrderBy("ID", true));
- return gen.generateSelectQuery("people", null,
- ob, offset, limit, null)
+ return gen
+ .generateSelectQuery("people", null, ob,
+ offset, limit, null)
.getQueryString();
} else {
- return gen.generateSelectQuery("people", null,
- orderBys, offset, limit, null)
+ return gen
+ .generateSelectQuery("people", null,
+ orderBys, offset, limit, null)
.getQueryString();
}
} else if (SQLTestsConstants.db == DB.ORACLE) {
@@ -2408,12 +2399,14 @@ public class SQLContainerTest {
if (orderBys == null || orderBys.isEmpty()) {
List<OrderBy> ob = new ArrayList<OrderBy>();
ob.add(new OrderBy("ID", true));
- return gen.generateSelectQuery("people", null,
- ob, offset, limit, null)
+ return gen
+ .generateSelectQuery("people", null, ob,
+ offset, limit, null)
.getQueryString();
} else {
- return gen.generateSelectQuery("people", null,
- orderBys, offset, limit, null)
+ return gen
+ .generateSelectQuery("people", null,
+ orderBys, offset, limit, null)
.getQueryString();
}
} else {
@@ -2422,8 +2415,8 @@ public class SQLContainerTest {
if (!orderBys.isEmpty()) {
query.append(" ORDER BY ");
for (OrderBy orderBy : orderBys) {
- query.append("\"" + orderBy.getColumn()
- + "\"");
+ query.append(
+ "\"" + orderBy.getColumn() + "\"");
if (orderBy.isAscending()) {
query.append(" ASC");
} else {
@@ -2462,8 +2455,7 @@ public class SQLContainerTest {
Assert.assertEquals("Börje",
container.getContainerProperty(container.firstItemId(), "NAME")
.getValue());
- Assert.assertEquals(
- "Wilbert",
+ Assert.assertEquals("Wilbert",
container.getContainerProperty(
container.getIdByIndex(container.size() - 2), "NAME")
.getValue());
diff --git a/server/src/test/java/com/vaadin/data/util/sqlcontainer/SQLTestsConstants.java b/server/src/test/java/com/vaadin/data/util/sqlcontainer/SQLTestsConstants.java
index e03e970048..ce0c8f1286 100755
--- a/server/src/test/java/com/vaadin/data/util/sqlcontainer/SQLTestsConstants.java
+++ b/server/src/test/java/com/vaadin/data/util/sqlcontainer/SQLTestsConstants.java
@@ -101,8 +101,7 @@ public class SQLTestsConstants {
versionStatements = new String[] {
"create table VERSIONED (\"ID\" serial primary key, \"TEXT\" VARCHAR(255), \"VERSION\" INTEGER DEFAULT 0)",
"CREATE OR REPLACE FUNCTION zz_row_version() RETURNS TRIGGER AS $$"
- + "BEGIN"
- + " IF TG_OP = 'UPDATE'"
+ + "BEGIN" + " IF TG_OP = 'UPDATE'"
+ " AND NEW.\"VERSION\" = old.\"VERSION\""
+ " AND ROW(NEW.*) IS DISTINCT FROM ROW (old.*)"
+ " THEN"
@@ -125,7 +124,8 @@ public class SQLTestsConstants {
dbPwd = "sa";
peopleFirst = "create table PEOPLE (\"ID\" int identity(1,1) primary key, \"NAME\" VARCHAR(32), \"AGE\" INTEGER)";
peopleSecond = null;
- versionStatements = new String[] { "create table VERSIONED (\"ID\" int identity(1,1) primary key, \"TEXT\" VARCHAR(255), \"VERSION\" rowversion not null)" };
+ versionStatements = new String[] {
+ "create table VERSIONED (\"ID\" int identity(1,1) primary key, \"TEXT\" VARCHAR(255), \"VERSION\" rowversion not null)" };
sqlGen = new MSSQLGenerator();
break;
case ORACLE:
diff --git a/server/src/test/java/com/vaadin/data/util/sqlcontainer/TicketTest.java b/server/src/test/java/com/vaadin/data/util/sqlcontainer/TicketTest.java
index 2030096e82..1a19eda542 100644
--- a/server/src/test/java/com/vaadin/data/util/sqlcontainer/TicketTest.java
+++ b/server/src/test/java/com/vaadin/data/util/sqlcontainer/TicketTest.java
@@ -74,9 +74,8 @@ public class TicketTest {
return null;
}
}).anyTimes();
- EasyMock.expect(
- delegate.getQueryStatement(EasyMock.anyInt(), EasyMock.anyInt()))
- .andAnswer(new IAnswer<StatementHelper>() {
+ EasyMock.expect(delegate.getQueryStatement(EasyMock.anyInt(),
+ EasyMock.anyInt())).andAnswer(new IAnswer<StatementHelper>() {
@Override
public StatementHelper answer() throws Throwable {
Object[] args = EasyMock.getCurrentArguments();
@@ -94,8 +93,8 @@ public class TicketTest {
StringBuffer query = new StringBuffer(
"SELECT COUNT(*) FROM people");
if (!filters.isEmpty()) {
- query.append(QueryBuilder.getWhereStringForFilters(
- filters, sh));
+ query.append(QueryBuilder
+ .getWhereStringForFilters(filters, sh));
}
sh.setQueryString(query.toString());
return sh;
@@ -122,10 +121,9 @@ public class TicketTest {
.getContainerProperty(container.firstItemId(), "AGE")
.getValue());
} else {
- Assert.assertEquals(
- 18,
- container.getContainerProperty(container.firstItemId(),
- "AGE").getValue());
+ Assert.assertEquals(18, container
+ .getContainerProperty(container.firstItemId(), "AGE")
+ .getValue());
}
EasyMock.verify(delegate);
@@ -151,10 +149,9 @@ public class TicketTest {
.getContainerProperty(container.firstItemId(), "AGE")
.getValue());
} else {
- Assert.assertEquals(
- 18,
- container.getContainerProperty(container.firstItemId(),
- "AGE").getValue());
+ Assert.assertEquals(18, container
+ .getContainerProperty(container.firstItemId(), "AGE")
+ .getValue());
}
}
@@ -170,8 +167,8 @@ public class TicketTest {
// set a different name
item.getItemProperty("NAME").setValue("otherName");
- Assert.assertEquals("otherName", item.getItemProperty("NAME")
- .getValue());
+ Assert.assertEquals("otherName",
+ item.getItemProperty("NAME").getValue());
// access the item and reset the name to its old value
Item item2 = container.getItem(id);
diff --git a/server/src/test/java/com/vaadin/data/util/sqlcontainer/connection/SimpleJDBCConnectionPoolTest.java b/server/src/test/java/com/vaadin/data/util/sqlcontainer/connection/SimpleJDBCConnectionPoolTest.java
index b786f5b2de..5a6ae78aeb 100644
--- a/server/src/test/java/com/vaadin/data/util/sqlcontainer/connection/SimpleJDBCConnectionPoolTest.java
+++ b/server/src/test/java/com/vaadin/data/util/sqlcontainer/connection/SimpleJDBCConnectionPoolTest.java
@@ -44,12 +44,13 @@ public class SimpleJDBCConnectionPoolTest {
connectionPool.reserveConnection();
} catch (SQLException e) {
e.printStackTrace();
- Assert.fail("Exception before all connections used! "
- + e.getMessage());
+ Assert.fail(
+ "Exception before all connections used! " + e.getMessage());
}
connectionPool.reserveConnection();
- Assert.fail("Reserving connection didn't fail even though no connections are available!");
+ Assert.fail(
+ "Reserving connection didn't fail even though no connections are available!");
}
@Test
@@ -59,8 +60,8 @@ public class SimpleJDBCConnectionPoolTest {
connectionPool.reserveConnection();
} catch (SQLException e) {
e.printStackTrace();
- Assert.fail("Exception before all connections used! "
- + e.getMessage());
+ Assert.fail(
+ "Exception before all connections used! " + e.getMessage());
}
Connection conn = connectionPool.reserveConnection();
@@ -76,8 +77,8 @@ public class SimpleJDBCConnectionPoolTest {
conn2 = connectionPool.reserveConnection();
} catch (SQLException e) {
e.printStackTrace();
- Assert.fail("Exception before all connections used! "
- + e.getMessage());
+ Assert.fail(
+ "Exception before all connections used! " + e.getMessage());
}
connectionPool.releaseConnection(conn2);
@@ -101,7 +102,8 @@ public class SimpleJDBCConnectionPoolTest {
public void construct_onlyDriverNameAndUrlGiven_shouldFail()
throws SQLException {
SimpleJDBCConnectionPool cp = new SimpleJDBCConnectionPool(
- SQLTestsConstants.dbDriver, SQLTestsConstants.dbURL, null, null);
+ SQLTestsConstants.dbDriver, SQLTestsConstants.dbURL, null,
+ null);
}
@Test(expected = IllegalArgumentException.class)
diff --git a/server/src/test/java/com/vaadin/data/util/sqlcontainer/filters/BetweenTest.java b/server/src/test/java/com/vaadin/data/util/sqlcontainer/filters/BetweenTest.java
index 6daf730e25..41db88b881 100644
--- a/server/src/test/java/com/vaadin/data/util/sqlcontainer/filters/BetweenTest.java
+++ b/server/src/test/java/com/vaadin/data/util/sqlcontainer/filters/BetweenTest.java
@@ -144,32 +144,32 @@ public class BetweenTest {
public void passesFilter_nullValue_filterIsPassed() {
String id = "id";
Between between = new Between(id, null, null);
- Assert.assertTrue(between.passesFilter(id,
- itemWithPropertyValue(id, null)));
+ Assert.assertTrue(
+ between.passesFilter(id, itemWithPropertyValue(id, null)));
}
@Test
public void passesFilter_nullStartValue_filterIsPassed() {
String id = "id";
Between between = new Between(id, null, 2);
- Assert.assertTrue(between
- .passesFilter(id, itemWithPropertyValue(id, 1)));
+ Assert.assertTrue(
+ between.passesFilter(id, itemWithPropertyValue(id, 1)));
}
@Test
public void passesFilter_nullEndValue_filterIsPassed() {
String id = "id";
Between between = new Between(id, 0, null);
- Assert.assertTrue(between
- .passesFilter(id, itemWithPropertyValue(id, 1)));
+ Assert.assertTrue(
+ between.passesFilter(id, itemWithPropertyValue(id, 1)));
}
@Test
public void passesFilter_nullStartValueAndEndValue_filterIsPassed() {
String id = "id";
Between between = new Between(id, null, null);
- Assert.assertTrue(between
- .passesFilter(id, itemWithPropertyValue(id, 1)));
+ Assert.assertTrue(
+ between.passesFilter(id, itemWithPropertyValue(id, 1)));
}
@Test
diff --git a/server/src/test/java/com/vaadin/data/util/sqlcontainer/filters/CompareTest.java b/server/src/test/java/com/vaadin/data/util/sqlcontainer/filters/CompareTest.java
index 252acd81fc..fcde69655b 100644
--- a/server/src/test/java/com/vaadin/data/util/sqlcontainer/filters/CompareTest.java
+++ b/server/src/test/java/com/vaadin/data/util/sqlcontainer/filters/CompareTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/data/util/sqlcontainer/generator/SQLGeneratorsTest.java b/server/src/test/java/com/vaadin/data/util/sqlcontainer/generator/SQLGeneratorsTest.java
index c2dbf0f12a..dd1db30b72 100644
--- a/server/src/test/java/com/vaadin/data/util/sqlcontainer/generator/SQLGeneratorsTest.java
+++ b/server/src/test/java/com/vaadin/data/util/sqlcontainer/generator/SQLGeneratorsTest.java
@@ -112,12 +112,9 @@ public class SQLGeneratorsTest {
SQLTestsConstants.sqlGen);
SQLContainer container = new SQLContainer(query);
- StatementHelper sh = sg.generateDeleteQuery(
- "people",
- query.getPrimaryKeyColumns(),
- null,
- (RowItem) container.getItem(container.getItemIds().iterator()
- .next()));
+ StatementHelper sh = sg.generateDeleteQuery("people",
+ query.getPrimaryKeyColumns(), null, (RowItem) container
+ .getItem(container.getItemIds().iterator().next()));
Assert.assertEquals("DELETE FROM people WHERE \"ID\" = ?",
sh.getQueryString());
}
@@ -137,15 +134,16 @@ public class SQLGeneratorsTest {
TableQuery query = new TableQuery("people", connectionPool);
SQLContainer container = new SQLContainer(query);
- RowItem ri = (RowItem) container.getItem(container.getItemIds()
- .iterator().next());
+ RowItem ri = (RowItem) container
+ .getItem(container.getItemIds().iterator().next());
ri.getItemProperty("NAME").setValue("Viljami");
StatementHelper sh = sg.generateUpdateQuery("people", ri);
- Assert.assertTrue("UPDATE people SET \"NAME\" = ?, \"AGE\" = ? WHERE \"ID\" = ?"
- .equals(sh.getQueryString())
- || "UPDATE people SET \"AGE\" = ?, \"NAME\" = ? WHERE \"ID\" = ?"
- .equals(sh.getQueryString()));
+ Assert.assertTrue(
+ "UPDATE people SET \"NAME\" = ?, \"AGE\" = ? WHERE \"ID\" = ?"
+ .equals(sh.getQueryString())
+ || "UPDATE people SET \"AGE\" = ?, \"NAME\" = ? WHERE \"ID\" = ?"
+ .equals(sh.getQueryString()));
}
@Test
@@ -215,8 +213,7 @@ public class SQLGeneratorsTest {
List<OrderBy> ob = Arrays.asList(new OrderBy("name", true));
StatementHelper sh = sg.generateSelectQuery("TABLE", f, ob, 4, 8,
"NAME, ID");
- Assert.assertEquals(
- sh.getQueryString(),
+ Assert.assertEquals(sh.getQueryString(),
"SELECT * FROM (SELECT x.*, ROWNUM AS \"rownum\" FROM"
+ " (SELECT NAME, ID FROM TABLE WHERE (\"name\" LIKE ?"
+ " OR \"name\" LIKE ?) "
diff --git a/server/src/test/java/com/vaadin/data/util/sqlcontainer/generator/StatementHelperTest.java b/server/src/test/java/com/vaadin/data/util/sqlcontainer/generator/StatementHelperTest.java
index b89b7e747d..48a2d29639 100644
--- a/server/src/test/java/com/vaadin/data/util/sqlcontainer/generator/StatementHelperTest.java
+++ b/server/src/test/java/com/vaadin/data/util/sqlcontainer/generator/StatementHelperTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import org.junit.Test;
import com.vaadin.data.util.sqlcontainer.query.generator.StatementHelper;
/**
- *
+ *
* @author Vaadin Ltd
*/
public class StatementHelperTest {
@@ -44,8 +44,8 @@ public class StatementHelperTest {
// Exception should contain info about which parameter and the type
// which was unsupported
Assert.assertTrue(e.getMessage().contains("parameter 0"));
- Assert.assertTrue(e.getMessage().contains(
- StatementHelper.class.getName()));
+ Assert.assertTrue(
+ e.getMessage().contains(StatementHelper.class.getName()));
}
}
diff --git a/server/src/test/java/com/vaadin/data/util/sqlcontainer/query/FreeformQueryTest.java b/server/src/test/java/com/vaadin/data/util/sqlcontainer/query/FreeformQueryTest.java
index bbf083c158..1b9e14b0d8 100644
--- a/server/src/test/java/com/vaadin/data/util/sqlcontainer/query/FreeformQueryTest.java
+++ b/server/src/test/java/com/vaadin/data/util/sqlcontainer/query/FreeformQueryTest.java
@@ -56,8 +56,8 @@ public class FreeformQueryTest {
public void construction_legalParameters_shouldSucceed() {
FreeformQuery ffQuery = new FreeformQuery("SELECT * FROM foo",
Arrays.asList("ID"), connectionPool);
- Assert.assertArrayEquals(new Object[] { "ID" }, ffQuery
- .getPrimaryKeyColumns().toArray());
+ Assert.assertArrayEquals(new Object[] { "ID" },
+ ffQuery.getPrimaryKeyColumns().toArray());
Assert.assertEquals("SELECT * FROM foo", ffQuery.getQueryString());
}
@@ -118,10 +118,10 @@ public class FreeformQueryTest {
statement.executeUpdate("insert into people values('Bengt', 30)");
statement.executeUpdate("insert into people values('Ingvar', 50)");
} else {
- statement
- .executeUpdate("insert into people values(default, 'Bengt', 30)");
- statement
- .executeUpdate("insert into people values(default, 'Ingvar', 50)");
+ statement.executeUpdate(
+ "insert into people values(default, 'Bengt', 30)");
+ statement.executeUpdate(
+ "insert into people values(default, 'Ingvar', 50)");
}
statement.close();
conn.commit();
@@ -177,8 +177,8 @@ public class FreeformQueryTest {
Arrays.asList("ID"), connectionPool);
FreeformQueryDelegate delegate = EasyMock
.createMock(FreeformQueryDelegate.class);
- EasyMock.expect(delegate.getCountQuery()).andReturn(
- "SELECT COUNT(*) FROM GARBAGE");
+ EasyMock.expect(delegate.getCountQuery())
+ .andReturn("SELECT COUNT(*) FROM GARBAGE");
EasyMock.replay(delegate);
query.setDelegate(delegate);
Assert.assertEquals(0, query.getCount());
@@ -186,7 +186,8 @@ public class FreeformQueryTest {
}
@Test
- public void getResults_simpleQuery_returnsFourRecords() throws SQLException {
+ public void getResults_simpleQuery_returnsFourRecords()
+ throws SQLException {
FreeformQuery query = new FreeformQuery(
"SELECT \"ID\",\"NAME\" FROM people", Arrays.asList("ID"),
connectionPool);
@@ -275,8 +276,8 @@ public class FreeformQueryTest {
throws SQLException {
FreeformQuery query = new FreeformQuery("SELECT * FROM people",
Arrays.asList("ID"), connectionPool);
- query.storeRow(new RowItem(new SQLContainer(query), new RowId(
- new Object[] { 1 }), null));
+ query.storeRow(new RowItem(new SQLContainer(query),
+ new RowId(new Object[] { 1 }), null));
}
@Test
@@ -287,8 +288,8 @@ public class FreeformQueryTest {
EasyMock.replay(container);
query.beginTransaction();
try {
- query.storeRow(new RowItem(container,
- new RowId(new Object[] { 1 }), null));
+ query.storeRow(new RowItem(container, new RowId(new Object[] { 1 }),
+ null));
Assert.fail("storeRow should fail when there is no delegate");
} catch (UnsupportedOperationException e) {
// Cleanup to make test connection pool happy
@@ -416,25 +417,24 @@ public class FreeformQueryTest {
}
@Test
- public void getResults_hasDelegate_shouldCallDelegate() throws SQLException {
+ public void getResults_hasDelegate_shouldCallDelegate()
+ throws SQLException {
FreeformQuery query = new FreeformQuery("SELECT * FROM people",
Arrays.asList("ID"), connectionPool);
FreeformQueryDelegate delegate = EasyMock
.createMock(FreeformQueryDelegate.class);
if (SQLTestsConstants.db == DB.MSSQL) {
EasyMock.expect(delegate.getQueryString(0, 2))
- .andReturn(
- "SELECT * FROM (SELECT row_number()"
- + "OVER (ORDER BY id ASC) AS rownum, * FROM people)"
- + " AS a WHERE a.rownum BETWEEN 0 AND 2");
+ .andReturn("SELECT * FROM (SELECT row_number()"
+ + "OVER (ORDER BY id ASC) AS rownum, * FROM people)"
+ + " AS a WHERE a.rownum BETWEEN 0 AND 2");
} else if (SQLTestsConstants.db == DB.ORACLE) {
EasyMock.expect(delegate.getQueryString(0, 2))
- .andReturn(
- "SELECT * FROM (SELECT x.*, ROWNUM AS r FROM"
- + " (SELECT * FROM people) x) WHERE r BETWEEN 1 AND 2");
+ .andReturn("SELECT * FROM (SELECT x.*, ROWNUM AS r FROM"
+ + " (SELECT * FROM people) x) WHERE r BETWEEN 1 AND 2");
} else {
- EasyMock.expect(delegate.getQueryString(0, 2)).andReturn(
- "SELECT * FROM people LIMIT 2 OFFSET 0");
+ EasyMock.expect(delegate.getQueryString(0, 2))
+ .andReturn("SELECT * FROM people LIMIT 2 OFFSET 0");
}
EasyMock.replay(delegate);
@@ -454,18 +454,16 @@ public class FreeformQueryTest {
.createMock(FreeformQueryDelegate.class);
if (SQLTestsConstants.db == DB.MSSQL) {
EasyMock.expect(delegate.getQueryString(0, 2))
- .andReturn(
- "SELECT * FROM (SELECT row_number()"
- + "OVER (ORDER BY id ASC) AS rownum, * FROM people)"
- + " AS a WHERE a.rownum BETWEEN 0 AND 2");
+ .andReturn("SELECT * FROM (SELECT row_number()"
+ + "OVER (ORDER BY id ASC) AS rownum, * FROM people)"
+ + " AS a WHERE a.rownum BETWEEN 0 AND 2");
} else if (SQLTestsConstants.db == DB.ORACLE) {
EasyMock.expect(delegate.getQueryString(0, 2))
- .andReturn(
- "SELECT * FROM (SELECT x.*, ROWNUM AS r FROM"
- + " (SELECT * FROM people) x) WHERE r BETWEEN 1 AND 2");
+ .andReturn("SELECT * FROM (SELECT x.*, ROWNUM AS r FROM"
+ + " (SELECT * FROM people) x) WHERE r BETWEEN 1 AND 2");
} else {
- EasyMock.expect(delegate.getQueryString(0, 2)).andReturn(
- "SELECT * FROM people LIMIT 2 OFFSET 0");
+ EasyMock.expect(delegate.getQueryString(0, 2))
+ .andReturn("SELECT * FROM people LIMIT 2 OFFSET 0");
}
EasyMock.replay(delegate);
query.setDelegate(delegate);
@@ -500,18 +498,16 @@ public class FreeformQueryTest {
.createMock(FreeformQueryDelegate.class);
if (SQLTestsConstants.db == DB.MSSQL) {
EasyMock.expect(delegate.getQueryString(200, 100))
- .andReturn(
- "SELECT * FROM (SELECT row_number()"
- + "OVER (ORDER BY id ASC) AS rownum, * FROM people)"
- + " AS a WHERE a.rownum BETWEEN 201 AND 300");
+ .andReturn("SELECT * FROM (SELECT row_number()"
+ + "OVER (ORDER BY id ASC) AS rownum, * FROM people)"
+ + " AS a WHERE a.rownum BETWEEN 201 AND 300");
} else if (SQLTestsConstants.db == DB.ORACLE) {
EasyMock.expect(delegate.getQueryString(200, 100))
- .andReturn(
- "SELECT * FROM (SELECT x.*, ROWNUM AS r FROM"
- + " (SELECT * FROM people ORDER BY ID ASC) x) WHERE r BETWEEN 201 AND 300");
+ .andReturn("SELECT * FROM (SELECT x.*, ROWNUM AS r FROM"
+ + " (SELECT * FROM people ORDER BY ID ASC) x) WHERE r BETWEEN 201 AND 300");
} else {
- EasyMock.expect(delegate.getQueryString(200, 100)).andReturn(
- "SELECT * FROM people LIMIT 100 OFFSET 200");
+ EasyMock.expect(delegate.getQueryString(200, 100))
+ .andReturn("SELECT * FROM people LIMIT 100 OFFSET 200");
}
EasyMock.replay(delegate);
query.setDelegate(delegate);
@@ -616,9 +612,8 @@ public class FreeformQueryTest {
Arrays.asList("ID"), connectionPool);
FreeformQueryDelegate delegate = EasyMock
.createMock(FreeformQueryDelegate.class);
- EasyMock.expect(
- delegate.storeRow(EasyMock.isA(Connection.class),
- EasyMock.isA(RowItem.class))).andReturn(1);
+ EasyMock.expect(delegate.storeRow(EasyMock.isA(Connection.class),
+ EasyMock.isA(RowItem.class))).andReturn(1);
SQLContainer container = EasyMock.createNiceMock(SQLContainer.class);
EasyMock.replay(delegate, container);
query.setDelegate(delegate);
@@ -639,10 +634,9 @@ public class FreeformQueryTest {
Arrays.asList("ID"), connectionPool);
FreeformQueryDelegate delegate = EasyMock
.createMock(FreeformQueryDelegate.class);
- EasyMock.expect(
- delegate.storeRow(EasyMock.isA(Connection.class),
- EasyMock.isA(RowItem.class))).andThrow(
- new UnsupportedOperationException());
+ EasyMock.expect(delegate.storeRow(EasyMock.isA(Connection.class),
+ EasyMock.isA(RowItem.class)))
+ .andThrow(new UnsupportedOperationException());
SQLContainer container = EasyMock.createNiceMock(SQLContainer.class);
EasyMock.replay(delegate, container);
query.setDelegate(delegate);
@@ -652,7 +646,8 @@ public class FreeformQueryTest {
null);
try {
query.storeRow(row);
- Assert.fail("storeRow should fail when delgate does not implement storeRow");
+ Assert.fail(
+ "storeRow should fail when delgate does not implement storeRow");
} catch (UnsupportedOperationException e) {
// Cleanup to make test connection pool happy
query.rollback();
@@ -666,9 +661,8 @@ public class FreeformQueryTest {
Arrays.asList("ID"), connectionPool);
FreeformQueryDelegate delegate = EasyMock
.createMock(FreeformQueryDelegate.class);
- EasyMock.expect(
- delegate.removeRow(EasyMock.isA(Connection.class),
- EasyMock.isA(RowItem.class))).andReturn(true);
+ EasyMock.expect(delegate.removeRow(EasyMock.isA(Connection.class),
+ EasyMock.isA(RowItem.class))).andReturn(true);
SQLContainer container = EasyMock.createNiceMock(SQLContainer.class);
EasyMock.replay(delegate, container);
query.setDelegate(delegate);
@@ -689,10 +683,9 @@ public class FreeformQueryTest {
Arrays.asList("ID"), connectionPool);
FreeformQueryDelegate delegate = EasyMock
.createMock(FreeformQueryDelegate.class);
- EasyMock.expect(
- delegate.removeRow(EasyMock.isA(Connection.class),
- EasyMock.isA(RowItem.class))).andThrow(
- new UnsupportedOperationException());
+ EasyMock.expect(delegate.removeRow(EasyMock.isA(Connection.class),
+ EasyMock.isA(RowItem.class)))
+ .andThrow(new UnsupportedOperationException());
SQLContainer container = EasyMock.createNiceMock(SQLContainer.class);
EasyMock.replay(delegate, container);
query.setDelegate(delegate);
@@ -702,7 +695,8 @@ public class FreeformQueryTest {
null);
try {
query.removeRow(row);
- Assert.fail("removeRow should fail when delegate does not implement removeRow");
+ Assert.fail(
+ "removeRow should fail when delegate does not implement removeRow");
} catch (UnsupportedOperationException e) {
// Cleanup to make test connection pool happy
query.rollback();
@@ -733,7 +727,8 @@ public class FreeformQueryTest {
query.beginTransaction();
try {
query.beginTransaction();
- Assert.fail("Should throw exception when starting a transaction while already in a transaction");
+ Assert.fail(
+ "Should throw exception when starting a transaction while already in a transaction");
} catch (IllegalStateException e) {
// Cleanup to make test connection pool happy
query.rollback();
@@ -881,9 +876,8 @@ public class FreeformQueryTest {
.createMock(FreeformQueryDelegate.class);
// In order to test that this is the query that is actually used, we use
// a non-existing id in place of the existing one.
- EasyMock.expect(delegate.getContainsRowQueryString(1))
- .andReturn(
- "SELECT * FROM people WHERE \"NAME\" LIKE '%lle' AND \"ID\" = 1337");
+ EasyMock.expect(delegate.getContainsRowQueryString(1)).andReturn(
+ "SELECT * FROM people WHERE \"NAME\" LIKE '%lle' AND \"ID\" = 1337");
EasyMock.replay(delegate);
query.setDelegate(delegate);
@@ -893,8 +887,8 @@ public class FreeformQueryTest {
EasyMock.verify(delegate);
}
- public static class NonMatchingDelegateWithGroupBy implements
- FreeformQueryDelegate {
+ public static class NonMatchingDelegateWithGroupBy
+ implements FreeformQueryDelegate {
private String fromWhere = "FROM people p1 LEFT JOIN people p2 ON p2.id = p1.id WHERE p1.\"NAME\" LIKE 'notfound' GROUP BY p1.ID";
@@ -943,8 +937,9 @@ public class FreeformQueryTest {
}
}
- public static class NonMatchingStatementDelegateWithGroupBy extends
- NonMatchingDelegateWithGroupBy implements FreeformStatementDelegate {
+ public static class NonMatchingStatementDelegateWithGroupBy
+ extends NonMatchingDelegateWithGroupBy
+ implements FreeformStatementDelegate {
@Override
public StatementHelper getQueryStatement(int offset, int limit)
@@ -978,8 +973,8 @@ public class FreeformQueryTest {
Arrays.asList("ID"), connectionPool);
FreeformQueryDelegate delegate = EasyMock
.createMock(FreeformQueryDelegate.class);
- EasyMock.expect(delegate.getContainsRowQueryString(1)).andThrow(
- new UnsupportedOperationException());
+ EasyMock.expect(delegate.getContainsRowQueryString(1))
+ .andThrow(new UnsupportedOperationException());
EasyMock.replay(delegate);
query.setDelegate(delegate);
diff --git a/server/src/test/java/com/vaadin/data/util/sqlcontainer/query/QueryBuilderTest.java b/server/src/test/java/com/vaadin/data/util/sqlcontainer/query/QueryBuilderTest.java
index 596f28cf5e..7974582147 100644
--- a/server/src/test/java/com/vaadin/data/util/sqlcontainer/query/QueryBuilderTest.java
+++ b/server/src/test/java/com/vaadin/data/util/sqlcontainer/query/QueryBuilderTest.java
@@ -85,7 +85,8 @@ public class QueryBuilderTest {
@Test
public void getWhereStringForFilter_simpleStringFilter() {
StatementHelper sh = mockedStatementHelper("Vi%");
- SimpleStringFilter f = new SimpleStringFilter("NAME", "Vi", false, true);
+ SimpleStringFilter f = new SimpleStringFilter("NAME", "Vi", false,
+ true);
Assert.assertEquals("\"NAME\" LIKE ?",
QueryBuilder.getWhereStringForFilter(f, sh));
EasyMock.verify(sh);
@@ -104,7 +105,8 @@ public class QueryBuilderTest {
@Test
public void getWhereStringForFilter_simpleStringFilterMatchAnywhereIgnoreCase() {
StatementHelper sh = mockedStatementHelper("%VI%");
- SimpleStringFilter f = new SimpleStringFilter("NAME", "Vi", true, false);
+ SimpleStringFilter f = new SimpleStringFilter("NAME", "Vi", true,
+ false);
Assert.assertEquals("UPPER(\"NAME\") LIKE ?",
QueryBuilder.getWhereStringForFilter(f, sh));
EasyMock.verify(sh);
@@ -230,8 +232,9 @@ public class QueryBuilderTest {
public void getWhereStringForFilters_complexCompoundFilters() {
StatementHelper sh = mockedStatementHelper("%lle", 18, 65, "Pelle");
ArrayList<Filter> filters = new ArrayList<Filter>();
- filters.add(new Or(new And(new Like("NAME", "%lle"), new Or(new Less(
- "AGE", 18), new Greater("AGE", 65))),
+ filters.add(new Or(
+ new And(new Like("NAME", "%lle"),
+ new Or(new Less("AGE", 18), new Greater("AGE", 65))),
new Equal("NAME", "Pelle")));
Assert.assertEquals(
" WHERE ((\"NAME\" LIKE ? AND (\"AGE\" < ? OR \"AGE\" > ?)) OR \"NAME\" = ?)",
@@ -244,8 +247,9 @@ public class QueryBuilderTest {
StatementHelper sh = mockedStatementHelper("%lle", 18, 65, "Pelle",
"Virtanen");
ArrayList<Filter> filters = new ArrayList<Filter>();
- filters.add(new Or(new And(new Like("NAME", "%lle"), new Or(new Less(
- "AGE", 18), new Greater("AGE", 65))),
+ filters.add(new Or(
+ new And(new Like("NAME", "%lle"),
+ new Or(new Less("AGE", 18), new Greater("AGE", 65))),
new Equal("NAME", "Pelle")));
filters.add(new Equal("LASTNAME", "Virtanen"));
Assert.assertEquals(
@@ -275,7 +279,8 @@ public class QueryBuilderTest {
public void getWhereStringForFilters_complexNegatedFilter() {
StatementHelper sh = mockedStatementHelper(65, 18);
ArrayList<Filter> filters = new ArrayList<Filter>();
- filters.add(new Not(new Or(new Equal("AGE", 65), new Equal("AGE", 18))));
+ filters.add(
+ new Not(new Or(new Equal("AGE", 65), new Equal("AGE", 18))));
Assert.assertEquals(" WHERE NOT (\"AGE\" = ? OR \"AGE\" = ?)",
QueryBuilder.getWhereStringForFilters(filters, sh));
EasyMock.verify(sh);
diff --git a/server/src/test/java/com/vaadin/data/util/sqlcontainer/query/TableQueryTest.java b/server/src/test/java/com/vaadin/data/util/sqlcontainer/query/TableQueryTest.java
index 1cb3d722c6..d2067a85b4 100644
--- a/server/src/test/java/com/vaadin/data/util/sqlcontainer/query/TableQueryTest.java
+++ b/server/src/test/java/com/vaadin/data/util/sqlcontainer/query/TableQueryTest.java
@@ -57,10 +57,10 @@ public class TableQueryTest {
public void construction_legalParameters_shouldSucceed() {
TableQuery tQuery = new TableQuery("people", connectionPool,
new DefaultSQLGenerator());
- Assert.assertArrayEquals(new Object[] { "ID" }, tQuery
- .getPrimaryKeyColumns().toArray());
- boolean correctTableName = "people".equalsIgnoreCase(tQuery
- .getTableName());
+ Assert.assertArrayEquals(new Object[] { "ID" },
+ tQuery.getPrimaryKeyColumns().toArray());
+ boolean correctTableName = "people"
+ .equalsIgnoreCase(tQuery.getTableName());
Assert.assertTrue(correctTableName);
}
@@ -68,10 +68,10 @@ public class TableQueryTest {
public void construction_legalParameters_defaultGenerator_shouldSucceed() {
TableQuery tQuery = new TableQuery("people", connectionPool,
SQLTestsConstants.sqlGen);
- Assert.assertArrayEquals(new Object[] { "ID" }, tQuery
- .getPrimaryKeyColumns().toArray());
- boolean correctTableName = "people".equalsIgnoreCase(tQuery
- .getTableName());
+ Assert.assertArrayEquals(new Object[] { "ID" },
+ tQuery.getPrimaryKeyColumns().toArray());
+ boolean correctTableName = "people"
+ .equalsIgnoreCase(tQuery.getTableName());
Assert.assertTrue(correctTableName);
}
@@ -115,10 +115,10 @@ public class TableQueryTest {
statement.executeUpdate("insert into people values('Bengt', 30)");
statement.executeUpdate("insert into people values('Ingvar', 50)");
} else {
- statement
- .executeUpdate("insert into people values(default, 'Bengt', 30)");
- statement
- .executeUpdate("insert into people values(default, 'Ingvar', 50)");
+ statement.executeUpdate(
+ "insert into people values(default, 'Bengt', 30)");
+ statement.executeUpdate(
+ "insert into people values(default, 'Ingvar', 50)");
}
statement.close();
conn.commit();
@@ -145,7 +145,8 @@ public class TableQueryTest {
* TableQuery get results tests
**********************************************************************/
@Test
- public void getResults_simpleQuery_returnsFourRecords() throws SQLException {
+ public void getResults_simpleQuery_returnsFourRecords()
+ throws SQLException {
TableQuery tQuery = new TableQuery("people", connectionPool,
SQLTestsConstants.sqlGen);
tQuery.beginTransaction();
@@ -200,7 +201,8 @@ public class TableQueryTest {
tQuery.beginTransaction();
try {
tQuery.beginTransaction();
- Assert.fail("Should throw exception when starting a transaction while already in a transaction");
+ Assert.fail(
+ "Should throw exception when starting a transaction while already in a transaction");
} catch (IllegalStateException e) {
// Cleanup to make test connection pool happy
tQuery.rollback();
@@ -278,8 +280,8 @@ public class TableQueryTest {
SQLTestsConstants.sqlGen);
try {
tQuery.containsRowWithKey(new Object[] { null });
- org.junit.Assert
- .fail("null should throw an IllegalArgumentException from StatementHelper");
+ org.junit.Assert.fail(
+ "null should throw an IllegalArgumentException from StatementHelper");
} catch (IllegalArgumentException e) {
// We should now be able to reserve two connections
Connection c1 = connectionPool.reserveConnection();
@@ -395,8 +397,8 @@ public class TableQueryTest {
SQLTestsConstants.sqlGen);
SQLContainer container = new SQLContainer(tQuery);
container.setAutoCommit(false);
- Assert.assertTrue(container.removeItem(container.getItemIds()
- .iterator().next()));
+ Assert.assertTrue(
+ container.removeItem(container.getItemIds().iterator().next()));
Assert.assertEquals(4, tQuery.getCount());
Assert.assertEquals(3, container.size());
@@ -459,8 +461,8 @@ public class TableQueryTest {
tQuery.setFilters(null);
/* Fetch first item, modify and commit */
- Object item = container.getItem(container.getItemIds().iterator()
- .next());
+ Object item = container
+ .getItem(container.getItemIds().iterator().next());
Assert.assertNotNull(item);
RowItem ri = (RowItem) item;
@@ -549,8 +551,8 @@ public class TableQueryTest {
// Update the version using another connection.
Connection conn = connectionPool.reserveConnection();
- PreparedStatement stmt = conn
- .prepareStatement("UPDATE VERSIONED SET \"TEXT\" = ? WHERE \"ID\" = ?");
+ PreparedStatement stmt = conn.prepareStatement(
+ "UPDATE VERSIONED SET \"TEXT\" = ? WHERE \"ID\" = ?");
stmt.setString(1, "foo");
stmt.setObject(2, row.getItemProperty("ID").getValue());
stmt.executeUpdate();
@@ -607,8 +609,8 @@ public class TableQueryTest {
// Update the version using another connection.
Connection conn = connectionPool.reserveConnection();
- PreparedStatement stmt = conn
- .prepareStatement("UPDATE VERSIONED SET \"TEXT\" = ? WHERE \"ID\" = ?");
+ PreparedStatement stmt = conn.prepareStatement(
+ "UPDATE VERSIONED SET \"TEXT\" = ? WHERE \"ID\" = ?");
stmt.setString(1, "asdf");
stmt.setObject(2, row.getItemProperty("ID").getValue());
stmt.executeUpdate();
@@ -639,8 +641,8 @@ public class TableQueryTest {
// Update the version using another connection.
Connection conn = connectionPool.reserveConnection();
- PreparedStatement stmt = conn
- .prepareStatement("UPDATE VERSIONED SET \"TEXT\" = ? WHERE \"ID\" = ?");
+ PreparedStatement stmt = conn.prepareStatement(
+ "UPDATE VERSIONED SET \"TEXT\" = ? WHERE \"ID\" = ?");
stmt.setString(1, "asdf");
stmt.setObject(2, row.getItemProperty("ID").getValue());
stmt.executeUpdate();
@@ -665,7 +667,8 @@ public class TableQueryTest {
}
@Test
- public void construction_explicitSchema_shouldSucceed() throws SQLException {
+ public void construction_explicitSchema_shouldSucceed()
+ throws SQLException {
if (SQLTestsConstants.createSchema == null
|| SQLTestsConstants.createProductTable == null
|| SQLTestsConstants.dropSchema == null) {
diff --git a/server/src/test/java/com/vaadin/data/util/sqlcontainer/query/ValidatingSimpleJDBCConnectionPool.java b/server/src/test/java/com/vaadin/data/util/sqlcontainer/query/ValidatingSimpleJDBCConnectionPool.java
index f40455f1d7..978f79f8ac 100644
--- a/server/src/test/java/com/vaadin/data/util/sqlcontainer/query/ValidatingSimpleJDBCConnectionPool.java
+++ b/server/src/test/java/com/vaadin/data/util/sqlcontainer/query/ValidatingSimpleJDBCConnectionPool.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import com.vaadin.data.util.sqlcontainer.connection.SimpleJDBCConnectionPool;
* Connection pool for testing SQLContainer. Ensures that only reserved
* connections are released and that all connections are released before the
* pool is destroyed.
- *
+ *
* @author Vaadin Ltd
*/
public class ValidatingSimpleJDBCConnectionPool implements JDBCConnectionPool {
@@ -60,9 +60,8 @@ public class ValidatingSimpleJDBCConnectionPool implements JDBCConnectionPool {
public void releaseConnection(Connection conn) {
if (conn != null && !reserved.remove(conn)) {
if (alreadyReleased.contains(conn)) {
- getLogger().severe(
- "Tried to release connection (" + conn
- + ") which has already been released");
+ getLogger().severe("Tried to release connection (" + conn
+ + ") which has already been released");
} else {
throw new RuntimeException("Tried to release connection ("
+ conn + ") not reserved using reserveConnection");
@@ -77,13 +76,13 @@ public class ValidatingSimpleJDBCConnectionPool implements JDBCConnectionPool {
public void destroy() {
realPool.destroy();
if (!reserved.isEmpty()) {
- throw new RuntimeException(reserved.size()
- + " connections never released");
+ throw new RuntimeException(
+ reserved.size() + " connections never released");
}
}
private static Logger getLogger() {
- return Logger.getLogger(ValidatingSimpleJDBCConnectionPool.class
- .getName());
+ return Logger
+ .getLogger(ValidatingSimpleJDBCConnectionPool.class.getName());
}
} \ No newline at end of file
diff --git a/server/src/test/java/com/vaadin/server/AbstractClientConnectorProxyHandlingTest.java b/server/src/test/java/com/vaadin/server/AbstractClientConnectorProxyHandlingTest.java
index c15676c18e..3b06d5e936 100644
--- a/server/src/test/java/com/vaadin/server/AbstractClientConnectorProxyHandlingTest.java
+++ b/server/src/test/java/com/vaadin/server/AbstractClientConnectorProxyHandlingTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import org.junit.Test;
* We test that AbstractClientConnector has a suitable isThis method which is
* needed to correctly perform an equals check between a proxy and it's
* underlying instance.
- *
+ *
* @author Vaadin Ltd
*/
public class AbstractClientConnectorProxyHandlingTest {
@@ -33,12 +33,13 @@ public class AbstractClientConnectorProxyHandlingTest {
@Test
public void abstractClientConnectorTest() {
try {
- Method method = AbstractClientConnector.class.getDeclaredMethod(
- "isThis", Object.class);
+ Method method = AbstractClientConnector.class
+ .getDeclaredMethod("isThis", Object.class);
int modifiers = method.getModifiers();
if (Modifier.isFinal(modifiers) || !Modifier.isProtected(modifiers)
|| Modifier.isStatic(modifiers)) {
- Assert.fail("isThis has invalid modifiers, CDI proxies will not work.");
+ Assert.fail(
+ "isThis has invalid modifiers, CDI proxies will not work.");
}
} catch (SecurityException e) {
// Ignore, no can do
diff --git a/server/src/test/java/com/vaadin/server/AbstractClientConnectorTest.java b/server/src/test/java/com/vaadin/server/AbstractClientConnectorTest.java
index 96ca82a0b3..a4f3741f29 100644
--- a/server/src/test/java/com/vaadin/server/AbstractClientConnectorTest.java
+++ b/server/src/test/java/com/vaadin/server/AbstractClientConnectorTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,7 +31,7 @@ import com.vaadin.shared.ui.ClickRpc;
* We test that AbstractClientConnector has a suitable isThis method which is
* needed to correctly perform an equals check between a proxy and it's
* underlying instance.
- *
+ *
* @author Vaadin Ltd
*/
public class AbstractClientConnectorTest {
@@ -45,8 +45,7 @@ public class AbstractClientConnectorTest {
mock.registerRpc(implementation);
Assert.fail("expected exception");
} catch (Exception expected) {
- Assert.assertEquals(
- expected.getMessage(),
+ Assert.assertEquals(expected.getMessage(),
"Use registerRpc(T implementation, Class<T> rpcInterfaceType) if the Rpc implementation implements more than one interface");
}
}
@@ -69,8 +68,8 @@ public class AbstractClientConnectorTest {
verify(mock, times(1)).registerRpc(implementation, ClickRpc.class);
}
- private class ServerRpcLastMock implements Comparable<ServerRpcLastMock>,
- ClickRpc {
+ private class ServerRpcLastMock
+ implements Comparable<ServerRpcLastMock>, ClickRpc {
private static final long serialVersionUID = -2822356895755286180L;
@Override
diff --git a/server/src/test/java/com/vaadin/server/AbstractDeploymentConfigurationTest.java b/server/src/test/java/com/vaadin/server/AbstractDeploymentConfigurationTest.java
index 0518bea650..ce58c343ed 100644
--- a/server/src/test/java/com/vaadin/server/AbstractDeploymentConfigurationTest.java
+++ b/server/src/test/java/com/vaadin/server/AbstractDeploymentConfigurationTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.shared.communication.PushMode;
/**
* Test for {@link AbstractDeploymentConfiguration}
- *
+ *
* @author Vaadin Ltd
*/
public class AbstractDeploymentConfigurationTest {
@@ -80,8 +80,7 @@ public class AbstractDeploymentConfigurationTest {
public void getClassLoader_returnsClassloaderPropertyValue() {
String classLoader = UUID.randomUUID().toString();
DeploymentConfiguration config = getConfig("ClassLoader", classLoader);
- Assert.assertEquals(
- "Unexpected classLoader configuration option value",
+ Assert.assertEquals("Unexpected classLoader configuration option value",
classLoader, config.getClassLoaderName());
}
@@ -93,8 +92,8 @@ public class AbstractDeploymentConfigurationTest {
return new DeploymentConfigImpl(props);
}
- private static class DeploymentConfigImpl extends
- AbstractDeploymentConfiguration {
+ private static class DeploymentConfigImpl
+ extends AbstractDeploymentConfiguration {
private Properties properties;
diff --git a/server/src/test/java/com/vaadin/server/BrowserWindowOpenerTest.java b/server/src/test/java/com/vaadin/server/BrowserWindowOpenerTest.java
index 7c76f7d421..9b7d946521 100644
--- a/server/src/test/java/com/vaadin/server/BrowserWindowOpenerTest.java
+++ b/server/src/test/java/com/vaadin/server/BrowserWindowOpenerTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.shared.communication.URLReference;
import com.vaadin.shared.ui.BrowserWindowOpenerState;
/**
- *
+ *
* @author Vaadin Ltd
*/
public class BrowserWindowOpenerTest {
@@ -44,8 +44,7 @@ public class BrowserWindowOpenerTest {
URLReference ref = opener.getState(false).resources
.get(BrowserWindowOpenerState.locationResource);
- Assert.assertTrue(
- "Url reference in the state is not ResourceReference",
+ Assert.assertTrue("Url reference in the state is not ResourceReference",
ref instanceof ResourceReference);
Assert.assertEquals("Unexpected resource saved in state", resource,
((ResourceReference) ref).getResource());
@@ -66,8 +65,7 @@ public class BrowserWindowOpenerTest {
URLReference ref = opener.getState(false).resources
.get(BrowserWindowOpenerState.locationResource);
- Assert.assertTrue(
- "Url reference in the state is not ResourceReference",
+ Assert.assertTrue("Url reference in the state is not ResourceReference",
ref instanceof ResourceReference);
Resource resource = ((ResourceReference) ref).getResource();
Assert.assertTrue("Resource reference is not ExternalResource",
diff --git a/server/src/test/java/com/vaadin/server/ConnectorResourceHandlerTest.java b/server/src/test/java/com/vaadin/server/ConnectorResourceHandlerTest.java
index a5746065d6..99667139a5 100644
--- a/server/src/test/java/com/vaadin/server/ConnectorResourceHandlerTest.java
+++ b/server/src/test/java/com/vaadin/server/ConnectorResourceHandlerTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -57,8 +57,8 @@ public class ConnectorResourceHandlerTest {
session.lock();
try {
- session.setCommunicationManager(new LegacyCommunicationManager(
- session));
+ session.setCommunicationManager(
+ new LegacyCommunicationManager(session));
ui.setSession(session);
session.addUI(ui);
} finally {
diff --git a/server/src/test/java/com/vaadin/server/DefaultDeploymentConfigurationTest.java b/server/src/test/java/com/vaadin/server/DefaultDeploymentConfigurationTest.java
index 7cbb73af17..dcd70ded9f 100644
--- a/server/src/test/java/com/vaadin/server/DefaultDeploymentConfigurationTest.java
+++ b/server/src/test/java/com/vaadin/server/DefaultDeploymentConfigurationTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ import org.junit.Test;
/**
* Tests for {@link DefaultDeploymentConfiguration}
- *
+ *
* @author Vaadin Ltd
* @since 7.2
*/
@@ -44,8 +44,10 @@ public class DefaultDeploymentConfigurationTest {
public void testGetSystemProperty() throws ClassNotFoundException {
String value = "value";
String prop = "prop";
- System.setProperty(DefaultDeploymentConfigurationTest.class
- .getPackage().getName() + '.' + prop, value);
+ System.setProperty(
+ DefaultDeploymentConfigurationTest.class.getPackage().getName()
+ + '.' + prop,
+ value);
DefaultDeploymentConfiguration config = new DefaultDeploymentConfiguration(
DefaultDeploymentConfigurationTest.class, new Properties());
Assert.assertEquals(value, config.getSystemProperty(prop));
diff --git a/server/src/test/java/com/vaadin/server/DownloadStreamTest.java b/server/src/test/java/com/vaadin/server/DownloadStreamTest.java
index 180b2e348b..f302163ef7 100644
--- a/server/src/test/java/com/vaadin/server/DownloadStreamTest.java
+++ b/server/src/test/java/com/vaadin/server/DownloadStreamTest.java
@@ -30,10 +30,8 @@ public class DownloadStreamTest {
String encodedFileName = URLEncoder.encode(filename, "utf-8");
verify(response).setHeader(eq(DownloadStream.CONTENT_DISPOSITION),
contains(String.format("filename=\"%s\";", encodedFileName)));
- verify(response)
- .setHeader(
- eq(DownloadStream.CONTENT_DISPOSITION),
- contains(String.format("filename*=utf-8''%s",
- encodedFileName)));
+ verify(response).setHeader(eq(DownloadStream.CONTENT_DISPOSITION),
+ contains(
+ String.format("filename*=utf-8''%s", encodedFileName)));
}
}
diff --git a/server/src/test/java/com/vaadin/server/DragAndDropServiceTest.java b/server/src/test/java/com/vaadin/server/DragAndDropServiceTest.java
index d0cb0ca5a6..5d3be5df01 100644
--- a/server/src/test/java/com/vaadin/server/DragAndDropServiceTest.java
+++ b/server/src/test/java/com/vaadin/server/DragAndDropServiceTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -34,7 +34,7 @@ import com.vaadin.ui.AbstractComponent;
/**
* Tests for {@link DragAndDropService}.
- *
+ *
* @author Vaadin Ltd
*/
public class DragAndDropServiceTest {
@@ -42,8 +42,8 @@ public class DragAndDropServiceTest {
@Test
public void changeVariables_isSourceConnectorEnabledCalled() {
final List<Level> levels = new ArrayList<Level>();
- Logger.getLogger(DragAndDropService.class.getName()).addHandler(
- new StreamHandler() {
+ Logger.getLogger(DragAndDropService.class.getName())
+ .addHandler(new StreamHandler() {
@Override
public synchronized void publish(LogRecord record) {
levels.add(record.getLevel());
@@ -74,8 +74,8 @@ public class DragAndDropServiceTest {
@Test
public void changeVariables_isTargetConnectorEnabledCalled() {
final List<Level> levels = new ArrayList<Level>();
- Logger.getLogger(DragAndDropService.class.getName()).addHandler(
- new StreamHandler() {
+ Logger.getLogger(DragAndDropService.class.getName())
+ .addHandler(new StreamHandler() {
@Override
public void publish(LogRecord record) {
levels.add(record.getLevel());
@@ -96,8 +96,8 @@ public class DragAndDropServiceTest {
}
- private static class TestDropTarget extends AbstractComponent implements
- com.vaadin.event.dd.DropTarget {
+ private static class TestDropTarget extends AbstractComponent
+ implements com.vaadin.event.dd.DropTarget {
@Override
public boolean isConnectorEnabled() {
isConnectorEnabledCalled = true;
diff --git a/server/src/test/java/com/vaadin/server/JSONSerializerTest.java b/server/src/test/java/com/vaadin/server/JSONSerializerTest.java
index bb0be09870..d53fef31c7 100644
--- a/server/src/test/java/com/vaadin/server/JSONSerializerTest.java
+++ b/server/src/test/java/com/vaadin/server/JSONSerializerTest.java
@@ -2,13 +2,13 @@ package com.vaadin.server;
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -35,10 +35,10 @@ import elemental.json.JsonValue;
/**
* Tests for {@link JsonCodec}
- *
+ *
* @author Vaadin Ltd
* @since 7.0
- *
+ *
*/
public class JSONSerializerTest {
HashMap<String, AbstractSplitPanelState> stringToStateMap;
@@ -58,8 +58,9 @@ public class JSONSerializerTest {
stringToStateMap.put("string - state 1", s);
stringToStateMap.put("String - state 2", s2);
- JsonValue encodedMap = JsonCodec.encode(stringToStateMap, null,
- mapType, null).getEncodedValue();
+ JsonValue encodedMap = JsonCodec
+ .encode(stringToStateMap, null, mapType, null)
+ .getEncodedValue();
ensureDecodedCorrectly(stringToStateMap, encodedMap, mapType);
}
@@ -76,8 +77,9 @@ public class JSONSerializerTest {
stateToStringMap.put(s, "string - state 1");
stateToStringMap.put(s2, "String - state 2");
- JsonValue encodedMap = JsonCodec.encode(stateToStringMap, null,
- mapType, null).getEncodedValue();
+ JsonValue encodedMap = JsonCodec
+ .encode(stateToStringMap, null, mapType, null)
+ .getEncodedValue();
ensureDecodedCorrectly(stateToStringMap, encodedMap, mapType);
}
@@ -87,8 +89,8 @@ public class JSONSerializerTest {
JsonArray inputArray = Json.createArray();
inputArray.set(0, "n");
inputArray.set(1, Json.createNull());
- UidlValue decodedObject = (UidlValue) JsonCodec.decodeInternalType(
- UidlValue.class, true, inputArray, null);
+ UidlValue decodedObject = (UidlValue) JsonCodec
+ .decodeInternalType(UidlValue.class, true, inputArray, null);
Assert.assertNull(decodedObject.getValue());
}
@@ -97,15 +99,16 @@ public class JSONSerializerTest {
JsonArray inputArray = Json.createArray();
inputArray.set(0, "n");
inputArray.set(1, "a");
- UidlValue decodedObject = (UidlValue) JsonCodec.decodeInternalType(
- UidlValue.class, true, inputArray, null);
+ UidlValue decodedObject = (UidlValue) JsonCodec
+ .decodeInternalType(UidlValue.class, true, inputArray, null);
}
private void ensureDecodedCorrectly(Object original, JsonValue encoded,
Type type) throws Exception {
Object serverSideDecoded = JsonCodec.decodeInternalOrCustomType(type,
encoded, null);
- Assert.assertTrue("Server decoded", equals(original, serverSideDecoded));
+ Assert.assertTrue("Server decoded",
+ equals(original, serverSideDecoded));
}
diff --git a/server/src/test/java/com/vaadin/server/JsonEqualsTest.java b/server/src/test/java/com/vaadin/server/JsonEqualsTest.java
index ca3bfced79..b44e0e94d9 100644
--- a/server/src/test/java/com/vaadin/server/JsonEqualsTest.java
+++ b/server/src/test/java/com/vaadin/server/JsonEqualsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/server/MockServletContext.java b/server/src/test/java/com/vaadin/server/MockServletContext.java
index 8818ba1c36..3002925992 100644
--- a/server/src/test/java/com/vaadin/server/MockServletContext.java
+++ b/server/src/test/java/com/vaadin/server/MockServletContext.java
@@ -399,8 +399,8 @@ public class MockServletContext implements ServletContext {
* java.lang.String)
*/
@Override
- public javax.servlet.FilterRegistration.Dynamic addFilter(
- String filterName, String className) {
+ public javax.servlet.FilterRegistration.Dynamic addFilter(String filterName,
+ String className) {
return null;
}
@@ -411,8 +411,8 @@ public class MockServletContext implements ServletContext {
* javax.servlet.Filter)
*/
@Override
- public javax.servlet.FilterRegistration.Dynamic addFilter(
- String filterName, Filter filter) {
+ public javax.servlet.FilterRegistration.Dynamic addFilter(String filterName,
+ Filter filter) {
return null;
}
@@ -423,8 +423,8 @@ public class MockServletContext implements ServletContext {
* java.lang.Class)
*/
@Override
- public javax.servlet.FilterRegistration.Dynamic addFilter(
- String filterName, Class<? extends Filter> filterClass) {
+ public javax.servlet.FilterRegistration.Dynamic addFilter(String filterName,
+ Class<? extends Filter> filterClass) {
return null;
}
diff --git a/server/src/test/java/com/vaadin/server/MockVaadinSession.java b/server/src/test/java/com/vaadin/server/MockVaadinSession.java
index e1def5bcee..490463f1fc 100644
--- a/server/src/test/java/com/vaadin/server/MockVaadinSession.java
+++ b/server/src/test/java/com/vaadin/server/MockVaadinSession.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
/**
- *
+ *
* @author Vaadin Ltd
*/
public class MockVaadinSession extends VaadinSession {
diff --git a/server/src/test/java/com/vaadin/server/PageTest.java b/server/src/test/java/com/vaadin/server/PageTest.java
index b782b1f67d..5f04a1c2e3 100644
--- a/server/src/test/java/com/vaadin/server/PageTest.java
+++ b/server/src/test/java/com/vaadin/server/PageTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,9 +25,9 @@ import com.vaadin.shared.ui.ui.PageState;
import com.vaadin.ui.UI;
/**
- *
+ *
* Tests for {@link Page}
- *
+ *
* @author Vaadin Ltd
*/
public class PageTest {
@@ -74,8 +74,8 @@ public class PageTest {
}
- private static class TestBrowserWindowResizeListener implements
- BrowserWindowResizeListener {
+ private static class TestBrowserWindowResizeListener
+ implements BrowserWindowResizeListener {
@Override
public void browserWindowResized(BrowserWindowResizeEvent event) {
diff --git a/server/src/test/java/com/vaadin/server/TestAbstractApplicationServletStaticFilesLocation.java b/server/src/test/java/com/vaadin/server/TestAbstractApplicationServletStaticFilesLocation.java
index aba29bf9a5..274441824b 100644
--- a/server/src/test/java/com/vaadin/server/TestAbstractApplicationServletStaticFilesLocation.java
+++ b/server/src/test/java/com/vaadin/server/TestAbstractApplicationServletStaticFilesLocation.java
@@ -49,8 +49,8 @@ public class TestAbstractApplicationServletStaticFilesLocation {
// http://dummy.host/contextpath/servlet/extra/stuff
// should return ./../.. (relative url resolving to /contextpath)
- location = testLocation("http://dummy.host", "/contextpath",
- "/servlet", "/extra/stuff");
+ location = testLocation("http://dummy.host", "/contextpath", "/servlet",
+ "/extra/stuff");
Assert.assertEquals("./../..", location);
// http://dummy.host/context/path/servlet/extra/stuff
@@ -76,8 +76,8 @@ public class TestAbstractApplicationServletStaticFilesLocation {
// Set request into replay mode
replay(request);
- String location = servlet.getService().getStaticFileLocation(
- servlet.createVaadinRequest(request));
+ String location = servlet.getService()
+ .getStaticFileLocation(servlet.createVaadinRequest(request));
return location;
}
@@ -89,8 +89,8 @@ public class TestAbstractApplicationServletStaticFilesLocation {
// Set request into replay mode
replay(request);
- String location = servlet.getService().getStaticFileLocation(
- servlet.createVaadinRequest(request));
+ String location = servlet.getService()
+ .getStaticFileLocation(servlet.createVaadinRequest(request));
return location;
}
@@ -121,7 +121,7 @@ public class TestAbstractApplicationServletStaticFilesLocation {
/**
* Creates a HttpServletRequest mock using the supplied parameters.
- *
+ *
* @param base
* The base url, e.g. http://localhost:8080
* @param contextPath
@@ -139,8 +139,9 @@ public class TestAbstractApplicationServletStaticFilesLocation {
String servletPath, String pathInfo) throws MalformedURLException {
URL url = new URL(base + contextPath + pathInfo);
HttpServletRequest request = createMock(HttpServletRequest.class);
- expect(request.isSecure()).andReturn(
- url.getProtocol().equalsIgnoreCase("https")).anyTimes();
+ expect(request.isSecure())
+ .andReturn(url.getProtocol().equalsIgnoreCase("https"))
+ .anyTimes();
expect(request.getServerName()).andReturn(url.getHost()).anyTimes();
expect(request.getServerPort()).andReturn(url.getPort()).anyTimes();
expect(request.getRequestURI()).andReturn(url.getPath()).anyTimes();
diff --git a/server/src/test/java/com/vaadin/server/UIProviderTest.java b/server/src/test/java/com/vaadin/server/UIProviderTest.java
index 579a3f1858..c6c387d97f 100644
--- a/server/src/test/java/com/vaadin/server/UIProviderTest.java
+++ b/server/src/test/java/com/vaadin/server/UIProviderTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import com.vaadin.annotations.Widgetset;
/**
* Tests for {@link UIProvider} class.
- *
+ *
* @author Vaadin Ltd
*/
public class UIProviderTest {
@@ -48,8 +48,8 @@ public class UIProviderTest {
@Test
public void getAnnotationFor_themeAnnotationForSubclass_annotationOverridden() {
Assert.assertEquals(
- "Theme annotation is not overridden correctly in subclass",
- "c", UIProvider.getAnnotationFor(TestClass.class, Theme.class)
+ "Theme annotation is not overridden correctly in subclass", "c",
+ UIProvider.getAnnotationFor(TestClass.class, Theme.class)
.value());
}
@@ -71,10 +71,9 @@ public class UIProviderTest {
@Test
public void getAnnotationFor_annotationInheritedFromInterface_annotationFound() {
- Assert.assertNotNull(
- "Theme annotation is not inherited from interface", UIProvider
- .getAnnotationFor(ClassImplementingInterface.class,
- Theme.class));
+ Assert.assertNotNull("Theme annotation is not inherited from interface",
+ UIProvider.getAnnotationFor(ClassImplementingInterface.class,
+ Theme.class));
}
@Retention(RetentionPolicy.RUNTIME)
@@ -106,8 +105,8 @@ public class UIProviderTest {
public interface InterfaceWithAnnotation {
}
- public static class ClassImplementingInterface implements
- InterfaceWithAnnotation {
+ public static class ClassImplementingInterface
+ implements InterfaceWithAnnotation {
}
}
diff --git a/server/src/test/java/com/vaadin/server/VaadinGateInRequestTest.java b/server/src/test/java/com/vaadin/server/VaadinGateInRequestTest.java
index eda2b3a006..f4f0a1c87a 100644
--- a/server/src/test/java/com/vaadin/server/VaadinGateInRequestTest.java
+++ b/server/src/test/java/com/vaadin/server/VaadinGateInRequestTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,8 +20,8 @@ import static org.mockito.Mockito.spy;
import com.vaadin.server.VaadinPortlet.VaadinGateInRequest;
-public class VaadinGateInRequestTest extends
- VaadinHttpAndPortletRequestTestBase<VaadinGateInRequest> {
+public class VaadinGateInRequestTest
+ extends VaadinHttpAndPortletRequestTestBase<VaadinGateInRequest> {
@Override
protected VaadinGateInRequest createSut() {
diff --git a/server/src/test/java/com/vaadin/server/VaadinHttpAndPortletRequestTestBase.java b/server/src/test/java/com/vaadin/server/VaadinHttpAndPortletRequestTestBase.java
index 0f7cce5f75..fce9c048f2 100644
--- a/server/src/test/java/com/vaadin/server/VaadinHttpAndPortletRequestTestBase.java
+++ b/server/src/test/java/com/vaadin/server/VaadinHttpAndPortletRequestTestBase.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/server/VaadinLiferayRequestTest.java b/server/src/test/java/com/vaadin/server/VaadinLiferayRequestTest.java
index 3024cd652f..67305403c0 100644
--- a/server/src/test/java/com/vaadin/server/VaadinLiferayRequestTest.java
+++ b/server/src/test/java/com/vaadin/server/VaadinLiferayRequestTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,8 +20,8 @@ import static org.mockito.Mockito.spy;
import com.vaadin.server.VaadinPortlet.VaadinLiferayRequest;
-public class VaadinLiferayRequestTest extends
- VaadinHttpAndPortletRequestTestBase<VaadinLiferayRequest> {
+public class VaadinLiferayRequestTest
+ extends VaadinHttpAndPortletRequestTestBase<VaadinLiferayRequest> {
@Override
protected VaadinLiferayRequest createSut() {
diff --git a/server/src/test/java/com/vaadin/server/VaadinPortletServiceTest.java b/server/src/test/java/com/vaadin/server/VaadinPortletServiceTest.java
index d8c66e312f..ca874da821 100644
--- a/server/src/test/java/com/vaadin/server/VaadinPortletServiceTest.java
+++ b/server/src/test/java/com/vaadin/server/VaadinPortletServiceTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -56,16 +56,15 @@ public class VaadinPortletServiceTest {
}
private void mockFileLocationPreference(String location) {
- when(
- request.getPortletPreference(Constants.PORTAL_PARAMETER_VAADIN_RESOURCE_PATH))
- .thenReturn(location);
+ when(request.getPortletPreference(
+ Constants.PORTAL_PARAMETER_VAADIN_RESOURCE_PATH))
+ .thenReturn(location);
}
private void mockLocationDeploymentConfiguration(String location) {
- when(
- conf.getApplicationOrSystemProperty(
- Constants.PORTAL_PARAMETER_VAADIN_RESOURCE_PATH, null))
- .thenReturn(location);
+ when(conf.getApplicationOrSystemProperty(
+ Constants.PORTAL_PARAMETER_VAADIN_RESOURCE_PATH, null))
+ .thenReturn(location);
}
private String getStaticFileLocation() {
@@ -184,7 +183,8 @@ public class VaadinPortletServiceTest {
@Test
public void oldDefaultWidgetSetIsNotMappedToDefaultWidgetset() {
- mockWidgetsetConfiguration("com.vaadin.portal.gwt.PortalDefaultWidgetSet");
+ mockWidgetsetConfiguration(
+ "com.vaadin.portal.gwt.PortalDefaultWidgetSet");
mockWidgetsetProperty(null);
String widgetset = getWidgetset();
@@ -201,14 +201,14 @@ public class VaadinPortletServiceTest {
WrappedSession emptyWrappedSession = Mockito
.mock(WrappedPortletSession.class);
- when(emptyWrappedSession.getAttribute("null.lock")).thenReturn(
- mockLock);
+ when(emptyWrappedSession.getAttribute("null.lock"))
+ .thenReturn(mockLock);
VaadinRequest requestWithUIIDSet = Mockito
.mock(VaadinRequest.class);
when(requestWithUIIDSet.getParameter(UIConstants.UI_ID_PARAMETER))
.thenReturn("1");
- when(requestWithUIIDSet.getWrappedSession()).thenReturn(
- emptyWrappedSession);
+ when(requestWithUIIDSet.getWrappedSession())
+ .thenReturn(emptyWrappedSession);
UI ui = sut.findUI(requestWithUIIDSet);
Assert.assertNull("Unset session did not return null", ui);
diff --git a/server/src/test/java/com/vaadin/server/VaadinPortletTest.java b/server/src/test/java/com/vaadin/server/VaadinPortletTest.java
index 4e74f91708..39e3187f93 100644
--- a/server/src/test/java/com/vaadin/server/VaadinPortletTest.java
+++ b/server/src/test/java/com/vaadin/server/VaadinPortletTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/server/VaadinServiceTest.java b/server/src/test/java/com/vaadin/server/VaadinServiceTest.java
index bd3da6277a..bec51df485 100644
--- a/server/src/test/java/com/vaadin/server/VaadinServiceTest.java
+++ b/server/src/test/java/com/vaadin/server/VaadinServiceTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,7 +27,7 @@ import org.junit.Assert;
import org.junit.Test;
/**
- *
+ *
* @author Vaadin Ltd
*/
public class VaadinServiceTest {
@@ -65,12 +65,13 @@ public class VaadinServiceTest {
"'fireSessionDestroy' method doesn't call 'close' for the session",
1, vaadinSession.getCloseCount());
- vaadinSession.valueUnbound(EasyMock
- .createMock(HttpSessionBindingEvent.class));
+ vaadinSession.valueUnbound(
+ EasyMock.createMock(HttpSessionBindingEvent.class));
- Assert.assertEquals("'fireSessionDestroy' method may not call 'close' "
- + "method for closing session", 1,
- vaadinSession.getCloseCount());
+ Assert.assertEquals(
+ "'fireSessionDestroy' method may not call 'close' "
+ + "method for closing session",
+ 1, vaadinSession.getCloseCount());
Assert.assertEquals("SessionDestroyListeners not called exactly once",
1, listener.callCount);
diff --git a/server/src/test/java/com/vaadin/server/VaadinServletConfigurationTest.java b/server/src/test/java/com/vaadin/server/VaadinServletConfigurationTest.java
index 65698d2c44..ebeccf920f 100644
--- a/server/src/test/java/com/vaadin/server/VaadinServletConfigurationTest.java
+++ b/server/src/test/java/com/vaadin/server/VaadinServletConfigurationTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -15,7 +15,7 @@
*/
/**
- *
+ *
*/
package com.vaadin.server;
@@ -42,8 +42,8 @@ public class VaadinServletConfigurationTest {
Class<? extends UI> uiClass = new DefaultUIProvider()
.getUIClass(new UIClassSelectionEvent(new VaadinServletRequest(
- EasyMock.createMock(HttpServletRequest.class), servlet
- .getService())));
+ EasyMock.createMock(HttpServletRequest.class),
+ servlet.getService())));
Assert.assertEquals(MockUIContainingServlet.class, uiClass);
}
@@ -63,8 +63,8 @@ public class VaadinServletConfigurationTest {
Class<? extends UI> uiClass = new DefaultUIProvider()
.getUIClass(new UIClassSelectionEvent(new VaadinServletRequest(
- EasyMock.createMock(HttpServletRequest.class), servlet
- .getService())));
+ EasyMock.createMock(HttpServletRequest.class),
+ servlet.getService())));
Assert.assertEquals(MockUIContainingServlet.class, uiClass);
}
@@ -113,8 +113,8 @@ public class VaadinServletConfigurationTest {
Class<? extends UI> uiClass = new DefaultUIProvider()
.getUIClass(new UIClassSelectionEvent(new VaadinServletRequest(
- EasyMock.createMock(HttpServletRequest.class), servlet
- .getService())));
+ EasyMock.createMock(HttpServletRequest.class),
+ servlet.getService())));
Assert.assertEquals(MockUIContainingServlet.class, uiClass);
}
}
diff --git a/server/src/test/java/com/vaadin/server/VaadinServletTest.java b/server/src/test/java/com/vaadin/server/VaadinServletTest.java
index 566c4ce70a..a582561fc5 100644
--- a/server/src/test/java/com/vaadin/server/VaadinServletTest.java
+++ b/server/src/test/java/com/vaadin/server/VaadinServletTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/server/VaadinSessionTest.java b/server/src/test/java/com/vaadin/server/VaadinSessionTest.java
index 85c37d156c..d612ffbaba 100644
--- a/server/src/test/java/com/vaadin/server/VaadinSessionTest.java
+++ b/server/src/test/java/com/vaadin/server/VaadinSessionTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -111,7 +111,8 @@ public class VaadinSessionTest implements Serializable {
|| "ignoreRestart".equals(name)
|| "closeApplication".equals(name)) {
return null;
- } else if (UIInitHandler.BROWSER_DETAILS_PARAMETER.equals(name)) {
+ } else if (UIInitHandler.BROWSER_DETAILS_PARAMETER
+ .equals(name)) {
return "1";
}
return super.getParameter(name);
@@ -123,7 +124,8 @@ public class VaadinSessionTest implements Serializable {
}
@Override
- public WrappedSession getWrappedSession(boolean allowSessionCreation) {
+ public WrappedSession getWrappedSession(
+ boolean allowSessionCreation) {
return mockWrappedSession;
}
@@ -187,7 +189,8 @@ public class VaadinSessionTest implements Serializable {
}
});
- session.valueUnbound(EasyMock.createMock(HttpSessionBindingEvent.class));
+ session.valueUnbound(
+ EasyMock.createMock(HttpSessionBindingEvent.class));
mockService.runPendingAccessTasks(session); // as soon as we changed
// session.accessSynchronously
// to session.access in
@@ -227,19 +230,19 @@ public class VaadinSessionTest implements Serializable {
public void testValueUnbound() {
MockVaadinSession vaadinSession = new MockVaadinSession(mockService);
- vaadinSession.valueUnbound(EasyMock
- .createMock(HttpSessionBindingEvent.class));
+ vaadinSession.valueUnbound(
+ EasyMock.createMock(HttpSessionBindingEvent.class));
org.junit.Assert.assertEquals(
- "'valueUnbound' method doesn't call 'close' for the session",
- 1, vaadinSession.getCloseCount());
+ "'valueUnbound' method doesn't call 'close' for the session", 1,
+ vaadinSession.getCloseCount());
- vaadinSession.valueUnbound(EasyMock
- .createMock(HttpSessionBindingEvent.class));
+ vaadinSession.valueUnbound(
+ EasyMock.createMock(HttpSessionBindingEvent.class));
org.junit.Assert.assertEquals(
"'valueUnbound' method may not call 'close' "
- + "method for closing session", 1,
- vaadinSession.getCloseCount());
+ + "method for closing session",
+ 1, vaadinSession.getCloseCount());
}
// Can't define as an anonymous class since it would have a reference to
@@ -264,8 +267,8 @@ public class VaadinSessionTest implements Serializable {
private static class SerializationTestLabel extends Label {
private transient VaadinSession session = VaadinSession.getCurrent();
- private void readObject(ObjectInputStream in) throws IOException,
- ClassNotFoundException {
+ private void readObject(ObjectInputStream in)
+ throws IOException, ClassNotFoundException {
in.defaultReadObject();
session = VaadinSession.getCurrent();
}
@@ -291,13 +294,12 @@ public class VaadinSessionTest implements Serializable {
CurrentInstance.clearAll();
- ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(
- bos.toByteArray()));
+ ObjectInputStream in = new ObjectInputStream(
+ new ByteArrayInputStream(bos.toByteArray()));
VaadinSession deserializedSession = (VaadinSession) in.readObject();
- Assert.assertNull(
- "Current session shouldn't leak from deserialisation",
+ Assert.assertNull("Current session shouldn't leak from deserialisation",
VaadinSession.getCurrent());
Assert.assertNotSame("Should get a new session", session,
@@ -323,7 +325,8 @@ public class VaadinSessionTest implements Serializable {
final AtomicBoolean lockChecked = new AtomicBoolean(false);
ui.setContent(new Label() {
- private void writeObject(ObjectOutputStream out) throws IOException {
+ private void writeObject(ObjectOutputStream out)
+ throws IOException {
Assert.assertTrue(session.hasLock());
lockChecked.set(true);
out.defaultWriteObject();
diff --git a/server/src/test/java/com/vaadin/server/VaadinWebSpherePortalRequestTest.java b/server/src/test/java/com/vaadin/server/VaadinWebSpherePortalRequestTest.java
index 3a4c5c69be..a708f107f1 100644
--- a/server/src/test/java/com/vaadin/server/VaadinWebSpherePortalRequestTest.java
+++ b/server/src/test/java/com/vaadin/server/VaadinWebSpherePortalRequestTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/server/communication/AtmospherePushConnectionTest.java b/server/src/test/java/com/vaadin/server/communication/AtmospherePushConnectionTest.java
index a1a833e8af..d3362dc727 100644
--- a/server/src/test/java/com/vaadin/server/communication/AtmospherePushConnectionTest.java
+++ b/server/src/test/java/com/vaadin/server/communication/AtmospherePushConnectionTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/server/communication/FileUploadHandlerTest.java b/server/src/test/java/com/vaadin/server/communication/FileUploadHandlerTest.java
index 286163541e..5991d3e7ad 100644
--- a/server/src/test/java/com/vaadin/server/communication/FileUploadHandlerTest.java
+++ b/server/src/test/java/com/vaadin/server/communication/FileUploadHandlerTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -41,14 +41,22 @@ import com.vaadin.ui.UI;
public class FileUploadHandlerTest {
private FileUploadHandler handler;
- @Mock private VaadinResponse response;
- @Mock private StreamVariable streamVariable;
- @Mock private ClientConnector clientConnector;
- @Mock private VaadinRequest request;
- @Mock private UI ui;
- @Mock private ConnectorTracker connectorTracker;
- @Mock private VaadinSession session;
- @Mock private OutputStream responseOutput;
+ @Mock
+ private VaadinResponse response;
+ @Mock
+ private StreamVariable streamVariable;
+ @Mock
+ private ClientConnector clientConnector;
+ @Mock
+ private VaadinRequest request;
+ @Mock
+ private UI ui;
+ @Mock
+ private ConnectorTracker connectorTracker;
+ @Mock
+ private VaadinSession session;
+ @Mock
+ private OutputStream responseOutput;
private int uiId = 123;
private final String connectorId = "connectorId";
@@ -66,18 +74,24 @@ public class FileUploadHandlerTest {
mockUi();
when(clientConnector.isConnectorEnabled()).thenReturn(true);
- when(streamVariable.getOutputStream()).thenReturn(mock(OutputStream.class));
+ when(streamVariable.getOutputStream())
+ .thenReturn(mock(OutputStream.class));
when(response.getOutputStream()).thenReturn(responseOutput);
}
private void mockConnectorTracker() {
- when(connectorTracker.getSeckey(streamVariable)).thenReturn(expectedSecurityKey);
- when(connectorTracker.getStreamVariable(connectorId, variableName)).thenReturn(streamVariable);
- when(connectorTracker.getConnector(connectorId)).thenReturn(clientConnector);
+ when(connectorTracker.getSeckey(streamVariable))
+ .thenReturn(expectedSecurityKey);
+ when(connectorTracker.getStreamVariable(connectorId, variableName))
+ .thenReturn(streamVariable);
+ when(connectorTracker.getConnector(connectorId))
+ .thenReturn(clientConnector);
}
private void mockRequest() throws IOException {
- when(request.getPathInfo()).thenReturn("/" + ServletPortletHelper.UPLOAD_URL_PREFIX + uiId + "/"+ connectorId + "/" + variableName + "/" + expectedSecurityKey);
+ when(request.getPathInfo()).thenReturn("/"
+ + ServletPortletHelper.UPLOAD_URL_PREFIX + uiId + "/"
+ + connectorId + "/" + variableName + "/" + expectedSecurityKey);
when(request.getInputStream()).thenReturn(createInputStream("foobar"));
when(request.getHeader("Content-Length")).thenReturn("6");
when(request.getContentType()).thenReturn("foobar");
@@ -90,11 +104,12 @@ public class FileUploadHandlerTest {
@Override
public int read() throws IOException {
- if(counter > msg.length + 1) {
- throw new AssertionError("-1 was ignored by FileUploadHandler.");
+ if (counter > msg.length + 1) {
+ throw new AssertionError(
+ "-1 was ignored by FileUploadHandler.");
}
- if(counter >= msg.length) {
+ if (counter >= msg.length) {
counter++;
return -1;
}
@@ -110,7 +125,8 @@ public class FileUploadHandlerTest {
}
/**
- * Tests whether we get infinite loop if InputStream is already read (#10096)
+ * Tests whether we get infinite loop if InputStream is already read
+ * (#10096)
*/
@Test(expected = IOException.class)
public void exceptionIsThrownOnUnexpectedEnd() throws IOException {
@@ -123,7 +139,8 @@ public class FileUploadHandlerTest {
@Test
public void responseIsSentOnCorrectSecurityKey() throws IOException {
- when(connectorTracker.getSeckey(streamVariable)).thenReturn(expectedSecurityKey);
+ when(connectorTracker.getSeckey(streamVariable))
+ .thenReturn(expectedSecurityKey);
handler.handleRequest(session, request, response);
@@ -132,7 +149,8 @@ public class FileUploadHandlerTest {
@Test
public void responseIsNotSentOnIncorrectSecurityKey() throws IOException {
- when(connectorTracker.getSeckey(streamVariable)).thenReturn("another key expected");
+ when(connectorTracker.getSeckey(streamVariable))
+ .thenReturn("another key expected");
handler.handleRequest(session, request, response);
diff --git a/server/src/test/java/com/vaadin/server/communication/MetadataWriterTest.java b/server/src/test/java/com/vaadin/server/communication/MetadataWriterTest.java
index afae14007e..f4ca05b6d5 100644
--- a/server/src/test/java/com/vaadin/server/communication/MetadataWriterTest.java
+++ b/server/src/test/java/com/vaadin/server/communication/MetadataWriterTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -62,15 +62,15 @@ public class MetadataWriterTest {
@Test
public void writeRepaintTag() throws Exception {
new MetadataWriter().write(ui, writer, true, false, messages);
- Assert.assertEquals("{\"repaintAll\":true}", writer.getBuffer()
- .toString());
+ Assert.assertEquals("{\"repaintAll\":true}",
+ writer.getBuffer().toString());
}
@Test
public void writeRepaintAndAsyncTag() throws Exception {
new MetadataWriter().write(ui, writer, true, true, messages);
- Assert.assertEquals("{\"repaintAll\":true, \"async\":true}", writer
- .getBuffer().toString());
+ Assert.assertEquals("{\"repaintAll\":true, \"async\":true}",
+ writer.getBuffer().toString());
}
@Test
@@ -90,8 +90,8 @@ public class MetadataWriterTest {
new MetadataWriter().write(ui, writer, false, false, messages);
Assert.assertEquals(
- "{\"timedRedirect\":{\"interval\":15,\"url\":\"\"}}", writer
- .getBuffer().toString());
+ "{\"timedRedirect\":{\"interval\":15,\"url\":\"\"}}",
+ writer.getBuffer().toString());
}
@Test
diff --git a/server/src/test/java/com/vaadin/tests/CompileTransitionPropertyTest.java b/server/src/test/java/com/vaadin/tests/CompileTransitionPropertyTest.java
index 337ce19a06..4ae545f60e 100644
--- a/server/src/test/java/com/vaadin/tests/CompileTransitionPropertyTest.java
+++ b/server/src/test/java/com/vaadin/tests/CompileTransitionPropertyTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/tests/VaadinClasses.java b/server/src/test/java/com/vaadin/tests/VaadinClasses.java
index b5933bbd10..a68085bcbe 100644
--- a/server/src/test/java/com/vaadin/tests/VaadinClasses.java
+++ b/server/src/test/java/com/vaadin/tests/VaadinClasses.java
@@ -83,8 +83,8 @@ public class VaadinClasses {
public static List<Class<? extends Object>> getAllServerSideClasses() {
try {
- return findClassesNoTests(Object.class, "com.vaadin", new String[] {
- "com.vaadin.tests", "com.vaadin.client" });
+ return findClassesNoTests(Object.class, "com.vaadin",
+ new String[] { "com.vaadin.tests", "com.vaadin.client" });
} catch (IOException e) {
e.printStackTrace();
return null;
@@ -126,7 +126,8 @@ public class VaadinClasses {
try {
// Given as name to avoid dependencies on testbench source folder
return (List) findClasses(
- Class.forName("com.vaadin.tests.components.AbstractComponentTest"),
+ Class.forName(
+ "com.vaadin.tests.components.AbstractComponentTest"),
"com.vaadin.tests.components");
} catch (Exception e) {
e.printStackTrace();
@@ -149,8 +150,8 @@ public class VaadinClasses {
try {
File f = new File(location.toURI());
if (!f.exists()) {
- throw new IOException("Directory " + f.toString()
- + " does not exist");
+ throw new IOException(
+ "Directory " + f.toString() + " does not exist");
}
findPackages(f, basePackage, baseClass, classes,
ignoredPackages);
diff --git a/server/src/test/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropWrapperDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropWrapperDeclarativeTest.java
index a590b3ec1f..bd0eebd97e 100644
--- a/server/src/test/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropWrapperDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropWrapperDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,8 +23,8 @@ import com.vaadin.ui.DragAndDropWrapper;
import com.vaadin.ui.DragAndDropWrapper.DragStartMode;
import com.vaadin.ui.declarative.DesignContext;
-public class DragAndDropWrapperDeclarativeTest extends
- DeclarativeTestBase<DragAndDropWrapper> {
+public class DragAndDropWrapperDeclarativeTest
+ extends DeclarativeTestBase<DragAndDropWrapper> {
@Test
public void testDefaultDnDWrapper() {
@@ -55,8 +55,8 @@ public class DragAndDropWrapperDeclarativeTest extends
Button okButton = new Button("OK");
String input = "<vaadin-drag-and-drop-wrapper drag-start-mode='component_other'>"
+ new DesignContext().createElement(okButton)
- + new DesignContext().createElement(dragImage).attr(
- ":drag-image", true)
+ + new DesignContext().createElement(dragImage)
+ .attr(":drag-image", true)
+ "</vaadin-drag-and-drop-wrapper>";
DragAndDropWrapper wrapper = new DragAndDropWrapper(okButton);
wrapper.setDragStartMode(DragStartMode.COMPONENT_OTHER);
diff --git a/server/src/test/java/com/vaadin/tests/components/menubar/MenuBarDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/components/menubar/MenuBarDeclarativeTest.java
index 321d41152b..79ce622816 100644
--- a/server/src/test/java/com/vaadin/tests/components/menubar/MenuBarDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/components/menubar/MenuBarDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ import com.vaadin.ui.MenuBar.MenuItem;
/**
* Tests declarative support for menu bars.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -54,8 +54,8 @@ public class MenuBarDeclarativeTest extends DeclarativeTestBase<MenuBar> {
bar.addItem("Save", null).setCheckable(true);
bar.addItem("Open", null).setDescription("Open a file");
bar.addItem("Close", null).setEnabled(false);
- bar.addItem("Help", null).setIcon(
- new ExternalResource("http://foo.bar/ico.png"));
+ bar.addItem("Help", null)
+ .setIcon(new ExternalResource("http://foo.bar/ico.png"));
bar.addItem("About", null).setVisible(false);
bar.addItem("Sub", null).addItem("Item", null);
@@ -70,13 +70,10 @@ public class MenuBarDeclarativeTest extends DeclarativeTestBase<MenuBar> {
// #16328
public void testTicketSpec1() throws IOException {
String design = "<vaadin-menu-bar auto-open plain-text tabindex=5> "
- + "<menu>File"
- + "<menu>Save</menu>"
+ + "<menu>File" + "<menu>Save</menu>"
+ "<menu icon=\"theme://../runo/icons/16/folder.png\">Open</menu>"
- + "<menu separator />"
- + "<menu disabled>Exit</menu>"
- + "<menu visible='false'>Not for everybody</menu>"
- + "</menu>"
+ + "<menu separator />" + "<menu disabled>Exit</menu>"
+ + "<menu visible='false'>Not for everybody</menu>" + "</menu>"
+ "<menu description=\"This contains many items in sub menus\">Other"
+ "<menu style-name=\"fancy\">Sub"
+ "<menu checkable checked>Option 1 - no <b>html</b></menu>"
@@ -95,8 +92,8 @@ public class MenuBarDeclarativeTest extends DeclarativeTestBase<MenuBar> {
// File menu
MenuItem fileMenu = menuBar.addItem("File", null);
fileMenu.addItem("Save", null);
- fileMenu.addItem("Open", new ThemeResource(
- "../runo/icons/16/folder.png"), null);
+ fileMenu.addItem("Open",
+ new ThemeResource("../runo/icons/16/folder.png"), null);
fileMenu.addSeparator();
fileMenu.addItem("Exit", null).setEnabled(false);
fileMenu.addItem("Not for everybody", null).setVisible(false);
@@ -120,8 +117,7 @@ public class MenuBarDeclarativeTest extends DeclarativeTestBase<MenuBar> {
@Test
// #16328
public void testTicketSpec2() throws IOException {
- String design = "<vaadin-menu-bar>"
- + "<menu><b>File</b>"
+ String design = "<vaadin-menu-bar>" + "<menu><b>File</b>"
+ "<menu><font style=\"color: red\">Save</font></menu>"
+ "<menu icon=\"theme://../runo/icons/16/folder.png\">Open</menu>"
+ "<menu separator />" + "<menu disabled>Exit</menu>" //
@@ -130,8 +126,8 @@ public class MenuBarDeclarativeTest extends DeclarativeTestBase<MenuBar> {
menuBar.setHtmlContentAllowed(true);
MenuItem fileMenu = menuBar.addItem("<b>File</b>", null);
fileMenu.addItem("<font style=\"color: red\">Save</font>", null);
- fileMenu.addItem("Open", new ThemeResource(
- "../runo/icons/16/folder.png"), null);
+ fileMenu.addItem("Open",
+ new ThemeResource("../runo/icons/16/folder.png"), null);
fileMenu.addSeparator();
fileMenu.addItem("Exit", null).setEnabled(false);
testRead(design, menuBar);
diff --git a/server/src/test/java/com/vaadin/tests/data/bean/Country.java b/server/src/test/java/com/vaadin/tests/data/bean/Country.java
index afdf8dcfa1..159333212f 100644
--- a/server/src/test/java/com/vaadin/tests/data/bean/Country.java
+++ b/server/src/test/java/com/vaadin/tests/data/bean/Country.java
@@ -2,8 +2,8 @@ package com.vaadin.tests.data.bean;
public enum Country {
- FINLAND("Finland"), SWEDEN("Sweden"), USA("USA"), RUSSIA("Russia"), NETHERLANDS(
- "Netherlands"), SOUTH_AFRICA("South Africa");
+ FINLAND("Finland"), SWEDEN("Sweden"), USA("USA"), RUSSIA(
+ "Russia"), NETHERLANDS("Netherlands"), SOUTH_AFRICA("South Africa");
private String name;
diff --git a/server/src/test/java/com/vaadin/tests/data/bean/Person.java b/server/src/test/java/com/vaadin/tests/data/bean/Person.java
index f7bad31d0e..00d28a1cd8 100644
--- a/server/src/test/java/com/vaadin/tests/data/bean/Person.java
+++ b/server/src/test/java/com/vaadin/tests/data/bean/Person.java
@@ -136,8 +136,8 @@ public class Person {
}
public static Person createTestPerson2() {
- return new Person("Maya", "Dinkelstein", "maya@foo.bar", 18,
- Sex.FEMALE, new Address("Red street", 12, "Amsterdam",
+ return new Person("Maya", "Dinkelstein", "maya@foo.bar", 18, Sex.FEMALE,
+ new Address("Red street", 12, "Amsterdam",
Country.NETHERLANDS));
}
}
diff --git a/server/src/test/java/com/vaadin/tests/data/converter/AnyEnumToStringConverterTest.java b/server/src/test/java/com/vaadin/tests/data/converter/AnyEnumToStringConverterTest.java
index 83b4abad3f..2575b27074 100644
--- a/server/src/test/java/com/vaadin/tests/data/converter/AnyEnumToStringConverterTest.java
+++ b/server/src/test/java/com/vaadin/tests/data/converter/AnyEnumToStringConverterTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -99,8 +99,8 @@ public class AnyEnumToStringConverterTest {
public void stringToEnumConversion() {
Assert.assertEquals(TestEnum.TWO, converter.convertToPresentation(
TestEnum.TWO.toString(), TestEnum.class, null));
- Assert.assertEquals(AnotherTestEnum.TWO, converter
- .convertToPresentation(AnotherTestEnum.TWO.toString(),
+ Assert.assertEquals(AnotherTestEnum.TWO,
+ converter.convertToPresentation(AnotherTestEnum.TWO.toString(),
AnotherTestEnum.class, null));
}
@@ -113,15 +113,16 @@ public class AnyEnumToStringConverterTest {
tf.setValue(AnotherTestEnum.ONE.toString());
Assert.assertEquals(AnotherTestEnum.ONE.toString(), tf.getValue());
Assert.assertEquals(AnotherTestEnum.ONE, tf.getConvertedValue());
- Assert.assertEquals(AnotherTestEnum.ONE, tf.getPropertyDataSource()
- .getValue());
+ Assert.assertEquals(AnotherTestEnum.ONE,
+ tf.getPropertyDataSource().getValue());
tf.setPropertyDataSource(new ObjectProperty(TestEnum.TWO));
Assert.assertEquals(TestEnum.TWO.toString(), tf.getValue());
tf.setValue(TestEnum.ONE.toString());
Assert.assertEquals(TestEnum.ONE.toString(), tf.getValue());
Assert.assertEquals(TestEnum.ONE, tf.getConvertedValue());
- Assert.assertEquals(TestEnum.ONE, tf.getPropertyDataSource().getValue());
+ Assert.assertEquals(TestEnum.ONE,
+ tf.getPropertyDataSource().getValue());
}
}
diff --git a/server/src/test/java/com/vaadin/tests/data/converter/ConverterFactoryTest.java b/server/src/test/java/com/vaadin/tests/data/converter/ConverterFactoryTest.java
index 766c2309a0..4f06a576f4 100644
--- a/server/src/test/java/com/vaadin/tests/data/converter/ConverterFactoryTest.java
+++ b/server/src/test/java/com/vaadin/tests/data/converter/ConverterFactoryTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/tests/data/converter/DateToLongConverterTest.java b/server/src/test/java/com/vaadin/tests/data/converter/DateToLongConverterTest.java
index 02b36d3e4a..3b33895e3e 100644
--- a/server/src/test/java/com/vaadin/tests/data/converter/DateToLongConverterTest.java
+++ b/server/src/test/java/com/vaadin/tests/data/converter/DateToLongConverterTest.java
@@ -21,7 +21,8 @@ public class DateToLongConverterTest {
public void testValueConversion() {
Date d = new Date(100, 0, 1);
Assert.assertEquals(
- Long.valueOf(946677600000l + (d.getTimezoneOffset() + 120) * 60 * 1000L),
+ Long.valueOf(946677600000l
+ + (d.getTimezoneOffset() + 120) * 60 * 1000L),
converter.convertToModel(d, Long.class, null));
}
}
diff --git a/server/src/test/java/com/vaadin/tests/data/converter/DefaultConverterFactoryTest.java b/server/src/test/java/com/vaadin/tests/data/converter/DefaultConverterFactoryTest.java
index 2bbcf43e2d..9849b5a6b0 100644
--- a/server/src/test/java/com/vaadin/tests/data/converter/DefaultConverterFactoryTest.java
+++ b/server/src/test/java/com/vaadin/tests/data/converter/DefaultConverterFactoryTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -62,8 +62,8 @@ public class DefaultConverterFactoryTest {
@SuppressWarnings("deprecation")
@Test
public void stringToDate() {
- assertConverter("Oct 12, 2014 12:00:00 AM", new Date(2014 - 1900,
- 10 - 1, 12));
+ assertConverter("Oct 12, 2014 12:00:00 AM",
+ new Date(2014 - 1900, 10 - 1, 12));
}
@Test
@@ -105,25 +105,19 @@ public class DefaultConverterFactoryTest {
U tConvertedToU = factory.createConverter(tClass, uClass)
.convertToModel(t, uClass, Locale.ENGLISH);
- Assert.assertEquals(
- "Incorrect type of value converted from "
- + tClass.getSimpleName() + " to "
- + uClass.getSimpleName(), uClass,
- tConvertedToU.getClass());
- Assert.assertEquals(
- "Incorrect conversion of " + t + " to "
- + uClass.getSimpleName(), u, tConvertedToU);
+ Assert.assertEquals("Incorrect type of value converted from "
+ + tClass.getSimpleName() + " to " + uClass.getSimpleName(),
+ uClass, tConvertedToU.getClass());
+ Assert.assertEquals("Incorrect conversion of " + t + " to "
+ + uClass.getSimpleName(), u, tConvertedToU);
T uConvertedToT = factory.createConverter(uClass, tClass)
.convertToModel(u, tClass, Locale.ENGLISH);
- Assert.assertEquals(
- "Incorrect type of value converted from "
- + uClass.getSimpleName() + " to "
- + tClass.getSimpleName(), tClass,
- uConvertedToT.getClass());
- Assert.assertEquals(
- "Incorrect conversion of " + u + " to "
- + tClass.getSimpleName(), t, uConvertedToT);
+ Assert.assertEquals("Incorrect type of value converted from "
+ + uClass.getSimpleName() + " to " + tClass.getSimpleName(),
+ tClass, uConvertedToT.getClass());
+ Assert.assertEquals("Incorrect conversion of " + u + " to "
+ + tClass.getSimpleName(), t, uConvertedToT);
}
diff --git a/server/src/test/java/com/vaadin/tests/data/converter/SpecificEnumToStringConverterTest.java b/server/src/test/java/com/vaadin/tests/data/converter/SpecificEnumToStringConverterTest.java
index 377998db1e..bb60a6a472 100644
--- a/server/src/test/java/com/vaadin/tests/data/converter/SpecificEnumToStringConverterTest.java
+++ b/server/src/test/java/com/vaadin/tests/data/converter/SpecificEnumToStringConverterTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,8 +31,8 @@ import com.vaadin.ui.TextField;
public class SpecificEnumToStringConverterTest {
- public class SpecificEnumToStringConverter implements
- Converter<Enum, String> {
+ public class SpecificEnumToStringConverter
+ implements Converter<Enum, String> {
private Class<? extends Enum> enumClass;
@@ -104,9 +104,9 @@ public class SpecificEnumToStringConverterTest {
@Test
public void stringToEnumConversion() {
- Assert.assertEquals(TestEnum.TWO, testEnumConverter
- .convertToPresentation(TestEnum.TWO.toString(), TestEnum.class,
- null));
+ Assert.assertEquals(TestEnum.TWO,
+ testEnumConverter.convertToPresentation(TestEnum.TWO.toString(),
+ TestEnum.class, null));
}
@Test
@@ -118,8 +118,8 @@ public class SpecificEnumToStringConverterTest {
tf.setValue(AnotherTestEnum.ONE.toString());
Assert.assertEquals(AnotherTestEnum.ONE.toString(), tf.getValue());
Assert.assertEquals(AnotherTestEnum.ONE, tf.getConvertedValue());
- Assert.assertEquals(AnotherTestEnum.ONE, tf.getPropertyDataSource()
- .getValue());
+ Assert.assertEquals(AnotherTestEnum.ONE,
+ tf.getPropertyDataSource().getValue());
}
}
diff --git a/server/src/test/java/com/vaadin/tests/data/converter/StringToBigDecimalConverterTest.java b/server/src/test/java/com/vaadin/tests/data/converter/StringToBigDecimalConverterTest.java
index 48ebebdaff..925cf5eeee 100644
--- a/server/src/test/java/com/vaadin/tests/data/converter/StringToBigDecimalConverterTest.java
+++ b/server/src/test/java/com/vaadin/tests/data/converter/StringToBigDecimalConverterTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/tests/data/converter/StringToBigIntegerConverterTest.java b/server/src/test/java/com/vaadin/tests/data/converter/StringToBigIntegerConverterTest.java
index 312595746d..6b87b47417 100644
--- a/server/src/test/java/com/vaadin/tests/data/converter/StringToBigIntegerConverterTest.java
+++ b/server/src/test/java/com/vaadin/tests/data/converter/StringToBigIntegerConverterTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/tests/data/converter/StringToBooleanConverterTest.java b/server/src/test/java/com/vaadin/tests/data/converter/StringToBooleanConverterTest.java
index ea5af1efd9..ed26b478b2 100644
--- a/server/src/test/java/com/vaadin/tests/data/converter/StringToBooleanConverterTest.java
+++ b/server/src/test/java/com/vaadin/tests/data/converter/StringToBooleanConverterTest.java
@@ -18,17 +18,19 @@ public class StringToBooleanConverterTest {
@Override
public String getFalseString(Locale locale) {
Date d = new Date(3000000000000L);
- return SimpleDateFormat.getDateInstance(SimpleDateFormat.LONG,
- locale).format(
- d.getTime() + (d.getTimezoneOffset() + 120) * 60 * 1000L);
+ return SimpleDateFormat
+ .getDateInstance(SimpleDateFormat.LONG, locale)
+ .format(d.getTime()
+ + (d.getTimezoneOffset() + 120) * 60 * 1000L);
}
@Override
public String getTrueString(Locale locale) {
Date d = new Date(2000000000000L);
- return SimpleDateFormat.getDateInstance(SimpleDateFormat.LONG,
- locale).format(
- d.getTime() + (d.getTimezoneOffset() + 120) * 60 * 1000L);
+ return SimpleDateFormat
+ .getDateInstance(SimpleDateFormat.LONG, locale)
+ .format(d.getTime()
+ + (d.getTimezoneOffset() + 120) * 60 * 1000L);
}
};
@@ -46,22 +48,23 @@ public class StringToBooleanConverterTest {
@Test
public void testValueConversion() {
- Assert.assertTrue(converter.convertToModel("true", Boolean.class, null));
- Assert.assertFalse(converter.convertToModel("false", Boolean.class,
- null));
+ Assert.assertTrue(
+ converter.convertToModel("true", Boolean.class, null));
+ Assert.assertFalse(
+ converter.convertToModel("false", Boolean.class, null));
}
@Test
public void testYesNoValueConversion() {
- Assert.assertTrue(yesNoConverter.convertToModel("yes", Boolean.class,
- null));
- Assert.assertFalse(yesNoConverter.convertToModel("no", Boolean.class,
- null));
+ Assert.assertTrue(
+ yesNoConverter.convertToModel("yes", Boolean.class, null));
+ Assert.assertFalse(
+ yesNoConverter.convertToModel("no", Boolean.class, null));
Assert.assertEquals("yes",
yesNoConverter.convertToPresentation(true, String.class, null));
- Assert.assertEquals("no",
- yesNoConverter.convertToPresentation(false, String.class, null));
+ Assert.assertEquals("no", yesNoConverter.convertToPresentation(false,
+ String.class, null));
}
@Test
diff --git a/server/src/test/java/com/vaadin/tests/data/converter/StringToByteConverterTest.java b/server/src/test/java/com/vaadin/tests/data/converter/StringToByteConverterTest.java
index 2de72093d8..569cba8ba5 100644
--- a/server/src/test/java/com/vaadin/tests/data/converter/StringToByteConverterTest.java
+++ b/server/src/test/java/com/vaadin/tests/data/converter/StringToByteConverterTest.java
@@ -23,7 +23,8 @@ public class StringToByteConverterTest {
@Test
public void testReverseNullConversion() {
Assert.assertEquals("Null value reversely was converted incorrectly",
- null, reverseConverter.convertToModel(null, String.class, null));
+ null,
+ reverseConverter.convertToModel(null, String.class, null));
}
@Test
diff --git a/server/src/test/java/com/vaadin/tests/data/converter/StringToCollectionConverterTest.java b/server/src/test/java/com/vaadin/tests/data/converter/StringToCollectionConverterTest.java
index 4f2dc1df81..f16a984972 100644
--- a/server/src/test/java/com/vaadin/tests/data/converter/StringToCollectionConverterTest.java
+++ b/server/src/test/java/com/vaadin/tests/data/converter/StringToCollectionConverterTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -36,7 +36,7 @@ import com.vaadin.data.util.converter.StringToIntegerConverter;
/**
* Tests for {@link StringToCollectionConverter}.
- *
+ *
* @author Vaadin Ltd
*/
public class StringToCollectionConverterTest {
@@ -83,8 +83,8 @@ public class StringToCollectionConverterTest {
public void convertToModel_setAsCollection() {
StringToCollectionConverter converter = new StringToCollectionConverter(
" ", new StringToEnumConverter(), TestEnum.class);
- Collection<?> model = converter
- .convertToModel("Z X Y", Set.class, null);
+ Collection<?> model = converter.convertToModel("Z X Y", Set.class,
+ null);
Assert.assertTrue("Unexpected model class", model instanceof HashSet);
EnumSet<TestEnum> set = EnumSet.allOf(TestEnum.class);
set.removeAll(model);
diff --git a/server/src/test/java/com/vaadin/tests/data/converter/StringToEnumConverterTest.java b/server/src/test/java/com/vaadin/tests/data/converter/StringToEnumConverterTest.java
index 6660ecc9d5..0b231fc971 100644
--- a/server/src/test/java/com/vaadin/tests/data/converter/StringToEnumConverterTest.java
+++ b/server/src/test/java/com/vaadin/tests/data/converter/StringToEnumConverterTest.java
@@ -82,26 +82,26 @@ public class StringToEnumConverterTest {
converter.convertToModel("Foo bar baz", FooEnum.class, null));
Assert.assertEquals(FooEnum.Bar,
converter.convertToModel("Bar", FooEnum.class, null));
- Assert.assertEquals(FooEnum.nonStandardCase, converter.convertToModel(
- "Nonstandardcase", FooEnum.class, null));
+ Assert.assertEquals(FooEnum.nonStandardCase, converter
+ .convertToModel("Nonstandardcase", FooEnum.class, null));
Assert.assertEquals(FooEnum._HUGH,
converter.convertToModel("_hugh", FooEnum.class, null));
}
@Test
public void testReverseValueConversion() {
- Assert.assertEquals("Value1", reverseConverter.convertToModel(
- FooEnum.VALUE1, String.class, null));
- Assert.assertEquals("Some value", reverseConverter.convertToModel(
- FooEnum.SOME_VALUE, String.class, null));
- Assert.assertEquals("Foo bar baz", reverseConverter.convertToModel(
- FooEnum.FOO_BAR_BAZ, String.class, null));
+ Assert.assertEquals("Value1", reverseConverter
+ .convertToModel(FooEnum.VALUE1, String.class, null));
+ Assert.assertEquals("Some value", reverseConverter
+ .convertToModel(FooEnum.SOME_VALUE, String.class, null));
+ Assert.assertEquals("Foo bar baz", reverseConverter
+ .convertToModel(FooEnum.FOO_BAR_BAZ, String.class, null));
Assert.assertEquals("Bar", reverseConverter.convertToModel(FooEnum.Bar,
String.class, null));
- Assert.assertEquals("Nonstandardcase", reverseConverter.convertToModel(
- FooEnum.nonStandardCase, String.class, null));
- Assert.assertEquals("_hugh", reverseConverter.convertToModel(
- FooEnum._HUGH, String.class, null));
+ Assert.assertEquals("Nonstandardcase", reverseConverter
+ .convertToModel(FooEnum.nonStandardCase, String.class, null));
+ Assert.assertEquals("_hugh", reverseConverter
+ .convertToModel(FooEnum._HUGH, String.class, null));
}
diff --git a/server/src/test/java/com/vaadin/tests/data/converter/StringToShortConverterTest.java b/server/src/test/java/com/vaadin/tests/data/converter/StringToShortConverterTest.java
index 3faa65c863..ce763cf3c8 100644
--- a/server/src/test/java/com/vaadin/tests/data/converter/StringToShortConverterTest.java
+++ b/server/src/test/java/com/vaadin/tests/data/converter/StringToShortConverterTest.java
@@ -23,7 +23,8 @@ public class StringToShortConverterTest {
@Test
public void testReverseNullConversion() {
Assert.assertEquals("Null value reversely was converted incorrectly",
- null, reverseConverter.convertToModel(null, String.class, null));
+ null,
+ reverseConverter.convertToModel(null, String.class, null));
}
@Test
@@ -41,8 +42,7 @@ public class StringToShortConverterTest {
@Test
public void testReverseValueConversion() {
- Assert.assertEquals(
- "Short value reversely was converted incorrectly",
+ Assert.assertEquals("Short value reversely was converted incorrectly",
reverseConverter.convertToModel((short) 10, String.class, null),
"10");
}
diff --git a/server/src/test/java/com/vaadin/tests/data/validator/ByteRangeValidatorTest.java b/server/src/test/java/com/vaadin/tests/data/validator/ByteRangeValidatorTest.java
index 203c7847e9..5f1525c4de 100644
--- a/server/src/test/java/com/vaadin/tests/data/validator/ByteRangeValidatorTest.java
+++ b/server/src/test/java/com/vaadin/tests/data/validator/ByteRangeValidatorTest.java
@@ -30,7 +30,8 @@ public class ByteRangeValidatorTest {
public void testMinValue() {
assertTrue("Validator without ranges didn't accept value",
cleanValidator.isValid((byte) -15));
- assertTrue("Didn't accept valid value", minValidator.isValid((byte) 15));
+ assertTrue("Didn't accept valid value",
+ minValidator.isValid((byte) 15));
assertFalse("Accepted too small value", minValidator.isValid((byte) 9));
}
@@ -38,7 +39,8 @@ public class ByteRangeValidatorTest {
public void testMaxValue() {
assertTrue("Validator without ranges didn't accept value",
cleanValidator.isValid((byte) 112));
- assertTrue("Didn't accept valid value", maxValidator.isValid((byte) 15));
+ assertTrue("Didn't accept valid value",
+ maxValidator.isValid((byte) 15));
assertFalse("Accepted too large value",
maxValidator.isValid((byte) 120));
}
diff --git a/server/src/test/java/com/vaadin/tests/data/validator/FloatRangeValidatorTest.java b/server/src/test/java/com/vaadin/tests/data/validator/FloatRangeValidatorTest.java
index db4b73fd1b..2292028e0e 100644
--- a/server/src/test/java/com/vaadin/tests/data/validator/FloatRangeValidatorTest.java
+++ b/server/src/test/java/com/vaadin/tests/data/validator/FloatRangeValidatorTest.java
@@ -45,8 +45,10 @@ public class FloatRangeValidatorTest {
@Test
public void testMinMaxValue() {
assertTrue("Didn't accept valid value", minMaxValidator.isValid(10.5f));
- assertTrue("Didn't accept valid value", minMaxValidator.isValid(100.5f));
+ assertTrue("Didn't accept valid value",
+ minMaxValidator.isValid(100.5f));
assertFalse("Accepted too small value", minMaxValidator.isValid(10.4f));
- assertFalse("Accepted too large value", minMaxValidator.isValid(100.6f));
+ assertFalse("Accepted too large value",
+ minMaxValidator.isValid(100.6f));
}
}
diff --git a/server/src/test/java/com/vaadin/tests/data/validator/ShortRangeValidatorTest.java b/server/src/test/java/com/vaadin/tests/data/validator/ShortRangeValidatorTest.java
index d3534ebe97..51ac6f1a13 100644
--- a/server/src/test/java/com/vaadin/tests/data/validator/ShortRangeValidatorTest.java
+++ b/server/src/test/java/com/vaadin/tests/data/validator/ShortRangeValidatorTest.java
@@ -32,7 +32,8 @@ public class ShortRangeValidatorTest {
cleanValidator.isValid((short) -15));
assertTrue("Didn't accept valid value",
minValidator.isValid((short) 15));
- assertFalse("Accepted too small value", minValidator.isValid((short) 9));
+ assertFalse("Accepted too small value",
+ minValidator.isValid((short) 9));
}
@Test
diff --git a/server/src/test/java/com/vaadin/tests/data/validator/StringLengthValidatorTest.java b/server/src/test/java/com/vaadin/tests/data/validator/StringLengthValidatorTest.java
index de925f479f..ee7a3784df 100644
--- a/server/src/test/java/com/vaadin/tests/data/validator/StringLengthValidatorTest.java
+++ b/server/src/test/java/com/vaadin/tests/data/validator/StringLengthValidatorTest.java
@@ -9,7 +9,8 @@ import com.vaadin.data.validator.StringLengthValidator;
public class StringLengthValidatorTest {
- private StringLengthValidator validator = new StringLengthValidator("Error");
+ private StringLengthValidator validator = new StringLengthValidator(
+ "Error");
private StringLengthValidator validatorNoNull = new StringLengthValidator(
"Error", 1, 5, false);
private StringLengthValidator validatorMinValue = new StringLengthValidator(
@@ -48,16 +49,16 @@ public class StringLengthValidatorTest {
@Test
public void testNoUpperBound() {
- assertTrue(
- "String not accepted even though no upper bound",
- validatorMinValue
- .isValid("This is a really long string to test that no upper bound exists"));
+ assertTrue("String not accepted even though no upper bound",
+ validatorMinValue.isValid(
+ "This is a really long string to test that no upper bound exists"));
}
@Test
public void testNoLowerBound() {
assertTrue("Didn't accept short string", validatorMaxValue.isValid(""));
- assertTrue("Didn't accept short string", validatorMaxValue.isValid("1"));
+ assertTrue("Didn't accept short string",
+ validatorMaxValue.isValid("1"));
}
@Test
diff --git a/server/src/test/java/com/vaadin/tests/design/AbstractComponentSetResponsiveTest.java b/server/src/test/java/com/vaadin/tests/design/AbstractComponentSetResponsiveTest.java
index 175a03cd78..7e076e7b04 100644
--- a/server/src/test/java/com/vaadin/tests/design/AbstractComponentSetResponsiveTest.java
+++ b/server/src/test/java/com/vaadin/tests/design/AbstractComponentSetResponsiveTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,8 +20,8 @@ import org.junit.Test;
import com.vaadin.shared.ui.label.ContentMode;
import com.vaadin.ui.Label;
-public class AbstractComponentSetResponsiveTest extends
- DeclarativeTestBase<Label> {
+public class AbstractComponentSetResponsiveTest
+ extends DeclarativeTestBase<Label> {
@Test
public void testResponsiveFlag() {
diff --git a/server/src/test/java/com/vaadin/tests/design/ComponentFactoryTest.java b/server/src/test/java/com/vaadin/tests/design/ComponentFactoryTest.java
index 472c079e42..c455250097 100644
--- a/server/src/test/java/com/vaadin/tests/design/ComponentFactoryTest.java
+++ b/server/src/test/java/com/vaadin/tests/design/ComponentFactoryTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -50,8 +50,8 @@ public class ComponentFactoryTest {
if (componentFactory == null) {
componentFactory = defaultFactory;
}
- return componentFactory.createComponent(
- fullyQualifiedClassName, context);
+ return componentFactory.createComponent(fullyQualifiedClassName,
+ context);
}
});
}
@@ -78,8 +78,7 @@ public class ComponentFactoryTest {
Assert.assertEquals("There should be one message logged", 1,
messages.size());
- Assert.assertEquals(
- "Requested class " + Label.class.getCanonicalName(),
+ Assert.assertEquals("Requested class " + Label.class.getCanonicalName(),
messages.get(0));
}
@@ -103,8 +102,8 @@ public class ComponentFactoryTest {
public Component createComponent(String fullyQualifiedClassName,
DesignContext context) {
// Will throw because class is not found
- return defaultFactory.createComponent("foobar."
- + fullyQualifiedClassName, context);
+ return defaultFactory.createComponent(
+ "foobar." + fullyQualifiedClassName, context);
}
});
diff --git a/server/src/test/java/com/vaadin/tests/design/ComponentMapperTest.java b/server/src/test/java/com/vaadin/tests/design/ComponentMapperTest.java
index c6e8c15109..fb8e134e60 100644
--- a/server/src/test/java/com/vaadin/tests/design/ComponentMapperTest.java
+++ b/server/src/test/java/com/vaadin/tests/design/ComponentMapperTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -60,8 +60,8 @@ public class ComponentMapperTest {
});
}
- private final class CustomComponentMapper extends
- Design.DefaultComponentMapper {
+ private final class CustomComponentMapper
+ extends Design.DefaultComponentMapper {
@Override
public Component tagToComponent(String tag,
ComponentFactory componentFactory, DesignContext context) {
@@ -78,7 +78,8 @@ public class ComponentMapperTest {
}
@Override
- public String componentToTag(Component component, DesignContext context) {
+ public String componentToTag(Component component,
+ DesignContext context) {
if (component instanceof ComponentWithCustomTagName) {
ComponentWithCustomTagName withCustomTagName = (ComponentWithCustomTagName) component;
return withCustomTagName.tagName;
@@ -96,11 +97,12 @@ public class ComponentMapperTest {
public void testCustomComponentMapperRead() {
currentMapper.set(new CustomComponentMapper());
- Component component = Design.read(new ByteArrayInputStream(
- "<custom-foobar />".getBytes()));
+ Component component = Design
+ .read(new ByteArrayInputStream("<custom-foobar />".getBytes()));
- Assert.assertTrue("<custom-foobar> should resolve "
- + ComponentWithCustomTagName.class.getSimpleName(),
+ Assert.assertTrue(
+ "<custom-foobar> should resolve "
+ + ComponentWithCustomTagName.class.getSimpleName(),
component instanceof ComponentWithCustomTagName);
Assert.assertEquals("custom-foobar",
((ComponentWithCustomTagName) component).tagName);
diff --git a/server/src/test/java/com/vaadin/tests/design/DeclarativeTestBase.java b/server/src/test/java/com/vaadin/tests/design/DeclarativeTestBase.java
index 7e8b5c7767..308202fcb6 100644
--- a/server/src/test/java/com/vaadin/tests/design/DeclarativeTestBase.java
+++ b/server/src/test/java/com/vaadin/tests/design/DeclarativeTestBase.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,8 +28,8 @@ import com.vaadin.shared.Connector;
import com.vaadin.ui.Component;
import com.vaadin.ui.Flash;
-public abstract class DeclarativeTestBase<T extends Component> extends
- DeclarativeTestBaseBase<T> {
+public abstract class DeclarativeTestBase<T extends Component>
+ extends DeclarativeTestBaseBase<T> {
private static boolean debug = false;
@@ -96,19 +96,20 @@ public abstract class DeclarativeTestBase<T extends Component> extends
}
{
- comparators.put(Flash.class, new IntrospectorEqualsAsserter<Flash>(
- Flash.class) {
- @Override
- public void assertObjectEquals(Flash o1, Flash o2) {
- super.assertObjectEquals(o1, o2);
- assertEquals("parameterNames", o1.getParameterNames(),
- o2.getParameterNames());
- for (String name : o1.getParameterNames()) {
- assertEquals("Parameter " + name, o1.getParameter(name),
- o2.getParameter(name));
- }
- }
- });
+ comparators.put(Flash.class,
+ new IntrospectorEqualsAsserter<Flash>(Flash.class) {
+ @Override
+ public void assertObjectEquals(Flash o1, Flash o2) {
+ super.assertObjectEquals(o1, o2);
+ assertEquals("parameterNames", o1.getParameterNames(),
+ o2.getParameterNames());
+ for (String name : o1.getParameterNames()) {
+ assertEquals("Parameter " + name,
+ o1.getParameter(name),
+ o2.getParameter(name));
+ }
+ }
+ });
}
@Override
diff --git a/server/src/test/java/com/vaadin/tests/design/DeclarativeTestBaseBase.java b/server/src/test/java/com/vaadin/tests/design/DeclarativeTestBaseBase.java
index 6153c95592..d9394540b3 100644
--- a/server/src/test/java/com/vaadin/tests/design/DeclarativeTestBaseBase.java
+++ b/server/src/test/java/com/vaadin/tests/design/DeclarativeTestBaseBase.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -42,8 +42,8 @@ import com.vaadin.ui.declarative.DesignContext;
import com.vaadin.ui.declarative.ShouldWriteDataDelegate;
public abstract class DeclarativeTestBaseBase<T extends Component> {
- private static final class AlwaysWriteDelegate implements
- ShouldWriteDataDelegate {
+ private static final class AlwaysWriteDelegate
+ implements ShouldWriteDataDelegate {
private static final long serialVersionUID = -6345914431997793599L;
@Override
@@ -60,8 +60,8 @@ public abstract class DeclarativeTestBaseBase<T extends Component> {
protected T read(String design) {
try {
- return (T) Design.read(new ByteArrayInputStream(design
- .getBytes("UTF-8")));
+ return (T) Design
+ .read(new ByteArrayInputStream(design.getBytes("UTF-8")));
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
@@ -141,11 +141,13 @@ public abstract class DeclarativeTestBaseBase<T extends Component> {
return result;
}
- private void getComparators(Class<?> c, List<EqualsAsserter<Object>> result) {
+ private void getComparators(Class<?> c,
+ List<EqualsAsserter<Object>> result) {
if (c == null || !isVaadin(c)) {
return;
}
- EqualsAsserter<Object> comparator = (EqualsAsserter<Object>) getComparator(c);
+ EqualsAsserter<Object> comparator = (EqualsAsserter<Object>) getComparator(
+ c);
if (c.getSuperclass() != Object.class) {
getComparators(c.getSuperclass(), result);
}
diff --git a/server/src/test/java/com/vaadin/tests/design/DesignContextLocalIdTest.java b/server/src/test/java/com/vaadin/tests/design/DesignContextLocalIdTest.java
index d488b9fc08..c96f3edb64 100644
--- a/server/src/test/java/com/vaadin/tests/design/DesignContextLocalIdTest.java
+++ b/server/src/test/java/com/vaadin/tests/design/DesignContextLocalIdTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -44,7 +44,7 @@ import com.vaadin.ui.declarative.DesignContext;
/**
* Tests that setting local id via DesignContext works as intended.
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/server/src/test/java/com/vaadin/tests/design/DesignFormatterTest.java b/server/src/test/java/com/vaadin/tests/design/DesignFormatterTest.java
index 2086e2ffeb..bb056626e4 100644
--- a/server/src/test/java/com/vaadin/tests/design/DesignFormatterTest.java
+++ b/server/src/test/java/com/vaadin/tests/design/DesignFormatterTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -46,7 +46,7 @@ import com.vaadin.ui.declarative.DesignFormatter;
/**
* Various tests related to formatter.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -209,20 +209,20 @@ public class DesignFormatterTest {
// note the space here - it separates key combination from caption
assertEquals("ctrl-alt-d d", formatted);
- ShortcutAction result = formatter
- .parse(formatted, ShortcutAction.class);
+ ShortcutAction result = formatter.parse(formatted,
+ ShortcutAction.class);
assertTrue(equals(action, result));
}
@Test
public void testShortcutActionNoCaption() {
- ShortcutAction action = new ShortcutAction(null, KeyCode.D, new int[] {
- ModifierKey.ALT, ModifierKey.CTRL });
+ ShortcutAction action = new ShortcutAction(null, KeyCode.D,
+ new int[] { ModifierKey.ALT, ModifierKey.CTRL });
String formatted = formatter.format(action);
assertEquals("ctrl-alt-d", formatted);
- ShortcutAction result = formatter
- .parse(formatted, ShortcutAction.class);
+ ShortcutAction result = formatter.parse(formatted,
+ ShortcutAction.class);
assertTrue(equals(action, result));
}
@@ -267,8 +267,8 @@ public class DesignFormatterTest {
assertEquals("parsed ExternalResource", scheme + url,
((ExternalResource) resource).getURL());
- String formatted = formatter.format(new ExternalResource(scheme
- + url));
+ String formatted = formatter
+ .format(new ExternalResource(scheme + url));
assertEquals("formatted ExternalResource", scheme + url, formatted);
}
@@ -284,7 +284,8 @@ public class DesignFormatterTest {
String fileSystemPath = "c:/app/resources/icon.png";
assertEquals(httpUrl, formatter.format(new ExternalResource(httpUrl)));
- assertEquals(httpsUrl, formatter.format(new ExternalResource(httpsUrl)));
+ assertEquals(httpsUrl,
+ formatter.format(new ExternalResource(httpsUrl)));
assertEquals(ApplicationConstants.THEME_PROTOCOL_PREFIX + themePath,
formatter.format(new ThemeResource(themePath)));
@@ -306,12 +307,12 @@ public class DesignFormatterTest {
@Test(expected = ConversionException.class)
public void testResourceFormatException() {
formatter.format(new Resource() { // must use unknown resource type
- @Override
- public String getMIMEType() {
- // TODO Auto-generated method stub
- return null;
- }
- });
+ @Override
+ public String getMIMEType() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+ });
}
@Test
@@ -328,10 +329,10 @@ public class DesignFormatterTest {
formatter.parse(httpUrl, ExternalResource.class).getURL());
assertEquals(new ExternalResource(httpsUrl).getURL(),
formatter.parse(httpsUrl, ExternalResource.class).getURL());
- assertEquals(
- new ThemeResource(themePath),
- formatter.parse(ApplicationConstants.THEME_PROTOCOL_PREFIX
- + themePath, ThemeResource.class));
+ assertEquals(new ThemeResource(themePath),
+ formatter.parse(
+ ApplicationConstants.THEME_PROTOCOL_PREFIX + themePath,
+ ThemeResource.class));
assertEquals(FontAwesome.AMBULANCE,
formatter.parse(fontAwesomeUrlOld, FontAwesome.class));
assertEquals(FontAwesome.AMBULANCE,
@@ -339,8 +340,7 @@ public class DesignFormatterTest {
assertEquals(new GenericFontIcon("SomeOther", 0xF0F9),
formatter.parse(someOtherFont, FontIcon.class));
- assertEquals(
- new FileResource(new File(fileSystemPath)).getSourceFile(),
+ assertEquals(new FileResource(new File(fileSystemPath)).getSourceFile(),
formatter.parse(fileSystemPath, FileResource.class)
.getSourceFile());
@@ -348,7 +348,7 @@ public class DesignFormatterTest {
/**
* A static method to allow comparison two different actions.
- *
+ *
* @param act
* One action to compare.
* @param other
@@ -356,7 +356,8 @@ public class DesignFormatterTest {
* @return <b>true</b> when both actions are the same (caption, icon, and
* key combination).
*/
- public static final boolean equals(ShortcutAction act, ShortcutAction other) {
+ public static final boolean equals(ShortcutAction act,
+ ShortcutAction other) {
if (SharedUtil.equals(other.getCaption(), act.getCaption())
&& SharedUtil.equals(other.getIcon(), act.getIcon())
&& act.getKeyCode() == other.getKeyCode()
diff --git a/server/src/test/java/com/vaadin/tests/design/DesignReadInConstructor.java b/server/src/test/java/com/vaadin/tests/design/DesignReadInConstructor.java
index 6eccaf6a2c..3dd93a8b0a 100644
--- a/server/src/test/java/com/vaadin/tests/design/DesignReadInConstructor.java
+++ b/server/src/test/java/com/vaadin/tests/design/DesignReadInConstructor.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/tests/design/DesignReadInConstructorTest.java b/server/src/test/java/com/vaadin/tests/design/DesignReadInConstructorTest.java
index 539595762d..d514fdefb0 100644
--- a/server/src/test/java/com/vaadin/tests/design/DesignReadInConstructorTest.java
+++ b/server/src/test/java/com/vaadin/tests/design/DesignReadInConstructorTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -68,8 +68,8 @@ public class DesignReadInConstructorTest {
actual.attr(attributeKey));
}
- Assert.assertEquals(expected.children().size(), actual.children()
- .size());
+ Assert.assertEquals(expected.children().size(),
+ actual.children().size());
for (int i = 0; i < expected.children().size(); i++) {
assertJsoupTreeEquals(expected.child(i), actual.child(i));
}
diff --git a/server/src/test/java/com/vaadin/tests/design/DesignTest.java b/server/src/test/java/com/vaadin/tests/design/DesignTest.java
index cf19aecb87..5d47341b68 100644
--- a/server/src/test/java/com/vaadin/tests/design/DesignTest.java
+++ b/server/src/test/java/com/vaadin/tests/design/DesignTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/tests/design/EmbeddedsTest.java b/server/src/test/java/com/vaadin/tests/design/EmbeddedsTest.java
index 4c9e323948..7730040963 100644
--- a/server/src/test/java/com/vaadin/tests/design/EmbeddedsTest.java
+++ b/server/src/test/java/com/vaadin/tests/design/EmbeddedsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -35,7 +35,7 @@ import com.vaadin.ui.declarative.Design;
/**
* Tests declarative support for implementations of {@link AbstractEmbedded} and
* {@link Embedded}.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -85,8 +85,8 @@ public class EmbeddedsTest {
ae.setStandby("foobar");
ByteArrayOutputStream bos = new ByteArrayOutputStream();
Design.write(ae, bos);
- Flash result = (Flash) Design.read(new ByteArrayInputStream(bos
- .toByteArray()));
+ Flash result = (Flash) Design
+ .read(new ByteArrayInputStream(bos.toByteArray()));
assertTrue(equals((ExternalResource) ae.getSource(),
(ExternalResource) result.getSource()));
assertEquals(ae.getAlternateText(), result.getAlternateText());
diff --git a/server/src/test/java/com/vaadin/tests/design/FieldNameWhichConflictsWithGettersTest.java b/server/src/test/java/com/vaadin/tests/design/FieldNameWhichConflictsWithGettersTest.java
index 8c8d7b78b1..b2aa689c6e 100644
--- a/server/src/test/java/com/vaadin/tests/design/FieldNameWhichConflictsWithGettersTest.java
+++ b/server/src/test/java/com/vaadin/tests/design/FieldNameWhichConflictsWithGettersTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/tests/design/InvalidLayoutTemplate.java b/server/src/test/java/com/vaadin/tests/design/InvalidLayoutTemplate.java
index 8a2dec5a35..3201ae7a9d 100644
--- a/server/src/test/java/com/vaadin/tests/design/InvalidLayoutTemplate.java
+++ b/server/src/test/java/com/vaadin/tests/design/InvalidLayoutTemplate.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ import com.vaadin.ui.TextField;
import com.vaadin.ui.VerticalLayout;
/**
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/server/src/test/java/com/vaadin/tests/design/InvalidTagNamesTest.java b/server/src/test/java/com/vaadin/tests/design/InvalidTagNamesTest.java
index 1b5bfcca4e..20e5966a68 100644
--- a/server/src/test/java/com/vaadin/tests/design/InvalidTagNamesTest.java
+++ b/server/src/test/java/com/vaadin/tests/design/InvalidTagNamesTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -94,8 +94,8 @@ public class InvalidTagNamesTest {
private Component readDesign(String string) {
try {
- return Design.read(new ByteArrayInputStream(string
- .getBytes("UTF-8")));
+ return Design
+ .read(new ByteArrayInputStream(string.getBytes("UTF-8")));
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
diff --git a/server/src/test/java/com/vaadin/tests/design/LayoutTemplate.java b/server/src/test/java/com/vaadin/tests/design/LayoutTemplate.java
index fdfddf5c08..e356f9cf6a 100644
--- a/server/src/test/java/com/vaadin/tests/design/LayoutTemplate.java
+++ b/server/src/test/java/com/vaadin/tests/design/LayoutTemplate.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ import com.vaadin.ui.VerticalLayout;
/**
* Template to be populated in the tests
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/server/src/test/java/com/vaadin/tests/design/LocaleTest.java b/server/src/test/java/com/vaadin/tests/design/LocaleTest.java
index 6cb288db23..39a20d4ae6 100644
--- a/server/src/test/java/com/vaadin/tests/design/LocaleTest.java
+++ b/server/src/test/java/com/vaadin/tests/design/LocaleTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -38,7 +38,7 @@ import com.vaadin.ui.declarative.DesignContext;
/**
* Tests the handling of the locale property in parsing and html generation.
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -92,7 +92,8 @@ public class LocaleTest {
Element eb1 = ehLayout.child(0);
assertTrue(
"The element should not have a locale specification, found locale "
- + eb1.attr("locale"), "".equals(eb1.attr("locale")));
+ + eb1.attr("locale"),
+ "".equals(eb1.attr("locale")));
Element eb2 = ehLayout.child(1);
assertEquals("Wrong locale information.", "en_US", eb2.attr("locale"));
Element ehLayout2 = evLayout.child(1);
@@ -103,7 +104,8 @@ public class LocaleTest {
Element el1 = ehLayout2.child(0);
assertTrue(
"The element should not have a locale specification, found locale "
- + el1.attr("locale"), "".equals(el1.attr("locale")));
+ + el1.attr("locale"),
+ "".equals(el1.attr("locale")));
Element el2 = ehLayout2.child(1);
assertEquals("Wrong locale information.", "en_CA", el2.attr("locale"));
}
@@ -174,8 +176,7 @@ public class LocaleTest {
Button b2 = (Button) hLayout.getComponent(1);
assertEquals("Wrong locale.", new Locale("en", "GB"), b2.getLocale());
Button b3 = (Button) hLayout.getComponent(2);
- assertEquals(
- "The component should have the same locale as its parent.",
+ assertEquals("The component should have the same locale as its parent.",
hLayout.getLocale(), b3.getLocale());
}
} \ No newline at end of file
diff --git a/server/src/test/java/com/vaadin/tests/design/ParseAllSupportedComponentsTest.java b/server/src/test/java/com/vaadin/tests/design/ParseAllSupportedComponentsTest.java
index 54902c29fe..f2d36c4c73 100644
--- a/server/src/test/java/com/vaadin/tests/design/ParseAllSupportedComponentsTest.java
+++ b/server/src/test/java/com/vaadin/tests/design/ParseAllSupportedComponentsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ import com.vaadin.ui.declarative.DesignContext;
/**
* Just top level test case that contains all synchronizable components
- *
+ *
* @author Vaadin Ltd
*/
public class ParseAllSupportedComponentsTest {
diff --git a/server/src/test/java/com/vaadin/tests/design/ParseLayoutTest.java b/server/src/test/java/com/vaadin/tests/design/ParseLayoutTest.java
index 784c986e1c..f93accd671 100644
--- a/server/src/test/java/com/vaadin/tests/design/ParseLayoutTest.java
+++ b/server/src/test/java/com/vaadin/tests/design/ParseLayoutTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -47,7 +47,7 @@ import com.vaadin.ui.declarative.DesignException;
* A test for checking that parsing a layout preserves the IDs and the mapping
* from prefixes to package names (for example
* <meta name=”package-mapping” content=”my:com.addon.mypackage” />)
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/server/src/test/java/com/vaadin/tests/design/ParseLegacyPrefixTest.java b/server/src/test/java/com/vaadin/tests/design/ParseLegacyPrefixTest.java
index 76e15aae17..d93054b2db 100644
--- a/server/src/test/java/com/vaadin/tests/design/ParseLegacyPrefixTest.java
+++ b/server/src/test/java/com/vaadin/tests/design/ParseLegacyPrefixTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/tests/design/ParseMixedLegacyAndNewPrefixTest.java b/server/src/test/java/com/vaadin/tests/design/ParseMixedLegacyAndNewPrefixTest.java
index 2996cb23c1..6fd17bdcc5 100644
--- a/server/src/test/java/com/vaadin/tests/design/ParseMixedLegacyAndNewPrefixTest.java
+++ b/server/src/test/java/com/vaadin/tests/design/ParseMixedLegacyAndNewPrefixTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/tests/design/WriteLegacyDesignTest.java b/server/src/test/java/com/vaadin/tests/design/WriteLegacyDesignTest.java
index facb5e9862..0844ce9377 100644
--- a/server/src/test/java/com/vaadin/tests/design/WriteLegacyDesignTest.java
+++ b/server/src/test/java/com/vaadin/tests/design/WriteLegacyDesignTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/tests/design/designroot/DesignRootTest.java b/server/src/test/java/com/vaadin/tests/design/designroot/DesignRootTest.java
index 682da30344..dd8675ada3 100644
--- a/server/src/test/java/com/vaadin/tests/design/designroot/DesignRootTest.java
+++ b/server/src/test/java/com/vaadin/tests/design/designroot/DesignRootTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/tests/design/designroot/DesignWithAnnotation.java b/server/src/test/java/com/vaadin/tests/design/designroot/DesignWithAnnotation.java
index ef9de9dcb0..bf8d920b5a 100644
--- a/server/src/test/java/com/vaadin/tests/design/designroot/DesignWithAnnotation.java
+++ b/server/src/test/java/com/vaadin/tests/design/designroot/DesignWithAnnotation.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/tests/design/designroot/DesignWithEmptyAnnotation.java b/server/src/test/java/com/vaadin/tests/design/designroot/DesignWithEmptyAnnotation.java
index 55fd571ee2..9c565e06d8 100644
--- a/server/src/test/java/com/vaadin/tests/design/designroot/DesignWithEmptyAnnotation.java
+++ b/server/src/test/java/com/vaadin/tests/design/designroot/DesignWithEmptyAnnotation.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/tests/design/designroot/ExtendedDesignWithAnnotation.java b/server/src/test/java/com/vaadin/tests/design/designroot/ExtendedDesignWithAnnotation.java
index d47b4540df..6a53f983f5 100644
--- a/server/src/test/java/com/vaadin/tests/design/designroot/ExtendedDesignWithAnnotation.java
+++ b/server/src/test/java/com/vaadin/tests/design/designroot/ExtendedDesignWithAnnotation.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotation.java b/server/src/test/java/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotation.java
index ea513f6d3e..16cb10a637 100644
--- a/server/src/test/java/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotation.java
+++ b/server/src/test/java/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotation.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,8 +20,8 @@ import com.vaadin.ui.Button.ClickListener;
import com.vaadin.ui.Notification;
import com.vaadin.ui.TextField;
-public class ExtendedDesignWithEmptyAnnotation extends
- DesignWithEmptyAnnotation {
+public class ExtendedDesignWithEmptyAnnotation
+ extends DesignWithEmptyAnnotation {
private TextField customField = new TextField();
diff --git a/server/src/test/java/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotationUI.java b/server/src/test/java/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotationUI.java
index 1d0e8de4eb..e70cefd6e5 100644
--- a/server/src/test/java/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotationUI.java
+++ b/server/src/test/java/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotationUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/tests/design/nested/MyChildDesign.java b/server/src/test/java/com/vaadin/tests/design/nested/MyChildDesign.java
index 3b0d80c32c..bb95120e09 100644
--- a/server/src/test/java/com/vaadin/tests/design/nested/MyChildDesign.java
+++ b/server/src/test/java/com/vaadin/tests/design/nested/MyChildDesign.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ import com.vaadin.ui.declarative.Design;
/**
* Child design component
- *
+ *
* @author Vaadin Ltd
*/
@DesignRoot("mychilddesign.html")
diff --git a/server/src/test/java/com/vaadin/tests/design/nested/MyChildDesignCustomComponent.java b/server/src/test/java/com/vaadin/tests/design/nested/MyChildDesignCustomComponent.java
index 8402224cf9..0fe11040a1 100644
--- a/server/src/test/java/com/vaadin/tests/design/nested/MyChildDesignCustomComponent.java
+++ b/server/src/test/java/com/vaadin/tests/design/nested/MyChildDesignCustomComponent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/tests/design/nested/MyDesignRoot.java b/server/src/test/java/com/vaadin/tests/design/nested/MyDesignRoot.java
index abde002ef8..686d5bc6c8 100644
--- a/server/src/test/java/com/vaadin/tests/design/nested/MyDesignRoot.java
+++ b/server/src/test/java/com/vaadin/tests/design/nested/MyDesignRoot.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ import com.vaadin.ui.declarative.Design;
/**
* Root design component
- *
+ *
* @author Vaadin Ltd
*/
@DesignRoot("mydesignroot.html")
diff --git a/server/src/test/java/com/vaadin/tests/design/nested/MyExtendedChildDesign.java b/server/src/test/java/com/vaadin/tests/design/nested/MyExtendedChildDesign.java
index 579fdfb869..4642566901 100644
--- a/server/src/test/java/com/vaadin/tests/design/nested/MyExtendedChildDesign.java
+++ b/server/src/test/java/com/vaadin/tests/design/nested/MyExtendedChildDesign.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/tests/design/nested/NestedCustomLayoutsTest.java b/server/src/test/java/com/vaadin/tests/design/nested/NestedCustomLayoutsTest.java
index beaa9519cb..88733b9cbe 100644
--- a/server/src/test/java/com/vaadin/tests/design/nested/NestedCustomLayoutsTest.java
+++ b/server/src/test/java/com/vaadin/tests/design/nested/NestedCustomLayoutsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -33,7 +33,7 @@ import static org.hamcrest.Matchers.greaterThan;
/**
* Test case for nested custom layouts. The children of the custom layouts must
* not be rendered.
- *
+ *
* @author Vaadin Ltd
*/
public class NestedCustomLayoutsTest {
diff --git a/server/src/test/java/com/vaadin/tests/design/nested/ReadNestedTemplatesTest.java b/server/src/test/java/com/vaadin/tests/design/nested/ReadNestedTemplatesTest.java
index dc95306cd3..78cf5e16dd 100644
--- a/server/src/test/java/com/vaadin/tests/design/nested/ReadNestedTemplatesTest.java
+++ b/server/src/test/java/com/vaadin/tests/design/nested/ReadNestedTemplatesTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ import static org.junit.Assert.*;
/**
* Test case for reading nested templates
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/server/src/test/java/com/vaadin/tests/design/nested/WriteNestedTemplatesTest.java b/server/src/test/java/com/vaadin/tests/design/nested/WriteNestedTemplatesTest.java
index 5c78802472..d521fe2d0d 100644
--- a/server/src/test/java/com/vaadin/tests/design/nested/WriteNestedTemplatesTest.java
+++ b/server/src/test/java/com/vaadin/tests/design/nested/WriteNestedTemplatesTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,9 +30,9 @@ import org.junit.Test;
import com.vaadin.ui.declarative.DesignContext;
/**
- *
+ *
* Test case for writing nested templates
- *
+ *
* @author Vaadin Ltd
*/
public class WriteNestedTemplatesTest {
@@ -59,8 +59,8 @@ public class WriteNestedTemplatesTest {
@Test
public void testChildRendered() {
- assertEquals("Root layout must have one child", 1, design.children()
- .size());
+ assertEquals("Root layout must have one child", 1,
+ design.children().size());
assertEquals("com_vaadin_tests_design_nested-my-extended-child-design",
design.child(0).tagName());
}
diff --git a/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomAbsoluteLayout.java b/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomAbsoluteLayout.java
index 8eef3b07a6..d4322b9efe 100644
--- a/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomAbsoluteLayout.java
+++ b/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomAbsoluteLayout.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomAccordion.java b/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomAccordion.java
index 93606f296c..d5be5f6660 100644
--- a/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomAccordion.java
+++ b/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomAccordion.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomCssLayout.java b/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomCssLayout.java
index b2aaa2c015..88dc8cecc2 100644
--- a/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomCssLayout.java
+++ b/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomCssLayout.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomFormLayout.java b/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomFormLayout.java
index 66ac083c0d..50f43f105e 100644
--- a/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomFormLayout.java
+++ b/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomFormLayout.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomGridLayout.java b/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomGridLayout.java
index 1059ea0e14..779fb2d308 100644
--- a/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomGridLayout.java
+++ b/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomGridLayout.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomHorizontalLayout.java b/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomHorizontalLayout.java
index 482a9feb95..7bbb959151 100644
--- a/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomHorizontalLayout.java
+++ b/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomHorizontalLayout.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomHorizontalSplitPanel.java b/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomHorizontalSplitPanel.java
index 21c8745796..b395dec351 100644
--- a/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomHorizontalSplitPanel.java
+++ b/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomHorizontalSplitPanel.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomPanel.java b/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomPanel.java
index 5841fbcfee..2ed014773c 100644
--- a/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomPanel.java
+++ b/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomPanel.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomTabSheet.java b/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomTabSheet.java
index 128de7de1f..59ccf3121e 100644
--- a/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomTabSheet.java
+++ b/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomTabSheet.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomVerticalLayout.java b/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomVerticalLayout.java
index 3bc8fba7de..2c4a45a188 100644
--- a/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomVerticalLayout.java
+++ b/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomVerticalLayout.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomVerticalSplitPanel.java b/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomVerticalSplitPanel.java
index 486d71ea75..52159806a2 100644
--- a/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomVerticalSplitPanel.java
+++ b/server/src/test/java/com/vaadin/tests/design/nested/customlayouts/CustomVerticalSplitPanel.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/tests/event/EventRouterTest.java b/server/src/test/java/com/vaadin/tests/event/EventRouterTest.java
index aeb460c49e..762c8181e6 100644
--- a/server/src/test/java/com/vaadin/tests/event/EventRouterTest.java
+++ b/server/src/test/java/com/vaadin/tests/event/EventRouterTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -65,8 +65,8 @@ public class EventRouterTest {
@Test
public void fireEvent_exceptionFromListenerAndNoHandler_exceptionPropagated() {
listener.componentEvent(EasyMock.<Component.Event> anyObject());
- EasyMock.expectLastCall().andThrow(
- new RuntimeException("listener failed"));
+ EasyMock.expectLastCall()
+ .andThrow(new RuntimeException("listener failed"));
EasyMock.replay(component, listener);
try {
@@ -82,8 +82,8 @@ public class EventRouterTest {
@Test
public void fireEvent_exceptionFromListener_errorHandlerCalled() {
listener.componentEvent(EasyMock.<Component.Event> anyObject());
- EasyMock.expectLastCall().andThrow(
- new RuntimeException("listener failed"));
+ EasyMock.expectLastCall()
+ .andThrow(new RuntimeException("listener failed"));
errorHandler.error(EasyMock.<ErrorEvent> anyObject());
EasyMock.replay(component, listener, errorHandler);
@@ -98,8 +98,8 @@ public class EventRouterTest {
COMPONENT_EVENT_METHOD);
listener.componentEvent(EasyMock.<Component.Event> anyObject());
- EasyMock.expectLastCall().andThrow(
- new RuntimeException("listener failed"));
+ EasyMock.expectLastCall()
+ .andThrow(new RuntimeException("listener failed"));
errorHandler.error(EasyMock.<ErrorEvent> anyObject());
// second listener should be called despite an error in the first
listener2.componentEvent(EasyMock.<Component.Event> anyObject());
diff --git a/server/src/test/java/com/vaadin/tests/event/ShortcutActionTest.java b/server/src/test/java/com/vaadin/tests/event/ShortcutActionTest.java
index 9af23b86b1..5ed2cdd6cc 100644
--- a/server/src/test/java/com/vaadin/tests/event/ShortcutActionTest.java
+++ b/server/src/test/java/com/vaadin/tests/event/ShortcutActionTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import com.vaadin.tests.design.DesignFormatterTest;
/**
* Tests various things about shortcut actions.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -82,9 +82,9 @@ public class ShortcutActionTest {
/**
* A static method to allow comparison two different actions.
- *
+ *
* @see DesignFormatterTest
- *
+ *
* @param act
* One action to compare.
* @param other
@@ -92,7 +92,8 @@ public class ShortcutActionTest {
* @return <b>true</b> when both actions are the same (caption, icon, and
* key combination).
*/
- public static final boolean equals(ShortcutAction act, ShortcutAction other) {
+ public static final boolean equals(ShortcutAction act,
+ ShortcutAction other) {
if (SharedUtil.equals(other.getCaption(), act.getCaption())
&& SharedUtil.equals(other.getIcon(), act.getIcon())
&& act.getKeyCode() == other.getKeyCode()
diff --git a/server/src/test/java/com/vaadin/tests/server/AbstractBeanContainerListenersTest.java b/server/src/test/java/com/vaadin/tests/server/AbstractBeanContainerListenersTest.java
index b9b4f8025d..98a2513515 100644
--- a/server/src/test/java/com/vaadin/tests/server/AbstractBeanContainerListenersTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/AbstractBeanContainerListenersTest.java
@@ -5,8 +5,8 @@ import com.vaadin.data.Container.PropertySetChangeListener;
import com.vaadin.data.util.BeanItemContainer;
import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
-public class AbstractBeanContainerListenersTest extends
- AbstractListenerMethodsTestBase {
+public class AbstractBeanContainerListenersTest
+ extends AbstractListenerMethodsTestBase {
public void testPropertySetChangeListenerAddGetRemove() throws Exception {
testListenerAddGetRemove(BeanItemContainer.class,
PropertySetChangeEvent.class, PropertySetChangeListener.class,
diff --git a/server/src/test/java/com/vaadin/tests/server/AbstractContainerListenersTest.java b/server/src/test/java/com/vaadin/tests/server/AbstractContainerListenersTest.java
index cb7b91226e..5e0d464fe8 100644
--- a/server/src/test/java/com/vaadin/tests/server/AbstractContainerListenersTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/AbstractContainerListenersTest.java
@@ -9,8 +9,8 @@ import com.vaadin.data.Container.PropertySetChangeListener;
import com.vaadin.data.util.IndexedContainer;
import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
-public class AbstractContainerListenersTest extends
- AbstractListenerMethodsTestBase {
+public class AbstractContainerListenersTest
+ extends AbstractListenerMethodsTestBase {
@Test
public void testItemSetChangeListenerAddGetRemove() throws Exception {
diff --git a/server/src/test/java/com/vaadin/tests/server/AbstractInMemoryContainerListenersTest.java b/server/src/test/java/com/vaadin/tests/server/AbstractInMemoryContainerListenersTest.java
index 072998b8e1..d5a7131182 100644
--- a/server/src/test/java/com/vaadin/tests/server/AbstractInMemoryContainerListenersTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/AbstractInMemoryContainerListenersTest.java
@@ -5,8 +5,8 @@ import com.vaadin.data.Container.ItemSetChangeListener;
import com.vaadin.data.util.IndexedContainer;
import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
-public class AbstractInMemoryContainerListenersTest extends
- AbstractListenerMethodsTestBase {
+public class AbstractInMemoryContainerListenersTest
+ extends AbstractListenerMethodsTestBase {
public void testItemSetChangeListenerAddGetRemove() throws Exception {
testListenerAddGetRemove(IndexedContainer.class,
ItemSetChangeEvent.class, ItemSetChangeListener.class);
diff --git a/server/src/test/java/com/vaadin/tests/server/AbstractPropertyListenersTest.java b/server/src/test/java/com/vaadin/tests/server/AbstractPropertyListenersTest.java
index 71a84eea6e..232d26d1d6 100644
--- a/server/src/test/java/com/vaadin/tests/server/AbstractPropertyListenersTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/AbstractPropertyListenersTest.java
@@ -10,21 +10,21 @@ import com.vaadin.data.util.AbstractProperty;
import com.vaadin.data.util.ObjectProperty;
import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
-public class AbstractPropertyListenersTest extends
- AbstractListenerMethodsTestBase {
+public class AbstractPropertyListenersTest
+ extends AbstractListenerMethodsTestBase {
@Test
public void testValueChangeListenerAddGetRemove() throws Exception {
- testListenerAddGetRemove(AbstractProperty.class,
- ValueChangeEvent.class, ValueChangeListener.class,
- new ObjectProperty<String>(""));
+ testListenerAddGetRemove(AbstractProperty.class, ValueChangeEvent.class,
+ ValueChangeListener.class, new ObjectProperty<String>(""));
}
@Test
- public void testReadOnlyStatusChangeListenerAddGetRemove() throws Exception {
+ public void testReadOnlyStatusChangeListenerAddGetRemove()
+ throws Exception {
testListenerAddGetRemove(AbstractProperty.class,
ReadOnlyStatusChangeEvent.class,
- ReadOnlyStatusChangeListener.class, new ObjectProperty<String>(
- ""));
+ ReadOnlyStatusChangeListener.class,
+ new ObjectProperty<String>(""));
}
}
diff --git a/server/src/test/java/com/vaadin/tests/server/AssertionsEnabledTest.java b/server/src/test/java/com/vaadin/tests/server/AssertionsEnabledTest.java
index f09db0ea99..488cc76ba2 100644
--- a/server/src/test/java/com/vaadin/tests/server/AssertionsEnabledTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/AssertionsEnabledTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/tests/server/ClassesSerializableTest.java b/server/src/test/java/com/vaadin/tests/server/ClassesSerializableTest.java
index 2aef09fa2a..28bf497afe 100644
--- a/server/src/test/java/com/vaadin/tests/server/ClassesSerializableTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/ClassesSerializableTest.java
@@ -27,8 +27,7 @@ public class ClassesSerializableTest {
private static String[] BASE_PACKAGES = { "com.vaadin" };
- private static String[] EXCLUDED_PATTERNS = {
- "com\\.vaadin\\.demo\\..*", //
+ private static String[] EXCLUDED_PATTERNS = { "com\\.vaadin\\.demo\\..*", //
"com\\.vaadin\\.external\\.org\\.apache\\.commons\\.fileupload\\..*", //
"com\\.vaadin\\.launcher\\..*", //
"com\\.vaadin\\.client\\..*", //
@@ -85,7 +84,7 @@ public class ClassesSerializableTest {
/**
* Tests that all the relevant classes and interfaces under
* {@link #BASE_PACKAGES} implement Serializable.
- *
+ *
* @throws Exception
*/
@Test
@@ -149,8 +148,9 @@ public class ClassesSerializableTest {
nonSerializableString += ")";
}
}
- Assert.fail("Serializable not implemented by the following classes and interfaces: "
- + nonSerializableString);
+ Assert.fail(
+ "Serializable not implemented by the following classes and interfaces: "
+ + nonSerializableString);
}
}
@@ -172,10 +172,10 @@ public class ClassesSerializableTest {
/**
* Lists all class path entries by splitting the class path string.
- *
+ *
* Adapted from ClassPathExplorer.getRawClasspathEntries(), but without
* filtering.
- *
+ *
* @return List of class path segment strings
*/
//
@@ -205,10 +205,10 @@ public class ClassesSerializableTest {
/**
* Finds the server side classes/interfaces under a class path entry -
* either a directory or a JAR that matches {@link #JAR_PATTERN}.
- *
+ *
* Only classes under {@link #BASE_PACKAGES} are considered, and those
* matching {@link #EXCLUDED_PATTERNS} are filtered out.
- *
+ *
* @param classpathEntry
* @return
* @throws IOException
@@ -258,7 +258,7 @@ public class ClassesSerializableTest {
/**
* Lists class names (based on .class files) in a JAR file.
- *
+ *
* @param file
* a valid JAR file
* @return collection of fully qualified class names in the JAR
@@ -272,8 +272,8 @@ public class ClassesSerializableTest {
while (e.hasMoreElements()) {
JarEntry entry = e.nextElement();
if (entry.getName().endsWith(".class")) {
- String nameWithoutExtension = entry.getName().replaceAll(
- "\\.class", "");
+ String nameWithoutExtension = entry.getName()
+ .replaceAll("\\.class", "");
String className = nameWithoutExtension.replace('/', '.');
classes.add(className);
}
@@ -284,7 +284,7 @@ public class ClassesSerializableTest {
/**
* Lists class names (based on .class files) in a directory (a package path
* root).
- *
+ *
* @param parentPackage
* parent package name or null at root of hierarchy, used by
* recursion
diff --git a/server/src/test/java/com/vaadin/tests/server/ClientMethodSerializationTest.java b/server/src/test/java/com/vaadin/tests/server/ClientMethodSerializationTest.java
index 33f6e1f90a..597f210e09 100644
--- a/server/src/test/java/com/vaadin/tests/server/ClientMethodSerializationTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/ClientMethodSerializationTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -49,9 +49,8 @@ public class ClientMethodSerializationTest {
.findMethod(ClientMethodSerializationTest.class,
"basicParamsMethodForTesting", String.class, Integer.class);
- private static final Method NO_PARAMS_CALL_METHOD = ReflectTools
- .findMethod(ClientMethodSerializationTest.class,
- "noParamsMethodForTesting");
+ private static final Method NO_PARAMS_CALL_METHOD = ReflectTools.findMethod(
+ ClientMethodSerializationTest.class, "noParamsMethodForTesting");
public void basicParamsMethodForTesting(String stringParam,
Integer integerParam) {
@@ -73,10 +72,11 @@ public class ClientMethodSerializationTest {
originalArray.set(1, "callBackParameter2");
originalArray.set(2, "12345");
ClientMethodInvocation original = new ClientMethodInvocation(null,
- "interfaceName", JAVASCRIPT_CALLBACK_METHOD, new Object[] {
- "callBackMethodName", originalArray });
+ "interfaceName", JAVASCRIPT_CALLBACK_METHOD,
+ new Object[] { "callBackMethodName", originalArray });
- ClientMethodInvocation copy = (ClientMethodInvocation) serializeAndDeserialize(original);
+ ClientMethodInvocation copy = (ClientMethodInvocation) serializeAndDeserialize(
+ original);
JsonArray copyArray = (JsonArray) copy.getParameters()[1];
assertEquals(JsonUtil.stringify(originalArray),
JsonUtil.stringify(copyArray));
@@ -88,9 +88,10 @@ public class ClientMethodSerializationTest {
String stringParam = "a string 123";
Integer integerParam = 1234567890;
ClientMethodInvocation original = new ClientMethodInvocation(null,
- "interfaceName", BASIC_PARAMS_CALL_METHOD, new Serializable[] {
- stringParam, integerParam });
- ClientMethodInvocation copy = (ClientMethodInvocation) serializeAndDeserialize(original);
+ "interfaceName", BASIC_PARAMS_CALL_METHOD,
+ new Serializable[] { stringParam, integerParam });
+ ClientMethodInvocation copy = (ClientMethodInvocation) serializeAndDeserialize(
+ original);
String copyString = (String) copy.getParameters()[0];
Integer copyInteger = (Integer) copy.getParameters()[1];
assertEquals(copyString, stringParam);
@@ -101,7 +102,8 @@ public class ClientMethodSerializationTest {
public void testClientMethodSerialization_NoParams_NoExceptions() {
ClientMethodInvocation original = new ClientMethodInvocation(null,
"interfaceName", NO_PARAMS_CALL_METHOD, null);
- ClientMethodInvocation copy = (ClientMethodInvocation) serializeAndDeserialize(original);
+ ClientMethodInvocation copy = (ClientMethodInvocation) serializeAndDeserialize(
+ original);
}
private static Serializable serializeAndDeserialize(Serializable input) {
@@ -125,15 +127,17 @@ public class ClientMethodSerializationTest {
public void testSerializeTwice() {
String name = "javascriptFunctionName";
String[] arguments = { "1", "2", "3" };
- JsonArray args = (JsonArray) JsonCodec.encode(arguments, null,
- Object[].class, null).getEncodedValue();
+ JsonArray args = (JsonArray) JsonCodec
+ .encode(arguments, null, Object[].class, null)
+ .getEncodedValue();
ClientConnector connector = null;
ClientMethodInvocation original = new ClientMethodInvocation(connector,
- "interfaceName", JAVASCRIPT_CALLBACK_METHOD, new Object[] {
- name, args });
+ "interfaceName", JAVASCRIPT_CALLBACK_METHOD,
+ new Object[] { name, args });
- ClientMethodInvocation copy = (ClientMethodInvocation) serializeAndDeserialize(original);
+ ClientMethodInvocation copy = (ClientMethodInvocation) serializeAndDeserialize(
+ original);
assertEquals(copy.getMethodName(), original.getMethodName());
assertEquals(copy.getParameters().length,
original.getParameters().length);
diff --git a/server/src/test/java/com/vaadin/tests/server/ContextClickListenerTest.java b/server/src/test/java/com/vaadin/tests/server/ContextClickListenerTest.java
index 58d4d8d831..93fb39e799 100644
--- a/server/src/test/java/com/vaadin/tests/server/ContextClickListenerTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/ContextClickListenerTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,11 +30,11 @@ import com.vaadin.ui.Table.TableContextClickEvent;
/**
* Server-side unit tests to see that context click events are sent to listeners
* correctly.
- *
+ *
* If a listener is listening to a super type of an event, it should get the
* event. i.e. Listening to ContextClickEvent, it should get the specialized
* GridContextClickEvent as well.
- *
+ *
* If a listener is listening to a sub-type of an event, it should not get the
* super version. i.e. Listening to GridContextClickEvent, it should not get a
* plain ContextClickEvent.
diff --git a/server/src/test/java/com/vaadin/tests/server/CsrfTokenMissingTest.java b/server/src/test/java/com/vaadin/tests/server/CsrfTokenMissingTest.java
index cd9beafa10..e7e78f119d 100644
--- a/server/src/test/java/com/vaadin/tests/server/CsrfTokenMissingTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/CsrfTokenMissingTest.java
@@ -43,7 +43,7 @@ import elemental.json.JsonException;
/**
* Test the actual csrf token validation by the server.
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -65,7 +65,7 @@ public class CsrfTokenMissingTest {
/**
* Initialize the mock servlet and other stuff for our tests.
- *
+ *
*/
@Before
public void initMockStuff() throws ServiceException, ServletException {
@@ -158,8 +158,8 @@ public class CsrfTokenMissingTest {
* Gets whether the token from the request is the default one.
*/
private boolean isDefaultToken(RpcRequest rpcRequest) {
- return ApplicationConstants.CSRF_TOKEN_DEFAULT_VALUE.equals(rpcRequest
- .getCsrfToken());
+ return ApplicationConstants.CSRF_TOKEN_DEFAULT_VALUE
+ .equals(rpcRequest.getCsrfToken());
}
/*
@@ -184,8 +184,8 @@ public class CsrfTokenMissingTest {
rpcRequest.getCsrfToken());
}
- private static Logger LOGGER = Logger.getLogger(CsrfTokenMissingTest.class
- .getName());
+ private static Logger LOGGER = Logger
+ .getLogger(CsrfTokenMissingTest.class.getName());
static {
LOGGER.setLevel(Level.ALL);
}
diff --git a/server/src/test/java/com/vaadin/tests/server/ExtensionTest.java b/server/src/test/java/com/vaadin/tests/server/ExtensionTest.java
index 8f8e8dcb59..0e5c1b209a 100644
--- a/server/src/test/java/com/vaadin/tests/server/ExtensionTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/ExtensionTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/tests/server/FileResourceTest.java b/server/src/test/java/com/vaadin/tests/server/FileResourceTest.java
index 4798fb9f05..b53fc0eb88 100644
--- a/server/src/test/java/com/vaadin/tests/server/FileResourceTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/FileResourceTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/tests/server/FileTypeResolverTest.java b/server/src/test/java/com/vaadin/tests/server/FileTypeResolverTest.java
index a8af915cdc..ce9b4cd2ea 100644
--- a/server/src/test/java/com/vaadin/tests/server/FileTypeResolverTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/FileTypeResolverTest.java
@@ -21,35 +21,37 @@ public class FileTypeResolverTest {
File plainHtml = new File("c:\\MyFlash.html");
// Flash
- assertEquals(
- FileTypeResolver.getMIMEType(plainFlash.getAbsolutePath()),
+ assertEquals(FileTypeResolver.getMIMEType(plainFlash.getAbsolutePath()),
FLASH_MIME_TYPE);
assertEquals(
- FileTypeResolver.getMIMEType(plainFlash.getAbsolutePath()
- + "?param1=value1"), FLASH_MIME_TYPE);
- assertEquals(
- FileTypeResolver.getMIMEType(plainFlash.getAbsolutePath()
- + "?param1=value1&param2=value2"), FLASH_MIME_TYPE);
+ FileTypeResolver.getMIMEType(
+ plainFlash.getAbsolutePath() + "?param1=value1"),
+ FLASH_MIME_TYPE);
+ assertEquals(FileTypeResolver.getMIMEType(
+ plainFlash.getAbsolutePath() + "?param1=value1&param2=value2"),
+ FLASH_MIME_TYPE);
// Plain text
assertEquals(FileTypeResolver.getMIMEType(plainText.getAbsolutePath()),
TEXT_MIME_TYPE);
assertEquals(
- FileTypeResolver.getMIMEType(plainText.getAbsolutePath()
- + "?param1=value1"), TEXT_MIME_TYPE);
- assertEquals(
- FileTypeResolver.getMIMEType(plainText.getAbsolutePath()
- + "?param1=value1&param2=value2"), TEXT_MIME_TYPE);
+ FileTypeResolver.getMIMEType(
+ plainText.getAbsolutePath() + "?param1=value1"),
+ TEXT_MIME_TYPE);
+ assertEquals(FileTypeResolver.getMIMEType(
+ plainText.getAbsolutePath() + "?param1=value1&param2=value2"),
+ TEXT_MIME_TYPE);
// Plain text
assertEquals(FileTypeResolver.getMIMEType(plainHtml.getAbsolutePath()),
HTML_MIME_TYPE);
assertEquals(
- FileTypeResolver.getMIMEType(plainHtml.getAbsolutePath()
- + "?param1=value1"), HTML_MIME_TYPE);
- assertEquals(
- FileTypeResolver.getMIMEType(plainHtml.getAbsolutePath()
- + "?param1=value1&param2=value2"), HTML_MIME_TYPE);
+ FileTypeResolver.getMIMEType(
+ plainHtml.getAbsolutePath() + "?param1=value1"),
+ HTML_MIME_TYPE);
+ assertEquals(FileTypeResolver.getMIMEType(
+ plainHtml.getAbsolutePath() + "?param1=value1&param2=value2"),
+ HTML_MIME_TYPE);
// Filename missing
assertEquals(FileTypeResolver.DEFAULT_MIME_TYPE,
diff --git a/server/src/test/java/com/vaadin/tests/server/IndexedContainerListenersTest.java b/server/src/test/java/com/vaadin/tests/server/IndexedContainerListenersTest.java
index bc2c5e3558..d8a1290b68 100644
--- a/server/src/test/java/com/vaadin/tests/server/IndexedContainerListenersTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/IndexedContainerListenersTest.java
@@ -9,13 +9,13 @@ import com.vaadin.data.Property.ValueChangeListener;
import com.vaadin.data.util.IndexedContainer;
import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
-public class IndexedContainerListenersTest extends
- AbstractListenerMethodsTestBase {
+public class IndexedContainerListenersTest
+ extends AbstractListenerMethodsTestBase {
@Test
public void testValueChangeListenerAddGetRemove() throws Exception {
- testListenerAddGetRemove(IndexedContainer.class,
- ValueChangeEvent.class, ValueChangeListener.class);
+ testListenerAddGetRemove(IndexedContainer.class, ValueChangeEvent.class,
+ ValueChangeListener.class);
}
@Test
diff --git a/server/src/test/java/com/vaadin/tests/server/PropertyFormatterTest.java b/server/src/test/java/com/vaadin/tests/server/PropertyFormatterTest.java
index 14da1171c6..cc67c40dbb 100644
--- a/server/src/test/java/com/vaadin/tests/server/PropertyFormatterTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/PropertyFormatterTest.java
@@ -16,8 +16,8 @@ public class PropertyFormatterTest {
@Override
public String format(Object value) {
- boolean isCorrectType = getExpectedClass().isAssignableFrom(
- value.getClass());
+ boolean isCorrectType = getExpectedClass()
+ .isAssignableFrom(value.getClass());
assertTrue(isCorrectType);
return "FOO";
}
@@ -38,14 +38,14 @@ public class PropertyFormatterTest {
/**
* The object passed to format should be same as property's type.
- *
+ *
* @throws IllegalAccessException
* @throws InstantiationException
*/
@Test
@SuppressWarnings({ "rawtypes" })
- public void testCorrectTypeForFormat() throws InstantiationException,
- IllegalAccessException {
+ public void testCorrectTypeForFormat()
+ throws InstantiationException, IllegalAccessException {
Class[] testedTypes = new Class[] { Integer.class, Boolean.class,
Double.class, String.class, Date.class };
Object[] testValues = new Object[] { new Integer(3), Boolean.FALSE,
@@ -61,13 +61,13 @@ public class PropertyFormatterTest {
Object value = formatter.getValue();
// test with property which value is null
- formatter.setPropertyDataSource(new ObjectProperty(null,
- expectedClass));
+ formatter.setPropertyDataSource(
+ new ObjectProperty(null, expectedClass));
formatter.getValue(); // calls format
// test with a value
- formatter.setPropertyDataSource(new ObjectProperty(testValues[i++],
- expectedClass));
+ formatter.setPropertyDataSource(
+ new ObjectProperty(testValues[i++], expectedClass));
formatter.getValue(); // calls format
}
diff --git a/server/src/test/java/com/vaadin/tests/server/PropertysetItemListenersTest.java b/server/src/test/java/com/vaadin/tests/server/PropertysetItemListenersTest.java
index 8a91ea1868..ee5f36323e 100644
--- a/server/src/test/java/com/vaadin/tests/server/PropertysetItemListenersTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/PropertysetItemListenersTest.java
@@ -5,8 +5,8 @@ import com.vaadin.data.Item.PropertySetChangeListener;
import com.vaadin.data.util.PropertysetItem;
import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
-public class PropertysetItemListenersTest extends
- AbstractListenerMethodsTestBase {
+public class PropertysetItemListenersTest
+ extends AbstractListenerMethodsTestBase {
public void testPropertySetChangeListenerAddGetRemove() throws Exception {
testListenerAddGetRemove(PropertysetItem.class,
PropertySetChangeEvent.class, PropertySetChangeListener.class);
diff --git a/server/src/test/java/com/vaadin/tests/server/SerializationTest.java b/server/src/test/java/com/vaadin/tests/server/SerializationTest.java
index 349a2c525e..995c1576a5 100644
--- a/server/src/test/java/com/vaadin/tests/server/SerializationTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/SerializationTest.java
@@ -33,8 +33,8 @@ public class SerializationTest {
public void testForm() throws Exception {
Form f = new Form();
String propertyId = "My property";
- f.addItemProperty(propertyId, new MethodProperty<Object>(new Data(),
- "dummyGetterAndSetter"));
+ f.addItemProperty(propertyId,
+ new MethodProperty<Object>(new Data(), "dummyGetterAndSetter"));
f.replaceWithSelect(propertyId, new Object[] { "a", "b", null },
new String[] { "Item a", "ITem b", "Null item" });
@@ -95,8 +95,8 @@ public class SerializationTest {
ObjectOutputStream out = new ObjectOutputStream(bs);
out.writeObject(s);
byte[] data = bs.toByteArray();
- ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(
- data));
+ ObjectInputStream in = new ObjectInputStream(
+ new ByteArrayInputStream(data));
@SuppressWarnings("unchecked")
S s2 = (S) in.readObject();
diff --git a/server/src/test/java/com/vaadin/tests/server/SimpleMultiPartInputStreamTest.java b/server/src/test/java/com/vaadin/tests/server/SimpleMultiPartInputStreamTest.java
index 70a18d1fa6..14b839be6a 100644
--- a/server/src/test/java/com/vaadin/tests/server/SimpleMultiPartInputStreamTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/SimpleMultiPartInputStreamTest.java
@@ -13,7 +13,7 @@ public class SimpleMultiPartInputStreamTest {
/**
* Check that the output for a given stream until boundary is as expected.
- *
+ *
* @param input
* @param boundary
* @param expected
@@ -31,9 +31,9 @@ public class SimpleMultiPartInputStreamTest {
resultStream.write(outbyte);
}
} catch (IOException e) {
- throw new IOException(e.getMessage() + "; expected "
- + new String(expected) + " but got "
- + resultStream.toString());
+ throw new IOException(
+ e.getMessage() + "; expected " + new String(expected)
+ + " but got " + resultStream.toString());
}
if (!Arrays.equals(expected, resultStream.toByteArray())) {
throw new Exception("Mismatch: expected " + new String(expected)
@@ -53,7 +53,8 @@ public class SimpleMultiPartInputStreamTest {
@Test
public void testSingleByteBoundaryInMiddle() throws Exception {
- checkBoundaryDetection("xyz" + getFullBoundary("a") + "123", "a", "xyz");
+ checkBoundaryDetection("xyz" + getFullBoundary("a") + "123", "a",
+ "xyz");
}
@Test
@@ -78,13 +79,14 @@ public class SimpleMultiPartInputStreamTest {
checkBoundaryDetection(getFullBoundary("aa") + "xyz123", "aa", "");
checkBoundaryDetection("axyz" + getFullBoundary("aa") + "123", "aa",
"axyz");
- checkBoundaryDetection("xyz123" + getFullBoundary("aa"), "aa", "xyz123");
+ checkBoundaryDetection("xyz123" + getFullBoundary("aa"), "aa",
+ "xyz123");
}
/**
* Note, the boundary in this test is invalid. Boundary strings don't
* contain CR/LF.
- *
+ *
*/
// public void testRepeatingNewlineBoundary() throws Exception {
// checkBoundaryDetection("1234567890" + getFullBoundary("\n\n")
diff --git a/server/src/test/java/com/vaadin/tests/server/StreamResourceTest.java b/server/src/test/java/com/vaadin/tests/server/StreamResourceTest.java
index 4971f556db..9a8b19bf13 100644
--- a/server/src/test/java/com/vaadin/tests/server/StreamResourceTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/StreamResourceTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.server.StreamResource;
import com.vaadin.server.StreamResource.StreamSource;
/**
- *
+ *
* @author Vaadin Ltd
*/
public class StreamResourceTest {
diff --git a/server/src/test/java/com/vaadin/tests/server/StreamVariableMappingTest.java b/server/src/test/java/com/vaadin/tests/server/StreamVariableMappingTest.java
index f93d6095c1..c469b16a95 100644
--- a/server/src/test/java/com/vaadin/tests/server/StreamVariableMappingTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/StreamVariableMappingTest.java
@@ -58,12 +58,12 @@ public class StreamVariableMappingTest {
owner.getUI().getConnectorTracker().registerConnector(owner);
String targetUrl = cm.getStreamVariableTargetUrl(owner, variableName,
streamVariable);
- assertTrue(targetUrl.startsWith("app://APP/UPLOAD/-1/"
- + owner.getConnectorId() + "/myName/"));
+ assertTrue(targetUrl.startsWith(
+ "app://APP/UPLOAD/-1/" + owner.getConnectorId() + "/myName/"));
ConnectorTracker tracker = owner.getUI().getConnectorTracker();
- StreamVariable streamVariable2 = tracker.getStreamVariable(
- owner.getConnectorId(), variableName);
+ StreamVariable streamVariable2 = tracker
+ .getStreamVariable(owner.getConnectorId(), variableName);
assertSame(streamVariable, streamVariable2);
}
diff --git a/server/src/test/java/com/vaadin/tests/server/clientconnector/AttachDetachListenersTest.java b/server/src/test/java/com/vaadin/tests/server/clientconnector/AttachDetachListenersTest.java
index 28c5be29cb..e437708992 100644
--- a/server/src/test/java/com/vaadin/tests/server/clientconnector/AttachDetachListenersTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/clientconnector/AttachDetachListenersTest.java
@@ -148,8 +148,8 @@ public class AttachDetachListenersTest {
control.verify();
}
- public static class EventEquals<E extends ConnectorEvent> implements
- IArgumentMatcher {
+ public static class EventEquals<E extends ConnectorEvent>
+ implements IArgumentMatcher {
private E expected;
diff --git a/server/src/test/java/com/vaadin/tests/server/component/AbstractListenerMethodsTestBase.java b/server/src/test/java/com/vaadin/tests/server/component/AbstractListenerMethodsTestBase.java
index 24201ce51d..305cad2b27 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/AbstractListenerMethodsTestBase.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/AbstractListenerMethodsTestBase.java
@@ -47,19 +47,22 @@ public abstract class AbstractListenerMethodsTestBase {
System.out.println("import "
+ AbstractListenerMethodsTestBase.class
- .getName() + ";");
+ .getName()
+ + ";");
System.out.println("import " + c.getName() + ";");
- System.out.println("public class "
- + c.getSimpleName()
- + "Listeners extends "
- + AbstractListenerMethodsTestBase.class
- .getSimpleName() + " {");
+ System.out
+ .println(
+ "public class " + c.getSimpleName()
+ + "Listeners extends "
+ + AbstractListenerMethodsTestBase.class
+ .getSimpleName()
+ + " {");
}
String listenerClassName = m.getParameterTypes()[0]
.getSimpleName();
- String eventClassName = listenerClassName.replaceFirst(
- "Listener$", "Event");
+ String eventClassName = listenerClassName
+ .replaceFirst("Listener$", "Event");
System.out.println("public void test" + listenerClassName
+ "() throws Exception {");
System.out.println(" testListener(" + c.getSimpleName()
@@ -127,14 +130,16 @@ public abstract class AbstractListenerMethodsTestBase {
private void addListener(Object c, Object listener1, Class<?> listenerClass)
throws IllegalArgumentException, IllegalAccessException,
- InvocationTargetException, SecurityException, NoSuchMethodException {
+ InvocationTargetException, SecurityException,
+ NoSuchMethodException {
Method method = getAddListenerMethod(c.getClass(), listenerClass);
method.invoke(c, listener1);
}
private Collection<?> getListeners(Object c, Class<?> eventType)
throws IllegalArgumentException, IllegalAccessException,
- InvocationTargetException, SecurityException, NoSuchMethodException {
+ InvocationTargetException, SecurityException,
+ NoSuchMethodException {
Method method = getGetListenersMethod(c.getClass());
return (Collection<?>) method.invoke(c, eventType);
}
diff --git a/server/src/test/java/com/vaadin/tests/server/component/ComponentSizeParseTest.java b/server/src/test/java/com/vaadin/tests/server/component/ComponentSizeParseTest.java
index 335963ec1b..c9b21aff0e 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/ComponentSizeParseTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/ComponentSizeParseTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/tests/server/component/DeclarativeMarginTestBase.java b/server/src/test/java/com/vaadin/tests/server/component/DeclarativeMarginTestBase.java
index faaf8ebfc2..e83fa09e9c 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/DeclarativeMarginTestBase.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/DeclarativeMarginTestBase.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -35,7 +35,8 @@ public abstract class DeclarativeMarginTestBase<L extends Layout & MarginHandler
MarginInfo m = new MarginInfo(top, right, bottom, left);
- String design = getMarginTag(componentTag, top, right, bottom, left);
+ String design = getMarginTag(componentTag, top, right, bottom,
+ left);
// The assertEquals machinery in DeclarativeTestBase uses bean
// introspection and MarginInfo is not a proper bean. It ends up
@@ -47,8 +48,8 @@ public abstract class DeclarativeMarginTestBase<L extends Layout & MarginHandler
}
}
- private String getMarginTag(String componentTag, boolean top,
- boolean right, boolean bottom, boolean left) {
+ private String getMarginTag(String componentTag, boolean top, boolean right,
+ boolean bottom, boolean left) {
String s = "<" + componentTag + " ";
if (left && right && top && bottom) {
diff --git a/server/src/test/java/com/vaadin/tests/server/component/FieldDefaultValuesTest.java b/server/src/test/java/com/vaadin/tests/server/component/FieldDefaultValuesTest.java
index 32f5ef8850..bf8dcce69c 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/FieldDefaultValuesTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/FieldDefaultValuesTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -36,8 +36,10 @@ public class FieldDefaultValuesTest {
Object clearedValue = field.getValue();
- Assert.assertEquals("Expected to get default value after clearing "
- + field.getClass().getName(), originalValue, clearedValue);
+ Assert.assertEquals(
+ "Expected to get default value after clearing "
+ + field.getClass().getName(),
+ originalValue, clearedValue);
}
}
@@ -52,16 +54,17 @@ public class FieldDefaultValuesTest {
field.isEmpty());
} else {
- Assert.assertTrue(field.getClass().getName()
- + " should be empty after being cleared",
+ Assert.assertTrue(
+ field.getClass().getName()
+ + " should be empty after being cleared",
field.isEmpty());
}
}
}
@SuppressWarnings("rawtypes")
- private static List<Field<?>> createFields() throws InstantiationException,
- IllegalAccessException {
+ private static List<Field<?>> createFields()
+ throws InstantiationException, IllegalAccessException {
List<Field<?>> fieldInstances = new ArrayList<Field<?>>();
for (Class<? extends Field> fieldType : VaadinClasses.getFields()) {
diff --git a/server/src/test/java/com/vaadin/tests/server/component/ReadEmptyDesignTest.java b/server/src/test/java/com/vaadin/tests/server/component/ReadEmptyDesignTest.java
index 146c633789..647d22d0d4 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/ReadEmptyDesignTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/ReadEmptyDesignTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -57,7 +57,8 @@ public class ReadEmptyDesignTest {
public void testReadContext() {
DesignContext ctx = Design.read(is, null);
assertNotNull("The design context should not be null.", ctx);
- assertNull("The root component should be null.", ctx.getRootComponent());
+ assertNull("The root component should be null.",
+ ctx.getRootComponent());
}
@Test
diff --git a/server/src/test/java/com/vaadin/tests/server/component/StateGetDoesNotMarkDirtyTest.java b/server/src/test/java/com/vaadin/tests/server/component/StateGetDoesNotMarkDirtyTest.java
index 2ae845716d..07a7afbfe5 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/StateGetDoesNotMarkDirtyTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/StateGetDoesNotMarkDirtyTest.java
@@ -48,8 +48,8 @@ public class StateGetDoesNotMarkDirtyTest {
// we still wouldnt know what to put into
continue;
}
- if (excludedMethods.contains(c.getName()
- + method.getName())) {
+ if (excludedMethods
+ .contains(c.getName() + method.getName())) {
// blacklisted method for specific classes
continue;
}
diff --git a/server/src/test/java/com/vaadin/tests/server/component/WriteEmptyDesignTest.java b/server/src/test/java/com/vaadin/tests/server/component/WriteEmptyDesignTest.java
index 85d25aec79..544c732788 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/WriteEmptyDesignTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/WriteEmptyDesignTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -54,7 +54,7 @@ public class WriteEmptyDesignTest {
private void checkHtml(String html) {
Document doc = Jsoup.parse(html);
Element body = doc.body();
- Assert.assertEquals("There should be no elements in the html body.",
- "", body.html());
+ Assert.assertEquals("There should be no elements in the html body.", "",
+ body.html());
}
} \ No newline at end of file
diff --git a/server/src/test/java/com/vaadin/tests/server/component/absolutelayout/AbsoluteLayoutDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/absolutelayout/AbsoluteLayoutDeclarativeTest.java
index f00eb91c50..c3066810c2 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/absolutelayout/AbsoluteLayoutDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/absolutelayout/AbsoluteLayoutDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,12 +23,12 @@ import com.vaadin.ui.Button;
/**
* Tests declarative support for implementations of {@link AbsoluteLayout}.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
-public class AbsoluteLayoutDeclarativeTest extends
- DeclarativeTestBase<AbsoluteLayout> {
+public class AbsoluteLayoutDeclarativeTest
+ extends DeclarativeTestBase<AbsoluteLayout> {
@Test
public void testAbsoluteLayoutFeatures() {
diff --git a/server/src/test/java/com/vaadin/tests/server/component/absolutelayout/AbsoluteLayoutListenersTest.java b/server/src/test/java/com/vaadin/tests/server/component/absolutelayout/AbsoluteLayoutListenersTest.java
index ece4b5f380..4e83ac157e 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/absolutelayout/AbsoluteLayoutListenersTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/absolutelayout/AbsoluteLayoutListenersTest.java
@@ -5,8 +5,8 @@ import com.vaadin.event.LayoutEvents.LayoutClickListener;
import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
import com.vaadin.ui.AbsoluteLayout;
-public class AbsoluteLayoutListenersTest extends
- AbstractListenerMethodsTestBase {
+public class AbsoluteLayoutListenersTest
+ extends AbstractListenerMethodsTestBase {
public void testLayoutClickListenerAddGetRemove() throws Exception {
testListenerAddGetRemove(AbsoluteLayout.class, LayoutClickEvent.class,
LayoutClickListener.class);
diff --git a/server/src/test/java/com/vaadin/tests/server/component/absolutelayout/AddComponentsTest.java b/server/src/test/java/com/vaadin/tests/server/component/absolutelayout/AddComponentsTest.java
index 96f27851cf..166a456944 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/absolutelayout/AddComponentsTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/absolutelayout/AddComponentsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.ui.Button;
/**
* Tests adding of components to {@link AbsoluteLayout}
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/server/src/test/java/com/vaadin/tests/server/component/absolutelayout/ComponentPositionTest.java b/server/src/test/java/com/vaadin/tests/server/component/absolutelayout/ComponentPositionTest.java
index 20a85edea5..8683926c9c 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/absolutelayout/ComponentPositionTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/absolutelayout/ComponentPositionTest.java
@@ -58,11 +58,11 @@ public class ComponentPositionTest {
assertEquals(CSS_VALUE, layout.getPosition(b).getRightValue());
assertEquals(Sizeable.Unit.PIXELS, layout.getPosition(b).getTopUnits());
- assertEquals(Sizeable.Unit.PICAS, layout.getPosition(b)
- .getBottomUnits());
+ assertEquals(Sizeable.Unit.PICAS,
+ layout.getPosition(b).getBottomUnits());
assertEquals(Sizeable.Unit.EM, layout.getPosition(b).getLeftUnits());
- assertEquals(Sizeable.Unit.PERCENTAGE, layout.getPosition(b)
- .getRightUnits());
+ assertEquals(Sizeable.Unit.PERCENTAGE,
+ layout.getPosition(b).getRightUnits());
assertEquals(7, layout.getPosition(b).getZIndex());
@@ -152,7 +152,8 @@ public class ComponentPositionTest {
assertEquals(Sizeable.Unit.CM, layout.getPosition(b).getTopUnits());
assertEquals(Sizeable.Unit.EX, layout.getPosition(b).getRightUnits());
- assertEquals(Sizeable.Unit.INCH, layout.getPosition(b).getBottomUnits());
+ assertEquals(Sizeable.Unit.INCH,
+ layout.getPosition(b).getBottomUnits());
assertEquals(Sizeable.Unit.MM, layout.getPosition(b).getLeftUnits());
}
@@ -180,7 +181,8 @@ public class ComponentPositionTest {
assertEquals(Sizeable.Unit.CM, layout.getPosition(b).getTopUnits());
assertEquals(Sizeable.Unit.EX, layout.getPosition(b).getRightUnits());
- assertEquals(Sizeable.Unit.INCH, layout.getPosition(b).getBottomUnits());
+ assertEquals(Sizeable.Unit.INCH,
+ layout.getPosition(b).getBottomUnits());
assertEquals(Sizeable.Unit.MM, layout.getPosition(b).getLeftUnits());
}
diff --git a/server/src/test/java/com/vaadin/tests/server/component/abstractcomponent/AbstractComponentDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/abstractcomponent/AbstractComponentDeclarativeTest.java
index 1588471395..8440477990 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/abstractcomponent/AbstractComponentDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/abstractcomponent/AbstractComponentDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -46,12 +46,12 @@ import com.vaadin.ui.declarative.DesignContext;
/**
* Test cases for reading and writing the properties of AbstractComponent.
- *
+ *
* @since
* @author Vaadin Ltd
*/
-public class AbstractComponentDeclarativeTest extends
- DeclarativeTestBase<AbstractComponent> {
+public class AbstractComponentDeclarativeTest
+ extends DeclarativeTestBase<AbstractComponent> {
private AbstractComponent component;
@@ -100,8 +100,8 @@ public class AbstractComponentDeclarativeTest extends
boolean[] immediate = { false, false, true, true };
for (int i = 0; i < design.length; i++) {
component = (AbstractComponent) Design
- .read(new ByteArrayInputStream(design[i].getBytes(Charset
- .forName("UTF-8"))));
+ .read(new ByteArrayInputStream(
+ design[i].getBytes(Charset.forName("UTF-8"))));
assertEquals(immediate[i], component.isImmediate());
assertEquals(explicitImmediate[i], getExplicitImmediate(component));
}
@@ -110,8 +110,8 @@ public class AbstractComponentDeclarativeTest extends
@Test
public void testExternalIcon() {
String design = "<vaadin-label icon=\"http://example.com/example.gif\"/>";
- component
- .setIcon(new ExternalResource("http://example.com/example.gif"));
+ component.setIcon(
+ new ExternalResource("http://example.com/example.gif"));
testRead(design, component);
testWrite(design, component);
}
@@ -220,8 +220,8 @@ public class AbstractComponentDeclarativeTest extends
Responsive.makeResponsive(component);
Element design = createDesign(true);
component.readDesign(design, new DesignContext());
- assertEquals("Component should have only one extension", 1, component
- .getExtensions().size());
+ assertEquals("Component should have only one extension", 1,
+ component.getExtensions().size());
}
@Test
diff --git a/server/src/test/java/com/vaadin/tests/server/component/abstractcomponentcontainer/AbstractComponentContainerListenersTest.java b/server/src/test/java/com/vaadin/tests/server/component/abstractcomponentcontainer/AbstractComponentContainerListenersTest.java
index 76fe3c1681..d78ae26580 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/abstractcomponentcontainer/AbstractComponentContainerListenersTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/abstractcomponentcontainer/AbstractComponentContainerListenersTest.java
@@ -10,8 +10,8 @@ import com.vaadin.ui.HasComponents.ComponentDetachListener;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.VerticalLayout;
-public class AbstractComponentContainerListenersTest extends
- AbstractListenerMethodsTestBase {
+public class AbstractComponentContainerListenersTest
+ extends AbstractListenerMethodsTestBase {
@Test
public void testComponentDetachListenerAddGetRemove() throws Exception {
diff --git a/server/src/test/java/com/vaadin/tests/server/component/abstractcomponentcontainer/AddParentAsChildTest.java b/server/src/test/java/com/vaadin/tests/server/component/abstractcomponentcontainer/AddParentAsChildTest.java
index 176d178112..9471837bd8 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/abstractcomponentcontainer/AddParentAsChildTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/abstractcomponentcontainer/AddParentAsChildTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,7 +27,7 @@ import com.vaadin.ui.HasComponents;
/**
* Tests for avoiding add parent as child for
* {@link AbstractComponentContainer#addComponent(Component)}
- *
+ *
* @author Vaadin Ltd
*/
public class AddParentAsChildTest {
diff --git a/server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbsFieldValidatorsTest.java b/server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbsFieldValidatorsTest.java
index 59831d92e1..85f4136b5d 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbsFieldValidatorsTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbsFieldValidatorsTest.java
@@ -89,8 +89,7 @@ public class AbsFieldValidatorsTest {
public void removeValidatorMakesNonImmediate() {
field.addValidator(validator);
field.removeValidator(validator);
- assertFalse(
- "field should be non-immediate after validator was removed",
+ assertFalse("field should be non-immediate after validator was removed",
field.isImmediate());
}
@@ -109,8 +108,7 @@ public class AbsFieldValidatorsTest {
field.isImmediate());
field.setRequired(true);
field.setRequired(false);
- assertFalse(
- "field should not be immediate even though it was required",
+ assertFalse("field should not be immediate even though it was required",
field.isImmediate());
}
diff --git a/server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbsFieldValueConversionErrorTest.java b/server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbsFieldValueConversionErrorTest.java
index e428155ccd..759705e1d9 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbsFieldValueConversionErrorTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbsFieldValueConversionErrorTest.java
@@ -18,8 +18,8 @@ import com.vaadin.ui.TextField;
public class AbsFieldValueConversionErrorTest {
Person paulaBean = new Person("Paula", "Brilliant", "paula@brilliant.com",
- 34, Sex.FEMALE, new Address("Paula street 1", 12345, "P-town",
- Country.FINLAND));
+ 34, Sex.FEMALE,
+ new Address("Paula street 1", 12345, "P-town", Country.FINLAND));
@Test
public void testValidateConversionErrorParameters() {
diff --git a/server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbsFieldValueConversionsTest.java b/server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbsFieldValueConversionsTest.java
index 3456e7c09e..3154c56975 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbsFieldValueConversionsTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbsFieldValueConversionsTest.java
@@ -26,8 +26,8 @@ import com.vaadin.ui.TextField;
public class AbsFieldValueConversionsTest {
Person paulaBean = new Person("Paula", "Brilliant", "paula@brilliant.com",
- 34, Sex.FEMALE, new Address("Paula street 1", 12345, "P-town",
- Country.FINLAND));
+ 34, Sex.FEMALE,
+ new Address("Paula street 1", 12345, "P-town", Country.FINLAND));
/**
* Java uses a non-breaking space (ascii 160) instead of space when
@@ -38,8 +38,8 @@ public class AbsFieldValueConversionsTest {
@Test
public void testWithoutConversion() {
TextField tf = new TextField();
- tf.setPropertyDataSource(new MethodProperty<String>(paulaBean,
- "firstName"));
+ tf.setPropertyDataSource(
+ new MethodProperty<String>(paulaBean, "firstName"));
assertEquals("Paula", tf.getValue());
assertEquals("Paula", tf.getPropertyDataSource().getValue());
tf.setValue("abc");
@@ -112,8 +112,8 @@ public class AbsFieldValueConversionsTest {
return String.class;
}
});
- tf.setPropertyDataSource(new MethodProperty<String>(paulaBean,
- "firstName"));
+ tf.setPropertyDataSource(
+ new MethodProperty<String>(paulaBean, "firstName"));
assertEquals("Paula", tf.getValue());
assertEquals("Paula", tf.getPropertyDataSource().getValue());
tf.setValue("abc");
@@ -266,7 +266,8 @@ public class AbsFieldValueConversionsTest {
try {
Object v = tf.getConvertedValue();
System.out.println(v);
- Assert.fail("Trying to convert String -> Integer should fail when there is no converter");
+ Assert.fail(
+ "Trying to convert String -> Integer should fail when there is no converter");
} catch (ConversionException e) {
// ok, should happen when there is no converter but conversion is
// needed
diff --git a/server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbstractFieldDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbstractFieldDeclarativeTest.java
index 96ed8b6f1e..854f238ba6 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbstractFieldDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbstractFieldDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,12 +24,12 @@ import com.vaadin.ui.TextField;
/**
* Tests declarative support for implementations of {@link AbstractField}.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
-public class AbstractFieldDeclarativeTest extends
- DeclarativeTestBase<AbstractField<?>> {
+public class AbstractFieldDeclarativeTest
+ extends DeclarativeTestBase<AbstractField<?>> {
@Test
public void testPlainText() {
diff --git a/server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbstractFieldListenersTest.java b/server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbstractFieldListenersTest.java
index d23d63e3e9..e3d3eec94a 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbstractFieldListenersTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbstractFieldListenersTest.java
@@ -9,10 +9,12 @@ import com.vaadin.data.Property.ValueChangeListener;
import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
import com.vaadin.ui.CheckBox;
-public class AbstractFieldListenersTest extends AbstractListenerMethodsTestBase {
+public class AbstractFieldListenersTest
+ extends AbstractListenerMethodsTestBase {
@Test
- public void testReadOnlyStatusChangeListenerAddGetRemove() throws Exception {
+ public void testReadOnlyStatusChangeListenerAddGetRemove()
+ throws Exception {
testListenerAddGetRemove(CheckBox.class,
ReadOnlyStatusChangeEvent.class,
ReadOnlyStatusChangeListener.class);
diff --git a/server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbstractFieldReadOnlyTest.java b/server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbstractFieldReadOnlyTest.java
index 756004a662..0c29ff25a1 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbstractFieldReadOnlyTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbstractFieldReadOnlyTest.java
@@ -18,14 +18,14 @@ import com.vaadin.ui.TextField;
public class AbstractFieldReadOnlyTest {
Person paulaBean = new Person("Paula", "Brilliant", "paula@brilliant.com",
- 34, Sex.FEMALE, new Address("Paula street 1", 12345, "P-town",
- Country.FINLAND));
+ 34, Sex.FEMALE,
+ new Address("Paula street 1", 12345, "P-town", Country.FINLAND));
@Test
public void testReadOnlyProperty() {
TextField tf = new TextField();
- tf.setPropertyDataSource(new MethodProperty<String>(paulaBean,
- "firstName"));
+ tf.setPropertyDataSource(
+ new MethodProperty<String>(paulaBean, "firstName"));
assertFalse(tf.isReadOnly());
tf.getPropertyDataSource().setReadOnly(true);
assertTrue(tf.isReadOnly());
@@ -41,8 +41,8 @@ public class AbstractFieldReadOnlyTest {
valueStore.setValue("event received!");
}
});
- tf.setPropertyDataSource(new MethodProperty<String>(paulaBean,
- "firstName"));
+ tf.setPropertyDataSource(
+ new MethodProperty<String>(paulaBean, "firstName"));
assertTrue(valueStore.getValue().isEmpty());
tf.getPropertyDataSource().setReadOnly(true);
assertFalse(valueStore.getValue().isEmpty());
diff --git a/server/src/test/java/com/vaadin/tests/server/component/abstractfield/DefaultConverterFactoryTest.java b/server/src/test/java/com/vaadin/tests/server/component/abstractfield/DefaultConverterFactoryTest.java
index 31158b1f09..c691807c87 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/abstractfield/DefaultConverterFactoryTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/abstractfield/DefaultConverterFactoryTest.java
@@ -73,8 +73,8 @@ public class DefaultConverterFactoryTest {
}
Person paulaBean = new Person("Paula", "Brilliant", "paula@brilliant.com",
- 34, Sex.FEMALE, new Address("Paula street 1", 12345, "P-town",
- Country.FINLAND));
+ 34, Sex.FEMALE,
+ new Address("Paula street 1", 12345, "P-town", Country.FINLAND));
{
paulaBean.setSalary(49000);
BigDecimal rent = new BigDecimal(57223);
@@ -89,8 +89,8 @@ public class DefaultConverterFactoryTest {
TextField tf = new TextField();
tf.setLocale(new Locale("en", "US"));
- tf.setPropertyDataSource(new MethodProperty<Integer>(new FloatBean(12f,
- 23f), "f2"));
+ tf.setPropertyDataSource(
+ new MethodProperty<Integer>(new FloatBean(12f, 23f), "f2"));
assertEquals("23", tf.getValue());
tf.setValue("24");
assertEquals("24", tf.getValue());
@@ -105,8 +105,8 @@ public class DefaultConverterFactoryTest {
TextField tf = new TextField();
tf.setLocale(new Locale("en", "US"));
- tf.setPropertyDataSource(new MethodProperty<Integer>(new LongBean(12,
- 1982739187238L), "l2"));
+ tf.setPropertyDataSource(new MethodProperty<Integer>(
+ new LongBean(12, 1982739187238L), "l2"));
assertEquals("1,982,739,187,238", tf.getValue());
tf.setValue("1982739187239");
assertEquals("1,982,739,187,239", tf.getValue());
@@ -120,15 +120,15 @@ public class DefaultConverterFactoryTest {
VaadinSession.setCurrent(app);
TextField tf = new TextField();
tf.setLocale(new Locale("en", "US"));
- tf.setPropertyDataSource(new MethodProperty<Integer>(paulaBean,
- "salary"));
+ tf.setPropertyDataSource(
+ new MethodProperty<Integer>(paulaBean, "salary"));
assertEquals("49,000", tf.getValue());
tf.setLocale(new Locale("fi", "FI"));
// FIXME: The following line should not be necessary and should be
// removed
- tf.setPropertyDataSource(new MethodProperty<Integer>(paulaBean,
- "salary"));
+ tf.setPropertyDataSource(
+ new MethodProperty<Integer>(paulaBean, "salary"));
String value = tf.getValue();
// Java uses a non-breaking space (ascii 160) instead of space when
// formatting
diff --git a/server/src/test/java/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetachTest.java b/server/src/test/java/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetachTest.java
index f547f2c66b..c2455e05e5 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetachTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetachTest.java
@@ -71,8 +71,8 @@ public class RemoveListenersOnDetachTest {
}
@Override
- public void setValue(String newValue) throws ReadOnlyException,
- ConversionException {
+ public void setValue(String newValue)
+ throws ReadOnlyException, ConversionException {
fireValueChange();
}
diff --git a/server/src/test/java/com/vaadin/tests/server/component/abstractorderedlayout/AbstractOrderedLayoutDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/abstractorderedlayout/AbstractOrderedLayoutDeclarativeTest.java
index 87f810d562..644ee7855f 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/abstractorderedlayout/AbstractOrderedLayoutDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/abstractorderedlayout/AbstractOrderedLayoutDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,15 +30,15 @@ import com.vaadin.ui.VerticalLayout;
/**
* Tests declarative support for AbstractOrderedLayout.
- *
+ *
* @since
* @author Vaadin Ltd
*/
-public class AbstractOrderedLayoutDeclarativeTest extends
- DeclarativeMarginTestBase<AbstractOrderedLayout> {
+public class AbstractOrderedLayoutDeclarativeTest
+ extends DeclarativeMarginTestBase<AbstractOrderedLayout> {
- private List<String> defaultAlignments = Arrays.asList(new String[] {
- ":top", ":left" });
+ private List<String> defaultAlignments = Arrays
+ .asList(new String[] { ":top", ":left" });
@Test
public void testMargins() {
@@ -76,8 +76,8 @@ public class AbstractOrderedLayoutDeclarativeTest extends
private String getDesign(float expandRatio, String... alignments) {
String result = "<vaadin-vertical-layout caption=test-layout>";
result += "<vaadin-label caption=test-label ";
- String ratioString = expandRatio == 1.0f ? null : String
- .valueOf(expandRatio);
+ String ratioString = expandRatio == 1.0f ? null
+ : String.valueOf(expandRatio);
if (expandRatio != 0) {
if (ratioString == null) {
result += ":expand";
diff --git a/server/src/test/java/com/vaadin/tests/server/component/abstractorderedlayout/AbstractOrderedLayoutListenersTest.java b/server/src/test/java/com/vaadin/tests/server/component/abstractorderedlayout/AbstractOrderedLayoutListenersTest.java
index e7393e5f7d..afd79a00e5 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/abstractorderedlayout/AbstractOrderedLayoutListenersTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/abstractorderedlayout/AbstractOrderedLayoutListenersTest.java
@@ -5,8 +5,8 @@ import com.vaadin.event.LayoutEvents.LayoutClickListener;
import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
import com.vaadin.ui.VerticalLayout;
-public class AbstractOrderedLayoutListenersTest extends
- AbstractListenerMethodsTestBase {
+public class AbstractOrderedLayoutListenersTest
+ extends AbstractListenerMethodsTestBase {
public void testLayoutClickListenerAddGetRemove() throws Exception {
testListenerAddGetRemove(VerticalLayout.class, LayoutClickEvent.class,
LayoutClickListener.class);
diff --git a/server/src/test/java/com/vaadin/tests/server/component/abstractorderedlayout/LayoutSettingsOnReplaceTest.java b/server/src/test/java/com/vaadin/tests/server/component/abstractorderedlayout/LayoutSettingsOnReplaceTest.java
index 9d1972c232..3e649de125 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/abstractorderedlayout/LayoutSettingsOnReplaceTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/abstractorderedlayout/LayoutSettingsOnReplaceTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.ui.Alignment;
/**
* Tests for abstract layout settings which should be preserved on replace
* component
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
@@ -52,9 +52,10 @@ public class LayoutSettingsOnReplaceTest {
};
layout.replaceComponent(first, replace);
- Assert.assertEquals("Expand ratio for replaced component is not "
- + "the same as for previous one", ratio,
- layout.getExpandRatio(replace), 0.0001);
+ Assert.assertEquals(
+ "Expand ratio for replaced component is not "
+ + "the same as for previous one",
+ ratio, layout.getExpandRatio(replace), 0.0001);
}
@Test
@@ -78,8 +79,9 @@ public class LayoutSettingsOnReplaceTest {
};
layout.replaceComponent(first, replace);
- Assert.assertEquals("Alignment for replaced component is not "
- + "the same as for previous one", alignment,
- layout.getComponentAlignment(replace));
+ Assert.assertEquals(
+ "Alignment for replaced component is not "
+ + "the same as for previous one",
+ alignment, layout.getComponentAlignment(replace));
}
}
diff --git a/server/src/test/java/com/vaadin/tests/server/component/abstractselect/AbstractSelectDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/abstractselect/AbstractSelectDeclarativeTest.java
index 6800320753..1b5b453982 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/abstractselect/AbstractSelectDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/abstractselect/AbstractSelectDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -36,11 +36,11 @@ import com.vaadin.ui.declarative.DesignException;
/**
* Test cases for reading the properties of selection components.
- *
+ *
* @author Vaadin Ltd
*/
-public class AbstractSelectDeclarativeTest extends
- DeclarativeTestBase<AbstractSelect> {
+public class AbstractSelectDeclarativeTest
+ extends DeclarativeTestBase<AbstractSelect> {
public String getDesignSingleSelectNewItemsAllowed() {
return "<vaadin-combo-box new-items-allowed item-caption-mode='icon_only'"
@@ -100,7 +100,8 @@ public class AbstractSelectDeclarativeTest extends
@Test(expected = DesignException.class)
public void testReadMultipleValuesForSingleSelect() {
testRead("<vaadin-list-select>" + "<option selected>1</option>"
- + "<option selected>2</option>" + "</vaadin-list-select>", null);
+ + "<option selected>2</option>" + "</vaadin-list-select>",
+ null);
}
@Test
@@ -148,8 +149,8 @@ public class AbstractSelectDeclarativeTest extends
@Test
public void testWriteInlineData() {
- testWrite(getDesignForInlineData(),
- getExpectedComponentForInlineData(), true);
+ testWrite(getDesignForInlineData(), getExpectedComponentForInlineData(),
+ true);
}
private String getDesignForInlineData() {
@@ -162,8 +163,8 @@ public class AbstractSelectDeclarativeTest extends
private AbstractSelect getExpectedComponentForInlineData() {
AbstractSelect as = new ListSelect();
as.addItem("Value 1");
- as.setItemIcon("Value 1", new ExternalResource(
- "http://some.url/icon.png"));
+ as.setItemIcon("Value 1",
+ new ExternalResource("http://some.url/icon.png"));
as.addItem("Value 2");
as.setValue("Value 2");
return as;
@@ -198,7 +199,8 @@ public class AbstractSelectDeclarativeTest extends
Element design = createDesignWithAttributesMultiSelect();
ListSelect ls = new ListSelect();
ls.readDesign(design, new DesignContext());
- Assert.assertTrue("Multi select should be allowed.", ls.isMultiSelect());
+ Assert.assertTrue("Multi select should be allowed.",
+ ls.isMultiSelect());
assertEquals("Wrong caption mode.",
AbstractSelect.ItemCaptionMode.EXPLICIT,
ls.getItemCaptionMode());
@@ -239,8 +241,7 @@ public class AbstractSelectDeclarativeTest extends
e.attr("item-caption-mode"));
assertEquals("Wrong item icon property id.", "icon",
e.attr("item-icon-property-id"));
- Assert.assertTrue(
- "Null selection should be allowed.",
+ Assert.assertTrue("Null selection should be allowed.",
"".equals(e.attr("null-selection-allowed"))
|| "true".equals(e.attr("null-selection-allowed")));
assertEquals("Wrong null selection item id.", "No item selected",
@@ -254,8 +255,7 @@ public class AbstractSelectDeclarativeTest extends
ls.writeDesign(e, new DesignContext());
assertEquals("Null selection should not be allowed.", "false",
e.attr("null-selection-allowed"));
- Assert.assertTrue(
- "Multi select should be allowed.",
+ Assert.assertTrue("Multi select should be allowed.",
"".equals(e.attr("multi-select"))
|| "true".equals(e.attr("multi-select")));
}
@@ -274,11 +274,12 @@ public class AbstractSelectDeclarativeTest extends
Element root = new Element(Tag.valueOf("vaadin-combo-box"), "");
DesignContext dc = new DesignContext();
- dc.setShouldWriteDataDelegate(DeclarativeTestBaseBase.ALWAYS_WRITE_DATA);
+ dc.setShouldWriteDataDelegate(
+ DeclarativeTestBaseBase.ALWAYS_WRITE_DATA);
underTest.writeDesign(root, dc);
- Assert.assertEquals("&gt; One", root.getElementsByTag("option").first()
- .html());
+ Assert.assertEquals("&gt; One",
+ root.getElementsByTag("option").first().html());
}
public ComboBox createSingleSelectWithOnlyAttributes() {
diff --git a/server/src/test/java/com/vaadin/tests/server/component/abstractselect/AbstractSelectListenersTest.java b/server/src/test/java/com/vaadin/tests/server/component/abstractselect/AbstractSelectListenersTest.java
index cedc582b57..7fc584e3d5 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/abstractselect/AbstractSelectListenersTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/abstractselect/AbstractSelectListenersTest.java
@@ -9,8 +9,8 @@ import com.vaadin.data.Container.PropertySetChangeListener;
import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
import com.vaadin.ui.ComboBox;
-public class AbstractSelectListenersTest extends
- AbstractListenerMethodsTestBase {
+public class AbstractSelectListenersTest
+ extends AbstractListenerMethodsTestBase {
@Test
public void testItemSetChangeListenerAddGetRemove() throws Exception {
diff --git a/server/src/test/java/com/vaadin/tests/server/component/abstractselect/AbstractSelectStateTest.java b/server/src/test/java/com/vaadin/tests/server/component/abstractselect/AbstractSelectStateTest.java
index 52b215f4c8..5d27c49a9a 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/abstractselect/AbstractSelectStateTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/abstractselect/AbstractSelectStateTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.ui.AbstractSelect;
/**
* Tests for AbstractSelect state
- *
+ *
*/
public class AbstractSelectStateTest {
@@ -31,8 +31,8 @@ public class AbstractSelectStateTest {
public void getState_selectHasCustomState() {
TestSelect select = new TestSelect();
AbstractSelectState state = select.getState();
- Assert.assertEquals("Unexpected state class",
- AbstractSelectState.class, state.getClass());
+ Assert.assertEquals("Unexpected state class", AbstractSelectState.class,
+ state.getClass());
}
@Test
diff --git a/server/src/test/java/com/vaadin/tests/server/component/abstractselect/OptionGroupDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/abstractselect/OptionGroupDeclarativeTest.java
index 1b8b2f3bef..b6dc8fa01f 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/abstractselect/OptionGroupDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/abstractselect/OptionGroupDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,8 +22,8 @@ import com.vaadin.server.ThemeResource;
import com.vaadin.tests.design.DeclarativeTestBase;
import com.vaadin.ui.OptionGroup;
-public class OptionGroupDeclarativeTest extends
- DeclarativeTestBase<OptionGroup> {
+public class OptionGroupDeclarativeTest
+ extends DeclarativeTestBase<OptionGroup> {
private OptionGroup og;
diff --git a/server/src/test/java/com/vaadin/tests/server/component/abstractsinglecomponentcontainer/RemoveFromParentLockingTest.java b/server/src/test/java/com/vaadin/tests/server/component/abstractsinglecomponentcontainer/RemoveFromParentLockingTest.java
index c8db6ac292..52b0d81ef1 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/abstractsinglecomponentcontainer/RemoveFromParentLockingTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/abstractsinglecomponentcontainer/RemoveFromParentLockingTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,8 +32,7 @@ public class RemoveFromParentLockingTest {
@Before
@After
- public void cleanCurrentSession()
- {
+ public void cleanCurrentSession() {
VaadinSession.setCurrent(null);
}
diff --git a/server/src/test/java/com/vaadin/tests/server/component/abstractsinglecomponentcontainer/SetParentAsContentTest.java b/server/src/test/java/com/vaadin/tests/server/component/abstractsinglecomponentcontainer/SetParentAsContentTest.java
index b84794d58a..0904aba147 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/abstractsinglecomponentcontainer/SetParentAsContentTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/abstractsinglecomponentcontainer/SetParentAsContentTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,10 +23,10 @@ import com.vaadin.ui.Component;
import com.vaadin.ui.HasComponents;
/**
- *
+ *
* Tests for avoiding set parent as child for
* {@link AbstractSingleComponentContainer#setContent(Component)}
- *
+ *
* @author Vaadin Ltd
*/
public class SetParentAsContentTest {
diff --git a/server/src/test/java/com/vaadin/tests/server/component/abstractsplitpanel/AbstractSplitPanelDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/abstractsplitpanel/AbstractSplitPanelDeclarativeTest.java
index 02094cb611..42d4ff9612 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/abstractsplitpanel/AbstractSplitPanelDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/abstractsplitpanel/AbstractSplitPanelDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,12 +28,12 @@ import com.vaadin.ui.VerticalSplitPanel;
/**
* Tests declarative support for AbstractSplitPanel.
- *
+ *
* @since
* @author Vaadin Ltd
*/
-public class AbstractSplitPanelDeclarativeTest extends
- DeclarativeTestBase<AbstractSplitPanel> {
+public class AbstractSplitPanelDeclarativeTest
+ extends DeclarativeTestBase<AbstractSplitPanel> {
@Test
public void testWithBothChildren() {
diff --git a/server/src/test/java/com/vaadin/tests/server/component/abstractsplitpanel/AbstractSplitPanelListenersTest.java b/server/src/test/java/com/vaadin/tests/server/component/abstractsplitpanel/AbstractSplitPanelListenersTest.java
index 5dd2f406bc..d6c12ca2d8 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/abstractsplitpanel/AbstractSplitPanelListenersTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/abstractsplitpanel/AbstractSplitPanelListenersTest.java
@@ -5,8 +5,8 @@ import com.vaadin.ui.AbstractSplitPanel.SplitterClickEvent;
import com.vaadin.ui.AbstractSplitPanel.SplitterClickListener;
import com.vaadin.ui.HorizontalSplitPanel;
-public class AbstractSplitPanelListenersTest extends
- AbstractListenerMethodsTestBase {
+public class AbstractSplitPanelListenersTest
+ extends AbstractListenerMethodsTestBase {
public void testSplitterClickListenerAddGetRemove() throws Exception {
testListenerAddGetRemove(HorizontalSplitPanel.class,
SplitterClickEvent.class, SplitterClickListener.class);
diff --git a/server/src/test/java/com/vaadin/tests/server/component/abstracttextfield/AbstractTextFieldDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/abstracttextfield/AbstractTextFieldDeclarativeTest.java
index 275cca33a0..c1104c5897 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/abstracttextfield/AbstractTextFieldDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/abstracttextfield/AbstractTextFieldDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,12 +24,12 @@ import com.vaadin.ui.TextField;
/**
* Tests declarative support for AbstractTextField.
- *
+ *
* @since
* @author Vaadin Ltd
*/
-public class AbstractTextFieldDeclarativeTest extends
- DeclarativeTestBase<AbstractTextField> {
+public class AbstractTextFieldDeclarativeTest
+ extends DeclarativeTestBase<AbstractTextField> {
@Test
public void testAttributes() {
diff --git a/server/src/test/java/com/vaadin/tests/server/component/abstracttextfield/AbstractTextFieldListenersTest.java b/server/src/test/java/com/vaadin/tests/server/component/abstracttextfield/AbstractTextFieldListenersTest.java
index 0641489e0e..e70f4b0979 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/abstracttextfield/AbstractTextFieldListenersTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/abstracttextfield/AbstractTextFieldListenersTest.java
@@ -11,8 +11,8 @@ import com.vaadin.event.FieldEvents.TextChangeListener;
import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
import com.vaadin.ui.TextField;
-public class AbstractTextFieldListenersTest extends
- AbstractListenerMethodsTestBase {
+public class AbstractTextFieldListenersTest
+ extends AbstractListenerMethodsTestBase {
@Test
public void testTextChangeListenerAddGetRemove() throws Exception {
diff --git a/server/src/test/java/com/vaadin/tests/server/component/audio/AudioDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/audio/AudioDeclarativeTest.java
index f9bfd2d316..a84e875e37 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/audio/AudioDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/audio/AudioDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,7 +27,7 @@ import com.vaadin.ui.Audio;
/**
* Tests specs of declarative support for abstract media and its
* implementations.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -55,8 +55,8 @@ public class AudioDeclarativeTest extends DeclarativeTestBase<Audio> {
audio.setMuted(true);
audio.setShowControls(false);
audio.setSources(new ExternalResource("http://foo.pl"),
- new ExternalResource("https://bar.pl"), new FileResource(
- new File("ohai")));
+ new ExternalResource("https://bar.pl"),
+ new FileResource(new File("ohai")));
testRead(design, audio);
testWrite(design, audio);
}
diff --git a/server/src/test/java/com/vaadin/tests/server/component/audio/AudioStateTest.java b/server/src/test/java/com/vaadin/tests/server/component/audio/AudioStateTest.java
index d18127791e..660ce6beb3 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/audio/AudioStateTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/audio/AudioStateTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.ui.Audio;
/**
* Tests for Audio state.
- *
+ *
*/
public class AudioStateTest {
@Test
diff --git a/server/src/test/java/com/vaadin/tests/server/component/audio/VideoDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/audio/VideoDeclarativeTest.java
index dafff32be2..4bf68695aa 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/audio/VideoDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/audio/VideoDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -49,8 +49,8 @@ public class VideoDeclarativeTest extends DeclarativeTestBase<Video> {
video.setMuted(true);
video.setShowControls(false);
video.setSources(new ExternalResource("http://foo.pl"),
- new ExternalResource("https://bar.pl"), new FileResource(
- new File("ohai")));
+ new ExternalResource("https://bar.pl"),
+ new FileResource(new File("ohai")));
video.setPoster(new ExternalResource("http://foo.pl/poster"));
testRead(design, video);
testWrite(design, video);
diff --git a/server/src/test/java/com/vaadin/tests/server/component/browserframe/BrowserFrameDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/browserframe/BrowserFrameDeclarativeTest.java
index b62499a28e..1fa5f1d855 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/browserframe/BrowserFrameDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/browserframe/BrowserFrameDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,12 +23,12 @@ import com.vaadin.ui.BrowserFrame;
/**
* Tests declarative support for implementations of {@link BrowserFrame}.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
-public class BrowserFrameDeclarativeTest extends
- DeclarativeTestBase<BrowserFrame> {
+public class BrowserFrameDeclarativeTest
+ extends DeclarativeTestBase<BrowserFrame> {
protected String getDesign() {
return "<vaadin-browser-frame source='http://foo.bar/some.html' />";
diff --git a/server/src/test/java/com/vaadin/tests/server/component/button/ButtonDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/button/ButtonDeclarativeTest.java
index 439a0d5be0..c2facaf14c 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/button/ButtonDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/button/ButtonDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,7 +30,7 @@ import com.vaadin.ui.declarative.DesignContext;
/**
* Tests declarative support for implementations of {@link Button} and
* {@link NativeButton}.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -86,15 +86,16 @@ public class ButtonDeclarativeTest extends DeclarativeTestBase<Button> {
designPlainText = designPlainText.replace("vaadin-button",
"vaadin-native-button");
Button nativeButton = read(designPlainText);
- Assert.assertEquals(expectedCaptionPlainText, nativeButton.getCaption());
+ Assert.assertEquals(expectedCaptionPlainText,
+ nativeButton.getCaption());
String designHtml = "<vaadin-button>&gt; One</vaadin-button>";
String expectedCaptionHtml = "&gt; One";
read = read(designHtml);
Assert.assertEquals(expectedCaptionHtml, read.getCaption());
- designHtml = designHtml
- .replace("vaadin-button", "vaadin-native-button");
+ designHtml = designHtml.replace("vaadin-button",
+ "vaadin-native-button");
nativeButton = read(designHtml);
Assert.assertEquals(expectedCaptionHtml, nativeButton.getCaption());
diff --git a/server/src/test/java/com/vaadin/tests/server/component/calendar/CalendarBasicsTest.java b/server/src/test/java/com/vaadin/tests/server/component/calendar/CalendarBasicsTest.java
index 1592fb6c38..53cf04addd 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/calendar/CalendarBasicsTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/calendar/CalendarBasicsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -131,8 +131,8 @@ public class CalendarBasicsTest {
// Setting the locale should set the internal calendars locale
assertEquals(Locale.CANADA_FRENCH, calendar.getLocale());
java.util.Calendar c = new GregorianCalendar(Locale.CANADA_FRENCH);
- assertEquals(c.getTimeZone().getRawOffset(), calendar
- .getInternalCalendar().getTimeZone().getRawOffset());
+ assertEquals(c.getTimeZone().getRawOffset(),
+ calendar.getInternalCalendar().getTimeZone().getRawOffset());
}
@Test
@@ -223,8 +223,8 @@ public class CalendarBasicsTest {
calendar.setLocale(Locale.GERMAN);
// simulating consequences of markAsDirty
calendar.beforeClientResponse(true);
- assertEquals(java.util.Calendar.MONDAY, calendar.getInternalCalendar()
- .getFirstDayOfWeek());
+ assertEquals(java.util.Calendar.MONDAY,
+ calendar.getInternalCalendar().getFirstDayOfWeek());
}
@Test
@@ -235,8 +235,8 @@ public class CalendarBasicsTest {
// simulating consequences of markAsDirty
calendar.beforeClientResponse(true);
- assertEquals(java.util.Calendar.SUNDAY, calendar.getInternalCalendar()
- .getFirstDayOfWeek());
+ assertEquals(java.util.Calendar.SUNDAY,
+ calendar.getInternalCalendar().getFirstDayOfWeek());
}
@Test
@@ -247,8 +247,8 @@ public class CalendarBasicsTest {
calendar.setLocale(Locale.GERMAN);
// simulating consequences of markAsDirty
calendar.beforeClientResponse(true);
- assertEquals(java.util.Calendar.SUNDAY, calendar.getInternalCalendar()
- .getFirstDayOfWeek());
+ assertEquals(java.util.Calendar.SUNDAY,
+ calendar.getInternalCalendar().getFirstDayOfWeek());
}
@Test
@@ -259,8 +259,8 @@ public class CalendarBasicsTest {
calendar.setFirstDayOfWeek(null);
// simulating consequences of markAsDirty
calendar.beforeClientResponse(true);
- assertEquals(java.util.Calendar.MONDAY, calendar.getInternalCalendar()
- .getFirstDayOfWeek());
+ assertEquals(java.util.Calendar.MONDAY,
+ calendar.getInternalCalendar().getFirstDayOfWeek());
}
@Test(expected = IllegalArgumentException.class)
diff --git a/server/src/test/java/com/vaadin/tests/server/component/calendar/CalendarDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/calendar/CalendarDeclarativeTest.java
index f0ee8f7298..06b77852e8 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/calendar/CalendarDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/calendar/CalendarDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,7 +30,8 @@ public class CalendarDeclarativeTest extends DeclarativeTestBase<Calendar> {
@Test
public void testEmpty() {
- verifyDeclarativeDesign("<vaadin-calendar></vaadin-calendar>", new Calendar());
+ verifyDeclarativeDesign("<vaadin-calendar></vaadin-calendar>",
+ new Calendar());
}
@Test
diff --git a/server/src/test/java/com/vaadin/tests/server/component/calendar/ContainerDataSourceTest.java b/server/src/test/java/com/vaadin/tests/server/component/calendar/ContainerDataSourceTest.java
index 4bcd5c7192..1c8f76cc27 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/calendar/ContainerDataSourceTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/calendar/ContainerDataSourceTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -64,8 +64,8 @@ public class ContainerDataSourceTest {
Date end = cal.getTime();
// Test the all events are returned
- List<CalendarEvent> events = calendar.getEventProvider().getEvents(
- start, end);
+ List<CalendarEvent> events = calendar.getEventProvider()
+ .getEvents(start, end);
assertEquals(container.size(), events.size());
// Test that a certain range is returned
@@ -102,8 +102,8 @@ public class ContainerDataSourceTest {
Date end = cal.getTime();
// Test the all events are returned
- List<CalendarEvent> events = calendar.getEventProvider().getEvents(
- start, end);
+ List<CalendarEvent> events = calendar.getEventProvider()
+ .getEvents(start, end);
assertEquals(container.size(), events.size());
// Test that a certain range is returned
@@ -137,8 +137,8 @@ public class ContainerDataSourceTest {
Date end = cal.getTime();
// Test the all events are returned
- List<CalendarEvent> events = calendar.getEventProvider().getEvents(
- start, end);
+ List<CalendarEvent> events = calendar.getEventProvider()
+ .getEvents(start, end);
assertEquals(container.size(), events.size());
// Check that event values are present
@@ -171,8 +171,8 @@ public class ContainerDataSourceTest {
calendar.setContainerDataSource(container);
// Test null start time
- List<CalendarEvent> events = calendar.getEventProvider().getEvents(
- null, end);
+ List<CalendarEvent> events = calendar.getEventProvider().getEvents(null,
+ end);
assertEquals(container.size(), events.size());
// Test null end time
@@ -202,8 +202,8 @@ public class ContainerDataSourceTest {
"testDescription", "testStartDate", "testEndDate", null);
// Test null start time
- List<CalendarEvent> events = calendar.getEventProvider().getEvents(
- null, end);
+ List<CalendarEvent> events = calendar.getEventProvider().getEvents(null,
+ end);
assertEquals(container.size(), events.size());
// Test null end time
@@ -366,8 +366,8 @@ public class ContainerDataSourceTest {
CalendarEvent.class);
java.util.Calendar cal = java.util.Calendar.getInstance();
for (int i = 1; i <= 10; i++) {
- eventContainer.addBean(new BasicEvent("Test " + i, "Description "
- + i, cal.getTime()));
+ eventContainer.addBean(new BasicEvent("Test " + i,
+ "Description " + i, cal.getTime()));
cal.add(java.util.Calendar.DAY_OF_MONTH, 2);
}
return eventContainer;
diff --git a/server/src/test/java/com/vaadin/tests/server/component/calendar/ContainerEventProviderTest.java b/server/src/test/java/com/vaadin/tests/server/component/calendar/ContainerEventProviderTest.java
index 63749a2fc9..276f0b5acd 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/calendar/ContainerEventProviderTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/calendar/ContainerEventProviderTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,7 +27,7 @@ import com.vaadin.ui.components.calendar.ContainerEventProvider;
import com.vaadin.ui.components.calendar.event.CalendarEvent;
/**
- *
+ *
* @author Vaadin Ltd
*/
public class ContainerEventProviderTest {
diff --git a/server/src/test/java/com/vaadin/tests/server/component/checkbox/CheckboxDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/checkbox/CheckboxDeclarativeTest.java
index 760d8d2548..7e4c5d488d 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/checkbox/CheckboxDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/checkbox/CheckboxDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ import com.vaadin.ui.CheckBox;
/**
* Tests declarative support for implementations of {@link CheckBox}.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
diff --git a/server/src/test/java/com/vaadin/tests/server/component/colorpicker/AbstractColorPickerDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/colorpicker/AbstractColorPickerDeclarativeTest.java
index 717ba1f45a..ab4db0dab1 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/colorpicker/AbstractColorPickerDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/colorpicker/AbstractColorPickerDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,8 +24,8 @@ import com.vaadin.ui.AbstractColorPicker.PopupStyle;
import com.vaadin.ui.ColorPicker;
import com.vaadin.ui.ColorPickerArea;
-public class AbstractColorPickerDeclarativeTest extends
- DeclarativeTestBase<AbstractColorPicker> {
+public class AbstractColorPickerDeclarativeTest
+ extends DeclarativeTestBase<AbstractColorPicker> {
@Test
public void testAllAbstractColorPickerFeatures() {
diff --git a/server/src/test/java/com/vaadin/tests/server/component/colorpicker/ColorConversionsTest.java b/server/src/test/java/com/vaadin/tests/server/component/colorpicker/ColorConversionsTest.java
index 8c05e58b9c..3d83fdfaa0 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/colorpicker/ColorConversionsTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/colorpicker/ColorConversionsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/tests/server/component/combobox/ComboBoxDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/combobox/ComboBoxDeclarativeTest.java
index fcc7eb97a1..fee04d3ba6 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/combobox/ComboBoxDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/combobox/ComboBoxDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/tests/server/component/combobox/ComboBoxStateTest.java b/server/src/test/java/com/vaadin/tests/server/component/combobox/ComboBoxStateTest.java
index 0908a355de..73eae6e316 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/combobox/ComboBoxStateTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/combobox/ComboBoxStateTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.ui.ComboBox;
/**
* Tests for ComboBox state.
- *
+ *
*/
public class ComboBoxStateTest {
@Test
diff --git a/server/src/test/java/com/vaadin/tests/server/component/csslayout/AddComponentsTest.java b/server/src/test/java/com/vaadin/tests/server/component/csslayout/AddComponentsTest.java
index 441f743214..4da1b1380a 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/csslayout/AddComponentsTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/csslayout/AddComponentsTest.java
@@ -108,7 +108,8 @@ public class AddComponentsTest {
assertSame(extra, layout.getComponent(4));
layout.removeAllComponents();
- layout.addComponents(children[3], children[2], children[1], children[0]);
+ layout.addComponents(children[3], children[2], children[1],
+ children[0]);
assertOrder(layout, new int[] { 3, 2, 1, 0 });
}
diff --git a/server/src/test/java/com/vaadin/tests/server/component/csslayout/CssLayoutDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/csslayout/CssLayoutDeclarativeTest.java
index 31ee1a05f5..fa350f7683 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/csslayout/CssLayoutDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/csslayout/CssLayoutDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.ui.Label;
/**
* Tests declarative support for CssLayout.
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/server/src/test/java/com/vaadin/tests/server/component/customlayout/CustomLayoutDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/customlayout/CustomLayoutDeclarativeTest.java
index 6ee3490c05..9e304b3144 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/customlayout/CustomLayoutDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/customlayout/CustomLayoutDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,12 +24,12 @@ import com.vaadin.ui.Label;
/**
* Tests declarative support for {@link CustomLayout}.
- *
+ *
* @since
* @author Vaadin Ltd
*/
-public class CustomLayoutDeclarativeTest extends
- DeclarativeTestBase<CustomLayout> {
+public class CustomLayoutDeclarativeTest
+ extends DeclarativeTestBase<CustomLayout> {
@Test
public void testEmpty() {
diff --git a/server/src/test/java/com/vaadin/tests/server/component/customlayout/CustomLayoutTest.java b/server/src/test/java/com/vaadin/tests/server/component/customlayout/CustomLayoutTest.java
index 4d327e70a6..cb84080f70 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/customlayout/CustomLayoutTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/customlayout/CustomLayoutTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,17 +32,16 @@ import org.junit.Test;
import com.vaadin.ui.CustomLayout;
/**
- *
+ *
* Tests for {@link CustomLayout}
- *
+ *
* @author Vaadin Ltd
*/
public class CustomLayoutTest {
@Test
- public void ctor_inputStreamProvided_inputStreamIsRead()
- throws IOException, IllegalArgumentException,
- IllegalAccessException {
+ public void ctor_inputStreamProvided_inputStreamIsRead() throws IOException,
+ IllegalArgumentException, IllegalAccessException {
Integer buffer = getBufferSize();
StringBuilder builder = new StringBuilder();
for (int i = 0; i < buffer; i++) {
diff --git a/server/src/test/java/com/vaadin/tests/server/component/datefield/DateFieldConverterTest.java b/server/src/test/java/com/vaadin/tests/server/component/datefield/DateFieldConverterTest.java
index 4fcf1766fe..c6b7573947 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/datefield/DateFieldConverterTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/datefield/DateFieldConverterTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/tests/server/component/datefield/DateFieldDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/datefield/DateFieldDeclarativeTest.java
index dc6db3bfe6..5db5bf2cd4 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/datefield/DateFieldDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/datefield/DateFieldDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -46,7 +46,9 @@ public class DateFieldDeclarativeTest extends DeclarativeTestBase<DateField> {
private String getTimezoneDesign() {
String timeZone = new SimpleDateFormat("Z").format(new Date());
- return String.format("<vaadin-date-field range-start=\"2014-05-05 00:00:00%1$s\" range-end=\"2014-06-05 00:00:00%1$s\" date-out-of-range-message=\"Please select a sensible date\" date-format=\"yyyy-MM-dd\" lenient show-iso-week-numbers parse-error-message=\"You are doing it wrong\" time-zone=\"GMT+05:00\" value=\"2014-05-15 00:00:00%1$s\"/>" ,timeZone);
+ return String.format(
+ "<vaadin-date-field range-start=\"2014-05-05 00:00:00%1$s\" range-end=\"2014-06-05 00:00:00%1$s\" date-out-of-range-message=\"Please select a sensible date\" date-format=\"yyyy-MM-dd\" lenient show-iso-week-numbers parse-error-message=\"You are doing it wrong\" time-zone=\"GMT+05:00\" value=\"2014-05-15 00:00:00%1$s\"/>",
+ timeZone);
}
private DateField getTimezoneExpected() {
@@ -84,18 +86,20 @@ public class DateFieldDeclarativeTest extends DeclarativeTestBase<DateField> {
@Test
public void writeYearResolution() {
// Writing is always done in full resolution..
- String timeZone = new SimpleDateFormat("Z").format(new Date(2020 - 1900, 1 - 1, 1));
+ String timeZone = new SimpleDateFormat("Z")
+ .format(new Date(2020 - 1900, 1 - 1, 1));
testWrite(
- getYearResolutionDesign().replace("2020",
- "2020-01-01 00:00:00" + timeZone),
- getYearResolutionExpected());
+ getYearResolutionDesign().replace("2020",
+ "2020-01-01 00:00:00" + timeZone),
+ getYearResolutionExpected());
}
@Test
public void testReadOnlyValue() {
Date date = new Date(2020 - 1900, 1 - 1, 1);
String timeZone = new SimpleDateFormat("Z").format(date);
- String design = "<vaadin-date-field readonly resolution='year' value='2020-01-01 00:00:00" + timeZone + "'/>";
+ String design = "<vaadin-date-field readonly resolution='year' value='2020-01-01 00:00:00"
+ + timeZone + "'/>";
DateField df = new DateField();
df.setResolution(Resolution.YEAR);
df.setValue(date);
diff --git a/server/src/test/java/com/vaadin/tests/server/component/datefield/InlineDateFieldDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/datefield/InlineDateFieldDeclarativeTest.java
index 04468c658a..06ed6385f0 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/datefield/InlineDateFieldDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/datefield/InlineDateFieldDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,12 +29,12 @@ import com.vaadin.ui.declarative.Design;
/**
* Tests the declarative support for implementations of {@link DateField}.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
-public class InlineDateFieldDeclarativeTest extends
- DeclarativeTestBase<InlineDateField> {
+public class InlineDateFieldDeclarativeTest
+ extends DeclarativeTestBase<InlineDateField> {
@Test
public void testInlineDateFieldToFromDesign() throws Exception {
@@ -42,10 +42,10 @@ public class InlineDateFieldDeclarativeTest extends
new SimpleDateFormat("yyyy-MM-dd").parse("2003-02-27"));
field.setResolution(Resolution.DAY);
field.setShowISOWeekNumbers(true);
- field.setRangeStart(new SimpleDateFormat("yyyy-MM-dd")
- .parse("2001-02-27"));
- field.setRangeEnd(new SimpleDateFormat("yyyy-MM-dd")
- .parse("2011-02-27"));
+ field.setRangeStart(
+ new SimpleDateFormat("yyyy-MM-dd").parse("2001-02-27"));
+ field.setRangeEnd(
+ new SimpleDateFormat("yyyy-MM-dd").parse("2011-02-27"));
ByteArrayOutputStream bos = new ByteArrayOutputStream();
Design.write(field, bos);
diff --git a/server/src/test/java/com/vaadin/tests/server/component/datefield/PopupDateFieldDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/datefield/PopupDateFieldDeclarativeTest.java
index b637d10c9e..9be1681f7a 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/datefield/PopupDateFieldDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/datefield/PopupDateFieldDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,12 +26,12 @@ import com.vaadin.ui.PopupDateField;
/**
* Tests the declarative support for implementations of {@link DateField}.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
-public class PopupDateFieldDeclarativeTest extends
- DeclarativeTestBase<PopupDateField> {
+public class PopupDateFieldDeclarativeTest
+ extends DeclarativeTestBase<PopupDateField> {
private String getBasicDesign() {
return "<vaadin-popup-date-field assistive-text='at' text-field-enabled='false' show-iso-week-numbers resolution=\"MINUTE\" range-end=\"2019-01-15\" input-prompt=\"Pick a day\" value=\"2003-02-27 07:15\"></vaadin-popup-date-field>";
diff --git a/server/src/test/java/com/vaadin/tests/server/component/fieldgroup/BeanFieldGroupTest.java b/server/src/test/java/com/vaadin/tests/server/component/fieldgroup/BeanFieldGroupTest.java
index 90c079b35c..19ae471c16 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/fieldgroup/BeanFieldGroupTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/fieldgroup/BeanFieldGroupTest.java
@@ -103,8 +103,8 @@ public class BeanFieldGroupTest {
MyBean myBean = new MyBean();
ViewStub viewStub = new ViewStub();
- BeanFieldGroup<MyBean> bindFields = BeanFieldGroup.bindFieldsBuffered(
- myBean, viewStub);
+ BeanFieldGroup<MyBean> bindFields = BeanFieldGroup
+ .bindFieldsBuffered(myBean, viewStub);
Field<String> basicField = (Field<String>) bindFields
.getField("basicField");
diff --git a/server/src/test/java/com/vaadin/tests/server/component/fieldgroup/CaseInsensitiveBindingTest.java b/server/src/test/java/com/vaadin/tests/server/component/fieldgroup/CaseInsensitiveBindingTest.java
index cb29a84aa8..aa317d24d1 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/fieldgroup/CaseInsensitiveBindingTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/fieldgroup/CaseInsensitiveBindingTest.java
@@ -60,8 +60,8 @@ public class CaseInsensitiveBindingTest {
@Test
public void perfectMatchPriority() {
PropertysetItem item = new PropertysetItem();
- item.addItemProperty("first_name", new ObjectProperty<String>(
- "Not this"));
+ item.addItemProperty("first_name",
+ new ObjectProperty<String>("Not this"));
item.addItemProperty("firstName", new ObjectProperty<String>("This"));
class MyForm extends FormLayout {
diff --git a/server/src/test/java/com/vaadin/tests/server/component/fieldgroup/FieldGroupTest.java b/server/src/test/java/com/vaadin/tests/server/component/fieldgroup/FieldGroupTest.java
index d77a2e190b..1b8297fbc1 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/fieldgroup/FieldGroupTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/fieldgroup/FieldGroupTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -35,9 +35,9 @@ import com.vaadin.ui.Field;
import com.vaadin.ui.TextField;
/**
- *
+ *
* Tests for {@link FieldGroup}.
- *
+ *
* @author Vaadin Ltd
*/
public class FieldGroupTest {
@@ -81,8 +81,8 @@ public class FieldGroupTest {
field2.setRequired(true);
fieldGroup.bind(field2, "prop2");
- Set<TextField> set = new HashSet<TextField>(Arrays.asList(field1,
- field2));
+ Set<TextField> set = new HashSet<TextField>(
+ Arrays.asList(field1, field2));
try {
fieldGroup.commit();
@@ -137,7 +137,8 @@ public class FieldGroupTest {
}
@Override
- public void setValue(String newValue) throws Property.ReadOnlyException {
+ public void setValue(String newValue)
+ throws Property.ReadOnlyException {
}
@Override
diff --git a/server/src/test/java/com/vaadin/tests/server/component/fieldgroup/FieldNamedDescriptionTest.java b/server/src/test/java/com/vaadin/tests/server/component/fieldgroup/FieldNamedDescriptionTest.java
index 029dcc66a3..af3f1f8531 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/fieldgroup/FieldNamedDescriptionTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/fieldgroup/FieldNamedDescriptionTest.java
@@ -18,8 +18,8 @@ public class FieldNamedDescriptionTest {
// Create an item
PropertysetItem item = new PropertysetItem();
item.addItemProperty("name", new ObjectProperty<String>("Zaphod"));
- item.addItemProperty("description", new ObjectProperty<String>(
- "This is a description"));
+ item.addItemProperty("description",
+ new ObjectProperty<String>("This is a description"));
// Define a form as a class that extends some layout
class MyForm extends FormLayout {
diff --git a/server/src/test/java/com/vaadin/tests/server/component/flash/FlashDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/flash/FlashDeclarativeTest.java
index 0c2deaaf0a..7aa4b73c31 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/flash/FlashDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/flash/FlashDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.ui.Flash;
/**
* Tests declarative support for implementations of {@link AbstractEmbedded} and
* {@link Embedded}.
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/server/src/test/java/com/vaadin/tests/server/component/form/FormTest.java b/server/src/test/java/com/vaadin/tests/server/component/form/FormTest.java
index 2075f7b115..774ee246d7 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/form/FormTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/form/FormTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.ui.TextField;
/**
* Test for {@link Form}.
- *
+ *
* @author Vaadin Ltd
*/
public class FormTest {
diff --git a/server/src/test/java/com/vaadin/tests/server/component/grid/GridAddRowBuiltinContainerTest.java b/server/src/test/java/com/vaadin/tests/server/component/grid/GridAddRowBuiltinContainerTest.java
index 70c73eb516..8072c5e934 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/grid/GridAddRowBuiltinContainerTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/grid/GridAddRowBuiltinContainerTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -47,9 +47,8 @@ public class GridAddRowBuiltinContainerTest {
Assert.assertEquals("There should be one item in the container", 1,
container.size());
- Assert.assertEquals("Hello",
- container.getItem(itemId).getItemProperty("myColumn")
- .getValue());
+ Assert.assertEquals("Hello", container.getItem(itemId)
+ .getItemProperty("myColumn").getValue());
}
@Test(expected = IllegalArgumentException.class)
@@ -63,9 +62,8 @@ public class GridAddRowBuiltinContainerTest {
// cast to Object to distinguish from a null varargs array
Object itemId = grid.addRow((Object) null);
- Assert.assertEquals(null,
- container.getItem(itemId).getItemProperty("myColumn")
- .getValue());
+ Assert.assertEquals(null, container.getItem(itemId)
+ .getItemProperty("myColumn").getValue());
}
@Test(expected = IllegalArgumentException.class)
@@ -80,10 +78,10 @@ public class GridAddRowBuiltinContainerTest {
Object itemId = grid.addRow("Hello", Integer.valueOf(3));
Item item = container.getItem(itemId);
- Assert.assertEquals("Hello", item.getItemProperty("myColumn")
- .getValue());
- Assert.assertEquals(Integer.valueOf(3), item.getItemProperty("myOther")
- .getValue());
+ Assert.assertEquals("Hello",
+ item.getItemProperty("myColumn").getValue());
+ Assert.assertEquals(Integer.valueOf(3),
+ item.getItemProperty("myOther").getValue());
}
@Test(expected = IllegalArgumentException.class)
@@ -101,8 +99,8 @@ public class GridAddRowBuiltinContainerTest {
Item item = container.getItem(Integer.valueOf(1));
Assert.assertEquals("Default value should be used for removed column",
"", item.getItemProperty("myColumn").getValue());
- Assert.assertEquals(Integer.valueOf(3), item.getItemProperty("myOther")
- .getValue());
+ Assert.assertEquals(Integer.valueOf(3),
+ item.getItemProperty("myOther").getValue());
}
@Test
@@ -114,10 +112,10 @@ public class GridAddRowBuiltinContainerTest {
grid.addRow(Integer.valueOf(3), "Hello");
Item item = container.getItem(Integer.valueOf(1));
- Assert.assertEquals("Hello", item.getItemProperty("myColumn")
- .getValue());
- Assert.assertEquals(Integer.valueOf(3), item.getItemProperty("myOther")
- .getValue());
+ Assert.assertEquals("Hello",
+ item.getItemProperty("myColumn").getValue());
+ Assert.assertEquals(Integer.valueOf(3),
+ item.getItemProperty("myOther").getValue());
}
@Test
@@ -143,7 +141,8 @@ public class GridAddRowBuiltinContainerTest {
// Can't use @Test(expect = Foo.class) since we also want to verify
// state after exception was thrown
- Assert.fail("Adding to BeanItemContainer container should throw UnsupportedOperationException");
+ Assert.fail(
+ "Adding to BeanItemContainer container should throw UnsupportedOperationException");
} catch (UnsupportedOperationException e) {
Assert.assertEquals("No row should have been added", 0,
container.size());
@@ -200,15 +199,16 @@ public class GridAddRowBuiltinContainerTest {
// state after exception was thrown
Assert.fail("Adding row should throw MethodException");
} catch (MethodException e) {
- Assert.assertEquals("Got the wrong exception", "name", e.getCause()
- .getMessage());
+ Assert.assertEquals("Got the wrong exception", "name",
+ e.getCause().getMessage());
Assert.assertEquals("There should be no rows in the container", 0,
container.size());
}
}
- private void setContainerRemoveColumns(BeanItemContainer<Person> container) {
+ private void setContainerRemoveColumns(
+ BeanItemContainer<Person> container) {
// Remove predefined column so we can change container
grid.removeAllColumns();
grid.setContainerDataSource(container);
diff --git a/server/src/test/java/com/vaadin/tests/server/component/grid/GridChildrenTest.java b/server/src/test/java/com/vaadin/tests/server/component/grid/GridChildrenTest.java
index 65a4cfe564..028b13f997 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/grid/GridChildrenTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/grid/GridChildrenTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -34,8 +34,8 @@ public class GridChildrenTest {
grid.addColumn("foo");
grid.addColumn("bar");
grid.addColumn("baz");
- HeaderCell merged = grid.getDefaultHeaderRow()
- .join("foo", "bar", "baz");
+ HeaderCell merged = grid.getDefaultHeaderRow().join("foo", "bar",
+ "baz");
Label label = new Label();
merged.setComponent(label);
Iterator<Component> i = grid.iterator();
diff --git a/server/src/test/java/com/vaadin/tests/server/component/grid/GridColumnAddingAndRemovingTest.java b/server/src/test/java/com/vaadin/tests/server/component/grid/GridColumnAddingAndRemovingTest.java
index 97f0355b4b..ab3b9f3b23 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/grid/GridColumnAddingAndRemovingTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/grid/GridColumnAddingAndRemovingTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -42,8 +42,8 @@ public class GridColumnAddingAndRemovingTest {
public void testAddColumn() {
grid.addColumn("foo");
- Property<?> property = container.getContainerProperty(
- container.firstItemId(), "foo");
+ Property<?> property = container
+ .getContainerProperty(container.firstItemId(), "foo");
assertEquals(property.getType(), String.class);
}
@@ -59,8 +59,8 @@ public class GridColumnAddingAndRemovingTest {
grid.removeColumn("foo");
// Removing a column, doesn't remove the property
- Property<?> property = container.getContainerProperty(
- container.firstItemId(), "foo");
+ Property<?> property = container
+ .getContainerProperty(container.firstItemId(), "foo");
assertEquals(property.getType(), String.class);
grid.addColumn("foo");
}
@@ -70,8 +70,8 @@ public class GridColumnAddingAndRemovingTest {
grid.addColumn("bar", Integer.class);
grid.addColumn("baz", Double.class);
- Property<?> property = container.getContainerProperty(
- container.firstItemId(), "bar");
+ Property<?> property = container
+ .getContainerProperty(container.firstItemId(), "bar");
assertEquals(property.getType(), Integer.class);
assertEquals(null, property.getValue());
property = container.getContainerProperty(container.firstItemId(),
@@ -126,8 +126,8 @@ public class GridColumnAddingAndRemovingTest {
@Test
public void testAddBooleanColumnProperty() {
grid.addColumn("foo", Boolean.class);
- Property<?> property = container.getContainerProperty(
- container.firstItemId(), "foo");
+ Property<?> property = container
+ .getContainerProperty(container.firstItemId(), "foo");
assertEquals(property.getType(), Boolean.class);
assertEquals(property.getValue(), null);
}
diff --git a/server/src/test/java/com/vaadin/tests/server/component/grid/GridColumnsTest.java b/server/src/test/java/com/vaadin/tests/server/component/grid/GridColumnsTest.java
index 30db0e9fbe..bf321f7ee9 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/grid/GridColumnsTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/grid/GridColumnsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -109,8 +109,8 @@ public class GridColumnsTest {
column.setHeaderCaption("CustomHeader");
assertEquals("CustomHeader", column.getHeaderCaption());
- assertEquals(column.getHeaderCaption(), grid.getDefaultHeaderRow()
- .getCell("column1").getText());
+ assertEquals(column.getHeaderCaption(),
+ grid.getDefaultHeaderRow().getCell("column1").getText());
column.setWidth(100);
assertEquals(100, column.getWidth(), 0.49d);
@@ -226,15 +226,14 @@ public class GridColumnsTest {
.getContainerPropertyIds().iterator().next();
grid.getContainerDataSource().removeContainerProperty(propertyId);
- assertEquals(
- "Frozen column count should update when removing last row",
+ assertEquals("Frozen column count should update when removing last row",
containerSize - 1, grid.getFrozenColumnCount());
}
@Test
public void testReorderColumns() {
- Set<?> containerProperties = new LinkedHashSet<Object>(grid
- .getContainerDataSource().getContainerPropertyIds());
+ Set<?> containerProperties = new LinkedHashSet<Object>(
+ grid.getContainerDataSource().getContainerPropertyIds());
Object[] properties = new Object[] { "column3", "column2", "column6" };
grid.setColumnOrder(properties);
@@ -284,8 +283,8 @@ public class GridColumnsTest {
public void testPropertyAndColumnEditorFieldsMatch() {
Column column1 = grid.getColumn("column1");
column1.setEditorField(new TextField());
- assertSame(column1.getEditorField(), grid.getColumn("column1")
- .getEditorField());
+ assertSame(column1.getEditorField(),
+ grid.getColumn("column1").getEditorField());
Column column2 = grid.getColumn("column2");
column2.setEditorField(new TextField());
@@ -372,8 +371,8 @@ public class GridColumnsTest {
ColumnResizeListener mock = EasyMock
.createMock(ColumnResizeListener.class);
Capture<ColumnResizeEvent> capturedEvent = new Capture<ColumnResizeEvent>();
- mock.columnResize(and(capture(capturedEvent),
- isA(ColumnResizeEvent.class)));
+ mock.columnResize(
+ and(capture(capturedEvent), isA(ColumnResizeEvent.class)));
EasyMock.expectLastCall().once();
// Tell it to wait for the call
@@ -394,7 +393,7 @@ public class GridColumnsTest {
event.isUserOriginated());
}
- @Test
+ @Test
public void textHeaderCaptionIsReturned() {
Column firstColumn = grid.getColumns().get(0);
diff --git a/server/src/test/java/com/vaadin/tests/server/component/grid/GridContainerNotSortableTest.java b/server/src/test/java/com/vaadin/tests/server/component/grid/GridContainerNotSortableTest.java
index cdfd2328dc..ff9a2c1a45 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/grid/GridContainerNotSortableTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/grid/GridContainerNotSortableTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/tests/server/component/grid/GridContainerTest.java b/server/src/test/java/com/vaadin/tests/server/component/grid/GridContainerTest.java
index c5747e4073..bdf248814f 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/grid/GridContainerTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/grid/GridContainerTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -107,11 +107,12 @@ public class GridContainerTest {
grid.setContainerDataSource(new IndexedContainer());
try {
grid.addColumn("notInContainer");
- Assert.fail("Adding a property id not in the container should throw an exception");
+ Assert.fail(
+ "Adding a property id not in the container should throw an exception");
} catch (IllegalStateException e) {
Assert.assertTrue(e.getMessage().contains("notInContainer"));
- Assert.assertTrue(e.getMessage().contains(
- "does not exist in the container"));
+ Assert.assertTrue(
+ e.getMessage().contains("does not exist in the container"));
}
}
@@ -121,13 +122,14 @@ public class GridContainerTest {
grid.setContainerDataSource(new IndexedContainer());
try {
grid.setColumns("notInContainer", "notThereEither");
- Assert.fail("Setting columns for property ids not in the container should throw an exception");
+ Assert.fail(
+ "Setting columns for property ids not in the container should throw an exception");
} catch (IllegalStateException e) {
// addColumn is run in random order..
Assert.assertTrue(e.getMessage().contains("notInContainer")
|| e.getMessage().contains("notThereEither"));
- Assert.assertTrue(e.getMessage().contains(
- "does not exist in the container"));
+ Assert.assertTrue(
+ e.getMessage().contains("does not exist in the container"));
}
}
@@ -139,7 +141,8 @@ public class GridContainerTest {
}
@Test
- public void testSerializeRpcDataProviderWithRowChanges() throws IOException {
+ public void testSerializeRpcDataProviderWithRowChanges()
+ throws IOException {
Grid grid = new Grid();
IndexedContainer container = new IndexedContainer();
grid.setContainerDataSource(container);
diff --git a/server/src/test/java/com/vaadin/tests/server/component/grid/GridEditorTest.java b/server/src/test/java/com/vaadin/tests/server/component/grid/GridEditorTest.java
index b70f17779a..f670b51b61 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/grid/GridEditorTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/grid/GridEditorTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -136,13 +136,13 @@ public class GridEditorTest {
public void testEditItem() throws Exception {
startEdit();
assertEquals(ITEM_ID, grid.getEditedItemId());
- assertEquals(getEditedItem(), grid.getEditorFieldGroup()
- .getItemDataSource());
+ assertEquals(getEditedItem(),
+ grid.getEditorFieldGroup().getItemDataSource());
- assertEquals(DEFAULT_NAME, grid.getColumn(PROPERTY_NAME)
- .getEditorField().getValue());
- assertEquals(String.valueOf(DEFAULT_AGE), grid.getColumn(PROPERTY_AGE)
- .getEditorField().getValue());
+ assertEquals(DEFAULT_NAME,
+ grid.getColumn(PROPERTY_NAME).getEditorField().getValue());
+ assertEquals(String.valueOf(DEFAULT_AGE),
+ grid.getColumn(PROPERTY_AGE).getEditorField().getValue());
}
@Test
@@ -171,7 +171,8 @@ public class GridEditorTest {
// Manual fail instead of @Test(expected=...) to check it is
// saveEditor that fails and not setValue
grid.saveEditor();
- Assert.fail("CommitException expected when saving an invalid field value");
+ Assert.fail(
+ "CommitException expected when saving an invalid field value");
} catch (CommitException e) {
// expected
}
diff --git a/server/src/test/java/com/vaadin/tests/server/component/grid/GridExtensionTest.java b/server/src/test/java/com/vaadin/tests/server/component/grid/GridExtensionTest.java
index d9db217aa3..f8005a0429 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/grid/GridExtensionTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/grid/GridExtensionTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -35,7 +35,7 @@ public class GridExtensionTest {
public void testCreateExtension() {
Grid grid = new Grid();
DummyGridExtension dummy = new DummyGridExtension(grid);
- assertTrue("DummyGridExtension never made it to Grid", grid
- .getExtensions().contains(dummy));
+ assertTrue("DummyGridExtension never made it to Grid",
+ grid.getExtensions().contains(dummy));
}
}
diff --git a/server/src/test/java/com/vaadin/tests/server/component/grid/GridSelectionTest.java b/server/src/test/java/com/vaadin/tests/server/component/grid/GridSelectionTest.java
index 85f51c35fb..8828d941ee 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/grid/GridSelectionTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/grid/GridSelectionTest.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -33,8 +33,8 @@ import com.vaadin.ui.Grid.SelectionModel;
public class GridSelectionTest {
- private static class MockSelectionChangeListener implements
- SelectionListener {
+ private static class MockSelectionChangeListener
+ implements SelectionListener {
private SelectionEvent event;
@Override
@@ -129,17 +129,20 @@ public class GridSelectionTest {
@Test
public void selectionModeMapsToMulti() {
- assertTrue(grid.setSelectionMode(SelectionMode.MULTI) instanceof SelectionModel.Multi);
+ assertTrue(grid.setSelectionMode(
+ SelectionMode.MULTI) instanceof SelectionModel.Multi);
}
@Test
public void selectionModeMapsToSingle() {
- assertTrue(grid.setSelectionMode(SelectionMode.SINGLE) instanceof SelectionModel.Single);
+ assertTrue(grid.setSelectionMode(
+ SelectionMode.SINGLE) instanceof SelectionModel.Single);
}
@Test
public void selectionModeMapsToNone() {
- assertTrue(grid.setSelectionMode(SelectionMode.NONE) instanceof SelectionModel.None);
+ assertTrue(grid.setSelectionMode(
+ SelectionMode.NONE) instanceof SelectionModel.None);
}
@Test(expected = IllegalArgumentException.class)
@@ -181,8 +184,8 @@ public class GridSelectionTest {
private void selectionCallsListener() {
grid.select(itemId1Present);
assertEquals("added size", 1, mockListener.getAdded().size());
- assertEquals("added item", itemId1Present, mockListener.getAdded()
- .iterator().next());
+ assertEquals("added item", itemId1Present,
+ mockListener.getAdded().iterator().next());
assertEquals("removed size", 0, mockListener.getRemoved().size());
}
@@ -204,8 +207,8 @@ public class GridSelectionTest {
grid.deselect(itemId1Present);
assertEquals("removed size", 1, mockListener.getRemoved().size());
- assertEquals("removed item", itemId1Present, mockListener.getRemoved()
- .iterator().next());
+ assertEquals("removed item", itemId1Present,
+ mockListener.getRemoved().iterator().next());
assertEquals("removed size", 0, mockListener.getAdded().size());
}
@@ -364,10 +367,10 @@ public class GridSelectionTest {
grid.select(itemId2Present);
assertEquals("added size", 1, mockListener.getAdded().size());
assertEquals("removed size", 1, mockListener.getRemoved().size());
- assertEquals("added item", itemId2Present, mockListener.getAdded()
- .iterator().next());
- assertEquals("removed item", itemId1Present, mockListener.getRemoved()
- .iterator().next());
+ assertEquals("added item", itemId2Present,
+ mockListener.getAdded().iterator().next());
+ assertEquals("removed item", itemId1Present,
+ mockListener.getRemoved().iterator().next());
assertEquals("selectedRows is correct", itemId2Present,
grid.getSelectedRow());
}
diff --git a/server/src/test/java/com/vaadin/tests/server/component/grid/GridStateTest.java b/server/src/test/java/com/vaadin/tests/server/component/grid/GridStateTest.java
index 567fad52af..d581f5e778 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/grid/GridStateTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/grid/GridStateTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.ui.Grid;
/**
* Tests for Grid State.
- *
+ *
*/
public class GridStateTest {
diff --git a/server/src/test/java/com/vaadin/tests/server/component/grid/GridStaticSectionTest.java b/server/src/test/java/com/vaadin/tests/server/component/grid/GridStaticSectionTest.java
index 4031886e7a..9a1e26353f 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/grid/GridStaticSectionTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/grid/GridStaticSectionTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -110,8 +110,8 @@ public class GridStaticSectionTest extends Grid {
@Test
public void testJoinAllFooterCells() {
FooterRow mergeRow = prependFooterRow();
- mergeRow.join(dataSource.getContainerPropertyIds().toArray()).setText(
- "All the stuff.");
+ mergeRow.join(dataSource.getContainerPropertyIds().toArray())
+ .setText("All the stuff.");
}
private void sanityCheck() throws Throwable {
diff --git a/server/src/test/java/com/vaadin/tests/server/component/grid/MultiSelectionModelTest.java b/server/src/test/java/com/vaadin/tests/server/component/grid/MultiSelectionModelTest.java
index 9b327a2f22..d901cfbd5d 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/grid/MultiSelectionModelTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/grid/MultiSelectionModelTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -108,14 +108,14 @@ public class MultiSelectionModelTest {
public void testSettingSelection() throws Throwable {
try {
expectSelectEvent(itemId2Present, itemId1Present);
- model.setSelected(Arrays.asList(new Object[] { itemId1Present,
- itemId2Present }));
+ model.setSelected(Arrays
+ .asList(new Object[] { itemId1Present, itemId2Present }));
verifyCurrentSelection(itemId1Present, itemId2Present);
expectDeselectEvent(itemId1Present);
expectSelectEvent(itemId3Present);
- model.setSelected(Arrays.asList(new Object[] { itemId3Present,
- itemId2Present }));
+ model.setSelected(Arrays
+ .asList(new Object[] { itemId3Present, itemId2Present }));
verifyCurrentSelection(itemId3Present, itemId2Present);
} catch (Exception e) {
throw e.getCause();
diff --git a/server/src/test/java/com/vaadin/tests/server/component/grid/SingleSelectionModelTest.java b/server/src/test/java/com/vaadin/tests/server/component/grid/SingleSelectionModelTest.java
index c217efb935..8b66ab625d 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/grid/SingleSelectionModelTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/grid/SingleSelectionModelTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -129,21 +129,20 @@ public class SingleSelectionModelTest {
@Override
public void select(SelectionEvent event) {
if (selected != null) {
- Assert.assertTrue(
- "Selection did not contain expected item", event
- .getAdded().contains(selected));
+ Assert.assertTrue("Selection did not contain expected item",
+ event.getAdded().contains(selected));
} else {
- Assert.assertTrue("Unexpected selection", event.getAdded()
- .isEmpty());
+ Assert.assertTrue("Unexpected selection",
+ event.getAdded().isEmpty());
}
if (deselected != null) {
Assert.assertTrue(
- "DeSelection did not contain expected item", event
- .getRemoved().contains(deselected));
+ "DeSelection did not contain expected item",
+ event.getRemoved().contains(deselected));
} else {
- Assert.assertTrue("Unexpected selection", event
- .getRemoved().isEmpty());
+ Assert.assertTrue("Unexpected selection",
+ event.getRemoved().isEmpty());
}
grid.removeSelectionListener(this);
diff --git a/server/src/test/java/com/vaadin/tests/server/component/grid/TestGrid.java b/server/src/test/java/com/vaadin/tests/server/component/grid/TestGrid.java
index 97fb2d8309..07a3cd02ae 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/grid/TestGrid.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/grid/TestGrid.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,7 +27,7 @@ import com.vaadin.ui.UI;
/**
* A Grid attached to a mock UI with a mock ConnectorTracker.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
diff --git a/server/src/test/java/com/vaadin/tests/server/component/grid/declarative/GridColumnDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/grid/declarative/GridColumnDeclarativeTest.java
index 21892634a0..0f6e0e05c0 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/grid/declarative/GridColumnDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/grid/declarative/GridColumnDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -76,8 +76,7 @@ public class GridColumnDeclarativeTest extends GridDeclarativeTestBase {
@Test
public void testReadEmptyExpand() {
String design = "<vaadin-grid><table>"//
- + "<colgroup>"
- + " <col sortable=true expand />"
+ + "<colgroup>" + " <col sortable=true expand />"
+ "</colgroup>" //
+ "</table></vaadin-grid>";
diff --git a/server/src/test/java/com/vaadin/tests/server/component/grid/declarative/GridDeclarativeAttributeTest.java b/server/src/test/java/com/vaadin/tests/server/component/grid/declarative/GridDeclarativeAttributeTest.java
index 41f967ac16..4a3b56d6bf 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/grid/declarative/GridDeclarativeAttributeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/grid/declarative/GridDeclarativeAttributeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import com.vaadin.ui.Grid.SingleSelectionModel;
/**
* Tests declarative support for {@link Grid} properties.
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -70,15 +70,15 @@ public class GridDeclarativeAttributeTest extends DeclarativeTestBase<Grid> {
@Test
public void testSelectionMode() {
String design = "<vaadin-grid selection-mode='none'>";
- assertSame(NoSelectionModel.class, read(design).getSelectionModel()
- .getClass());
+ assertSame(NoSelectionModel.class,
+ read(design).getSelectionModel().getClass());
design = "<vaadin-grid selection-mode='single'>";
- assertSame(SingleSelectionModel.class, read(design).getSelectionModel()
- .getClass());
+ assertSame(SingleSelectionModel.class,
+ read(design).getSelectionModel().getClass());
design = "<vaadin-grid selection-mode='multi'>";
- assertSame(MultiSelectionModel.class, read(design).getSelectionModel()
- .getClass());
+ assertSame(MultiSelectionModel.class,
+ read(design).getSelectionModel().getClass());
}
}
diff --git a/server/src/test/java/com/vaadin/tests/server/component/grid/declarative/GridDeclarativeTestBase.java b/server/src/test/java/com/vaadin/tests/server/component/grid/declarative/GridDeclarativeTestBase.java
index 9424d89ecf..376671bfab 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/grid/declarative/GridDeclarativeTestBase.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/grid/declarative/GridDeclarativeTestBase.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -149,7 +149,8 @@ public class GridDeclarativeTestBase extends DeclarativeTestBase<Grid> {
col2.isEditable());
assertEquals(baseError + "Hidable", col1.isHidable(),
col2.isHidable());
- assertEquals(baseError + "Hidden", col1.isHidden(), col2.isHidden());
+ assertEquals(baseError + "Hidden", col1.isHidden(),
+ col2.isHidden());
assertEquals(baseError + "HidingToggleCaption",
col1.getHidingToggleCaption(),
col2.getHidingToggleCaption());
diff --git a/server/src/test/java/com/vaadin/tests/server/component/grid/declarative/GridHeaderFooterDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/grid/declarative/GridHeaderFooterDeclarativeTest.java
index d64a877d81..3ec3677144 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/grid/declarative/GridHeaderFooterDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/grid/declarative/GridHeaderFooterDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -332,10 +332,10 @@ public class GridHeaderFooterDeclarativeTest extends GridDeclarativeTestBase {
Element root = new Element(Tag.valueOf("vaadin-grid"), "");
grid.writeDesign(root, new DesignContext());
- Assert.assertEquals("&amp;amp; Test", root.getElementsByTag("th")
- .get(0).html());
- Assert.assertEquals("&amp;amp; Test", root.getElementsByTag("td")
- .get(0).html());
+ Assert.assertEquals("&amp;amp; Test",
+ root.getElementsByTag("th").get(0).html());
+ Assert.assertEquals("&amp;amp; Test",
+ root.getElementsByTag("td").get(0).html());
header = grid.addHeaderRowAt(0);
footer = grid.addFooterRowAt(0);
@@ -347,10 +347,10 @@ public class GridHeaderFooterDeclarativeTest extends GridDeclarativeTestBase {
root = new Element(Tag.valueOf("vaadin-grid"), "");
grid.writeDesign(root, new DesignContext());
- Assert.assertEquals("&amp; Test", root.getElementsByTag("th").get(0)
- .html());
- Assert.assertEquals("&amp; Test", root.getElementsByTag("td").get(0)
- .html());
+ Assert.assertEquals("&amp; Test",
+ root.getElementsByTag("th").get(0).html());
+ Assert.assertEquals("&amp; Test",
+ root.getElementsByTag("td").get(0).html());
}
}
diff --git a/server/src/test/java/com/vaadin/tests/server/component/grid/declarative/GridInlineDataDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/grid/declarative/GridInlineDataDeclarativeTest.java
index df8e864309..373767ed20 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/grid/declarative/GridInlineDataDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/grid/declarative/GridInlineDataDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,8 +26,7 @@ public class GridInlineDataDeclarativeTest extends GridDeclarativeTestBase {
@Test
public void testSimpleInlineData() {
String design = "<vaadin-grid><table>"//
- + "<colgroup>"
- + " <col sortable property-id='Col1' />"
+ + "<colgroup>" + " <col sortable property-id='Col1' />"
+ "</colgroup>" //
+ "<thead />" // No headers read or written
+ "<tbody>" //
@@ -53,8 +52,7 @@ public class GridInlineDataDeclarativeTest extends GridDeclarativeTestBase {
@Test
public void testMultipleColumnsInlineData() {
String design = "<vaadin-grid><table>"//
- + "<colgroup>"
- + " <col sortable property-id='Col1' />"
+ + "<colgroup>" + " <col sortable property-id='Col1' />"
+ " <col sortable property-id='Col2' />"
+ " <col sortable property-id='Col3' />" //
+ "</colgroup>" //
@@ -82,8 +80,7 @@ public class GridInlineDataDeclarativeTest extends GridDeclarativeTestBase {
@Test
public void testMultipleColumnsInlineDataReordered() {
String design = "<vaadin-grid><table>"//
- + "<colgroup>"
- + " <col sortable property-id='Col2' />"
+ + "<colgroup>" + " <col sortable property-id='Col2' />"
+ " <col sortable property-id='Col3' />"
+ " <col sortable property-id='Col1' />" //
+ "</colgroup>" //
@@ -112,13 +109,10 @@ public class GridInlineDataDeclarativeTest extends GridDeclarativeTestBase {
@Test
public void testHtmlEntities() {
String design = "<vaadin-grid><table>"//
- + "<colgroup>"
- + " <col property-id='test' />"
- + "</colgroup>" //
+ + "<colgroup>" + " <col property-id='test' />" + "</colgroup>" //
+ "<thead />" // No headers read or written
+ "<tbody>" //
- + " <tr><td>&amp;Test</tr></td>"
- + "</tbody>"
+ + " <tr><td>&amp;Test</tr></td>" + "</tbody>"
+ "</table></vaadin-grid>";
Grid read = read(design);
diff --git a/server/src/test/java/com/vaadin/tests/server/component/grid/declarative/GridStructureDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/grid/declarative/GridStructureDeclarativeTest.java
index d60df4c23b..f5a979010d 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/grid/declarative/GridStructureDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/grid/declarative/GridStructureDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/tests/server/component/grid/sort/SortTest.java b/server/src/test/java/com/vaadin/tests/server/component/grid/sort/SortTest.java
index 2a682df2e5..bdce7f9016 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/grid/sort/SortTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/grid/sort/SortTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -56,7 +56,8 @@ public class SortTest {
sorted = true;
}
- public void expectedSort(Object[] properties, SortDirection[] directions) {
+ public void expectedSort(Object[] properties,
+ SortDirection[] directions) {
assert directions.length == properties.length : "Array dimensions differ";
expectedProperties = properties;
expectedAscending = new boolean[directions.length];
@@ -138,7 +139,8 @@ public class SortTest {
new SortDirection[] { SortDirection.ASCENDING });
grid.sort("foo");
- listener.assertEventFired(new SortOrder("foo", SortDirection.ASCENDING));
+ listener.assertEventFired(
+ new SortOrder("foo", SortDirection.ASCENDING));
}
@Test
@@ -147,7 +149,8 @@ public class SortTest {
new SortDirection[] { SortDirection.DESCENDING });
grid.sort("foo", SortDirection.DESCENDING);
- listener.assertEventFired(new SortOrder("foo", SortDirection.DESCENDING));
+ listener.assertEventFired(
+ new SortOrder("foo", SortDirection.DESCENDING));
}
@Test
@@ -155,13 +158,12 @@ public class SortTest {
container.expectedSort(new Object[] { "foo", "bar", "baz" },
new SortDirection[] { SortDirection.ASCENDING,
SortDirection.ASCENDING, SortDirection.DESCENDING });
- grid.sort(Sort.by("foo").then("bar")
- .then("baz", SortDirection.DESCENDING));
+ grid.sort(Sort.by("foo").then("bar").then("baz",
+ SortDirection.DESCENDING));
- listener.assertEventFired(
- new SortOrder("foo", SortDirection.ASCENDING), new SortOrder(
- "bar", SortDirection.ASCENDING), new SortOrder("baz",
- SortDirection.DESCENDING));
+ listener.assertEventFired(new SortOrder("foo", SortDirection.ASCENDING),
+ new SortOrder("bar", SortDirection.ASCENDING),
+ new SortOrder("baz", SortDirection.DESCENDING));
}
@@ -173,13 +175,12 @@ public class SortTest {
container.expectedSort(new Object[] { "foo", "bar", "baz" },
new SortDirection[] { SortDirection.ASCENDING,
SortDirection.ASCENDING, SortDirection.DESCENDING });
- grid.sort(Sort.by("foo").then("bar")
- .then("baz", SortDirection.DESCENDING));
+ grid.sort(Sort.by("foo").then("bar").then("baz",
+ SortDirection.DESCENDING));
- listener.assertEventFired(
- new SortOrder("foo", SortDirection.ASCENDING), new SortOrder(
- "bar", SortDirection.ASCENDING), new SortOrder("baz",
- SortDirection.DESCENDING));
+ listener.assertEventFired(new SortOrder("foo", SortDirection.ASCENDING),
+ new SortOrder("bar", SortDirection.ASCENDING),
+ new SortOrder("baz", SortDirection.DESCENDING));
container = new DummySortingIndexedContainer();
container.addContainerProperty("foo", Person.class, null);
@@ -189,7 +190,8 @@ public class SortTest {
new SortDirection[] { SortDirection.DESCENDING });
grid.setContainerDataSource(container);
- listener.assertEventFired(new SortOrder("baz", SortDirection.DESCENDING));
+ listener.assertEventFired(
+ new SortOrder("baz", SortDirection.DESCENDING));
}
diff --git a/server/src/test/java/com/vaadin/tests/server/component/gridlayout/GridLayoutDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/gridlayout/GridLayoutDeclarativeTest.java
index e3975e41a8..380d39e054 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/gridlayout/GridLayoutDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/gridlayout/GridLayoutDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,8 +32,8 @@ import com.vaadin.ui.Label;
import com.vaadin.ui.declarative.Design;
import com.vaadin.ui.declarative.DesignContext;
-public class GridLayoutDeclarativeTest extends
- DeclarativeMarginTestBase<GridLayout> {
+public class GridLayoutDeclarativeTest
+ extends DeclarativeMarginTestBase<GridLayout> {
@Test
public void testMargins() {
@@ -272,7 +272,8 @@ public class GridLayoutDeclarativeTest extends
context.setRootComponent(layout);
Design.write(context, out);
- ByteArrayInputStream input = new ByteArrayInputStream(out.toByteArray());
+ ByteArrayInputStream input = new ByteArrayInputStream(
+ out.toByteArray());
Component component = Design.read(input);
GridLayout readLayout = (GridLayout) component;
diff --git a/server/src/test/java/com/vaadin/tests/server/component/image/ImageDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/image/ImageDeclarativeTest.java
index 562c629209..0250efbcf7 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/image/ImageDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/image/ImageDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.ui.Image;
/**
* Tests declarative support for implementations of {@link Image}.
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/server/src/test/java/com/vaadin/tests/server/component/label/LabelConvertersTest.java b/server/src/test/java/com/vaadin/tests/server/component/label/LabelConvertersTest.java
index 26961dc372..d70b52793d 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/label/LabelConvertersTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/label/LabelConvertersTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/tests/server/component/label/LabelDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/label/LabelDeclarativeTest.java
index 7a7f4bd844..6ab8f8bb85 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/label/LabelDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/label/LabelDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ import com.vaadin.ui.declarative.DesignFormatter;
/**
* Tests declarative support for implementations of {@link Label}.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
diff --git a/server/src/test/java/com/vaadin/tests/server/component/label/LabelListenersTest.java b/server/src/test/java/com/vaadin/tests/server/component/label/LabelListenersTest.java
index 51cf7bf1ff..9fe345ea85 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/label/LabelListenersTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/label/LabelListenersTest.java
@@ -28,10 +28,11 @@ public class LabelListenersTest extends AbstractListenerMethodsTestBase {
Label underTest = new Label();
// setup the mock listener
- ValueChangeListener mockListener = createStrictMock(ValueChangeListener.class);
+ ValueChangeListener mockListener = createStrictMock(
+ ValueChangeListener.class);
// record
- mockListener
- .valueChange(anyObject(com.vaadin.data.Property.ValueChangeEvent.class));
+ mockListener.valueChange(
+ anyObject(com.vaadin.data.Property.ValueChangeEvent.class));
// test
underTest.addValueChangeListener(mockListener);
@@ -50,10 +51,11 @@ public class LabelListenersTest extends AbstractListenerMethodsTestBase {
Property mockProperty = EasyMock.createMock(Property.class);
- ValueChangeListener mockListener = createStrictMock(ValueChangeListener.class);
+ ValueChangeListener mockListener = createStrictMock(
+ ValueChangeListener.class);
// record
- mockListener
- .valueChange(anyObject(com.vaadin.data.Property.ValueChangeEvent.class));
+ mockListener.valueChange(
+ anyObject(com.vaadin.data.Property.ValueChangeEvent.class));
expect(mockProperty.getType()).andReturn(String.class).atLeastOnce();
expect(mockProperty.getValue()).andReturn("Any").atLeastOnce();
@@ -72,7 +74,8 @@ public class LabelListenersTest extends AbstractListenerMethodsTestBase {
public void testValueChangeNotFiredWhenNotSettingValue() {
Label underTest = new Label();
// setup the mock listener
- ValueChangeListener mockListener = createStrictMock(ValueChangeListener.class);
+ ValueChangeListener mockListener = createStrictMock(
+ ValueChangeListener.class);
// record: nothing to record
// test
@@ -85,7 +88,8 @@ public class LabelListenersTest extends AbstractListenerMethodsTestBase {
public void testNoValueChangeFiredWhenSettingPropertyDataSourceToNull() {
Label underTest = new Label();
// setup the mock Listener
- ValueChangeListener mockListener = createStrictMock(ValueChangeListener.class);
+ ValueChangeListener mockListener = createStrictMock(
+ ValueChangeListener.class);
// record: nothing to record
// test
diff --git a/server/src/test/java/com/vaadin/tests/server/component/link/LinkDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/link/LinkDeclarativeTest.java
index da7227224d..612e894c6d 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/link/LinkDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/link/LinkDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.ui.Link;
/**
* Test cases for reading the properties of selection components.
- *
+ *
* @author Vaadin Ltd
*/
public class LinkDeclarativeTest extends DeclarativeTestBase<Link> {
diff --git a/server/src/test/java/com/vaadin/tests/server/component/listselect/ListSelectDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/listselect/ListSelectDeclarativeTest.java
index d0fa400d31..4661f28e61 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/listselect/ListSelectDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/listselect/ListSelectDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,9 +31,10 @@ public class ListSelectDeclarativeTest extends DeclarativeTestBase<ListSelect> {
}
private String getWithOptionsDesign() {
- return "<vaadin-list-select rows=10>\n" + " <option>Male</option>\n"
- + " <option>Female</option>\n" + "</vaadin-list-select>\n"
- + "";
+ return "<vaadin-list-select rows=10>\n"
+ + " <option>Male</option>\n"
+ + " <option>Female</option>\n"
+ + "</vaadin-list-select>\n" + "";
}
@Test
diff --git a/server/src/test/java/com/vaadin/tests/server/component/listselect/ListSelectStateTest.java b/server/src/test/java/com/vaadin/tests/server/component/listselect/ListSelectStateTest.java
index 01dc71d96a..8f5da0f83f 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/listselect/ListSelectStateTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/listselect/ListSelectStateTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.ui.ListSelect;
/**
* Tests for ListSelect State.
- *
+ *
*/
public class ListSelectStateTest {
@@ -31,8 +31,8 @@ public class ListSelectStateTest {
public void getState_listSelectHasCustomState() {
TestListSelect select = new TestListSelect();
AbstractSelectState state = select.getState();
- Assert.assertEquals("Unexpected state class",
- AbstractSelectState.class, state.getClass());
+ Assert.assertEquals("Unexpected state class", AbstractSelectState.class,
+ state.getClass());
}
private static class TestListSelect extends ListSelect {
diff --git a/server/src/test/java/com/vaadin/tests/server/component/nativeselect/NativeSelectDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/nativeselect/NativeSelectDeclarativeTest.java
index 511f411a93..4b0e48ef04 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/nativeselect/NativeSelectDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/nativeselect/NativeSelectDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,11 +22,11 @@ import com.vaadin.ui.NativeSelect;
/**
* Test cases for reading the properties of selection components.
- *
+ *
* @author Vaadin Ltd
*/
-public class NativeSelectDeclarativeTest extends
- DeclarativeTestBase<NativeSelect> {
+public class NativeSelectDeclarativeTest
+ extends DeclarativeTestBase<NativeSelect> {
public String getBasicDesign() {
return "<vaadin-native-select><option>foo</option><option>bar</option></vaadin-native-select>";
diff --git a/server/src/test/java/com/vaadin/tests/server/component/optiongroup/OptionGroupStateTest.java b/server/src/test/java/com/vaadin/tests/server/component/optiongroup/OptionGroupStateTest.java
index 59ff432cad..9a6cf145c0 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/optiongroup/OptionGroupStateTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/optiongroup/OptionGroupStateTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.ui.OptionGroup;
/**
* Tests for OptionGroup state.
- *
+ *
*/
public class OptionGroupStateTest {
diff --git a/server/src/test/java/com/vaadin/tests/server/component/panel/PanelDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/panel/PanelDeclarativeTest.java
index 39191f0665..b3b4f10dc2 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/panel/PanelDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/panel/PanelDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.ui.declarative.DesignException;
/**
* Tests declarative support for Panel.
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/server/src/test/java/com/vaadin/tests/server/component/passwordfield/PasswordFieldDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/passwordfield/PasswordFieldDeclarativeTest.java
index fcb2453057..a57a0cdc1c 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/passwordfield/PasswordFieldDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/passwordfield/PasswordFieldDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,12 +21,12 @@ import com.vaadin.tests.design.DeclarativeTestBase;
import com.vaadin.ui.PasswordField;
/**
- *
+ *
* @since
* @author Vaadin Ltd
*/
-public class PasswordFieldDeclarativeTest extends
- DeclarativeTestBase<PasswordField> {
+public class PasswordFieldDeclarativeTest
+ extends DeclarativeTestBase<PasswordField> {
@Test
public void testReadOnlyValue() {
diff --git a/server/src/test/java/com/vaadin/tests/server/component/popupview/PopupViewDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/popupview/PopupViewDeclarativeTest.java
index 300a993064..f78fc0272d 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/popupview/PopupViewDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/popupview/PopupViewDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -49,8 +49,7 @@ public class PopupViewDeclarativeTest extends DeclarativeTestBase<PopupView> {
component.setPopupVisible(true);
// hide-on-mouse-out is true by default. not seen in design
String design = "<vaadin-popup-view popup-visible>" //
- + "Click <u>here</u> to open"
- + "<popup-content>"
+ + "Click <u>here</u> to open" + "<popup-content>"
+ new DesignContext().createElement(verticalLayout)
+ "</popup-content>" //
+ "</vaadin-popup-view>";
@@ -64,8 +63,7 @@ public class PopupViewDeclarativeTest extends DeclarativeTestBase<PopupView> {
PopupView component = new PopupView("Click Me!", label);
component.setHideOnMouseOut(false);
String design = "<vaadin-popup-view hide-on-mouse-out='false'>" //
- + "Click Me!"
- + "<popup-content>"
+ + "Click Me!" + "<popup-content>"
+ new DesignContext().createElement(label) + "</popup-content>" //
+ "</vaadin-popup-view>";
testWrite(design, component);
diff --git a/server/src/test/java/com/vaadin/tests/server/component/progressbar/ProgressBarDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/progressbar/ProgressBarDeclarativeTest.java
index 36ede0a321..d44f6867f6 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/progressbar/ProgressBarDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/progressbar/ProgressBarDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,11 +22,11 @@ import com.vaadin.ui.ProgressBar;
/**
* Test cases for reading the properties of selection components.
- *
+ *
* @author Vaadin Ltd
*/
-public class ProgressBarDeclarativeTest extends
- DeclarativeTestBase<ProgressBar> {
+public class ProgressBarDeclarativeTest
+ extends DeclarativeTestBase<ProgressBar> {
public String getBasicDesign() {
return "<vaadin-progress-bar value=0.5 indeterminate>";
diff --git a/server/src/test/java/com/vaadin/tests/server/component/richtextarea/RichTextAreaDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/richtextarea/RichTextAreaDeclarativeTest.java
index 37d27af197..bbc4cd0492 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/richtextarea/RichTextAreaDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/richtextarea/RichTextAreaDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,8 +20,8 @@ import org.junit.Test;
import com.vaadin.tests.design.DeclarativeTestBase;
import com.vaadin.ui.RichTextArea;
-public class RichTextAreaDeclarativeTest extends
- DeclarativeTestBase<RichTextArea> {
+public class RichTextAreaDeclarativeTest
+ extends DeclarativeTestBase<RichTextArea> {
private String getBasicDesign() {
return "<vaadin-rich-text-area null-representation='' null-setting-allowed>\n"
diff --git a/server/src/test/java/com/vaadin/tests/server/component/richtextarea/RichTextAreaStateTest.java b/server/src/test/java/com/vaadin/tests/server/component/richtextarea/RichTextAreaStateTest.java
index d1c0f8fa1e..db533673da 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/richtextarea/RichTextAreaStateTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/richtextarea/RichTextAreaStateTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.ui.RichTextArea;
/**
* Tests for RichTextArea State.
- *
+ *
*/
public class RichTextAreaStateTest {
@Test
diff --git a/server/src/test/java/com/vaadin/tests/server/component/slider/SliderDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/slider/SliderDeclarativeTest.java
index dcfb415810..3cf0b16114 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/slider/SliderDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/slider/SliderDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.ui.Slider;
/**
* Tests declarative support for implementations of {@link Slider}.
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/server/src/test/java/com/vaadin/tests/server/component/slider/SliderTest.java b/server/src/test/java/com/vaadin/tests/server/component/slider/SliderTest.java
index 8c093fdf72..1f7783dda5 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/slider/SliderTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/slider/SliderTest.java
@@ -41,8 +41,8 @@ public class SliderTest {
slider.setValue(-1.0);
} catch (Slider.ValueOutOfBoundsException e) {
- assertThat(e.getMessage(),
- containsString("Value -1.0 is out of bounds: [0.0, 100.0]"));
+ assertThat(e.getMessage(), containsString(
+ "Value -1.0 is out of bounds: [0.0, 100.0]"));
}
}
diff --git a/server/src/test/java/com/vaadin/tests/server/component/table/CacheUpdateExceptionCausesTest.java b/server/src/test/java/com/vaadin/tests/server/component/table/CacheUpdateExceptionCausesTest.java
index 03f50c6b5f..86bb34145f 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/table/CacheUpdateExceptionCausesTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/table/CacheUpdateExceptionCausesTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2012 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,8 +26,8 @@ public class CacheUpdateExceptionCausesTest {
@Test
public void testSingleCauseException() {
Table table = new Table();
- Throwable[] causes = new Throwable[] { new RuntimeException(
- "Broken in one way.") };
+ Throwable[] causes = new Throwable[] {
+ new RuntimeException("Broken in one way.") };
CacheUpdateException exception = new CacheUpdateException(table,
"Error during Table cache update.", causes);
diff --git a/server/src/test/java/com/vaadin/tests/server/component/table/FooterTest.java b/server/src/test/java/com/vaadin/tests/server/component/table/FooterTest.java
index d13a4a287e..3df2b8fbcb 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/table/FooterTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/table/FooterTest.java
@@ -15,7 +15,7 @@ import com.vaadin.ui.Table;
/**
* Test case for testing the footer API
- *
+ *
*/
public class FooterTest {
@@ -82,7 +82,7 @@ public class FooterTest {
/**
* Creates a container with three properties "col1,col2,col3" with 100 items
- *
+ *
* @return Returns the created table
*/
private static Container createContainer() {
diff --git a/server/src/test/java/com/vaadin/tests/server/component/table/MultipleSelectionTest.java b/server/src/test/java/com/vaadin/tests/server/component/table/MultipleSelectionTest.java
index a7973b45f0..b29357ea6a 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/table/MultipleSelectionTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/table/MultipleSelectionTest.java
@@ -51,12 +51,12 @@ public class MultipleSelectionTest {
/**
* Creates a testing container for the tests
- *
+ *
* @return A new container with test items
*/
private Container createTestContainer() {
- IndexedContainer container = new IndexedContainer(Arrays.asList("1",
- new String[] { "2", "3", "4" }));
+ IndexedContainer container = new IndexedContainer(
+ Arrays.asList("1", new String[] { "2", "3", "4" }));
return container;
}
}
diff --git a/server/src/test/java/com/vaadin/tests/server/component/table/TableColumnAlignmentsTest.java b/server/src/test/java/com/vaadin/tests/server/component/table/TableColumnAlignmentsTest.java
index 69aaf2e3a9..ff4c8336fb 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/table/TableColumnAlignmentsTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/table/TableColumnAlignmentsTest.java
@@ -12,8 +12,8 @@ public class TableColumnAlignmentsTest {
@Test
public void defaultColumnAlignments() {
for (int properties = 0; properties < 10; properties++) {
- Table t = TableGeneratorTest.createTableWithDefaultContainer(
- properties, 10);
+ Table t = TableGeneratorTest
+ .createTableWithDefaultContainer(properties, 10);
Object[] expected = new Object[properties];
for (int i = 0; i < properties; i++) {
expected[i] = Align.LEFT;
@@ -26,8 +26,8 @@ public class TableColumnAlignmentsTest {
@Test
public void explicitColumnAlignments() {
int properties = 5;
- Table t = TableGeneratorTest.createTableWithDefaultContainer(
- properties, 10);
+ Table t = TableGeneratorTest.createTableWithDefaultContainer(properties,
+ 10);
Align[] explicitAlignments = new Align[] { Align.CENTER, Align.LEFT,
Align.RIGHT, Align.RIGHT, Align.LEFT };
@@ -122,8 +122,8 @@ public class TableColumnAlignmentsTest {
@Test
public void explicitColumnAlignmentOneByOne() {
int properties = 5;
- Table t = TableGeneratorTest.createTableWithDefaultContainer(
- properties, 10);
+ Table t = TableGeneratorTest.createTableWithDefaultContainer(properties,
+ 10);
Align[] explicitAlignments = new Align[] { Align.CENTER, Align.LEFT,
Align.RIGHT, Align.RIGHT, Align.LEFT };
@@ -134,9 +134,9 @@ public class TableColumnAlignmentsTest {
t.setColumnAlignment("Property " + i, explicitAlignments[i]);
currentAlignments[i] = explicitAlignments[i];
- assertArrayEquals("Explicit visible columns, " + i
- + " alignments set", currentAlignments,
- t.getColumnAlignments());
+ assertArrayEquals(
+ "Explicit visible columns, " + i + " alignments set",
+ currentAlignments, t.getColumnAlignments());
}
}
diff --git a/server/src/test/java/com/vaadin/tests/server/component/table/TableContextClickTest.java b/server/src/test/java/com/vaadin/tests/server/component/table/TableContextClickTest.java
index d96a5d626a..2f116c5b7c 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/table/TableContextClickTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/table/TableContextClickTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/tests/server/component/table/TableDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/table/TableDeclarativeTest.java
index 7de6eaf2ef..d1d1c06203 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/table/TableDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/table/TableDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ import com.vaadin.ui.declarative.Design;
/**
* Test declarative support for {@link Table}.
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -38,8 +38,7 @@ public class TableDeclarativeTest extends TableDeclarativeTestBase {
@Test
public void testBasicAttributes() {
- String design = "<"
- + getTag()
+ String design = "<" + getTag()
+ " page-length=30 cache-rate=3 selectable editable "
+ "sortable=false sort-ascending=false sort-container-property-id=foo "
+ "drag-mode=row multi-select-mode=simple column-header-mode=id row-header-mode=id "
@@ -69,12 +68,9 @@ public class TableDeclarativeTest extends TableDeclarativeTestBase {
@Test
public void testColumns() {
- String design = "<"
- + getTag()
- + " column-collapsing-allowed>" //
+ String design = "<" + getTag() + " column-collapsing-allowed>" //
+ " <table>" //
- + " <colgroup>"
- + " <col property-id='foo' width=300>"
+ + " <colgroup>" + " <col property-id='foo' width=300>"
+ " <col property-id='bar' center expand=1 collapsible=false>"
+ " <col property-id='baz' right expand=2 collapsed>"
+ " </colgroup>" //
@@ -103,8 +99,7 @@ public class TableDeclarativeTest extends TableDeclarativeTestBase {
@Test
public void testHeadersFooters() {
- String design = "<" + getTag()
- + ">" //
+ String design = "<" + getTag() + ">" //
+ " <table>" //
+ " <colgroup><col property-id=foo><col property-id=bar></colgroup>" //
+ " <thead>" //
@@ -120,8 +115,8 @@ public class TableDeclarativeTest extends TableDeclarativeTestBase {
table.addContainerProperty("foo", String.class, null);
table.setColumnHeader("foo", "FOO");
- table.setColumnIcon("foo", new ExternalResource(
- "http://example.com/icon.png"));
+ table.setColumnIcon("foo",
+ new ExternalResource("http://example.com/icon.png"));
table.setColumnFooter("foo", "foo");
table.addContainerProperty("bar", String.class, null);
@@ -134,12 +129,9 @@ public class TableDeclarativeTest extends TableDeclarativeTestBase {
@Test
public void testInlineData() {
- String design = "<"
- + getTag()
- + ">" //
+ String design = "<" + getTag() + ">" //
+ " <table>" //
- + " <colgroup>"
- + " <col property-id='foo' />"
+ + " <colgroup>" + " <col property-id='foo' />"
+ " <col property-id='bar' />"
+ " <col property-id='baz' />" //
+ " </colgroup>" + " <thead>"
@@ -168,27 +160,18 @@ public class TableDeclarativeTest extends TableDeclarativeTestBase {
testRead(design, table);
testWrite(design, table, true);
}
-
+
@Test
public void testHtmlEntities() {
- String design = "<v-table>"
- + "<table>"
- + " <colgroup>"
- + " <col property-id=\"test\""
- + " </colgroup>"
- + " <thead>"
- + " <tr><th>&amp; Test</th></tr>"
- + " </thead>"
- + " <tbody>"
- + " <tr item-id=\"test\"><td>&amp; Test</tr>"
- + " </tbody>"
- + " <tfoot>"
- + " <tr><td>&amp; Test</td></tr>"
- + " </tfoot>"
- + "</table>"
- + "</v-table>";
+ String design = "<v-table>" + "<table>" + " <colgroup>"
+ + " <col property-id=\"test\"" + " </colgroup>"
+ + " <thead>" + " <tr><th>&amp; Test</th></tr>"
+ + " </thead>" + " <tbody>"
+ + " <tr item-id=\"test\"><td>&amp; Test</tr>" + " </tbody>"
+ + " <tfoot>" + " <tr><td>&amp; Test</td></tr>"
+ + " </tfoot>" + "</table>" + "</v-table>";
Table read = read(design);
-
+
Assert.assertEquals("& Test",
read.getContainerProperty("test", "test").getValue());
Assert.assertEquals("& Test", read.getColumnHeader("test"));
diff --git a/server/src/test/java/com/vaadin/tests/server/component/table/TableDeclarativeTestBase.java b/server/src/test/java/com/vaadin/tests/server/component/table/TableDeclarativeTestBase.java
index 1f0b3d924c..7c28f28301 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/table/TableDeclarativeTestBase.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/table/TableDeclarativeTestBase.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,8 +20,8 @@ import static org.junit.Assert.assertTrue;
import com.vaadin.tests.design.DeclarativeTestBase;
import com.vaadin.ui.Table;
-public abstract class TableDeclarativeTestBase extends
- DeclarativeTestBase<Table> {
+public abstract class TableDeclarativeTestBase
+ extends DeclarativeTestBase<Table> {
@Override
public Table testRead(String design, Table expected) {
@@ -40,8 +40,8 @@ public abstract class TableDeclarativeTestBase extends
}
protected void compareBody(Table read, Table expected) {
- assertEquals("number of items", expected.getItemIds().size(), read
- .getItemIds().size());
+ assertEquals("number of items", expected.getItemIds().size(),
+ read.getItemIds().size());
for (Object rowId : expected.getItemIds()) {
assertTrue(read.containsId(rowId));
for (Object propertyId : read.getVisibleColumns()) {
diff --git a/server/src/test/java/com/vaadin/tests/server/component/table/TableGeneratorTest.java b/server/src/test/java/com/vaadin/tests/server/component/table/TableGeneratorTest.java
index f3c2589f4a..6fbe5557f8 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/table/TableGeneratorTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/table/TableGeneratorTest.java
@@ -17,8 +17,8 @@ public class TableGeneratorTest {
for (int j = 0; j < items; j++) {
Item item = t.addItem("Item " + j);
for (int i = 0; i < properties; i++) {
- item.getItemProperty("Property " + i).setValue(
- "Item " + j + "/Property " + i);
+ item.getItemProperty("Property " + i)
+ .setValue("Item " + j + "/Property " + i);
}
}
diff --git a/server/src/test/java/com/vaadin/tests/server/component/table/TablePropertyValueConverterTest.java b/server/src/test/java/com/vaadin/tests/server/component/table/TablePropertyValueConverterTest.java
index 0bcc71630e..9801fde9ba 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/table/TablePropertyValueConverterTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/table/TablePropertyValueConverterTest.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -68,8 +68,8 @@ public class TablePropertyValueConverterTest {
@Test
public void testSetContainer() {
- table.setContainerDataSource(createContainer(new String[] { "col1",
- "col3", "col4", "col5" }));
+ table.setContainerDataSource(createContainer(
+ new String[] { "col1", "col3", "col4", "col5" }));
Collection<Object> converters = table.getCurrentConverters();
assertTrue("There should only have been one converter left.",
converters.size() == 1);
@@ -166,9 +166,10 @@ public class TablePropertyValueConverterTest {
return null;
}
});
- customTable.setContainerDataSource(createContainer(new String[] {
- "col1", "col2", "col3" }, new Class[] { DerivedClass.class,
- DerivedClass.class, BaseClass.class }));
+ customTable.setContainerDataSource(
+ createContainer(new String[] { "col1", "col2", "col3" },
+ new Class[] { DerivedClass.class, DerivedClass.class,
+ BaseClass.class }));
Set<Object> converters = customTable.getCurrentConverters();
// TODO Test temporarily disabled as this feature
// is not yet implemented in Table
@@ -227,8 +228,8 @@ public class TablePropertyValueConverterTest {
@Before
public void setUp() {
- table = new TestableTable("Test table", createContainer(new String[] {
- "col1", "col2", "col3" }));
+ table = new TestableTable("Test table",
+ createContainer(new String[] { "col1", "col2", "col3" }));
table.setConverter("col1", new Converter<String, String>() {
private static final long serialVersionUID = 1L;
diff --git a/server/src/test/java/com/vaadin/tests/server/component/table/TableSelectableTest.java b/server/src/test/java/com/vaadin/tests/server/component/table/TableSelectableTest.java
index 2ec8ccec81..8751221b70 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/table/TableSelectableTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/table/TableSelectableTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.ui.Table;
/**
* Tests for 'selectable' property of {@link Table} class.
- *
+ *
* @author Vaadin Ltd
*/
public class TableSelectableTest {
@@ -40,8 +40,8 @@ public class TableSelectableTest {
@Test
public void addValueChangeListener_explicitSelectable_tableIsSelectable() {
TestTable table = new TestTable();
- table.addValueChangeListener(EasyMock
- .createMock(ValueChangeListener.class));
+ table.addValueChangeListener(
+ EasyMock.createMock(ValueChangeListener.class));
Assert.assertTrue(table.isSelectable());
Assert.assertTrue(table.markAsDirtyCalled);
@@ -58,8 +58,8 @@ public class TableSelectableTest {
public void setSelectable_explicitNotSelectable_tableIsNotSelectable() {
Table table = new Table();
table.setSelectable(false);
- table.addValueChangeListener(EasyMock
- .createMock(ValueChangeListener.class));
+ table.addValueChangeListener(
+ EasyMock.createMock(ValueChangeListener.class));
Assert.assertFalse(table.isSelectable());
}
diff --git a/server/src/test/java/com/vaadin/tests/server/component/table/TableStateTest.java b/server/src/test/java/com/vaadin/tests/server/component/table/TableStateTest.java
index 7f951e0835..ffc1868903 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/table/TableStateTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/table/TableStateTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.ui.Table;
/**
* Tests for Table State.
- *
+ *
*/
public class TableStateTest {
diff --git a/server/src/test/java/com/vaadin/tests/server/component/table/TableVisibleColumnsTest.java b/server/src/test/java/com/vaadin/tests/server/component/table/TableVisibleColumnsTest.java
index e4f229590f..f9f6e7f979 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/table/TableVisibleColumnsTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/table/TableVisibleColumnsTest.java
@@ -14,8 +14,8 @@ public class TableVisibleColumnsTest {
@Test
public void defaultVisibleColumns() {
for (int properties = 0; properties < 10; properties++) {
- Table t = TableGeneratorTest.createTableWithDefaultContainer(
- properties, 10);
+ Table t = TableGeneratorTest
+ .createTableWithDefaultContainer(properties, 10);
Object[] expected = new Object[properties];
for (int i = 0; i < properties; i++) {
expected[i] = "Property " + i;
@@ -28,7 +28,8 @@ public class TableVisibleColumnsTest {
@Test
public void explicitVisibleColumns() {
Table t = TableGeneratorTest.createTableWithDefaultContainer(5, 10);
- Object[] newVisibleColumns = new Object[] { "Property 1", "Property 2" };
+ Object[] newVisibleColumns = new Object[] { "Property 1",
+ "Property 2" };
t.setVisibleColumns(newVisibleColumns);
assertArrayEquals("Explicit visible columns, 5 properties",
newVisibleColumns, t.getVisibleColumns());
@@ -40,7 +41,8 @@ public class TableVisibleColumnsTest {
Table t = TableGeneratorTest.createTableWithDefaultContainer(3, 10);
try {
- t.setVisibleColumns(new Object[] { "a", "Property 2", "Property 3" });
+ t.setVisibleColumns(
+ new Object[] { "a", "Property 2", "Property 3" });
junit.framework.Assert.fail("IllegalArgumentException expected");
} catch (IllegalArgumentException e) {
// OK, expected
diff --git a/server/src/test/java/com/vaadin/tests/server/component/tabsheet/TabSheetDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/tabsheet/TabSheetDeclarativeTest.java
index 22472850f6..1b3e471e24 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/tabsheet/TabSheetDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/tabsheet/TabSheetDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,7 +27,7 @@ import com.vaadin.ui.TextField;
/**
* Tests declarative support for TabSheet.
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -72,8 +72,8 @@ public class TabSheetDeclarativeTest extends DeclarativeTestBase<TabSheet> {
public void tabsNotShown() {
String design = "<vaadin-tab-sheet tabs-visible=\"false\">\n"
+ " <tab caption=\"My Tab\" selected>\n"
- + " <vaadin-label>My Content</vaadin-label>\n"
- + " </tab>\n" + "</vaadin-tab-sheet>\n";
+ + " <vaadin-label>My Content</vaadin-label>\n" + " </tab>\n"
+ + "</vaadin-tab-sheet>\n";
TabSheet ts = new TabSheet();
ts.setTabsVisible(false);
Label l = new Label("My Content", ContentMode.HTML);
diff --git a/server/src/test/java/com/vaadin/tests/server/component/tabsheet/TabSheetTest.java b/server/src/test/java/com/vaadin/tests/server/component/tabsheet/TabSheetTest.java
index a45b2c5587..0b526541c2 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/tabsheet/TabSheetTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/tabsheet/TabSheetTest.java
@@ -281,6 +281,6 @@ public class TabSheetTest {
// then
listener.assertActualComponentIs(lbl3);
- assertEquals(lbl3, tabSheet.getSelectedTab());
+ assertEquals(lbl3, tabSheet.getSelectedTab());
}
}
diff --git a/server/src/test/java/com/vaadin/tests/server/component/textarea/TextAreaDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/textarea/TextAreaDeclarativeTest.java
index fdf2599370..93382cee1d 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/textarea/TextAreaDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/textarea/TextAreaDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import com.vaadin.ui.declarative.DesignContext;
/**
* Tests declarative support for implementations of {@link TextArea}.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
diff --git a/server/src/test/java/com/vaadin/tests/server/component/textfield/TextFieldDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/textfield/TextFieldDeclarativeTest.java
index 63ea493344..2dd10d13c0 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/textfield/TextFieldDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/textfield/TextFieldDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ import com.vaadin.ui.TextField;
/**
* Tests declarative support for implementations of {@link TextField}.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
diff --git a/server/src/test/java/com/vaadin/tests/server/component/textfield/TextFieldWithValidatorTest.java b/server/src/test/java/com/vaadin/tests/server/component/textfield/TextFieldWithValidatorTest.java
index 859d69d26e..6fb1a35b6a 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/textfield/TextFieldWithValidatorTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/textfield/TextFieldWithValidatorTest.java
@@ -152,8 +152,8 @@ public class TextFieldWithValidatorTest {
@Test
public void testRegexpValidator() {
- field.addValidator(new RegexpValidator("pattern", true,
- "Validation failed"));
+ field.addValidator(
+ new RegexpValidator("pattern", true, "Validation failed"));
field.setRequired(false);
// succeeds
diff --git a/server/src/test/java/com/vaadin/tests/server/component/tree/ListenersTest.java b/server/src/test/java/com/vaadin/tests/server/component/tree/ListenersTest.java
index 359aa8d480..ade24a0df6 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/tree/ListenersTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/tree/ListenersTest.java
@@ -44,7 +44,8 @@ public class ListenersTest implements ExpandListener, CollapseListener {
expandCalled = 0;
tree.expandItemsRecursively(rootIds.get(1));
assertEquals(2, expandCalled);
- List<Object> c = new ArrayList<Object>(tree.getChildren(rootIds.get(1)));
+ List<Object> c = new ArrayList<Object>(
+ tree.getChildren(rootIds.get(1)));
assertEquals(c.get(4), lastExpanded);
@@ -57,7 +58,7 @@ public class ListenersTest implements ExpandListener, CollapseListener {
/**
* Creates a tree with "rootItems" roots, each with "children" children,
* each with 1 child.
- *
+ *
* @param rootItems
* @param children
* @param expand
@@ -116,7 +117,8 @@ public class ListenersTest implements ExpandListener, CollapseListener {
collapseCalled = 0;
tree.collapseItemsRecursively(rootIds.get(1));
assertEquals(2, collapseCalled);
- List<Object> c = new ArrayList<Object>(tree.getChildren(rootIds.get(1)));
+ List<Object> c = new ArrayList<Object>(
+ tree.getChildren(rootIds.get(1)));
assertEquals(c.get(4), lastCollapsed);
// Collapsing an already expanded item should send no expand event
diff --git a/server/src/test/java/com/vaadin/tests/server/component/tree/TreeDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/tree/TreeDeclarativeTest.java
index 8577ed1af8..f79b2f471e 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/tree/TreeDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/tree/TreeDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.ui.Tree.TreeDragMode;
/**
* Tests the declarative support for implementations of {@link Tree}.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -72,8 +72,8 @@ public class TreeDeclarativeTest extends DeclarativeTestBase<Tree> {
tree.setParent("Grandchild", "Child");
tree.addItem("With icon");
- tree.setItemIcon("With icon", new ExternalResource(
- "http://example.com/icon.png"));
+ tree.setItemIcon("With icon",
+ new ExternalResource("http://example.com/icon.png"));
testRead(design, tree);
testWrite(design, tree, true);
diff --git a/server/src/test/java/com/vaadin/tests/server/component/tree/TreeTest.java b/server/src/test/java/com/vaadin/tests/server/component/tree/TreeTest.java
index 3e5425a875..ed455415ea 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/tree/TreeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/tree/TreeTest.java
@@ -73,16 +73,16 @@ public class TreeTest {
@Test
public void testContainerTypeIsHierarchical() {
- assertTrue(HierarchicalContainer.class.isAssignableFrom(tree
- .getContainerDataSource().getClass()));
- assertTrue(HierarchicalContainer.class.isAssignableFrom(tree2
- .getContainerDataSource().getClass()));
- assertTrue(HierarchicalContainer.class.isAssignableFrom(tree3
- .getContainerDataSource().getClass()));
- assertFalse(HierarchicalContainer.class.isAssignableFrom(tree4
- .getContainerDataSource().getClass()));
- assertTrue(Container.Hierarchical.class.isAssignableFrom(tree4
- .getContainerDataSource().getClass()));
+ assertTrue(HierarchicalContainer.class
+ .isAssignableFrom(tree.getContainerDataSource().getClass()));
+ assertTrue(HierarchicalContainer.class
+ .isAssignableFrom(tree2.getContainerDataSource().getClass()));
+ assertTrue(HierarchicalContainer.class
+ .isAssignableFrom(tree3.getContainerDataSource().getClass()));
+ assertFalse(HierarchicalContainer.class
+ .isAssignableFrom(tree4.getContainerDataSource().getClass()));
+ assertTrue(Container.Hierarchical.class
+ .isAssignableFrom(tree4.getContainerDataSource().getClass()));
}
@Test
@@ -91,8 +91,8 @@ public class TreeTest {
tree.expandItem("child");
Field expandedField = tree.getClass().getDeclaredField("expanded");
- Field expandedItemIdField = tree.getClass().getDeclaredField(
- "expandedItemId");
+ Field expandedItemIdField = tree.getClass()
+ .getDeclaredField("expandedItemId");
expandedField.setAccessible(true);
expandedItemIdField.setAccessible(true);
@@ -131,8 +131,8 @@ public class TreeTest {
tree.setContainerDataSource(new HierarchicalContainer());
Field expandedField = tree.getClass().getDeclaredField("expanded");
- Field expandedItemIdField = tree.getClass().getDeclaredField(
- "expandedItemId");
+ Field expandedItemIdField = tree.getClass()
+ .getDeclaredField("expandedItemId");
expandedField.setAccessible(true);
expandedItemIdField.setAccessible(true);
diff --git a/server/src/test/java/com/vaadin/tests/server/component/treetable/TreeTableDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/treetable/TreeTableDeclarativeTest.java
index 9d614eccc9..801ad1bdaf 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/treetable/TreeTableDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/treetable/TreeTableDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.ui.declarative.DesignException;
/**
* Test declarative support for {@link TreeTable}.
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/server/src/test/java/com/vaadin/tests/server/component/treetable/TreeTableTest.java b/server/src/test/java/com/vaadin/tests/server/component/treetable/TreeTableTest.java
index 33f41d84ea..37c3e8aebc 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/treetable/TreeTableTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/treetable/TreeTableTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ import com.vaadin.ui.TreeTable;
/**
* Tests for {@link TreeTable}
- *
+ *
* @author Vaadin Ltd
*/
public class TreeTableTest {
@@ -58,8 +58,9 @@ public class TreeTableTest {
for (RowHeaderMode mode : modes) {
tree.setRowHeaderMode(mode);
- Assert.assertTrue("Row headers are disabled for " + mode
- + " header mode", tree.rowHeadersAreEnabled());
+ Assert.assertTrue(
+ "Row headers are disabled for " + mode + " header mode",
+ tree.rowHeadersAreEnabled());
}
}
diff --git a/server/src/test/java/com/vaadin/tests/server/component/twincolselect/TwinColSelectDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/twincolselect/TwinColSelectDeclarativeTest.java
index 146d1f1ad1..671977fe2f 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/twincolselect/TwinColSelectDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/twincolselect/TwinColSelectDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,11 +24,11 @@ import com.vaadin.ui.TwinColSelect;
/**
* Test cases for reading the properties of selection components.
- *
+ *
* @author Vaadin Ltd
*/
-public class TwinColSelectDeclarativeTest extends
- DeclarativeTestBase<TwinColSelect> {
+public class TwinColSelectDeclarativeTest
+ extends DeclarativeTestBase<TwinColSelect> {
public String getBasicDesign() {
return "<vaadin-twin-col-select rows=5 right-column-caption='Selected values' left-column-caption='Unselected values'>\n"
diff --git a/server/src/test/java/com/vaadin/tests/server/component/twincolselect/TwinColSelectStateTest.java b/server/src/test/java/com/vaadin/tests/server/component/twincolselect/TwinColSelectStateTest.java
index b2e2c0a65b..559fd3478a 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/twincolselect/TwinColSelectStateTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/twincolselect/TwinColSelectStateTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.ui.TwinColSelect;
/**
* Tests for TwinColSelectState.
- *
+ *
*/
public class TwinColSelectStateTest {
@@ -46,8 +46,8 @@ public class TwinColSelectStateTest {
@Test
public void selectStateHasCustomPrimaryStyleName() {
TwinColSelectState state = new TwinColSelectState();
- Assert.assertEquals("Unexpected primary style name",
- "v-select-twincol", state.primaryStyleName);
+ Assert.assertEquals("Unexpected primary style name", "v-select-twincol",
+ state.primaryStyleName);
}
private static class TestTwinColSelect extends TwinColSelect {
diff --git a/server/src/test/java/com/vaadin/tests/server/component/ui/CustomUIClassLoaderTest.java b/server/src/test/java/com/vaadin/tests/server/component/ui/CustomUIClassLoaderTest.java
index 6ff6c1a71c..a7392be3da 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/ui/CustomUIClassLoaderTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/ui/CustomUIClassLoaderTest.java
@@ -50,7 +50,7 @@ public class CustomUIClassLoaderTest {
/**
* Tests that a UI class can be loaded even if no classloader has been
* provided.
- *
+ *
* @throws Exception
* if thrown
*/
@@ -70,8 +70,8 @@ public class CustomUIClassLoaderTest {
private static DeploymentConfiguration createConfigurationMock() {
Properties properties = new Properties();
properties.put(VaadinSession.UI_PARAMETER, MyUI.class.getName());
- return new DefaultDeploymentConfiguration(
- CustomUIClassLoaderTest.class, properties);
+ return new DefaultDeploymentConfiguration(CustomUIClassLoaderTest.class,
+ properties);
}
private static VaadinRequest createRequestMock(ClassLoader classloader) {
@@ -80,8 +80,8 @@ public class CustomUIClassLoaderTest {
.createMock(VaadinService.class);
EasyMock.expect(configurationMock.getDeploymentConfiguration())
.andReturn(createConfigurationMock());
- EasyMock.expect(configurationMock.getClassLoader()).andReturn(
- classloader);
+ EasyMock.expect(configurationMock.getClassLoader())
+ .andReturn(classloader);
// Mock a VaadinRequest to give the mocked vaadin service
VaadinRequest requestMock = EasyMock.createMock(VaadinRequest.class);
@@ -96,7 +96,7 @@ public class CustomUIClassLoaderTest {
/**
* Tests that the ClassLoader passed in the ApplicationStartEvent is used to
* load UI classes.
- *
+ *
* @throws Exception
* if thrown
*/
diff --git a/server/src/test/java/com/vaadin/tests/server/component/upload/UploadDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/upload/UploadDeclarativeTest.java
index 12f319c6ad..8bb0c9addb 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/upload/UploadDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/upload/UploadDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ import com.vaadin.ui.Upload;
/**
* Tests the declarative support for implementations of {@link Upload}.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
diff --git a/server/src/test/java/com/vaadin/tests/server/component/upload/UploadTest.java b/server/src/test/java/com/vaadin/tests/server/component/upload/UploadTest.java
index 358e4db9cd..4feec47477 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/upload/UploadTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/upload/UploadTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.shared.ui.upload.UploadState;
import com.vaadin.ui.Upload;
/**
- *
+ *
* @author Vaadin Ltd
*/
public class UploadTest {
@@ -64,7 +64,8 @@ public class UploadTest {
state.primaryStyleName);
}
- private static class TestStreamingErrorEvent implements StreamingErrorEvent {
+ private static class TestStreamingErrorEvent
+ implements StreamingErrorEvent {
@Override
public String getFileName() {
diff --git a/server/src/test/java/com/vaadin/tests/server/component/window/AttachDetachWindowTest.java b/server/src/test/java/com/vaadin/tests/server/component/window/AttachDetachWindowTest.java
index 9f7a54df9c..a3ece24c76 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/window/AttachDetachWindowTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/window/AttachDetachWindowTest.java
@@ -227,7 +227,8 @@ public class AttachDetachWindowTest {
ui.addComponentAttachListener(new ComponentAttachListener() {
@Override
- public void componentAttachedToContainer(ComponentAttachEvent event) {
+ public void componentAttachedToContainer(
+ ComponentAttachEvent event) {
eventFired[0] = event.getAttachedComponent().equals(window);
}
});
@@ -271,10 +272,10 @@ public class AttachDetachWindowTest {
testContent.childAttachCalled);
assertSame("window not attached", win.getSession(), testApp);
- assertSame("window content not attached", testContent.getUI()
- .getSession(), testApp);
- assertSame("window children not attached", testContent.child.getUI()
- .getSession(), testApp);
+ assertSame("window content not attached",
+ testContent.getUI().getSession(), testApp);
+ assertSame("window children not attached",
+ testContent.child.getUI().getSession(), testApp);
}
/**
@@ -300,7 +301,7 @@ public class AttachDetachWindowTest {
/**
* Asserts that win and its children are unattached and their detach()
* methods have been been called.
- *
+ *
* @param win
*/
private void assertDetached(TestContainer win) {
diff --git a/server/src/test/java/com/vaadin/tests/server/component/window/WindowDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/window/WindowDeclarativeTest.java
index e1c14e9757..d118dbe7f5 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/window/WindowDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/window/WindowDeclarativeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,7 +30,7 @@ import com.vaadin.ui.declarative.DesignException;
/**
* Tests declarative support for implementations of {@link Window}.
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -169,10 +169,8 @@ public class WindowDeclarativeTest extends DeclarativeTestBase<Window> {
Label assistive2 = new Label("More assistive text");
String design = "<vaadin-window>"
- + createElement(assistive1)
- .attr(":assistive-description", true)
- + createElement(new Button("OK"))
- + createElement(assistive2)
+ + createElement(assistive1).attr(":assistive-description", true)
+ + createElement(new Button("OK")) + createElement(assistive2)
.attr(":assistive-description", true);
Window expected = new Window();
@@ -181,12 +179,10 @@ public class WindowDeclarativeTest extends DeclarativeTestBase<Window> {
testRead(design, expected);
- String written = "<vaadin-window>"
- + createElement(new Button("OK"))
- + createElement(assistive1)
- .attr(":assistive-description", true)
- + createElement(assistive2)
- .attr(":assistive-description", true);
+ String written = "<vaadin-window>" + createElement(new Button("OK"))
+ + createElement(assistive1).attr(":assistive-description", true)
+ + createElement(assistive2).attr(":assistive-description",
+ true);
testWrite(written, expected);
}
diff --git a/server/src/test/java/com/vaadin/tests/server/component/window/WindowTest.java b/server/src/test/java/com/vaadin/tests/server/component/window/WindowTest.java
index e9e73c1e0f..475271be35 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/window/WindowTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/window/WindowTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/tests/server/componentcontainer/AddRemoveComponentTest.java b/server/src/test/java/com/vaadin/tests/server/componentcontainer/AddRemoveComponentTest.java
index c5bc4f39e5..f1a83adadc 100644
--- a/server/src/test/java/com/vaadin/tests/server/componentcontainer/AddRemoveComponentTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/componentcontainer/AddRemoveComponentTest.java
@@ -37,7 +37,8 @@ public class AddRemoveComponentTest {
hl.addComponent(label);
componentContainer.removeComponent(label);
- Assert.assertEquals("Parent no longer correct for "
- + componentContainer.getClass(), hl, label.getParent());
+ Assert.assertEquals(
+ "Parent no longer correct for " + componentContainer.getClass(),
+ hl, label.getParent());
}
}
diff --git a/server/src/test/java/com/vaadin/tests/server/components/AbstractFieldValueChangeTestBase.java b/server/src/test/java/com/vaadin/tests/server/components/AbstractFieldValueChangeTestBase.java
index d068051663..8c67b20cb9 100644
--- a/server/src/test/java/com/vaadin/tests/server/components/AbstractFieldValueChangeTestBase.java
+++ b/server/src/test/java/com/vaadin/tests/server/components/AbstractFieldValueChangeTestBase.java
@@ -12,10 +12,10 @@ import com.vaadin.ui.AbstractField;
/**
* Base class for tests for checking that value change listeners for fields are
* not called exactly once when they should be, and not at other times.
- *
+ *
* Does not check all cases (e.g. properties that do not implement
* {@link ValueChangeNotifier}).
- *
+ *
* Subclasses should implement {@link #setValue()} and call
* <code>super.setValue(AbstractField)</code>. Also, subclasses should typically
* override {@link #setValue(AbstractField)} to set the field value via
@@ -67,11 +67,11 @@ public abstract class AbstractFieldValueChangeTestBase<T> {
/**
* Common unbuffered case: both writeThrough (auto-commit) and readThrough
* are on. Calling commit() should not cause notifications.
- *
+ *
* Using the readThrough mode allows changes made to the property value to
* be seen in some cases also when there is no notification of value change
* from the property.
- *
+ *
* Field value change notifications closely mirror value changes of the data
* source behind the field.
*/
@@ -86,7 +86,7 @@ public abstract class AbstractFieldValueChangeTestBase<T> {
/**
* Fully buffered use where the data source is neither read nor modified
* during editing, and is updated at commit().
- *
+ *
* Field value change notifications reflect the buffered value in the field,
* not the original data source value changes.
*/
diff --git a/server/src/test/java/com/vaadin/tests/server/components/ComboBoxValueChangeTest.java b/server/src/test/java/com/vaadin/tests/server/components/ComboBoxValueChangeTest.java
index 8bc1eb87df..29c157df57 100644
--- a/server/src/test/java/com/vaadin/tests/server/components/ComboBoxValueChangeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/components/ComboBoxValueChangeTest.java
@@ -11,11 +11,11 @@ import com.vaadin.ui.ComboBox;
/**
* Check that the value change listener for a combo box is triggered exactly
* once when setting the value, at the correct time.
- *
+ *
* See <a href="http://dev.vaadin.com/ticket/4394">Ticket 4394</a>.
*/
-public class ComboBoxValueChangeTest extends
- AbstractFieldValueChangeTestBase<Object> {
+public class ComboBoxValueChangeTest
+ extends AbstractFieldValueChangeTestBase<Object> {
@Before
public void setUp() {
diff --git a/server/src/test/java/com/vaadin/tests/server/components/TextFieldValueChangeTest.java b/server/src/test/java/com/vaadin/tests/server/components/TextFieldValueChangeTest.java
index 3b34d17c99..124966e4db 100644
--- a/server/src/test/java/com/vaadin/tests/server/components/TextFieldValueChangeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/components/TextFieldValueChangeTest.java
@@ -16,11 +16,11 @@ import com.vaadin.ui.TextField;
/**
* Check that the value change listener for a text field is triggered exactly
* once when setting the value, at the correct time.
- *
+ *
* See <a href="http://dev.vaadin.com/ticket/4394">Ticket 4394</a>.
*/
-public class TextFieldValueChangeTest extends
- AbstractFieldValueChangeTestBase<String> {
+public class TextFieldValueChangeTest
+ extends AbstractFieldValueChangeTestBase<String> {
@Before
public void setUp() {
@@ -48,8 +48,8 @@ public class TextFieldValueChangeTest extends
/**
* Test that field propagates value change events originating from property,
* but don't fire value change events twice if value has only changed once.
- *
- *
+ *
+ *
* TODO make test field type agnostic (eg. combobox)
*/
@Test
@@ -83,7 +83,7 @@ public class TextFieldValueChangeTest extends
/**
* Value change events from property should not propagate if read through is
* false. Execpt when the property is being set.
- *
+ *
* TODO make test field type agnostic (eg. combobox)
*/
@Test
diff --git a/server/src/test/java/com/vaadin/tests/server/navigator/ClassBasedViewProviderTest.java b/server/src/test/java/com/vaadin/tests/server/navigator/ClassBasedViewProviderTest.java
index ecd45251b5..194415eb01 100644
--- a/server/src/test/java/com/vaadin/tests/server/navigator/ClassBasedViewProviderTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/navigator/ClassBasedViewProviderTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -99,8 +99,7 @@ public class ClassBasedViewProviderTest {
ClassBasedViewProvider provider2 = new ClassBasedViewProvider("test",
TestView.class);
- assertNull(
- "Found view name for empty view string when none registered",
+ assertNull("Found view name for empty view string when none registered",
provider2.getViewName(""));
}
diff --git a/server/src/test/java/com/vaadin/tests/server/navigator/NavigatorTest.java b/server/src/test/java/com/vaadin/tests/server/navigator/NavigatorTest.java
index 3b7ad0ae00..016a7fe0bc 100644
--- a/server/src/test/java/com/vaadin/tests/server/navigator/NavigatorTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/navigator/NavigatorTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -151,7 +151,8 @@ public class NavigatorTest {
if (!stringEquals(reference.getViewName(), event.getViewName())) {
return false;
}
- if (!stringEquals(reference.getParameters(), event.getParameters())) {
+ if (!stringEquals(reference.getParameters(),
+ event.getParameters())) {
return false;
}
return true;
@@ -258,9 +259,8 @@ public class NavigatorTest {
@Override
public boolean matches(Object actual) {
- return actual instanceof ViewChangeEvent
- && expected.equals(((ViewChangeEvent) actual)
- .getParameters());
+ return actual instanceof ViewChangeEvent && expected
+ .equals(((ViewChangeEvent) actual).getParameters());
}
});
return null;
@@ -299,10 +299,11 @@ public class NavigatorTest {
UriFragmentManager manager = (UriFragmentManager) navigator
.getStateManager();
- manager.uriFragmentChanged(EasyMock
- .createMock(UriFragmentChangedEvent.class));
- Assert.fail("Expected null pointer exception after call uriFragmentChanged "
- + "for destroyed navigator");
+ manager.uriFragmentChanged(
+ EasyMock.createMock(UriFragmentChangedEvent.class));
+ Assert.fail(
+ "Expected null pointer exception after call uriFragmentChanged "
+ + "for destroyed navigator");
}
@Test
@@ -336,8 +337,8 @@ public class NavigatorTest {
manager.setState("test2");
EasyMock.expect(manager.getState()).andReturn("test2");
- EasyMock.expect(provider.getViewName("test1/params"))
- .andReturn("test1").times(2);
+ EasyMock.expect(provider.getViewName("test1/params")).andReturn("test1")
+ .times(2);
EasyMock.expect(provider.getView("test1")).andReturn(view1);
EasyMock.expect(manager.getState()).andReturn("test2");
view1.enter(eventParametersEqual("params"));
@@ -389,8 +390,8 @@ public class NavigatorTest {
display.showView(view1);
manager.setState("test1");
- EasyMock.expect(provider.getViewName("test1/params"))
- .andReturn("test1").times(2);
+ EasyMock.expect(provider.getViewName("test1/params")).andReturn("test1")
+ .times(2);
EasyMock.expect(provider.getView("test1")).andReturn(view1);
EasyMock.expect(manager.getState()).andReturn("test2");
view1.enter(eventParametersEqual("params"));
@@ -582,8 +583,8 @@ public class NavigatorTest {
navigator.addView("test", view);
- assertEquals("Registered view instance not returned by navigator",
- view, navigator.getView("test"));
+ assertEquals("Registered view instance not returned by navigator", view,
+ navigator.getView("test"));
}
@Test
@@ -738,8 +739,8 @@ public class NavigatorTest {
TestView2.class, navigator.getView("test/subview/").getClass());
assertEquals(
"Incorrect view name found for subview string with parameters",
- TestView2.class, navigator.getView("test/subview/parameters")
- .getClass());
+ TestView2.class,
+ navigator.getView("test/subview/parameters").getClass());
assertEquals("Incorrect view name found for top level view string",
TestView.class, navigator.getView("test").getClass());
assertEquals(
@@ -747,8 +748,8 @@ public class NavigatorTest {
TestView.class, navigator.getView("test/").getClass());
assertEquals(
"Incorrect view name found for top level view string with parameters starting like subview name",
- TestView.class, navigator.getView("test/subviewnothere")
- .getClass());
+ TestView.class,
+ navigator.getView("test/subviewnothere").getClass());
}
@Test
@@ -758,8 +759,8 @@ public class NavigatorTest {
navigator.addView("test/subview", TestView2.class);
navigator.addView("test", TestView.class);
- assertEquals("Incorrect view name found", TestView.class, navigator
- .getView("test").getClass());
+ assertEquals("Incorrect view name found", TestView.class,
+ navigator.getView("test").getClass());
// other order
@@ -768,8 +769,8 @@ public class NavigatorTest {
navigator2.addView("test", TestView.class);
navigator2.addView("test/subview", TestView2.class);
- assertEquals("Incorrect view name found", TestView.class, navigator2
- .getView("test").getClass());
+ assertEquals("Incorrect view name found", TestView.class,
+ navigator2.getView("test").getClass());
}
@Test
@@ -801,10 +802,10 @@ public class NavigatorTest {
EasyMock.replay(errorView2);
ViewProvider errorProvider = EasyMock.createMock(ViewProvider.class);
- EasyMock.expect(errorProvider.getView("doesnotexist2")).andReturn(
- errorView2);
- EasyMock.expect(errorProvider.getViewName("doesnotexist2")).andReturn(
- "doesnotexist2");
+ EasyMock.expect(errorProvider.getView("doesnotexist2"))
+ .andReturn(errorView2);
+ EasyMock.expect(errorProvider.getViewName("doesnotexist2"))
+ .andReturn("doesnotexist2");
EasyMock.replay(errorProvider);
navigator.setErrorProvider(errorProvider);
diff --git a/server/src/test/java/com/vaadin/tests/server/navigator/UriFragmentManagerTest.java b/server/src/test/java/com/vaadin/tests/server/navigator/UriFragmentManagerTest.java
index 327baae21f..840ba9d8e2 100644
--- a/server/src/test/java/com/vaadin/tests/server/navigator/UriFragmentManagerTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/navigator/UriFragmentManagerTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/tests/server/renderer/ImageRendererTest.java b/server/src/test/java/com/vaadin/tests/server/renderer/ImageRendererTest.java
index 782434bcd5..a3fe556d8b 100644
--- a/server/src/test/java/com/vaadin/tests/server/renderer/ImageRendererTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/renderer/ImageRendererTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -59,8 +59,8 @@ public class ImageRendererTest {
@Test
public void testExternalResource() {
- JsonValue v = renderer.encode(new ExternalResource(
- "http://example.com/foo.png"));
+ JsonValue v = renderer
+ .encode(new ExternalResource("http://example.com/foo.png"));
assertEquals("http://example.com/foo.png", getUrl(v));
}
diff --git a/server/src/test/java/com/vaadin/tests/server/renderer/RendererTest.java b/server/src/test/java/com/vaadin/tests/server/renderer/RendererTest.java
index cea8df0ba6..81caf361a9 100644
--- a/server/src/test/java/com/vaadin/tests/server/renderer/RendererTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/renderer/RendererTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -150,8 +150,8 @@ public class RendererTest {
@Test
public void testDefaultRendererAndConverter() throws Exception {
assertSame(TextRenderer.class, intColumn.getRenderer().getClass());
- assertSame(StringToIntegerConverter.class, intColumn.getConverter()
- .getClass());
+ assertSame(StringToIntegerConverter.class,
+ intColumn.getConverter().getClass());
assertSame(TextRenderer.class, textColumn.getRenderer().getClass());
// String->String; converter not needed
@@ -165,8 +165,8 @@ public class RendererTest {
@Test
public void testFindCompatibleConverter() throws Exception {
intColumn.setRenderer(renderer());
- assertSame(StringToIntegerConverter.class, intColumn.getConverter()
- .getClass());
+ assertSame(StringToIntegerConverter.class,
+ intColumn.getConverter().getClass());
textColumn.setRenderer(renderer());
assertNull(textColumn.getConverter());
@@ -196,8 +196,8 @@ public class RendererTest {
@Test
public void testEncodingWithoutConverter() throws Exception {
- assertEquals("TestBean [42]", render(beanColumn, new TestBean())
- .asString());
+ assertEquals("TestBean [42]",
+ render(beanColumn, new TestBean()).asString());
}
@Test
@@ -235,21 +235,21 @@ public class RendererTest {
textColumn.setRenderer(new TextRenderer("default value"));
htmlColumn.setRenderer(new HtmlRenderer("default value"));
- numberColumn.setRenderer(new NumberRenderer("%s", Locale.getDefault(),
- "default value"));
+ numberColumn.setRenderer(
+ new NumberRenderer("%s", Locale.getDefault(), "default value"));
dateColumn.setRenderer(new DateRenderer("%s", "default value"));
buttonColumn.setRenderer(new ButtonRenderer("default value"));
- assertEquals("default value", textColumn.getRenderer().encode(null)
- .asString());
- assertEquals("default value", htmlColumn.getRenderer().encode(null)
- .asString());
- assertEquals("default value", numberColumn.getRenderer().encode(null)
- .asString());
- assertEquals("default value", dateColumn.getRenderer().encode(null)
- .asString());
- assertEquals("default value", buttonColumn.getRenderer().encode(null)
- .asString());
+ assertEquals("default value",
+ textColumn.getRenderer().encode(null).asString());
+ assertEquals("default value",
+ htmlColumn.getRenderer().encode(null).asString());
+ assertEquals("default value",
+ numberColumn.getRenderer().encode(null).asString());
+ assertEquals("default value",
+ dateColumn.getRenderer().encode(null).asString());
+ assertEquals("default value",
+ buttonColumn.getRenderer().encode(null).asString());
}
private TestConverter converter() {
diff --git a/server/src/test/java/com/vaadin/tests/server/validation/BeanValidationTest.java b/server/src/test/java/com/vaadin/tests/server/validation/BeanValidationTest.java
index 6ad6ac2d5f..c9b5bb0a3a 100644
--- a/server/src/test/java/com/vaadin/tests/server/validation/BeanValidationTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/validation/BeanValidationTest.java
@@ -33,13 +33,15 @@ public class BeanValidationTest {
@Test(expected = InvalidValueException.class)
public void testBeanValidationIntegerTooSmall() {
- BeanValidator validator = new BeanValidator(BeanToValidate.class, "age");
+ BeanValidator validator = new BeanValidator(BeanToValidate.class,
+ "age");
validator.validate(17);
}
@Test
public void testBeanValidationIntegerOk() {
- BeanValidator validator = new BeanValidator(BeanToValidate.class, "age");
+ BeanValidator validator = new BeanValidator(BeanToValidate.class,
+ "age");
validator.validate(18);
}
diff --git a/server/src/test/java/com/vaadin/tests/util/GraphVizClassHierarchyCreator.java b/server/src/test/java/com/vaadin/tests/util/GraphVizClassHierarchyCreator.java
index 9e791500b0..d621c0d2b4 100644
--- a/server/src/test/java/com/vaadin/tests/util/GraphVizClassHierarchyCreator.java
+++ b/server/src/test/java/com/vaadin/tests/util/GraphVizClassHierarchyCreator.java
@@ -89,7 +89,8 @@ public class GraphVizClassHierarchyCreator {
}
private static void addClassAndParentInterfaces(
- Set<Class> classesAndParents, Class<?> cls, String packageToInclude) {
+ Set<Class> classesAndParents, Class<?> cls,
+ String packageToInclude) {
if (cls == null) {
return;
@@ -123,7 +124,8 @@ public class GraphVizClassHierarchyCreator {
if (!superClass.getPackage().getName().startsWith(packageToInclude)) {
return;
}
- if (!includeInterfaces && (c.isInterface() || superClass.isInterface())) {
+ if (!includeInterfaces
+ && (c.isInterface() || superClass.isInterface())) {
return;
}
diff --git a/server/src/test/java/com/vaadin/tests/util/MockDeploymentConfiguration.java b/server/src/test/java/com/vaadin/tests/util/MockDeploymentConfiguration.java
index ddee23a9ec..3068bc7e12 100644
--- a/server/src/test/java/com/vaadin/tests/util/MockDeploymentConfiguration.java
+++ b/server/src/test/java/com/vaadin/tests/util/MockDeploymentConfiguration.java
@@ -7,8 +7,8 @@ import java.util.Properties;
import com.vaadin.server.AbstractDeploymentConfiguration;
import com.vaadin.shared.communication.PushMode;
-public class MockDeploymentConfiguration extends
- AbstractDeploymentConfiguration {
+public class MockDeploymentConfiguration
+ extends AbstractDeploymentConfiguration {
private boolean productionMode = false;
private boolean xsrfProtectionEnabled = true;
diff --git a/server/src/test/java/com/vaadin/tests/util/MockUI.java b/server/src/test/java/com/vaadin/tests/util/MockUI.java
index 17dc24e9e8..8fec5d6530 100644
--- a/server/src/test/java/com/vaadin/tests/util/MockUI.java
+++ b/server/src/test/java/com/vaadin/tests/util/MockUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/tests/util/TestUtil.java b/server/src/test/java/com/vaadin/tests/util/TestUtil.java
index 88ed017f91..c4a185647b 100644
--- a/server/src/test/java/com/vaadin/tests/util/TestUtil.java
+++ b/server/src/test/java/com/vaadin/tests/util/TestUtil.java
@@ -29,15 +29,18 @@ public class TestUtil {
while (i1.hasNext()) {
Object o1 = i1.next();
if (!i2.hasNext()) {
- Assert.fail("The second iterable contains fewer items than the first. The object "
- + o1 + " has no match in the second iterable.");
+ Assert.fail(
+ "The second iterable contains fewer items than the first. The object "
+ + o1 + " has no match in the second iterable.");
}
Object o2 = i2.next();
Assert.assertEquals(o1, o2);
}
if (i2.hasNext()) {
- Assert.fail("The second iterable contains more items than the first. The object "
- + i2.next() + " has no match in the first iterable.");
+ Assert.fail(
+ "The second iterable contains more items than the first. The object "
+ + i2.next()
+ + " has no match in the first iterable.");
}
}
}
diff --git a/server/src/test/java/com/vaadin/tests/util/UniqueSerializableTest.java b/server/src/test/java/com/vaadin/tests/util/UniqueSerializableTest.java
index 287ed0338a..6ab2d8835c 100644
--- a/server/src/test/java/com/vaadin/tests/util/UniqueSerializableTest.java
+++ b/server/src/test/java/com/vaadin/tests/util/UniqueSerializableTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/ui/AbsSelectTest.java b/server/src/test/java/com/vaadin/ui/AbsSelectTest.java
index 0b807c5f21..251e04e6c4 100644
--- a/server/src/test/java/com/vaadin/ui/AbsSelectTest.java
+++ b/server/src/test/java/com/vaadin/ui/AbsSelectTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,8 +30,8 @@ public class AbsSelectTest {
NativeSelect ns = new NativeSelect();
ns.addItems("Foo", "bar", "baz");
Assert.assertEquals(3, ns.size());
- Assert.assertArrayEquals(new Object[] { "Foo", "bar", "baz" }, ns
- .getItemIds().toArray());
+ Assert.assertArrayEquals(new Object[] { "Foo", "bar", "baz" },
+ ns.getItemIds().toArray());
}
@Test
@@ -43,8 +43,8 @@ public class AbsSelectTest {
NativeSelect ns = new NativeSelect();
ns.addItems(o1, o2, o3);
Assert.assertEquals(3, ns.size());
- Assert.assertArrayEquals(new Object[] { o1, o2, o3 }, ns.getItemIds()
- .toArray());
+ Assert.assertArrayEquals(new Object[] { o1, o2, o3 },
+ ns.getItemIds().toArray());
}
@Test
@@ -56,8 +56,8 @@ public class AbsSelectTest {
NativeSelect ns = new NativeSelect();
ns.addItems(itemIds);
Assert.assertEquals(3, ns.size());
- Assert.assertArrayEquals(new Object[] { "foo", "bar", "baz" }, ns
- .getItemIds().toArray());
+ Assert.assertArrayEquals(new Object[] { "foo", "bar", "baz" },
+ ns.getItemIds().toArray());
}
@Test
@@ -72,8 +72,8 @@ public class AbsSelectTest {
NativeSelect ns = new NativeSelect();
ns.addItems(itemIds);
Assert.assertEquals(3, ns.size());
- Assert.assertArrayEquals(new Object[] { o1, o2, o3 }, ns.getItemIds()
- .toArray());
+ Assert.assertArrayEquals(new Object[] { o1, o2, o3 },
+ ns.getItemIds().toArray());
}
diff --git a/server/src/test/java/com/vaadin/ui/CheckBoxTest.java b/server/src/test/java/com/vaadin/ui/CheckBoxTest.java
index 7d699998de..154b5cdadb 100644
--- a/server/src/test/java/com/vaadin/ui/CheckBoxTest.java
+++ b/server/src/test/java/com/vaadin/ui/CheckBoxTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/ui/GridLayoutExpandRatioTest.java b/server/src/test/java/com/vaadin/ui/GridLayoutExpandRatioTest.java
index 617c7f54ed..f39d5a8bdc 100644
--- a/server/src/test/java/com/vaadin/ui/GridLayoutExpandRatioTest.java
+++ b/server/src/test/java/com/vaadin/ui/GridLayoutExpandRatioTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/ui/HorizontalSplitPanelTest.java b/server/src/test/java/com/vaadin/ui/HorizontalSplitPanelTest.java
index 9797e48924..3c87cb54ec 100644
--- a/server/src/test/java/com/vaadin/ui/HorizontalSplitPanelTest.java
+++ b/server/src/test/java/com/vaadin/ui/HorizontalSplitPanelTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/ui/NativeSelectTest.java b/server/src/test/java/com/vaadin/ui/NativeSelectTest.java
index 78e4715f9b..e27d17271a 100644
--- a/server/src/test/java/com/vaadin/ui/NativeSelectTest.java
+++ b/server/src/test/java/com/vaadin/ui/NativeSelectTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -37,21 +37,22 @@ public class NativeSelectTest {
@Test
public void rpcRegisteredConstructorStringCollection() {
- assertFocusRpcRegistered(new NativeSelect("foo",
- Collections.singleton("Hello")));
+ assertFocusRpcRegistered(
+ new NativeSelect("foo", Collections.singleton("Hello")));
}
@Test
public void rpcRegisteredConstructorStringContainer() {
- assertFocusRpcRegistered(new NativeSelect("foo", new IndexedContainer()));
+ assertFocusRpcRegistered(
+ new NativeSelect("foo", new IndexedContainer()));
}
@Test
public void getState_listSelectHasCustomState() {
TestNativeSelect select = new TestNativeSelect();
AbstractSelectState state = select.getState();
- Assert.assertEquals("Unexpected state class",
- AbstractSelectState.class, state.getClass());
+ Assert.assertEquals("Unexpected state class", AbstractSelectState.class,
+ state.getClass());
}
private static class TestNativeSelect extends NativeSelect {
@@ -62,9 +63,8 @@ public class NativeSelectTest {
}
private void assertFocusRpcRegistered(NativeSelect s) {
- Assert.assertNotNull(
- "RPC is not correctly registered",
- s.getRpcManager("com.vaadin.shared.communication.FieldRpc$FocusAndBlurServerRpc"));
+ Assert.assertNotNull("RPC is not correctly registered", s.getRpcManager(
+ "com.vaadin.shared.communication.FieldRpc$FocusAndBlurServerRpc"));
}
}
diff --git a/server/src/test/java/com/vaadin/ui/PushConfigurationTransportTest.java b/server/src/test/java/com/vaadin/ui/PushConfigurationTransportTest.java
index 80e7dd9261..88a7067166 100644
--- a/server/src/test/java/com/vaadin/ui/PushConfigurationTransportTest.java
+++ b/server/src/test/java/com/vaadin/ui/PushConfigurationTransportTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -42,9 +42,11 @@ public class PushConfigurationTransportTest {
transport);
if (transport == Transport.WEBSOCKET_XHR) {
- Assert.assertTrue(ui.getState().pushConfiguration.alwaysUseXhrForServerRequests);
+ Assert.assertTrue(ui
+ .getState().pushConfiguration.alwaysUseXhrForServerRequests);
} else {
- Assert.assertFalse(ui.getState().pushConfiguration.alwaysUseXhrForServerRequests);
+ Assert.assertFalse(ui
+ .getState().pushConfiguration.alwaysUseXhrForServerRequests);
}
}
diff --git a/server/src/test/java/com/vaadin/ui/RichTextAreaTest.java b/server/src/test/java/com/vaadin/ui/RichTextAreaTest.java
index ce0dfdc696..e8669a86d3 100644
--- a/server/src/test/java/com/vaadin/ui/RichTextAreaTest.java
+++ b/server/src/test/java/com/vaadin/ui/RichTextAreaTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/ui/SplitPositionChangeListenerTest.java b/server/src/test/java/com/vaadin/ui/SplitPositionChangeListenerTest.java
index 02dc412cd9..069144e7b6 100644
--- a/server/src/test/java/com/vaadin/ui/SplitPositionChangeListenerTest.java
+++ b/server/src/test/java/com/vaadin/ui/SplitPositionChangeListenerTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,7 +27,7 @@ import com.vaadin.ui.AbstractSplitPanel.SplitPositionChangeListener;
/**
* Test for {@link SplitPositionChangeListener}
- *
+ *
* @author Vaadin Ltd
*/
public class SplitPositionChangeListenerTest {
@@ -35,10 +35,11 @@ public class SplitPositionChangeListenerTest {
@Test
public void testSplitPositionListenerIsTriggered() throws Exception {
final HorizontalSplitPanel splitPanel = new HorizontalSplitPanel();
- SplitPositionChangeListener splitPositionChangeListener = mock(SplitPositionChangeListener.class);
+ SplitPositionChangeListener splitPositionChangeListener = mock(
+ SplitPositionChangeListener.class);
splitPanel.addSplitPositionChangeListener(splitPositionChangeListener);
splitPanel.setSplitPosition(50, Unit.PERCENTAGE);
- verify(splitPositionChangeListener).onSplitPositionChanged(
- any(SplitPositionChangeEvent.class));
+ verify(splitPositionChangeListener)
+ .onSplitPositionChanged(any(SplitPositionChangeEvent.class));
}
}
diff --git a/server/src/test/java/com/vaadin/ui/TableTest.java b/server/src/test/java/com/vaadin/ui/TableTest.java
index 86237abbe0..77f25b7592 100644
--- a/server/src/test/java/com/vaadin/ui/TableTest.java
+++ b/server/src/test/java/com/vaadin/ui/TableTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -39,8 +39,8 @@ public class TableTest {
@Test
public void emptyAfterClearSingleSelect() {
- table.setContainerDataSource(BeanItemContainerGenerator
- .createContainer(100));
+ table.setContainerDataSource(
+ BeanItemContainerGenerator.createContainer(100));
Assert.assertTrue(table.isEmpty());
Object first = table.getContainerDataSource().getItemIds().iterator()
.next();
@@ -55,8 +55,8 @@ public class TableTest {
@Test
public void emptyAfterClearMultiSelect() {
table.setMultiSelect(true);
- table.setContainerDataSource(BeanItemContainerGenerator
- .createContainer(100));
+ table.setContainerDataSource(
+ BeanItemContainerGenerator.createContainer(100));
Assert.assertTrue(table.isEmpty());
Assert.assertArrayEquals(new Object[] {},
diff --git a/server/src/test/java/com/vaadin/ui/TextAreaTest.java b/server/src/test/java/com/vaadin/ui/TextAreaTest.java
index e7e99c19e9..40bce92e13 100644
--- a/server/src/test/java/com/vaadin/ui/TextAreaTest.java
+++ b/server/src/test/java/com/vaadin/ui/TextAreaTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/ui/TextFieldTest.java b/server/src/test/java/com/vaadin/ui/TextFieldTest.java
index bfd452bd3b..0be19a26a2 100644
--- a/server/src/test/java/com/vaadin/ui/TextFieldTest.java
+++ b/server/src/test/java/com/vaadin/ui/TextFieldTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/ui/UIInitRefreshTest.java b/server/src/test/java/com/vaadin/ui/UIInitRefreshTest.java
index 9e1fabc58f..61d6c9d7cc 100644
--- a/server/src/test/java/com/vaadin/ui/UIInitRefreshTest.java
+++ b/server/src/test/java/com/vaadin/ui/UIInitRefreshTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -34,8 +34,8 @@ public class UIInitRefreshTest {
private boolean fragmentChangeCalled;
private boolean browserWindowResizeCalled;
- private class TestUI extends UI implements UriFragmentChangedListener,
- BrowserWindowResizeListener {
+ private class TestUI extends UI
+ implements UriFragmentChangedListener, BrowserWindowResizeListener {
@Override
protected void init(VaadinRequest request) {
getPage().addBrowserWindowResizeListener(this);
@@ -87,14 +87,14 @@ public class UIInitRefreshTest {
IMocksControl control = EasyMock.createNiceControl();
VaadinRequest initRequest = control.createMock(VaadinRequest.class);
- EasyMock.expect(initRequest.getParameter("v-loc")).andReturn(
- "http://example.com/#foo");
+ EasyMock.expect(initRequest.getParameter("v-loc"))
+ .andReturn("http://example.com/#foo");
EasyMock.expect(initRequest.getParameter("v-cw")).andReturn("100");
EasyMock.expect(initRequest.getParameter("v-ch")).andReturn("100");
VaadinRequest reinitRequest = control.createMock(VaadinRequest.class);
- EasyMock.expect(reinitRequest.getParameter("v-loc")).andReturn(
- "http://example.com/#bar");
+ EasyMock.expect(reinitRequest.getParameter("v-loc"))
+ .andReturn("http://example.com/#bar");
EasyMock.expect(reinitRequest.getParameter("v-cw")).andReturn("200");
EasyMock.expect(reinitRequest.getParameter("v-ch")).andReturn("200");
diff --git a/server/src/test/java/com/vaadin/ui/UIThemeEscapingTest.java b/server/src/test/java/com/vaadin/ui/UIThemeEscapingTest.java
index 7a0a5551e3..a37d3e1636 100644
--- a/server/src/test/java/com/vaadin/ui/UIThemeEscapingTest.java
+++ b/server/src/test/java/com/vaadin/ui/UIThemeEscapingTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/ui/VerticalSplitPanelTest.java b/server/src/test/java/com/vaadin/ui/VerticalSplitPanelTest.java
index c48caf8144..07425e8670 100644
--- a/server/src/test/java/com/vaadin/ui/VerticalSplitPanelTest.java
+++ b/server/src/test/java/com/vaadin/ui/VerticalSplitPanelTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/server/src/test/java/com/vaadin/ui/declarative/DesignTest.java b/server/src/test/java/com/vaadin/ui/declarative/DesignTest.java
index 778e3ed53a..0b378ef54c 100644
--- a/server/src/test/java/com/vaadin/ui/declarative/DesignTest.java
+++ b/server/src/test/java/com/vaadin/ui/declarative/DesignTest.java
@@ -47,8 +47,9 @@ public class DesignTest {
private static Charset DEFAULT_CHARSET = Charset.defaultCharset();
@AfterClass
- public static void restoreCharset() throws NoSuchFieldException,
- SecurityException, IllegalArgumentException, IllegalAccessException {
+ public static void restoreCharset()
+ throws NoSuchFieldException, SecurityException,
+ IllegalArgumentException, IllegalAccessException {
setCharset(DEFAULT_CHARSET);
}
@@ -60,9 +61,10 @@ public class DesignTest {
String cp1251Html = getHtml();
setUtf8Charset();
String utf8Html = getHtml();
- Assert.assertEquals("Html written with UTF-8 as default encoding "
- + "differs from html written with cp1251 encoding", cp1251Html,
- utf8Html);
+ Assert.assertEquals(
+ "Html written with UTF-8 as default encoding "
+ + "differs from html written with cp1251 encoding",
+ cp1251Html, utf8Html);
}
@Test
@@ -71,9 +73,10 @@ public class DesignTest {
IllegalArgumentException, IllegalAccessException {
setCp1251Charset();
String cp1251Html = getHtml();
- Assert.assertEquals("Non ascii string parsed from serialized HTML "
- + "differs from expected", NON_ASCII_STRING,
- getHtmlLabelValue(cp1251Html));
+ Assert.assertEquals(
+ "Non ascii string parsed from serialized HTML "
+ + "differs from expected",
+ NON_ASCII_STRING, getHtmlLabelValue(cp1251Html));
}
@Test
@@ -82,9 +85,10 @@ public class DesignTest {
IllegalArgumentException, IllegalAccessException {
setUtf8Charset();
String utf8 = getHtml();
- Assert.assertEquals("Non ascii string parsed from serialized HTML "
- + "differs from expected", NON_ASCII_STRING,
- getHtmlLabelValue(utf8));
+ Assert.assertEquals(
+ "Non ascii string parsed from serialized HTML "
+ + "differs from expected",
+ NON_ASCII_STRING, getHtmlLabelValue(utf8));
}
private String getHtmlLabelValue(String html) {
@@ -107,13 +111,15 @@ public class DesignTest {
return out.toString(UTF8_CHARSET.name());
}
- private void setCp1251Charset() throws NoSuchFieldException,
- SecurityException, IllegalArgumentException, IllegalAccessException {
+ private void setCp1251Charset()
+ throws NoSuchFieldException, SecurityException,
+ IllegalArgumentException, IllegalAccessException {
setCharset(CP1251_CHARSET);
}
- private void setUtf8Charset() throws NoSuchFieldException,
- SecurityException, IllegalArgumentException, IllegalAccessException {
+ private void setUtf8Charset()
+ throws NoSuchFieldException, SecurityException,
+ IllegalArgumentException, IllegalAccessException {
setCharset(UTF8_CHARSET);
}
diff --git a/server/src/test/java/com/vaadin/util/CurrentInstanceTest.java b/server/src/test/java/com/vaadin/util/CurrentInstanceTest.java
index 458e8a2f6c..f9cf2549ea 100644
--- a/server/src/test/java/com/vaadin/util/CurrentInstanceTest.java
+++ b/server/src/test/java/com/vaadin/util/CurrentInstanceTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -142,8 +142,8 @@ public class CurrentInstanceTest {
assertCleared();
}
- private void assertCleared() throws SecurityException,
- NoSuchFieldException, IllegalAccessException {
+ private void assertCleared() throws SecurityException, NoSuchFieldException,
+ IllegalAccessException {
Assert.assertNull(getInternalCurrentInstanceVariable().get());
}
@@ -193,8 +193,8 @@ public class CurrentInstanceTest {
// Then store a new session in there
Map<Class<?>, CurrentInstance> old = CurrentInstance
- .setCurrent(new SessionStoredInCurrentInstance(EasyMock
- .createNiceMock(VaadinService.class)));
+ .setCurrent(new SessionStoredInCurrentInstance(
+ EasyMock.createNiceMock(VaadinService.class)));
// Restore the old values and assert that the session is null again
CurrentInstance.restoreInstances(old);
diff --git a/server/src/test/java/com/vaadin/util/ReflectToolsGetFieldValueByTypeTest.java b/server/src/test/java/com/vaadin/util/ReflectToolsGetFieldValueByTypeTest.java
index 67796314c0..363d5613a2 100644
--- a/server/src/test/java/com/vaadin/util/ReflectToolsGetFieldValueByTypeTest.java
+++ b/server/src/test/java/com/vaadin/util/ReflectToolsGetFieldValueByTypeTest.java
@@ -30,8 +30,8 @@ public class ReflectToolsGetFieldValueByTypeTest {
// Should get a String value. Without the third parameter (calling
// ReflectTools.getJavaFieldValue(Object object, Field field)) would
// get an Integer value
- fieldValue = ReflectTools.getJavaFieldValue(myInstance,
- memberField, String.class);
+ fieldValue = ReflectTools.getJavaFieldValue(myInstance, memberField,
+ String.class);
} catch (Exception e) {
}
assertTrue(fieldValue instanceof String);
diff --git a/server/src/test/java/com/vaadin/util/ReflectToolsGetPrimitiveFieldValueTest.java b/server/src/test/java/com/vaadin/util/ReflectToolsGetPrimitiveFieldValueTest.java
index 40e8f05e1e..d6362395da 100644
--- a/server/src/test/java/com/vaadin/util/ReflectToolsGetPrimitiveFieldValueTest.java
+++ b/server/src/test/java/com/vaadin/util/ReflectToolsGetPrimitiveFieldValueTest.java
@@ -17,8 +17,8 @@ public class ReflectToolsGetPrimitiveFieldValueTest {
Object fieldValue = new Boolean(false);
try {
memberField = myInstance.getClass().getField("field");
- fieldValue = ReflectTools
- .getJavaFieldValue(myInstance, memberField);
+ fieldValue = ReflectTools.getJavaFieldValue(myInstance,
+ memberField);
} catch (Exception e) {
}
assertFalse(fieldValue instanceof Boolean);
diff --git a/shared/src/main/java-templates/com/vaadin/shared/Version.java b/shared/src/main/java-templates/com/vaadin/shared/Version.java
index a63d68abb6..9d12a5c9be 100644
--- a/shared/src/main/java-templates/com/vaadin/shared/Version.java
+++ b/shared/src/main/java-templates/com/vaadin/shared/Version.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/AbstractComponentState.java b/shared/src/main/java/com/vaadin/shared/AbstractComponentState.java
index 1c32a67c70..755615c00b 100644
--- a/shared/src/main/java/com/vaadin/shared/AbstractComponentState.java
+++ b/shared/src/main/java/com/vaadin/shared/AbstractComponentState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,9 +23,9 @@ import com.vaadin.shared.communication.SharedState;
/**
* Default shared state implementation for AbstractComponent.
- *
+ *
* State classes of components should typically extend this class.
- *
+ *
* @since 7.0
*/
public class AbstractComponentState extends SharedState {
diff --git a/shared/src/main/java/com/vaadin/shared/AbstractFieldState.java b/shared/src/main/java/com/vaadin/shared/AbstractFieldState.java
index 3e9fd811de..3f06fba4b3 100644
--- a/shared/src/main/java/com/vaadin/shared/AbstractFieldState.java
+++ b/shared/src/main/java/com/vaadin/shared/AbstractFieldState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,10 +19,10 @@ import com.vaadin.shared.ui.TabIndexState;
/**
* Shared state for {@link com.vaadin.ui.AbstractField}.
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
- *
+ *
*/
public class AbstractFieldState extends TabIndexState {
public boolean propertyReadOnly = false;
diff --git a/shared/src/main/java/com/vaadin/shared/ApplicationConstants.java b/shared/src/main/java/com/vaadin/shared/ApplicationConstants.java
index e5da716eb3..142573ea1f 100644
--- a/shared/src/main/java/com/vaadin/shared/ApplicationConstants.java
+++ b/shared/src/main/java/com/vaadin/shared/ApplicationConstants.java
@@ -41,7 +41,7 @@ public class ApplicationConstants implements Serializable {
+ "://";
/**
* Prefix used for theme resource URLs
- *
+ *
* @see com.vaadin.server.ThemeResource
* @since 7.5.0
*/
@@ -135,7 +135,7 @@ public class ApplicationConstants implements Serializable {
/**
* The name of the parameter used to transmit the id of the client to server
* messages.
- *
+ *
* @since 7.6
*/
public static final String CLIENT_TO_SERVER_ID = "clientId";
@@ -153,7 +153,7 @@ public class ApplicationConstants implements Serializable {
/**
* The name of the parameter used for sending the widget set version to the
* server
- *
+ *
* @since 7.6
*/
public static final String WIDGETSET_VERSION_ID = "wsver";
diff --git a/shared/src/main/java/com/vaadin/shared/ComponentConstants.java b/shared/src/main/java/com/vaadin/shared/ComponentConstants.java
index dae1382256..28c19dda2d 100644
--- a/shared/src/main/java/com/vaadin/shared/ComponentConstants.java
+++ b/shared/src/main/java/com/vaadin/shared/ComponentConstants.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/Connector.java b/shared/src/main/java/com/vaadin/shared/Connector.java
index c4a880f5ea..0f73c9e7bd 100644
--- a/shared/src/main/java/com/vaadin/shared/Connector.java
+++ b/shared/src/main/java/com/vaadin/shared/Connector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,7 +32,7 @@ import java.io.Serializable;
* {@link com.vaadin.client.ServerConnector} and server side classes should
* implement {@link com.vaadin.server.ClientConnector}.
* </p>
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
@@ -40,7 +40,7 @@ public interface Connector extends Serializable {
/**
* Returns the id for this connector. This is set by the framework and does
* not change during the lifetime of a connector.
- *
+ *
* @return The id for the connector.
*/
public String getConnectorId();
@@ -48,7 +48,7 @@ public interface Connector extends Serializable {
/**
* Gets the parent connector of this connector, or <code>null</code> if the
* connector is not attached to any parent.
- *
+ *
* @return the parent connector, or <code>null</code> if there is no parent.
*/
public Connector getParent();
diff --git a/shared/src/main/java/com/vaadin/shared/ContextClickRpc.java b/shared/src/main/java/com/vaadin/shared/ContextClickRpc.java
index 2152de0863..b158c9bd41 100644
--- a/shared/src/main/java/com/vaadin/shared/ContextClickRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ContextClickRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import com.vaadin.shared.communication.ServerRpc;
/**
* Client-to-server RPC interface for context click events
- *
+ *
* @since 7.6
* @author Vaadin Ltd
*/
diff --git a/shared/src/main/java/com/vaadin/shared/EventId.java b/shared/src/main/java/com/vaadin/shared/EventId.java
index ad840d1e5d..6989f36d57 100644
--- a/shared/src/main/java/com/vaadin/shared/EventId.java
+++ b/shared/src/main/java/com/vaadin/shared/EventId.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/JavaScriptConnectorState.java b/shared/src/main/java/com/vaadin/shared/JavaScriptConnectorState.java
index 12c9728628..a352ab743c 100644
--- a/shared/src/main/java/com/vaadin/shared/JavaScriptConnectorState.java
+++ b/shared/src/main/java/com/vaadin/shared/JavaScriptConnectorState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/JavaScriptExtensionState.java b/shared/src/main/java/com/vaadin/shared/JavaScriptExtensionState.java
index 5050ffec10..3dd6ae3e04 100644
--- a/shared/src/main/java/com/vaadin/shared/JavaScriptExtensionState.java
+++ b/shared/src/main/java/com/vaadin/shared/JavaScriptExtensionState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,8 +23,8 @@ import java.util.Set;
import com.vaadin.shared.communication.SharedState;
-public class JavaScriptExtensionState extends SharedState implements
- JavaScriptConnectorState {
+public class JavaScriptExtensionState extends SharedState
+ implements JavaScriptConnectorState {
private Set<String> callbackNames = new HashSet<String>();
private Map<String, Set<String>> rpcInterfaces = new HashMap<String, Set<String>>();
diff --git a/shared/src/main/java/com/vaadin/shared/JsonConstants.java b/shared/src/main/java/com/vaadin/shared/JsonConstants.java
index fd26d2ab74..ca59184ba2 100644
--- a/shared/src/main/java/com/vaadin/shared/JsonConstants.java
+++ b/shared/src/main/java/com/vaadin/shared/JsonConstants.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/MouseEventDetails.java b/shared/src/main/java/com/vaadin/shared/MouseEventDetails.java
index 3c06ee80f3..b2c4ac3107 100644
--- a/shared/src/main/java/com/vaadin/shared/MouseEventDetails.java
+++ b/shared/src/main/java/com/vaadin/shared/MouseEventDetails.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -39,11 +39,11 @@ public class MouseEventDetails implements Serializable {
/**
* Constants for mouse buttons.
- *
+ *
* @author Vaadin Ltd
* @version @VERSION@
* @since 7.0
- *
+ *
*/
public enum MouseButton {
LEFT("left"), RIGHT("right"), MIDDLE("middle");
@@ -56,7 +56,7 @@ public class MouseEventDetails implements Serializable {
/**
* Returns a human readable text representing the button
- *
+ *
* @return
*/
public String getName() {
diff --git a/shared/src/main/java/com/vaadin/shared/Position.java b/shared/src/main/java/com/vaadin/shared/Position.java
index 9234c798d1..7d1a9c45aa 100755
--- a/shared/src/main/java/com/vaadin/shared/Position.java
+++ b/shared/src/main/java/com/vaadin/shared/Position.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/VBrowserDetails.java b/shared/src/main/java/com/vaadin/shared/VBrowserDetails.java
index 32299a22d1..994a58ad54 100644
--- a/shared/src/main/java/com/vaadin/shared/VBrowserDetails.java
+++ b/shared/src/main/java/com/vaadin/shared/VBrowserDetails.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ import java.io.Serializable;
* information about the browser. Used internally by
* {@link com.vaadin.client.BrowserInfo} and
* {@link com.vaadin.server.WebBrowser}. Should not be used directly.
- *
+ *
* @author Vaadin Ltd.
* @since 6.3
*/
@@ -63,7 +63,7 @@ public class VBrowserDetails implements Serializable {
/**
* Create an instance based on the given user agent.
- *
+ *
* @param userAgent
* User agent as provided by the browser.
*/
@@ -123,8 +123,8 @@ public class VBrowserDetails implements Serializable {
} else if (isIE) {
int tridentPos = userAgent.indexOf("trident/");
if (tridentPos >= 0) {
- String tmp = userAgent.substring(tridentPos
- + "Trident/".length());
+ String tmp = userAgent
+ .substring(tridentPos + "Trident/".length());
tmp = tmp.replaceFirst("([0-9]+\\.[0-9]+).*", "$1");
browserEngineVersion = Float.parseFloat(tmp);
}
@@ -133,8 +133,8 @@ public class VBrowserDetails implements Serializable {
}
} catch (Exception e) {
// Browser engine version parsing failed
- System.err.println("Browser engine version parsing failed for: "
- + userAgent);
+ System.err.println(
+ "Browser engine version parsing failed for: " + userAgent);
}
// Browser version
@@ -149,8 +149,8 @@ public class VBrowserDetails implements Serializable {
parseVersionString(tmp);
}
} else {
- String ieVersionString = userAgent.substring(userAgent
- .indexOf("msie ") + 5);
+ String ieVersionString = userAgent
+ .substring(userAgent.indexOf("msie ") + 5);
ieVersionString = safeSubstring(ieVersionString, 0,
ieVersionString.indexOf(";"));
parseVersionString(ieVersionString);
@@ -183,8 +183,8 @@ public class VBrowserDetails implements Serializable {
}
} catch (Exception e) {
// Browser version parsing failed
- System.err.println("Browser version parsing failed for: "
- + userAgent);
+ System.err.println(
+ "Browser version parsing failed for: " + userAgent);
}
// Operating system
@@ -255,8 +255,8 @@ public class VBrowserDetails implements Serializable {
// Some Androids report version numbers as "2.1-update1"
if (osMinorVersion == -1 && parts[1].contains("-")) {
try {
- osMinorVersion = Integer.parseInt(parts[1].substring(0,
- parts[1].indexOf('-')));
+ osMinorVersion = Integer.parseInt(
+ parts[1].substring(0, parts[1].indexOf('-')));
} catch (Exception ee) {
}
}
@@ -269,16 +269,17 @@ public class VBrowserDetails implements Serializable {
if (idx < 0) {
idx = versionString.length();
}
- browserMajorVersion = Integer.parseInt(safeSubstring(versionString, 0,
- idx));
+ browserMajorVersion = Integer
+ .parseInt(safeSubstring(versionString, 0, idx));
int idx2 = versionString.indexOf('.', idx + 1);
if (idx2 < 0) {
idx2 = versionString.length();
}
try {
- browserMinorVersion = Integer.parseInt(safeSubstring(versionString,
- idx + 1, idx2).replaceAll("[^0-9].*", ""));
+ browserMinorVersion = Integer
+ .parseInt(safeSubstring(versionString, idx + 1, idx2)
+ .replaceAll("[^0-9].*", ""));
} catch (NumberFormatException e) {
// leave the minor version unmodified (-1 = unknown)
}
@@ -296,7 +297,7 @@ public class VBrowserDetails implements Serializable {
/**
* Tests if the browser is Firefox.
- *
+ *
* @return true if it is Firefox, false otherwise
*/
public boolean isFirefox() {
@@ -305,7 +306,7 @@ public class VBrowserDetails implements Serializable {
/**
* Tests if the browser is using the Gecko engine
- *
+ *
* @return true if it is Gecko, false otherwise
*/
public boolean isGecko() {
@@ -314,7 +315,7 @@ public class VBrowserDetails implements Serializable {
/**
* Tests if the browser is using the WebKit engine
- *
+ *
* @return true if it is WebKit, false otherwise
*/
public boolean isWebKit() {
@@ -323,7 +324,7 @@ public class VBrowserDetails implements Serializable {
/**
* Tests if the browser is using the Presto engine
- *
+ *
* @return true if it is Presto, false otherwise
*/
public boolean isPresto() {
@@ -332,7 +333,7 @@ public class VBrowserDetails implements Serializable {
/**
* Tests if the browser is using the Trident engine
- *
+ *
* @since 7.1.7
* @return true if it is Trident, false otherwise
*/
@@ -342,7 +343,7 @@ public class VBrowserDetails implements Serializable {
/**
* Tests if the browser is Safari.
- *
+ *
* @return true if it is Safari, false otherwise
*/
public boolean isSafari() {
@@ -351,7 +352,7 @@ public class VBrowserDetails implements Serializable {
/**
* Tests if the browser is Chrome.
- *
+ *
* @return true if it is Chrome, false otherwise
*/
public boolean isChrome() {
@@ -360,7 +361,7 @@ public class VBrowserDetails implements Serializable {
/**
* Tests if the browser is capable of running ChromeFrame.
- *
+ *
* @return true if it has ChromeFrame, false otherwise
*/
public boolean isChromeFrameCapable() {
@@ -369,7 +370,7 @@ public class VBrowserDetails implements Serializable {
/**
* Tests if the browser is running ChromeFrame.
- *
+ *
* @return true if it is ChromeFrame, false otherwise
*/
public boolean isChromeFrame() {
@@ -378,7 +379,7 @@ public class VBrowserDetails implements Serializable {
/**
* Tests if the browser is Opera.
- *
+ *
* @return true if it is Opera, false otherwise
*/
public boolean isOpera() {
@@ -387,7 +388,7 @@ public class VBrowserDetails implements Serializable {
/**
* Tests if the browser is Internet Explorer.
- *
+ *
* @return true if it is Internet Explorer, false otherwise
*/
public boolean isIE() {
@@ -396,7 +397,7 @@ public class VBrowserDetails implements Serializable {
/**
* Tests if the browser is Edge.
- *
+ *
* @since 7.5.3
* @return true if it is Edge, false otherwise
*/
@@ -416,7 +417,7 @@ public class VBrowserDetails implements Serializable {
/**
* Returns the version of the browser engine. For WebKit this is an integer
* e.g., 532.0. For gecko it is a float e.g., 1.8 or 1.9.
- *
+ *
* @return The version of the browser engine
*/
public float getBrowserEngineVersion() {
@@ -430,7 +431,7 @@ public class VBrowserDetails implements Serializable {
* Note that Internet Explorer 8 and newer will return the document mode so
* IE8 rendering as IE7 will return 7.
* </p>
- *
+ *
* @return The major version of the browser.
*/
public final int getBrowserMajorVersion() {
@@ -439,9 +440,9 @@ public class VBrowserDetails implements Serializable {
/**
* Returns the browser minor version e.g., 5 for Firefox 3.5.
- *
+ *
* @see #getBrowserMajorVersion()
- *
+ *
* @return The minor version of the browser, or -1 if not known/parsed.
*/
public final int getBrowserMinorVersion() {
@@ -452,7 +453,7 @@ public class VBrowserDetails implements Serializable {
* Sets the version for IE based on the documentMode. This is used to return
* the correct the correct IE version when the version from the user agent
* string and the value of the documentMode property do not match.
- *
+ *
* @param documentMode
* The current document mode
*/
@@ -463,7 +464,7 @@ public class VBrowserDetails implements Serializable {
/**
* Tests if the browser is run on Windows.
- *
+ *
* @return true if run on Windows, false otherwise
*/
public boolean isWindows() {
@@ -472,7 +473,7 @@ public class VBrowserDetails implements Serializable {
/**
* Tests if the browser is run on Windows Phone.
- *
+ *
* @return true if run on Windows Phone, false otherwise
* @since 7.3.2
*/
@@ -482,7 +483,7 @@ public class VBrowserDetails implements Serializable {
/**
* Tests if the browser is run on Mac OSX.
- *
+ *
* @return true if run on Mac OSX, false otherwise
*/
public boolean isMacOSX() {
@@ -491,7 +492,7 @@ public class VBrowserDetails implements Serializable {
/**
* Tests if the browser is run on Linux.
- *
+ *
* @return true if run on Linux, false otherwise
*/
public boolean isLinux() {
@@ -500,7 +501,7 @@ public class VBrowserDetails implements Serializable {
/**
* Tests if the browser is run on Android.
- *
+ *
* @return true if run on Android, false otherwise
*/
public boolean isAndroid() {
@@ -509,7 +510,7 @@ public class VBrowserDetails implements Serializable {
/**
* Tests if the browser is run in iOS.
- *
+ *
* @return true if run in iOS, false otherwise
*/
public boolean isIOS() {
@@ -518,7 +519,7 @@ public class VBrowserDetails implements Serializable {
/**
* Tests if the browser is run on iPhone.
- *
+ *
* @return true if run on iPhone, false otherwise
* @since 7.3.3
*/
@@ -528,7 +529,7 @@ public class VBrowserDetails implements Serializable {
/**
* Tests if the browser is run on iPad.
- *
+ *
* @return true if run on iPad, false otherwise
* @since 7.3.3
*/
@@ -539,7 +540,7 @@ public class VBrowserDetails implements Serializable {
/**
* Returns the major version of the operating system. Currently only
* supported for mobile devices (iOS/Android)
- *
+ *
* @return The major version or -1 if unknown
*/
public int getOperatingSystemMajorVersion() {
@@ -549,7 +550,7 @@ public class VBrowserDetails implements Serializable {
/**
* Returns the minor version of the operating system. Currently only
* supported for mobile devices (iOS/Android)
- *
+ *
* @return The minor version or -1 if unknown
*/
public int getOperatingSystemMinorVersion() {
@@ -561,7 +562,7 @@ public class VBrowserDetails implements Serializable {
* application. NOTE that the browser might still be capable of running
* Crome Frame, so you might still want to check
* {@link #isChromeFrameCapable()} if this returns true.
- *
+ *
* @return true if the browser won't work, false if not the browser is
* supported or might work
*/
diff --git a/shared/src/main/java/com/vaadin/shared/VaadinUriResolver.java b/shared/src/main/java/com/vaadin/shared/VaadinUriResolver.java
index ee8d13f10f..5c5dfb7587 100644
--- a/shared/src/main/java/com/vaadin/shared/VaadinUriResolver.java
+++ b/shared/src/main/java/com/vaadin/shared/VaadinUriResolver.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.shared.util.SharedUtil;
* URLs usable by the browser. This is an abstract class performing the main
* logic in {@link #resolveVaadinUri(String)} and using abstract methods in the
* class for accessing information specific to the current environment.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -70,15 +70,14 @@ public abstract class VaadinUriResolver implements Serializable {
// without published://)
vaadinUri = ApplicationConstants.APP_PROTOCOL_PREFIX
+ ApplicationConstants.PUBLISHED_FILE_PATH
- + vaadinUri
- .substring(ApplicationConstants.PUBLISHED_PROTOCOL_PREFIX
+ + vaadinUri.substring(
+ ApplicationConstants.PUBLISHED_PROTOCOL_PREFIX
.length());
// Let translation of app:// urls take care of the rest
}
if (vaadinUri.startsWith(ApplicationConstants.APP_PROTOCOL_PREFIX)) {
- String relativeUrl = vaadinUri
- .substring(ApplicationConstants.APP_PROTOCOL_PREFIX
- .length());
+ String relativeUrl = vaadinUri.substring(
+ ApplicationConstants.APP_PROTOCOL_PREFIX.length());
String serviceUrl = getServiceUrl();
String serviceUrlParameterName = getServiceUrlParameterName();
if (serviceUrlParameterName != null) {
@@ -107,9 +106,8 @@ public abstract class VaadinUriResolver implements Serializable {
}
if (vaadinUri.startsWith(ApplicationConstants.VAADIN_PROTOCOL_PREFIX)) {
final String vaadinDirUri = getVaadinDirUrl();
- String relativeUrl = vaadinUri
- .substring(ApplicationConstants.VAADIN_PROTOCOL_PREFIX
- .length());
+ String relativeUrl = vaadinUri.substring(
+ ApplicationConstants.VAADIN_PROTOCOL_PREFIX.length());
vaadinUri = vaadinDirUri + relativeUrl;
}
@@ -118,7 +116,7 @@ public abstract class VaadinUriResolver implements Serializable {
/**
* Gets the URL pointing to the VAADIN directory.
- *
+ *
* @return the VAADIN directory URL
*/
protected abstract String getVaadinDirUrl();
@@ -128,7 +126,7 @@ public abstract class VaadinUriResolver implements Serializable {
* the requested URL to the {@link #getServiceUrl() service URL}. If
* <code>null</code> is returned, the requested URL will instead be appended
* to the base service URL.
- *
+ *
* @return the parameter name used for passing request URLs, or
* <code>null</code> to send the path as a part of the request path.
*/
@@ -137,21 +135,21 @@ public abstract class VaadinUriResolver implements Serializable {
/**
* Gets the URL handled by {@link com.vaadin.server.VaadinService
* VaadinService} to handle application requests.
- *
+ *
* @return the service URL
*/
protected abstract String getServiceUrl();
/**
* Gets the URI of the directory of the current theme.
- *
+ *
* @return the URI of the current theme directory
*/
protected abstract String getThemeUri();
/**
* Encodes a value for safe inclusion as a parameter in the query string.
- *
+ *
* @param parameterValue
* the value to encode
* @return the encoded value
diff --git a/shared/src/main/java/com/vaadin/shared/annotations/Delayed.java b/shared/src/main/java/com/vaadin/shared/annotations/Delayed.java
index f7e24de006..86ac246aa1 100644
--- a/shared/src/main/java/com/vaadin/shared/annotations/Delayed.java
+++ b/shared/src/main/java/com/vaadin/shared/annotations/Delayed.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,9 +26,9 @@ import com.vaadin.shared.communication.ServerRpc;
* Invoking a method in a {@link ServerRpc} interface marked with this
* annotation will only add the invocation to a queue of outgoing RPC
* invocations, but it will not cause the queue to be purged and sent to the
- * server. The queue will instead be sent when any RPC method not marked as @Delayed
- * has been invoked.
- *
+ * server. The queue will instead be sent when any RPC method not marked
+ * as @Delayed has been invoked.
+ *
* @author Vaadin Ltd
* @version @VERSION@
* @since 7.0.0
@@ -45,7 +45,7 @@ public @interface Delayed {
* The default value is <code>false</code> which means that invoking the
* method multiple times will cause multiple invocations to be enqueued and
* eventually sent to the server.
- *
+ *
* @return <code>true</code> if only the last invocation of the annotated
* method should be sent to the server, <code>false</code> if all
* enqueued invocations should be sent.
diff --git a/shared/src/main/java/com/vaadin/shared/annotations/DelegateToWidget.java b/shared/src/main/java/com/vaadin/shared/annotations/DelegateToWidget.java
index ee5cf78a68..9e48ea4364 100644
--- a/shared/src/main/java/com/vaadin/shared/annotations/DelegateToWidget.java
+++ b/shared/src/main/java/com/vaadin/shared/annotations/DelegateToWidget.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,26 +31,26 @@ import java.lang.annotation.Target;
* any {@link com.vaadin.client.communication.StateChangeEvent}.
* <p>
* Take for example a state class looking like this:
- *
+ *
* <pre>
* public class MyComponentState extends AbstractComponentState {
* &#064;DelegateToWidget
* public String myProperty;
* }
* </pre>
- *
+ *
* Whenever <code>myProperty</code> is changed, the framework will call code
* like this:
- *
+ *
* <pre>
* connector.getWidget().setMyProperty(connector.getState().myProperty);
* </pre>
- *
+ *
* <p>
* By default, the Widget method to call is derived from the property name, but
* {@link #value()} in the annotation can be used to provide a custom method
* name, e.g. {@code @DelegateToWidget("someSpecialName")}.
- *
+ *
* @since 7.0.0
* @author Vaadin Ltd
*/
@@ -62,7 +62,7 @@ public @interface DelegateToWidget {
* derived from the property name, so e.g. a field named
* <code>myProperty</code> will delegate to a method named
* <code>setMyProperty</code>.
- *
+ *
* @return the name of the method to delegate to, or empty string to use the
* default name
*/
@@ -76,7 +76,7 @@ public @interface DelegateToWidget {
/**
* Gets the name of the method to delegate to for a given property name
* and annotation value.
- *
+ *
* @param propertyName
* the name of the delegated property
* @param annotationValue
diff --git a/shared/src/main/java/com/vaadin/shared/annotations/NoLayout.java b/shared/src/main/java/com/vaadin/shared/annotations/NoLayout.java
index b77729cdcc..8631e450e0 100644
--- a/shared/src/main/java/com/vaadin/shared/annotations/NoLayout.java
+++ b/shared/src/main/java/com/vaadin/shared/annotations/NoLayout.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,9 +31,9 @@ import java.lang.annotation.Target;
* that almost anything related to CSS (e.g. adding or removing a stylename) has
* the potential of causing sizes to change with appropriate style definitions
* in the application theme.
- *
+ *
* @since 7.4
- *
+ *
* @author Vaadin Ltd
*/
@Documented
diff --git a/shared/src/main/java/com/vaadin/shared/annotations/NoLoadingIndicator.java b/shared/src/main/java/com/vaadin/shared/annotations/NoLoadingIndicator.java
index 2e519b69e8..7e0041f483 100644
--- a/shared/src/main/java/com/vaadin/shared/annotations/NoLoadingIndicator.java
+++ b/shared/src/main/java/com/vaadin/shared/annotations/NoLoadingIndicator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import java.lang.annotation.Target;
* show the loading indicator. The framework will show a loading indicator when
* sending requests for RPC methods that are not marked with this annotation.
* The loading indicator is hidden once a response is received.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
diff --git a/shared/src/main/java/com/vaadin/shared/communication/ClientRpc.java b/shared/src/main/java/com/vaadin/shared/communication/ClientRpc.java
index e400c7de7c..48982b68f4 100644
--- a/shared/src/main/java/com/vaadin/shared/communication/ClientRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/communication/ClientRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,14 +20,14 @@ import java.io.Serializable;
/**
* Interface to be extended by all server to client RPC interfaces.
- *
+ *
* On the server side, proxies of the interface can be obtained from
* AbstractComponent. On the client, RPC implementations can be registered with
* AbstractConnector.registerRpc().
- *
+ *
* Note: Currently, each RPC interface may not contain multiple methods with the
* same name, even if their parameter lists would differ.
- *
+ *
* @since 7.0
*/
public interface ClientRpc extends Serializable {
diff --git a/shared/src/main/java/com/vaadin/shared/communication/FieldRpc.java b/shared/src/main/java/com/vaadin/shared/communication/FieldRpc.java
index 28ae8d39b6..651db184a1 100644
--- a/shared/src/main/java/com/vaadin/shared/communication/FieldRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/communication/FieldRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,8 +26,8 @@ public class FieldRpc implements Serializable {
public void blur();
}
- public interface FocusAndBlurServerRpc extends FocusServerRpc,
- BlurServerRpc {
+ public interface FocusAndBlurServerRpc
+ extends FocusServerRpc, BlurServerRpc {
}
}
diff --git a/shared/src/main/java/com/vaadin/shared/communication/LegacyChangeVariablesInvocation.java b/shared/src/main/java/com/vaadin/shared/communication/LegacyChangeVariablesInvocation.java
index 4d21b5af7a..ce93f7eb58 100644
--- a/shared/src/main/java/com/vaadin/shared/communication/LegacyChangeVariablesInvocation.java
+++ b/shared/src/main/java/com/vaadin/shared/communication/LegacyChangeVariablesInvocation.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,15 +26,14 @@ public class LegacyChangeVariablesInvocation extends MethodInvocation {
public LegacyChangeVariablesInvocation(String connectorId,
String variableName, Object value) {
super(connectorId, ApplicationConstants.UPDATE_VARIABLE_INTERFACE,
- ApplicationConstants.UPDATE_VARIABLE_METHOD, new Object[] {
- variableName, new UidlValue(value) });
+ ApplicationConstants.UPDATE_VARIABLE_METHOD,
+ new Object[] { variableName, new UidlValue(value) });
setVariableChange(variableName, value);
}
public static boolean isLegacyVariableChange(String interfaceName,
String methodName) {
- return ApplicationConstants.UPDATE_VARIABLE_METHOD
- .equals(interfaceName)
+ return ApplicationConstants.UPDATE_VARIABLE_METHOD.equals(interfaceName)
&& ApplicationConstants.UPDATE_VARIABLE_METHOD
.equals(methodName);
}
diff --git a/shared/src/main/java/com/vaadin/shared/communication/MethodInvocation.java b/shared/src/main/java/com/vaadin/shared/communication/MethodInvocation.java
index a4370f37de..68301b5371 100644
--- a/shared/src/main/java/com/vaadin/shared/communication/MethodInvocation.java
+++ b/shared/src/main/java/com/vaadin/shared/communication/MethodInvocation.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.shared.util.SharedUtil;
/**
* Information needed by the framework to send an RPC method invocation from the
* client to the server or vice versa.
- *
+ *
* @since 7.0
*/
public class MethodInvocation implements Serializable {
@@ -80,7 +80,7 @@ public class MethodInvocation implements Serializable {
* <p>
* The returned string should contain at least one non-number char to ensure
* it doesn't collide with the keys used for invocations without lastOnly.
- *
+ *
* @return a string identifying this method invocation
*/
public String getLastOnlyTag() {
diff --git a/shared/src/main/java/com/vaadin/shared/communication/PushConstants.java b/shared/src/main/java/com/vaadin/shared/communication/PushConstants.java
index 5b23cd7f6e..9baeff5ae3 100644
--- a/shared/src/main/java/com/vaadin/shared/communication/PushConstants.java
+++ b/shared/src/main/java/com/vaadin/shared/communication/PushConstants.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import java.io.Serializable;
/**
* Shared constants used by push.
- *
+ *
* @since 7.1
* @author Vaadin Ltd
*/
@@ -39,7 +39,8 @@ public class PushConstants implements Serializable {
* exceed {@link PushConstants#WEBSOCKET_BUFFER_SIZE} given a UTF-8 encoded
* message.
*/
- public static final int WEBSOCKET_FRAGMENT_SIZE = WEBSOCKET_BUFFER_SIZE / 4 - 1;
+ public static final int WEBSOCKET_FRAGMENT_SIZE = WEBSOCKET_BUFFER_SIZE / 4
+ - 1;
/**
* The character used to mark message boundaries when messages may be split
diff --git a/shared/src/main/java/com/vaadin/shared/communication/PushMode.java b/shared/src/main/java/com/vaadin/shared/communication/PushMode.java
index 7b0f968c77..0a88593207 100644
--- a/shared/src/main/java/com/vaadin/shared/communication/PushMode.java
+++ b/shared/src/main/java/com/vaadin/shared/communication/PushMode.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -18,9 +18,9 @@ package com.vaadin.shared.communication;
/**
* The mode of bidirectional ("push") communication that is in use.
- *
+ *
* @see com.vaadin.server.DeploymentConfiguration#getPushMode()
- *
+ *
* @author Vaadin Ltd
* @since 7.1
*/
@@ -55,7 +55,7 @@ public enum PushMode {
/**
* Checks whether the push mode is using push functionality
- *
+ *
* @return <code>true</code> if this mode requires push functionality;
* <code>false</code> if no push functionality is used for this
* mode.
diff --git a/shared/src/main/java/com/vaadin/shared/communication/ServerRpc.java b/shared/src/main/java/com/vaadin/shared/communication/ServerRpc.java
index e23b3758c6..f3bc38d22b 100644
--- a/shared/src/main/java/com/vaadin/shared/communication/ServerRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/communication/ServerRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import java.io.Serializable;
/**
* Interface to be extended by all client to server RPC interfaces.
- *
+ *
* @since 7.0
*/
public interface ServerRpc extends Serializable {
diff --git a/shared/src/main/java/com/vaadin/shared/communication/SharedState.java b/shared/src/main/java/com/vaadin/shared/communication/SharedState.java
index b21a675a4a..ceb0be0701 100644
--- a/shared/src/main/java/com/vaadin/shared/communication/SharedState.java
+++ b/shared/src/main/java/com/vaadin/shared/communication/SharedState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,34 +27,34 @@ import com.vaadin.shared.annotations.NoLayout;
/**
* Interface to be implemented by all shared state classes used to communicate
* basic information about a {@link Connector} from server to client.
- *
+ *
* Shared state classes have to be declared in shared package to be accessible
* both for server and client code.
- *
+ *
* Shared state objects are only sent from the server to the client, and any
* modifications from the client should be performed via an RPC call that
* modifies the authoritative state on the server.
- *
+ *
* A shared state class should be a bean with getters and setters for each
* field. Supported data types are simple Java types, other beans and maps and
* arrays of these.
- *
+ *
* On the client side the connector should override
* {@link com.vaadin.client.ui.AbstractConnector#getState()} to return the
* correct state type. This automatically causes a correct state object to be
* created.
- *
+ *
* Subclasses of a {@link Connector} using shared state should also provide a
* subclass of the shared state class of the parent class to extend the state. A
* single {@link Connector} can only have one shared state object.
- *
+ *
* @since 7.0
*/
public class SharedState implements Serializable {
/**
* The automatically managed resources used by the connector.
- *
+ *
* @see com.vaadin.server.AbstractClientConnector#setResource(String,
* com.vaadin.server.Resource)
* @see com.vaadin.client.ui.AbstractConnector#getResourceUrl(String)
diff --git a/shared/src/main/java/com/vaadin/shared/communication/URLReference.java b/shared/src/main/java/com/vaadin/shared/communication/URLReference.java
index be767fb25c..850839397f 100644
--- a/shared/src/main/java/com/vaadin/shared/communication/URLReference.java
+++ b/shared/src/main/java/com/vaadin/shared/communication/URLReference.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ public class URLReference implements Serializable {
* Returns the URL that this object refers to.
* <p>
* Note that the URL can use special protocols like theme://
- *
+ *
* @return The URL for this reference or null if unknown.
*/
public String getURL() {
@@ -34,7 +34,7 @@ public class URLReference implements Serializable {
/**
* Sets the URL that this object refers to
- *
+ *
* @param URL
*/
public void setURL(String URL) {
diff --git a/shared/src/main/java/com/vaadin/shared/communication/UidlValue.java b/shared/src/main/java/com/vaadin/shared/communication/UidlValue.java
index 04015213f9..7fde2c5efd 100644
--- a/shared/src/main/java/com/vaadin/shared/communication/UidlValue.java
+++ b/shared/src/main/java/com/vaadin/shared/communication/UidlValue.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/data/DataProviderRpc.java b/shared/src/main/java/com/vaadin/shared/data/DataProviderRpc.java
index 05965ea56c..4fc897bc52 100644
--- a/shared/src/main/java/com/vaadin/shared/data/DataProviderRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/data/DataProviderRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import elemental.json.JsonArray;
/**
* RPC interface used for pushing container data to the client.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -34,7 +34,7 @@ public interface DataProviderRpc extends ClientRpc {
* <p>
* rowDataJson represents a JSON array of JSON objects in the following
* format:
- *
+ *
* <pre>
* [{
* "d": [COL_1_JSON, COL_2_json, ...],
@@ -43,10 +43,10 @@ public interface DataProviderRpc extends ClientRpc {
* ...
* ]
* </pre>
- *
+ *
* where COL_INDEX is the index of the column (as a string), and COL_n_JSON
* is valid JSON of the column's data.
- *
+ *
* @param firstRowIndex
* the index of the first updated row
* @param rowDataJson
@@ -59,7 +59,7 @@ public interface DataProviderRpc extends ClientRpc {
/**
* Informs the client to remove row data.
- *
+ *
* @param firstRowIndex
* the index of the first removed row
* @param count
@@ -71,7 +71,7 @@ public interface DataProviderRpc extends ClientRpc {
/**
* Informs the client to insert new row data.
- *
+ *
* @param firstRowIndex
* the index of the first new row
* @param count
@@ -86,7 +86,7 @@ public interface DataProviderRpc extends ClientRpc {
* This should be used in the cases where the data has changed in some
* unverifiable way. I.e. "something happened". This will lead to a
* re-rendering of the current Grid viewport
- *
+ *
* @param size
* the size of the new data set
*/
@@ -96,7 +96,7 @@ public interface DataProviderRpc extends ClientRpc {
* Informs the client that rows have been updated. The client-side
* DataSource will map the given data to correct index if it should be in
* the cache.
- *
+ *
* @since 7.6
* @param rowArray
* array of updated rows
diff --git a/shared/src/main/java/com/vaadin/shared/data/DataRequestRpc.java b/shared/src/main/java/com/vaadin/shared/data/DataRequestRpc.java
index 4b553dda68..43b345f287 100644
--- a/shared/src/main/java/com/vaadin/shared/data/DataRequestRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/data/DataRequestRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import elemental.json.JsonArray;
/**
* RPC interface used for requesting container data to the client.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -32,7 +32,7 @@ public interface DataRequestRpc extends ServerRpc {
/**
* Request rows from the server.
- *
+ *
* @param firstRowIndex
* the index of the first requested row
* @param numberOfRows
@@ -48,7 +48,7 @@ public interface DataRequestRpc extends ServerRpc {
/**
* Informs the server that items have been dropped from the client cache.
- *
+ *
* @since 7.6
* @param rowKeys
* array of dropped keys mapping to items
diff --git a/shared/src/main/java/com/vaadin/shared/data/sort/SortDirection.java b/shared/src/main/java/com/vaadin/shared/data/sort/SortDirection.java
index cd572087d7..692c6f4745 100644
--- a/shared/src/main/java/com/vaadin/shared/data/sort/SortDirection.java
+++ b/shared/src/main/java/com/vaadin/shared/data/sort/SortDirection.java
@@ -19,7 +19,7 @@ import java.io.Serializable;
/**
* Describes sorting direction.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -47,7 +47,7 @@ public enum SortDirection implements Serializable {
/**
* Get the sort direction that is the direct opposite to this one.
- *
+ *
* @return a sort direction value
*/
public abstract SortDirection getOpposite();
diff --git a/shared/src/main/java/com/vaadin/shared/extension/javascriptmanager/ExecuteJavaScriptRpc.java b/shared/src/main/java/com/vaadin/shared/extension/javascriptmanager/ExecuteJavaScriptRpc.java
index 7a75bcbec1..fe2a37df7f 100644
--- a/shared/src/main/java/com/vaadin/shared/extension/javascriptmanager/ExecuteJavaScriptRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/extension/javascriptmanager/ExecuteJavaScriptRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/extension/javascriptmanager/JavaScriptManagerState.java b/shared/src/main/java/com/vaadin/shared/extension/javascriptmanager/JavaScriptManagerState.java
index e5af6a04f8..6f95ad6387 100644
--- a/shared/src/main/java/com/vaadin/shared/extension/javascriptmanager/JavaScriptManagerState.java
+++ b/shared/src/main/java/com/vaadin/shared/extension/javascriptmanager/JavaScriptManagerState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/AbstractEmbeddedState.java b/shared/src/main/java/com/vaadin/shared/ui/AbstractEmbeddedState.java
index 0cb9be8702..6c41cb3a8e 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/AbstractEmbeddedState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/AbstractEmbeddedState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/AbstractLayoutState.java b/shared/src/main/java/com/vaadin/shared/ui/AbstractLayoutState.java
index 49e5e1c36a..9479d97bd3 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/AbstractLayoutState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/AbstractLayoutState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/AbstractMediaState.java b/shared/src/main/java/com/vaadin/shared/ui/AbstractMediaState.java
index 3029bedca7..17a7cff1f1 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/AbstractMediaState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/AbstractMediaState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/AlignmentInfo.java b/shared/src/main/java/com/vaadin/shared/ui/AlignmentInfo.java
index 120552a43d..15668cd0b7 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/AlignmentInfo.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/AlignmentInfo.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -75,11 +75,13 @@ public final class AlignmentInfo implements Serializable {
}
public boolean isVerticalCenter() {
- return (bitMask & Bits.ALIGNMENT_VERTICAL_CENTER) == Bits.ALIGNMENT_VERTICAL_CENTER;
+ return (bitMask
+ & Bits.ALIGNMENT_VERTICAL_CENTER) == Bits.ALIGNMENT_VERTICAL_CENTER;
}
public boolean isHorizontalCenter() {
- return (bitMask & Bits.ALIGNMENT_HORIZONTAL_CENTER) == Bits.ALIGNMENT_HORIZONTAL_CENTER;
+ return (bitMask
+ & Bits.ALIGNMENT_HORIZONTAL_CENTER) == Bits.ALIGNMENT_HORIZONTAL_CENTER;
}
public String getVerticalAlignment() {
diff --git a/shared/src/main/java/com/vaadin/shared/ui/BorderStyle.java b/shared/src/main/java/com/vaadin/shared/ui/BorderStyle.java
index ff5c7c7179..8ecca74336 100755
--- a/shared/src/main/java/com/vaadin/shared/ui/BorderStyle.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/BorderStyle.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -17,11 +17,11 @@ package com.vaadin.shared.ui;
/**
* Constants for border styles used on HTML elements.
- *
+ *
* @author Vaadin Ltd
* @version @VERSION@
* @since 7.0
- *
+ *
*/
public enum BorderStyle {
/**
diff --git a/shared/src/main/java/com/vaadin/shared/ui/BrowserWindowOpenerState.java b/shared/src/main/java/com/vaadin/shared/ui/BrowserWindowOpenerState.java
index 6196ea09ac..b06bd63785 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/BrowserWindowOpenerState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/BrowserWindowOpenerState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/ClickRpc.java b/shared/src/main/java/com/vaadin/shared/ui/ClickRpc.java
index 388ac14882..d16d655a0a 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/ClickRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/ClickRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ public interface ClickRpc extends ServerRpc {
/**
* Called when a click event has occurred and there are server side
* listeners for the event.
- *
+ *
* @param mouseDetails
* Details about the mouse when the event took place
*/
diff --git a/shared/src/main/java/com/vaadin/shared/ui/ComponentStateUtil.java b/shared/src/main/java/com/vaadin/shared/ui/ComponentStateUtil.java
index 894a1bbcbb..bd0f0bc5c1 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/ComponentStateUtil.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/ComponentStateUtil.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,7 +31,8 @@ public final class ComponentStateUtil implements Serializable {
return state.width == null || "".equals(state.width);
}
- public static final boolean isUndefinedHeight(AbstractComponentState state) {
+ public static final boolean isUndefinedHeight(
+ AbstractComponentState state) {
return state.height == null || "".equals(state.height);
}
@@ -53,7 +54,7 @@ public final class ComponentStateUtil implements Serializable {
/**
* Removes an event listener id.
- *
+ *
* @param eventListenerId
* The event identifier to remove
*/
@@ -70,7 +71,7 @@ public final class ComponentStateUtil implements Serializable {
/**
* Adds an event listener id.
- *
+ *
* @param eventListenerId
* The event identifier to add
*/
diff --git a/shared/src/main/java/com/vaadin/shared/ui/Connect.java b/shared/src/main/java/com/vaadin/shared/ui/Connect.java
index b0c20cec31..ab0a1b464c 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/Connect.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/Connect.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,7 +30,7 @@ import com.vaadin.shared.Connector;
* With this annotation client side Vaadin connector is marked to have a server
* side counterpart. The value of the annotation is the class of server side
* implementation.
- *
+ *
* @since 7.0
*/
@Retention(RetentionPolicy.RUNTIME)
@@ -76,9 +76,9 @@ public @interface Connect {
* also includes
* {@link com.vaadin.server.widgetsetutils.LazyWidgetMapGenerator} that
* makes as many widgets lazily loaded as possible.
- *
+ *
* @since 6.4
- *
+ *
* @return the hint for the widget set generator how the client side
* implementation should be loaded to the browser
*/
diff --git a/shared/src/main/java/com/vaadin/shared/ui/JavaScriptComponentState.java b/shared/src/main/java/com/vaadin/shared/ui/JavaScriptComponentState.java
index 3208934146..3d2c29b24d 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/JavaScriptComponentState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/JavaScriptComponentState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,8 +24,8 @@ import java.util.Set;
import com.vaadin.shared.AbstractComponentState;
import com.vaadin.shared.JavaScriptConnectorState;
-public class JavaScriptComponentState extends AbstractComponentState implements
- JavaScriptConnectorState {
+public class JavaScriptComponentState extends AbstractComponentState
+ implements JavaScriptConnectorState {
private Set<String> callbackNames = new HashSet<String>();
private Map<String, Set<String>> rpcInterfaces = new HashMap<String, Set<String>>();
diff --git a/shared/src/main/java/com/vaadin/shared/ui/LayoutClickRpc.java b/shared/src/main/java/com/vaadin/shared/ui/LayoutClickRpc.java
index bd46bbda3d..f82f160ee7 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/LayoutClickRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/LayoutClickRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ public interface LayoutClickRpc extends ServerRpc {
/**
* Called when a layout click event has occurred and there are server side
* listeners for the event.
- *
+ *
* @param mouseDetails
* Details about the mouse when the event took place
* @param clickedConnector
diff --git a/shared/src/main/java/com/vaadin/shared/ui/MarginInfo.java b/shared/src/main/java/com/vaadin/shared/ui/MarginInfo.java
index 0af3b7351f..2d864ddfb2 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/MarginInfo.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/MarginInfo.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import java.io.Serializable;
/**
* Describes the margin settings for each edge of a Component.
- *
+ *
* @author Vaadin Ltd
*/
public class MarginInfo implements Serializable {
@@ -36,7 +36,7 @@ public class MarginInfo implements Serializable {
/**
* Creates a MarginInfo object with all edges set to either enabled or
* disabled.
- *
+ *
* @param enabled
* the value to set for all edges
*/
@@ -46,7 +46,7 @@ public class MarginInfo implements Serializable {
/**
* Creates a MarginInfo object from a bit mask.
- *
+ *
* @param bitMask
* bits to set
* @deprecated use other constructors instead of this one
@@ -59,7 +59,7 @@ public class MarginInfo implements Serializable {
/**
* Creates a MarginInfo object by having each edge specified in clockwise
* order (analogous to CSS).
- *
+ *
* @param top
* enable or disable top margin
* @param right
@@ -69,12 +69,14 @@ public class MarginInfo implements Serializable {
* @param left
* enable or disable left margin
*/
- public MarginInfo(boolean top, boolean right, boolean bottom, boolean left) {
+ public MarginInfo(boolean top, boolean right, boolean bottom,
+ boolean left) {
doSetMargins(top, right, bottom, left);
}
/**
- * Creates a MarginInfo object by having horizontal and vertical margins specified (analogous to CSS).
+ * Creates a MarginInfo object by having horizontal and vertical margins
+ * specified (analogous to CSS).
*
* @since 7.6.5
*
@@ -89,7 +91,7 @@ public class MarginInfo implements Serializable {
/**
* Creates a MarginInfo with the same values as another MarginInfo object.
- *
+ *
* @param other
* another MarginInfo object
*/
@@ -99,7 +101,7 @@ public class MarginInfo implements Serializable {
/**
* Enables or disables margins on all edges simultaneously.
- *
+ *
* @param enabled
* if true, enables margins on all edges. If false, disables
* margins on all edges.
@@ -110,7 +112,7 @@ public class MarginInfo implements Serializable {
/**
* Sets margins on all edges individually.
- *
+ *
* @param top
* enable or disable top margin
* @param right
@@ -127,7 +129,7 @@ public class MarginInfo implements Serializable {
/**
* Copies margin values from another MarginInfo object.
- *
+ *
* @param marginInfo
* another marginInfo object
*/
@@ -137,9 +139,9 @@ public class MarginInfo implements Serializable {
/**
* Checks if this MarginInfo object has margins on all edges enabled.
- *
+ *
* @since 7.5.0
- *
+ *
* @return true if all edges have margins enabled
*/
public boolean hasAll() {
@@ -148,7 +150,7 @@ public class MarginInfo implements Serializable {
/**
* Checks if this MarginInfo object has the left edge margin enabled.
- *
+ *
* @return true if left edge margin is enabled
*/
public boolean hasLeft() {
@@ -157,7 +159,7 @@ public class MarginInfo implements Serializable {
/**
* Checks if this MarginInfo object has the right edge margin enabled.
- *
+ *
* @return true if right edge margin is enabled
*/
public boolean hasRight() {
@@ -166,7 +168,7 @@ public class MarginInfo implements Serializable {
/**
* Checks if this MarginInfo object has the top edge margin enabled.
- *
+ *
* @return true if top edge margin is enabled
*/
public boolean hasTop() {
@@ -175,7 +177,7 @@ public class MarginInfo implements Serializable {
/**
* Checks if this MarginInfo object has the bottom edge margin enabled.
- *
+ *
* @return true if bottom edge margin is enabled
*/
public boolean hasBottom() {
@@ -186,7 +188,7 @@ public class MarginInfo implements Serializable {
* Returns the current bit mask that make up the margin settings.
* <p>
* This method is for internal use by the framework.
- *
+ *
* @return an integer bit mask
*/
@Deprecated
@@ -210,8 +212,8 @@ public class MarginInfo implements Serializable {
@Override
public String toString() {
- return "MarginInfo(" + hasTop() + ", " + hasRight() + ", "
- + hasBottom() + ", " + hasLeft() + ")";
+ return "MarginInfo(" + hasTop() + ", " + hasRight() + ", " + hasBottom()
+ + ", " + hasLeft() + ")";
}
diff --git a/shared/src/main/java/com/vaadin/shared/ui/MediaControl.java b/shared/src/main/java/com/vaadin/shared/ui/MediaControl.java
index ab31d6f95f..99a61febe2 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/MediaControl.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/MediaControl.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ import com.vaadin.shared.communication.ClientRpc;
/**
* Server to client RPC interface for controlling playback of the media.
- *
+ *
* @since 7.0
*/
public interface MediaControl extends ClientRpc {
diff --git a/shared/src/main/java/com/vaadin/shared/ui/MultiSelectMode.java b/shared/src/main/java/com/vaadin/shared/ui/MultiSelectMode.java
index b628017a12..7050e43e58 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/MultiSelectMode.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/MultiSelectMode.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/Orientation.java b/shared/src/main/java/com/vaadin/shared/ui/Orientation.java
index b370ba8109..2dd3c0a9b8 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/Orientation.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/Orientation.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/ShortCutConstants.java b/shared/src/main/java/com/vaadin/shared/ui/ShortCutConstants.java
index d7049c2a74..b47ee031d0 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/ShortCutConstants.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/ShortCutConstants.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/TabIndexState.java b/shared/src/main/java/com/vaadin/shared/ui/TabIndexState.java
index 1afe982546..4d8e45c4c2 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/TabIndexState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/TabIndexState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,10 +20,10 @@ import com.vaadin.shared.annotations.NoLayout;
/**
* Interface implemented by state classes that support tab indexes.
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
- *
+ *
*/
public class TabIndexState extends AbstractComponentState {
diff --git a/shared/src/main/java/com/vaadin/shared/ui/absolutelayout/AbsoluteLayoutServerRpc.java b/shared/src/main/java/com/vaadin/shared/ui/absolutelayout/AbsoluteLayoutServerRpc.java
index 9ec88db2c2..48c9fdd364 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/absolutelayout/AbsoluteLayoutServerRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/absolutelayout/AbsoluteLayoutServerRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/absolutelayout/AbsoluteLayoutState.java b/shared/src/main/java/com/vaadin/shared/ui/absolutelayout/AbsoluteLayoutState.java
index 865d1420d5..7f3a9a510c 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/absolutelayout/AbsoluteLayoutState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/absolutelayout/AbsoluteLayoutState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/accordion/AccordionState.java b/shared/src/main/java/com/vaadin/shared/ui/accordion/AccordionState.java
index cbb7447a25..13ae074aaa 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/accordion/AccordionState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/accordion/AccordionState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/audio/AudioState.java b/shared/src/main/java/com/vaadin/shared/ui/audio/AudioState.java
index f0b4501e82..c99a27aa58 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/audio/AudioState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/audio/AudioState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import com.vaadin.shared.ui.AbstractMediaState;
/**
* Shared state for the Audio component.
- *
+ *
* @since 7.6
*/
public class AudioState extends AbstractMediaState {
diff --git a/shared/src/main/java/com/vaadin/shared/ui/browserframe/BrowserFrameState.java b/shared/src/main/java/com/vaadin/shared/ui/browserframe/BrowserFrameState.java
index f8a5343cc9..90b51c05e4 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/browserframe/BrowserFrameState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/browserframe/BrowserFrameState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/button/ButtonServerRpc.java b/shared/src/main/java/com/vaadin/shared/ui/button/ButtonServerRpc.java
index d692fe5a6a..d95fabde88 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/button/ButtonServerRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/button/ButtonServerRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,13 +20,13 @@ import com.vaadin.shared.communication.ServerRpc;
/**
* RPC interface for calls from client to server.
- *
+ *
* @since 7.0
*/
public interface ButtonServerRpc extends ServerRpc {
/**
* Button click event.
- *
+ *
* @param mouseEventDetails
* serialized mouse event details
*/
diff --git a/shared/src/main/java/com/vaadin/shared/ui/button/ButtonState.java b/shared/src/main/java/com/vaadin/shared/ui/button/ButtonState.java
index 01ef9a038b..23fa0306d0 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/button/ButtonState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/button/ButtonState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,9 +23,9 @@ import com.vaadin.shared.ui.TabIndexState;
/**
* Shared state for {@link com.vaadin.ui.Button} and
* {@link com.vaadin.ui.NativeButton}.
- *
+ *
* @see AbstractComponentState
- *
+ *
* @since 7.0
*/
public class ButtonState extends TabIndexState {
diff --git a/shared/src/main/java/com/vaadin/shared/ui/button/NativeButtonState.java b/shared/src/main/java/com/vaadin/shared/ui/button/NativeButtonState.java
index 378b84832d..0aa47c9e02 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/button/NativeButtonState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/button/NativeButtonState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/calendar/CalendarClientRpc.java b/shared/src/main/java/com/vaadin/shared/ui/calendar/CalendarClientRpc.java
index bffcde11a0..1c9817a11d 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/calendar/CalendarClientRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/calendar/CalendarClientRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -18,10 +18,10 @@ package com.vaadin.shared.ui.calendar;
import com.vaadin.shared.communication.ClientRpc;
/**
- *
+ *
* @since 7.1
* @author Vaadin Ltd.
- *
+ *
*/
public interface CalendarClientRpc extends ClientRpc {
void scroll(int scrollPosition);
diff --git a/shared/src/main/java/com/vaadin/shared/ui/calendar/CalendarEventId.java b/shared/src/main/java/com/vaadin/shared/ui/calendar/CalendarEventId.java
index 67a5fe11e2..7228f3b35a 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/calendar/CalendarEventId.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/calendar/CalendarEventId.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import java.io.Serializable;
/**
* CalendarEventId contains static String identifiers for all Calendar events.
* These are used both in the client and server side code.
- *
+ *
* @since 7.1
* @author Vaadin Ltd.
*/
diff --git a/shared/src/main/java/com/vaadin/shared/ui/calendar/CalendarServerRpc.java b/shared/src/main/java/com/vaadin/shared/ui/calendar/CalendarServerRpc.java
index 7b7856fee9..7b1a9655ef 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/calendar/CalendarServerRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/calendar/CalendarServerRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/calendar/CalendarState.java b/shared/src/main/java/com/vaadin/shared/ui/calendar/CalendarState.java
index c26c4ead16..e209994a2e 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/calendar/CalendarState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/calendar/CalendarState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/calendar/DateConstants.java b/shared/src/main/java/com/vaadin/shared/ui/calendar/DateConstants.java
index 48f42eebbe..53220db78c 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/calendar/DateConstants.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/calendar/DateConstants.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -18,9 +18,9 @@ package com.vaadin.shared.ui.calendar;
import java.io.Serializable;
/**
- *
+ *
* @since 7.1
- *
+ *
*/
public class DateConstants implements Serializable {
diff --git a/shared/src/main/java/com/vaadin/shared/ui/checkbox/CheckBoxServerRpc.java b/shared/src/main/java/com/vaadin/shared/ui/checkbox/CheckBoxServerRpc.java
index f4124100e0..1aea954be1 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/checkbox/CheckBoxServerRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/checkbox/CheckBoxServerRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,5 +21,6 @@ import com.vaadin.shared.communication.ServerRpc;
public interface CheckBoxServerRpc extends ServerRpc {
@Delayed
- public void setChecked(boolean checked, MouseEventDetails mouseEventDetails);
+ public void setChecked(boolean checked,
+ MouseEventDetails mouseEventDetails);
}
diff --git a/shared/src/main/java/com/vaadin/shared/ui/checkbox/CheckBoxState.java b/shared/src/main/java/com/vaadin/shared/ui/checkbox/CheckBoxState.java
index 10d3b46d93..2099fbd785 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/checkbox/CheckBoxState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/checkbox/CheckBoxState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/colorpicker/Color.java b/shared/src/main/java/com/vaadin/shared/ui/colorpicker/Color.java
index 8624327993..76dde6b3ed 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/colorpicker/Color.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/colorpicker/Color.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import java.io.Serializable;
/**
* Default implementation for color.
- *
+ *
* @since 7.0.0
*/
public class Color implements Serializable {
@@ -43,7 +43,7 @@ public class Color implements Serializable {
/**
* Creates a color that has the specified red, green, blue, and alpha values
* within the range [0 - 255].
- *
+ *
* @throws IllegalArgumentException
* if <code>red</code>, <code>green</code>, <code>blue</code> or
* <code>alpha</code> fall outside of the inclusive range from 0
@@ -68,7 +68,7 @@ public class Color implements Serializable {
/**
* Creates a color that has the specified red, green, and blue values within
* the range [0 - 255]. Alpha gets the default value of 255.
- *
+ *
* @throws IllegalArgumentException
* if <code>red</code>, <code>green</code> or <code>blue</code>
* fall outside of the inclusive range from 0 to 255
@@ -85,12 +85,12 @@ public class Color implements Serializable {
/**
* Creates a color based on an RGB value.
- *
+ *
* @throws IllegalArgumentException
* if converted values of <code>red</code>, <code>green</code>,
* <code>blue</code> or <code>alpha</code> fall outside of the
* inclusive range from 0 to 255
- *
+ *
* @param rgb
* the RGB value
*/
@@ -111,10 +111,10 @@ public class Color implements Serializable {
/**
* Checks that all values are within the acceptable range of [0, 255].
- *
+ *
* @throws IllegalArgumentException
* if any of the values fall outside of the range
- *
+ *
* @param red
* @param green
* @param blue
@@ -125,11 +125,7 @@ public class Color implements Serializable {
|| !withinRange(alpha)) {
String errorMessage = "All values must fall within range [0-255]. (red: "
- + red
- + ", green: "
- + green
- + ", blue: "
- + blue
+ + red + ", green: " + green + ", blue: " + blue
+ ", alpha: " + alpha + ")";
throw new IllegalArgumentException(errorMessage);
}
@@ -137,7 +133,7 @@ public class Color implements Serializable {
/**
* Checks whether the value is within the acceptable range of [0, 255].
- *
+ *
* @param value
* @return true if the value falls within the range, false otherwise
*/
@@ -150,7 +146,7 @@ public class Color implements Serializable {
/**
* Returns the red value of the color.
- *
+ *
*/
public int getRed() {
return red;
@@ -158,7 +154,7 @@ public class Color implements Serializable {
/**
* Sets the red value of the color. Value must be within the range [0, 255].
- *
+ *
* @param red
* new red value
*/
@@ -172,7 +168,7 @@ public class Color implements Serializable {
/**
* Returns the green value of the color.
- *
+ *
*/
public int getGreen() {
return green;
@@ -181,7 +177,7 @@ public class Color implements Serializable {
/**
* Sets the green value of the color. Value must be within the range [0,
* 255].
- *
+ *
* @param green
* new green value
*/
@@ -195,7 +191,7 @@ public class Color implements Serializable {
/**
* Returns the blue value of the color.
- *
+ *
*/
public int getBlue() {
return blue;
@@ -204,7 +200,7 @@ public class Color implements Serializable {
/**
* Sets the blue value of the color. Value must be within the range [0,
* 255].
- *
+ *
* @param blue
* new blue value
*/
@@ -218,7 +214,7 @@ public class Color implements Serializable {
/**
* Returns the alpha value of the color.
- *
+ *
*/
public int getAlpha() {
return alpha;
@@ -227,7 +223,7 @@ public class Color implements Serializable {
/**
* Sets the alpha value of the color. Value must be within the range [0,
* 255].
- *
+ *
* @param alpha
* new alpha value
*/
@@ -266,7 +262,7 @@ public class Color implements Serializable {
/**
* Returns converted HSV components of the color.
- *
+ *
*/
public float[] getHSV() {
float[] hsv = new float[3];
@@ -333,7 +329,7 @@ public class Color implements Serializable {
* The <code>saturation</code> and <code>value</code> components should be
* floating-point values within the range [0.0-1.0].
* <p>
- *
+ *
* @param hue
* the hue of the color
* @param saturation
@@ -396,7 +392,7 @@ public class Color implements Serializable {
/**
* <p>
* Converts HSL's hue, saturation and lightness into an RGB value.
- *
+ *
* @param hue
* the hue of the color. The unit of the value is degrees and
* should be between 0-360.
@@ -406,7 +402,7 @@ public class Color implements Serializable {
* @param lightness
* the lightness of the color. The unit of the value is
* percentages and should be between 0-100;
- *
+ *
* @return the RGB value of corresponding color
*/
public static int HSLtoRGB(int hue, int saturation, int lightness) {
@@ -421,9 +417,10 @@ public class Color implements Serializable {
if (saturationRatio == 0) {
red = green = blue = (int) (lightnessRatio * 255.0f + 0.5f);
} else {
- float p = lightnessRatio < 0.5f ? lightnessRatio
- * (1f + saturationRatio) : lightnessRatio + saturationRatio
- - lightnessRatio * saturationRatio;
+ float p = lightnessRatio < 0.5f
+ ? lightnessRatio * (1f + saturationRatio)
+ : lightnessRatio + saturationRatio
+ - lightnessRatio * saturationRatio;
float q = 2 * lightnessRatio - p;
red = hslComponentToRgbComponent(p, q, hueRatio + (1f / 3f));
@@ -433,7 +430,8 @@ public class Color implements Serializable {
return 0xff000000 | (red << 16) | (green << 8) | (blue << 0);
}
- private static int hslComponentToRgbComponent(float p, float q, float ratio) {
+ private static int hslComponentToRgbComponent(float p, float q,
+ float ratio) {
if (ratio < 0) {
ratio += 1;
} else if (ratio > 1) {
@@ -445,7 +443,8 @@ public class Color implements Serializable {
} else if (2f * ratio < 1f) {
return (int) (p * 255f + 0.5f);
} else if (3f * ratio < 2f) {
- return (int) ((q + (p - q) * ((2f / 3f) - ratio) * 6f) * 255f + 0.5f);
+ return (int) ((q + (p - q) * ((2f / 3f) - ratio) * 6f) * 255f
+ + 0.5f);
}
return (int) (q * 255f + 0.5f);
diff --git a/shared/src/main/java/com/vaadin/shared/ui/colorpicker/ColorPickerGradientServerRpc.java b/shared/src/main/java/com/vaadin/shared/ui/colorpicker/ColorPickerGradientServerRpc.java
index 374a41a0fe..021b6d3fac 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/colorpicker/ColorPickerGradientServerRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/colorpicker/ColorPickerGradientServerRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,15 +19,15 @@ import com.vaadin.shared.communication.ServerRpc;
/**
* RPC interface for ColorPickerGradient.
- *
+ *
* @since 7.0.0
- *
+ *
*/
public interface ColorPickerGradientServerRpc extends ServerRpc {
/**
* ColorPickerGradient mouseUp event.
- *
+ *
* @param cursorX
* @param cursorY
*/
diff --git a/shared/src/main/java/com/vaadin/shared/ui/colorpicker/ColorPickerGradientState.java b/shared/src/main/java/com/vaadin/shared/ui/colorpicker/ColorPickerGradientState.java
index 8245ffeaac..b0cd6e8590 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/colorpicker/ColorPickerGradientState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/colorpicker/ColorPickerGradientState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import com.vaadin.shared.AbstractComponentState;
/**
* Default shared state implementation for ColorPickerGradient.
- *
+ *
* @since 7.0.0
*/
public class ColorPickerGradientState extends AbstractComponentState {
diff --git a/shared/src/main/java/com/vaadin/shared/ui/colorpicker/ColorPickerGridServerRpc.java b/shared/src/main/java/com/vaadin/shared/ui/colorpicker/ColorPickerGridServerRpc.java
index ce5c4317b4..3f4f89c63d 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/colorpicker/ColorPickerGridServerRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/colorpicker/ColorPickerGridServerRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,15 +19,15 @@ import com.vaadin.shared.communication.ServerRpc;
/**
* RPC interface for ColorPickerGrid.
- *
+ *
* @since 7.0.0
- *
+ *
*/
public interface ColorPickerGridServerRpc extends ServerRpc {
/**
* ColorPickerGrid click event.
- *
+ *
* @param x
* @param y
*/
diff --git a/shared/src/main/java/com/vaadin/shared/ui/colorpicker/ColorPickerGridState.java b/shared/src/main/java/com/vaadin/shared/ui/colorpicker/ColorPickerGridState.java
index e3e90f5418..981b4f049e 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/colorpicker/ColorPickerGridState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/colorpicker/ColorPickerGridState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import com.vaadin.shared.AbstractComponentState;
/**
* Default shared state implementation for ColorPickerGrid.
- *
+ *
* @since 7.0.0
*/
public class ColorPickerGridState extends AbstractComponentState {
diff --git a/shared/src/main/java/com/vaadin/shared/ui/colorpicker/ColorPickerServerRpc.java b/shared/src/main/java/com/vaadin/shared/ui/colorpicker/ColorPickerServerRpc.java
index f556625025..d5516758fd 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/colorpicker/ColorPickerServerRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/colorpicker/ColorPickerServerRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,17 +19,17 @@ import com.vaadin.shared.communication.ServerRpc;
/**
* RPC interface for AbstractColorPicker.
- *
+ *
* @since 7.0.0
- *
+ *
*/
public interface ColorPickerServerRpc extends ServerRpc {
/**
* ColorPicker click event.
- *
+ *
* @param openPopup
- *
+ *
*/
public void openPopup(boolean openPopup);
diff --git a/shared/src/main/java/com/vaadin/shared/ui/colorpicker/ColorPickerState.java b/shared/src/main/java/com/vaadin/shared/ui/colorpicker/ColorPickerState.java
index 3fdce20ce7..077929295d 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/colorpicker/ColorPickerState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/colorpicker/ColorPickerState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import com.vaadin.shared.annotations.DelegateToWidget;
/**
* Default shared state implementation for AbstractColorPicker.
- *
+ *
* @since 7.0.0
*/
public class ColorPickerState extends AbstractComponentState {
diff --git a/shared/src/main/java/com/vaadin/shared/ui/combobox/ComboBoxConstants.java b/shared/src/main/java/com/vaadin/shared/ui/combobox/ComboBoxConstants.java
index aeb04ba75f..e20b2b90fe 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/combobox/ComboBoxConstants.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/combobox/ComboBoxConstants.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/combobox/ComboBoxState.java b/shared/src/main/java/com/vaadin/shared/ui/combobox/ComboBoxState.java
index 46e24aa266..0843ed01f3 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/combobox/ComboBoxState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/combobox/ComboBoxState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import com.vaadin.shared.ui.select.AbstractSelectState;
/**
* Shared state for the ComboBox component.
- *
+ *
* @since 7.0
*/
public class ComboBoxState extends AbstractSelectState {
diff --git a/shared/src/main/java/com/vaadin/shared/ui/combobox/FilteringMode.java b/shared/src/main/java/com/vaadin/shared/ui/combobox/FilteringMode.java
index 1c0b743cc6..e3ccc681e8 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/combobox/FilteringMode.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/combobox/FilteringMode.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/csslayout/CssLayoutServerRpc.java b/shared/src/main/java/com/vaadin/shared/ui/csslayout/CssLayoutServerRpc.java
index 1ff2f83d08..bc1d0882d9 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/csslayout/CssLayoutServerRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/csslayout/CssLayoutServerRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/csslayout/CssLayoutState.java b/shared/src/main/java/com/vaadin/shared/ui/csslayout/CssLayoutState.java
index 5fe61082d5..d232c3ceb9 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/csslayout/CssLayoutState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/csslayout/CssLayoutState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/customlayout/CustomLayoutState.java b/shared/src/main/java/com/vaadin/shared/ui/customlayout/CustomLayoutState.java
index 04c7eed7e4..6f123c5e8a 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/customlayout/CustomLayoutState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/customlayout/CustomLayoutState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/datefield/DateFieldConstants.java b/shared/src/main/java/com/vaadin/shared/ui/datefield/DateFieldConstants.java
index 48bc74c690..d06c581d9c 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/datefield/DateFieldConstants.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/datefield/DateFieldConstants.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/datefield/InlineDateFieldState.java b/shared/src/main/java/com/vaadin/shared/ui/datefield/InlineDateFieldState.java
index b15d28f706..fe457455c2 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/datefield/InlineDateFieldState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/datefield/InlineDateFieldState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/datefield/PopupDateFieldState.java b/shared/src/main/java/com/vaadin/shared/ui/datefield/PopupDateFieldState.java
index 6f10af4314..f7f6f1e7fc 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/datefield/PopupDateFieldState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/datefield/PopupDateFieldState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/datefield/Resolution.java b/shared/src/main/java/com/vaadin/shared/ui/datefield/Resolution.java
index 689db11188..5ad7e5ba4c 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/datefield/Resolution.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/datefield/Resolution.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import java.util.List;
/**
* Resolutions for DateFields
- *
+ *
* @author Vaadin Ltd.
* @since 7.0
*/
@@ -38,7 +38,7 @@ public enum Resolution {
/**
* Returns the field in java.util.Calendar that corresponds to this
* resolution.
- *
+ *
* @return one of the field numbers used by Calendar
*/
public int getCalendarField() {
@@ -49,7 +49,7 @@ public enum Resolution {
* Returns the resolutions that are higher or equal to the given resolution,
* starting from the given resolution. In other words passing DAY to this
* methods returns DAY,MONTH,YEAR
- *
+ *
* @param r
* The resolution to start from
* @return An iterable for the resolutions higher or equal to r
@@ -68,7 +68,7 @@ public enum Resolution {
* Returns the resolutions that are lower than the given resolution,
* starting from the given resolution. In other words passing DAY to this
* methods returns HOUR,MINUTE,SECOND.
- *
+ *
* @param r
* The resolution to start from
* @return An iterable for the resolutions lower than r
diff --git a/shared/src/main/java/com/vaadin/shared/ui/datefield/TextualDateFieldState.java b/shared/src/main/java/com/vaadin/shared/ui/datefield/TextualDateFieldState.java
index bf38ee04a9..7db3407f4b 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/datefield/TextualDateFieldState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/datefield/TextualDateFieldState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/dd/AcceptCriterion.java b/shared/src/main/java/com/vaadin/shared/ui/dd/AcceptCriterion.java
index fa3ec107a2..1fd1535ad7 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/dd/AcceptCriterion.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/dd/AcceptCriterion.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,10 +27,10 @@ import java.lang.annotation.Target;
* <p>
* Annotations are used at GWT compilation phase, so remember to rebuild your
* widgetset if you do changes for {@link AcceptCriterion} mappings.
- *
+ *
* Prior to Vaadin 7, the mapping was done with an annotation on server side
* classes.
- *
+ *
* @since 7.0
*/
@Retention(RetentionPolicy.RUNTIME)
diff --git a/shared/src/main/java/com/vaadin/shared/ui/dd/DragEventType.java b/shared/src/main/java/com/vaadin/shared/ui/dd/DragEventType.java
index f894ed6219..c063266a3c 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/dd/DragEventType.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/dd/DragEventType.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/dd/HorizontalDropLocation.java b/shared/src/main/java/com/vaadin/shared/ui/dd/HorizontalDropLocation.java
index 064815695a..144f9c6df0 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/dd/HorizontalDropLocation.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/dd/HorizontalDropLocation.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/dd/VerticalDropLocation.java b/shared/src/main/java/com/vaadin/shared/ui/dd/VerticalDropLocation.java
index d64a48946a..aa23dd28d5 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/dd/VerticalDropLocation.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/dd/VerticalDropLocation.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/draganddropwrapper/DragAndDropWrapperConstants.java b/shared/src/main/java/com/vaadin/shared/ui/draganddropwrapper/DragAndDropWrapperConstants.java
index 9dda86ad73..32e885122f 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/draganddropwrapper/DragAndDropWrapperConstants.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/draganddropwrapper/DragAndDropWrapperConstants.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/draganddropwrapper/DragAndDropWrapperServerRpc.java b/shared/src/main/java/com/vaadin/shared/ui/draganddropwrapper/DragAndDropWrapperServerRpc.java
index 241518c3e3..a6ed2e5b6c 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/draganddropwrapper/DragAndDropWrapperServerRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/draganddropwrapper/DragAndDropWrapperServerRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import com.vaadin.shared.communication.ServerRpc;
/**
* RPC interface for calls from client to server.
- *
+ *
* @since 7.6.4
* @author Vaadin Ltd
*/
diff --git a/shared/src/main/java/com/vaadin/shared/ui/embedded/EmbeddedConstants.java b/shared/src/main/java/com/vaadin/shared/ui/embedded/EmbeddedConstants.java
index 6aadb43b05..398cb30841 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/embedded/EmbeddedConstants.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/embedded/EmbeddedConstants.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/embedded/EmbeddedServerRpc.java b/shared/src/main/java/com/vaadin/shared/ui/embedded/EmbeddedServerRpc.java
index 3b293ecdb2..516dfa2ea9 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/embedded/EmbeddedServerRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/embedded/EmbeddedServerRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/embedded/EmbeddedState.java b/shared/src/main/java/com/vaadin/shared/ui/embedded/EmbeddedState.java
index 9f12a917e5..ccc846ad4c 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/embedded/EmbeddedState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/embedded/EmbeddedState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/flash/FlashState.java b/shared/src/main/java/com/vaadin/shared/ui/flash/FlashState.java
index d974650030..65f345898b 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/flash/FlashState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/flash/FlashState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/form/FormState.java b/shared/src/main/java/com/vaadin/shared/ui/form/FormState.java
index 99ed11f8df..0c9edf97ce 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/form/FormState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/form/FormState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/ColumnGroupState.java b/shared/src/main/java/com/vaadin/shared/ui/grid/ColumnGroupState.java
index 79e6c9a89f..601ca58a57 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/grid/ColumnGroupState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/grid/ColumnGroupState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ import java.util.List;
/**
* The column group data shared between the server and the client
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/DetailsConnectorChange.java b/shared/src/main/java/com/vaadin/shared/ui/grid/DetailsConnectorChange.java
index 8b64d22423..18f808266e 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/grid/DetailsConnectorChange.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/grid/DetailsConnectorChange.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.shared.Connector;
/**
* A description of an indexing modification for a connector. This is used by
* Grid for internal bookkeeping updates.
- *
+ *
* @since 7.5.0
* @author Vaadin Ltd
*/
@@ -58,7 +58,7 @@ public class DetailsConnectorChange implements Serializable {
* <p>
* Calling this constructor will also assert that the state of the pojo is
* consistent by internal assumptions.
- *
+ *
* @param connector
* the changed connector
* @param oldIndex
@@ -84,12 +84,11 @@ public class DetailsConnectorChange implements Serializable {
boolean connectorAndNewIndexIsNullThenOldIndexIsSet = connector == null
&& newIndex == null && oldIndex != null;
- assert (connectorAndNewIndexIsNotNull || connectorAndNewIndexIsNullThenOldIndexIsSet) : "connector: "
- + nullityString(connector)
- + ", oldIndex: "
- + nullityString(oldIndex)
- + ", newIndex: "
- + nullityString(newIndex);
+ assert (connectorAndNewIndexIsNotNull
+ || connectorAndNewIndexIsNullThenOldIndexIsSet) : "connector: "
+ + nullityString(connector) + ", oldIndex: "
+ + nullityString(oldIndex) + ", newIndex: "
+ + nullityString(newIndex);
return true;
}
@@ -102,7 +101,7 @@ public class DetailsConnectorChange implements Serializable {
* <p>
* If <code>null</code>, the connector is recently added. This means that
* {@link #getConnector()} is expected not to return <code>null</code>.
- *
+ *
* @return the old index for the connector
*/
public Integer getOldIndex() {
@@ -115,7 +114,7 @@ public class DetailsConnectorChange implements Serializable {
* <p>
* If <code>null</code>, the connector should be removed. This means that
* {@link #getConnector()} is expected to return <code>null</code> as well.
- *
+ *
* @return the new index for the connector
*/
public Integer getNewIndex() {
@@ -125,7 +124,7 @@ public class DetailsConnectorChange implements Serializable {
/**
* Gets the changed connector.
- *
+ *
* @return the changed connector. Might be <code>null</code>
*/
public Connector getConnector() {
@@ -135,7 +134,7 @@ public class DetailsConnectorChange implements Serializable {
/**
* Sets the changed connector.
- *
+ *
* @param connector
* the changed connector. May be <code>null</code>
*/
@@ -145,7 +144,7 @@ public class DetailsConnectorChange implements Serializable {
/**
* Sets the old index
- *
+ *
* @param oldIndex
* the old index. May be <code>null</code> if a new connector is
* being inserted
@@ -156,7 +155,7 @@ public class DetailsConnectorChange implements Serializable {
/**
* Sets the new index
- *
+ *
* @param newIndex
* the new index. May be <code>null</code> if a connector is
* being removed
@@ -168,7 +167,7 @@ public class DetailsConnectorChange implements Serializable {
/**
* Checks whether whether the details should remain open, even if connector
* might be <code>null</code>.
- *
+ *
* @return <code>true</code> iff the details should remain open, even if
* connector might be <code>null</code>
*/
@@ -179,7 +178,7 @@ public class DetailsConnectorChange implements Serializable {
/**
* Sets whether the details should remain open, even if connector might be
* <code>null</code>.
- *
+ *
* @param shouldStillBeVisible
* <code>true</code> iff the details should remain open, even if
* connector might be <code>null</code>
diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/EditorClientRpc.java b/shared/src/main/java/com/vaadin/shared/ui/grid/EditorClientRpc.java
index 61066f28c2..e58b685469 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/grid/EditorClientRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/grid/EditorClientRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ import com.vaadin.shared.communication.ClientRpc;
/**
* An RPC interface for the grid editor server-to-client communications.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -29,7 +29,7 @@ public interface EditorClientRpc extends ClientRpc {
/**
* Tells the client to open the editor and bind data to it.
- *
+ *
* @param rowIndex
* the index of the edited row
*/
@@ -37,7 +37,7 @@ public interface EditorClientRpc extends ClientRpc {
/**
* Tells the client to cancel editing and hide the editor.
- *
+ *
* @param rowIndex
* the index of the edited row
*/
@@ -46,7 +46,7 @@ public interface EditorClientRpc extends ClientRpc {
/**
* Confirms a pending {@link EditorServerRpc#bind(int) bind request} sent by
* the client.
- *
+ *
* @param bindSucceeded
* <code>true</code> iff the bind action was successful
*/
@@ -55,7 +55,7 @@ public interface EditorClientRpc extends ClientRpc {
/**
* Confirms a pending {@link EditorServerRpc#save(int) save request} sent by
* the client.
- *
+ *
* @param saveSucceeded
* <code>true</code> iff the save action was successful
* @param errorMessage
diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/EditorServerRpc.java b/shared/src/main/java/com/vaadin/shared/ui/grid/EditorServerRpc.java
index 34a16ccb38..26aa92e80b 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/grid/EditorServerRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/grid/EditorServerRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import com.vaadin.shared.communication.ServerRpc;
/**
* An RPC interface for the grid editor client-to-server communications.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -30,7 +30,7 @@ public interface EditorServerRpc extends ServerRpc {
* request is sent, it must be acknowledged with a
* {@link EditorClientRpc#confirmBind() confirm call} before the client can
* open the editor.
- *
+ *
* @param rowIndex
* the index of the edited row
*/
@@ -40,7 +40,7 @@ public interface EditorServerRpc extends ServerRpc {
* Asks the server to save unsaved changes in the editor to the data source.
* When a save request is sent, it must be acknowledged with a
* {@link EditorClientRpc#confirmSave() confirm call}.
- *
+ *
* @param rowIndex
* the index of the edited row
*/
@@ -50,7 +50,7 @@ public interface EditorServerRpc extends ServerRpc {
* Tells the server to cancel editing. When sending a cancel request, the
* client does not need to wait for confirmation by the server before hiding
* the editor.
- *
+ *
* @param rowIndex
* the index of the edited row
*/
diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/GridClientRpc.java b/shared/src/main/java/com/vaadin/shared/ui/grid/GridClientRpc.java
index ac1b1d5a78..c3778a9901 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/grid/GridClientRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/grid/GridClientRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import com.vaadin.shared.communication.ClientRpc;
/**
* Server-to-client RPC interface for the Grid component.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -28,7 +28,7 @@ public interface GridClientRpc extends ClientRpc {
/**
* Command client Grid to scroll to a specific data row and its (optional)
* details.
- *
+ *
* @param row
* zero-based row index. If the row index is below zero or above
* the row count of the client-side data source, a client-side
diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/GridColumnState.java b/shared/src/main/java/com/vaadin/shared/ui/grid/GridColumnState.java
index 98fa553330..9dcf1eda1d 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/grid/GridColumnState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/grid/GridColumnState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ import com.vaadin.shared.Connector;
/**
* Column state DTO for transferring column properties from the server to the
* client
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/GridConstants.java b/shared/src/main/java/com/vaadin/shared/ui/grid/GridConstants.java
index 0f1af94456..e7209bd70f 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/grid/GridConstants.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/grid/GridConstants.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import java.io.Serializable;
/**
* Container class for common constants and default values used by the Grid
* component.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -28,7 +28,7 @@ public final class GridConstants implements Serializable {
/**
* Enum describing different sections of Grid.
- *
+ *
* @since 7.6
*/
public enum Section {
diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/GridServerRpc.java b/shared/src/main/java/com/vaadin/shared/ui/grid/GridServerRpc.java
index 336e8097c0..8696afa403 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/grid/GridServerRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/grid/GridServerRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.shared.ui.grid.GridConstants.Section;
/**
* Client-to-server RPC interface for the Grid component
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -35,7 +35,7 @@ public interface GridServerRpc extends ServerRpc {
/**
* Informs the server that an item has been clicked in Grid.
- *
+ *
* @param rowKey
* a key identifying the clicked item
* @param columnId
@@ -47,7 +47,7 @@ public interface GridServerRpc extends ServerRpc {
/**
* Informs the server that a context click has happened inside of Grid.
- *
+ *
* @since 7.6
* @param rowIndex
* index of clicked row in Grid section
@@ -65,7 +65,7 @@ public interface GridServerRpc extends ServerRpc {
/**
* Informs the server that the columns of the Grid have been reordered.
- *
+ *
* @since 7.5.0
* @param newColumnOrder
* a list of column ids in the new order
@@ -77,7 +77,7 @@ public interface GridServerRpc extends ServerRpc {
/**
* Informs the server that a column's visibility has been changed.
- *
+ *
* @since 7.5.0
* @param id
* the id of the column
@@ -92,7 +92,7 @@ public interface GridServerRpc extends ServerRpc {
/**
* Informs the server that a column has been resized by the user.
- *
+ *
* @since 7.6
* @param id
* the id of the column
diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/GridState.java b/shared/src/main/java/com/vaadin/shared/ui/grid/GridState.java
index 54ccc78daa..f20f519439 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/grid/GridState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/grid/GridState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.shared.ui.TabIndexState;
/**
* The shared state for the {@link com.vaadin.ui.components.grid.Grid} component
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -37,14 +37,14 @@ public class GridState extends TabIndexState {
* <p>
* Used as a data transfer object instead of the client/server ones, because
* they don't know about each others classes.
- *
+ *
* @see com.vaadin.ui.components.grid.Grid.SelectionMode
* @see com.vaadin.client.ui.grid.Grid.SelectionMode
*/
public enum SharedSelectionMode {
/**
* Representation of a single selection mode
- *
+ *
* @see com.vaadin.ui.components.grid.Grid.SelectionMode#SINGLE
* @see com.vaadin.client.ui.grid.Grid.SelectionMode#SINGLE
*/
@@ -52,7 +52,7 @@ public class GridState extends TabIndexState {
/**
* Representation of a multiselection mode
- *
+ *
* @see com.vaadin.ui.components.grid.Grid.SelectionMode#MULTI
* @see com.vaadin.client.ui.grid.Grid.SelectionMode#MULTI
*/
@@ -60,7 +60,7 @@ public class GridState extends TabIndexState {
/**
* Representation of a no-selection mode
- *
+ *
* @see com.vaadin.ui.components.grid.Grid.SelectionMode#NONE
* @see com.vaadin.client.ui.grid.Grid.SelectionMode#NONE
*/
@@ -76,35 +76,35 @@ public class GridState extends TabIndexState {
/**
* The key in which a row's data can be found
- *
+ *
* @see com.vaadin.shared.data.DataProviderRpc#setRowData(int, String)
*/
public static final String JSONKEY_DATA = "d";
/**
* The key in which a row's own key can be found
- *
+ *
* @see com.vaadin.shared.data.DataProviderRpc#setRowData(int, String)
*/
public static final String JSONKEY_ROWKEY = "k";
/**
* The key in which a row's generated style can be found
- *
+ *
* @see com.vaadin.shared.data.DataProviderRpc#setRowData(int, String)
*/
public static final String JSONKEY_ROWSTYLE = "rs";
/**
* The key in which a generated styles for a row's cells can be found
- *
+ *
* @see com.vaadin.shared.data.DataProviderRpc#setRowData(int, String)
*/
public static final String JSONKEY_CELLSTYLES = "cs";
/**
* The key in which a row's description can be found
- *
+ *
* @since 7.6
* @see com.vaadin.shared.data.DataProviderRpc#setRowData(int, String)
*/
@@ -112,7 +112,7 @@ public class GridState extends TabIndexState {
/**
* The key in which a cell's description can be found
- *
+ *
* @since 7.6
* @see com.vaadin.shared.data.DataProviderRpc#setRowData(int, String)
*/
@@ -120,19 +120,19 @@ public class GridState extends TabIndexState {
/**
* The key that tells whether details are visible for the row.
- *
+ *
* @since 7.5.0
- *
+ *
* @see com.vaadin.ui.Grid#setDetailsGenerator(com.vaadin.ui.Grid.DetailsGenerator)
* @see com.vaadin.ui.Grid#setDetailsVisible(Object, boolean)
* @see com.vaadin.shared.data.DataProviderRpc#setRowData(int,
* elemental.json.JsonArray)
- * */
+ */
public static final String JSONKEY_DETAILS_VISIBLE = "dv";
/**
* The key that tells whether row is selected.
- *
+ *
* @since 7.6
*/
public static final String JSONKEY_SELECTED = "s";
@@ -177,7 +177,7 @@ public class GridState extends TabIndexState {
/**
* Buffered editor mode
- *
+ *
* @since 7.6
*/
@DelegateToWidget
@@ -185,7 +185,7 @@ public class GridState extends TabIndexState {
/**
* Whether rows and/or cells have generated descriptions (tooltips)
- *
+ *
* @since 7.6
*/
public boolean hasDescriptions;
diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/GridStaticCellType.java b/shared/src/main/java/com/vaadin/shared/ui/grid/GridStaticCellType.java
index c646717d2c..ba69cf4639 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/grid/GridStaticCellType.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/grid/GridStaticCellType.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -17,7 +17,7 @@ package com.vaadin.shared.ui.grid;
/**
* Enumeration, specifying the content type of a Cell in a GridStaticSection.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/GridStaticSectionState.java b/shared/src/main/java/com/vaadin/shared/ui/grid/GridStaticSectionState.java
index a3c485af08..6e3a752e74 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/grid/GridStaticSectionState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/grid/GridStaticSectionState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ import com.vaadin.shared.Connector;
/**
* Shared state for Grid headers and footers.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/HeightMode.java b/shared/src/main/java/com/vaadin/shared/ui/grid/HeightMode.java
index 7fc992566f..9945771504 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/grid/HeightMode.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/grid/HeightMode.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ package com.vaadin.shared.ui.grid;
* {@link com.vaadin.client.ui.grid.Grid client} and
* {@link com.vaadin.ui.components.grid.Grid server}) /
* {@link com.vaadin.client.ui.grid.Escalator Escalator}.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
* @see com.vaadin.client.ui.grid.Grid#setHeightMode(HeightMode)
diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/Range.java b/shared/src/main/java/com/vaadin/shared/ui/grid/Range.java
index 21e70d3dbf..395d684d5e 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/grid/Range.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/grid/Range.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ import java.io.Serializable;
* <p>
* The range is considered {@link #isEmpty() empty} if the start is the same as
* the end.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
@@ -36,7 +36,7 @@ public final class Range implements Serializable {
/**
* Creates a range object representing a single integer.
- *
+ *
* @param integer
* the number to represent as a range
* @return the range represented by <code>integer</code>
@@ -51,7 +51,7 @@ public final class Range implements Serializable {
* The range start is <em>inclusive</em> and the end is <em>exclusive</em>.
* So, a range "between" 0 and 5 represents the numbers 0, 1, 2, 3 and 4,
* but not 5.
- *
+ *
* @param start
* the start of the the range, inclusive
* @param end
@@ -67,7 +67,7 @@ public final class Range implements Serializable {
/**
* Creates a range from a start point, with a given length.
- *
+ *
* @param start
* the first integer to include in the range
* @param length
@@ -92,7 +92,7 @@ public final class Range implements Serializable {
/**
* Creates a new range between two numbers: <code>[start..end[</code>.
- *
+ *
* @param start
* the start integer, inclusive
* @param end
@@ -113,7 +113,7 @@ public final class Range implements Serializable {
/**
* Returns the <em>inclusive</em> start point of this range.
- *
+ *
* @return the start point of this range
*/
public int getStart() {
@@ -122,7 +122,7 @@ public final class Range implements Serializable {
/**
* Returns the <em>exclusive</em> end point of this range.
- *
+ *
* @return the end point of this range
*/
public int getEnd() {
@@ -131,7 +131,7 @@ public final class Range implements Serializable {
/**
* The number of integers contained in the range.
- *
+ *
* @return the number of integers contained in the range
*/
public int length() {
@@ -140,7 +140,7 @@ public final class Range implements Serializable {
/**
* Checks whether the range has no elements between the start and end.
- *
+ *
* @return <code>true</code> iff the range contains no elements.
*/
public boolean isEmpty() {
@@ -150,7 +150,7 @@ public final class Range implements Serializable {
/**
* Checks whether this range and another range are at least partially
* covering the same values.
- *
+ *
* @param other
* the other range to check against
* @return <code>true</code> if this and <code>other</code> intersect
@@ -161,7 +161,7 @@ public final class Range implements Serializable {
/**
* Checks whether an integer is found within this range.
- *
+ *
* @param integer
* an integer to test for presence in this range
* @return <code>true</code> iff <code>integer</code> is in this range
@@ -172,7 +172,7 @@ public final class Range implements Serializable {
/**
* Checks whether this range is a subset of another range.
- *
+ *
* @return <code>true</code> iff <code>other</code> completely wraps this
* range
*/
@@ -196,7 +196,7 @@ public final class Range implements Serializable {
* <li>Elements in this range that occur after elements in
* <code>other</code>.
* </ul>
- *
+ *
* @param other
* the other range to act as delimiters.
* @return a three-element Range array of partitions depicting the elements
@@ -213,7 +213,7 @@ public final class Range implements Serializable {
/**
* Get a range that is based on this one, but offset by a number.
- *
+ *
* @param offset
* the number to offset by
* @return a copy of this range, offset by <code>offset</code>
@@ -264,7 +264,7 @@ public final class Range implements Serializable {
/**
* Checks whether this range starts before the start of another range.
- *
+ *
* @param other
* the other range to compare against
* @return <code>true</code> iff this range starts before the
@@ -276,7 +276,7 @@ public final class Range implements Serializable {
/**
* Checks whether this range ends before the start of another range.
- *
+ *
* @param other
* the other range to compare against
* @return <code>true</code> iff this range ends before the
@@ -288,7 +288,7 @@ public final class Range implements Serializable {
/**
* Checks whether this range ends after the end of another range.
- *
+ *
* @param other
* the other range to compare against
* @return <code>true</code> iff this range ends after the
@@ -300,7 +300,7 @@ public final class Range implements Serializable {
/**
* Checks whether this range starts after the end of another range.
- *
+ *
* @param other
* the other range to compare against
* @return <code>true</code> iff this range starts after the
@@ -314,7 +314,7 @@ public final class Range implements Serializable {
* Split the range into two at a certain integer.
* <p>
* <em>Example:</em> <code>[5..10[.splitAt(7) == [5..7[, [7..10[</code>
- *
+ *
* @param integer
* the integer at which to split the range into two
* @return an array of two ranges, with <code>[start..integer[</code> in the
@@ -346,7 +346,7 @@ public final class Range implements Serializable {
* <p>
* <em>Example:</em>
* <code>[5..10[.splitAtFromStart(2) == [5..7[, [7..10[</code>
- *
+ *
* @param length
* the length at which to split this range into two
* @return an array of two ranges, having the <code>length</code>-first
@@ -363,19 +363,19 @@ public final class Range implements Serializable {
/**
* Combines two ranges to create a range containing all values in both
* ranges, provided there are no gaps between the ranges.
- *
+ *
* @param other
* the range to combine with this range
- *
+ *
* @return the combined range
- *
+ *
* @throws IllegalArgumentException
* if the two ranges aren't connected
*/
public Range combineWith(Range other) throws IllegalArgumentException {
if (getStart() > other.getEnd() || other.getStart() > getEnd()) {
- throw new IllegalArgumentException("There is a gap between " + this
- + " and " + other);
+ throw new IllegalArgumentException(
+ "There is a gap between " + this + " and " + other);
}
return Range.between(Math.min(getStart(), other.getStart()),
@@ -384,14 +384,14 @@ public final class Range implements Serializable {
/**
* Creates a range that is expanded the given amounts in both ends.
- *
+ *
* @param startDelta
* the amount to expand by in the beginning of the range
* @param endDelta
* the amount to expand by in the end of the range
- *
+ *
* @return an expanded range
- *
+ *
* @throws IllegalArgumentException
* if the new range would have <code>start &gt; end</code>
*/
@@ -409,7 +409,7 @@ public final class Range implements Serializable {
* <p>
* If the two ranges do not intersect, an empty range is returned. There are
* no guarantees about the position of that range.
- *
+ *
* @param bounds
* the bounds that the returned range should be limited to
* @return a bounded range
diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/ScrollDestination.java b/shared/src/main/java/com/vaadin/shared/ui/grid/ScrollDestination.java
index 64cf070e46..3b8b963407 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/grid/ScrollDestination.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/grid/ScrollDestination.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -18,7 +18,7 @@ package com.vaadin.shared.ui.grid;
/**
* Enumeration, specifying the destinations that are supported when scrolling
* rows or columns into view.
- *
+ *
* @since 7.4
* @author Vaadin Ltd
*/
diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/renderers/RendererClickRpc.java b/shared/src/main/java/com/vaadin/shared/ui/grid/renderers/RendererClickRpc.java
index 658caef050..781884f262 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/grid/renderers/RendererClickRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/grid/renderers/RendererClickRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ public interface RendererClickRpc extends ServerRpc {
/**
* Called when a click event has occurred and there are server side
* listeners for the event.
- *
+ *
* @param mouseDetails
* Details about the mouse when the event took place
*/
diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/selection/MultiSelectionModelServerRpc.java b/shared/src/main/java/com/vaadin/shared/ui/grid/selection/MultiSelectionModelServerRpc.java
index 1ddecb31e4..24cc53034a 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/grid/selection/MultiSelectionModelServerRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/grid/selection/MultiSelectionModelServerRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ import com.vaadin.shared.communication.ServerRpc;
/**
* ServerRpc for MultiSelectionModel.
- *
+ *
* @since 7.6
* @author Vaadin Ltd
*/
@@ -29,7 +29,7 @@ public interface MultiSelectionModelServerRpc extends ServerRpc {
/**
* Select a list of rows based on their row keys on the server-side.
- *
+ *
* @param rowKeys
* list of row keys to select
*/
@@ -37,7 +37,7 @@ public interface MultiSelectionModelServerRpc extends ServerRpc {
/**
* Deselect a list of rows based on their row keys on the server-side.
- *
+ *
* @param rowKeys
* list of row keys to deselect
*/
diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/selection/MultiSelectionModelState.java b/shared/src/main/java/com/vaadin/shared/ui/grid/selection/MultiSelectionModelState.java
index 3d56b65793..35da1d1e0b 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/grid/selection/MultiSelectionModelState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/grid/selection/MultiSelectionModelState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import com.vaadin.shared.communication.SharedState;
/**
* SharedState object for MultiSelectionModel.
- *
+ *
* @since 7.6
* @author Vaadin Ltd
*/
diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/selection/SingleSelectionModelServerRpc.java b/shared/src/main/java/com/vaadin/shared/ui/grid/selection/SingleSelectionModelServerRpc.java
index ff8e7c424b..e83138b703 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/grid/selection/SingleSelectionModelServerRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/grid/selection/SingleSelectionModelServerRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import com.vaadin.shared.communication.ServerRpc;
/**
* ServerRpc for SingleSelectionModel.
- *
+ *
* @since 7.6
* @author Vaadin Ltd
*/
@@ -27,7 +27,7 @@ public interface SingleSelectionModelServerRpc extends ServerRpc {
/**
* Selects a row on server-side.
- *
+ *
* @param rowKey
* row key of selected row; {@code null} if deselect
*/
diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/selection/SingleSelectionModelState.java b/shared/src/main/java/com/vaadin/shared/ui/grid/selection/SingleSelectionModelState.java
index be8770a94e..de06dfc61a 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/grid/selection/SingleSelectionModelState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/grid/selection/SingleSelectionModelState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import com.vaadin.shared.communication.SharedState;
/**
* SharedState object for SingleSelectionModel.
- *
+ *
* @since 7.6
* @author Vaadin Ltd
*/
diff --git a/shared/src/main/java/com/vaadin/shared/ui/gridlayout/GridLayoutServerRpc.java b/shared/src/main/java/com/vaadin/shared/ui/gridlayout/GridLayoutServerRpc.java
index 70b49154ee..757a0e8c6e 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/gridlayout/GridLayoutServerRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/gridlayout/GridLayoutServerRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/image/ImageServerRpc.java b/shared/src/main/java/com/vaadin/shared/ui/image/ImageServerRpc.java
index ec03c7fe47..30e70403f1 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/image/ImageServerRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/image/ImageServerRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/image/ImageState.java b/shared/src/main/java/com/vaadin/shared/ui/image/ImageState.java
index b51913d168..2dc2ecccb6 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/image/ImageState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/image/ImageState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/label/ContentMode.java b/shared/src/main/java/com/vaadin/shared/ui/label/ContentMode.java
index 37e821536d..85dde63606 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/label/ContentMode.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/label/ContentMode.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -17,7 +17,7 @@ package com.vaadin.shared.ui.label;
/**
* Content modes defining how the client should interpret a Label's value.
- *
+ *
* @since 7.0.0
*/
public enum ContentMode {
@@ -40,7 +40,7 @@ public enum ContentMode {
/**
* Content mode, where the label contains well-formed or well-balanced XML.
* This is handled in the same way as {@link #HTML}.
- *
+ *
* @deprecated Use {@link #HTML} instead
*/
@Deprecated
@@ -49,7 +49,7 @@ public enum ContentMode {
/**
* Legacy content mode, where the label contains RAW output. This is handled
* in exactly the same way as {@link #HTML}.
- *
+ *
* @deprecated Use {@link #HTML} instead
*/
@Deprecated
diff --git a/shared/src/main/java/com/vaadin/shared/ui/label/LabelState.java b/shared/src/main/java/com/vaadin/shared/ui/label/LabelState.java
index 8fd1d7c798..5f11337459 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/label/LabelState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/label/LabelState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/link/LinkConstants.java b/shared/src/main/java/com/vaadin/shared/ui/link/LinkConstants.java
index 399e6b6148..defacdd1bb 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/link/LinkConstants.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/link/LinkConstants.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/link/LinkState.java b/shared/src/main/java/com/vaadin/shared/ui/link/LinkState.java
index 2b1f73b90a..51c951860f 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/link/LinkState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/link/LinkState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/loginform/LoginFormConstants.java b/shared/src/main/java/com/vaadin/shared/ui/loginform/LoginFormConstants.java
index 9f0c256881..0bfdf05606 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/loginform/LoginFormConstants.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/loginform/LoginFormConstants.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import java.io.Serializable;
/**
* Constants for LoginForm
- *
+ *
* @since 7.7
* @author Vaadin Ltd
*/
@@ -28,4 +28,3 @@ public class LoginFormConstants implements Serializable {
public static final String LOGIN_RESOURCE_NAME = "loginForm";
}
-
diff --git a/shared/src/main/java/com/vaadin/shared/ui/loginform/LoginFormRpc.java b/shared/src/main/java/com/vaadin/shared/ui/loginform/LoginFormRpc.java
index 76f88170a5..fa9a70e874 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/loginform/LoginFormRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/loginform/LoginFormRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/loginform/LoginFormState.java b/shared/src/main/java/com/vaadin/shared/ui/loginform/LoginFormState.java
index 1dee06a12d..95b9da9923 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/loginform/LoginFormState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/loginform/LoginFormState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/menubar/MenuBarConstants.java b/shared/src/main/java/com/vaadin/shared/ui/menubar/MenuBarConstants.java
index b34bc13a23..aa310244fd 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/menubar/MenuBarConstants.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/menubar/MenuBarConstants.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/menubar/MenuBarState.java b/shared/src/main/java/com/vaadin/shared/ui/menubar/MenuBarState.java
index 6d6acebe18..4f2d85cc12 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/menubar/MenuBarState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/menubar/MenuBarState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/optiongroup/OptionGroupConstants.java b/shared/src/main/java/com/vaadin/shared/ui/optiongroup/OptionGroupConstants.java
index 5670b64b38..3f20a2e7b6 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/optiongroup/OptionGroupConstants.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/optiongroup/OptionGroupConstants.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/optiongroup/OptionGroupState.java b/shared/src/main/java/com/vaadin/shared/ui/optiongroup/OptionGroupState.java
index f1676e0dd8..a2c79fd113 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/optiongroup/OptionGroupState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/optiongroup/OptionGroupState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import com.vaadin.shared.ui.select.AbstractSelectState;
/**
* Shared state for the OptionGroup component.
- *
+ *
* @since 7.0
*/
public class OptionGroupState extends AbstractSelectState {
diff --git a/shared/src/main/java/com/vaadin/shared/ui/orderedlayout/AbstractOrderedLayoutServerRpc.java b/shared/src/main/java/com/vaadin/shared/ui/orderedlayout/AbstractOrderedLayoutServerRpc.java
index 76e5267bb8..dfe5dfa43f 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/orderedlayout/AbstractOrderedLayoutServerRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/orderedlayout/AbstractOrderedLayoutServerRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -18,7 +18,7 @@ package com.vaadin.shared.ui.orderedlayout;
import com.vaadin.shared.communication.ServerRpc;
import com.vaadin.shared.ui.LayoutClickRpc;
-public interface AbstractOrderedLayoutServerRpc extends LayoutClickRpc,
- ServerRpc {
+public interface AbstractOrderedLayoutServerRpc
+ extends LayoutClickRpc, ServerRpc {
}
diff --git a/shared/src/main/java/com/vaadin/shared/ui/orderedlayout/AbstractOrderedLayoutState.java b/shared/src/main/java/com/vaadin/shared/ui/orderedlayout/AbstractOrderedLayoutState.java
index c06b945ada..01c75246e9 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/orderedlayout/AbstractOrderedLayoutState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/orderedlayout/AbstractOrderedLayoutState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/orderedlayout/FormLayoutState.java b/shared/src/main/java/com/vaadin/shared/ui/orderedlayout/FormLayoutState.java
index b8134d2cee..e41a5a7c1a 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/orderedlayout/FormLayoutState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/orderedlayout/FormLayoutState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -17,7 +17,7 @@ package com.vaadin.shared.ui.orderedlayout;
/**
* Shared state for the FormLayout component.
- *
+ *
* @since 7.6
*/
public class FormLayoutState extends AbstractOrderedLayoutState {
diff --git a/shared/src/main/java/com/vaadin/shared/ui/orderedlayout/HorizontalLayoutState.java b/shared/src/main/java/com/vaadin/shared/ui/orderedlayout/HorizontalLayoutState.java
index 167e89f624..c8cdd068be 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/orderedlayout/HorizontalLayoutState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/orderedlayout/HorizontalLayoutState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/orderedlayout/VerticalLayoutState.java b/shared/src/main/java/com/vaadin/shared/ui/orderedlayout/VerticalLayoutState.java
index 4c83a8b1dd..9894aa37fe 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/orderedlayout/VerticalLayoutState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/orderedlayout/VerticalLayoutState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/panel/PanelServerRpc.java b/shared/src/main/java/com/vaadin/shared/ui/panel/PanelServerRpc.java
index 8bb98e8e5d..7c54d62585 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/panel/PanelServerRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/panel/PanelServerRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/panel/PanelState.java b/shared/src/main/java/com/vaadin/shared/ui/panel/PanelState.java
index 8f48fad921..9b31c318b8 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/panel/PanelState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/panel/PanelState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/popupview/PopupViewServerRpc.java b/shared/src/main/java/com/vaadin/shared/ui/popupview/PopupViewServerRpc.java
index af712b9e31..8236c04241 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/popupview/PopupViewServerRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/popupview/PopupViewServerRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/popupview/PopupViewState.java b/shared/src/main/java/com/vaadin/shared/ui/popupview/PopupViewState.java
index 86fda428a1..1153aebbde 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/popupview/PopupViewState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/popupview/PopupViewState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/progressindicator/ProgressBarState.java b/shared/src/main/java/com/vaadin/shared/ui/progressindicator/ProgressBarState.java
index 6f557489dd..ef01b92f38 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/progressindicator/ProgressBarState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/progressindicator/ProgressBarState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ import com.vaadin.shared.communication.SharedState;
/**
* {@link SharedState} for {@link com.vaadin.ui.ProgressBar}
- *
+ *
* @since 7.1
* @author Vaadin Ltd
*/
diff --git a/shared/src/main/java/com/vaadin/shared/ui/progressindicator/ProgressIndicatorServerRpc.java b/shared/src/main/java/com/vaadin/shared/ui/progressindicator/ProgressIndicatorServerRpc.java
index f541395cef..2be54efb84 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/progressindicator/ProgressIndicatorServerRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/progressindicator/ProgressIndicatorServerRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/progressindicator/ProgressIndicatorState.java b/shared/src/main/java/com/vaadin/shared/ui/progressindicator/ProgressIndicatorState.java
index 9b3cf94d4a..97fa1125ed 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/progressindicator/ProgressIndicatorState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/progressindicator/ProgressIndicatorState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/select/AbstractSelectState.java b/shared/src/main/java/com/vaadin/shared/ui/select/AbstractSelectState.java
index 8ea306daf6..97a2223ff5 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/select/AbstractSelectState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/select/AbstractSelectState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import com.vaadin.shared.AbstractFieldState;
/**
* Shared state for the AbstractSelect component.
- *
+ *
* @since 7.6
*/
public class AbstractSelectState extends AbstractFieldState {
diff --git a/shared/src/main/java/com/vaadin/shared/ui/slider/SliderOrientation.java b/shared/src/main/java/com/vaadin/shared/ui/slider/SliderOrientation.java
index 74ccaa4e15..d1d44055d0 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/slider/SliderOrientation.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/slider/SliderOrientation.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/slider/SliderServerRpc.java b/shared/src/main/java/com/vaadin/shared/ui/slider/SliderServerRpc.java
index 1938dc1de2..65e01701c5 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/slider/SliderServerRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/slider/SliderServerRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ public interface SliderServerRpc extends ServerRpc {
/**
* Invoked when the value of a variable has changed. Slider listeners are
* notified if the slider value has changed.
- *
+ *
* @param value
*/
public void valueChanged(double value);
diff --git a/shared/src/main/java/com/vaadin/shared/ui/slider/SliderState.java b/shared/src/main/java/com/vaadin/shared/ui/slider/SliderState.java
index a96d35bc13..ee0c85120f 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/slider/SliderState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/slider/SliderState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/splitpanel/AbstractSplitPanelRpc.java b/shared/src/main/java/com/vaadin/shared/ui/splitpanel/AbstractSplitPanelRpc.java
index 7f1e9555d5..275bb06b7a 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/splitpanel/AbstractSplitPanelRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/splitpanel/AbstractSplitPanelRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ public interface AbstractSplitPanelRpc extends ServerRpc {
/**
* Called when the position has been updated by the user.
- *
+ *
* @param position
* The new position in % if the current unit is %, in px
* otherwise
@@ -31,7 +31,7 @@ public interface AbstractSplitPanelRpc extends ServerRpc {
/**
* Called when a click event has occurred on the splitter.
- *
+ *
* @param mouseDetails
* Details about the mouse when the event took place
*/
diff --git a/shared/src/main/java/com/vaadin/shared/ui/splitpanel/AbstractSplitPanelState.java b/shared/src/main/java/com/vaadin/shared/ui/splitpanel/AbstractSplitPanelState.java
index 2db292d71d..974a97b7a6 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/splitpanel/AbstractSplitPanelState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/splitpanel/AbstractSplitPanelState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/splitpanel/HorizontalSplitPanelState.java b/shared/src/main/java/com/vaadin/shared/ui/splitpanel/HorizontalSplitPanelState.java
index 849cd89651..1de35449c0 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/splitpanel/HorizontalSplitPanelState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/splitpanel/HorizontalSplitPanelState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/splitpanel/VerticalSplitPanelState.java b/shared/src/main/java/com/vaadin/shared/ui/splitpanel/VerticalSplitPanelState.java
index cb06a2a076..4c1b518547 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/splitpanel/VerticalSplitPanelState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/splitpanel/VerticalSplitPanelState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/table/CollapseMenuContent.java b/shared/src/main/java/com/vaadin/shared/ui/table/CollapseMenuContent.java
index afeb7fb35a..1fb2586452 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/table/CollapseMenuContent.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/table/CollapseMenuContent.java
@@ -19,9 +19,9 @@ package com.vaadin.shared.ui.table;
/**
* Defines whether only collapsible columns should be shown to the user in the
* column collapse menu.
- *
+ *
* @see com.vaadin.ui.Table#setCollapseMenuContent(CollapseMenuContent)
- *
+ *
* @since 7.6
* @author Vaadin Ltd
*/
diff --git a/shared/src/main/java/com/vaadin/shared/ui/table/TableConstants.java b/shared/src/main/java/com/vaadin/shared/ui/table/TableConstants.java
index 2bdb711153..64cda8f9b3 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/table/TableConstants.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/table/TableConstants.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import java.io.Serializable;
public class TableConstants implements Serializable {
/**
* Enum describing different sections of Table.
- *
+ *
* @since 7.6
*/
public enum Section {
@@ -47,7 +47,7 @@ public class TableConstants implements Serializable {
/**
* Default value for {@link TableState#collapseMenuContent}.
- *
+ *
* @since 7.6
*/
public static final CollapseMenuContent DEFAULT_COLLAPSE_MENU_CONTENT = CollapseMenuContent.ALL_COLUMNS;
diff --git a/shared/src/main/java/com/vaadin/shared/ui/table/TableServerRpc.java b/shared/src/main/java/com/vaadin/shared/ui/table/TableServerRpc.java
index 13d494afb7..02e4b99dc0 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/table/TableServerRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/table/TableServerRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ import com.vaadin.shared.ui.table.TableConstants.Section;
/**
* Client-to-server RPC interface for the Table component
- *
+ *
* @since 7.6
* @author Vaadin Ltd
*/
diff --git a/shared/src/main/java/com/vaadin/shared/ui/table/TableState.java b/shared/src/main/java/com/vaadin/shared/ui/table/TableState.java
index 9e225846b8..602cf413cd 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/table/TableState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/table/TableState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import com.vaadin.shared.ui.select.AbstractSelectState;
/**
* Shared state for the Table component.
- *
+ *
* @since 7.0
*/
public class TableState extends AbstractSelectState {
diff --git a/shared/src/main/java/com/vaadin/shared/ui/tabsheet/TabState.java b/shared/src/main/java/com/vaadin/shared/ui/tabsheet/TabState.java
index 3c8c1d76d0..243dd92afb 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/tabsheet/TabState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/tabsheet/TabState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import java.io.Serializable;
/**
* Shared state of a single tab in a Tabsheet or an Accordion.
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
diff --git a/shared/src/main/java/com/vaadin/shared/ui/tabsheet/TabsheetBaseConstants.java b/shared/src/main/java/com/vaadin/shared/ui/tabsheet/TabsheetBaseConstants.java
index 62cfd5cb81..fc0e353d37 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/tabsheet/TabsheetBaseConstants.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/tabsheet/TabsheetBaseConstants.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/tabsheet/TabsheetClientRpc.java b/shared/src/main/java/com/vaadin/shared/ui/tabsheet/TabsheetClientRpc.java
index 5b1497dd3b..dc82f865bf 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/tabsheet/TabsheetClientRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/tabsheet/TabsheetClientRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import com.vaadin.shared.communication.ClientRpc;
/**
* Server to client RPC methods for the TabSheet.
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
@@ -27,7 +27,7 @@ public interface TabsheetClientRpc extends ClientRpc {
/**
* Forces the client to switch to the tab that is selected by the server.
- *
+ *
* This is required e.g. for reverting tab selection change on the server
* side (shared state does not change).
*/
diff --git a/shared/src/main/java/com/vaadin/shared/ui/tabsheet/TabsheetConstants.java b/shared/src/main/java/com/vaadin/shared/ui/tabsheet/TabsheetConstants.java
index c99bf2eeb2..799aa192cb 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/tabsheet/TabsheetConstants.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/tabsheet/TabsheetConstants.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/tabsheet/TabsheetServerRpc.java b/shared/src/main/java/com/vaadin/shared/ui/tabsheet/TabsheetServerRpc.java
index a96c616ec6..2e053ee4a2 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/tabsheet/TabsheetServerRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/tabsheet/TabsheetServerRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import com.vaadin.shared.communication.ServerRpc;
/**
* Client to server RPC methods for the TabSheet.
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
@@ -27,7 +27,7 @@ public interface TabsheetServerRpc extends ServerRpc {
/**
* Tell server that a tab has been selected by the user.
- *
+ *
* @param key
* internal key of the tab
*/
@@ -35,7 +35,7 @@ public interface TabsheetServerRpc extends ServerRpc {
/**
* Tell server that a tab has been closed by the user.
- *
+ *
* @param key
* internal key of the tab
*/
diff --git a/shared/src/main/java/com/vaadin/shared/ui/tabsheet/TabsheetState.java b/shared/src/main/java/com/vaadin/shared/ui/tabsheet/TabsheetState.java
index 6059379dc5..f264f70321 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/tabsheet/TabsheetState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/tabsheet/TabsheetState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/textarea/RichTextAreaState.java b/shared/src/main/java/com/vaadin/shared/ui/textarea/RichTextAreaState.java
index 51c386ddfc..e73f079ca5 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/textarea/RichTextAreaState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/textarea/RichTextAreaState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -18,9 +18,9 @@ package com.vaadin.shared.ui.textarea;
import com.vaadin.shared.ui.textfield.AbstractTextFieldState;
/**
- *
+ *
* Shared state for the RichTextArea component.
- *
+ *
* @since 7.6
*/
public class RichTextAreaState extends AbstractTextFieldState {
diff --git a/shared/src/main/java/com/vaadin/shared/ui/textarea/TextAreaState.java b/shared/src/main/java/com/vaadin/shared/ui/textarea/TextAreaState.java
index c1f9536278..3350cb8451 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/textarea/TextAreaState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/textarea/TextAreaState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/textfield/AbstractTextFieldState.java b/shared/src/main/java/com/vaadin/shared/ui/textfield/AbstractTextFieldState.java
index 9d4272c22f..4f573a50aa 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/textfield/AbstractTextFieldState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/textfield/AbstractTextFieldState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/textfield/TextFieldConstants.java b/shared/src/main/java/com/vaadin/shared/ui/textfield/TextFieldConstants.java
index 242e53682b..cb11f126fd 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/textfield/TextFieldConstants.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/textfield/TextFieldConstants.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/tree/TreeConstants.java b/shared/src/main/java/com/vaadin/shared/ui/tree/TreeConstants.java
index 33560dec53..6fb53be9d3 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/tree/TreeConstants.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/tree/TreeConstants.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/tree/TreeServerRpc.java b/shared/src/main/java/com/vaadin/shared/ui/tree/TreeServerRpc.java
index 76b33aa8c3..59b43d3c12 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/tree/TreeServerRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/tree/TreeServerRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import com.vaadin.shared.communication.ServerRpc;
/**
* Client-to-server RPC interface for the Tree component
- *
+ *
* @since 7.6
* @author Vaadin Ltd
*/
diff --git a/shared/src/main/java/com/vaadin/shared/ui/tree/TreeState.java b/shared/src/main/java/com/vaadin/shared/ui/tree/TreeState.java
index 19a70e89f2..9d17e683c3 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/tree/TreeState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/tree/TreeState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import com.vaadin.shared.ui.select.AbstractSelectState;
/**
* Shared state for the Table component.
- *
+ *
* @since 7.0
*/
public class TreeState extends AbstractSelectState {
diff --git a/shared/src/main/java/com/vaadin/shared/ui/treetable/TreeTableConstants.java b/shared/src/main/java/com/vaadin/shared/ui/treetable/TreeTableConstants.java
index 510c18d245..72cc21a004 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/treetable/TreeTableConstants.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/treetable/TreeTableConstants.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/treetable/TreeTableState.java b/shared/src/main/java/com/vaadin/shared/ui/treetable/TreeTableState.java
index ecc7d0f4c4..806f460c3f 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/treetable/TreeTableState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/treetable/TreeTableState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/twincolselect/TwinColSelectConstants.java b/shared/src/main/java/com/vaadin/shared/ui/twincolselect/TwinColSelectConstants.java
index 32422a38e5..9b50f87756 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/twincolselect/TwinColSelectConstants.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/twincolselect/TwinColSelectConstants.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/twincolselect/TwinColSelectState.java b/shared/src/main/java/com/vaadin/shared/ui/twincolselect/TwinColSelectState.java
index 12505c4231..a1e93f84ba 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/twincolselect/TwinColSelectState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/twincolselect/TwinColSelectState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import com.vaadin.shared.ui.select.AbstractSelectState;
/**
* Shared state for the TwinColSelect component.
- *
+ *
* @since 7.0
*/
public class TwinColSelectState extends AbstractSelectState {
diff --git a/shared/src/main/java/com/vaadin/shared/ui/ui/DebugWindowClientRpc.java b/shared/src/main/java/com/vaadin/shared/ui/ui/DebugWindowClientRpc.java
index 9a5d269a87..f8c35129c0 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/ui/DebugWindowClientRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/ui/DebugWindowClientRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import com.vaadin.shared.communication.ClientRpc;
/**
* Client RPC methods for the Debug Window.
- *
+ *
* @since 7.1
* @author Vaadin Ltd
*/
@@ -29,7 +29,7 @@ public interface DebugWindowClientRpc extends ClientRpc {
/**
* Send results from {@link DebugWindowServerRpc#analyzeLayouts()} back to
* the client.
- *
+ *
* @since 7.1
* @param json
* JSON containing list of found problems
diff --git a/shared/src/main/java/com/vaadin/shared/ui/ui/DebugWindowServerRpc.java b/shared/src/main/java/com/vaadin/shared/ui/ui/DebugWindowServerRpc.java
index b6f17661d0..7bedfd5fa9 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/ui/DebugWindowServerRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/ui/DebugWindowServerRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -15,7 +15,7 @@
*/
/**
- *
+ *
*/
package com.vaadin.shared.ui.ui;
@@ -24,7 +24,7 @@ import com.vaadin.shared.communication.ServerRpc;
/**
* Server RPC methods for the Debug Window.
- *
+ *
* @since 7.1
* @author Vaadin Ltd
*/
@@ -33,7 +33,7 @@ public interface DebugWindowServerRpc extends ServerRpc {
* Sends a request to the server to print details to console that will help
* the developer to locate the corresponding server-side connector in the
* source code.
- *
+ *
* @since 7.1
* @param connector
* the connector to locate
@@ -42,7 +42,7 @@ public interface DebugWindowServerRpc extends ServerRpc {
/**
* Invokes the layout analyzer on the server
- *
+ *
* @since 7.1
*/
public void analyzeLayouts();
@@ -50,7 +50,7 @@ public interface DebugWindowServerRpc extends ServerRpc {
/**
* Sends a request to the server to print a design to the console for the
* given component.
- *
+ *
* @since 7.5
* @param connector
* the component connector to output a declarative design for
diff --git a/shared/src/main/java/com/vaadin/shared/ui/ui/NotificationRole.java b/shared/src/main/java/com/vaadin/shared/ui/ui/NotificationRole.java
index b6f6c6bb83..0e513b853f 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/ui/NotificationRole.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/ui/NotificationRole.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/ui/PageClientRpc.java b/shared/src/main/java/com/vaadin/shared/ui/ui/PageClientRpc.java
index a4c7d33ad1..01d0476ad2 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/ui/PageClientRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/ui/PageClientRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/ui/PageState.java b/shared/src/main/java/com/vaadin/shared/ui/ui/PageState.java
index b6dd5abb89..b3c334c1b8 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/ui/PageState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/ui/PageState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,10 +19,10 @@ import java.io.Serializable;
/**
* The shared state of a {@link com.vaadin.server.Page Page}.
- *
+ *
* Note that at the moment this is not a stand-alone state class but embedded in
* {@link UIState}. This might change in the future.
- *
+ *
* @since 7.1
*/
public class PageState implements Serializable {
diff --git a/shared/src/main/java/com/vaadin/shared/ui/ui/ScrollClientRpc.java b/shared/src/main/java/com/vaadin/shared/ui/ui/ScrollClientRpc.java
index fb052a25e9..d39017791b 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/ui/ScrollClientRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/ui/ScrollClientRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/ui/Transport.java b/shared/src/main/java/com/vaadin/shared/ui/ui/Transport.java
index 6263f3039d..ea32957ab7 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/ui/Transport.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/ui/Transport.java
@@ -29,13 +29,13 @@ public enum Transport {
WEBSOCKET("websocket"),
/**
* Websockets for server to client, XHR for client to server
- *
+ *
* @since 7.6
*/
WEBSOCKET_XHR("websocket-xhr"),
/**
* HTTP streaming
- *
+ *
* @deprecated Use the more reliable {@link Transport#LONG_POLLING} instead.
*/
@Deprecated
diff --git a/shared/src/main/java/com/vaadin/shared/ui/ui/UIClientRpc.java b/shared/src/main/java/com/vaadin/shared/ui/ui/UIClientRpc.java
index 5026189d71..abc995f535 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/ui/UIClientRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/ui/UIClientRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import com.vaadin.shared.communication.ClientRpc;
/**
* Server to Client RPC methods for UI
- *
+ *
* @since 7.1
* @author Vaadin Ltd
*/
@@ -27,7 +27,7 @@ public interface UIClientRpc extends ClientRpc {
/**
* Informs the client that the UI has been closed
- *
+ *
* @param sessionExpired
* true if the ui was closed because the session expired, false
* otherwise
diff --git a/shared/src/main/java/com/vaadin/shared/ui/ui/UIConstants.java b/shared/src/main/java/com/vaadin/shared/ui/ui/UIConstants.java
index 429360e05d..6fb323ee79 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/ui/UIConstants.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/ui/UIConstants.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/ui/UIServerRpc.java b/shared/src/main/java/com/vaadin/shared/ui/ui/UIServerRpc.java
index 554feaac76..45077f9094 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/ui/UIServerRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/ui/UIServerRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/ui/UIState.java b/shared/src/main/java/com/vaadin/shared/ui/ui/UIState.java
index 48ff9cdaaf..39085b87a4 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/ui/UIState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/ui/UIState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -68,7 +68,7 @@ public class UIState extends TabIndexState {
public PushConfigurationState pushConfiguration = new PushConfigurationState();
/**
* Currently used theme.
- *
+ *
* @since 7.3
*/
public String theme;
@@ -79,8 +79,8 @@ public class UIState extends TabIndexState {
tabIndex = 1;
}
- public static class LoadingIndicatorConfigurationState implements
- Serializable {
+ public static class LoadingIndicatorConfigurationState
+ implements Serializable {
public int firstDelay = 300;
public int secondDelay = 1500;
public int thirdDelay = 5000;
@@ -119,15 +119,15 @@ public class UIState extends TabIndexState {
public String pushUrl = null;
public Map<String, String> parameters = new HashMap<String, String>();
{
- parameters
- .put(TRANSPORT_PARAM, Transport.WEBSOCKET.getIdentifier());
+ parameters.put(TRANSPORT_PARAM,
+ Transport.WEBSOCKET.getIdentifier());
parameters.put(FALLBACK_TRANSPORT_PARAM,
Transport.LONG_POLLING.getIdentifier());
}
}
- public static class ReconnectDialogConfigurationState implements
- Serializable {
+ public static class ReconnectDialogConfigurationState
+ implements Serializable {
public String dialogText = "Server connection lost, trying to reconnect...";
public String dialogTextGaveUp = "Server connection lost.";
public int reconnectAttempts = 10000;
diff --git a/shared/src/main/java/com/vaadin/shared/ui/upload/UploadClientRpc.java b/shared/src/main/java/com/vaadin/shared/ui/upload/UploadClientRpc.java
index a5147147bc..aee3e8d5cb 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/upload/UploadClientRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/upload/UploadClientRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/upload/UploadServerRpc.java b/shared/src/main/java/com/vaadin/shared/ui/upload/UploadServerRpc.java
index 5a5a1378d1..10bd5d5484 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/upload/UploadServerRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/upload/UploadServerRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ public interface UploadServerRpc extends ServerRpc {
/**
* Event sent when the file name of the upload component is changed.
- *
+ *
* @param filename
* The filename
*/
@@ -30,7 +30,7 @@ public interface UploadServerRpc extends ServerRpc {
/**
* Called to poll the server to see if any changes have been made e.g. when
* starting upload
- *
+ *
* @since 7.6
*/
void poll();
diff --git a/shared/src/main/java/com/vaadin/shared/ui/upload/UploadState.java b/shared/src/main/java/com/vaadin/shared/ui/upload/UploadState.java
index f91d67631c..f0be08c57f 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/upload/UploadState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/upload/UploadState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import com.vaadin.shared.AbstractComponentState;
/**
* Shared state for the Upload component.
- *
+ *
* @since 7.6
*/
public class UploadState extends AbstractComponentState {
diff --git a/shared/src/main/java/com/vaadin/shared/ui/video/VideoConstants.java b/shared/src/main/java/com/vaadin/shared/ui/video/VideoConstants.java
index 0a61b88afc..4cf9898a82 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/video/VideoConstants.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/video/VideoConstants.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/video/VideoState.java b/shared/src/main/java/com/vaadin/shared/ui/video/VideoState.java
index 91006f0f6a..da802fbd9a 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/video/VideoState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/video/VideoState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/window/WindowMode.java b/shared/src/main/java/com/vaadin/shared/ui/window/WindowMode.java
index e3438fe6a9..7a116b61c0 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/window/WindowMode.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/window/WindowMode.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,8 +20,8 @@ package com.vaadin.shared.ui.window;
* <p>
* A window mode decides the size and position of the Window. It can be set to
* {@link #NORMAL} or {@link #MAXIMIZED}.
- *
- *
+ *
+ *
* @author Vaadin Ltd
* @since 7.1
*/
diff --git a/shared/src/main/java/com/vaadin/shared/ui/window/WindowRole.java b/shared/src/main/java/com/vaadin/shared/ui/window/WindowRole.java
index 5114c04bc2..6bcf6b7a29 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/window/WindowRole.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/window/WindowRole.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/window/WindowServerRpc.java b/shared/src/main/java/com/vaadin/shared/ui/window/WindowServerRpc.java
index 6c7191c54d..e021333d46 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/window/WindowServerRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/window/WindowServerRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/ui/window/WindowState.java b/shared/src/main/java/com/vaadin/shared/ui/window/WindowState.java
index 7dafba57ff..323d698ce5 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/window/WindowState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/window/WindowState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/shared/src/main/java/com/vaadin/shared/util/SharedUtil.java b/shared/src/main/java/com/vaadin/shared/util/SharedUtil.java
index 28c1ea3734..271e8d0e5e 100644
--- a/shared/src/main/java/com/vaadin/shared/util/SharedUtil.java
+++ b/shared/src/main/java/com/vaadin/shared/util/SharedUtil.java
@@ -64,7 +64,7 @@ public class SharedUtil implements Serializable {
/**
* Splits a camelCaseString into an array of words with the casing
* preserved.
- *
+ *
* @since 7.4
* @param camelCaseString
* The input string in camelCase format
@@ -74,7 +74,8 @@ public class SharedUtil implements Serializable {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < camelCaseString.length(); i++) {
char c = camelCaseString.charAt(i);
- if (Character.isUpperCase(c) && isWordComplete(camelCaseString, i)) {
+ if (Character.isUpperCase(c)
+ && isWordComplete(camelCaseString, i)) {
sb.append(' ');
}
sb.append(c);
@@ -108,7 +109,7 @@ public class SharedUtil implements Serializable {
* {@literal MyBeanContainer} becomes {@literal My Bean Container}
* {@literal AwesomeURLFactory} becomes {@literal Awesome URL Factory}
* {@literal SomeUriAction} becomes {@literal Some Uri Action}
- *
+ *
* @since 7.4
* @param camelCaseString
* The input string in camelCase format
@@ -135,7 +136,7 @@ public class SharedUtil implements Serializable {
/**
* Joins the words in the input array together into a single string by
* inserting the separator string between each word.
- *
+ *
* @since 7.4
* @param parts
* The array of words
@@ -155,7 +156,7 @@ public class SharedUtil implements Serializable {
/**
* Capitalizes the first character in the given string in a way suitable for
* use in code (methods, properties etc)
- *
+ *
* @since 7.4
* @param string
* The string to capitalize
@@ -178,7 +179,7 @@ public class SharedUtil implements Serializable {
* Converts a property id to a human friendly format. Handles nested
* properties by only considering the last part, e.g. "address.streetName"
* is equal to "streetName" for this method.
- *
+ *
* @since 7.4
* @param propertyId
* The propertyId to format
@@ -247,7 +248,7 @@ public class SharedUtil implements Serializable {
* <p>
* {@literal foo} becomes {@literal foo} {@literal foo-bar} becomes
* {@literal fooBar} {@literal foo--bar} becomes {@literal fooBar}
- *
+ *
* @since 7.5
* @param dashSeparated
* The dash separated string to convert
diff --git a/shared/src/test/java/com/vaadin/shared/ui/grid/RangeTest.java b/shared/src/test/java/com/vaadin/shared/ui/grid/RangeTest.java
index e3cae858ee..bde581022b 100644
--- a/shared/src/test/java/com/vaadin/shared/ui/grid/RangeTest.java
+++ b/shared/src/test/java/com/vaadin/shared/ui/grid/RangeTest.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -35,7 +35,8 @@ public class RangeTest {
@Test
public void constructorEquivalenceTest() {
- assertEquals("10 == [10,11[", Range.withOnly(10), Range.between(10, 11));
+ assertEquals("10 == [10,11[", Range.withOnly(10),
+ Range.between(10, 11));
assertEquals("[10,20[ == 10, length 10", Range.between(10, 20),
Range.withLength(10, 10));
assertEquals("10 == 10, length 1", Range.withOnly(10),
@@ -87,17 +88,18 @@ public class RangeTest {
assertTrue("end-1 should be contained", range.contains(end - 1));
assertTrue("[0..10[ contains 5", Range.between(0, 10).contains(5));
- assertTrue("empty range does not contain 5", !Range.between(5, 5)
- .contains(5));
+ assertTrue("empty range does not contain 5",
+ !Range.between(5, 5).contains(5));
}
@Test
public void emptyTest() {
assertTrue("[0..0[ should be empty", Range.between(0, 0).isEmpty());
- assertTrue("Range of length 0 should be empty", Range.withLength(0, 0)
- .isEmpty());
+ assertTrue("Range of length 0 should be empty",
+ Range.withLength(0, 0).isEmpty());
- assertTrue("[0..1[ should not be empty", !Range.between(0, 1).isEmpty());
+ assertTrue("[0..1[ should not be empty",
+ !Range.between(0, 1).isEmpty());
assertTrue("Range of length 1 should not be empty",
!Range.withLength(0, 1).isEmpty());
}
@@ -151,18 +153,18 @@ public class RangeTest {
@Test
public void intersectsTest() {
- assertTrue("[0..10[ intersects [5..15[", Range.between(0, 10)
- .intersects(Range.between(5, 15)));
- assertTrue("[0..10[ does not intersect [10..20[", !Range.between(0, 10)
- .intersects(Range.between(10, 20)));
+ assertTrue("[0..10[ intersects [5..15[",
+ Range.between(0, 10).intersects(Range.between(5, 15)));
+ assertTrue("[0..10[ does not intersect [10..20[",
+ !Range.between(0, 10).intersects(Range.between(10, 20)));
}
@Test
public void intersects_emptyInside() {
- assertTrue("[5..5[ does intersect with [0..10[", Range.between(5, 5)
- .intersects(Range.between(0, 10)));
- assertTrue("[0..10[ does intersect with [5..5[", Range.between(0, 10)
- .intersects(Range.between(5, 5)));
+ assertTrue("[5..5[ does intersect with [0..10[",
+ Range.between(5, 5).intersects(Range.between(0, 10)));
+ assertTrue("[0..10[ does intersect with [5..5[",
+ Range.between(0, 10).intersects(Range.between(5, 5)));
}
@Test
@@ -175,14 +177,14 @@ public class RangeTest {
@Test
public void subsetTest() {
- assertTrue("[5..10[ is subset of [0..20[", Range.between(5, 10)
- .isSubsetOf(Range.between(0, 20)));
+ assertTrue("[5..10[ is subset of [0..20[",
+ Range.between(5, 10).isSubsetOf(Range.between(0, 20)));
final Range range = Range.between(0, 10);
assertTrue("range is subset of self", range.isSubsetOf(range));
- assertTrue("[0..10[ is not subset of [5..15[", !Range.between(0, 10)
- .isSubsetOf(Range.between(5, 15)));
+ assertTrue("[0..10[ is not subset of [5..15[",
+ !Range.between(0, 10).isSubsetOf(Range.between(5, 15)));
}
@Test
@@ -220,7 +222,8 @@ public class RangeTest {
public void rangeEndsBeforeTest() {
final Range former = Range.between(0, 5);
final Range latter = Range.between(5, 10);
- assertTrue("latter should end before former", former.endsBefore(latter));
+ assertTrue("latter should end before former",
+ former.endsBefore(latter));
assertTrue("former shouldn't end before latter",
!latter.endsBefore(former));
diff --git a/uitest/src/main/java/com/vaadin/data/util/sqlcontainer/SQLTestsConstants.java b/uitest/src/main/java/com/vaadin/data/util/sqlcontainer/SQLTestsConstants.java
index e03e970048..ce0c8f1286 100755
--- a/uitest/src/main/java/com/vaadin/data/util/sqlcontainer/SQLTestsConstants.java
+++ b/uitest/src/main/java/com/vaadin/data/util/sqlcontainer/SQLTestsConstants.java
@@ -101,8 +101,7 @@ public class SQLTestsConstants {
versionStatements = new String[] {
"create table VERSIONED (\"ID\" serial primary key, \"TEXT\" VARCHAR(255), \"VERSION\" INTEGER DEFAULT 0)",
"CREATE OR REPLACE FUNCTION zz_row_version() RETURNS TRIGGER AS $$"
- + "BEGIN"
- + " IF TG_OP = 'UPDATE'"
+ + "BEGIN" + " IF TG_OP = 'UPDATE'"
+ " AND NEW.\"VERSION\" = old.\"VERSION\""
+ " AND ROW(NEW.*) IS DISTINCT FROM ROW (old.*)"
+ " THEN"
@@ -125,7 +124,8 @@ public class SQLTestsConstants {
dbPwd = "sa";
peopleFirst = "create table PEOPLE (\"ID\" int identity(1,1) primary key, \"NAME\" VARCHAR(32), \"AGE\" INTEGER)";
peopleSecond = null;
- versionStatements = new String[] { "create table VERSIONED (\"ID\" int identity(1,1) primary key, \"TEXT\" VARCHAR(255), \"VERSION\" rowversion not null)" };
+ versionStatements = new String[] {
+ "create table VERSIONED (\"ID\" int identity(1,1) primary key, \"TEXT\" VARCHAR(255), \"VERSION\" rowversion not null)" };
sqlGen = new MSSQLGenerator();
break;
case ORACLE:
diff --git a/uitest/src/main/java/com/vaadin/launcher/ApplicationRunnerServlet.java b/uitest/src/main/java/com/vaadin/launcher/ApplicationRunnerServlet.java
index 34c82ae4ed..4f2100401f 100644
--- a/uitest/src/main/java/com/vaadin/launcher/ApplicationRunnerServlet.java
+++ b/uitest/src/main/java/com/vaadin/launcher/ApplicationRunnerServlet.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -66,8 +66,8 @@ import com.vaadin.util.CurrentInstance;
@SuppressWarnings("serial")
public class ApplicationRunnerServlet extends LegacyVaadinServlet {
- private static class ApplicationRunnerRedirectException extends
- RuntimeException {
+ private static class ApplicationRunnerRedirectException
+ extends RuntimeException {
private final String target;
public ApplicationRunnerRedirectException(String target) {
@@ -205,8 +205,8 @@ public class ApplicationRunnerServlet extends LegacyVaadinServlet {
try {
final Class<?> classToRun = getClassToRun();
if (UI.class.isAssignableFrom(classToRun)) {
- session.addUIProvider(new ApplicationRunnerUIProvider(
- classToRun));
+ session.addUIProvider(
+ new ApplicationRunnerUIProvider(classToRun));
} else if (LegacyApplication.class.isAssignableFrom(classToRun)) {
// Avoid using own UIProvider for legacy Application
} else if (UIProvider.class.isAssignableFrom(classToRun)) {
@@ -220,10 +220,10 @@ public class ApplicationRunnerServlet extends LegacyVaadinServlet {
} catch (final InstantiationException e) {
throw new ServiceException(e);
} catch (final ClassNotFoundException e) {
- throw new ServiceException(
- new InstantiationException(
- "Failed to load application class: "
- + getApplicationRunnerApplicationClassName((VaadinServletRequest) request)));
+ throw new ServiceException(new InstantiationException(
+ "Failed to load application class: "
+ + getApplicationRunnerApplicationClassName(
+ (VaadinServletRequest) request)));
}
}
@@ -232,8 +232,8 @@ public class ApplicationRunnerServlet extends LegacyVaadinServlet {
return getApplicationRunnerURIs(request).applicationClassname;
}
- private final static class ProxyDeploymentConfiguration implements
- InvocationHandler, Serializable {
+ private final static class ProxyDeploymentConfiguration
+ implements InvocationHandler, Serializable {
private final DeploymentConfiguration originalConfiguration;
private ProxyDeploymentConfiguration(
@@ -246,7 +246,8 @@ public class ApplicationRunnerServlet extends LegacyVaadinServlet {
throws Throwable {
if (method.getDeclaringClass() == DeploymentConfiguration.class) {
// Find the configuration instance to delegate to
- DeploymentConfiguration configuration = findDeploymentConfiguration(originalConfiguration);
+ DeploymentConfiguration configuration = findDeploymentConfiguration(
+ originalConfiguration);
return method.invoke(configuration, args);
} else {
@@ -280,7 +281,7 @@ public class ApplicationRunnerServlet extends LegacyVaadinServlet {
/**
* Parses application runner URIs.
- *
+ *
* If request URL is e.g.
* http://localhost:8080/vaadin/run/com.vaadin.demo.Calc then
* <ul>
@@ -288,7 +289,7 @@ public class ApplicationRunnerServlet extends LegacyVaadinServlet {
* <li>Runner servlet=run</li>
* <li>Vaadin application=com.vaadin.demo.Calc</li>
* </ul>
- *
+ *
* @param request
* @return string array containing widgetset URI, application URI and
* context, runner, application classname
@@ -351,8 +352,8 @@ public class ApplicationRunnerServlet extends LegacyVaadinServlet {
String className = file.getPath()
.substring(uitestDir.getPath().length() + 1)
.replace(File.separatorChar, '.');
- className = className.substring(0, className.length()
- - ".java".length());
+ className = className.substring(0,
+ className.length() - ".java".length());
if (isSupportedClass(className)) {
lastModifiedTimestamp = file.lastModified();
lastModifiedClassName = className;
@@ -394,8 +395,8 @@ public class ApplicationRunnerServlet extends LegacyVaadinServlet {
Class<?> appClass = null;
- String baseName = getApplicationRunnerApplicationClassName(request
- .get());
+ String baseName = getApplicationRunnerApplicationClassName(
+ request.get());
try {
appClass = getClass().getClassLoader().loadClass(baseName);
return appClass;
@@ -403,16 +404,16 @@ public class ApplicationRunnerServlet extends LegacyVaadinServlet {
//
for (String pkg : defaultPackages) {
try {
- appClass = getClass().getClassLoader().loadClass(
- pkg + "." + baseName);
+ appClass = getClass().getClassLoader()
+ .loadClass(pkg + "." + baseName);
} catch (ClassNotFoundException ee) {
// Ignore as this is expected for many packages
} catch (Exception e2) {
// TODO: handle exception
- getLogger().log(
- Level.FINE,
+ getLogger().log(Level.FINE,
"Failed to find application class " + pkg + "."
- + baseName, e2);
+ + baseName,
+ e2);
}
if (appClass != null) {
return appClass;
@@ -432,8 +433,8 @@ public class ApplicationRunnerServlet extends LegacyVaadinServlet {
protected DeploymentConfiguration createDeploymentConfiguration(
Properties initParameters) {
// Get the original configuration from the super class
- final DeploymentConfiguration originalConfiguration = super
- .createDeploymentConfiguration(initParameters);
+ final DeploymentConfiguration originalConfiguration = super.createDeploymentConfiguration(
+ initParameters);
// And then create a proxy instance that delegates to the original
// configuration or a customized version
@@ -447,8 +448,8 @@ public class ApplicationRunnerServlet extends LegacyVaadinServlet {
protected VaadinServletService createServletService(
DeploymentConfiguration deploymentConfiguration)
throws ServiceException {
- VaadinServletService service = super
- .createServletService(deploymentConfiguration);
+ VaadinServletService service = super.createServletService(
+ deploymentConfiguration);
final SystemMessagesProvider provider = service
.getSystemMessagesProvider();
service.setSystemMessagesProvider(new SystemMessagesProvider() {
@@ -459,8 +460,8 @@ public class ApplicationRunnerServlet extends LegacyVaadinServlet {
if (systemMessagesInfo.getRequest() == null) {
return provider.getSystemMessages(systemMessagesInfo);
}
- Object messages = systemMessagesInfo.getRequest().getAttribute(
- CUSTOM_SYSTEM_MESSAGES_PROPERTY);
+ Object messages = systemMessagesInfo.getRequest()
+ .getAttribute(CUSTOM_SYSTEM_MESSAGES_PROPERTY);
if (messages instanceof SystemMessages) {
return (SystemMessages) messages;
}
@@ -500,9 +501,9 @@ public class ApplicationRunnerServlet extends LegacyVaadinServlet {
try {
VaadinServletService service = (VaadinServletService) VaadinService
.getCurrent();
- session = service
- .findVaadinSession(new VaadinServletRequest(
- currentRequest, service));
+ session = service.findVaadinSession(
+ new VaadinServletRequest(currentRequest,
+ service));
} finally {
/*
* Clear some state set by findVaadinSession to
@@ -510,8 +511,8 @@ public class ApplicationRunnerServlet extends LegacyVaadinServlet {
* e.g. static request handling.
*/
CurrentInstance.restoreInstances(oldCurrent);
- currentRequest.removeAttribute(VaadinSession.class
- .getName());
+ currentRequest.removeAttribute(
+ VaadinSession.class.getName());
}
}
}
@@ -542,7 +543,8 @@ public class ApplicationRunnerServlet extends LegacyVaadinServlet {
}
CustomDeploymentConfiguration customDeploymentConfiguration = classToRun
- .getAnnotation(CustomDeploymentConfiguration.class);
+ .getAnnotation(
+ CustomDeploymentConfiguration.class);
if (customDeploymentConfiguration != null) {
Properties initParameters = new Properties(
originalConfiguration.getInitParameters());
diff --git a/uitest/src/main/java/com/vaadin/launcher/CustomDeploymentConfiguration.java b/uitest/src/main/java/com/vaadin/launcher/CustomDeploymentConfiguration.java
index da903c13e0..6198c39a66 100644
--- a/uitest/src/main/java/com/vaadin/launcher/CustomDeploymentConfiguration.java
+++ b/uitest/src/main/java/com/vaadin/launcher/CustomDeploymentConfiguration.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/launcher/DevelopmentServerLauncher.java b/uitest/src/main/java/com/vaadin/launcher/DevelopmentServerLauncher.java
index 5861ede412..356ea24193 100644
--- a/uitest/src/main/java/com/vaadin/launcher/DevelopmentServerLauncher.java
+++ b/uitest/src/main/java/com/vaadin/launcher/DevelopmentServerLauncher.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -56,7 +56,7 @@ import com.vaadin.launcher.util.BrowserLauncher;
/**
* Class for running Jetty servlet container within Eclipse project.
- *
+ *
*/
public class DevelopmentServerLauncher {
@@ -65,10 +65,10 @@ public class DevelopmentServerLauncher {
/**
* Main function for running Jetty.
- *
+ *
* Command line Arguments are passed through to Jetty, see runServer method
* for options.
- *
+ *
* @param args
* @throws Exception
*/
@@ -131,7 +131,7 @@ public class DevelopmentServerLauncher {
/**
* Run the server with specified arguments.
- *
+ *
* @param serverArgs
* @return
* @throws Exception
@@ -154,14 +154,10 @@ public class DevelopmentServerLauncher {
}
// Add help for System.out
- System.out
- .println("-------------------------------------------------\n"
- + "Starting Vaadin in "
- + mode
- + ".\n"
- + "Running in http://localhost:"
- + port
- + "\n-------------------------------------------------\n");
+ System.out.println("-------------------------------------------------\n"
+ + "Starting Vaadin in " + mode + ".\n"
+ + "Running in http://localhost:" + port
+ + "\n-------------------------------------------------\n");
final Server server = new Server();
@@ -240,8 +236,8 @@ public class DevelopmentServerLauncher {
}
}
if (!classFolders.isEmpty()) {
- System.out
- .println("Enabling context auto-reload.\n Scan interval: "
+ System.out.println(
+ "Enabling context auto-reload.\n Scan interval: "
+ interval + " secs.\n Scanned folders: ");
for (File f : classFolders) {
System.out.println(" " + f.getAbsolutePath());
@@ -284,16 +280,16 @@ public class DevelopmentServerLauncher {
server.start();
if (serverArgs.containsKey("shutdownPort")) {
- int shutdownPort = Integer.parseInt(serverArgs
- .get("shutdownPort"));
- final ServerSocket serverSocket = new ServerSocket(
- shutdownPort, 1, InetAddress.getByName("127.0.0.1"));
+ int shutdownPort = Integer
+ .parseInt(serverArgs.get("shutdownPort"));
+ final ServerSocket serverSocket = new ServerSocket(shutdownPort,
+ 1, InetAddress.getByName("127.0.0.1"));
new Thread() {
@Override
public void run() {
try {
- System.out
- .println("Waiting for shutdown signal on port "
+ System.out.println(
+ "Waiting for shutdown signal on port "
+ serverSocket.getLocalPort());
// Start waiting for a close signal
Socket accept = serverSocket.accept();
@@ -308,8 +304,8 @@ public class DevelopmentServerLauncher {
try {
Thread.sleep(5000);
if (!server.isStopped()) {
- System.out
- .println("Jetty still running. Closing JVM.");
+ System.out.println(
+ "Jetty still running. Closing JVM.");
dumpThreadStacks();
System.exit(-1);
}
@@ -353,7 +349,7 @@ public class DevelopmentServerLauncher {
/**
* Assign default value for given key.
- *
+ *
* @param map
* @param key
* @param value
@@ -367,9 +363,9 @@ public class DevelopmentServerLauncher {
/**
* Parse all command line arguments into a map.
- *
+ *
* Arguments format "key=value" are put into map.
- *
+ *
* @param args
* @return map of arguments key value pairs.
*/
@@ -442,8 +438,8 @@ public class DevelopmentServerLauncher {
FilterChain chain) throws IOException, ServletException {
String path = ((HttpServletRequest) request).getPathInfo();
- System.out.println("Caching " + path + " for " + CACHE_MINUTES
- + " minutes");
+ System.out.println(
+ "Caching " + path + " for " + CACHE_MINUTES + " minutes");
Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.MINUTE, CACHE_MINUTES);
diff --git a/uitest/src/main/java/com/vaadin/launcher/util/BrowserLauncher.java b/uitest/src/main/java/com/vaadin/launcher/util/BrowserLauncher.java
index 04c6a46e64..0821070ab7 100644
--- a/uitest/src/main/java/com/vaadin/launcher/util/BrowserLauncher.java
+++ b/uitest/src/main/java/com/vaadin/launcher/util/BrowserLauncher.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,13 +25,13 @@ import java.io.InputStreamReader;
/**
* This class opens default browser for DemoLauncher class. Default browser is
* detected by the operating system.
- *
+ *
*/
public class BrowserLauncher {
/**
* Open browser on specified URL.
- *
+ *
* @param url
*/
public static void openBrowser(String url) {
diff --git a/uitest/src/main/java/com/vaadin/screenshotbrowser/ScreenshotBrowser.java b/uitest/src/main/java/com/vaadin/screenshotbrowser/ScreenshotBrowser.java
index a3fc282131..98312dd609 100644
--- a/uitest/src/main/java/com/vaadin/screenshotbrowser/ScreenshotBrowser.java
+++ b/uitest/src/main/java/com/vaadin/screenshotbrowser/ScreenshotBrowser.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -121,7 +121,8 @@ public class ScreenshotBrowser extends UI {
return new File(screenshotDir, "reference");
}
- private static File getAlternative(File baseFile, int alternativeNumber) {
+ private static File getAlternative(File baseFile,
+ int alternativeNumber) {
assert alternativeNumber >= 1;
String alternativeName = baseFile.getName().replaceFirst("\\.png",
"_" + alternativeNumber + ".png");
@@ -198,18 +199,18 @@ public class ScreenshotBrowser extends UI {
left.setSpacing(true);
left.setSizeFull();
- left.addComponent(createActionButton("Accept changes", 'j',
- Action.ACCEPT));
- left.addComponent(createActionButton("Ignore changes", 'k',
- Action.IGNORE));
+ left.addComponent(
+ createActionButton("Accept changes", 'j', Action.ACCEPT));
+ left.addComponent(
+ createActionButton("Ignore changes", 'k', Action.IGNORE));
left.addComponent(createActionButton("Use as alternative", 'l',
Action.ALTERNATIVE));
- left.addComponent(new Button("Clear action",
- createSetActionListener(null)));
+ left.addComponent(
+ new Button("Clear action", createSetActionListener(null)));
left.addComponent(createSpacer());
- left.addComponent(new Button("Commit actions",
- new Button.ClickListener() {
+ left.addComponent(
+ new Button("Commit actions", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
commitActions();
@@ -241,8 +242,9 @@ public class ScreenshotBrowser extends UI {
private Button createActionButton(String caption, char shortcut,
Action action) {
- Button button = new Button(caption + " <strong>" + shortcut
- + "</strong>", createSetActionListener(action));
+ Button button = new Button(
+ caption + " <strong>" + shortcut + "</strong>",
+ createSetActionListener(action));
button.setCaptionAsHtml(true);
return button;
}
@@ -300,12 +302,12 @@ public class ScreenshotBrowser extends UI {
}
});
- table.addShortcutListener(createShortcutListener(KeyCode.J,
- Action.ACCEPT));
- table.addShortcutListener(createShortcutListener(KeyCode.K,
- Action.IGNORE));
- table.addShortcutListener(createShortcutListener(KeyCode.L,
- Action.ALTERNATIVE));
+ table.addShortcutListener(
+ createShortcutListener(KeyCode.J, Action.ACCEPT));
+ table.addShortcutListener(
+ createShortcutListener(KeyCode.K, Action.IGNORE));
+ table.addShortcutListener(
+ createShortcutListener(KeyCode.L, Action.ALTERNATIVE));
refreshTableContainer();
@@ -320,7 +322,8 @@ public class ScreenshotBrowser extends UI {
}
private void commitActions() {
- for (ComparisonFailure comparisonFailure : getContainer().getItemIds()) {
+ for (ComparisonFailure comparisonFailure : getContainer()
+ .getItemIds()) {
Action action = comparisonFailure.getAction();
if (action != null) {
action.commit(comparisonFailure.getFile());
@@ -400,8 +403,8 @@ public class ScreenshotBrowser extends UI {
File propertiesFile = new File(
"../work/eclipse-run-selected-test.properties");
if (!propertiesFile.exists()) {
- throw new RuntimeException("File "
- + propertiesFile.getAbsolutePath() + " not found.");
+ throw new RuntimeException(
+ "File " + propertiesFile.getAbsolutePath() + " not found.");
}
FileInputStream in = null;
@@ -412,7 +415,8 @@ public class ScreenshotBrowser extends UI {
properties.load(in);
String screenShotDirName = properties
.getProperty("com.vaadin.testbench.screenshot.directory");
- if (screenShotDirName == null || screenShotDirName.startsWith("<")) {
+ if (screenShotDirName == null
+ || screenShotDirName.startsWith("<")) {
throw new RuntimeException(
"com.vaadin.testbench.screenshot.directory has not been configred in "
+ propertiesFile.getAbsolutePath());
diff --git a/uitest/src/main/java/com/vaadin/tests/Components.java b/uitest/src/main/java/com/vaadin/tests/Components.java
index 7f024e774a..10c204135f 100644
--- a/uitest/src/main/java/com/vaadin/tests/Components.java
+++ b/uitest/src/main/java/com/vaadin/tests/Components.java
@@ -93,10 +93,9 @@ public class Components extends LegacyApplication {
sp = new HorizontalSplitPanel();
sp.setSizeFull();
VerticalLayout naviLayout = new VerticalLayout();
- naviLayout
- .addComponent(new Label(
- "Click to open a test case.<br/>Right click to open test in a new window<br/><br/>",
- ContentMode.HTML));
+ naviLayout.addComponent(new Label(
+ "Click to open a test case.<br/>Right click to open test in a new window<br/><br/>",
+ ContentMode.HTML));
naviLayout.addComponent(createMenu());
naviLayout.addComponent(createMissingTestsList());
@@ -104,10 +103,9 @@ public class Components extends LegacyApplication {
sp.setSplitPosition(250, Sizeable.UNITS_PIXELS);
VerticalLayout embeddingLayout = new VerticalLayout();
embeddingLayout.setSizeFull();
- embeddingLayout
- .addComponent(new Label(
- "<b>Do not use the embedded version for creating automated tests. Open the test in a new window before recording.</b><br/>",
- ContentMode.HTML));
+ embeddingLayout.addComponent(new Label(
+ "<b>Do not use the embedded version for creating automated tests. Open the test in a new window before recording.</b><br/>",
+ ContentMode.HTML));
applicationEmbedder.setSizeFull();
embeddingLayout.addComponent(applicationEmbedder);
embeddingLayout.setExpandRatio(applicationEmbedder, 1);
@@ -129,8 +127,9 @@ public class Components extends LegacyApplication {
missingTests += "<font class=\"" + cls + "\">"
+ component.getSimpleName() + "</font><br/>";
}
- return new Label("<b>Components without a test:</B><br/>"
- + missingTests, ContentMode.HTML);
+ return new Label(
+ "<b>Components without a test:</B><br/>" + missingTests,
+ ContentMode.HTML);
}
private Component createMenu() {
diff --git a/uitest/src/main/java/com/vaadin/tests/CurrentTimeMillis.java b/uitest/src/main/java/com/vaadin/tests/CurrentTimeMillis.java
index 0937c53864..f1e049405e 100644
--- a/uitest/src/main/java/com/vaadin/tests/CurrentTimeMillis.java
+++ b/uitest/src/main/java/com/vaadin/tests/CurrentTimeMillis.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import com.vaadin.tests.components.AbstractTestUI;
/**
* Test UI (empty) to check high resolution time availability in browser.
- *
+ *
* @author Vaadin Ltd
*/
public class CurrentTimeMillis extends AbstractTestUI {
diff --git a/uitest/src/main/java/com/vaadin/tests/CustomLayoutDemo.java b/uitest/src/main/java/com/vaadin/tests/CustomLayoutDemo.java
index 7b9f3d9926..c0c3399367 100644
--- a/uitest/src/main/java/com/vaadin/tests/CustomLayoutDemo.java
+++ b/uitest/src/main/java/com/vaadin/tests/CustomLayoutDemo.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -39,10 +39,10 @@ import com.vaadin.ui.VerticalLayout;
* page (themes/example/layout/custom.html) and source code below. Body panel
* contents are changed when menu items are clicked. Contents are HTML pages
* located at themes/example/layout directory.
- *
+ *
* @author Vaadin Ltd.
* @since 4.0.0
- *
+ *
*/
public class CustomLayoutDemo extends com.vaadin.server.LegacyApplication
implements Listener {
@@ -113,15 +113,15 @@ public class CustomLayoutDemo extends com.vaadin.server.LegacyApplication
setBody("Welcome");
// Add heading label and custom layout panel to main window
- mainWindow.addComponent(new Label("<h3>Custom layout demo</h3>",
- ContentMode.HTML));
+ mainWindow.addComponent(
+ new Label("<h3>Custom layout demo</h3>", ContentMode.HTML));
mainWindow.addComponent(customLayoutPanel);
}
/**
* Login button clicked. Hide login components and replace username
* component with "Welcome user Username" message.
- *
+ *
*/
public void loginClicked() {
username.setVisible(false);
@@ -129,14 +129,15 @@ public class CustomLayoutDemo extends com.vaadin.server.LegacyApplication
if (username.getValue().toString().length() < 1) {
username.setValue("Anonymous");
}
- mainLayout.replaceComponent(loginButton, new Label("Welcome user <em>"
- + username.getValue() + "</em>", ContentMode.HTML));
+ mainLayout.replaceComponent(loginButton,
+ new Label("Welcome user <em>" + username.getValue() + "</em>",
+ ContentMode.HTML));
}
/**
* Set body panel caption, remove all existing components and add given
* custom layout in it.
- *
+ *
*/
public void setBody(String customLayout) {
VerticalLayout bodyLayout = new VerticalLayout();
diff --git a/uitest/src/main/java/com/vaadin/tests/FocusingComponents.java b/uitest/src/main/java/com/vaadin/tests/FocusingComponents.java
index f63989fafb..a092a065b4 100644
--- a/uitest/src/main/java/com/vaadin/tests/FocusingComponents.java
+++ b/uitest/src/main/java/com/vaadin/tests/FocusingComponents.java
@@ -14,7 +14,7 @@ import com.vaadin.ui.TextField;
/**
* Simple test helper to test Focusable.focus() method.
- *
+ *
*/
public class FocusingComponents extends CustomComponent {
GridLayout lo = new GridLayout(2, 1);
diff --git a/uitest/src/main/java/com/vaadin/tests/LayoutDemo.java b/uitest/src/main/java/com/vaadin/tests/LayoutDemo.java
index c62a9ea51b..15dc7c3b79 100644
--- a/uitest/src/main/java/com/vaadin/tests/LayoutDemo.java
+++ b/uitest/src/main/java/com/vaadin/tests/LayoutDemo.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,10 +32,10 @@ import com.vaadin.ui.VerticalLayout;
/**
* This example demonstrates layouts. Layouts are populated with sample Vaadin
* UI components.
- *
+ *
* @author Vaadin Ltd.
* @since 4.0.0
- *
+ *
*/
public class LayoutDemo extends com.vaadin.server.LegacyApplication {
@@ -87,7 +87,8 @@ public class LayoutDemo extends com.vaadin.server.LegacyApplication {
// Create TabSheet
//
final TabSheet tabsheet = new TabSheet();
- tabsheet.setCaption("Tabsheet, above layouts are added to this component");
+ tabsheet.setCaption(
+ "Tabsheet, above layouts are added to this component");
tabsheet.addTab(layoutA, "Horizontal ordered layout", null);
tabsheet.addTab(layoutB, "Vertical ordered layout", null);
tabsheet.addTab(layoutG, "First grid layout", null);
@@ -108,13 +109,15 @@ public class LayoutDemo extends com.vaadin.server.LegacyApplication {
"<br /><h3>Grid Layout (4 x 4)</h3>Added 16 components.",
ContentMode.HTML));
mainWindow.addComponent(layoutG);
- mainWindow.addComponent(new Label("<br /><h3>Grid Layout (4 x 4)</h3>"
- + "Added four panels and four embedded components "
- + "diagonally with absolute coordinates.", ContentMode.HTML));
- mainWindow.addComponent(layoutG2);
mainWindow.addComponent(new Label(
- "<br /><h3>TabSheet</h3>Added above layouts as tabs.",
+ "<br /><h3>Grid Layout (4 x 4)</h3>"
+ + "Added four panels and four embedded components "
+ + "diagonally with absolute coordinates.",
ContentMode.HTML));
+ mainWindow.addComponent(layoutG2);
+ mainWindow.addComponent(
+ new Label("<br /><h3>TabSheet</h3>Added above layouts as tabs.",
+ ContentMode.HTML));
mainWindow.addComponent(tabsheet);
}
@@ -144,7 +147,7 @@ public class LayoutDemo extends com.vaadin.server.LegacyApplication {
/**
* Add multiple demo component to given layout.
- *
+ *
* @param layout
* where components are added
* @param numberOfComponents
diff --git a/uitest/src/main/java/com/vaadin/tests/ListenerOrder.java b/uitest/src/main/java/com/vaadin/tests/ListenerOrder.java
index 8375b75f4b..b24ba1e99c 100644
--- a/uitest/src/main/java/com/vaadin/tests/ListenerOrder.java
+++ b/uitest/src/main/java/com/vaadin/tests/ListenerOrder.java
@@ -89,7 +89,8 @@ public class ListenerOrder extends com.vaadin.server.LegacyApplication
s1.addListener((ValueChangeListener) this);
Item i = s1.getItem("second");
- for (Iterator<?> it = i.getItemPropertyIds().iterator(); it.hasNext();) {
+ for (Iterator<?> it = i.getItemPropertyIds().iterator(); it
+ .hasNext();) {
Object o = it.next();
System.out.println("[" + o + "]");
}
diff --git a/uitest/src/main/java/com/vaadin/tests/ModalWindow.java b/uitest/src/main/java/com/vaadin/tests/ModalWindow.java
index 559fc5ca0e..08e85a3c11 100644
--- a/uitest/src/main/java/com/vaadin/tests/ModalWindow.java
+++ b/uitest/src/main/java/com/vaadin/tests/ModalWindow.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,15 +28,15 @@ import com.vaadin.ui.Window;
/**
* Simple program that demonstrates "modal windows" that block all access other
* windows.
- *
+ *
* @author Vaadin Ltd.
* @since 4.0.1
* @see com.vaadin.server.VaadinSession
* @see com.vaadin.ui.Window
* @see com.vaadin.ui.Label
*/
-public class ModalWindow extends com.vaadin.server.LegacyApplication implements
- ClickListener {
+public class ModalWindow extends com.vaadin.server.LegacyApplication
+ implements ClickListener {
private Window test;
private Button reopen;
diff --git a/uitest/src/main/java/com/vaadin/tests/NativeWindowing.java b/uitest/src/main/java/com/vaadin/tests/NativeWindowing.java
index b646655c35..3276fb5f9f 100644
--- a/uitest/src/main/java/com/vaadin/tests/NativeWindowing.java
+++ b/uitest/src/main/java/com/vaadin/tests/NativeWindowing.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -37,14 +37,14 @@ public class NativeWindowing extends LegacyApplication {
setMainWindow(main);
- main.addComponent(new Button("Add new subwindow",
- new Button.ClickListener() {
+ main.addComponent(
+ new Button("Add new subwindow", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
VerticalLayout layout = new VerticalLayout();
layout.setMargin(true);
- final Window w = new Window("sw "
- + System.currentTimeMillis(), layout);
+ final Window w = new Window(
+ "sw " + System.currentTimeMillis(), layout);
main.addWindow(w);
w.setPositionX(100);
w.setPositionY(100);
@@ -54,14 +54,15 @@ public class NativeWindowing extends LegacyApplication {
w.setWidth("100px");
w.setHeight("400px");
- final Button closebutton = new Button("Close "
- + w.getCaption(), new Button.ClickListener() {
- @Override
- public void buttonClick(ClickEvent event) {
- main.removeWindow(w);
- }
+ final Button closebutton = new Button(
+ "Close " + w.getCaption(),
+ new Button.ClickListener() {
+ @Override
+ public void buttonClick(ClickEvent event) {
+ main.removeWindow(w);
+ }
- });
+ });
layout.addComponent(closebutton);
layout.addComponent(new Label(
@@ -98,13 +99,12 @@ public class NativeWindowing extends LegacyApplication {
@Override
public void buttonClick(ClickEvent event) {
try {
- main.open(
- new com.vaadin.server.ExternalResource(
- new URL(
- getURL(),
- "mainwin-"
- + System.currentTimeMillis()
- + "/")), null);
+ main.open(new com.vaadin.server.ExternalResource(
+ new URL(getURL(),
+ "mainwin-"
+ + System.currentTimeMillis()
+ + "/")),
+ null);
} catch (final MalformedURLException e) {
}
}
@@ -134,8 +134,8 @@ public class NativeWindowing extends LegacyApplication {
@Override
public void buttonClick(ClickEvent event) {
- ww.addComponent(new Label("Button clicked " + (++state)
- + " times"));
+ ww.addComponent(new Label(
+ "Button clicked " + (++state) + " times"));
}
}));
addWindow(ww);
diff --git a/uitest/src/main/java/com/vaadin/tests/OrderedLayoutSwapComponents.java b/uitest/src/main/java/com/vaadin/tests/OrderedLayoutSwapComponents.java
index 1474afe28c..8c6bcfe20e 100644
--- a/uitest/src/main/java/com/vaadin/tests/OrderedLayoutSwapComponents.java
+++ b/uitest/src/main/java/com/vaadin/tests/OrderedLayoutSwapComponents.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,10 +27,10 @@ import com.vaadin.ui.Label;
import com.vaadin.ui.VerticalLayout;
/**
- *
+ *
* This Component contains some simple test to see that component updates its
* contents propertly.
- *
+ *
* @author Vaadin Ltd.
*/
public class OrderedLayoutSwapComponents extends CustomComponent {
diff --git a/uitest/src/main/java/com/vaadin/tests/Parameters.java b/uitest/src/main/java/com/vaadin/tests/Parameters.java
index 7e71c4dc76..5245fdfc44 100644
--- a/uitest/src/main/java/com/vaadin/tests/Parameters.java
+++ b/uitest/src/main/java/com/vaadin/tests/Parameters.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -37,11 +37,11 @@ import com.vaadin.ui.VerticalLayout;
* This is a demonstration of how URL parameters can be recieved and handled.
* Parameters and URL:s can be received trough the windows by registering
* URIHandler and ParameterHandler classes window.
- *
+ *
* @since 3.1.1
*/
-public class Parameters extends com.vaadin.server.LegacyApplication implements
- RequestHandler {
+public class Parameters extends com.vaadin.server.LegacyApplication
+ implements RequestHandler {
private final Label context = new Label();
@@ -65,14 +65,14 @@ public class Parameters extends com.vaadin.server.LegacyApplication implements
try {
final URL u1 = new URL(getURL(), "test/uri?test=1&test=2");
final URL u2 = new URL(getURL(), "foo/bar?mary=john&count=3");
- layout.addComponent(new Link(u1.toString(),
- new ExternalResource(u1)));
+ layout.addComponent(
+ new Link(u1.toString(), new ExternalResource(u1)));
layout.addComponent(new Label("Or this: "));
- layout.addComponent(new Link(u2.toString(),
- new ExternalResource(u2)));
+ layout.addComponent(
+ new Link(u2.toString(), new ExternalResource(u2)));
} catch (final Exception e) {
- System.out.println("Couldn't get hostname for this machine: "
- + e.toString());
+ System.out.println(
+ "Couldn't get hostname for this machine: " + e.toString());
e.printStackTrace();
}
diff --git a/uitest/src/main/java/com/vaadin/tests/PerformanceTestBasicComponentRendering.java b/uitest/src/main/java/com/vaadin/tests/PerformanceTestBasicComponentRendering.java
index c58c73753f..5869494ac7 100644
--- a/uitest/src/main/java/com/vaadin/tests/PerformanceTestBasicComponentRendering.java
+++ b/uitest/src/main/java/com/vaadin/tests/PerformanceTestBasicComponentRendering.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/PerformanceTestLabelsAndOrderedLayouts.java b/uitest/src/main/java/com/vaadin/tests/PerformanceTestLabelsAndOrderedLayouts.java
index 08f8bc4d7a..ef5b459af7 100644
--- a/uitest/src/main/java/com/vaadin/tests/PerformanceTestLabelsAndOrderedLayouts.java
+++ b/uitest/src/main/java/com/vaadin/tests/PerformanceTestLabelsAndOrderedLayouts.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -48,8 +48,8 @@ public class PerformanceTestLabelsAndOrderedLayouts extends CustomComponent {
result = new Label();
main.addComponent(result);
- main.addComponent(new Button("click when rendered",
- new ClickListener() {
+ main.addComponent(
+ new Button("click when rendered", new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
@@ -57,14 +57,14 @@ public class PerformanceTestLabelsAndOrderedLayouts extends CustomComponent {
}
}));
- main.addComponent(new Button(
- "Click for layout repaint (cached components)",
- new ClickListener() {
- @Override
- public void buttonClick(ClickEvent event) {
- testContainer.markAsDirty();
- }
- }));
+ main.addComponent(
+ new Button("Click for layout repaint (cached components)",
+ new ClickListener() {
+ @Override
+ public void buttonClick(ClickEvent event) {
+ testContainer.markAsDirty();
+ }
+ }));
testContainer = new VerticalLayout();
diff --git a/uitest/src/main/java/com/vaadin/tests/PerformanceTestSubTreeCaching.java b/uitest/src/main/java/com/vaadin/tests/PerformanceTestSubTreeCaching.java
index a6f112cff0..adb714c4cb 100644
--- a/uitest/src/main/java/com/vaadin/tests/PerformanceTestSubTreeCaching.java
+++ b/uitest/src/main/java/com/vaadin/tests/PerformanceTestSubTreeCaching.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -56,7 +56,8 @@ public class PerformanceTestSubTreeCaching extends CustomComponent {
startTest();
}
});
- b.setDescription("Push this button to start test. A test label will be rendered above existing components.");
+ b.setDescription(
+ "Push this button to start test. A test label will be rendered above existing components.");
main.addComponent(b);
b = new Button("end test", new Button.ClickListener() {
@Override
@@ -64,7 +65,8 @@ public class PerformanceTestSubTreeCaching extends CustomComponent {
endTest();
}
});
- b.setDescription("Push this button as soon as test componenet is rendered.");
+ b.setDescription(
+ "Push this button as soon as test componenet is rendered.");
main.addComponent(b);
result = new Label();
@@ -88,7 +90,7 @@ public class PerformanceTestSubTreeCaching extends CustomComponent {
/**
* Adds n Table components to given container
- *
+ *
* @param testContainer2
*/
private void populateContainer(VerticalLayout container, int n) {
diff --git a/uitest/src/main/java/com/vaadin/tests/RandomLayoutStress.java b/uitest/src/main/java/com/vaadin/tests/RandomLayoutStress.java
index e9f04a4c85..1ac7620d5b 100644
--- a/uitest/src/main/java/com/vaadin/tests/RandomLayoutStress.java
+++ b/uitest/src/main/java/com/vaadin/tests/RandomLayoutStress.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -38,9 +38,9 @@ import com.vaadin.ui.VerticalLayout;
/**
* This example demonstrates layouts. Layouts are populated with sample Vaadin
* UI components.
- *
+ *
* @author Vaadin Ltd.
- *
+ *
*/
public class RandomLayoutStress extends com.vaadin.server.LegacyApplication {
@@ -99,7 +99,8 @@ public class RandomLayoutStress extends com.vaadin.server.LegacyApplication {
// Create TabSheet
final TabSheet tabsheet = new TabSheet();
- tabsheet.setCaption("Tabsheet, above layouts are added to this component");
+ tabsheet.setCaption(
+ "Tabsheet, above layouts are added to this component");
layoutA = new HorizontalLayout();
// Add 4 random components
fillLayout(layoutA, componentCountA);
@@ -161,7 +162,8 @@ public class RandomLayoutStress extends com.vaadin.server.LegacyApplication {
break;
case 4:
// Link
- result = new Link("", new ExternalResource("http://www.vaadin.com"));
+ result = new Link("",
+ new ExternalResource("http://www.vaadin.com"));
result.setCaption("Link component " + caption);
break;
case 5:
@@ -170,12 +172,11 @@ public class RandomLayoutStress extends com.vaadin.server.LegacyApplication {
panelLayout.setMargin(true);
result = new Panel(panelLayout);
result.setCaption("Panel component " + caption);
- panelLayout
- .addComponent(new Label(
- "Panel is a container for other components, by default it draws a frame around it's "
- + "extremities and may have a caption to clarify the nature of the contained components' purpose."
- + " Panel contains an layout where the actual contained components are added, "
- + "this layout may be switched on the fly."));
+ panelLayout.addComponent(new Label(
+ "Panel is a container for other components, by default it draws a frame around it's "
+ + "extremities and may have a caption to clarify the nature of the contained components' purpose."
+ + " Panel contains an layout where the actual contained components are added, "
+ + "this layout may be switched on the fly."));
((Panel) result).setWidth("250px");
break;
case 6:
@@ -198,7 +199,7 @@ public class RandomLayoutStress extends com.vaadin.server.LegacyApplication {
/**
* Add demo components to given layout
- *
+ *
* @param layout
*/
private void fillLayout(Layout layout, int numberOfComponents) {
diff --git a/uitest/src/main/java/com/vaadin/tests/StressComponentsInTable.java b/uitest/src/main/java/com/vaadin/tests/StressComponentsInTable.java
index 84c9d70299..93577563e9 100644
--- a/uitest/src/main/java/com/vaadin/tests/StressComponentsInTable.java
+++ b/uitest/src/main/java/com/vaadin/tests/StressComponentsInTable.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -76,10 +76,10 @@ public class StressComponentsInTable extends CustomComponent {
"Charles", "Aaron", "Lucas", "Luis", "Owen", "Landon", "Diego",
"Brian", "Adam", "Adrian", "Kyle", "Eric", "Ian", "Nathaniel",
"Carlos", "Alex", "Bryan", "Jesus", "Julian", "Sean", "Carter",
- "Hayden", "Jeremiah", "Cole", "Brayden", "Wyatt", "Chase",
- "Steven", "Timothy", "Dominic", "Sebastian", "Xavier", "Jaden",
- "Jesse", "Devin", "Seth", "Antonio", "Richard", "Miguel", "Colin",
- "Cody", "Alejandro", "Caden", "Blake", "Carson" };
+ "Hayden", "Jeremiah", "Cole", "Brayden", "Wyatt", "Chase", "Steven",
+ "Timothy", "Dominic", "Sebastian", "Xavier", "Jaden", "Jesse",
+ "Devin", "Seth", "Antonio", "Richard", "Miguel", "Colin", "Cody",
+ "Alejandro", "Caden", "Blake", "Carson" };
public static String rndString() {
return testString[(int) (Math.random() * testString.length)];
diff --git a/uitest/src/main/java/com/vaadin/tests/TableChangingDatasource.java b/uitest/src/main/java/com/vaadin/tests/TableChangingDatasource.java
index 162c850fb5..97327f58ec 100644
--- a/uitest/src/main/java/com/vaadin/tests/TableChangingDatasource.java
+++ b/uitest/src/main/java/com/vaadin/tests/TableChangingDatasource.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,8 +24,8 @@ import com.vaadin.ui.Label;
import com.vaadin.ui.Table;
import com.vaadin.ui.VerticalLayout;
-public class TableChangingDatasource extends CustomComponent implements
- ClickListener {
+public class TableChangingDatasource extends CustomComponent
+ implements ClickListener {
Table t;
Table[] ta = new Table[4];
private int mode = 0;
@@ -33,22 +33,22 @@ public class TableChangingDatasource extends CustomComponent implements
public TableChangingDatasource() {
final VerticalLayout main = new VerticalLayout();
- main.addComponent(new Label(
- "Table should look sane after data source changes"));
+ main.addComponent(
+ new Label("Table should look sane after data source changes"));
t = new Table();
t.setWidth("500px");
t.setHeight("300px");
- ta[0] = TestForTablesInitialColumnWidthLogicRendering
- .getTestTable(3, 0);
- ta[1] = TestForTablesInitialColumnWidthLogicRendering
- .getTestTable(3, 7);
- ta[2] = TestForTablesInitialColumnWidthLogicRendering
- .getTestTable(3, 5);
- ta[3] = TestForTablesInitialColumnWidthLogicRendering
- .getTestTable(3, 1);
+ ta[0] = TestForTablesInitialColumnWidthLogicRendering.getTestTable(3,
+ 0);
+ ta[1] = TestForTablesInitialColumnWidthLogicRendering.getTestTable(3,
+ 7);
+ ta[2] = TestForTablesInitialColumnWidthLogicRendering.getTestTable(3,
+ 5);
+ ta[3] = TestForTablesInitialColumnWidthLogicRendering.getTestTable(3,
+ 1);
main.addComponent(t);
main.addComponent(new Button("switch DS", this));
diff --git a/uitest/src/main/java/com/vaadin/tests/TableSelectTest.java b/uitest/src/main/java/com/vaadin/tests/TableSelectTest.java
index 61c93d0eae..d4feea0d67 100644
--- a/uitest/src/main/java/com/vaadin/tests/TableSelectTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/TableSelectTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,8 +22,8 @@ import com.vaadin.ui.Label;
import com.vaadin.ui.Table;
import com.vaadin.ui.VerticalLayout;
-public class TableSelectTest extends CustomComponent implements
- Table.ValueChangeListener {
+public class TableSelectTest extends CustomComponent
+ implements Table.ValueChangeListener {
public TableSelectTest() {
final VerticalLayout main = new VerticalLayout();
diff --git a/uitest/src/main/java/com/vaadin/tests/TestBench.java b/uitest/src/main/java/com/vaadin/tests/TestBench.java
index bd01fa2087..4543538d7a 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestBench.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestBench.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -45,14 +45,14 @@ import com.vaadin.ui.VerticalLayout;
* TestBench finds out testable classes within given java packages and adds them
* to menu from where they can be executed. Class is considered testable if it
* is of class Application or CustomComponent.
- *
+ *
* Note: edit TestBench.testablePackages array
- *
+ *
* @author Vaadin Ltd.
- *
+ *
*/
-public class TestBench extends com.vaadin.server.LegacyApplication implements
- Property.ValueChangeListener {
+public class TestBench extends com.vaadin.server.LegacyApplication
+ implements Property.ValueChangeListener {
// Add here packages which are used for finding testable classes
String[] testablePackages = { "com.vaadin.tests",
@@ -79,9 +79,10 @@ public class TestBench extends com.vaadin.server.LegacyApplication implements
for (int p = 0; p < testablePackages.length; p++) {
testables.addItem(testablePackages[p]);
try {
- final List<Class<?>> testableClasses = getTestableClassesForPackage(testablePackages[p]);
- for (final Iterator<Class<?>> it = testableClasses.iterator(); it
- .hasNext();) {
+ final List<Class<?>> testableClasses = getTestableClassesForPackage(
+ testablePackages[p]);
+ for (final Iterator<Class<?>> it = testableClasses
+ .iterator(); it.hasNext();) {
final Class<?> t = it.next();
// ignore TestBench itself
if (t.equals(TestBench.class)) {
@@ -116,12 +117,13 @@ public class TestBench extends com.vaadin.server.LegacyApplication implements
.hasNext();) {
final Class<?> testable = i.next();
// simplify captions
- final String name = testable.getName().substring(
- testable.getName().lastIndexOf('.') + 1);
+ final String name = testable.getName()
+ .substring(testable.getName().lastIndexOf('.') + 1);
menu.setItemCaption(testable, name);
}
// expand all root items
- for (final Iterator<?> i = menu.rootItemIds().iterator(); i.hasNext();) {
+ for (final Iterator<?> i = menu.rootItemIds().iterator(); i
+ .hasNext();) {
menu.expandItemsRecursively(i.next());
}
@@ -189,8 +191,8 @@ public class TestBench extends com.vaadin.server.LegacyApplication implements
if (next instanceof Class) {
Class<?> c = (Class<?>) next;
String string = c.getSimpleName();
- if (string.toLowerCase().contains(
- fragment.toLowerCase())) {
+ if (string.toLowerCase()
+ .contains(fragment.toLowerCase())) {
menu.setValue(c);
mainLayout.setSplitPosition(0);
return;
@@ -269,13 +271,13 @@ public class TestBench extends com.vaadin.server.LegacyApplication implements
/**
* Return all testable classes within given package. Class is considered
* testable if it's superclass is Application or CustomComponent.
- *
+ *
* @param packageName
* @return
* @throws ClassNotFoundException
*/
- public static List<Class<?>> getTestableClassesForPackage(String packageName)
- throws Exception {
+ public static List<Class<?>> getTestableClassesForPackage(
+ String packageName) throws Exception {
final ArrayList<File> directories = new ArrayList<File>();
try {
final ClassLoader cld = Thread.currentThread()
@@ -291,8 +293,8 @@ public class TestBench extends com.vaadin.server.LegacyApplication implements
directories.add(new File(url.getFile()));
}
} catch (final Exception x) {
- throw new Exception(packageName
- + " does not appear to be a valid package.");
+ throw new Exception(
+ packageName + " does not appear to be a valid package.");
}
final ArrayList<Class<?>> classes = new ArrayList<Class<?>>();
@@ -310,11 +312,11 @@ public class TestBench extends com.vaadin.server.LegacyApplication implements
+ files[j].substring(0, files[j].length() - 6);
final Class<?> c = Class.forName(p);
if (c.getSuperclass() != null) {
- if ((c.getSuperclass()
- .equals(com.vaadin.server.VaadinSession.class))) {
+ if ((c.getSuperclass().equals(
+ com.vaadin.server.VaadinSession.class))) {
classes.add(c);
- } else if ((c.getSuperclass()
- .equals(com.vaadin.ui.CustomComponent.class))) {
+ } else if ((c.getSuperclass().equals(
+ com.vaadin.ui.CustomComponent.class))) {
classes.add(c);
}
}
@@ -329,9 +331,9 @@ public class TestBench extends com.vaadin.server.LegacyApplication implements
}
}
} else {
- throw new ClassNotFoundException(packageName + " ("
- + directory.getPath()
- + ") does not appear to be a valid package");
+ throw new ClassNotFoundException(
+ packageName + " (" + directory.getPath()
+ + ") does not appear to be a valid package");
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/TestCaptionWrapper.java b/uitest/src/main/java/com/vaadin/tests/TestCaptionWrapper.java
index edd70ece4e..2d6047ac27 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestCaptionWrapper.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestCaptionWrapper.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -53,8 +53,8 @@ public class TestCaptionWrapper extends CustomComponent implements Listener {
VerticalLayout main = new VerticalLayout();
final String eventListenerString = "Component.Listener feedback: ";
- Label eventListenerFeedback = new Label(eventListenerString
- + " <no events occured>");
+ Label eventListenerFeedback = new Label(
+ eventListenerString + " <no events occured>");
int count = 0;
public TestCaptionWrapper() {
@@ -70,8 +70,8 @@ public class TestCaptionWrapper extends CustomComponent implements Listener {
public void createNewView() {
main.removeAllComponents();
- main.addComponent(new Label(
- "Each Layout and their contained components should "
+ main.addComponent(
+ new Label("Each Layout and their contained components should "
+ "have icon, caption, description, user error defined. "
+ "Eeach layout should contain similar components."));
@@ -136,16 +136,16 @@ public class TestCaptionWrapper extends CustomComponent implements Listener {
final Label label = new Label("Label " + count++);
test(layout, label);
- final Link link = new Link("Link " + count++, new ExternalResource(
- "www.vaadin.com"));
+ final Link link = new Link("Link " + count++,
+ new ExternalResource("www.vaadin.com"));
test(layout, link);
- final NativeSelect nativeSelect = new NativeSelect("NativeSelect "
- + count++);
+ final NativeSelect nativeSelect = new NativeSelect(
+ "NativeSelect " + count++);
test(layout, nativeSelect);
- final OptionGroup optionGroup = new OptionGroup("OptionGroup "
- + count++);
+ final OptionGroup optionGroup = new OptionGroup(
+ "OptionGroup " + count++);
test(layout, optionGroup);
final ProgressIndicator pi = new ProgressIndicator();
@@ -169,8 +169,8 @@ public class TestCaptionWrapper extends CustomComponent implements Listener {
final Tree tree = new Tree("Tree " + count++);
test(layout, tree);
- final TwinColSelect twinColSelect = new TwinColSelect("TwinColSelect "
- + count++);
+ final TwinColSelect twinColSelect = new TwinColSelect(
+ "TwinColSelect " + count++);
test(layout, twinColSelect);
final Upload upload = new Upload("Upload (non-functional)", null);
@@ -186,7 +186,7 @@ public class TestCaptionWrapper extends CustomComponent implements Listener {
/**
* Stresses component by configuring it
- *
+ *
* @param c
*/
void test(AbstractComponent c) {
@@ -203,7 +203,7 @@ public class TestCaptionWrapper extends CustomComponent implements Listener {
/**
* Stresses component by configuring it in a given layout
- *
+ *
* @param c
*/
void test(Layout layout, AbstractComponent c) {
diff --git a/uitest/src/main/java/com/vaadin/tests/TestComponentAddAndRecursion.java b/uitest/src/main/java/com/vaadin/tests/TestComponentAddAndRecursion.java
index d431562c8e..7f9efc23a6 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestComponentAddAndRecursion.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestComponentAddAndRecursion.java
@@ -1,5 +1,5 @@
/**
- *
+ *
*/
package com.vaadin.tests;
@@ -15,7 +15,7 @@ import com.vaadin.ui.VerticalLayout;
/**
* @author marc
- *
+ *
*/
public class TestComponentAddAndRecursion extends CustomComponent {
Panel p;
@@ -108,12 +108,12 @@ public class TestComponentAddAndRecursion extends CustomComponent {
try {
p3l.addComponent(p2);
new Notification("ERROR", "This should have failed",
- Notification.TYPE_ERROR_MESSAGE).show(Page
- .getCurrent());
+ Notification.TYPE_ERROR_MESSAGE)
+ .show(Page.getCurrent());
} catch (Exception e) {
new Notification("OK", "threw, as expected",
- Notification.TYPE_ERROR_MESSAGE).show(Page
- .getCurrent());
+ Notification.TYPE_ERROR_MESSAGE)
+ .show(Page.getCurrent());
}
}
@@ -129,12 +129,12 @@ public class TestComponentAddAndRecursion extends CustomComponent {
try {
p3l.addComponent(p);
new Notification("ERROR", "This should have failed",
- Notification.TYPE_ERROR_MESSAGE).show(Page
- .getCurrent());
+ Notification.TYPE_ERROR_MESSAGE)
+ .show(Page.getCurrent());
} catch (Exception e) {
new Notification("OK", "threw, as expected",
- Notification.TYPE_ERROR_MESSAGE).show(Page
- .getCurrent());
+ Notification.TYPE_ERROR_MESSAGE)
+ .show(Page.getCurrent());
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/TestContainerChanges.java b/uitest/src/main/java/com/vaadin/tests/TestContainerChanges.java
index 0e03606cd8..bb3e4206af 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestContainerChanges.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestContainerChanges.java
@@ -1,5 +1,5 @@
/**
- *
+ *
*/
package com.vaadin.tests;
@@ -23,7 +23,7 @@ import com.vaadin.ui.themes.Reindeer;
/**
* @author marc
- *
+ *
*/
public class TestContainerChanges extends CustomComponent {
Container cont = new IndexedContainer();
@@ -72,8 +72,8 @@ public class TestContainerChanges extends CustomComponent {
tbl2.addListener(new Table.ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
- System.err.println("Value now "
- + event.getProperty().getValue());
+ System.err
+ .println("Value now " + event.getProperty().getValue());
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/TestDateField.java b/uitest/src/main/java/com/vaadin/tests/TestDateField.java
index b5611b8246..b761ced34f 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestDateField.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestDateField.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,7 +27,7 @@ import com.vaadin.ui.Label;
import com.vaadin.ui.VerticalLayout;
/**
- *
+ *
* @author Vaadin Ltd.
*/
public class TestDateField extends CustomComponent {
diff --git a/uitest/src/main/java/com/vaadin/tests/TestForAlignments.java b/uitest/src/main/java/com/vaadin/tests/TestForAlignments.java
index 7927b7f0ee..0becce7f93 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestForAlignments.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestForAlignments.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/TestForApplicationLayoutThatUsesWholeBrosersSpace.java b/uitest/src/main/java/com/vaadin/tests/TestForApplicationLayoutThatUsesWholeBrosersSpace.java
index d6c72ee8e9..63aba2bd92 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestForApplicationLayoutThatUsesWholeBrosersSpace.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestForApplicationLayoutThatUsesWholeBrosersSpace.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,8 +24,8 @@ import com.vaadin.ui.Table;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.VerticalSplitPanel;
-public class TestForApplicationLayoutThatUsesWholeBrosersSpace extends
- LegacyApplication {
+public class TestForApplicationLayoutThatUsesWholeBrosersSpace
+ extends LegacyApplication {
LegacyWindow main = new LegacyWindow("Windowing test");
diff --git a/uitest/src/main/java/com/vaadin/tests/TestForBasicApplicationLayout.java b/uitest/src/main/java/com/vaadin/tests/TestForBasicApplicationLayout.java
index 705f2e1766..6215a6680f 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestForBasicApplicationLayout.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestForBasicApplicationLayout.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/TestForChildComponentRendering.java b/uitest/src/main/java/com/vaadin/tests/TestForChildComponentRendering.java
index e07d00a04f..b916d77527 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestForChildComponentRendering.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestForChildComponentRendering.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,10 +30,10 @@ import com.vaadin.ui.Select;
import com.vaadin.ui.VerticalLayout;
/**
- *
+ *
* This Component contains some simple test to see that component updates its
* contents propertly.
- *
+ *
* @author Vaadin Ltd.
*/
public class TestForChildComponentRendering extends CustomComponent {
diff --git a/uitest/src/main/java/com/vaadin/tests/TestForContainerFilterable.java b/uitest/src/main/java/com/vaadin/tests/TestForContainerFilterable.java
index f5edc40c56..c195e36cf9 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestForContainerFilterable.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestForContainerFilterable.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -59,10 +59,10 @@ public class TestForContainerFilterable extends CustomComponent {
filterLayout.addComponent(fooFilter);
filterLayout.addComponent(barFilter);
filterLayout.addComponent(filterButton);
- fooFilter
- .setDescription("Filters foo column in case-sensitive contains manner.");
- barFilter
- .setDescription("Filters bar column in case-insensitive prefix manner.");
+ fooFilter.setDescription(
+ "Filters foo column in case-sensitive contains manner.");
+ barFilter.setDescription(
+ "Filters bar column in case-insensitive prefix manner.");
filterLayout.addComponent(count);
// Table
diff --git a/uitest/src/main/java/com/vaadin/tests/TestForGridLayoutChildComponentRendering.java b/uitest/src/main/java/com/vaadin/tests/TestForGridLayoutChildComponentRendering.java
index ba7d59fb2b..3c45c3fba4 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestForGridLayoutChildComponentRendering.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestForGridLayoutChildComponentRendering.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,10 +30,10 @@ import com.vaadin.ui.Link;
import com.vaadin.ui.Select;
/**
- *
+ *
* This Component contains some simple test to see that component updates its
* contents propertly.
- *
+ *
* @author Vaadin Ltd.
*/
public class TestForGridLayoutChildComponentRendering extends CustomComponent {
diff --git a/uitest/src/main/java/com/vaadin/tests/TestForMultipleStyleNames.java b/uitest/src/main/java/com/vaadin/tests/TestForMultipleStyleNames.java
index a4f2dcd106..4e27852104 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestForMultipleStyleNames.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestForMultipleStyleNames.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,11 +32,11 @@ import com.vaadin.ui.VerticalLayout;
* TODO: Note you need to add Theme under WebContent/VAADIN/Themes/mytheme in
* order to see actual visible results on the browser. Currently changes are
* visible only by inspecting DOM.
- *
+ *
* @author Vaadin Ltd.
*/
-public class TestForMultipleStyleNames extends CustomComponent implements
- ValueChangeListener {
+public class TestForMultipleStyleNames extends CustomComponent
+ implements ValueChangeListener {
private final VerticalLayout main = new VerticalLayout();
@@ -53,8 +53,8 @@ public class TestForMultipleStyleNames extends CustomComponent implements
public void createNewView() {
main.removeAllComponents();
- main.addComponent(new Label(
- "TK5 supports multiple stylenames for components."));
+ main.addComponent(
+ new Label("TK5 supports multiple stylenames for components."));
main.addComponent(new Label("Note you need to add Theme under"
+ " WebContent/VAADIN/Themes/mytheme"
+ " in order to see actual visible results"
@@ -91,7 +91,8 @@ public class TestForMultipleStyleNames extends CustomComponent implements
final Collection<?> styles = (Collection<?>) s.getValue();
- for (final Iterator<?> iterator = styles.iterator(); iterator.hasNext();) {
+ for (final Iterator<?> iterator = styles.iterator(); iterator
+ .hasNext();) {
final String styleName = (String) iterator.next();
if (curStyles.contains(styleName)) {
// already added
diff --git a/uitest/src/main/java/com/vaadin/tests/TestForNativeWindowing.java b/uitest/src/main/java/com/vaadin/tests/TestForNativeWindowing.java
index a9faeb8f38..c570207a64 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestForNativeWindowing.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestForNativeWindowing.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -37,14 +37,14 @@ public class TestForNativeWindowing extends LegacyApplication {
setMainWindow(main);
- main.addComponent(new Button("Add new subwindow",
- new Button.ClickListener() {
+ main.addComponent(
+ new Button("Add new subwindow", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
VerticalLayout layout = new VerticalLayout();
layout.setMargin(true);
- final Window w = new Window("sw "
- + System.currentTimeMillis(), layout);
+ final Window w = new Window(
+ "sw " + System.currentTimeMillis(), layout);
main.addWindow(w);
w.setPositionX(100);
w.setPositionY(100);
@@ -54,14 +54,15 @@ public class TestForNativeWindowing extends LegacyApplication {
w.setWidth("100px");
w.setHeight("400px");
- final Button closebutton = new Button("Close "
- + w.getCaption(), new Button.ClickListener() {
- @Override
- public void buttonClick(ClickEvent event) {
- main.removeWindow(w);
- }
+ final Button closebutton = new Button(
+ "Close " + w.getCaption(),
+ new Button.ClickListener() {
+ @Override
+ public void buttonClick(ClickEvent event) {
+ main.removeWindow(w);
+ }
- });
+ });
layout.addComponent(closebutton);
layout.addComponent(new Label(
@@ -98,13 +99,12 @@ public class TestForNativeWindowing extends LegacyApplication {
@Override
public void buttonClick(ClickEvent event) {
try {
- main.open(
- new com.vaadin.server.ExternalResource(
- new URL(
- getURL(),
- "mainwin-"
- + System.currentTimeMillis()
- + "/")), null);
+ main.open(new com.vaadin.server.ExternalResource(
+ new URL(getURL(),
+ "mainwin-"
+ + System.currentTimeMillis()
+ + "/")),
+ null);
} catch (final MalformedURLException e) {
}
}
@@ -134,8 +134,8 @@ public class TestForNativeWindowing extends LegacyApplication {
@Override
public void buttonClick(ClickEvent event) {
- ww.addComponent(new Label("Button clicked " + (++state)
- + " times"));
+ ww.addComponent(new Label(
+ "Button clicked " + (++state) + " times"));
}
}));
addWindow(ww);
diff --git a/uitest/src/main/java/com/vaadin/tests/TestForPreconfiguredComponents.java b/uitest/src/main/java/com/vaadin/tests/TestForPreconfiguredComponents.java
index b8d1c17241..039276f85d 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestForPreconfiguredComponents.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestForPreconfiguredComponents.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -89,7 +89,8 @@ public class TestForPreconfiguredComponents extends CustomComponent {
fillSelect(s, 20);
s.setMultiSelect(true);
test = createTestBench(s);
- test.setCaption("OptionGroup + multiselect manually (configured from select)");
+ test.setCaption(
+ "OptionGroup + multiselect manually (configured from select)");
main.addComponent(test);
final Button b = new Button("refresh view", new Button.ClickListener() {
@@ -104,8 +105,8 @@ public class TestForPreconfiguredComponents extends CustomComponent {
public static void fillSelect(AbstractSelect s, int items) {
for (int i = 0; i < items; i++) {
- final String name = firstnames[(int) (Math.random() * (firstnames.length - 1))]
- + " "
+ final String name = firstnames[(int) (Math.random()
+ * (firstnames.length - 1))] + " "
+ lastnames[(int) (Math.random() * (lastnames.length - 1))];
s.addItem(name);
}
@@ -115,8 +116,8 @@ public class TestForPreconfiguredComponents extends CustomComponent {
Tree t = new Tree("Tree");
final String[] names = new String[100];
for (int i = 0; i < names.length; i++) {
- names[i] = firstnames[(int) (Math.random() * (firstnames.length - 1))]
- + " "
+ names[i] = firstnames[(int) (Math.random()
+ * (firstnames.length - 1))] + " "
+ lastnames[(int) (Math.random() * (lastnames.length - 1))];
}
@@ -124,7 +125,8 @@ public class TestForPreconfiguredComponents extends CustomComponent {
t = new Tree("Organization Structure");
for (int i = 0; i < 100; i++) {
t.addItem(names[i]);
- final String parent = names[(int) (Math.random() * (names.length - 1))];
+ final String parent = names[(int) (Math.random()
+ * (names.length - 1))];
if (t.containsId(parent)) {
t.setParent(names[i], parent);
}
@@ -171,8 +173,8 @@ public class TestForPreconfiguredComponents extends CustomComponent {
statusLayout
.addComponent(new Label(event.getClass().getName()));
// TODO should not use Field.toString()
- statusLayout.addComponent(new Label("selected: "
- + event.getSource().toString()));
+ statusLayout.addComponent(
+ new Label("selected: " + event.getSource().toString()));
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/TestForRichTextEditor.java b/uitest/src/main/java/com/vaadin/tests/TestForRichTextEditor.java
index 1963dfbf12..e75d52b56d 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestForRichTextEditor.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestForRichTextEditor.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,11 +28,11 @@ import com.vaadin.ui.RichTextArea;
import com.vaadin.ui.VerticalLayout;
/**
- *
+ *
* @author Vaadin Ltd.
*/
-public class TestForRichTextEditor extends CustomComponent implements
- ValueChangeListener {
+public class TestForRichTextEditor extends CustomComponent
+ implements ValueChangeListener {
private final VerticalLayout main = new VerticalLayout();
diff --git a/uitest/src/main/java/com/vaadin/tests/TestForStyledUpload.java b/uitest/src/main/java/com/vaadin/tests/TestForStyledUpload.java
index de79dba2f6..2bb9b9b50e 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestForStyledUpload.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestForStyledUpload.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -48,8 +48,8 @@ import com.vaadin.ui.Upload.SucceededEvent;
import com.vaadin.ui.Upload.SucceededListener;
import com.vaadin.ui.VerticalLayout;
-public class TestForStyledUpload extends LegacyApplication implements
- Upload.FinishedListener, FailedListener, SucceededListener,
+public class TestForStyledUpload extends LegacyApplication
+ implements Upload.FinishedListener, FailedListener, SucceededListener,
StartedListener {
Layout main = new VerticalLayout();
@@ -89,8 +89,8 @@ public class TestForStyledUpload extends LegacyApplication implements
refreshMemUsage();
- transferred.setValue("Transferred " + readBytes + " of "
- + contentLenght);
+ transferred.setValue(
+ "Transferred " + readBytes + " of " + contentLenght);
}
});
@@ -165,8 +165,8 @@ public class TestForStyledUpload extends LegacyApplication implements
sb.append("/");
sb.append(up.getUploadSize());
sb.append(" ");
- sb.append(Math.round(100 * up.getBytesRead()
- / (double) up.getUploadSize()));
+ sb.append(Math.round(
+ 100 * up.getBytesRead() / (double) up.getUploadSize()));
sb.append("%");
} else {
sb.append("Idle");
@@ -180,26 +180,28 @@ public class TestForStyledUpload extends LegacyApplication implements
statusLayout.removeAllComponents();
final InputStream stream = buffer.getStream();
if (stream == null) {
- statusLayout.addComponent(new Label(
- "Upload finished, but output buffer is null!!"));
+ statusLayout.addComponent(
+ new Label("Upload finished, but output buffer is null!!"));
} else {
- statusLayout.addComponent(new Label("<b>Name:</b> "
- + event.getFilename(), ContentMode.HTML));
- statusLayout.addComponent(new Label("<b>Mimetype:</b> "
- + event.getMIMEType(), ContentMode.HTML));
- statusLayout.addComponent(new Label("<b>Size:</b> "
- + event.getLength() + " bytes.", ContentMode.HTML));
-
- statusLayout.addComponent(new Link("Download "
- + buffer.getFileName(), new StreamResource(buffer, buffer
- .getFileName())));
+ statusLayout.addComponent(new Label(
+ "<b>Name:</b> " + event.getFilename(), ContentMode.HTML));
+ statusLayout.addComponent(
+ new Label("<b>Mimetype:</b> " + event.getMIMEType(),
+ ContentMode.HTML));
+ statusLayout.addComponent(
+ new Label("<b>Size:</b> " + event.getLength() + " bytes.",
+ ContentMode.HTML));
+
+ statusLayout
+ .addComponent(new Link("Download " + buffer.getFileName(),
+ new StreamResource(buffer, buffer.getFileName())));
status.setVisible(true);
}
}
- public interface Buffer extends StreamResource.StreamSource,
- Upload.Receiver {
+ public interface Buffer
+ extends StreamResource.StreamSource, Upload.Receiver {
String getFileName();
}
@@ -262,7 +264,7 @@ public class TestForStyledUpload extends LegacyApplication implements
/**
* Returns the fileName.
- *
+ *
* @return String
*/
@Override
@@ -272,7 +274,7 @@ public class TestForStyledUpload extends LegacyApplication implements
/**
* Returns the mimeType.
- *
+ *
* @return String
*/
public String getMimeType() {
diff --git a/uitest/src/main/java/com/vaadin/tests/TestForTabSheet.java b/uitest/src/main/java/com/vaadin/tests/TestForTabSheet.java
index 8d5fe71ed3..4dfa1b96a6 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestForTabSheet.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestForTabSheet.java
@@ -7,8 +7,8 @@ import com.vaadin.ui.Label;
import com.vaadin.ui.TabSheet;
import com.vaadin.ui.TabSheet.SelectedTabChangeEvent;
-public class TestForTabSheet extends CustomComponent implements
- Button.ClickListener, TabSheet.SelectedTabChangeListener {
+public class TestForTabSheet extends CustomComponent
+ implements Button.ClickListener, TabSheet.SelectedTabChangeListener {
TabSheet tabsheet = new TabSheet();
Button tab1_root = new Button("Push this button");
Label tab2_root = new Label("Contents of Second Tab");
diff --git a/uitest/src/main/java/com/vaadin/tests/TestForTablesInitialColumnWidthLogicRendering.java b/uitest/src/main/java/com/vaadin/tests/TestForTablesInitialColumnWidthLogicRendering.java
index cfd7f58866..783109a5de 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestForTablesInitialColumnWidthLogicRendering.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestForTablesInitialColumnWidthLogicRendering.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,14 +29,14 @@ import com.vaadin.ui.Table;
import com.vaadin.ui.VerticalLayout;
/**
- *
+ *
* This Component contains some simple test to see that component updates its
* contents propertly.
- *
+ *
* @author Vaadin Ltd.
*/
-public class TestForTablesInitialColumnWidthLogicRendering extends
- CustomComponent {
+public class TestForTablesInitialColumnWidthLogicRendering
+ extends CustomComponent {
private final VerticalLayout main = new VerticalLayout();
@@ -75,7 +75,8 @@ public class TestForTablesInitialColumnWidthLogicRendering extends
main.addComponent(t);
t = getTestTable(5, 5);
- t.setCaption("Table with some cols and rows rows, some col widths fixed");
+ t.setCaption(
+ "Table with some cols and rows rows, some col widths fixed");
Iterator<?> it = t.getContainerPropertyIds().iterator();
it.next();
@@ -90,7 +91,8 @@ public class TestForTablesInitialColumnWidthLogicRendering extends
main.addComponent(t);
t = getTestTable(3, 40);
- t.setCaption("Table with some columns and wide explicit width. (Ought to widen columns to use all space)");
+ t.setCaption(
+ "Table with some columns and wide explicit width. (Ought to widen columns to use all space)");
t.setWidth("1000px");
main.addComponent(t);
@@ -100,7 +102,8 @@ public class TestForTablesInitialColumnWidthLogicRendering extends
main.addComponent(t);
t = getTestTable(12, 100);
- t.setCaption("Table with lot of rows and lot of columns, width == 50%");
+ t.setCaption(
+ "Table with lot of rows and lot of columns, width == 50%");
t.setWidth(50, Table.UNITS_PERCENTAGE);
main.addComponent(t);
@@ -164,10 +167,10 @@ public class TestForTablesInitialColumnWidthLogicRendering extends
"Charles", "Aaron", "Lucas", "Luis", "Owen", "Landon", "Diego",
"Brian", "Adam", "Adrian", "Kyle", "Eric", "Ian", "Nathaniel",
"Carlos", "Alex", "Bryan", "Jesus", "Julian", "Sean", "Carter",
- "Hayden", "Jeremiah", "Cole", "Brayden", "Wyatt", "Chase",
- "Steven", "Timothy", "Dominic", "Sebastian", "Xavier", "Jaden",
- "Jesse", "Devin", "Seth", "Antonio", "Richard", "Miguel", "Colin",
- "Cody", "Alejandro", "Caden", "Blake", "Carson" };
+ "Hayden", "Jeremiah", "Cole", "Brayden", "Wyatt", "Chase", "Steven",
+ "Timothy", "Dominic", "Sebastian", "Xavier", "Jaden", "Jesse",
+ "Devin", "Seth", "Antonio", "Richard", "Miguel", "Colin", "Cody",
+ "Alejandro", "Caden", "Blake", "Carson" };
public static String rndString() {
return testString[(int) (Math.random() * testString.length)];
diff --git a/uitest/src/main/java/com/vaadin/tests/TestForTrees.java b/uitest/src/main/java/com/vaadin/tests/TestForTrees.java
index 67f7faf44e..7d4dc13cf2 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestForTrees.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestForTrees.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,7 +32,7 @@ import com.vaadin.ui.VerticalLayout;
/**
* Some test cases for trees. Events panel logs events that happen server side.
- *
+ *
* @author Vaadin Ltd.
*/
public class TestForTrees extends CustomComponent implements Handler {
@@ -92,7 +92,8 @@ public class TestForTrees extends CustomComponent implements Handler {
t.setCaption("with actions");
t.setImmediate(true);
t.addActionHandler(this);
- final AbstractOrderedLayout ol = (AbstractOrderedLayout) createTestBench(t);
+ final AbstractOrderedLayout ol = (AbstractOrderedLayout) createTestBench(
+ t);
al = new VerticalLayout();
al.setMargin(true);
ol.addComponent(new Panel("action log", al));
@@ -113,8 +114,8 @@ public class TestForTrees extends CustomComponent implements Handler {
Tree t = new Tree("Tree");
final String[] names = new String[100];
for (int i = 0; i < names.length; i++) {
- names[i] = firstnames[(int) (Math.random() * (firstnames.length - 1))]
- + " "
+ names[i] = firstnames[(int) (Math.random()
+ * (firstnames.length - 1))] + " "
+ lastnames[(int) (Math.random() * (lastnames.length - 1))];
}
@@ -122,7 +123,8 @@ public class TestForTrees extends CustomComponent implements Handler {
t = new Tree("Organization Structure");
for (int i = 0; i < 100; i++) {
t.addItem(names[i]);
- final String parent = names[(int) (Math.random() * (names.length - 1))];
+ final String parent = names[(int) (Math.random()
+ * (names.length - 1))];
if (t.containsId(parent)) {
t.setParent(names[i], parent);
}
@@ -166,8 +168,8 @@ public class TestForTrees extends CustomComponent implements Handler {
statusLayout
.addComponent(new Label(event.getClass().getName()));
// TODO should not use Field.toString()
- statusLayout.addComponent(new Label("selected: "
- + event.getSource().toString()));
+ statusLayout.addComponent(
+ new Label("selected: " + event.getSource().toString()));
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/TestForUpload.java b/uitest/src/main/java/com/vaadin/tests/TestForUpload.java
index 0046457f30..f1db3e70a0 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestForUpload.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestForUpload.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -50,8 +50,8 @@ import com.vaadin.ui.Upload.StartedEvent;
import com.vaadin.ui.Upload.StartedListener;
import com.vaadin.ui.VerticalLayout;
-public class TestForUpload extends CustomComponent implements
- Upload.ProgressListener {
+public class TestForUpload extends CustomComponent
+ implements Upload.ProgressListener {
private static final long serialVersionUID = -3400119871764256575L;
@@ -86,8 +86,8 @@ public class TestForUpload extends CustomComponent implements
public TestForUpload() {
setCompositionRoot(main);
- main.addComponent(new Label(
- "This is a simple test for upload application. "
+ main.addComponent(
+ new Label("This is a simple test for upload application. "
+ "Upload should work with big files and concurrent "
+ "requests should not be blocked. Button 'b' reads "
+ "current state into label below it. Memory receiver "
@@ -139,8 +139,8 @@ public class TestForUpload extends CustomComponent implements
pi2.setVisible(false);
if (event instanceof Upload.FailedEvent) {
Exception reason = ((Upload.FailedEvent) event).getReason();
- l.setValue("Finished with failure ( " + reason
- + " ), idle");
+ l.setValue(
+ "Finished with failure ( " + reason + " ), idle");
} else if (event instanceof Upload.SucceededEvent) {
l.setValue("Finished with succes, idle");
} else {
@@ -153,16 +153,19 @@ public class TestForUpload extends CustomComponent implements
statusLayout.addComponent(new Label(
"Upload finished, but output buffer is null"));
} else {
- statusLayout.addComponent(new Label("<b>Name:</b> "
- + event.getFilename(), ContentMode.HTML));
- statusLayout.addComponent(new Label("<b>Mimetype:</b> "
- + event.getMIMEType(), ContentMode.HTML));
- statusLayout.addComponent(new Label("<b>Size:</b> "
- + event.getLength() + " bytes.", ContentMode.HTML));
+ statusLayout.addComponent(
+ new Label("<b>Name:</b> " + event.getFilename(),
+ ContentMode.HTML));
+ statusLayout.addComponent(
+ new Label("<b>Mimetype:</b> " + event.getMIMEType(),
+ ContentMode.HTML));
+ statusLayout.addComponent(new Label(
+ "<b>Size:</b> " + event.getLength() + " bytes.",
+ ContentMode.HTML));
- statusLayout.addComponent(new Link("Download "
- + buffer.getFileName(), new StreamResource(buffer,
- buffer.getFileName())));
+ statusLayout.addComponent(new Link(
+ "Download " + buffer.getFileName(),
+ new StreamResource(buffer, buffer.getFileName())));
statusLayout.setVisible(true);
}
@@ -278,8 +281,8 @@ public class TestForUpload extends CustomComponent implements
sb.append("/");
sb.append(up.getUploadSize());
sb.append(" ");
- sb.append(Math.round(100 * up.getBytesRead()
- / (double) up.getUploadSize()));
+ sb.append(Math.round(
+ 100 * up.getBytesRead() / (double) up.getUploadSize()));
sb.append("%");
} else {
sb.append("Idle");
@@ -288,8 +291,8 @@ public class TestForUpload extends CustomComponent implements
refreshMemUsage();
}
- public interface Buffer extends StreamResource.StreamSource,
- Upload.Receiver {
+ public interface Buffer
+ extends StreamResource.StreamSource, Upload.Receiver {
String getFileName();
}
@@ -334,7 +337,7 @@ public class TestForUpload extends CustomComponent implements
/**
* Returns the fileName.
- *
+ *
* @return String
*/
@Override
@@ -344,7 +347,7 @@ public class TestForUpload extends CustomComponent implements
/**
* Returns the mimeType.
- *
+ *
* @return String
*/
public String getMimeType() {
@@ -414,7 +417,7 @@ public class TestForUpload extends CustomComponent implements
/**
* Returns the fileName.
- *
+ *
* @return String
*/
@Override
@@ -424,7 +427,7 @@ public class TestForUpload extends CustomComponent implements
/**
* Returns the mimeType.
- *
+ *
* @return String
*/
public String getMimeType() {
diff --git a/uitest/src/main/java/com/vaadin/tests/TestForWindowOpen.java b/uitest/src/main/java/com/vaadin/tests/TestForWindowOpen.java
index 5de80fd833..a66eeab9c3 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestForWindowOpen.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestForWindowOpen.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,8 +29,8 @@ public class TestForWindowOpen extends CustomComponent {
final VerticalLayout main = new VerticalLayout();
setCompositionRoot(main);
- main.addComponent(new Button("Open in this window",
- new Button.ClickListener() {
+ main.addComponent(
+ new Button("Open in this window", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
@@ -46,8 +46,8 @@ public class TestForWindowOpen extends CustomComponent {
@Override
public void buttonClick(ClickEvent event) {
- UI.getCurrent().getPage()
- .open("http://www.google.com", "mytarget");
+ UI.getCurrent().getPage().open("http://www.google.com",
+ "mytarget");
}
@@ -58,8 +58,8 @@ public class TestForWindowOpen extends CustomComponent {
@Override
public void buttonClick(ClickEvent event) {
- UI.getCurrent().getPage()
- .open("http://www.google.com", "secondtarget");
+ UI.getCurrent().getPage().open("http://www.google.com",
+ "secondtarget");
}
diff --git a/uitest/src/main/java/com/vaadin/tests/TestForWindowing.java b/uitest/src/main/java/com/vaadin/tests/TestForWindowing.java
index 02d1e21d5a..04d25b67b4 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestForWindowing.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestForWindowing.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -40,8 +40,8 @@ public class TestForWindowing extends CustomComponent {
final VerticalLayout main = new VerticalLayout();
- main.addComponent(new Label(
- "Click the button to create a new inline window."));
+ main.addComponent(
+ new Label("Click the button to create a new inline window."));
final CheckBox asModal = new CheckBox("As modal");
main.addComponent(asModal);
diff --git a/uitest/src/main/java/com/vaadin/tests/TestIFrames.java b/uitest/src/main/java/com/vaadin/tests/TestIFrames.java
index 244ea10dfa..2611724fa7 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestIFrames.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestIFrames.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/TestSelectAndDatefieldInDeepLayouts.java b/uitest/src/main/java/com/vaadin/tests/TestSelectAndDatefieldInDeepLayouts.java
index 84ea616e3f..b6644b813b 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestSelectAndDatefieldInDeepLayouts.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestSelectAndDatefieldInDeepLayouts.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -33,9 +33,9 @@ import com.vaadin.ui.VerticalLayout;
* and Datefield render their popups incorrectly. Popus tend to be "left behind"
* from the actual components. When the page is even bigger or longer, the
* popups are eventually rendered outside the visual parts of the page.
- *
+ *
* @author Ville Ingman
- *
+ *
*/
public class TestSelectAndDatefieldInDeepLayouts extends CustomComponent {
diff --git a/uitest/src/main/java/com/vaadin/tests/TestSetVisibleAndCaching.java b/uitest/src/main/java/com/vaadin/tests/TestSetVisibleAndCaching.java
index b8ade0d8b6..6f868b71fc 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestSetVisibleAndCaching.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestSetVisibleAndCaching.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,8 +25,8 @@ import com.vaadin.ui.LegacyWindow;
import com.vaadin.ui.Panel;
import com.vaadin.ui.VerticalLayout;
-public class TestSetVisibleAndCaching extends
- com.vaadin.server.LegacyApplication {
+public class TestSetVisibleAndCaching
+ extends com.vaadin.server.LegacyApplication {
Panel panelA = new Panel("Panel A");
Panel panelB = new Panel("Panel B");
@@ -42,20 +42,19 @@ public class TestSetVisibleAndCaching extends
"TestSetVisibleAndCaching");
setMainWindow(mainWindow);
- panelA.setContent(wrapInPanelLayout(new Label(
- "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")));
- panelB.setContent(wrapInPanelLayout(new Label(
- "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB")));
- panelC.setContent(wrapInPanelLayout(new Label(
- "CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC")));
+ panelA.setContent(wrapInPanelLayout(
+ new Label("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")));
+ panelB.setContent(wrapInPanelLayout(
+ new Label("BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB")));
+ panelC.setContent(wrapInPanelLayout(
+ new Label("CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC")));
- mainWindow
- .addComponent(new Label(
- "Inspect transfered data from server to "
- + "client using firebug (http request / response cycles)."
- + " See how widgets are re-used,"
- + " after each panel is once shown in GUI then"
- + " their contents are not resend."));
+ mainWindow.addComponent(
+ new Label("Inspect transfered data from server to "
+ + "client using firebug (http request / response cycles)."
+ + " See how widgets are re-used,"
+ + " after each panel is once shown in GUI then"
+ + " their contents are not resend."));
mainWindow.addComponent(buttonNextPanel);
mainWindow.addComponent(panelA);
mainWindow.addComponent(panelB);
diff --git a/uitest/src/main/java/com/vaadin/tests/TestSizeableIncomponents.java b/uitest/src/main/java/com/vaadin/tests/TestSizeableIncomponents.java
index 90b9088f76..f5f0b5c7ea 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestSizeableIncomponents.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestSizeableIncomponents.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -262,13 +262,13 @@ public class TestSizeableIncomponents extends LegacyApplication {
/**
* Instantiates and populates component with test data to be ready for
* testing.
- *
+ *
* @return
* @throws InstantiationException
* @throws IllegalAccessException
*/
- public Component getComponent() throws InstantiationException,
- IllegalAccessException {
+ public Component getComponent()
+ throws InstantiationException, IllegalAccessException {
Component c = (Component) classToTest.newInstance();
if (c instanceof Button) {
@@ -277,21 +277,24 @@ public class TestSizeableIncomponents extends LegacyApplication {
if (AbstractSelect.class.isAssignableFrom(c.getClass())) {
if (c instanceof Table) {
Table new_name = (Table) c;
- new_name.setContainerDataSource(TestForTablesInitialColumnWidthLogicRendering
- .getTestTable(5, 100).getContainerDataSource());
+ new_name.setContainerDataSource(
+ TestForTablesInitialColumnWidthLogicRendering
+ .getTestTable(5, 100)
+ .getContainerDataSource());
} else {
AbstractSelect new_name = (AbstractSelect) c;
Container cont = TestForTablesInitialColumnWidthLogicRendering
.getTestTable(2, 8).getContainerDataSource();
new_name.setContainerDataSource(cont);
- new_name.setItemCaptionPropertyId(cont
- .getContainerPropertyIds().iterator().next());
+ new_name.setItemCaptionPropertyId(
+ cont.getContainerPropertyIds().iterator().next());
}
} else if (c instanceof ComponentContainer) {
ComponentContainer new_name = (ComponentContainer) c;
- new_name.addComponent(new Label("component 1 in test container"));
+ new_name.addComponent(
+ new Label("component 1 in test container"));
new_name.addComponent(new Button("component 2"));
} else if (c instanceof Embedded) {
Embedded em = (Embedded) c;
diff --git a/uitest/src/main/java/com/vaadin/tests/TestSplitPanel.java b/uitest/src/main/java/com/vaadin/tests/TestSplitPanel.java
index 0266bcc108..78b1abcaac 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestSplitPanel.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestSplitPanel.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/TreeFilesystem.java b/uitest/src/main/java/com/vaadin/tests/TreeFilesystem.java
index 238e7bf317..b248582f7a 100644
--- a/uitest/src/main/java/com/vaadin/tests/TreeFilesystem.java
+++ b/uitest/src/main/java/com/vaadin/tests/TreeFilesystem.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -34,9 +34,9 @@ import com.vaadin.ui.VerticalLayout;
* items hierarchically into <code>com.vaadin.ui.Component.Tree</code>, how to
* receive ExpandEvent and implement
* <code>com.vaadin.ui.Tree.ExpandListener</code>.
- *
+ *
* @since 4.0.0
- *
+ *
*/
public class TreeFilesystem extends com.vaadin.server.LegacyApplication
implements Tree.ExpandListener {
@@ -66,8 +66,8 @@ public class TreeFilesystem extends com.vaadin.server.LegacyApplication
tree.addListener(this);
// Get sample directory
- final File sampleDir = SampleDirectory.getDirectory(
- VaadinSession.getCurrent(), main);
+ final File sampleDir = SampleDirectory
+ .getDirectory(VaadinSession.getCurrent(), main);
// populate tree's root node with example directory
if (sampleDir != null) {
populateNode(sampleDir.getAbsolutePath(), null);
@@ -91,7 +91,7 @@ public class TreeFilesystem extends com.vaadin.server.LegacyApplication
* Populates files to tree as items. In this example items are of String
* type that consist of file path. New items are added to tree and item's
* parent and children properties are updated.
- *
+ *
* @param file
* path which contents are added to tree
* @param parent
diff --git a/uitest/src/main/java/com/vaadin/tests/TreeFilesystemContainer.java b/uitest/src/main/java/com/vaadin/tests/TreeFilesystemContainer.java
index 55e57a7d92..0149b7afb6 100644
--- a/uitest/src/main/java/com/vaadin/tests/TreeFilesystemContainer.java
+++ b/uitest/src/main/java/com/vaadin/tests/TreeFilesystemContainer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -37,12 +37,12 @@ import com.vaadin.ui.VerticalLayout;
* <code>com.vaadin.data.util.FilesystemContainer</code>, how to read
* <code>com.vaadin.ui.Component.Event</code> objects, how to receive and handle
* any event by implementing <code>com.vaadin.ui.Component.Listener</code>.
- *
+ *
* @since 4.0.0
- *
+ *
*/
-public class TreeFilesystemContainer extends
- com.vaadin.server.LegacyApplication implements Listener {
+public class TreeFilesystemContainer extends com.vaadin.server.LegacyApplication
+ implements Listener {
// Filesystem explorer panel and it's components
private final Panel explorerPanel = new Panel("Filesystem explorer");
@@ -56,7 +56,8 @@ public class TreeFilesystemContainer extends
@Override
public void init() {
- final LegacyWindow w = new LegacyWindow("Tree FilesystemContainer demo");
+ final LegacyWindow w = new LegacyWindow(
+ "Tree FilesystemContainer demo");
setMainWindow(w);
final VerticalLayout main = new VerticalLayout();
w.setContent(main);
@@ -84,10 +85,11 @@ public class TreeFilesystemContainer extends
propertyPanel.setEnabled(false);
// Get sample directory
- final File sampleDir = SampleDirectory.getDirectory(
- VaadinSession.getCurrent(), w);
+ final File sampleDir = SampleDirectory
+ .getDirectory(VaadinSession.getCurrent(), w);
// Populate tree with FilesystemContainer
- final FilesystemContainer fsc = new FilesystemContainer(sampleDir, true);
+ final FilesystemContainer fsc = new FilesystemContainer(sampleDir,
+ true);
filesystem.setContainerDataSource(fsc);
// "this" handles all filesystem events
// e.g. node clicked, expanded etc.
diff --git a/uitest/src/main/java/com/vaadin/tests/UsingCustomNewItemHandlerInSelect.java b/uitest/src/main/java/com/vaadin/tests/UsingCustomNewItemHandlerInSelect.java
index 833087029d..83e541e7d4 100644
--- a/uitest/src/main/java/com/vaadin/tests/UsingCustomNewItemHandlerInSelect.java
+++ b/uitest/src/main/java/com/vaadin/tests/UsingCustomNewItemHandlerInSelect.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -59,9 +59,8 @@ public class UsingCustomNewItemHandlerInSelect extends CustomComponent {
for (int j = 0; j < 4; j++) {
Integer id = new Integer(sequence++);
Item item = select.addItem(id);
- item.getItemProperty("CAPTION").setValue(
- id.toString() + ": "
- + names[random.nextInt() % names.length]);
+ item.getItemProperty("CAPTION").setValue(id.toString() + ": "
+ + names[random.nextInt() % names.length]);
}
}
@@ -71,8 +70,8 @@ public class UsingCustomNewItemHandlerInSelect extends CustomComponent {
// here could be db insert or other backend operation
Integer id = new Integer(sequence++);
Item item = select.addItem(id);
- item.getItemProperty("CAPTION").setValue(
- id.toString() + ": " + newItemCaption);
+ item.getItemProperty("CAPTION")
+ .setValue(id.toString() + ": " + newItemCaption);
select.setValue(id);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/UsingObjectsInSelect.java b/uitest/src/main/java/com/vaadin/tests/UsingObjectsInSelect.java
index 85da6d671f..cbae212b33 100644
--- a/uitest/src/main/java/com/vaadin/tests/UsingObjectsInSelect.java
+++ b/uitest/src/main/java/com/vaadin/tests/UsingObjectsInSelect.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -66,12 +66,13 @@ public class UsingObjectsInSelect extends com.vaadin.server.LegacyApplication
public void createExampleTasks() {
final String[] assignedTo = new String[] { "John", "Mary", "Joe",
"Sarah", "Jeff", "Jane", "Peter", "Marc", "Josie", "Linus" };
- final String[] type = new String[] { "Enhancement", "Bugfix",
- "Testing", "Task" };
+ final String[] type = new String[] { "Enhancement", "Bugfix", "Testing",
+ "Task" };
for (int j = 0; j < 100; j++) {
final Task task = new Task(
type[(int) (random.nextDouble() * (type.length - 1))],
- assignedTo[(int) (random.nextDouble() * (assignedTo.length - 1))],
+ assignedTo[(int) (random.nextDouble()
+ * (assignedTo.length - 1))],
random.nextInt(100));
select.addItem(task);
}
@@ -87,7 +88,7 @@ public class UsingObjectsInSelect extends com.vaadin.server.LegacyApplication
/**
* Sample class which is bound to Vaadin components
- *
+ *
*/
public class Task {
diff --git a/uitest/src/main/java/com/vaadin/tests/VaadinClasses.java b/uitest/src/main/java/com/vaadin/tests/VaadinClasses.java
index 99416cfff1..dc09e7cc0c 100644
--- a/uitest/src/main/java/com/vaadin/tests/VaadinClasses.java
+++ b/uitest/src/main/java/com/vaadin/tests/VaadinClasses.java
@@ -37,7 +37,7 @@ public class VaadinClasses {
return null;
}
}
-
+
public static List<Class<? extends ComponentContainer>> getComponentContainers() {
try {
return findClasses(ComponentContainer.class, "com.vaadin.ui");
@@ -73,7 +73,8 @@ public class VaadinClasses {
try {
// Given as name to avoid dependencies on testbench source folder
return (List) findClasses(
- Class.forName("com.vaadin.tests.components.AbstractComponentTest"),
+ Class.forName(
+ "com.vaadin.tests.components.AbstractComponentTest"),
"com.vaadin.tests.components");
} catch (Exception e) {
e.printStackTrace();
@@ -96,8 +97,8 @@ public class VaadinClasses {
try {
File f = new File(location.toURI());
if (!f.exists()) {
- throw new IOException("Directory " + f.toString()
- + " does not exist");
+ throw new IOException(
+ "Directory " + f.toString() + " does not exist");
}
findPackages(f, basePackage, baseClass, classes,
ignoredPackages);
diff --git a/uitest/src/main/java/com/vaadin/tests/VerifyAssertionsEnabled.java b/uitest/src/main/java/com/vaadin/tests/VerifyAssertionsEnabled.java
index aa757e5f24..5f4b362b06 100644
--- a/uitest/src/main/java/com/vaadin/tests/VerifyAssertionsEnabled.java
+++ b/uitest/src/main/java/com/vaadin/tests/VerifyAssertionsEnabled.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/VerifyBrowserVersion.java b/uitest/src/main/java/com/vaadin/tests/VerifyBrowserVersion.java
index 1b21f08aa7..febe483e0e 100644
--- a/uitest/src/main/java/com/vaadin/tests/VerifyBrowserVersion.java
+++ b/uitest/src/main/java/com/vaadin/tests/VerifyBrowserVersion.java
@@ -12,8 +12,8 @@ public class VerifyBrowserVersion extends TestBase {
Label userAgent = new Label(browser.getBrowserApplication());
userAgent.setId("userAgent");
addComponent(userAgent);
- Label touchDevice = new Label("Touch device? "
- + (browser.isTouchDevice() ? "YES" : "No"));
+ Label touchDevice = new Label(
+ "Touch device? " + (browser.isTouchDevice() ? "YES" : "No"));
touchDevice.setId("touchDevice");
addComponent(touchDevice);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/VerifyJreVersion.java b/uitest/src/main/java/com/vaadin/tests/VerifyJreVersion.java
index 025a66f022..5ded17ab2f 100644
--- a/uitest/src/main/java/com/vaadin/tests/VerifyJreVersion.java
+++ b/uitest/src/main/java/com/vaadin/tests/VerifyJreVersion.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -15,7 +15,7 @@
*/
/**
- *
+ *
*/
package com.vaadin.tests;
diff --git a/uitest/src/main/java/com/vaadin/tests/accessibility/WindowWaiAriaRoles.java b/uitest/src/main/java/com/vaadin/tests/accessibility/WindowWaiAriaRoles.java
index c015b65e1f..2ab6be25ac 100644
--- a/uitest/src/main/java/com/vaadin/tests/accessibility/WindowWaiAriaRoles.java
+++ b/uitest/src/main/java/com/vaadin/tests/accessibility/WindowWaiAriaRoles.java
@@ -35,7 +35,7 @@ public class WindowWaiAriaRoles extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -86,7 +86,7 @@ public class WindowWaiAriaRoles extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -96,7 +96,7 @@ public class WindowWaiAriaRoles extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/actions/ActionsOnInvisibleComponents.java b/uitest/src/main/java/com/vaadin/tests/actions/ActionsOnInvisibleComponents.java
index 0f4c179cee..aa1e925637 100644
--- a/uitest/src/main/java/com/vaadin/tests/actions/ActionsOnInvisibleComponents.java
+++ b/uitest/src/main/java/com/vaadin/tests/actions/ActionsOnInvisibleComponents.java
@@ -55,7 +55,7 @@ public class ActionsOnInvisibleComponents extends AbstractTestUIWithLog {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -65,7 +65,7 @@ public class ActionsOnInvisibleComponents extends AbstractTestUIWithLog {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/actions/ActionsWithoutKeyCode.java b/uitest/src/main/java/com/vaadin/tests/actions/ActionsWithoutKeyCode.java
index e94a4b1ade..996e540081 100644
--- a/uitest/src/main/java/com/vaadin/tests/actions/ActionsWithoutKeyCode.java
+++ b/uitest/src/main/java/com/vaadin/tests/actions/ActionsWithoutKeyCode.java
@@ -12,7 +12,8 @@ public class ActionsWithoutKeyCode extends AbstractTestUIWithLog {
protected void setup(VaadinRequest request) {
TextField tf = new TextField();
tf.setWidth("100%");
- tf.setInputPrompt("Enter text with å,ä or ä or press windows key while textfield is focused");
+ tf.setInputPrompt(
+ "Enter text with å,ä or ä or press windows key while textfield is focused");
addComponent(tf);
addActionHandler(new Action.Handler() {
@@ -28,7 +29,8 @@ public class ActionsWithoutKeyCode extends AbstractTestUIWithLog {
}
@Override
- public void handleAction(Action action, Object sender, Object target) {
+ public void handleAction(Action action, Object sender,
+ Object target) {
log("action " + action.getCaption() + " triggered by "
+ sender.getClass().getSimpleName() + " on "
+ target.getClass().getSimpleName());
diff --git a/uitest/src/main/java/com/vaadin/tests/appengine/GAESyncTest.java b/uitest/src/main/java/com/vaadin/tests/appengine/GAESyncTest.java
index 146e85f5f3..70d636ed27 100644
--- a/uitest/src/main/java/com/vaadin/tests/appengine/GAESyncTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/appengine/GAESyncTest.java
@@ -18,7 +18,7 @@ import com.vaadin.ui.TextField;
public class GAESyncTest extends LegacyApplication {
/**
- *
+ *
*/
private static final long serialVersionUID = -3724319151122707926l;
@@ -34,8 +34,8 @@ public class GAESyncTest extends LegacyApplication {
// Was this caused by a GAE timeout?
while (t != null) {
if (t instanceof DeadlineExceededException) {
- getMainWindow().showNotification("Bugger!",
- "Deadline Exceeded", Notification.TYPE_ERROR_MESSAGE);
+ getMainWindow().showNotification("Bugger!", "Deadline Exceeded",
+ Notification.TYPE_ERROR_MESSAGE);
return;
}
t = t.getCause();
@@ -61,8 +61,8 @@ public class GAESyncTest extends LegacyApplication {
tf.addListener(new Property.ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
- IntrWindow.this.showNotification((String) event
- .getProperty().getValue());
+ IntrWindow.this.showNotification(
+ (String) event.getProperty().getValue());
}
@@ -94,8 +94,8 @@ public class GAESyncTest extends LegacyApplication {
@Override
public void buttonClick(ClickEvent event) {
if (getUI() == getMainWindow()) {
- getUI().getPage().showNotification(
- new Notification("main"));
+ getUI().getPage()
+ .showNotification(new Notification("main"));
try {
Thread.sleep((5000));
} catch (InterruptedException e) {
diff --git a/uitest/src/main/java/com/vaadin/tests/application/ApplicationCloseTest.java b/uitest/src/main/java/com/vaadin/tests/application/ApplicationCloseTest.java
index f1548ea6c2..c3ba0adb0b 100644
--- a/uitest/src/main/java/com/vaadin/tests/application/ApplicationCloseTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/application/ApplicationCloseTest.java
@@ -16,8 +16,8 @@ public class ApplicationCloseTest extends TestBase {
Label applications = new Label("Applications in session: <br/>",
ContentMode.HTML);
if (getContext() != null) {
- applications.setValue(applications.getValue() + "App: "
- + getContext() + "<br/>");
+ applications.setValue(
+ applications.getValue() + "App: " + getContext() + "<br/>");
}
applications.setValue(applications.getValue() + "<br/><br/>");
@@ -46,12 +46,10 @@ public class ApplicationCloseTest extends TestBase {
long totalUsage = Runtime.getRuntime().totalMemory();
String totalUsageString = totalUsage / 1000 / 1000 + "MiB";
Label memoryUsage = new Label(
- "Using about "
- + memoryConsumer.length()
- / 1000
- / 1000
+ "Using about " + memoryConsumer.length() / 1000 / 1000
+ "MiB memory for this application.<br/>Total memory usage reported as "
- + totalUsageString + "<br/>", ContentMode.HTML);
+ + totalUsageString + "<br/>",
+ ContentMode.HTML);
addComponent(thisApp);
addComponent(memoryUsage);
diff --git a/uitest/src/main/java/com/vaadin/tests/application/CommErrorEmulatorServlet.java b/uitest/src/main/java/com/vaadin/tests/application/CommErrorEmulatorServlet.java
index 116ef1c1f2..5f42bfbace 100644
--- a/uitest/src/main/java/com/vaadin/tests/application/CommErrorEmulatorServlet.java
+++ b/uitest/src/main/java/com/vaadin/tests/application/CommErrorEmulatorServlet.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -106,9 +106,9 @@ public class CommErrorEmulatorServlet extends VaadinServlet {
public void setUIDLResponseCode(final UI ui, int responseCode,
final int delay) {
uidlResponseCode.put(ui, responseCode);
- System.out.println("Responding with " + responseCode
- + " to UIDL requests for " + ui + " for the next " + delay
- + "s");
+ System.out.println(
+ "Responding with " + responseCode + " to UIDL requests for "
+ + ui + " for the next " + delay + "s");
new Thread(new Runnable() {
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/application/CommErrorEmulatorUI.java b/uitest/src/main/java/com/vaadin/tests/application/CommErrorEmulatorUI.java
index 080d36fa48..de04f39d7c 100644
--- a/uitest/src/main/java/com/vaadin/tests/application/CommErrorEmulatorUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/application/CommErrorEmulatorUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -34,7 +34,7 @@ import com.vaadin.ui.TextField;
import com.vaadin.ui.VerticalLayout;
/**
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -98,7 +98,8 @@ public class CommErrorEmulatorUI extends AbstractTestUIWithLog {
vl.setSpacing(true);
vl.setMargin(true);
p.setContent(vl);
- vl.addComponent(createTemporaryResponseCodeSetters("UIDL", uidlResponse));
+ vl.addComponent(
+ createTemporaryResponseCodeSetters("UIDL", uidlResponse));
vl.addComponent(createTemporaryResponseCodeSetters("Heartbeat",
heartbeatResponse));
vl.addComponent(new Button("Activate", new ClickListener() {
@@ -132,8 +133,8 @@ public class CommErrorEmulatorUI extends AbstractTestUIWithLog {
final TextField reconnectDialogMessage = new TextField(
"Reconnect message");
reconnectDialogMessage.setWidth("50em");
- reconnectDialogMessage.setValue(getReconnectDialogConfiguration()
- .getDialogText());
+ reconnectDialogMessage
+ .setValue(getReconnectDialogConfiguration().getDialogText());
reconnectDialogMessage
.addValueChangeListener(new ValueChangeListener() {
@Override
@@ -147,8 +148,8 @@ public class CommErrorEmulatorUI extends AbstractTestUIWithLog {
"Reconnect gave up message");
reconnectDialogGaveUpMessage.setWidth("50em");
- reconnectDialogGaveUpMessage.setValue(getReconnectDialogConfiguration()
- .getDialogTextGaveUp());
+ reconnectDialogGaveUpMessage.setValue(
+ getReconnectDialogConfiguration().getDialogTextGaveUp());
reconnectDialogGaveUpMessage
.addValueChangeListener(new ValueChangeListener() {
@Override
@@ -160,9 +161,8 @@ public class CommErrorEmulatorUI extends AbstractTestUIWithLog {
final TextField reconnectDialogReconnectAttempts = new TextField(
"Reconnect attempts");
reconnectDialogReconnectAttempts.setConverter(Integer.class);
- reconnectDialogReconnectAttempts
- .setConvertedValue(getReconnectDialogConfiguration()
- .getReconnectAttempts());
+ reconnectDialogReconnectAttempts.setConvertedValue(
+ getReconnectDialogConfiguration().getReconnectAttempts());
reconnectDialogReconnectAttempts
.addValueChangeListener(new ValueChangeListener() {
@Override
@@ -175,9 +175,8 @@ public class CommErrorEmulatorUI extends AbstractTestUIWithLog {
final TextField reconnectDialogReconnectInterval = new TextField(
"Reconnect interval (ms)");
reconnectDialogReconnectInterval.setConverter(Integer.class);
- reconnectDialogReconnectInterval
- .setConvertedValue(getReconnectDialogConfiguration()
- .getReconnectInterval());
+ reconnectDialogReconnectInterval.setConvertedValue(
+ getReconnectDialogConfiguration().getReconnectInterval());
reconnectDialogReconnectInterval
.addValueChangeListener(new ValueChangeListener() {
@Override
@@ -191,9 +190,8 @@ public class CommErrorEmulatorUI extends AbstractTestUIWithLog {
final TextField reconnectDialogGracePeriod = new TextField(
"Reconnect dialog grace period (ms)");
reconnectDialogGracePeriod.setConverter(Integer.class);
- reconnectDialogGracePeriod
- .setConvertedValue(getReconnectDialogConfiguration()
- .getDialogGracePeriod());
+ reconnectDialogGracePeriod.setConvertedValue(
+ getReconnectDialogConfiguration().getDialogGracePeriod());
reconnectDialogGracePeriod
.addValueChangeListener(new ValueChangeListener() {
@Override
@@ -206,13 +204,13 @@ public class CommErrorEmulatorUI extends AbstractTestUIWithLog {
final CheckBox reconnectDialogModal = new CheckBox(
"Reconnect dialog modality");
- reconnectDialogModal.setValue(getReconnectDialogConfiguration()
- .isDialogModal());
+ reconnectDialogModal
+ .setValue(getReconnectDialogConfiguration().isDialogModal());
reconnectDialogModal.addValueChangeListener(new ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
- getReconnectDialogConfiguration().setDialogModal(
- reconnectDialogModal.getValue());
+ getReconnectDialogConfiguration()
+ .setDialogModal(reconnectDialogModal.getValue());
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/application/ConfirmBrowserTabClose.java b/uitest/src/main/java/com/vaadin/tests/application/ConfirmBrowserTabClose.java
index 3d3d84f9bd..2494f9ce90 100644
--- a/uitest/src/main/java/com/vaadin/tests/application/ConfirmBrowserTabClose.java
+++ b/uitest/src/main/java/com/vaadin/tests/application/ConfirmBrowserTabClose.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -38,8 +38,8 @@ public class ConfirmBrowserTabClose extends AbstractTestUIWithLog {
}
});
addComponent(b);
- getPage().getJavaScript().eval(
- "window.addEventListener('beforeunload', function (e) {"
+ getPage().getJavaScript()
+ .eval("window.addEventListener('beforeunload', function (e) {"
+ "var confirmationMessage = 'Please stay!';"
+ "e.returnValue = confirmationMessage;"
+ "return confirmationMessage;" + "});");
diff --git a/uitest/src/main/java/com/vaadin/tests/application/CriticalNotifications.java b/uitest/src/main/java/com/vaadin/tests/application/CriticalNotifications.java
index 14b4cb62e9..cfd3141b44 100644
--- a/uitest/src/main/java/com/vaadin/tests/application/CriticalNotifications.java
+++ b/uitest/src/main/java/com/vaadin/tests/application/CriticalNotifications.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -35,8 +35,8 @@ public class CriticalNotifications extends AbstractTestUI {
@Override
protected void setup(VaadinRequest request) {
- systemMessages = VaadinService.getCurrent().getSystemMessages(
- getLocale(), request);
+ systemMessages = VaadinService.getCurrent()
+ .getSystemMessages(getLocale(), request);
includeDetails = new CheckBox("Include details");
addComponent(includeDetails);
@@ -137,9 +137,9 @@ public class CriticalNotifications extends AbstractTestUI {
try {
service.writeStringResponse(response,
- JsonConstants.JSON_CONTENT_TYPE, VaadinService
- .createCriticalNotificationJSON(caption, message,
- details, url));
+ JsonConstants.JSON_CONTENT_TYPE,
+ VaadinService.createCriticalNotificationJSON(caption,
+ message, details, url));
} catch (IOException e) {
e.printStackTrace();
}
diff --git a/uitest/src/main/java/com/vaadin/tests/application/DeploymentConfiguration.java b/uitest/src/main/java/com/vaadin/tests/application/DeploymentConfiguration.java
index 9c95479bec..91fadbf9a4 100644
--- a/uitest/src/main/java/com/vaadin/tests/application/DeploymentConfiguration.java
+++ b/uitest/src/main/java/com/vaadin/tests/application/DeploymentConfiguration.java
@@ -15,8 +15,8 @@ public class DeploymentConfiguration extends AbstractTestUI {
getLayout().setMargin(new MarginInfo(true, false, false, false));
for (Object key : params.keySet()) {
- addComponent(new Label(key + ": "
- + params.getProperty((String) key)));
+ addComponent(
+ new Label(key + ": " + params.getProperty((String) key)));
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/application/DetachOldUIOnReload.java b/uitest/src/main/java/com/vaadin/tests/application/DetachOldUIOnReload.java
index a7c9239fae..74c9073a15 100644
--- a/uitest/src/main/java/com/vaadin/tests/application/DetachOldUIOnReload.java
+++ b/uitest/src/main/java/com/vaadin/tests/application/DetachOldUIOnReload.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -51,8 +51,8 @@ public class DetachOldUIOnReload extends AbstractTestUIWithLog {
private List<String> getSessionMessages(boolean storeIfNeeded) {
@SuppressWarnings("unchecked")
- List<String> messages = (List<String>) getSession().getAttribute(
- PERSISTENT_MESSAGES_ATTRIBUTE);
+ List<String> messages = (List<String>) getSession()
+ .getAttribute(PERSISTENT_MESSAGES_ATTRIBUTE);
if (messages == null) {
messages = new ArrayList<String>();
if (storeIfNeeded) {
diff --git a/uitest/src/main/java/com/vaadin/tests/application/MissingHierarchyDetection.java b/uitest/src/main/java/com/vaadin/tests/application/MissingHierarchyDetection.java
index 508ac818f6..9e463569c0 100644
--- a/uitest/src/main/java/com/vaadin/tests/application/MissingHierarchyDetection.java
+++ b/uitest/src/main/java/com/vaadin/tests/application/MissingHierarchyDetection.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,10 +29,11 @@ public class MissingHierarchyDetection extends AbstractTestUI {
private boolean isChildRendered = true;
private BrokenCssLayout brokenLayout = new BrokenCssLayout();
- private CssLayout normalLayout = new CssLayout(new Label(
- "Normal layout child"));
+ private CssLayout normalLayout = new CssLayout(
+ new Label("Normal layout child"));
- public class BrokenCssLayout extends CssLayout implements SelectiveRenderer {
+ public class BrokenCssLayout extends CssLayout
+ implements SelectiveRenderer {
public BrokenCssLayout() {
setCaption("Broken layout");
Label label = new Label("Child component");
@@ -56,8 +57,8 @@ public class MissingHierarchyDetection extends AbstractTestUI {
toggle(true);
}
}));
- addComponent(new Button("Toggle improperly",
- new Button.ClickListener() {
+ addComponent(
+ new Button("Toggle improperly", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
toggle(false);
diff --git a/uitest/src/main/java/com/vaadin/tests/application/NavigateWithOngoingXHR.java b/uitest/src/main/java/com/vaadin/tests/application/NavigateWithOngoingXHR.java
index d32ecb583d..4608fe14b1 100644
--- a/uitest/src/main/java/com/vaadin/tests/application/NavigateWithOngoingXHR.java
+++ b/uitest/src/main/java/com/vaadin/tests/application/NavigateWithOngoingXHR.java
@@ -1,12 +1,12 @@
/*
* Copyright 2012 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -85,10 +85,10 @@ public class NavigateWithOngoingXHR extends AbstractTestUI {
});
// Hacky URLs that are might not work in all deployment scenarios
- addComponent(new Link("Navigate away", new ExternalResource(
- "slowRequestHandler")));
- addComponent(new Link("Start download", new ExternalResource(
- "slowRequestHandler?download")));
+ addComponent(new Link("Navigate away",
+ new ExternalResource("slowRequestHandler")));
+ addComponent(new Link("Start download",
+ new ExternalResource("slowRequestHandler?download")));
}
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/application/PreserveWithExpiredHeartbeat.java b/uitest/src/main/java/com/vaadin/tests/application/PreserveWithExpiredHeartbeat.java
index de45d2bccb..db9d053f26 100644
--- a/uitest/src/main/java/com/vaadin/tests/application/PreserveWithExpiredHeartbeat.java
+++ b/uitest/src/main/java/com/vaadin/tests/application/PreserveWithExpiredHeartbeat.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,8 @@ import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.ui.Label;
@PreserveOnRefresh
-@CustomDeploymentConfiguration({ @Conf(name = "heartbeatInterval", value = "5") })
+@CustomDeploymentConfiguration({
+ @Conf(name = "heartbeatInterval", value = "5") })
public class PreserveWithExpiredHeartbeat extends AbstractTestUI {
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/application/ReconnectDialogUI.java b/uitest/src/main/java/com/vaadin/tests/application/ReconnectDialogUI.java
index 62de2d49c5..29c8d2b24d 100644
--- a/uitest/src/main/java/com/vaadin/tests/application/ReconnectDialogUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/application/ReconnectDialogUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,10 +26,8 @@ public class ReconnectDialogUI extends AbstractTestUIWithLog {
@Override
protected void setup(VaadinRequest request) {
if (request.getParameter("reconnectAttempts") != null) {
- getReconnectDialogConfiguration()
- .setReconnectAttempts(
- Integer.parseInt(request
- .getParameter("reconnectAttempts")));
+ getReconnectDialogConfiguration().setReconnectAttempts(Integer
+ .parseInt(request.getParameter("reconnectAttempts")));
}
Button b = new Button("Say hello");
b.addClickListener(new ClickListener() {
diff --git a/uitest/src/main/java/com/vaadin/tests/application/RefreshStatePreserve.java b/uitest/src/main/java/com/vaadin/tests/application/RefreshStatePreserve.java
index e7f81167d9..a6773c201e 100644
--- a/uitest/src/main/java/com/vaadin/tests/application/RefreshStatePreserve.java
+++ b/uitest/src/main/java/com/vaadin/tests/application/RefreshStatePreserve.java
@@ -20,7 +20,8 @@ public class RefreshStatePreserve extends AbstractTestUIWithLog {
getPage().addUriFragmentChangedListener(
new UriFragmentChangedListener() {
@Override
- public void uriFragmentChanged(UriFragmentChangedEvent event) {
+ public void uriFragmentChanged(
+ UriFragmentChangedEvent event) {
log("Fragment changed to " + event.getUriFragment());
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/application/ResynchronizeAfterAsyncRemoval.java b/uitest/src/main/java/com/vaadin/tests/application/ResynchronizeAfterAsyncRemoval.java
index d8f7fface3..8f73d24a6b 100644
--- a/uitest/src/main/java/com/vaadin/tests/application/ResynchronizeAfterAsyncRemoval.java
+++ b/uitest/src/main/java/com/vaadin/tests/application/ResynchronizeAfterAsyncRemoval.java
@@ -37,8 +37,8 @@ public class ResynchronizeAfterAsyncRemoval extends AbstractTestUIWithLog {
public void buttonClick(ClickEvent event) {
log("Window removed: " + (window.getParent() == null));
- boolean dirty = getUI().getConnectorTracker().isDirty(
- event.getButton());
+ boolean dirty = getUI().getConnectorTracker()
+ .isDirty(event.getButton());
log("Dirty: " + dirty);
}
}));
@@ -66,8 +66,8 @@ public class ResynchronizeAfterAsyncRemoval extends AbstractTestUIWithLog {
private Map<Integer, Set<String>> getUnregisterIdMap() {
try {
ConnectorTracker tracker = getConnectorTracker();
- Field field = tracker.getClass().getDeclaredField(
- "syncIdToUnregisteredConnectorIds");
+ Field field = tracker.getClass()
+ .getDeclaredField("syncIdToUnregisteredConnectorIds");
field.setAccessible(true);
return (Map<Integer, Set<String>>) field.get(tracker);
} catch (Exception e) {
diff --git a/uitest/src/main/java/com/vaadin/tests/application/ResynchronizeUI.java b/uitest/src/main/java/com/vaadin/tests/application/ResynchronizeUI.java
index 62331ec95e..721fc7185b 100644
--- a/uitest/src/main/java/com/vaadin/tests/application/ResynchronizeUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/application/ResynchronizeUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/application/TerminalErrorNotification.java b/uitest/src/main/java/com/vaadin/tests/application/TerminalErrorNotification.java
index 7dbfa8cf40..e52f2cbc5d 100644
--- a/uitest/src/main/java/com/vaadin/tests/application/TerminalErrorNotification.java
+++ b/uitest/src/main/java/com/vaadin/tests/application/TerminalErrorNotification.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/application/TimingInfoReported.java b/uitest/src/main/java/com/vaadin/tests/application/TimingInfoReported.java
index 83d31b184e..47643484dd 100644
--- a/uitest/src/main/java/com/vaadin/tests/application/TimingInfoReported.java
+++ b/uitest/src/main/java/com/vaadin/tests/application/TimingInfoReported.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/application/VaadinSessionAttribute.java b/uitest/src/main/java/com/vaadin/tests/application/VaadinSessionAttribute.java
index c8fc96f596..272fae0334 100644
--- a/uitest/src/main/java/com/vaadin/tests/application/VaadinSessionAttribute.java
+++ b/uitest/src/main/java/com/vaadin/tests/application/VaadinSessionAttribute.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,15 +31,14 @@ public class VaadinSessionAttribute extends AbstractTestUI {
getSession().setAttribute(ATTR_NAME, Integer.valueOf(42));
getSession().setAttribute(Integer.class, Integer.valueOf(42 * 2));
- addComponent(new Button("Show attribute values",
- new Button.ClickListener() {
+ addComponent(
+ new Button("Show attribute values", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
Notification notification = new Notification(
- getSession().getAttribute(ATTR_NAME)
- + " & "
- + getSession().getAttribute(
- Integer.class));
+ getSession().getAttribute(ATTR_NAME) + " & "
+ + getSession()
+ .getAttribute(Integer.class));
notification.setDelayMsec(Notification.DELAY_FOREVER);
notification.show(getPage());
}
diff --git a/uitest/src/main/java/com/vaadin/tests/application/WebBrowserTimeZone.java b/uitest/src/main/java/com/vaadin/tests/application/WebBrowserTimeZone.java
index 52d61c89c9..b591635a73 100644
--- a/uitest/src/main/java/com/vaadin/tests/application/WebBrowserTimeZone.java
+++ b/uitest/src/main/java/com/vaadin/tests/application/WebBrowserTimeZone.java
@@ -17,10 +17,12 @@ public class WebBrowserTimeZone extends AbstractTestUI {
final Label offsetLabel = addLabel("Browser offset");
final Label rawOffsetLabel = addLabel("Browser raw offset");
- final Label dstDiffLabel = addLabel("Difference between raw offset and DST");
+ final Label dstDiffLabel = addLabel(
+ "Difference between raw offset and DST");
final Label dstInEffectLabel = addLabel("Is DST currently active?");
final Label curDateLabel = addLabel("Current date in the browser");
- final Label diffLabel = addLabel("Browser to Europe/Helsinki offset difference");
+ final Label diffLabel = addLabel(
+ "Browser to Europe/Helsinki offset difference");
final Label containsLabel = addLabel("Browser could be in Helsinki");
addButton("Get TimeZone from browser", new Button.ClickListener() {
@@ -40,10 +42,10 @@ public class WebBrowserTimeZone extends AbstractTestUI {
rawOffsetLabel.setValue(String.valueOf(browserRawOffset));
diffLabel.setValue(String.valueOf(browserOffset - hkiOffset));
containsLabel.setValue(contains ? "Yes" : "No");
- dstDiffLabel.setValue(String.valueOf(getBrowser()
- .getDSTSavings()));
- dstInEffectLabel.setValue(getBrowser().isDSTInEffect() ? "Yes"
- : "No");
+ dstDiffLabel
+ .setValue(String.valueOf(getBrowser().getDSTSavings()));
+ dstInEffectLabel
+ .setValue(getBrowser().isDSTInEffect() ? "Yes" : "No");
curDateLabel.setValue(getBrowser().getCurrentDate().toString());
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/application/calculator/Calc.java b/uitest/src/main/java/com/vaadin/tests/application/calculator/Calc.java
index 3059017faa..ece0e51268 100644
--- a/uitest/src/main/java/com/vaadin/tests/application/calculator/Calc.java
+++ b/uitest/src/main/java/com/vaadin/tests/application/calculator/Calc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/applicationcontext/ChangeSessionId.java b/uitest/src/main/java/com/vaadin/tests/applicationcontext/ChangeSessionId.java
index 93e9464054..fc1d249e26 100644
--- a/uitest/src/main/java/com/vaadin/tests/applicationcontext/ChangeSessionId.java
+++ b/uitest/src/main/java/com/vaadin/tests/applicationcontext/ChangeSessionId.java
@@ -19,8 +19,8 @@ public class ChangeSessionId extends AbstractTestCase {
LegacyWindow mainWindow = new LegacyWindow("Sestest Application");
mainWindow.addComponent(log);
mainWindow.addComponent(loginButton);
- mainWindow.addComponent(new Button("Show session id",
- new Button.ClickListener() {
+ mainWindow.addComponent(
+ new Button("Show session id", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
@@ -33,8 +33,8 @@ public class ChangeSessionId extends AbstractTestCase {
@Override
public void buttonClick(ClickEvent event) {
String oldSessionId = getSessionId();
- VaadinService.reinitializeSession(VaadinService
- .getCurrentRequest());
+ VaadinService
+ .reinitializeSession(VaadinService.getCurrentRequest());
String newSessionId = getSessionId();
if (oldSessionId.equals(newSessionId)) {
log.log("FAILED! Both old and new session id is "
diff --git a/uitest/src/main/java/com/vaadin/tests/applicationcontext/CleanupBrokenUI.java b/uitest/src/main/java/com/vaadin/tests/applicationcontext/CleanupBrokenUI.java
index 4af4f23bfa..fc0dd2af3c 100644
--- a/uitest/src/main/java/com/vaadin/tests/applicationcontext/CleanupBrokenUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/applicationcontext/CleanupBrokenUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.ui.Label;
/**
* Tests that UI is cleaned from session despite any errors that happen in
* detach.
- *
+ *
* @author Vaadin Ltd
*/
public class CleanupBrokenUI extends AbstractTestUIWithLog {
diff --git a/uitest/src/main/java/com/vaadin/tests/applicationcontext/CloseSession.java b/uitest/src/main/java/com/vaadin/tests/applicationcontext/CloseSession.java
index cca76cc9e3..0781aed0f6 100644
--- a/uitest/src/main/java/com/vaadin/tests/applicationcontext/CloseSession.java
+++ b/uitest/src/main/java/com/vaadin/tests/applicationcontext/CloseSession.java
@@ -1,12 +1,12 @@
/*
* Copyright 2012 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -56,7 +56,8 @@ public class CloseSession extends AbstractTestUI {
String oldSessionId = request.getParameter(OLD_SESSION_ID_PARAM);
if (oldSessionId != null) {
log.log("Old WrappedSession id: " + oldSessionId);
- log.log("Same WrappedSession id? " + oldSessionId.equals(sessionId));
+ log.log("Same WrappedSession id? "
+ + oldSessionId.equals(sessionId));
}
// Add parameters to help see what has changed
@@ -65,16 +66,18 @@ public class CloseSession extends AbstractTestUI {
+ OLD_SESSION_ID_PARAM + "=" + sessionId;
addComponent(log);
- addComponent(new Button(
- "Close VaadinServiceSession and redirect elsewhere",
- new Button.ClickListener() {
- @Override
- public void buttonClick(ClickEvent event) {
- // Assuming Vaadin is deployed to the root context
- getPage().setLocation("/statictestfiles/static.html");
- getSession().close();
- }
- }));
+ addComponent(
+ new Button("Close VaadinServiceSession and redirect elsewhere",
+ new Button.ClickListener() {
+ @Override
+ public void buttonClick(ClickEvent event) {
+ // Assuming Vaadin is deployed to the root
+ // context
+ getPage().setLocation(
+ "/statictestfiles/static.html");
+ getSession().close();
+ }
+ }));
addComponent(new Button("Close VaadinServiceSession and reopen page",
new Button.ClickListener() {
@Override
@@ -106,8 +109,7 @@ public class CloseSession extends AbstractTestUI {
getPage().setLocation(reopenUrl);
}
}));
- addComponent(new Button(
- "Invalidate HttpSession and redirect elsewhere",
+ addComponent(new Button("Invalidate HttpSession and redirect elsewhere",
new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
@@ -116,14 +118,13 @@ public class CloseSession extends AbstractTestUI {
getPage().setLocation("/statictestfiles/static.html");
}
}));
- addComponent(new Button(
- "Invalidate HttpSession in a background thread",
+ addComponent(new Button("Invalidate HttpSession in a background thread",
new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
final HttpSession session = ((WrappedHttpSession) VaadinService
.getCurrentRequest().getWrappedSession())
- .getHttpSession();
+ .getHttpSession();
Thread t = new Thread(new Runnable() {
@Override
@@ -133,12 +134,12 @@ public class CloseSession extends AbstractTestUI {
} catch (InterruptedException e) {
e.printStackTrace();
}
- System.out
- .println("Invalidating session from thread "
+ System.out.println(
+ "Invalidating session from thread "
+ session.getId());
session.invalidate();
- System.out
- .println("Invalidated session from thread "
+ System.out.println(
+ "Invalidated session from thread "
+ session.getId());
}
@@ -164,9 +165,10 @@ public class CloseSession extends AbstractTestUI {
log.log("Detach of " + this + " (" + getUIId() + ")");
boolean correctUI = (UI.getCurrent() == this);
boolean correctPage = (Page.getCurrent() == getPage());
- boolean correctVaadinSession = (VaadinSession.getCurrent() == getSession());
- boolean correctVaadinService = (VaadinService.getCurrent() == getSession()
- .getService());
+ boolean correctVaadinSession = (VaadinSession
+ .getCurrent() == getSession());
+ boolean correctVaadinService = (VaadinService
+ .getCurrent() == getSession().getService());
log.log("UI.current correct in detach: " + correctUI);
log.log("Page.current correct in detach: " + correctPage);
log.log("VaadinSession.current correct in detach: "
diff --git a/uitest/src/main/java/com/vaadin/tests/applicationcontext/CloseUI.java b/uitest/src/main/java/com/vaadin/tests/applicationcontext/CloseUI.java
index 8f2cddd529..467bed010f 100644
--- a/uitest/src/main/java/com/vaadin/tests/applicationcontext/CloseUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/applicationcontext/CloseUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2012 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -120,9 +120,10 @@ public class CloseUI extends AbstractTestUIWithLog {
log("Detach of " + this + " (" + getUIId() + ")");
boolean correctUI = (UI.getCurrent() == this);
boolean correctPage = (Page.getCurrent() == getPage());
- boolean correctVaadinSession = (VaadinSession.getCurrent() == getSession());
- boolean correctVaadinService = (VaadinService.getCurrent() == getSession()
- .getService());
+ boolean correctVaadinSession = (VaadinSession
+ .getCurrent() == getSession());
+ boolean correctVaadinService = (VaadinService
+ .getCurrent() == getSession().getService());
log("UI.current correct in detach: " + correctUI);
log("Page.current correct in detach: " + correctPage);
log("VaadinSession.current correct in detach: " + correctVaadinSession);
diff --git a/uitest/src/main/java/com/vaadin/tests/applicationservlet/CustomDeploymentConf.java b/uitest/src/main/java/com/vaadin/tests/applicationservlet/CustomDeploymentConf.java
index 8ae7715a77..c21a5ed173 100644
--- a/uitest/src/main/java/com/vaadin/tests/applicationservlet/CustomDeploymentConf.java
+++ b/uitest/src/main/java/com/vaadin/tests/applicationservlet/CustomDeploymentConf.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -34,9 +34,8 @@ public class CustomDeploymentConf extends AbstractTestUI {
.getService().getDeploymentConfiguration();
addComponent(new Label("Resource cache time: "
+ deploymentConfiguration.getResourceCacheTime()));
- addComponent(new Label("Custom config param: "
- + deploymentConfiguration.getApplicationOrSystemProperty(
- "customParam", null)));
+ addComponent(new Label("Custom config param: " + deploymentConfiguration
+ .getApplicationOrSystemProperty("customParam", null)));
}
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/applicationservlet/DisableSendUrlAsParameters.java b/uitest/src/main/java/com/vaadin/tests/applicationservlet/DisableSendUrlAsParameters.java
index d398ead622..2f3a21162b 100644
--- a/uitest/src/main/java/com/vaadin/tests/applicationservlet/DisableSendUrlAsParameters.java
+++ b/uitest/src/main/java/com/vaadin/tests/applicationservlet/DisableSendUrlAsParameters.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,8 @@ import com.vaadin.server.Constants;
import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractTestUIWithLog;
-@CustomDeploymentConfiguration({ @Conf(name = Constants.SERVLET_PARAMETER_SENDURLSASPARAMETERS, value = "false") })
+@CustomDeploymentConfiguration({
+ @Conf(name = Constants.SERVLET_PARAMETER_SENDURLSASPARAMETERS, value = "false") })
public class DisableSendUrlAsParameters extends AbstractTestUIWithLog {
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/applicationservlet/InitParamUIProvider.java b/uitest/src/main/java/com/vaadin/tests/applicationservlet/InitParamUIProvider.java
index 3750fdd370..0e5a5290b6 100644
--- a/uitest/src/main/java/com/vaadin/tests/applicationservlet/InitParamUIProvider.java
+++ b/uitest/src/main/java/com/vaadin/tests/applicationservlet/InitParamUIProvider.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/applicationservlet/SessionExpiration.java b/uitest/src/main/java/com/vaadin/tests/applicationservlet/SessionExpiration.java
index 206e763497..1ac71f9fb9 100644
--- a/uitest/src/main/java/com/vaadin/tests/applicationservlet/SessionExpiration.java
+++ b/uitest/src/main/java/com/vaadin/tests/applicationservlet/SessionExpiration.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/browserfeatures/WebkitScrollbarTest.java b/uitest/src/main/java/com/vaadin/tests/browserfeatures/WebkitScrollbarTest.java
index a7920b5410..6187a65c00 100644
--- a/uitest/src/main/java/com/vaadin/tests/browserfeatures/WebkitScrollbarTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/browserfeatures/WebkitScrollbarTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/AbstractComponentContainerTest.java b/uitest/src/main/java/com/vaadin/tests/components/AbstractComponentContainerTest.java
index 146e996eaf..fc4ac2a7e0 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/AbstractComponentContainerTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/AbstractComponentContainerTest.java
@@ -23,8 +23,8 @@ import com.vaadin.ui.TextField;
import com.vaadin.ui.VerticalSplitPanel;
public abstract class AbstractComponentContainerTest<T extends AbstractComponentContainer>
- extends AbstractComponentTest<T> implements ComponentAttachListener,
- ComponentDetachListener {
+ extends AbstractComponentTest<T>
+ implements ComponentAttachListener, ComponentDetachListener {
private String CATEGORY_COMPONENT_CONTAINER_FEATURES = "Component container features";
private Command<T, ComponentSize> addButtonCommand = new Command<T, ComponentSize>() {
@@ -147,9 +147,11 @@ public abstract class AbstractComponentContainerTest<T extends AbstractComponent
@Override
public void execute(T c, Boolean value, Object data) {
if (value) {
- c.addListener((ComponentAttachListener) AbstractComponentContainerTest.this);
+ c.addListener(
+ (ComponentAttachListener) AbstractComponentContainerTest.this);
} else {
- c.removeListener((ComponentAttachListener) AbstractComponentContainerTest.this);
+ c.removeListener(
+ (ComponentAttachListener) AbstractComponentContainerTest.this);
}
}
};
@@ -159,9 +161,11 @@ public abstract class AbstractComponentContainerTest<T extends AbstractComponent
@Override
public void execute(T c, Boolean value, Object data) {
if (value) {
- c.addListener((ComponentDetachListener) AbstractComponentContainerTest.this);
+ c.addListener(
+ (ComponentDetachListener) AbstractComponentContainerTest.this);
} else {
- c.removeListener((ComponentDetachListener) AbstractComponentContainerTest.this);
+ c.removeListener(
+ (ComponentDetachListener) AbstractComponentContainerTest.this);
}
}
};
@@ -312,8 +316,7 @@ public abstract class AbstractComponentContainerTest<T extends AbstractComponent
// addCommands.put("VerticalLayout", addVerticalLayoutCommand);
ComponentSize[] sizes = new ComponentSize[] {
- new ComponentSize(null, null),
- new ComponentSize("200px", null),
+ new ComponentSize(null, null), new ComponentSize("200px", null),
new ComponentSize("100%", null),
new ComponentSize(null, "200px"),
new ComponentSize(null, "100%"),
@@ -352,8 +355,8 @@ public abstract class AbstractComponentContainerTest<T extends AbstractComponent
createClickAction("auto", componentHeightCategory,
setComponentHeight, Integer.valueOf(i), null);
- createClickAction("auto", componentWidthCategory,
- setComponentWidth, Integer.valueOf(i), null);
+ createClickAction("auto", componentWidthCategory, setComponentWidth,
+ Integer.valueOf(i), null);
for (String option : options) {
createClickAction(option, componentHeightCategory,
setComponentHeight, Integer.valueOf(i), option);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/AbstractComponentTest.java b/uitest/src/main/java/com/vaadin/tests/components/AbstractComponentTest.java
index d033443a2c..a3b432800c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/AbstractComponentTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/AbstractComponentTest.java
@@ -26,9 +26,8 @@ import com.vaadin.ui.MenuBar;
import com.vaadin.ui.MenuBar.MenuItem;
import com.vaadin.ui.themes.BaseTheme;
-public abstract class AbstractComponentTest<T extends AbstractComponent>
- extends AbstractComponentTestCase<T> implements FocusListener,
- BlurListener {
+public abstract class AbstractComponentTest<T extends AbstractComponent> extends
+ AbstractComponentTestCase<T> implements FocusListener, BlurListener {
protected static final String TEXT_SHORT = "Short";
protected static final String TEXT_MEDIUM = "This is a semi-long text that might wrap.";
@@ -111,11 +110,11 @@ public abstract class AbstractComponentTest<T extends AbstractComponent>
/**
* Override to add items to the "settings" menu.
- *
+ *
* NOTE, Call super class first to preserve current order. If you override
* this in a class and another class overrides it you might break tests
* because the wrong items will be selected.
- *
+ *
* @param settingsMenu
*/
protected void populateSettingsMenu(MenuItem settingsMenu) {
@@ -208,7 +207,7 @@ public abstract class AbstractComponentTest<T extends AbstractComponent>
/**
* Construct the component that is to be tested. This method uses a no-arg
* constructor by default. Override to customize.
- *
+ *
* @return Instance of the component that is to be tested.
* @throws IllegalAccessException
* @throws InstantiationException
@@ -217,8 +216,8 @@ public abstract class AbstractComponentTest<T extends AbstractComponent>
try {
return getTestClass().newInstance();
} catch (Exception e) {
- throw new RuntimeException("Failed to instantiate "
- + getTestClass(), e);
+ throw new RuntimeException(
+ "Failed to instantiate " + getTestClass(), e);
}
}
@@ -227,7 +226,8 @@ public abstract class AbstractComponentTest<T extends AbstractComponent>
* when overriding.
*/
protected void createActions() {
- createBooleanAction("Immediate", CATEGORY_STATE, true, immediateCommand);
+ createBooleanAction("Immediate", CATEGORY_STATE, true,
+ immediateCommand);
createBooleanAction("Enabled", CATEGORY_STATE, true, enabledCommand);
createBooleanAction("Readonly", CATEGORY_STATE, false, readonlyCommand);
createBooleanAction("Visible", CATEGORY_STATE, true, visibleCommand);
@@ -299,7 +299,8 @@ public abstract class AbstractComponentTest<T extends AbstractComponent>
createSelectAction("Tab index", "State", tabIndexes, "0",
new Command<T, Integer>() {
@Override
- public void execute(T c, Integer tabIndex, Object data) {
+ public void execute(T c, Integer tabIndex,
+ Object data) {
((Focusable) c).setTabIndex(tabIndex);
}
});
@@ -356,8 +357,8 @@ public abstract class AbstractComponentTest<T extends AbstractComponent>
}
private void createCaptionSelect(String category) {
- createSelectAction("Caption", category, createCaptionOptions(),
- "Short", captionCommand);
+ createSelectAction("Caption", category, createCaptionOptions(), "Short",
+ captionCommand);
}
@@ -429,14 +430,13 @@ public abstract class AbstractComponentTest<T extends AbstractComponent>
doCommand(caption, command, initialState, data);
}
- protected <DATATYPE> void createClickAction(String caption,
- String category, final Command<T, DATATYPE> command, DATATYPE value) {
+ protected <DATATYPE> void createClickAction(String caption, String category,
+ final Command<T, DATATYPE> command, DATATYPE value) {
createClickAction(caption, category, command, value, null);
}
- protected <DATATYPE> void createClickAction(String caption,
- String category, final Command<T, DATATYPE> command,
- DATATYPE value, Object data) {
+ protected <DATATYPE> void createClickAction(String caption, String category,
+ final Command<T, DATATYPE> command, DATATYPE value, Object data) {
MenuItem categoryItem = getCategoryMenuItem(category);
categoryItem.addItem(caption, menuClickCommand(command, value, data));
}
@@ -457,7 +457,7 @@ public abstract class AbstractComponentTest<T extends AbstractComponent>
/**
* Creates category named "category" with id "categoryId" in parent category
* "parentCategory". Each categoryId must be globally unique.
- *
+ *
* @param category
* @param categoryId
* @param parentCategory
@@ -484,8 +484,8 @@ public abstract class AbstractComponentTest<T extends AbstractComponent>
protected void removeCategory(String categoryId) {
if (!hasCategory(categoryId)) {
- throw new IllegalArgumentException("Category '" + categoryId
- + "' does not exist");
+ throw new IllegalArgumentException(
+ "Category '" + categoryId + "' does not exist");
}
MenuItem item = getCategoryMenuItem(categoryId);
@@ -511,7 +511,8 @@ public abstract class AbstractComponentTest<T extends AbstractComponent>
@Override
public void menuSelected(MenuItem selectedItem) {
boolean selected = !isSelected(selectedItem);
- doCommand(getText(selectedItem), booleanCommand, selected, data);
+ doCommand(getText(selectedItem), booleanCommand, selected,
+ data);
setSelected(selectedItem, selected);
}
@@ -551,8 +552,8 @@ public abstract class AbstractComponentTest<T extends AbstractComponent>
public void menuSelected(MenuItem selectedItem) {
doCommand(getText(selectedItem), cmd, object, data);
- if (parentOfSelectableMenuItem.contains(selectedItem
- .getParent())) {
+ if (parentOfSelectableMenuItem
+ .contains(selectedItem.getParent())) {
unselectChildren(selectedItem.getParent());
setSelected(selectedItem, true);
}
@@ -564,7 +565,7 @@ public abstract class AbstractComponentTest<T extends AbstractComponent>
/**
* Unselect all child menu items
- *
+ *
* @param parent
*/
protected void unselectChildren(MenuItem parent) {
@@ -593,22 +594,16 @@ public abstract class AbstractComponentTest<T extends AbstractComponent>
return item.getParent() == mainMenu;
}
- protected <TYPE> void createSelectAction(
- String caption,
- String category,
- LinkedHashMap<String, TYPE> options,
- String initialValue,
+ protected <TYPE> void createSelectAction(String caption, String category,
+ LinkedHashMap<String, TYPE> options, String initialValue,
com.vaadin.tests.components.ComponentTestCase.Command<T, TYPE> command) {
createSelectAction(caption, category, options, initialValue, command,
null);
}
- protected <TYPE extends Enum<TYPE>> void createSelectAction(
- String caption,
- String category,
- Class<TYPE> enumType,
- TYPE initialValue,
+ protected <TYPE extends Enum<TYPE>> void createSelectAction(String caption,
+ String category, Class<TYPE> enumType, TYPE initialValue,
com.vaadin.tests.components.ComponentTestCase.Command<T, TYPE> command) {
LinkedHashMap<String, TYPE> options = new LinkedHashMap<String, TYPE>();
for (TYPE value : EnumSet.allOf(enumType)) {
@@ -618,10 +613,8 @@ public abstract class AbstractComponentTest<T extends AbstractComponent>
command);
}
- protected <TYPE> void createMultiClickAction(
- String caption,
- String category,
- LinkedHashMap<String, TYPE> options,
+ protected <TYPE> void createMultiClickAction(String caption,
+ String category, LinkedHashMap<String, TYPE> options,
com.vaadin.tests.components.ComponentTestCase.Command<T, TYPE> command,
Object data) {
@@ -629,16 +622,14 @@ public abstract class AbstractComponentTest<T extends AbstractComponent>
MenuItem mainItem = categoryItem.addItem(caption, null);
for (String option : options.keySet()) {
- MenuBar.Command cmd = menuClickCommand(command,
- options.get(option), data);
+ MenuBar.Command cmd = menuClickCommand(command, options.get(option),
+ data);
mainItem.addItem(option, cmd);
}
}
- protected <TYPE> void createMultiToggleAction(
- String caption,
- String category,
- LinkedHashMap<String, TYPE> options,
+ protected <TYPE> void createMultiToggleAction(String caption,
+ String category, LinkedHashMap<String, TYPE> options,
com.vaadin.tests.components.ComponentTestCase.Command<T, Boolean> command,
boolean defaultValue) {
@@ -652,10 +643,8 @@ public abstract class AbstractComponentTest<T extends AbstractComponent>
defaultValues);
}
- protected <TYPE> void createMultiToggleAction(
- String caption,
- String category,
- LinkedHashMap<String, TYPE> options,
+ protected <TYPE> void createMultiToggleAction(String caption,
+ String category, LinkedHashMap<String, TYPE> options,
com.vaadin.tests.components.ComponentTestCase.Command<T, Boolean> command,
LinkedHashMap<String, Boolean> defaultValues) {
@@ -668,11 +657,8 @@ public abstract class AbstractComponentTest<T extends AbstractComponent>
}
}
- protected <TYPE> void createSelectAction(
- String caption,
- String category,
- LinkedHashMap<String, TYPE> options,
- String initialValue,
+ protected <TYPE> void createSelectAction(String caption, String category,
+ LinkedHashMap<String, TYPE> options, String initialValue,
com.vaadin.tests.components.ComponentTestCase.Command<T, TYPE> command,
Object data) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/AbstractComponentTestCase.java b/uitest/src/main/java/com/vaadin/tests/components/AbstractComponentTestCase.java
index 8666956bdb..d46b9c2988 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/AbstractComponentTestCase.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/AbstractComponentTestCase.java
@@ -15,15 +15,24 @@ import com.vaadin.ui.Layout.SpacingHandler;
public abstract class AbstractComponentTestCase<T extends AbstractComponent>
extends TestBase {
- protected static final ThemeResource ICON_16_HELP_PNG_CACHEABLE = cacheableThemeResource("../runo/icons/16/help.png");
- protected static final ThemeResource ICON_16_FOLDER_PNG_CACHEABLE = cacheableThemeResource("../runo/icons/16/folder.png");
- protected static final ThemeResource ICON_16_ERROR_PNG_CACHEABLE = cacheableThemeResource("../runo/icons/16/error.png");
- protected static final ThemeResource ICON_16_USER_PNG_CACHEABLE = cacheableThemeResource("../runo/icons/16/user.png");
- protected static final ThemeResource ICON_16_USER_PNG_UNCACHEABLE = uncacheableThemeResource("../runo/icons/16/user.png");
- protected static final ThemeResource ICON_32_ATTENTION_PNG_CACHEABLE = cacheableThemeResource("../runo/icons/32/attention.png");
- protected static final ThemeResource ICON_32_ATTENTION_PNG_UNCACHEABLE = uncacheableThemeResource("../runo/icons/32/attention.png");
- protected static final ThemeResource ICON_64_EMAIL_REPLY_PNG_CACHEABLE = cacheableThemeResource("../runo/icons/64/email-reply.png");
- protected static final ThemeResource ICON_64_EMAIL_REPLY_PNG_UNCACHEABLE = uncacheableThemeResource("../runo/icons/64/email-reply.png");
+ protected static final ThemeResource ICON_16_HELP_PNG_CACHEABLE = cacheableThemeResource(
+ "../runo/icons/16/help.png");
+ protected static final ThemeResource ICON_16_FOLDER_PNG_CACHEABLE = cacheableThemeResource(
+ "../runo/icons/16/folder.png");
+ protected static final ThemeResource ICON_16_ERROR_PNG_CACHEABLE = cacheableThemeResource(
+ "../runo/icons/16/error.png");
+ protected static final ThemeResource ICON_16_USER_PNG_CACHEABLE = cacheableThemeResource(
+ "../runo/icons/16/user.png");
+ protected static final ThemeResource ICON_16_USER_PNG_UNCACHEABLE = uncacheableThemeResource(
+ "../runo/icons/16/user.png");
+ protected static final ThemeResource ICON_32_ATTENTION_PNG_CACHEABLE = cacheableThemeResource(
+ "../runo/icons/32/attention.png");
+ protected static final ThemeResource ICON_32_ATTENTION_PNG_UNCACHEABLE = uncacheableThemeResource(
+ "../runo/icons/32/attention.png");
+ protected static final ThemeResource ICON_64_EMAIL_REPLY_PNG_CACHEABLE = cacheableThemeResource(
+ "../runo/icons/64/email-reply.png");
+ protected static final ThemeResource ICON_64_EMAIL_REPLY_PNG_UNCACHEABLE = uncacheableThemeResource(
+ "../runo/icons/64/email-reply.png");
private List<T> testComponents = new ArrayList<T>();
@@ -198,7 +207,8 @@ public abstract class AbstractComponentTestCase<T extends AbstractComponent>
};
- protected <VALUET> void doCommand(Command<T, VALUET> command, VALUET value) {
+ protected <VALUET> void doCommand(Command<T, VALUET> command,
+ VALUET value) {
doCommand(command, value, null);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/AbstractLayoutTest.java b/uitest/src/main/java/com/vaadin/tests/components/AbstractLayoutTest.java
index 56c04180b8..525e28b41d 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/AbstractLayoutTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/AbstractLayoutTest.java
@@ -10,8 +10,8 @@ import com.vaadin.ui.Layout.AlignmentHandler;
import com.vaadin.ui.Layout.MarginHandler;
import com.vaadin.ui.Layout.SpacingHandler;
-public abstract class AbstractLayoutTest<T extends AbstractLayout> extends
- AbstractComponentContainerTest<T> {
+public abstract class AbstractLayoutTest<T extends AbstractLayout>
+ extends AbstractComponentContainerTest<T> {
protected static final String CATEGORY_LAYOUT_FEATURES = "Layout features";
private Command<T, MarginInfo> marginCommand = new Command<T, MarginInfo>() {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/AbstractOrderedLayoutTest.java b/uitest/src/main/java/com/vaadin/tests/components/AbstractOrderedLayoutTest.java
index 1d18cba952..b345414459 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/AbstractOrderedLayoutTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/AbstractOrderedLayoutTest.java
@@ -15,7 +15,8 @@ public abstract class AbstractOrderedLayoutTest<T extends AbstractOrderedLayout>
@Override
public void execute(T c, Boolean value, Object data) {
if (value) {
- c.addListener((LayoutClickListener) AbstractOrderedLayoutTest.this);
+ c.addListener(
+ (LayoutClickListener) AbstractOrderedLayoutTest.this);
} else {
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/AbstractOrderedLayoutWithCaptions.java b/uitest/src/main/java/com/vaadin/tests/components/AbstractOrderedLayoutWithCaptions.java
index c5dcba7e7b..34ae3baf6f 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/AbstractOrderedLayoutWithCaptions.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/AbstractOrderedLayoutWithCaptions.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.ui.VerticalLayout;
/**
* Test to see if AbstractOrderedLayout displays captions correctly with
* expanding ratios.
- *
+ *
* @author Vaadin Ltd
*/
public class AbstractOrderedLayoutWithCaptions extends AbstractTestUI {
@@ -52,7 +52,7 @@ public class AbstractOrderedLayoutWithCaptions extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -62,7 +62,7 @@ public class AbstractOrderedLayoutWithCaptions extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/AbstractTestUI.java b/uitest/src/main/java/com/vaadin/tests/components/AbstractTestUI.java
index 33ff504d8d..e2e9488a1a 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/AbstractTestUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/AbstractTestUI.java
@@ -97,13 +97,12 @@ public abstract class AbstractTestUI extends UI {
long currentWidgetsetTimestamp = currentWidgetsetFolder.lastModified();
int halfHour = 30 * 60 * 1000;
if (currentWidgetsetTimestamp + halfHour < newestWidgetsetTimestamp) {
- Notification
- .show("The currently used widgetset ("
- + usedWidgetset
+ Notification.show(
+ "The currently used widgetset (" + usedWidgetset
+ ") was compiled long before the most recently compiled one ("
+ newestWidgetsetName
+ "). Are you sure you have compiled the right widgetset?",
- Type.WARNING_MESSAGE);
+ Type.WARNING_MESSAGE);
}
}
@@ -112,7 +111,7 @@ public abstract class AbstractTestUI extends UI {
* is given. Supports transport=xhr (disables push), transport=websocket
* (forces websocket into use), transport=streaming (forces streaming into
* use). Using ?transport=xyz disables the fallback transport.
- *
+ *
* @param request
* The UI init request
*/
@@ -154,7 +153,7 @@ public abstract class AbstractTestUI extends UI {
* {@link #addComponent(Component)} instead to add the component to the
* layout used by this UI. If you don't want to use the top-level layout
* used by this class, you instead inherit directly from UI.
- *
+ *
* @deprecated Use {@link #addComponent(Component)} or inherit from UI
* instead.
*/
@@ -185,7 +184,8 @@ public abstract class AbstractTestUI extends UI {
getLayout().removeComponent(c);
}
- public void replaceComponent(Component oldComponent, Component newComponent) {
+ public void replaceComponent(Component oldComponent,
+ Component newComponent) {
getLayout().replaceComponent(oldComponent, newComponent);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/AbstractTestUIWithLog.java b/uitest/src/main/java/com/vaadin/tests/components/AbstractTestUIWithLog.java
index 6f97cbba05..83843bca99 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/AbstractTestUIWithLog.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/AbstractTestUIWithLog.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/AddRemoveSetStyleNamesTest.java b/uitest/src/main/java/com/vaadin/tests/components/AddRemoveSetStyleNamesTest.java
index c619ceb200..a15ed4427b 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/AddRemoveSetStyleNamesTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/AddRemoveSetStyleNamesTest.java
@@ -29,8 +29,9 @@ public class AddRemoveSetStyleNamesTest extends TestBase {
@Override
public void buttonClick(ClickEvent event) {
String style = (String) event.getButton().getData();
- setComponentsStyle(style, !popupDateField.getStyleName()
- .contains(style), event.getButton());
+ setComponentsStyle(style,
+ !popupDateField.getStyleName().contains(style),
+ event.getButton());
}
};
diff --git a/uitest/src/main/java/com/vaadin/tests/components/ComponentTestCase.java b/uitest/src/main/java/com/vaadin/tests/components/ComponentTestCase.java
index 9bb01cd56f..b8a1527b9f 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/ComponentTestCase.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/ComponentTestCase.java
@@ -18,8 +18,8 @@ import com.vaadin.ui.Field;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.NativeSelect;
-public abstract class ComponentTestCase<T extends AbstractComponent> extends
- AbstractComponentTestCase<T> {
+public abstract class ComponentTestCase<T extends AbstractComponent>
+ extends AbstractComponentTestCase<T> {
protected static final Object CAPTION = "caption";
@@ -51,7 +51,7 @@ public abstract class ComponentTestCase<T extends AbstractComponent> extends
/**
* Override to provide custom actions for the test case.
- *
+ *
* @param actions
* Array with default actions. Add custom actions to this. Never
* null.
@@ -64,7 +64,7 @@ public abstract class ComponentTestCase<T extends AbstractComponent> extends
* Method that creates the "actions" shown in the upper part of the screen.
* Override this only if you do not want the default actions. Custom actions
* can be added through #createCustomActions();
- *
+ *
* @return A List with actions to which more actions can be added.
*/
protected List<Component> createActions() {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/DeclarativeTestUI.java b/uitest/src/main/java/com/vaadin/tests/components/DeclarativeTestUI.java
index 568c484760..8794c69abe 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/DeclarativeTestUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/DeclarativeTestUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -147,7 +147,7 @@ public class DeclarativeTestUI extends AbstractTestUI {
* the component to the receiving type; if there's a mismatch between what
* you expect and what's written in the design, this will fail with a
* ClassCastException.
- *
+ *
* @return a Vaadin component
*/
@SuppressWarnings("unchecked")
@@ -155,15 +155,15 @@ public class DeclarativeTestUI extends AbstractTestUI {
try {
return (T) component;
} catch (ClassCastException ex) {
- getLogger().log(Level.SEVERE,
- "Component code/design type mismatch", ex);
+ getLogger().log(Level.SEVERE, "Component code/design type mismatch",
+ ex);
}
return null;
}
/**
* Get access to the logger of this class
- *
+ *
* @return a Logger instance
*/
protected Logger getLogger() {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/DisableEnableCascade.java b/uitest/src/main/java/com/vaadin/tests/components/DisableEnableCascade.java
index cd284224a0..95f3138e69 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/DisableEnableCascade.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/DisableEnableCascade.java
@@ -70,13 +70,13 @@ public class DisableEnableCascade extends TestBase {
if (target.isEnabled()) {
target.setEnabled(false);
button.setCaption(button.getCaption().replace("Disable", "Enable"));
- target.setCaption(target.getCaption()
- .replace("enabled", "disabled"));
+ target.setCaption(
+ target.getCaption().replace("enabled", "disabled"));
} else {
target.setEnabled(true);
button.setCaption(button.getCaption().replace("Enable", "Disable"));
- target.setCaption(target.getCaption()
- .replace("disabled", "enabled"));
+ target.setCaption(
+ target.getCaption().replace("disabled", "enabled"));
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/DisableEnableCascadeStyles.java b/uitest/src/main/java/com/vaadin/tests/components/DisableEnableCascadeStyles.java
index 7c5f0c9282..e56a29c17c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/DisableEnableCascadeStyles.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/DisableEnableCascadeStyles.java
@@ -101,15 +101,13 @@ public class DisableEnableCascadeStyles extends TestBase {
}
}
if (layout.getComponent(0).isEnabled()) {
- enableDisableComponentsButton
- .setCaption(enableDisableComponentsButton
- .getCaption().replace("Enable",
- "Disable"));
+ enableDisableComponentsButton.setCaption(
+ enableDisableComponentsButton.getCaption()
+ .replace("Enable", "Disable"));
} else {
- enableDisableComponentsButton
- .setCaption(enableDisableComponentsButton
- .getCaption().replace("Disable",
- "Enable"));
+ enableDisableComponentsButton.setCaption(
+ enableDisableComponentsButton.getCaption()
+ .replace("Disable", "Enable"));
}
}
});
@@ -123,13 +121,13 @@ public class DisableEnableCascadeStyles extends TestBase {
if (target.isEnabled()) {
target.setEnabled(false);
button.setCaption(button.getCaption().replace("Disable", "Enable"));
- target.setCaption(target.getCaption()
- .replace("enabled", "disabled"));
+ target.setCaption(
+ target.getCaption().replace("enabled", "disabled"));
} else {
target.setEnabled(true);
button.setCaption(button.getCaption().replace("Enable", "Disable"));
- target.setCaption(target.getCaption()
- .replace("disabled", "enabled"));
+ target.setCaption(
+ target.getCaption().replace("disabled", "enabled"));
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/FileDownloaderUI.java b/uitest/src/main/java/com/vaadin/tests/components/FileDownloaderUI.java
index b1379080e9..29c8ab5eaa 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/FileDownloaderUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/FileDownloaderUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2012 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -99,14 +99,14 @@ public class FileDownloaderUI extends AbstractTestUIWithLog {
addComponents("Class resource pdf", resource, components);
Button downloadUtf8File = new Button("Download UTF-8 named file");
- FileDownloader fd = new FileDownloader(new ClassResource(
- new EmbeddedPdf().getClass(), "åäö-日本語.pdf"));
+ FileDownloader fd = new FileDownloader(
+ new ClassResource(new EmbeddedPdf().getClass(), "åäö-日本語.pdf"));
fd.setOverrideContentType(false);
fd.extend(downloadUtf8File);
addComponent(downloadUtf8File);
- addComponent(new Button("Remove first download button",
- new ClickListener() {
+ addComponent(
+ new Button("Remove first download button", new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
@@ -115,18 +115,18 @@ public class FileDownloaderUI extends AbstractTestUIWithLog {
parent.removeComponent(firstDownloadComponent);
}
}));
- addComponent(new Button(
- "Detach FileDownloader from first download button",
- new ClickListener() {
-
- @Override
- public void buttonClick(ClickEvent event) {
- FileDownloader e = (FileDownloader) firstDownloadComponent
- .getExtensions().iterator().next();
- e.remove();
- log("FileDownload detached");
- }
- }));
+ addComponent(
+ new Button("Detach FileDownloader from first download button",
+ new ClickListener() {
+
+ @Override
+ public void buttonClick(ClickEvent event) {
+ FileDownloader e = (FileDownloader) firstDownloadComponent
+ .getExtensions().iterator().next();
+ e.remove();
+ log("FileDownload detached");
+ }
+ }));
}
public void addComponents(String caption, ConnectorResource resource,
@@ -142,8 +142,8 @@ public class FileDownloaderUI extends AbstractTestUIWithLog {
c.setId(cls.getName() + caption.replace(" ", ""));
c.setCaption(cls.getName());
- c.setDescription(resource.getMIMEType() + " / "
- + resource.getClass());
+ c.setDescription(
+ resource.getMIMEType() + " / " + resource.getClass());
c.setWidth("100px");
c.setHeight("100px");
@@ -180,8 +180,8 @@ public class FileDownloaderUI extends AbstractTestUIWithLog {
}
BufferedImage bi = getImage(text);
response.setContentType("image/png");
- response.setHeader("Content-Disposition", "attachment; filename=\""
- + path + "\"");
+ response.setHeader("Content-Disposition",
+ "attachment; filename=\"" + path + "\"");
ImageIO.write(bi, "png", response.getOutputStream());
return true;
@@ -193,16 +193,16 @@ public class FileDownloaderUI extends AbstractTestUIWithLog {
private BufferedImage getImage(String text) {
BufferedImage bi = new BufferedImage(150, 30,
BufferedImage.TYPE_3BYTE_BGR);
- bi.getGraphics()
- .drawChars(text.toCharArray(), 0, text.length(), 10, 20);
+ bi.getGraphics().drawChars(text.toCharArray(), 0, text.length(), 10,
+ 20);
return bi;
}
private BufferedImage getImage2(String text) {
BufferedImage bi = new BufferedImage(200, 200,
BufferedImage.TYPE_INT_RGB);
- bi.getGraphics()
- .drawChars(text.toCharArray(), 0, text.length(), 10, 20);
+ bi.getGraphics().drawChars(text.toCharArray(), 0, text.length(), 10,
+ 20);
return bi;
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/FocusFromShortcutAction.java b/uitest/src/main/java/com/vaadin/tests/components/FocusFromShortcutAction.java
index cffc8ca27b..6764831d34 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/FocusFromShortcutAction.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/FocusFromShortcutAction.java
@@ -13,8 +13,8 @@ public class FocusFromShortcutAction extends TestBase {
@Override
protected void setup() {
- final Select select = new Select("Select", Arrays.asList("Option 1",
- "Option 2"));
+ final Select select = new Select("Select",
+ Arrays.asList("Option 1", "Option 2"));
final TextField text = new TextField("Text");
addComponent(select);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/LayoutAttachListenerInfo.java b/uitest/src/main/java/com/vaadin/tests/components/LayoutAttachListenerInfo.java
index e118558528..9d2689810b 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/LayoutAttachListenerInfo.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/LayoutAttachListenerInfo.java
@@ -22,8 +22,8 @@ public class LayoutAttachListenerInfo extends TestBase {
@Override
protected void setup() {
- OptionGroup layouts = new OptionGroup("Layouts", Arrays.asList(
- "AbsoluteLayout", "OrderedLayout", "GridLayout"));
+ OptionGroup layouts = new OptionGroup("Layouts",
+ Arrays.asList("AbsoluteLayout", "OrderedLayout", "GridLayout"));
layouts.select("AbsoluteLayout");
layouts.setImmediate(true);
layouts.addValueChangeListener(new ValueChangeListener() {
@@ -34,7 +34,8 @@ public class LayoutAttachListenerInfo extends TestBase {
} else if (event.getProperty().getValue()
.equals("OrderedLayout")) {
testOrderedLayout();
- } else if (event.getProperty().getValue().equals("GridLayout")) {
+ } else if (event.getProperty().getValue()
+ .equals("GridLayout")) {
testGridLayout();
}
}
@@ -66,7 +67,8 @@ public class LayoutAttachListenerInfo extends TestBase {
a.setHeight("300px");
a.addComponentAttachListener(new ComponentAttachListener() {
@Override
- public void componentAttachedToContainer(ComponentAttachEvent event) {
+ public void componentAttachedToContainer(
+ ComponentAttachEvent event) {
AbsoluteLayout layout = (AbsoluteLayout) event.getContainer();
AbsoluteLayout.ComponentPosition position = layout
.getPosition(event.getAttachedComponent());
@@ -95,12 +97,12 @@ public class LayoutAttachListenerInfo extends TestBase {
v.setHeight("300px");
v.addComponentAttachListener(new ComponentAttachListener() {
@Override
- public void componentAttachedToContainer(ComponentAttachEvent event) {
+ public void componentAttachedToContainer(
+ ComponentAttachEvent event) {
VerticalLayout layout = (VerticalLayout) event.getContainer();
getMainWindow().showNotification(
- "Attached to index "
- + layout.getComponentIndex(event
- .getAttachedComponent()),
+ "Attached to index " + layout.getComponentIndex(
+ event.getAttachedComponent()),
Notification.TYPE_ERROR_MESSAGE);
}
});
@@ -125,10 +127,11 @@ public class LayoutAttachListenerInfo extends TestBase {
g.setHideEmptyRowsAndColumns(true);
g.addComponentAttachListener(new ComponentAttachListener() {
@Override
- public void componentAttachedToContainer(ComponentAttachEvent event) {
+ public void componentAttachedToContainer(
+ ComponentAttachEvent event) {
GridLayout layout = (GridLayout) event.getContainer();
- GridLayout.Area area = layout.getComponentArea(event
- .getAttachedComponent());
+ GridLayout.Area area = layout
+ .getComponentArea(event.getAttachedComponent());
getMainWindow().showNotification(
"Attached to " + area.getColumn1() + ","
+ area.getRow1(),
diff --git a/uitest/src/main/java/com/vaadin/tests/components/NoLayoutUpdateWhichNeedsLayout.java b/uitest/src/main/java/com/vaadin/tests/components/NoLayoutUpdateWhichNeedsLayout.java
index 9f63970f85..39329d7341 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/NoLayoutUpdateWhichNeedsLayout.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/NoLayoutUpdateWhichNeedsLayout.java
@@ -75,8 +75,8 @@ public class NoLayoutUpdateWhichNeedsLayout extends UI {
w = new Window("test");
w.setWidth("300px");
w.setHeight("300px");
- w.setContent(new VerticalLayout(new Label(
- "simple test label component")));
+ w.setContent(new VerticalLayout(
+ new Label("simple test label component")));
w.center();
getUI().addWindow(w);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/TestBase.java b/uitest/src/main/java/com/vaadin/tests/components/TestBase.java
index 15f39f6e5d..f2d48a9ffa 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/TestBase.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/TestBase.java
@@ -7,7 +7,7 @@ import com.vaadin.ui.LegacyWindow;
import com.vaadin.ui.VerticalLayout;
/**
- *
+ *
* @deprecated Use {@link AbstractTestUI} or {@link AbstractTestUIWithLog}
* instead. TestBase is a LegacyApplication
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/components/TooltipDelay.java b/uitest/src/main/java/com/vaadin/tests/components/TooltipDelay.java
index 06fec3b233..6aff2b4e2c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/TooltipDelay.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/TooltipDelay.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import com.vaadin.ui.Button;
/**
* Test to see if tooltip delay is working properly.
- *
+ *
* @author Vaadin Ltd
*/
public class TooltipDelay extends AbstractTestUI {
@@ -38,7 +38,7 @@ public class TooltipDelay extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -48,7 +48,7 @@ public class TooltipDelay extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/TooltipPosition.java b/uitest/src/main/java/com/vaadin/tests/components/TooltipPosition.java
index 30222722d9..18eae4c68d 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/TooltipPosition.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/TooltipPosition.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.ui.VerticalLayout;
/**
* This UI is used for testing that a tooltip is not positioned partially
* outside the browser window when there is enough space to display it.
- *
+ *
* @author Vaadin Ltd
*/
public class TooltipPosition extends AbstractTestUI {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/TooltipsOnScrollingWindow.java b/uitest/src/main/java/com/vaadin/tests/components/TooltipsOnScrollingWindow.java
index a38f9c274e..6a9ef2a034 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/TooltipsOnScrollingWindow.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/TooltipsOnScrollingWindow.java
@@ -9,13 +9,11 @@ public class TooltipsOnScrollingWindow extends TestBase {
@Override
protected void setup() {
- TestUtils
- .injectCSS(
- getMainWindow(),
- ".v-generated-body { overflow: auto; } "
- + ".v-app, .v-ui { overflow: visible !important;}"
- + ".hoverable-label { position: fixed; bottom: 10px; right: 10px; }"
- + ".hidden-label { position: absolute; top: 2000px; left: 2000px;}");
+ TestUtils.injectCSS(getMainWindow(),
+ ".v-generated-body { overflow: auto; } "
+ + ".v-app, .v-ui { overflow: visible !important;}"
+ + ".hoverable-label { position: fixed; bottom: 10px; right: 10px; }"
+ + ".hidden-label { position: absolute; top: 2000px; left: 2000px;}");
getLayout().getParent().setHeight("4000px");
getLayout().getParent().setWidth("4000px");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/TouchDevicesTooltip.java b/uitest/src/main/java/com/vaadin/tests/components/TouchDevicesTooltip.java
index 764d5a49a3..626f9c3565 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/TouchDevicesTooltip.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/TouchDevicesTooltip.java
@@ -26,8 +26,8 @@ public class TouchDevicesTooltip extends AbstractTestUI {
private void createTextField(int n) {
TextField textField = new TextField("Value" + n);
textField.setConverter(new StringToIntegerConverter());
- textField.addValidator(new IntegerRangeValidator(getErrorMessage(n), 0,
- 100));
+ textField.addValidator(
+ new IntegerRangeValidator(getErrorMessage(n), 0, 100));
textField.setImmediate(true);
textField.setValue("-5");
addComponent(textField);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/TouchScrollables.java b/uitest/src/main/java/com/vaadin/tests/components/TouchScrollables.java
index 1af1cc82e9..691f93b09e 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/TouchScrollables.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/TouchScrollables.java
@@ -49,16 +49,14 @@ public class TouchScrollables extends TestBase {
addTest(getAccordionTest());
addTest(getSubWindowTest());
- TestUtils
- .injectCSS(
- getLayout().getUI(),
- "body * {-webkit-user-select: none;} .v-table-row-drag-middle .v-table-cell-content {"
- + " background-color: inherit ; border-bottom: 1px solid cyan;"
- + "}"
- + ".v-table-row-drag-middle .v-table-cell-wrapper {"
- + " margin-bottom: -1px;" + "}" + ""
-
- );
+ TestUtils.injectCSS(getLayout().getUI(),
+ "body * {-webkit-user-select: none;} .v-table-row-drag-middle .v-table-cell-content {"
+ + " background-color: inherit ; border-bottom: 1px solid cyan;"
+ + "}"
+ + ".v-table-row-drag-middle .v-table-cell-wrapper {"
+ + " margin-bottom: -1px;" + "}" + ""
+
+ );
}
private Component getPanelTest() {
@@ -200,7 +198,8 @@ public class TouchScrollables extends TestBase {
}
@Override
- public void handleAction(Action action, Object sender, Object target) {
+ public void handleAction(Action action, Object sender,
+ Object target) {
Notification.show(action.getCaption());
}
@@ -239,7 +238,8 @@ public class TouchScrollables extends TestBase {
IndexedContainer containerDataSource = (IndexedContainer) table
.getContainerDataSource();
int newIndex = containerDataSource.indexOfId(itemIdOver) - 1;
- if (dropTargetData.getDropLocation() != VerticalDropLocation.TOP) {
+ if (dropTargetData
+ .getDropLocation() != VerticalDropLocation.TOP) {
newIndex++;
}
if (newIndex < 0) {
@@ -296,8 +296,8 @@ public class TouchScrollables extends TestBase {
for (int i = 0; i < 40; i++) {
Item addItem = table.addItem("Item" + i);
Person p = testData.getIdByIndex(i);
- addItem.getItemProperty("Name").setValue(
- p.getFirstName() + " " + p.getLastName());
+ addItem.getItemProperty("Name")
+ .setValue(p.getFirstName() + " " + p.getLastName());
addItem.getItemProperty("Weight").setValue(50 + r.nextInt(60));
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/UnknownComponentConnector.java b/uitest/src/main/java/com/vaadin/tests/components/UnknownComponentConnector.java
index 982ff8d71e..e4c3eb7766 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/UnknownComponentConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/UnknownComponentConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutHideComponent.java b/uitest/src/main/java/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutHideComponent.java
index 8b76b0e4e1..a92586d823 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutHideComponent.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutHideComponent.java
@@ -89,8 +89,8 @@ public class AbsoluteLayoutHideComponent extends AbstractTestUI {
// =====> THIS CODE generates error
// WITHOUT THIS CODE works fine
- Embedded e = new Embedded("", new ThemeResource(
- "../runo/icons/64/ok.png"));
+ Embedded e = new Embedded("",
+ new ThemeResource("../runo/icons/64/ok.png"));
// e.setMimeType("image/jpg");
e.setWidth("100%");
e.setHeight("100%");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutRelativeSizeContent.java b/uitest/src/main/java/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutRelativeSizeContent.java
index 4e1c8f5ca2..eaa450e070 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutRelativeSizeContent.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutRelativeSizeContent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ import com.vaadin.ui.Table;
/**
* Tests how AbsoluteLayout handles relative sized contents.
- *
+ *
* @author Vaadin Ltd
*/
@Theme("tests-tickets")
@@ -36,8 +36,8 @@ public class AbsoluteLayoutRelativeSizeContent extends AbstractTestUI {
protected void setup(VaadinRequest request) {
HorizontalLayout level1 = new HorizontalLayout(
createComparisonTableOnFixed(), createTableOnFixed(),
- createHalfTableOnFixed(),
- createHalfTableAndFixedTableOnFixed(), createHalfTableOnFull());
+ createHalfTableOnFixed(), createHalfTableAndFixedTableOnFixed(),
+ createHalfTableOnFull());
level1.setSpacing(true);
level1.setWidth(100, Unit.PERCENTAGE);
level1.setExpandRatio(
@@ -60,7 +60,7 @@ public class AbsoluteLayoutRelativeSizeContent extends AbstractTestUI {
* Creates an {@link AbsoluteLayout} of fixed size that contains a
* full-sized {@link Table} that has been forced to full size with css.
* Represents the workaround given for this ticket.
- *
+ *
* @return the created layout
*/
private Component createComparisonTableOnFixed() {
@@ -79,7 +79,7 @@ public class AbsoluteLayoutRelativeSizeContent extends AbstractTestUI {
/**
* Creates an {@link AbsoluteLayout} of fixed size that contains a
* full-sized {@link Table}.
- *
+ *
* @return the created layout
*/
private Component createTableOnFixed() {
@@ -98,7 +98,7 @@ public class AbsoluteLayoutRelativeSizeContent extends AbstractTestUI {
/**
* Creates an {@link AbsoluteLayout} of fixed size that contains a
* half-sized {@link Table}.
- *
+ *
* @return the created layout
*/
private Component createHalfTableOnFixed() {
@@ -163,7 +163,7 @@ public class AbsoluteLayoutRelativeSizeContent extends AbstractTestUI {
/**
* Creates an {@link AbsoluteLayout} of fixed size that contains a
* fixed-sized {@link AbsoluteLayout}.
- *
+ *
* @return the created layout
*/
private Component createFullOnFixed() {
@@ -186,7 +186,7 @@ public class AbsoluteLayoutRelativeSizeContent extends AbstractTestUI {
/**
* Creates an {@link AbsoluteLayout} of full size that contains another
* full-sized {@link AbsoluteLayout}.
- *
+ *
* @return the created layout
*/
private AbsoluteLayout createFullOnFull() {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutResizing.java b/uitest/src/main/java/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutResizing.java
index 810a583ba5..e7ed64d263 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutResizing.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutResizing.java
@@ -15,9 +15,11 @@ public class AbsoluteLayoutResizing extends TestBase {
AbsoluteLayout al = new AbsoluteLayout();
TextArea ta = new TextArea();
- ta.setValue("When resizing the layout this text area should also get resized");
+ ta.setValue(
+ "When resizing the layout this text area should also get resized");
ta.setSizeFull();
- al.addComponent(ta, "left: 10px; right: 10px; top: 10px; bottom: 10px;");
+ al.addComponent(ta,
+ "left: 10px; right: 10px; top: 10px; bottom: 10px;");
HorizontalSplitPanel horizPanel = new HorizontalSplitPanel();
horizPanel.setSizeFull();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/AllComponentTooltipTest.java b/uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/AllComponentTooltipTest.java
index 777eb4b518..28ba5a6d92 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/AllComponentTooltipTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/AllComponentTooltipTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/ChangeHierarchyBeforeResponse.java b/uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/ChangeHierarchyBeforeResponse.java
index e6daf8356c..51e5a13af5 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/ChangeHierarchyBeforeResponse.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/ChangeHierarchyBeforeResponse.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/ContextClickUI.java b/uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/ContextClickUI.java
index f412be726a..8b3317a503 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/ContextClickUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/ContextClickUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/PrimaryStyle.java b/uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/PrimaryStyle.java
index 1a15e7c5ae..27780a3bc7 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/PrimaryStyle.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/PrimaryStyle.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/RemSizeUnitTest.java b/uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/RemSizeUnitTest.java
index 5924ab7d32..6a0754eed3 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/RemSizeUnitTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/RemSizeUnitTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/ResponseWritingErrorHandling.java b/uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/ResponseWritingErrorHandling.java
index 23be0f62b4..f9086f6401 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/ResponseWritingErrorHandling.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/ResponseWritingErrorHandling.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/UseStateFromHierachy.java b/uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/UseStateFromHierachy.java
index 0697286f38..fc1f596fb8 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/UseStateFromHierachy.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/abstractcomponent/UseStateFromHierachy.java
@@ -1,12 +1,12 @@
/*
* Copyright 2012 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractComponentDataBindingTest.java b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractComponentDataBindingTest.java
index 2eef498aff..e621375bcf 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractComponentDataBindingTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractComponentDataBindingTest.java
@@ -38,11 +38,11 @@ public abstract class AbstractComponentDataBindingTest extends TestBase
cb.setNullSelectionAllowed(false);
for (Locale l : Locale.getAvailableLocales()) {
Item i = cb.addItem(l);
- i.getItemProperty(CAPTION).setValue(
- l.getDisplayName(Locale.ENGLISH));
+ i.getItemProperty(CAPTION)
+ .setValue(l.getDisplayName(Locale.ENGLISH));
}
- ((Container.Sortable) cb.getContainerDataSource()).sort(
- new Object[] { CAPTION }, new boolean[] { true });
+ ((Container.Sortable) cb.getContainerDataSource())
+ .sort(new Object[] { CAPTION }, new boolean[] { true });
cb.setImmediate(true);
cb.addListener(new ValueChangeListener() {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractFieldCommitWithInvalidValues.java b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractFieldCommitWithInvalidValues.java
index 0aaa7c5f13..d210aeee6f 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractFieldCommitWithInvalidValues.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractFieldCommitWithInvalidValues.java
@@ -27,7 +27,8 @@ public class AbstractFieldCommitWithInvalidValues extends TestBase {
protected void setup() {
tf = new TextField("A field, must contain 1-2 chars",
new ObjectProperty<String>("a"));
- tf.addValidator(new StringLengthValidator("Invalid length", 1, 2, false));
+ tf.addValidator(
+ new StringLengthValidator("Invalid length", 1, 2, false));
tf.setBuffered(true);
tf.setRequired(true);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractFieldTest.java b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractFieldTest.java
index 496a44a6c1..a7dffc9de5 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractFieldTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractFieldTest.java
@@ -18,9 +18,9 @@ import com.vaadin.ui.AbstractField;
import com.vaadin.ui.MenuBar;
import com.vaadin.ui.MenuBar.MenuItem;
-public abstract class AbstractFieldTest<T extends AbstractField> extends
- AbstractComponentTest<T> implements ValueChangeListener,
- ReadOnlyStatusChangeListener {
+public abstract class AbstractFieldTest<T extends AbstractField>
+ extends AbstractComponentTest<T>
+ implements ValueChangeListener, ReadOnlyStatusChangeListener {
private boolean sortValueChanges = true;
@@ -54,8 +54,8 @@ public abstract class AbstractFieldTest<T extends AbstractField> extends
super.populateSettingsMenu(settingsMenu);
if (AbstractField.class.isAssignableFrom(getTestClass())) {
- MenuItem abstractField = settingsMenu
- .addItem("AbstractField", null);
+ MenuItem abstractField = settingsMenu.addItem("AbstractField",
+ null);
abstractField.addItem("Show value", new MenuBar.Command() {
@Override
@@ -101,8 +101,8 @@ public abstract class AbstractFieldTest<T extends AbstractField> extends
private void createReadOnlyStatusChangeListener(String category) {
- createBooleanAction("Read only status change listener", category,
- false, readonlyStatusChangeListenerCommand);
+ createBooleanAction("Read only status change listener", category, false,
+ readonlyStatusChangeListenerCommand);
}
protected Command<T, Boolean> valueChangeListenerCommand = new Command<T, Boolean>() {
@@ -121,9 +121,11 @@ public abstract class AbstractFieldTest<T extends AbstractField> extends
@Override
public void execute(T c, Boolean value, Object data) {
if (value) {
- c.addListener((ReadOnlyStatusChangeListener) AbstractFieldTest.this);
+ c.addListener(
+ (ReadOnlyStatusChangeListener) AbstractFieldTest.this);
} else {
- c.removeListener((ReadOnlyStatusChangeListener) AbstractFieldTest.this);
+ c.removeListener(
+ (ReadOnlyStatusChangeListener) AbstractFieldTest.this);
}
}
};
@@ -189,7 +191,8 @@ public abstract class AbstractFieldTest<T extends AbstractField> extends
List<String> values = new ArrayList<String>();
values.add("Test");
values.add("A little longer value");
- values.add("A very long value with very much text. All in all it is 74 characters long");
+ values.add(
+ "A very long value with very much text. All in all it is 74 characters long");
createClickAction("(empty string)", subCategory, setValueCommand, "");
createClickAction("(null)", subCategory, setValueCommand, null);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractTextFieldTest.java b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractTextFieldTest.java
index 1f407c710f..490c3175d6 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractTextFieldTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractTextFieldTest.java
@@ -48,7 +48,8 @@ public abstract class AbstractTextFieldTest<T extends AbstractTextField>
if (value) {
c.addListener((TextChangeListener) AbstractTextFieldTest.this);
} else {
- c.removeListener((TextChangeListener) AbstractTextFieldTest.this);
+ c.removeListener(
+ (TextChangeListener) AbstractTextFieldTest.this);
}
}
};
diff --git a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/DateFieldBackedByString.java b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/DateFieldBackedByString.java
index d4b2f89522..8243848f97 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/DateFieldBackedByString.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/DateFieldBackedByString.java
@@ -10,8 +10,9 @@ public class DateFieldBackedByString extends AbstractComponentDataBindingTest {
protected void createFields() {
DateField df = new DateField("Date field");
addComponent(df);
- df.setPropertyDataSource(new com.vaadin.data.util.ObjectProperty<String>(
- s, String.class));
+ df.setPropertyDataSource(
+ new com.vaadin.data.util.ObjectProperty<String>(s,
+ String.class));
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/DoubleInTextField.java b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/DoubleInTextField.java
index 4fd81081ea..032381b932 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/DoubleInTextField.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/DoubleInTextField.java
@@ -17,13 +17,13 @@ public class DoubleInTextField extends AbstractComponentDataBindingTest {
TextField salary = new TextField("Vaadin 7 - TextField with Double");
addComponent(salary);
- salary.setPropertyDataSource(new MethodProperty<Double>(person,
- "salaryDouble"));
+ salary.setPropertyDataSource(
+ new MethodProperty<Double>(person, "salaryDouble"));
TextField salary6 = new TextField("Vaadin 6 - TextField with Double");
addComponent(salary6);
- salary6.setPropertyDataSource(new MethodProperty<Double>(person,
- "salaryDouble"));
+ salary6.setPropertyDataSource(
+ new MethodProperty<Double>(person, "salaryDouble"));
salary6.setConverter(new Vaadin6ImplicitDoubleConverter());
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/FieldFocusOnClick.java b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/FieldFocusOnClick.java
index 716c1d4348..5ba9e16207 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/FieldFocusOnClick.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/FieldFocusOnClick.java
@@ -15,8 +15,8 @@ public class FieldFocusOnClick extends AbstractTestUI {
protected void setup(VaadinRequest request) {
addComponent(new TextField(null, "TextField"));
addComponent(new CheckBox("CheckBox"));
- addComponent(new OptionGroup(null,
- Arrays.asList("Option 1", "Option 2")));
+ addComponent(
+ new OptionGroup(null, Arrays.asList("Option 1", "Option 2")));
addComponent(new NativeButton("NativeButton"));
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/RequiredIndicatorForFieldsWithoutCaption.java b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/RequiredIndicatorForFieldsWithoutCaption.java
index 56e593ce0f..ba1d38be63 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/RequiredIndicatorForFieldsWithoutCaption.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/RequiredIndicatorForFieldsWithoutCaption.java
@@ -72,7 +72,7 @@ public class RequiredIndicatorForFieldsWithoutCaption extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -82,7 +82,7 @@ public class RequiredIndicatorForFieldsWithoutCaption extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/ShortcutWhenBodyFocused.java b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/ShortcutWhenBodyFocused.java
index 41a5febc16..d41a71d0dd 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/ShortcutWhenBodyFocused.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/ShortcutWhenBodyFocused.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/Vaadin6ImplicitDoubleConverter.java b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/Vaadin6ImplicitDoubleConverter.java
index 33359cc2c6..5c6ea9fd6d 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/Vaadin6ImplicitDoubleConverter.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/Vaadin6ImplicitDoubleConverter.java
@@ -4,8 +4,8 @@ import java.util.Locale;
import com.vaadin.data.util.converter.Converter;
-public class Vaadin6ImplicitDoubleConverter implements
- Converter<String, Double> {
+public class Vaadin6ImplicitDoubleConverter
+ implements Converter<String, Double> {
@Override
public Double convertToModel(String value,
diff --git a/uitest/src/main/java/com/vaadin/tests/components/accordion/AccordionAddTab.java b/uitest/src/main/java/com/vaadin/tests/components/accordion/AccordionAddTab.java
index 46fdbac797..87c4a6bd46 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/accordion/AccordionAddTab.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/accordion/AccordionAddTab.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import com.vaadin.ui.VerticalLayout;
/**
* Test UI for Accordion: old widget should be removed from the tab.
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/components/accordion/AccordionPrimaryStylenames.java b/uitest/src/main/java/com/vaadin/tests/components/accordion/AccordionPrimaryStylenames.java
index bd7f047fc7..32124372fd 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/accordion/AccordionPrimaryStylenames.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/accordion/AccordionPrimaryStylenames.java
@@ -16,8 +16,8 @@ public class AccordionPrimaryStylenames extends TestBase {
acc.setPrimaryStyleName("my-accordion");
addComponent(acc);
- addComponent(new Button("Set primary stylename",
- new Button.ClickListener() {
+ addComponent(
+ new Button("Set primary stylename", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
acc.setPrimaryStyleName("my-second-accordion");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/accordion/AccordionRemoveComponent.java b/uitest/src/main/java/com/vaadin/tests/components/accordion/AccordionRemoveComponent.java
index 80e0929f8d..876be6d8f1 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/accordion/AccordionRemoveComponent.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/accordion/AccordionRemoveComponent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.ui.Button.ClickEvent;
/**
* Test for removing component from Accordion.
- *
+ *
* @author Vaadin Ltd
*/
public class AccordionRemoveComponent extends AbstractTestUI {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/accordion/AccordionRemoveTab.java b/uitest/src/main/java/com/vaadin/tests/components/accordion/AccordionRemoveTab.java
index af54e15b5a..9256848d2c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/accordion/AccordionRemoveTab.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/accordion/AccordionRemoveTab.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -26,7 +26,7 @@ import com.vaadin.ui.VerticalLayout;
/**
* Test UI for Accordion: tabs should stay selectable after remove tab.
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/components/beanitemcontainer/BeanItemContainerNullValues.java b/uitest/src/main/java/com/vaadin/tests/components/beanitemcontainer/BeanItemContainerNullValues.java
index 605ab676b6..877f521332 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/beanitemcontainer/BeanItemContainerNullValues.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/beanitemcontainer/BeanItemContainerNullValues.java
@@ -23,8 +23,8 @@ public class BeanItemContainerNullValues extends TestBase {
protected void setup() {
table = new Table();
table.setSortDisabled(false);
- table.setContainerDataSource(BeanItemContainerGenerator
- .createContainer(100, 1));
+ table.setContainerDataSource(
+ BeanItemContainerGenerator.createContainer(100, 1));
table.setColumnCollapsingAllowed(true);
Button b = new Button("Disable sorting", new Button.ClickListener() {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/browserframe/BrowserFrameIsVisible.java b/uitest/src/main/java/com/vaadin/tests/components/browserframe/BrowserFrameIsVisible.java
index 4e9c133bea..e0ebc9bf37 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/browserframe/BrowserFrameIsVisible.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/browserframe/BrowserFrameIsVisible.java
@@ -101,8 +101,8 @@ public class BrowserFrameIsVisible extends TestBase {
ByteArrayInputStream istream;
try {
- istream = new ByteArrayInputStream(sb.toString().getBytes(
- "UTF-8"));
+ istream = new ByteArrayInputStream(
+ sb.toString().getBytes("UTF-8"));
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/button/ButtonClick.java b/uitest/src/main/java/com/vaadin/tests/components/button/ButtonClick.java
index 9b10473d0f..c28df2fb15 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/button/ButtonClick.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/button/ButtonClick.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/button/ButtonEnterWithWindowShortcut.java b/uitest/src/main/java/com/vaadin/tests/components/button/ButtonEnterWithWindowShortcut.java
index 0d4981a441..cbb0be14d5 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/button/ButtonEnterWithWindowShortcut.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/button/ButtonEnterWithWindowShortcut.java
@@ -18,7 +18,8 @@ public class ButtonEnterWithWindowShortcut extends TestBase {
private static final long serialVersionUID = -4976129418325394913L;
@Override
- public void handleAction(Action action, Object sender, Object target) {
+ public void handleAction(Action action, Object sender,
+ Object target) {
log.log(action.getCaption() + " pressed in window");
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/button/ButtonHtml.java b/uitest/src/main/java/com/vaadin/tests/components/button/ButtonHtml.java
index 5cdc34e8e8..1c3070f38b 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/button/ButtonHtml.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/button/ButtonHtml.java
@@ -21,8 +21,8 @@ public class ButtonHtml extends TestBase {
@Override
public void buttonClick(ClickEvent event) {
- swapButton.setHtmlContentAllowed(!swapButton
- .isHtmlContentAllowed());
+ swapButton.setHtmlContentAllowed(
+ !swapButton.isHtmlContentAllowed());
}
});
addComponent(swapButton);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/button/ButtonIOSDragTest.java b/uitest/src/main/java/com/vaadin/tests/components/button/ButtonIOSDragTest.java
index 6031bff152..0b3eec3829 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/button/ButtonIOSDragTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/button/ButtonIOSDragTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/button/ButtonKeyboardClick.java b/uitest/src/main/java/com/vaadin/tests/components/button/ButtonKeyboardClick.java
index 35e9f737c6..2e9b5a9806 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/button/ButtonKeyboardClick.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/button/ButtonKeyboardClick.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.ui.Label;
/**
* Test UI for availability (x,y) coordinates for button activated via keyboard.
- *
+ *
* @author Vaadin Ltd
*/
public class ButtonKeyboardClick extends AbstractTestUI {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/button/ButtonTabIndex.java b/uitest/src/main/java/com/vaadin/tests/components/button/ButtonTabIndex.java
index cfec4d1100..b577d271ea 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/button/ButtonTabIndex.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/button/ButtonTabIndex.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/button/ButtonToggleIcons.java b/uitest/src/main/java/com/vaadin/tests/components/button/ButtonToggleIcons.java
index 9e37fef7d9..1e0f85446e 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/button/ButtonToggleIcons.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/button/ButtonToggleIcons.java
@@ -33,6 +33,7 @@ public class ButtonToggleIcons extends UI {
};
layout.addComponent(new Button("Toggle icon", iconToggleListener));
- layout.addComponent(new NativeButton("Toggle icon", iconToggleListener));
+ layout.addComponent(
+ new NativeButton("Toggle icon", iconToggleListener));
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/button/ButtonUpdateAltText.java b/uitest/src/main/java/com/vaadin/tests/components/button/ButtonUpdateAltText.java
index dd89d1b9a7..35b9c800ff 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/button/ButtonUpdateAltText.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/button/ButtonUpdateAltText.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -15,7 +15,7 @@
*/
/**
- *
+ *
*/
package com.vaadin.tests.components.button;
@@ -28,7 +28,7 @@ import com.vaadin.ui.Button;
import com.vaadin.ui.CheckBox;
/**
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -39,7 +39,7 @@ public class ButtonUpdateAltText extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -68,7 +68,7 @@ public class ButtonUpdateAltText extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -78,7 +78,7 @@ public class ButtonUpdateAltText extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/button/Buttons.java b/uitest/src/main/java/com/vaadin/tests/components/button/Buttons.java
index 573c95c2b8..a6c4e326fe 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/button/Buttons.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/button/Buttons.java
@@ -42,7 +42,8 @@ public class Buttons extends ComponentTestCase<Button> {
l = createButton(
"This is a 100% wide button with fixed 65px height. "
- + LoremIpsum.get(5000), nat);
+ + LoremIpsum.get(5000),
+ nat);
l.setWidth("100%");
l.setHeight("65px");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/button/Buttons3.java b/uitest/src/main/java/com/vaadin/tests/components/button/Buttons3.java
index b20effad97..12e4ef9a4b 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/button/Buttons3.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/button/Buttons3.java
@@ -4,8 +4,8 @@ import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Button.ClickListener;
-public class Buttons3<T extends Button> extends Buttons2<T> implements
- ClickListener {
+public class Buttons3<T extends Button> extends Buttons2<T>
+ implements ClickListener {
@Override
public void buttonClick(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/button/ShortCutListenerModification.java b/uitest/src/main/java/com/vaadin/tests/components/button/ShortCutListenerModification.java
index 9cdd803fe0..025dfbb9c3 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/button/ShortCutListenerModification.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/button/ShortCutListenerModification.java
@@ -12,8 +12,8 @@ import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.Window;
@SuppressWarnings("serial")
-public class ShortCutListenerModification extends TestBase implements
- ClickListener {
+public class ShortCutListenerModification extends TestBase
+ implements ClickListener {
@Override
protected String getDescription() {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/calendar/BeanItemContainerTestUI.java b/uitest/src/main/java/com/vaadin/tests/components/calendar/BeanItemContainerTestUI.java
index bda3b34875..afc6f570c0 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/calendar/BeanItemContainerTestUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/calendar/BeanItemContainerTestUI.java
@@ -67,8 +67,8 @@ public class BeanItemContainerTestUI extends UI {
// Add event table connected to same data source
table = createTable();
table.setContainerDataSource(events);
- table.setVisibleColumns(new Object[] { "caption", "description",
- "start", "end" });
+ table.setVisibleColumns(
+ new Object[] { "caption", "description", "start", "end" });
content.addComponent(table);
BasicEvent longEvent = new BasicEvent();
@@ -81,7 +81,7 @@ public class BeanItemContainerTestUI extends UI {
/**
* Creates a table with some actions
- *
+ *
* @return
*/
private Table createTable() {
@@ -94,7 +94,8 @@ public class BeanItemContainerTestUI extends UI {
private final Action REMOVE = new Action("Remove event");
@Override
- public void handleAction(Action action, Object sender, Object target) {
+ public void handleAction(Action action, Object sender,
+ Object target) {
if (action == ADD) {
BasicEvent event = new BasicEvent();
event.setStart(new Date(100, 1, 1));
@@ -121,7 +122,7 @@ public class BeanItemContainerTestUI extends UI {
/**
* Opens up a modal dialog window where an event can be modified
- *
+ *
* @param event
* The event to modify
*/
@@ -156,8 +157,8 @@ public class BeanItemContainerTestUI extends UI {
fieldGroup.bind(startField, ContainerEventProvider.STARTDATE_PROPERTY);
fieldGroup.bind(endField, ContainerEventProvider.ENDDATE_PROPERTY);
- fieldGroup.setItemDataSource(new BeanItem<BasicEvent>(event, Arrays
- .asList(ContainerEventProvider.CAPTION_PROPERTY,
+ fieldGroup.setItemDataSource(new BeanItem<BasicEvent>(event,
+ Arrays.asList(ContainerEventProvider.CAPTION_PROPERTY,
ContainerEventProvider.DESCRIPTION_PROPERTY,
ContainerEventProvider.STARTDATE_PROPERTY,
ContainerEventProvider.ENDDATE_PROPERTY)));
diff --git a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarActionEventSource.java b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarActionEventSource.java
index ec40ef4649..a8b76abf2e 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarActionEventSource.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarActionEventSource.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -49,8 +49,9 @@ public class CalendarActionEventSource extends AbstractTestUI {
CalendarEvent event = null;
try {
- event = new BasicEvent("NAME", null, new SimpleDateFormat(
- "yyyy-MM-dd hh:mm").parse("2013-01-01 07:00"),
+ event = new BasicEvent("NAME", null,
+ new SimpleDateFormat("yyyy-MM-dd hh:mm")
+ .parse("2013-01-01 07:00"),
new SimpleDateFormat("yyyy-MM-dd hh:mm")
.parse("2013-01-01 11:00"));
} catch (ParseException e) {
@@ -63,10 +64,10 @@ public class CalendarActionEventSource extends AbstractTestUI {
});
try {
- calendar.setStartDate(new SimpleDateFormat("yyyy-MM-dd")
- .parse("2013-01-01"));
- calendar.setEndDate(new SimpleDateFormat("yyyy-MM-dd")
- .parse("2013-01-31"));
+ calendar.setStartDate(
+ new SimpleDateFormat("yyyy-MM-dd").parse("2013-01-01"));
+ calendar.setEndDate(
+ new SimpleDateFormat("yyyy-MM-dd").parse("2013-01-31"));
} catch (ParseException e) {
// Nothing to do
}
@@ -79,7 +80,8 @@ public class CalendarActionEventSource extends AbstractTestUI {
setEnabled(true);
calendar.addActionHandler(new Handler() {
@Override
- public void handleAction(Action action, Object sender, Object target) {
+ public void handleAction(Action action, Object sender,
+ Object target) {
Label label1 = new Label(calendar.toString());
label1.setId("calendarlabel");
addComponent(label1);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarActionsMenuTest.java b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarActionsMenuTest.java
index 5b05d188bd..2f1bf8e734 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarActionsMenuTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarActionsMenuTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -79,10 +79,10 @@ public class CalendarActionsMenuTest extends AbstractTestUI {
});
try {
- calendar.setStartDate(new SimpleDateFormat("yyyy-MM-dd")
- .parse("2013-01-01"));
- calendar.setEndDate(new SimpleDateFormat("yyyy-MM-dd")
- .parse("2013-01-31"));
+ calendar.setStartDate(
+ new SimpleDateFormat("yyyy-MM-dd").parse("2013-01-01"));
+ calendar.setEndDate(
+ new SimpleDateFormat("yyyy-MM-dd").parse("2013-01-31"));
} catch (ParseException e) {
// Nothing to do
}
@@ -95,7 +95,8 @@ public class CalendarActionsMenuTest extends AbstractTestUI {
setEnabled(true);
calendar.addActionHandler(new Handler() {
@Override
- public void handleAction(Action action, Object sender, Object target) {
+ public void handleAction(Action action, Object sender,
+ Object target) {
Notification.show("ACTION CLICKED");
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarActionsUI.java b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarActionsUI.java
index ee898e0790..799ed3c8d3 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarActionsUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarActionsUI.java
@@ -52,13 +52,14 @@ public class CalendarActionsUI extends UI {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.event.Action.Handler#handleAction(com.vaadin.event
* .Action, java.lang.Object, java.lang.Object)
*/
@Override
- public void handleAction(Action action, Object sender, Object target) {
+ public void handleAction(Action action, Object sender,
+ Object target) {
Date date = (Date) target;
if (action == NEW_EVENT) {
BasicEvent event = new BasicEvent("New event",
@@ -69,7 +70,7 @@ public class CalendarActionsUI extends UI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.event.Action.Handler#getActions(java.lang.Object,
* java.lang.Object)
*/
@@ -96,8 +97,8 @@ public class CalendarActionsUI extends UI {
content.addComponent(calendar);
- content.addComponent(new Button("Set week view",
- new Button.ClickListener() {
+ content.addComponent(
+ new Button("Set week view", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
calendar.setEndDate(new Date(100, 1, 7));
diff --git a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarBackwardForward.java b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarBackwardForward.java
index 5a21353d7d..b884643cc7 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarBackwardForward.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarBackwardForward.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ import com.vaadin.ui.components.calendar.event.BasicEvent;
/**
* Test: Vaadin Calendar: Navigation to invisible days of week (#12243)
- *
+ *
* @author Vaadin Ltd
*/
@Theme("tests-calendar")
@@ -40,7 +40,7 @@ public class CalendarBackwardForward extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -50,32 +50,35 @@ public class CalendarBackwardForward extends AbstractTestUI {
try {
- BasicEvent event = new BasicEvent("EVENT NAME 1",
- "EVENT TOOLTIP 1",
+ BasicEvent event = new BasicEvent("EVENT NAME 1", "EVENT TOOLTIP 1",
new SimpleDateFormat("yyyy-MM-dd HH:mm")
- .parse("2013-09-05 15:30"), new SimpleDateFormat(
- "yyyy-MM-dd HH:mm").parse("2013-09-07 22:20"));
+ .parse("2013-09-05 15:30"),
+ new SimpleDateFormat("yyyy-MM-dd HH:mm")
+ .parse("2013-09-07 22:20"));
event.setStyleName("color1");
calendar.addEvent(event);
event = new BasicEvent("EVENT NAME 2", "EVENT TOOLTIP 2",
new SimpleDateFormat("yyyy-MM-dd HH:mm")
- .parse("2013-09-05 12:10"), new SimpleDateFormat(
- "yyyy-MM-dd HH:mm").parse("2013-09-05 13:20"));
+ .parse("2013-09-05 12:10"),
+ new SimpleDateFormat("yyyy-MM-dd HH:mm")
+ .parse("2013-09-05 13:20"));
event.setStyleName("color2");
calendar.addEvent(event);
event = new BasicEvent("EVENT NAME 3", "EVENT TOOLTIP 3",
new SimpleDateFormat("yyyy-MM-dd HH:mm")
- .parse("2013-09-01 11:30"), new SimpleDateFormat(
- "yyyy-MM-dd HH:mm").parse("2013-09-29 15:20"));
+ .parse("2013-09-01 11:30"),
+ new SimpleDateFormat("yyyy-MM-dd HH:mm")
+ .parse("2013-09-29 15:20"));
event.setStyleName("color3");
calendar.addEvent(event);
event = new BasicEvent("EVENT NAME 4", "EVENT TOOLTIP 4",
new SimpleDateFormat("yyyy-MM-dd HH:mm")
- .parse("2013-09-01 11:30"), new SimpleDateFormat(
- "yyyy-MM-dd HH:mm").parse("2013-09-01 15:20"));
+ .parse("2013-09-01 11:30"),
+ new SimpleDateFormat("yyyy-MM-dd HH:mm")
+ .parse("2013-09-01 15:20"));
event.setStyleName("color4");
event.setAllDay(true);
calendar.addEvent(event);
@@ -84,10 +87,10 @@ public class CalendarBackwardForward extends AbstractTestUI {
}
try {
- calendar.setStartDate(new SimpleDateFormat("yyyy-MM-dd")
- .parse("2013-09-01"));
- calendar.setEndDate(new SimpleDateFormat("yyyy-MM-dd")
- .parse("2013-09-30"));
+ calendar.setStartDate(
+ new SimpleDateFormat("yyyy-MM-dd").parse("2013-09-01"));
+ calendar.setEndDate(
+ new SimpleDateFormat("yyyy-MM-dd").parse("2013-09-30"));
} catch (ParseException e) { // Nothing to do
}
@@ -111,7 +114,7 @@ public class CalendarBackwardForward extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -121,7 +124,7 @@ public class CalendarBackwardForward extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarDragAndDrop.java b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarDragAndDrop.java
index 56c4eacba1..30fb67da1b 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarDragAndDrop.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarDragAndDrop.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -15,7 +15,7 @@
*/
/**
- *
+ *
*/
package com.vaadin.tests.components.calendar;
@@ -52,9 +52,9 @@ public class CalendarDragAndDrop extends AbstractTestUI {
TableTransferable transferable = (TableTransferable) event
.getTransferable();
- calendar.addEvent(new BasicEvent(transferable.getItemId()
- .toString(), "This event was dragged here", details
- .getDropTime()));
+ calendar.addEvent(new BasicEvent(
+ transferable.getItemId().toString(),
+ "This event was dragged here", details.getDropTime()));
table.removeItem(transferable.getItemId());
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarHtmlInEvents.java b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarHtmlInEvents.java
index 15cde71838..29642a553c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarHtmlInEvents.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarHtmlInEvents.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarMonthViewDndEvent.java b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarMonthViewDndEvent.java
index b36b4d200e..2122f7acd5 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarMonthViewDndEvent.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarMonthViewDndEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,7 +31,7 @@ import com.vaadin.ui.components.calendar.event.CalendarEventProvider.EventSetCha
/**
* Test UI for DnD regular (not all day event) in month view.
- *
+ *
* @author Vaadin Ltd
*/
public class CalendarMonthViewDndEvent extends AbstractTestUI {
@@ -74,8 +74,8 @@ public class CalendarMonthViewDndEvent extends AbstractTestUI {
@Override
public void eventSetChange(EventSetChangeEvent event) {
- List<CalendarEvent> events = event.getProvider().getEvents(
- new Date(0), new Date(Long.MAX_VALUE));
+ List<CalendarEvent> events = event.getProvider()
+ .getEvents(new Date(0), new Date(Long.MAX_VALUE));
CalendarEvent calEvent = events.get(0);
Date startEvent = calEvent.getStart();
Date endEvent = calEvent.getEnd();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarNotifications.java b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarNotifications.java
index 9b9a64624a..c97f5ac257 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarNotifications.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarNotifications.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -68,8 +68,8 @@ public class CalendarNotifications extends AbstractTestUIWithLog {
new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- Notification
- .show("This will disappear when you move your mouse!");
+ Notification.show(
+ "This will disappear when you move your mouse!");
}
});
content.addComponent(btn);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarReadOnly.java b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarReadOnly.java
index 8e82555e87..b8e1dd4ba5 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarReadOnly.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarReadOnly.java
@@ -35,16 +35,16 @@ public class CalendarReadOnly extends AbstractTestUI {
calendar.setSizeFull();
try {
- calendar.setStartDate(new SimpleDateFormat("yyyy-MM-dd")
- .parse("2013-09-01"));
- calendar.setEndDate(new SimpleDateFormat("yyyy-MM-dd")
- .parse("2013-09-30"));
+ calendar.setStartDate(
+ new SimpleDateFormat("yyyy-MM-dd").parse("2013-09-01"));
+ calendar.setEndDate(
+ new SimpleDateFormat("yyyy-MM-dd").parse("2013-09-30"));
- BasicEvent event = new BasicEvent("EVENT NAME 1",
- "EVENT TOOLTIP 1",
+ BasicEvent event = new BasicEvent("EVENT NAME 1", "EVENT TOOLTIP 1",
new SimpleDateFormat("yyyy-MM-dd HH:mm")
- .parse("2013-09-05 15:30"), new SimpleDateFormat(
- "yyyy-MM-dd HH:mm").parse("2013-09-05 22:20"));
+ .parse("2013-09-05 15:30"),
+ new SimpleDateFormat("yyyy-MM-dd HH:mm")
+ .parse("2013-09-05 22:20"));
event.setStyleName("color1");
calendar.addEvent(event);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarRescheduleEvent.java b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarRescheduleEvent.java
index 824ad0941f..13d5c837b9 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarRescheduleEvent.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarRescheduleEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,7 +31,7 @@ import com.vaadin.ui.components.calendar.event.CalendarEventProvider.EventSetCha
/**
* Test UI to check ability to reschedule events unlimited times.
- *
+ *
* @author Vaadin Ltd
*/
public class CalendarRescheduleEvent extends AbstractTestUI {
@@ -68,8 +68,8 @@ public class CalendarRescheduleEvent extends AbstractTestUI {
@Override
public void eventSetChange(EventSetChangeEvent event) {
- List<CalendarEvent> events = event.getProvider().getEvents(
- new Date(0), new Date(Long.MAX_VALUE));
+ List<CalendarEvent> events = event.getProvider()
+ .getEvents(new Date(0), new Date(Long.MAX_VALUE));
CalendarEvent calEvent = events.get(0);
Date startEvent = calEvent.getStart();
Date endEvent = calEvent.getEnd();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarResizeOverlappingEvents.java b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarResizeOverlappingEvents.java
index 2025ce2ea7..960d48e683 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarResizeOverlappingEvents.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarResizeOverlappingEvents.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,14 +30,14 @@ import com.vaadin.ui.components.calendar.event.CalendarEvent;
import com.vaadin.ui.components.calendar.event.CalendarEventProvider;
/**
- *
+ *
* @author Vaadin Ltd
*/
public class CalendarResizeOverlappingEvents extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -83,7 +83,7 @@ public class CalendarResizeOverlappingEvents extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -93,7 +93,7 @@ public class CalendarResizeOverlappingEvents extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarShownNotCorrectlyWhenPartiallyOutOfView.java b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarShownNotCorrectlyWhenPartiallyOutOfView.java
index 98c5c08095..13c2f1f45d 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarShownNotCorrectlyWhenPartiallyOutOfView.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarShownNotCorrectlyWhenPartiallyOutOfView.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,23 +27,23 @@ import com.vaadin.ui.components.calendar.CalendarComponentEvents.EventResizeHand
import com.vaadin.ui.components.calendar.event.BasicEvent;
/**
- *
+ *
* @since
* @author Vaadin Ltd
- *
+ *
* test for defect: Calendar event not shown correctly when partially
* out of view (#7261)
*/
@Theme("tests-calendar")
-public class CalendarShownNotCorrectlyWhenPartiallyOutOfView extends
- AbstractTestUI {
+public class CalendarShownNotCorrectlyWhenPartiallyOutOfView
+ extends AbstractTestUI {
private static final long serialVersionUID = 1L;
private Calendar calendar;
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -52,11 +52,11 @@ public class CalendarShownNotCorrectlyWhenPartiallyOutOfView extends
calendar = new Calendar();
try {
- BasicEvent event = new BasicEvent("EVENT NAME 1",
- "EVENT TOOLTIP 1",
+ BasicEvent event = new BasicEvent("EVENT NAME 1", "EVENT TOOLTIP 1",
new SimpleDateFormat("yyyy-MM-dd HH:mm")
- .parse("2013-09-05 09:30"), new SimpleDateFormat(
- "yyyy-MM-dd HH:mm").parse("2013-09-05 14:00"));
+ .parse("2013-09-05 09:30"),
+ new SimpleDateFormat("yyyy-MM-dd HH:mm")
+ .parse("2013-09-05 14:00"));
event.setStyleName("color1");
calendar.addEvent(event);
} catch (ParseException e1) { // Nothing to do
@@ -64,10 +64,10 @@ public class CalendarShownNotCorrectlyWhenPartiallyOutOfView extends
}
try {
- calendar.setStartDate(new SimpleDateFormat("yyyy-MM-dd")
- .parse("2013-09-01"));
- calendar.setEndDate(new SimpleDateFormat("yyyy-MM-dd")
- .parse("2013-09-30"));
+ calendar.setStartDate(
+ new SimpleDateFormat("yyyy-MM-dd").parse("2013-09-01"));
+ calendar.setEndDate(
+ new SimpleDateFormat("yyyy-MM-dd").parse("2013-09-30"));
} catch (ParseException e) { // Nothing to do
}
@@ -88,7 +88,7 @@ public class CalendarShownNotCorrectlyWhenPartiallyOutOfView extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -98,7 +98,7 @@ public class CalendarShownNotCorrectlyWhenPartiallyOutOfView extends
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarTest.java b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarTest.java
index b56f92962a..a8aca8e0d2 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarTest.java
@@ -305,7 +305,8 @@ public class CalendarTest extends UI {
event = getNewEvent("Appointment", start, end);
event.setWhere("Office");
event.setStyleName("color1");
- event.setDescription("A longer description, which should display correctly.");
+ event.setDescription(
+ "A longer description, which should display correctly.");
dataSource.addEvent(event);
calendar.add(GregorianCalendar.DATE, 1);
@@ -407,9 +408,9 @@ public class CalendarTest extends UI {
// simulate week click
WeekClickHandler handler = (WeekClickHandler) calendarComponent
.getHandler(WeekClick.EVENT_ID);
- handler.weekClick(new WeekClick(calendarComponent, calendar
- .get(GregorianCalendar.WEEK_OF_YEAR), calendar
- .get(GregorianCalendar.YEAR)));
+ handler.weekClick(new WeekClick(calendarComponent,
+ calendar.get(GregorianCalendar.WEEK_OF_YEAR),
+ calendar.get(GregorianCalendar.YEAR)));
}
});
@@ -449,8 +450,8 @@ public class CalendarTest extends UI {
private void setWeekendsHidden(boolean weekendsHidden) {
if (weekendsHidden) {
- int firstToShow = (GregorianCalendar.MONDAY - calendar
- .getFirstDayOfWeek()) % 7;
+ int firstToShow = (GregorianCalendar.MONDAY
+ - calendar.getFirstDayOfWeek()) % 7;
calendarComponent.setFirstVisibleDayOfWeek(firstToShow + 1);
calendarComponent.setLastVisibleDayOfWeek(firstToShow + 5);
} else {
@@ -470,7 +471,8 @@ public class CalendarTest extends UI {
@Override
public void valueChange(ValueChangeEvent event) {
- calendarComponent.setReadOnly(readOnlyButton.getValue());
+ calendarComponent
+ .setReadOnly(readOnlyButton.getValue());
}
});
}
@@ -485,7 +487,8 @@ public class CalendarTest extends UI {
@Override
public void valueChange(ValueChangeEvent event) {
- calendarComponent.setEnabled(!disabledButton.getValue());
+ calendarComponent
+ .setEnabled(!disabledButton.getValue());
}
});
}
@@ -718,8 +721,8 @@ public class CalendarTest extends UI {
s.setFilteringMode(FilteringMode.CONTAINS);
Item i = s.addItem(DEFAULT_ITEMID);
- i.getItemProperty("caption").setValue(
- "Default (" + TimeZone.getDefault().getID() + ")");
+ i.getItemProperty("caption")
+ .setValue("Default (" + TimeZone.getDefault().getID() + ")");
for (String id : TimeZone.getAvailableIDs()) {
if (!s.containsId(id)) {
i = s.addItem(id);
@@ -1175,12 +1178,14 @@ public class CalendarTest extends UI {
private void updateCaptionLabel() {
DateFormatSymbols s = new DateFormatSymbols(getLocale());
- String month = s.getShortMonths()[calendar.get(GregorianCalendar.MONTH)];
- captionLabel.setValue(month + " "
- + calendar.get(GregorianCalendar.YEAR));
+ String month = s.getShortMonths()[calendar
+ .get(GregorianCalendar.MONTH)];
+ captionLabel
+ .setValue(month + " " + calendar.get(GregorianCalendar.YEAR));
}
- private CalendarTestEvent getNewEvent(String caption, Date start, Date end) {
+ private CalendarTestEvent getNewEvent(String caption, Date start,
+ Date end) {
CalendarTestEvent event = new CalendarTestEvent();
event.setCaption(caption);
event.setStart(start);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarTestEvent.java b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarTestEvent.java
index b4e759b20b..15199fcfcb 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarTestEvent.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarTestEvent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import com.vaadin.ui.components.calendar.event.BasicEvent;
/**
* Test CalendarEvent implementation.
- *
+ *
* @see com.vaadin.addon.calendar.test.ui.Calendar.Event
*/
public class CalendarTestEvent extends BasicEvent {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarVisibleHours.java b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarVisibleHours.java
index 65e5502686..98e5ede3aa 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarVisibleHours.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarVisibleHours.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,10 +27,10 @@ import com.vaadin.ui.components.calendar.CalendarComponentEvents.EventResizeHand
import com.vaadin.ui.components.calendar.event.BasicEvent;
/**
- *
+ *
* @since
* @author Vaadin Ltd
- *
+ *
* test for defect: calendar visible hours of day invalid shows invalid
* dates(week/day view) (#12521)
*/
@@ -42,7 +42,7 @@ public class CalendarVisibleHours extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -52,32 +52,35 @@ public class CalendarVisibleHours extends AbstractTestUI {
try {
- BasicEvent event = new BasicEvent("EVENT NAME 1",
- "EVENT TOOLTIP 1",
+ BasicEvent event = new BasicEvent("EVENT NAME 1", "EVENT TOOLTIP 1",
new SimpleDateFormat("yyyy-MM-dd HH:mm")
- .parse("2013-09-05 15:30"), new SimpleDateFormat(
- "yyyy-MM-dd HH:mm").parse("2013-09-07 22:20"));
+ .parse("2013-09-05 15:30"),
+ new SimpleDateFormat("yyyy-MM-dd HH:mm")
+ .parse("2013-09-07 22:20"));
event.setStyleName("color1");
calendar.addEvent(event);
event = new BasicEvent("EVENT NAME 2", "EVENT TOOLTIP 2",
new SimpleDateFormat("yyyy-MM-dd HH:mm")
- .parse("2013-09-05 12:10"), new SimpleDateFormat(
- "yyyy-MM-dd HH:mm").parse("2013-09-05 13:20"));
+ .parse("2013-09-05 12:10"),
+ new SimpleDateFormat("yyyy-MM-dd HH:mm")
+ .parse("2013-09-05 13:20"));
event.setStyleName("color2");
calendar.addEvent(event);
event = new BasicEvent("EVENT NAME 3", "EVENT TOOLTIP 3",
new SimpleDateFormat("yyyy-MM-dd HH:mm")
- .parse("2013-09-01 11:30"), new SimpleDateFormat(
- "yyyy-MM-dd HH:mm").parse("2013-09-29 15:20"));
+ .parse("2013-09-01 11:30"),
+ new SimpleDateFormat("yyyy-MM-dd HH:mm")
+ .parse("2013-09-29 15:20"));
event.setStyleName("color3");
calendar.addEvent(event);
event = new BasicEvent("EVENT NAME 4", "EVENT TOOLTIP 4",
new SimpleDateFormat("yyyy-MM-dd HH:mm")
- .parse("2013-09-01 11:30"), new SimpleDateFormat(
- "yyyy-MM-dd HH:mm").parse("2013-09-01 15:20"));
+ .parse("2013-09-01 11:30"),
+ new SimpleDateFormat("yyyy-MM-dd HH:mm")
+ .parse("2013-09-01 15:20"));
event.setStyleName("color4");
event.setAllDay(true);
calendar.addEvent(event);
@@ -86,10 +89,10 @@ public class CalendarVisibleHours extends AbstractTestUI {
}
try {
- calendar.setStartDate(new SimpleDateFormat("yyyy-MM-dd")
- .parse("2013-09-01"));
- calendar.setEndDate(new SimpleDateFormat("yyyy-MM-dd")
- .parse("2013-09-30"));
+ calendar.setStartDate(
+ new SimpleDateFormat("yyyy-MM-dd").parse("2013-09-01"));
+ calendar.setEndDate(
+ new SimpleDateFormat("yyyy-MM-dd").parse("2013-09-30"));
} catch (ParseException e) { // Nothing to do
}
@@ -110,7 +113,7 @@ public class CalendarVisibleHours extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -120,7 +123,7 @@ public class CalendarVisibleHours extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarWeekSelection.java b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarWeekSelection.java
index c74f2a53e3..732899e85e 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarWeekSelection.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarWeekSelection.java
@@ -15,10 +15,10 @@ public class CalendarWeekSelection extends AbstractTestUI {
calendar.setLocale(Locale.US);
try {
- calendar.setStartDate(new SimpleDateFormat("yyyy-MM-dd")
- .parse("2013-12-15"));
- calendar.setEndDate(new SimpleDateFormat("yyyy-MM-dd")
- .parse("2014-01-15"));
+ calendar.setStartDate(
+ new SimpleDateFormat("yyyy-MM-dd").parse("2013-12-15"));
+ calendar.setEndDate(
+ new SimpleDateFormat("yyyy-MM-dd").parse("2014-01-15"));
} catch (ParseException e) {
e.printStackTrace();
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/calendar/DndCalendarTargetDetails.java b/uitest/src/main/java/com/vaadin/tests/components/calendar/DndCalendarTargetDetails.java
index 62641aaba4..8178f9a745 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/calendar/DndCalendarTargetDetails.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/calendar/DndCalendarTargetDetails.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -22,7 +22,7 @@ import com.vaadin.ui.Calendar;
/**
* Test UI for calendar as a drop target: CalendarTargetDetails should provide
* getMouseEvent() method.
- *
+ *
* @author Vaadin Ltd
*/
public class DndCalendarTargetDetails extends DndTableTargetDetails {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/calendar/HiddenFwdBackButtons.java b/uitest/src/main/java/com/vaadin/tests/components/calendar/HiddenFwdBackButtons.java
index 04b00dd039..b3b608310c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/calendar/HiddenFwdBackButtons.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/calendar/HiddenFwdBackButtons.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/calendar/NotificationTestUI.java b/uitest/src/main/java/com/vaadin/tests/components/calendar/NotificationTestUI.java
index 2313ad891a..6dce198c96 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/calendar/NotificationTestUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/calendar/NotificationTestUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -67,8 +67,8 @@ public class NotificationTestUI extends UI {
new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- Notification
- .show("This will disappear when you move your mouse!");
+ Notification.show(
+ "This will disappear when you move your mouse!");
}
});
content.addComponent(btn);
@@ -81,8 +81,8 @@ public class NotificationTestUI extends UI {
@Override
public void dateClick(DateClickEvent event) {
provider.addEvent(event.getDate());
- Notification
- .show("This should disappear, but if wont unless clicked.");
+ Notification.show(
+ "This should disappear, but if wont unless clicked.");
// this requestRepaint call interferes with the notification
cal.markAsDirty();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/calendar/NullEventMoveHandler.java b/uitest/src/main/java/com/vaadin/tests/components/calendar/NullEventMoveHandler.java
index 40dd43abb2..896078d1c9 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/calendar/NullEventMoveHandler.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/calendar/NullEventMoveHandler.java
@@ -35,10 +35,10 @@ public class NullEventMoveHandler extends AbstractTestUIWithLog {
calendar.setLocale(Locale.US);
try {
- calendar.setStartDate(new SimpleDateFormat("yyyy-MM-dd")
- .parse("2014-06-01"));
- calendar.setEndDate(new SimpleDateFormat("yyyy-MM-dd")
- .parse("2014-06-30"));
+ calendar.setStartDate(
+ new SimpleDateFormat("yyyy-MM-dd").parse("2014-06-01"));
+ calendar.setEndDate(
+ new SimpleDateFormat("yyyy-MM-dd").parse("2014-06-30"));
BasicEvent event = new BasicEvent("foo", "bar",
new SimpleDateFormat("yyyy-MM-dd").parse("2014-06-01"));
diff --git a/uitest/src/main/java/com/vaadin/tests/components/calendar/SetFirstVisibleHourOfDay.java b/uitest/src/main/java/com/vaadin/tests/components/calendar/SetFirstVisibleHourOfDay.java
index 4a792bc670..ffd289d047 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/calendar/SetFirstVisibleHourOfDay.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/calendar/SetFirstVisibleHourOfDay.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -36,11 +36,11 @@ public class SetFirstVisibleHourOfDay extends AbstractTestUI {
calendar = new Calendar();
try {
- BasicEvent event = new BasicEvent("EVENT NAME 1",
- "EVENT TOOLTIP 1",
+ BasicEvent event = new BasicEvent("EVENT NAME 1", "EVENT TOOLTIP 1",
new SimpleDateFormat("yyyy-MM-dd HH:mm")
- .parse("2013-09-05 00:00"), new SimpleDateFormat(
- "yyyy-MM-dd HH:mm").parse("2013-09-05 13:00"));
+ .parse("2013-09-05 00:00"),
+ new SimpleDateFormat("yyyy-MM-dd HH:mm")
+ .parse("2013-09-05 13:00"));
event.setStyleName("color1");
calendar.addEvent(event);
} catch (ParseException e) {
@@ -48,10 +48,10 @@ public class SetFirstVisibleHourOfDay extends AbstractTestUI {
}
try {
- calendar.setStartDate(new SimpleDateFormat("yyyy-MM-dd")
- .parse("2013-09-01"));
- calendar.setEndDate(new SimpleDateFormat("yyyy-MM-dd")
- .parse("2013-09-30"));
+ calendar.setStartDate(
+ new SimpleDateFormat("yyyy-MM-dd").parse("2013-09-01"));
+ calendar.setEndDate(
+ new SimpleDateFormat("yyyy-MM-dd").parse("2013-09-30"));
} catch (ParseException e) {
e.printStackTrace();
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/caption/IconsInCaption.java b/uitest/src/main/java/com/vaadin/tests/components/caption/IconsInCaption.java
index daf472914b..80e010da08 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/caption/IconsInCaption.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/caption/IconsInCaption.java
@@ -109,8 +109,8 @@ public class IconsInCaption extends TestBase {
ContentMode.HTML);
container.addComponent(title);
for (String icon : icons) {
- ThemeResource res = new ThemeResource("../runo/icons/" + size
- + "/" + icon);
+ ThemeResource res = new ThemeResource(
+ "../runo/icons/" + size + "/" + icon);
if (TYPE_CAPTION.equals(iconType)) {
Label name = new Label();
name.setCaption(icon);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/checkbox/CheckBoxImmediate.java b/uitest/src/main/java/com/vaadin/tests/components/checkbox/CheckBoxImmediate.java
index fec753d5af..957d90c465 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/checkbox/CheckBoxImmediate.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/checkbox/CheckBoxImmediate.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/checkbox/CheckBoxNullValue.java b/uitest/src/main/java/com/vaadin/tests/components/checkbox/CheckBoxNullValue.java
index 22e260b442..72f4327d32 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/checkbox/CheckBoxNullValue.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/checkbox/CheckBoxNullValue.java
@@ -46,7 +46,8 @@ public class CheckBoxNullValue extends TestBase {
.getErrorMessageForException(e));
}
valueLabel.setValue("Checkbox: " + checkbox.getValue()
- + "; Required checkbox: " + requiredCheckbox.getValue());
+ + "; Required checkbox: "
+ + requiredCheckbox.getValue());
}
});
addComponent(valueLabel);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/checkbox/CheckBoxRevertValueChange.java b/uitest/src/main/java/com/vaadin/tests/components/checkbox/CheckBoxRevertValueChange.java
index 0513c9db4f..fc220796a3 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/checkbox/CheckBoxRevertValueChange.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/checkbox/CheckBoxRevertValueChange.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/checkbox/CheckBoxRpcCount.java b/uitest/src/main/java/com/vaadin/tests/components/checkbox/CheckBoxRpcCount.java
index f909f97996..8ccbbf14b4 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/checkbox/CheckBoxRpcCount.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/checkbox/CheckBoxRpcCount.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/checkbox/CheckBoxes2.java b/uitest/src/main/java/com/vaadin/tests/components/checkbox/CheckBoxes2.java
index 6734c752de..6278d581b3 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/checkbox/CheckBoxes2.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/checkbox/CheckBoxes2.java
@@ -5,8 +5,8 @@ import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Button.ClickListener;
import com.vaadin.ui.CheckBox;
-public class CheckBoxes2 extends AbstractFieldTest<CheckBox> implements
- ClickListener {
+public class CheckBoxes2 extends AbstractFieldTest<CheckBox>
+ implements ClickListener {
@Override
protected Class<CheckBox> getTestClass() {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/checkbox/CheckboxCaptionWrapping.java b/uitest/src/main/java/com/vaadin/tests/components/checkbox/CheckboxCaptionWrapping.java
index 463d53a4a8..ecaea55eef 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/checkbox/CheckboxCaptionWrapping.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/checkbox/CheckboxCaptionWrapping.java
@@ -28,8 +28,8 @@ public class CheckboxCaptionWrapping extends TestBase {
mainLayout.setStyleName("borders");
mainLayout.setWidth("300px");
mainLayout.addComponent(cb);
- mainLayout.addComponent(new Label(
- "Lorem ipsum dolor sit amet, consectetur adipisicing"
+ mainLayout.addComponent(
+ new Label("Lorem ipsum dolor sit amet, consectetur adipisicing"
+ " elit, sed do eiusmod tempor."));
addComponent(mainLayout);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/checkbox/CheckboxContextClick.java b/uitest/src/main/java/com/vaadin/tests/components/checkbox/CheckboxContextClick.java
index 9b37db10b1..cf76ec4ab6 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/checkbox/CheckboxContextClick.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/checkbox/CheckboxContextClick.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,12 +25,13 @@ public class CheckboxContextClick extends AbstractTestUIWithLog {
@Override
protected void setup(VaadinRequest request) {
final CheckBox cb = new CheckBox("Right-click me", true);
- cb.addContextClickListener(new ContextClickEvent.ContextClickListener() {
- @Override
- public void contextClick(ContextClickEvent event) {
- log("checkbox context clicked");
- }
- });
+ cb.addContextClickListener(
+ new ContextClickEvent.ContextClickListener() {
+ @Override
+ public void contextClick(ContextClickEvent event) {
+ log("checkbox context clicked");
+ }
+ });
addComponent(cb);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/colorpicker/ColorPickerTestUI.java b/uitest/src/main/java/com/vaadin/tests/components/colorpicker/ColorPickerTestUI.java
index 544cdafaf0..5fdd4cf389 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/colorpicker/ColorPickerTestUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/colorpicker/ColorPickerTestUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -46,8 +46,8 @@ import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.components.colorpicker.ColorChangeEvent;
import com.vaadin.ui.components.colorpicker.ColorChangeListener;
-public class ColorPickerTestUI extends AbstractTestUI implements
- ColorChangeListener {
+public class ColorPickerTestUI extends AbstractTestUI
+ implements ColorChangeListener {
@Override
public String getTestDescription() {
@@ -104,7 +104,7 @@ public class ColorPickerTestUI extends AbstractTestUI implements
/**
* Instantiates a new my image source.
- *
+ *
* @param fg
* the foreground
* @param bg
@@ -130,14 +130,12 @@ public class ColorPickerTestUI extends AbstractTestUI implements
drawable.setColor(java.awt.Color.blue);
drawable.drawRect(0, 0, 269, 269);
drawable.setColor(java.awt.Color.black);
- drawable.drawString(
- "r=" + String.valueOf(fgColor.getRed()) + ",g="
- + String.valueOf(fgColor.getGreen()) + ",b="
- + String.valueOf(fgColor.getBlue()), 50, 100);
- drawable.drawString(
- "r=" + String.valueOf(bgColor.getRed()) + ",g="
- + String.valueOf(bgColor.getGreen()) + ",b="
- + String.valueOf(bgColor.getBlue()), 5, 15);
+ drawable.drawString("r=" + String.valueOf(fgColor.getRed()) + ",g="
+ + String.valueOf(fgColor.getGreen()) + ",b="
+ + String.valueOf(fgColor.getBlue()), 50, 100);
+ drawable.drawString("r=" + String.valueOf(bgColor.getRed()) + ",g="
+ + String.valueOf(bgColor.getGreen()) + ",b="
+ + String.valueOf(bgColor.getBlue()), 5, 15);
try {
/* Write the image to a buffer. */
@@ -349,7 +347,8 @@ public class ColorPickerTestUI extends AbstractTestUI implements
layout3.addComponent(colorpicker6);
layout3.setComponentAlignment(colorpicker6, Alignment.MIDDLE_CENTER);
- Panel panel3 = new Panel("Color area colorpicker with caption", layout3);
+ Panel panel3 = new Panel("Color area colorpicker with caption",
+ layout3);
panel3.setWidth("100%");
panel3.setHeight(null);
layoutLeft.addComponent(panel3);
@@ -444,7 +443,7 @@ public class ColorPickerTestUI extends AbstractTestUI implements
// This is called whenever a colorpicker popup is closed
/**
* Update display.
- *
+ *
* @param fg
* the fg
* @param bg
diff --git a/uitest/src/main/java/com/vaadin/tests/components/colorpicker/DefaultCaptionWidth.java b/uitest/src/main/java/com/vaadin/tests/components/colorpicker/DefaultCaptionWidth.java
index d3dd0aeccc..bcdde0cd9a 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/colorpicker/DefaultCaptionWidth.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/colorpicker/DefaultCaptionWidth.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.ui.ColorPicker;
/**
* Test for color picker with default caption.
- *
+ *
* @author Vaadin Ltd
*/
public class DefaultCaptionWidth extends AbstractTestUI {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxBorder.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxBorder.java
index 731e23188e..a084d1019d 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxBorder.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxBorder.java
@@ -14,8 +14,8 @@ public class ComboBoxBorder extends TestBase {
protected void setup() {
setTheme("tests-tickets");
- final ComboBox cb = new ComboBox("All errors", Arrays.asList("Error",
- "Error 2"));
+ final ComboBox cb = new ComboBox("All errors",
+ Arrays.asList("Error", "Error 2"));
cb.setStyleName("ComboBoxBorder");
cb.setImmediate(true);
cb.setWidth("200px"); // must have with to reproduce
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxClickIcon.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxClickIcon.java
index b0450e22c3..6d4c6b3deb 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxClickIcon.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxClickIcon.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.ui.ComboBox;
/**
* Test UI to check click on icon in the combobox.
- *
+ *
* @author Vaadin Ltd
*/
public class ComboBoxClickIcon extends AbstractTestUI {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxCursorPositionReset.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxCursorPositionReset.java
index ccbde5f2df..ca66e2e71f 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxCursorPositionReset.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxCursorPositionReset.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxDataSourceChange.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxDataSourceChange.java
index dea1deb9b5..204093bbf4 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxDataSourceChange.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxDataSourceChange.java
@@ -86,8 +86,8 @@ public class ComboBoxDataSourceChange extends TestBase {
cb2.addListener(new Property.ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
- currentValue.setValue(String.valueOf(event.getProperty()
- .getValue()));
+ currentValue.setValue(
+ String.valueOf(event.getProperty().getValue()));
}
});
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxInputPrompt.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxInputPrompt.java
index 082aca6989..2a2edc8074 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxInputPrompt.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxInputPrompt.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxItemAddingWithFocusListener.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxItemAddingWithFocusListener.java
index 8242eb9e57..da72349e81 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxItemAddingWithFocusListener.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxItemAddingWithFocusListener.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -25,7 +25,7 @@ import com.vaadin.ui.ComboBox;
/**
* Test UI to verify that focus event actually update the ComboBox suggestion
* popup
- *
+ *
* @author Vaadin Ltd
*/
public class ComboBoxItemAddingWithFocusListener extends AbstractTestUI {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxLargeIcons.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxLargeIcons.java
index 07cd1f046c..e119571e20 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxLargeIcons.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxLargeIcons.java
@@ -34,9 +34,9 @@ public class ComboBoxLargeIcons extends TestBase {
"document-ppt", "document-txt", "document-web", "document" };
for (String icon : icons) {
Item item = cb.addItem(icon);
- item.getItemProperty("icon").setValue(
- new ThemeResource("../runo/icons/32/" + icon + ".png?"
- + new Date().getTime()));
+ item.getItemProperty("icon")
+ .setValue(new ThemeResource("../runo/icons/32/" + icon
+ + ".png?" + new Date().getTime()));
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxMouseSelectEnter.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxMouseSelectEnter.java
index 5af4749349..141dd71a0a 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxMouseSelectEnter.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxMouseSelectEnter.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxMousewheel.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxMousewheel.java
index 802e7480f5..bc7941e00a 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxMousewheel.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxMousewheel.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ import com.vaadin.ui.ComboBox;
/**
* Tests mousewheel handling in ComboBox.
- *
+ *
* @author Vaadin Ltd
*/
public class ComboBoxMousewheel extends AbstractTestUI {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxNoTextInput.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxNoTextInput.java
index 6b0e42666f..c20b0a7e5d 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxNoTextInput.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxNoTextInput.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxOnSmallScreen.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxOnSmallScreen.java
index 044214cecf..d367aeb1aa 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxOnSmallScreen.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxOnSmallScreen.java
@@ -64,9 +64,8 @@ public class ComboBoxOnSmallScreen extends AbstractTestUI {
Item item = cb.getItem(itemId);
item.getItemProperty(PID).setValue(v);
int flagIndex = i % 3;
- cb.setItemIcon(itemId, new ClassResource(
- flagIndex == 0 ? "fi_small.png" : flagIndex == 1 ? "fi.gif"
- : "se.gif"));
+ cb.setItemIcon(itemId, new ClassResource(flagIndex == 0
+ ? "fi_small.png" : flagIndex == 1 ? "fi.gif" : "se.gif"));
}
cb.select(selectId);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxPageLength.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxPageLength.java
index 6807b21424..6e4546920b 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxPageLength.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxPageLength.java
@@ -15,8 +15,9 @@ public class ComboBoxPageLength extends ComboBoxes2<ComboBox> {
public void valueChange(ValueChangeEvent event) {
if (event.getProperty() != null) {
if (event.getProperty().getValue() != null) {
- Integer value = Integer.parseInt(((String) event
- .getProperty().getValue()).split(" ")[1]);
+ Integer value = Integer.parseInt(
+ ((String) event.getProperty().getValue())
+ .split(" ")[1]);
getComponent().setPageLength(value);
} else {
getComponent().setPageLength(0);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxParentDisable.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxParentDisable.java
index d1adeaaf88..22f0379343 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxParentDisable.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxParentDisable.java
@@ -62,7 +62,8 @@ public class ComboBoxParentDisable extends AbstractTestUIWithLog {
}
- private class MyValueChangeListener implements Property.ValueChangeListener {
+ private class MyValueChangeListener
+ implements Property.ValueChangeListener {
@Override
public void valueChange(Property.ValueChangeEvent event) {
log.log("you made a selection change");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxPopupWhenBodyScrolls.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxPopupWhenBodyScrolls.java
index ed8212b231..f7f5a764ab 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxPopupWhenBodyScrolls.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxPopupWhenBodyScrolls.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,11 +24,10 @@ public class ComboBoxPopupWhenBodyScrolls extends AbstractTestUI {
@Override
protected void setup(VaadinRequest request) {
+ getPage().getStyles()
+ .add("body.v-generated-body { overflow: auto;height:auto;}");
getPage().getStyles().add(
- "body.v-generated-body { overflow: auto;height:auto;}");
- getPage()
- .getStyles()
- .add("body.v-generated-body .v-ui.v-scrollable{ overflow: visible;height:auto !important;}");
+ "body.v-generated-body .v-ui.v-scrollable{ overflow: visible;height:auto !important;}");
ComboBox cb = new ComboBox();
for (int i = 0; i < 10; i++) {
cb.addItem("Item " + i);
@@ -43,9 +42,7 @@ public class ComboBoxPopupWhenBodyScrolls extends AbstractTestUI {
addComponent(spacer);
// Chrome requires document.scrollTop (<body>)
// Firefox + IE wants document.documentElement.scrollTop (<html>)
- getPage()
- .getJavaScript()
- .execute(
- "document.body.scrollTop=1800;document.documentElement.scrollTop=1800;");
+ getPage().getJavaScript().execute(
+ "document.body.scrollTop=1800;document.documentElement.scrollTop=1800;");
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxReapperingOldValue.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxReapperingOldValue.java
index 2187c24e91..82cb6b440d 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxReapperingOldValue.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxReapperingOldValue.java
@@ -12,8 +12,8 @@ import com.vaadin.ui.LegacyWindow;
import com.vaadin.ui.VerticalLayout;
@SuppressWarnings("serial")
-public class ComboBoxReapperingOldValue extends LegacyApplication implements
- ValueChangeListener {
+public class ComboBoxReapperingOldValue extends LegacyApplication
+ implements ValueChangeListener {
ComboBox cbox1 = new ComboBox();
ComboBox cbox2 = new ComboBox();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSQLContainerFilteredValueChange.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSQLContainerFilteredValueChange.java
index 9f07d81cc9..0dabc1a127 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSQLContainerFilteredValueChange.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSQLContainerFilteredValueChange.java
@@ -55,8 +55,8 @@ public class ComboBoxSQLContainerFilteredValueChange extends TestBase {
myCombo.addListener(new Property.ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
- selectedLabel.setValue("Selected: "
- + event.getProperty().getValue());
+ selectedLabel.setValue(
+ "Selected: " + event.getProperty().getValue());
}
});
}
@@ -73,7 +73,7 @@ public class ComboBoxSQLContainerFilteredValueChange extends TestBase {
/**
* (Re)creates the test table
- *
+ *
* @param connectionPool
*/
private void createTestTable(JDBCConnectionPool connectionPool) {
@@ -99,7 +99,7 @@ public class ComboBoxSQLContainerFilteredValueChange extends TestBase {
/**
* Adds test data to the test table
- *
+ *
* @param connectionPool
* @throws SQLException
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxScrollingToPageDisabled.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxScrollingToPageDisabled.java
index a8a66b64ec..1b0675c914 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxScrollingToPageDisabled.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxScrollingToPageDisabled.java
@@ -8,8 +8,8 @@ import com.vaadin.tests.components.ComponentTestCase;
import com.vaadin.ui.ComboBox;
import com.vaadin.ui.Notification;
-public class ComboBoxScrollingToPageDisabled extends
- ComponentTestCase<ComboBox> {
+public class ComboBoxScrollingToPageDisabled
+ extends ComponentTestCase<ComboBox> {
private static final Object CAPTION = "caption";
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxScrollingWithArrows.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxScrollingWithArrows.java
index d9ae7da050..0794151932 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxScrollingWithArrows.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxScrollingWithArrows.java
@@ -29,7 +29,7 @@ public class ComboBoxScrollingWithArrows extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -42,7 +42,7 @@ public class ComboBoxScrollingWithArrows extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -52,7 +52,7 @@ public class ComboBoxScrollingWithArrows extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSelectingWithNewItemsAllowed.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSelectingWithNewItemsAllowed.java
index d941c153c3..1b02e9e5d8 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSelectingWithNewItemsAllowed.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSelectingWithNewItemsAllowed.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,8 +26,8 @@ public class ComboBoxSelectingWithNewItemsAllowed extends ComboBoxSelecting {
super.setup(request);
comboBox.setNewItemsAllowed(true);
- final Label label = new Label(String.valueOf(comboBox.getItemIds()
- .size()));
+ final Label label = new Label(
+ String.valueOf(comboBox.getItemIds().size()));
label.setCaption("Item count:");
label.setId("count");
comboBox.addValueChangeListener(new Property.ValueChangeListener() {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSetNullWhenNewItemsAllowed.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSetNullWhenNewItemsAllowed.java
index a052a29bba..f6f22741c3 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSetNullWhenNewItemsAllowed.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSetNullWhenNewItemsAllowed.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSlowInFF.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSlowInFF.java
index d98997d28f..2efa1c3991 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSlowInFF.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSlowInFF.java
@@ -30,8 +30,8 @@ public class ComboBoxSlowInFF extends TestBase {
for (int i = 0; i < 200; i++) {
Item item = t.addItem(i);
for (int j = 0; j < 5; j++) {
- item.getItemProperty("test" + j).setValue(
- createComponent(i, j));
+ item.getItemProperty("test" + j)
+ .setValue(createComponent(i, j));
}
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionOnDetach.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionOnDetach.java
index d1d2f58239..509824e836 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionOnDetach.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionOnDetach.java
@@ -20,8 +20,8 @@ public class ComboBoxSuggestionOnDetach extends TestBase {
layout.setSizeUndefined();
popup.setContent(layout);
- ComboBox comboBox = new ComboBox("Combo box", Arrays.asList("Option 1",
- "Option 2", "Option 3"));
+ ComboBox comboBox = new ComboBox("Combo box",
+ Arrays.asList("Option 1", "Option 2", "Option 3"));
comboBox.addListener(new FieldEvents.FocusListener() {
@Override
public void focus(FocusEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPageLength.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPageLength.java
index f981b6fa07..66197cf483 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPageLength.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPageLength.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidth.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidth.java
index 86e5b54cb6..b21a082dcc 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidth.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidth.java
@@ -9,24 +9,15 @@ import com.vaadin.ui.ComboBox;
public class ComboBoxSuggestionPopupWidth extends AbstractTestUI {
- private static List<String> items = Arrays
- .asList("abc",
- "cde",
- "efg",
- "ghi",
- "ijk",
- "more items 1",
- "more items 2",
- "more items 3",
- "Ridicilously long item caption so we can see how the ComboBox displays ridicilously long captions in the suggestion pop-up",
- "more items 4", "more items 5", "more items 6",
- "more items 7");
+ private static List<String> items = Arrays.asList("abc", "cde", "efg",
+ "ghi", "ijk", "more items 1", "more items 2", "more items 3",
+ "Ridicilously long item caption so we can see how the ComboBox displays ridicilously long captions in the suggestion pop-up",
+ "more items 4", "more items 5", "more items 6", "more items 7");
@Override
protected void setup(VaadinRequest request) {
ComboBox cb = new ComboBox(
- "200px wide ComboBox with 100% wide suggestion popup",
- items);
+ "200px wide ComboBox with 100% wide suggestion popup", items);
cb.setPopupWidth("100%");
cb.setWidth("200px");
cb.addStyleName("width-as-percentage");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthLegacy.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthLegacy.java
index 091b5f9aab..2ce4450590 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthLegacy.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthLegacy.java
@@ -9,18 +9,10 @@ import com.vaadin.ui.ComboBox;
public class ComboBoxSuggestionPopupWidthLegacy extends AbstractTestUI {
- private static List<String> items = Arrays
- .asList("abc",
- "cde",
- "efg",
- "ghi",
- "ijk",
- "more items 1",
- "more items 2",
- "more items 3",
- "Ridicilously long item caption so we can see how the ComboBox displays ridicilously long captions in the suggestion pop-up",
- "more items 4", "more items 5", "more items 6",
- "more items 7");
+ private static List<String> items = Arrays.asList("abc", "cde", "efg",
+ "ghi", "ijk", "more items 1", "more items 2", "more items 3",
+ "Ridicilously long item caption so we can see how the ComboBox displays ridicilously long captions in the suggestion pop-up",
+ "more items 4", "more items 5", "more items 6", "more items 7");
@Override
protected void setup(VaadinRequest request) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthPercentage.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthPercentage.java
index 1ddc666a44..5cf736b088 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthPercentage.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthPercentage.java
@@ -9,18 +9,10 @@ import com.vaadin.ui.ComboBox;
public class ComboBoxSuggestionPopupWidthPercentage extends AbstractTestUI {
- private static List<String> items = Arrays
- .asList("abc",
- "cde",
- "efg",
- "ghi",
- "ijk",
- "more items 1",
- "more items 2",
- "more items 3",
- "Ridicilously long item caption so we can see how the ComboBox displays ridicilously long captions in the suggestion pop-up",
- "more items 4", "more items 5", "more items 6",
- "more items 7");
+ private static List<String> items = Arrays.asList("abc", "cde", "efg",
+ "ghi", "ijk", "more items 1", "more items 2", "more items 3",
+ "Ridicilously long item caption so we can see how the ComboBox displays ridicilously long captions in the suggestion pop-up",
+ "more items 4", "more items 5", "more items 6", "more items 7");
@Override
protected void setup(VaadinRequest request) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthPixels.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthPixels.java
index 623f4c904f..7ebf149a5c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthPixels.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthPixels.java
@@ -9,18 +9,10 @@ import com.vaadin.ui.ComboBox;
public class ComboBoxSuggestionPopupWidthPixels extends AbstractTestUI {
- private static List<String> items = Arrays
- .asList("abc",
- "cde",
- "efg",
- "ghi",
- "ijk",
- "more items 1",
- "more items 2",
- "more items 3",
- "Ridicilously long item caption so we can see how the ComboBox displays ridicilously long captions in the suggestion pop-up",
- "more items 4", "more items 5", "more items 6",
- "more items 7");
+ private static List<String> items = Arrays.asList("abc", "cde", "efg",
+ "ghi", "ijk", "more items 1", "more items 2", "more items 3",
+ "Ridicilously long item caption so we can see how the ComboBox displays ridicilously long captions in the suggestion pop-up",
+ "more items 4", "more items 5", "more items 6", "more items 7");
@Override
protected void setup(VaadinRequest request) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxTextFieldEventOrder.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxTextFieldEventOrder.java
index d33a858dc8..ad4978c8e0 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxTextFieldEventOrder.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxTextFieldEventOrder.java
@@ -14,8 +14,8 @@ public class ComboBoxTextFieldEventOrder extends TestBase {
protected void setup() {
TextField textField = new TextField("text field");
textField.setImmediate(true);
- final Select select = new Select("select", Arrays.asList("1", "2", "3",
- "4"));
+ final Select select = new Select("select",
+ Arrays.asList("1", "2", "3", "4"));
textField.addListener(new ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxUndefinedWidthAndIcon.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxUndefinedWidthAndIcon.java
index 05b52dee80..1598a77d66 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxUndefinedWidthAndIcon.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxUndefinedWidthAndIcon.java
@@ -15,8 +15,8 @@ public class ComboBoxUndefinedWidthAndIcon extends TestBase {
for (int i = 1; i < 200 + 1; i++) {
Item item = cb.addItem(i);
item.getItemProperty("caption").setValue("Item " + i);
- item.getItemProperty("icon").setValue(
- new ThemeResource("../runo/icons/16/users.png"));
+ item.getItemProperty("icon")
+ .setValue(new ThemeResource("../runo/icons/16/users.png"));
}
cb.setItemIconPropertyId("icon");
cb.setItemCaptionPropertyId("caption");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxValoDoubleClick.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxValoDoubleClick.java
index f8886e3af7..250537f48e 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxValoDoubleClick.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxValoDoubleClick.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxValueInput.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxValueInput.java
index a35bc46390..64ed79a54f 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxValueInput.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxValueInput.java
@@ -44,7 +44,8 @@ public class ComboBoxValueInput extends AbstractTestUI {
return 3268;
}
- private ComboBox getComboBox(String caption, boolean addNullItem, String id) {
+ private ComboBox getComboBox(String caption, boolean addNullItem,
+ String id) {
ComboBox cb = new ComboBox(caption);
cb.setImmediate(true);
if (addNullItem) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboPushTiming.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboPushTiming.java
index fe2cffdc4c..8588d77e30 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboPushTiming.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboPushTiming.java
@@ -93,7 +93,8 @@ public class ComboPushTiming extends TestBase {
class MyExecutor extends ThreadPoolExecutor {
public MyExecutor() {
- super(5, 20, 20, TimeUnit.SECONDS, new SynchronousQueue<Runnable>());
+ super(5, 20, 20, TimeUnit.SECONDS,
+ new SynchronousQueue<Runnable>());
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboSelectedValueBeyondTheFirstDropdownPage.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboSelectedValueBeyondTheFirstDropdownPage.java
index acfb7b165f..66ed6d6da5 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboSelectedValueBeyondTheFirstDropdownPage.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboSelectedValueBeyondTheFirstDropdownPage.java
@@ -8,8 +8,8 @@ import com.vaadin.ui.ComboBox;
import com.vaadin.ui.Label;
@SuppressWarnings("serial")
-public class ComboSelectedValueBeyondTheFirstDropdownPage extends
- AbstractTestUI {
+public class ComboSelectedValueBeyondTheFirstDropdownPage
+ extends AbstractTestUI {
protected static final int ITEM_COUNT = 21;
protected static final String ITEM_NAME_TEMPLATE = "Item %d";
@@ -32,7 +32,8 @@ public class ComboSelectedValueBeyondTheFirstDropdownPage extends
private ComboBox getComboBox(final Label value) {
final ComboBox combobox = new ComboBox("MyCaption");
- combobox.setDescription("ComboBox with more than 10 elements in it's dropdown list.");
+ combobox.setDescription(
+ "ComboBox with more than 10 elements in it's dropdown list.");
combobox.setImmediate(true);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboboxInPopupViewWithItems.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboboxInPopupViewWithItems.java
index 3aaae7e6dc..45d6c0a03d 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboboxInPopupViewWithItems.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboboxInPopupViewWithItems.java
@@ -29,8 +29,8 @@ public class ComboboxInPopupViewWithItems extends TestBase {
class PopupContent implements PopupView.Content {
- private final ComboBox cb = new ComboBox(null, Arrays.asList("Item 1",
- "Item 2", "Item 3"));
+ private final ComboBox cb = new ComboBox(null,
+ Arrays.asList("Item 1", "Item 2", "Item 3"));
@Override
public String getMinimizedValueAsHTML() {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboboxMenuBarAutoopen.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboboxMenuBarAutoopen.java
index f65b020bd1..d47bc5e7da 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboboxMenuBarAutoopen.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboboxMenuBarAutoopen.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ import com.vaadin.ui.Notification.Type;
/**
* Test UI for combobox popup which should be closed on any click outside it.
- *
+ *
* @author Vaadin Ltd
*/
public class ComboboxMenuBarAutoopen extends AbstractTestUI {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboboxPageLengthZeroScroll.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboboxPageLengthZeroScroll.java
index 735491d80a..70d16fb62a 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboboxPageLengthZeroScroll.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboboxPageLengthZeroScroll.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -23,7 +23,7 @@ import com.vaadin.ui.ComboBox;
/**
* Test UI for issue #13488, where scrolling to the next page with pagelength 0
* would break the rendering of any page except the first.
- *
+ *
* @author Vaadin Ltd
*/
@SuppressWarnings("serial")
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboboxPrimaryStyleNames.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboboxPrimaryStyleNames.java
index 375b417407..67f5669d8e 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboboxPrimaryStyleNames.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboboxPrimaryStyleNames.java
@@ -21,8 +21,8 @@ public class ComboboxPrimaryStyleNames extends TestBase {
addItem(box, "Value 4");
addComponent(box);
- addComponent(new Button("Set primary style",
- new Button.ClickListener() {
+ addComponent(
+ new Button("Set primary style", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
box.setPrimaryStyleName("my-second-combobox");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboboxStyleChangeWidth.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboboxStyleChangeWidth.java
index 593f567c12..f07d8677a7 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboboxStyleChangeWidth.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboboxStyleChangeWidth.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.ui.ComboBox;
/**
* Test UI for adding a stylename to a combobox with an undefined width.
- *
+ *
* @author Vaadin Ltd
*/
public class ComboboxStyleChangeWidth extends AbstractTestUIWithLog {
@@ -33,7 +33,8 @@ public class ComboboxStyleChangeWidth extends AbstractTestUIWithLog {
final ComboBox cbFoo = new ComboBox();
cbFoo.setImmediate(true);
cbFoo.setSizeUndefined();
- cbFoo.addItem("A really long string that causes an inline width to be set");
+ cbFoo.addItem(
+ "A really long string that causes an inline width to be set");
Button btn = new Button("Click to break CB",
new Button.ClickListener() {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/Comboboxes.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/Comboboxes.java
index 5b2608b389..57b7551a84 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/Comboboxes.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/Comboboxes.java
@@ -141,8 +141,8 @@ public class Comboboxes extends ComponentTestCase<ComboBox> {
if (value == null) {
c.setItemIcon(id, null);
} else {
- c.setItemIcon(id, new ThemeResource(value + "?"
- + new Date().getTime()));
+ c.setItemIcon(id, new ThemeResource(
+ value + "?" + new Date().getTime()));
}
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/FilteringTurkishLocale.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/FilteringTurkishLocale.java
index ff7faf1965..f5b1109eed 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/FilteringTurkishLocale.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/FilteringTurkishLocale.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,12 +30,12 @@ public class FilteringTurkishLocale extends AbstractTestUI {
@Override
protected void setup(VaadinRequest request) {
- final ComboBox comboBox = new ComboBox("Box", Arrays.asList(
- "I without dot", "İ with dot"));
+ final ComboBox comboBox = new ComboBox("Box",
+ Arrays.asList("I without dot", "İ with dot"));
comboBox.setNullSelectionAllowed(false);
- NativeSelect localeSelect = new NativeSelect("Locale", Arrays.asList(
- Locale.ENGLISH, new Locale("tr")));
+ NativeSelect localeSelect = new NativeSelect("Locale",
+ Arrays.asList(Locale.ENGLISH, new Locale("tr")));
localeSelect.addValueChangeListener(new ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/PopUpWidth.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/PopUpWidth.java
index c73bb28c43..d77af57eab 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/PopUpWidth.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/PopUpWidth.java
@@ -12,7 +12,8 @@ public class PopUpWidth extends TestBase {
protected void setup() {
addComponent(createComboBox("Do not touch this"));
- addComponent(createComboBox("Browse this (check that width does not change)"));
+ addComponent(createComboBox(
+ "Browse this (check that width does not change)"));
}
private ComboBox createComboBox(String caption) {
@@ -22,8 +23,8 @@ public class PopUpWidth extends TestBase {
for (int i = 1; i < 200 + 1; i++) {
Item item = cb.addItem(i);
item.getItemProperty("caption").setValue("Item " + i);
- item.getItemProperty("icon").setValue(
- new ThemeResource("../runo/icons/16/users.png"));
+ item.getItemProperty("icon")
+ .setValue(new ThemeResource("../runo/icons/16/users.png"));
}
cb.setItemIconPropertyId("icon");
cb.setItemCaptionPropertyId("caption");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/customcomponent/CustomComponentChildVisibility.java b/uitest/src/main/java/com/vaadin/tests/components/customcomponent/CustomComponentChildVisibility.java
index 48484165ff..d227b52f9f 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/customcomponent/CustomComponentChildVisibility.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/customcomponent/CustomComponentChildVisibility.java
@@ -28,8 +28,8 @@ public class CustomComponentChildVisibility extends AbstractTestUI {
protected void setup(VaadinRequest request) {
Label label = new Label("In panel");
label.setId("label");
- final CustomComponent cc = new CustomComponent(new Panel(
- "In CustomComponent", label));
+ final CustomComponent cc = new CustomComponent(
+ new Panel("In CustomComponent", label));
Button hideButton = new Button("Hide CustomComponent");
hideButton.addClickListener(new Button.ClickListener() {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/customcomponent/CustomComponentHideContent.java b/uitest/src/main/java/com/vaadin/tests/components/customcomponent/CustomComponentHideContent.java
index 47dca9d57e..7b76da33d7 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/customcomponent/CustomComponentHideContent.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/customcomponent/CustomComponentHideContent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2012 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/customcomponent/EmbeddedInCustomComponent.java b/uitest/src/main/java/com/vaadin/tests/components/customcomponent/EmbeddedInCustomComponent.java
index 8170f152c2..955c4ff885 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/customcomponent/EmbeddedInCustomComponent.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/customcomponent/EmbeddedInCustomComponent.java
@@ -21,8 +21,8 @@ public class EmbeddedInCustomComponent extends TestBase {
}
private CustomComponent wrap(String caption, String themeImage) {
- Embedded image = new Embedded(caption, new ThemeResource(
- "../runo/icons/64/" + themeImage));
+ Embedded image = new Embedded(caption,
+ new ThemeResource("../runo/icons/64/" + themeImage));
CustomComponent cc = new CustomComponent(image);
return cc;
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/customfield/AbstractNestedFormExample.java b/uitest/src/main/java/com/vaadin/tests/components/customfield/AbstractNestedFormExample.java
index 07c740a96d..a8682d8559 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/customfield/AbstractNestedFormExample.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/customfield/AbstractNestedFormExample.java
@@ -38,11 +38,11 @@ public abstract class AbstractNestedFormExample extends TestBase {
"taina.testaaja@example.com", "", "Ruukinkatu 2–4", 20540,
"Turku");
Item item = table.addItem(person);
- item.getItemProperty("Name").setValue(
- person.getFirstName() + " " + person.getLastName());
+ item.getItemProperty("Name")
+ .setValue(person.getFirstName() + " " + person.getLastName());
item = table.addItem(person2);
- item.getItemProperty("Name").setValue(
- person2.getFirstName() + " " + person2.getLastName());
+ item.getItemProperty("Name")
+ .setValue(person2.getFirstName() + " " + person2.getLastName());
return table;
}
@@ -58,8 +58,9 @@ public abstract class AbstractNestedFormExample extends TestBase {
removeComponent(personForm);
}
if (event.getProperty().getValue() != null) {
- personForm = new NestedPersonForm((Person) event
- .getProperty().getValue(), embeddedAddress);
+ personForm = new NestedPersonForm(
+ (Person) event.getProperty().getValue(),
+ embeddedAddress);
personForm.setWidth("350px");
addComponent(personForm);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/customfield/AddressField.java b/uitest/src/main/java/com/vaadin/tests/components/customfield/AddressField.java
index bc9f13c454..debeeba1d9 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/customfield/AddressField.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/customfield/AddressField.java
@@ -68,7 +68,8 @@ public class AddressField extends CustomField<Address> {
* commit changes of the address form
*/
@Override
- public void commit() throws Buffered.SourceException, InvalidValueException {
+ public void commit()
+ throws Buffered.SourceException, InvalidValueException {
addressForm.commit();
super.commit();
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/customfield/AddressFormExample.java b/uitest/src/main/java/com/vaadin/tests/components/customfield/AddressFormExample.java
index e5ac67b32e..72e5a11fbc 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/customfield/AddressFormExample.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/customfield/AddressFormExample.java
@@ -29,9 +29,9 @@ public class AddressFormExample extends TestBase {
public void buttonClick(ClickEvent event) {
field.commit();
Address address = field.getValue();
- Notification.show("Address saved: "
- + address.getStreetAddress() + ", "
- + address.getPostalCode() + ", " + address.getCity());
+ Notification.show("Address saved: " + address.getStreetAddress()
+ + ", " + address.getPostalCode() + ", "
+ + address.getCity());
}
});
addComponent(commitButton);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/customfield/CustomFieldSize.java b/uitest/src/main/java/com/vaadin/tests/components/customfield/CustomFieldSize.java
index b6f46cadd0..b93028eccb 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/customfield/CustomFieldSize.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/customfield/CustomFieldSize.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.ui.TextField;
import com.vaadin.ui.VerticalLayout;
/**
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/components/customfield/EmbeddedForm.java b/uitest/src/main/java/com/vaadin/tests/components/customfield/EmbeddedForm.java
index 2703e01a27..5d7d3f1faa 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/customfield/EmbeddedForm.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/customfield/EmbeddedForm.java
@@ -10,10 +10,10 @@ import com.vaadin.ui.Layout;
/**
* Form that displays its fields in the layout of another form.
- *
+ *
* The fields are still logically part of this form even though they are in the
* layout of the parent form. The embedded form itself is automatically hidden.
- *
+ *
* TODO Known issue: any field factory creating an {@link EmbeddedForm}
* (directly or indirectly) should re-use the field once it has been created to
* avoid the creation of duplicate fields when e.g. setting the visible item
@@ -25,7 +25,7 @@ public class EmbeddedForm extends Form {
/**
* Create a form that places its fields in another {@link Form}.
- *
+ *
* @param parentForm
* form to which to embed the fields, not null
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/components/customfield/NestedPersonForm.java b/uitest/src/main/java/com/vaadin/tests/components/customfield/NestedPersonForm.java
index 9b40074433..16d99bb5ad 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/customfield/NestedPersonForm.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/customfield/NestedPersonForm.java
@@ -39,8 +39,8 @@ public class NestedPersonForm extends Form {
setItemDataSource(beanItem, Arrays.asList("firstName", "lastName",
"address", "email", "phoneNumber"));
getFooter().addComponent(getButtonsLayout());
- ((MarginHandler) getFooter()).setMargin(new MarginInfo(false, false,
- true, true));
+ ((MarginHandler) getFooter())
+ .setMargin(new MarginInfo(false, false, true, true));
}
/**
@@ -87,8 +87,8 @@ public class NestedPersonForm extends Form {
if ("address".equals(propertyId)) {
// create a custom field for the Address object
if (addressField == null) {
- Form form = (embeddedAddress && uiContext instanceof Form) ? (Form) uiContext
- : null;
+ Form form = (embeddedAddress && uiContext instanceof Form)
+ ? (Form) uiContext : null;
addressField = new AddressField(form);
}
f = addressField;
diff --git a/uitest/src/main/java/com/vaadin/tests/components/customlayout/CustomLayoutUsingTemplate.java b/uitest/src/main/java/com/vaadin/tests/components/customlayout/CustomLayoutUsingTemplate.java
index 2e1ac21892..8bb0ef71d5 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/customlayout/CustomLayoutUsingTemplate.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/customlayout/CustomLayoutUsingTemplate.java
@@ -11,8 +11,8 @@ import com.vaadin.ui.CustomLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.TextField;
-public class CustomLayoutUsingTemplate extends TestBase implements
- ClickListener {
+public class CustomLayoutUsingTemplate extends TestBase
+ implements ClickListener {
CustomLayout layout;
Button button1 = new Button("Add Button to first location", this);
@@ -20,13 +20,13 @@ public class CustomLayoutUsingTemplate extends TestBase implements
@Override
protected void setup() {
- String thisPackage = CustomLayoutUsingTemplate.class.getName().replace(
- '.', '/');
+ String thisPackage = CustomLayoutUsingTemplate.class.getName()
+ .replace('.', '/');
thisPackage = thisPackage.replaceAll(
CustomLayoutUsingTemplate.class.getSimpleName() + "$", "");
String template = thisPackage + "template.htm";
- InputStream is = getClass().getClassLoader().getResourceAsStream(
- template);
+ InputStream is = getClass().getClassLoader()
+ .getResourceAsStream(template);
addComponent(button1);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/customlayout/CustomLayoutUsingTheme.java b/uitest/src/main/java/com/vaadin/tests/components/customlayout/CustomLayoutUsingTheme.java
index db5e81febf..31f33d356b 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/customlayout/CustomLayoutUsingTheme.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/customlayout/CustomLayoutUsingTheme.java
@@ -38,8 +38,9 @@ public class CustomLayoutUsingTheme extends TestBase implements ClickListener {
@Override
public void buttonClick(ClickEvent event) {
- layout.addComponent(new NativeButton(
- "This is it, the body!"), "body");
+ layout.addComponent(
+ new NativeButton("This is it, the body!"),
+ "body");
}
}));
layout.addComponent(menu, "menu");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/customlayout/CustomLayoutWithMissingSlot.java b/uitest/src/main/java/com/vaadin/tests/components/customlayout/CustomLayoutWithMissingSlot.java
index 91b5dcc0ea..f979f8a7e5 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/customlayout/CustomLayoutWithMissingSlot.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/customlayout/CustomLayoutWithMissingSlot.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,10 +32,9 @@ public class CustomLayoutWithMissingSlot extends AbstractTestUIWithLog {
protected void setup(VaadinRequest request) {
CustomLayout cl;
try {
- cl = new CustomLayout(
- new ByteArrayInputStream(
- "<div>First: <div location='first'></div><p>Second: <div location='second'></div><p>"
- .getBytes("UTF-8")));
+ cl = new CustomLayout(new ByteArrayInputStream(
+ "<div>First: <div location='first'></div><p>Second: <div location='second'></div><p>"
+ .getBytes("UTF-8")));
cl.addComponent(new TextField("This should be visible"), "first");
Button button = new Button(
"This button is visible, together with one label");
@@ -47,8 +46,9 @@ public class CustomLayoutWithMissingSlot extends AbstractTestUIWithLog {
}
});
cl.addComponent(button, "second");
- cl.addComponent(new TextField(
- "This won't be as the slot is missing"), "third");
+ cl.addComponent(
+ new TextField("This won't be as the slot is missing"),
+ "third");
addComponent(cl);
} catch (IOException e) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/customlayout/CustomLayoutWithNullTemplate.java b/uitest/src/main/java/com/vaadin/tests/components/customlayout/CustomLayoutWithNullTemplate.java
index de1caf86df..37a99d989b 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/customlayout/CustomLayoutWithNullTemplate.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/customlayout/CustomLayoutWithNullTemplate.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/customlayout/CustomLayoutWithoutTemplate.java b/uitest/src/main/java/com/vaadin/tests/components/customlayout/CustomLayoutWithoutTemplate.java
index 54949a053d..03a8f795ee 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/customlayout/CustomLayoutWithoutTemplate.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/customlayout/CustomLayoutWithoutTemplate.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/AriaDisabled.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/AriaDisabled.java
index 0832f5afeb..b4e36d3bc6 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/AriaDisabled.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/AriaDisabled.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/CommitInvalid.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/CommitInvalid.java
index 1553594867..79c60f1984 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/CommitInvalid.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/CommitInvalid.java
@@ -48,7 +48,8 @@ public class CommitInvalid extends TestBase {
/*
* Create and configure Date Field, the actual component to be tested.
*/
- dateProperty = new ObjectProperty<Date>(new Date(2009 - 1900, 4 - 1, 1));
+ dateProperty = new ObjectProperty<Date>(
+ new Date(2009 - 1900, 4 - 1, 1));
dateField = new DateField("Year", dateProperty);
dateField.setLocale(new Locale("fi", "FI"));
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/CustomDateFormatEEE.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/CustomDateFormatEEE.java
index fc3c8c97e8..ab48876afc 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/CustomDateFormatEEE.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/CustomDateFormatEEE.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/CustomDateFormats.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/CustomDateFormats.java
index f51c75d57a..83eda35ef7 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/CustomDateFormats.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/CustomDateFormats.java
@@ -172,8 +172,8 @@ public class CustomDateFormats extends TestBase {
Label expectedLabel = new Label(expDateFormat.format(cal.getTime()));
if (!pattern.equals(expectedDateFormat)) {
- expectedLabel.setValue(expectedLabel.getValue()
- + " (differs from JDK)");
+ expectedLabel
+ .setValue(expectedLabel.getValue() + " (differs from JDK)");
}
expectedLabel.setWidth(null);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldChangeResolution.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldChangeResolution.java
index 9dbd8fa6dc..86a5608aa2 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldChangeResolution.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldChangeResolution.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldClose.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldClose.java
index 9ce190a293..01d8f5cd0a 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldClose.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldClose.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldDiscardValue.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldDiscardValue.java
index 4839d02f3b..9303b6b38d 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldDiscardValue.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldDiscardValue.java
@@ -17,8 +17,8 @@ import com.vaadin.ui.VerticalLayout;
/**
* Test to demonstrate how discarding of field value works with various valid
* and invalid data sources. Previously (Ticket #8069) the case where the
- * content of the datasource was null was not handled correctly. This value
- * is a valid data source value for the field, but discard did not actually discard
+ * content of the datasource was null was not handled correctly. This value is a
+ * valid data source value for the field, but discard did not actually discard
* the value or remove error markers in this cases.
*
* @author Vaadin Ltd
@@ -29,11 +29,11 @@ public class DateFieldDiscardValue extends AbstractTestUI {
public static final String PROP_NONULL = "A field with a valid date in the data source property";
public static final String PROP_NULL_VALUE = "A field with a null value in the data source property";
public static final String PROP_NULL = "A field with a null datasource property";
-
+
@Override
protected void setup(VaadinRequest request) {
String dateFormat = "dd/MM/yy";
-
+
final DateField df = new DateField(PROP_NONULL);
df.setDateFormat(dateFormat);
df.setBuffered(true);
@@ -41,7 +41,7 @@ public class DateFieldDiscardValue extends AbstractTestUI {
try {
date = new SimpleDateFormat(dateFormat).parse("25/07/16");
} catch (ParseException e1) {
- //This cannot happen
+ // This cannot happen
}
ObjectProperty<Date> prop = new ObjectProperty<Date>(date, Date.class);
df.setPropertyDataSource(prop);
@@ -61,7 +61,7 @@ public class DateFieldDiscardValue extends AbstractTestUI {
final DateField df1 = new DateField(PROP_NULL_VALUE);
df1.setDateFormat(dateFormat);
df1.setBuffered(true);
-
+
prop = new ObjectProperty<Date>(null, Date.class);
df1.setPropertyDataSource(prop);
button = new Button("Discard 2");
@@ -71,7 +71,7 @@ public class DateFieldDiscardValue extends AbstractTestUI {
public void buttonClick(ClickEvent event) {
df1.discard();
}
-
+
});
hLayout = new HorizontalLayout(df1, button);
layout.addComponent(hLayout);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldExtendedRange.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldExtendedRange.java
index 8a15d83121..615835245f 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldExtendedRange.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldExtendedRange.java
@@ -38,7 +38,8 @@ public class DateFieldExtendedRange extends TestBase {
fields[4] = makeDateField(true, fi, "Finnish locale with week numbers");
fields[4].setShowISOWeekNumbers(true);
- fields[5] = makeDateField(false, fi, "Finnish locale with week numbers");
+ fields[5] = makeDateField(false, fi,
+ "Finnish locale with week numbers");
fields[5].setShowISOWeekNumbers(true);
for (DateField f : fields) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldFastForward.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldFastForward.java
index b38f58e5cc..b3695a3c5e 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldFastForward.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldFastForward.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldInSubWindow.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldInSubWindow.java
index fab97f46cb..864da0b871 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldInSubWindow.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldInSubWindow.java
@@ -96,8 +96,8 @@ public class DateFieldInSubWindow extends AbstractTestCase {
BeanItem<MyBean> myBeanItem = new BeanItem<MyBean>(myBean);
generalForm.setItemDataSource(myBeanItem);
- generalForm.setVisibleItemProperties(new String[] { "myDate",
- "myString" });
+ generalForm.setVisibleItemProperties(
+ new String[] { "myDate", "myString" });
generalForm.setValidationVisible(true);
layout.addComponent(generalForm);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldKeyboardInput.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldKeyboardInput.java
index 8157ce5028..8af47d6e2a 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldKeyboardInput.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldKeyboardInput.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldPopupClosing.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldPopupClosing.java
index 60508a30d4..a1a88a4e79 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldPopupClosing.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldPopupClosing.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldPopupClosingOnDetach.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldPopupClosingOnDetach.java
index 247d1a079c..cd9e760f51 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldPopupClosingOnDetach.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldPopupClosingOnDetach.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldPopupOffScreen.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldPopupOffScreen.java
index 1baea1b793..1f5eb4b394 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldPopupOffScreen.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldPopupOffScreen.java
@@ -59,7 +59,8 @@ public class DateFieldPopupOffScreen extends AbstractTestCase {
DateField df = new DateField();
df.setLocale(new Locale("fi"));
df.setResolution(Resolution.SECOND);
- df.setDescription("This is a long, multiline tooltip.<br/>It should always be on screen so it can be read.");
+ df.setDescription(
+ "This is a long, multiline tooltip.<br/>It should always be on screen so it can be read.");
df.setValue(new Date(1000000L));
return df;
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldPopupPosition.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldPopupPosition.java
index 4469ad3b1a..deba861ea2 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldPopupPosition.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldPopupPosition.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.ui.PopupDateField;
/**
* Test UI for date field Popup calendar.
- *
+ *
* @author Vaadin Ltd
*/
public abstract class DateFieldPopupPosition extends AbstractTestUI {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldPrimaryStyleNames.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldPrimaryStyleNames.java
index e477ee8487..f81e12151b 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldPrimaryStyleNames.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldPrimaryStyleNames.java
@@ -18,8 +18,8 @@ public class DateFieldPrimaryStyleNames extends TestBase {
idf.setPrimaryStyleName("my-inline-datefield");
addComponent(idf);
- addComponent(new Button("Set primary stylename",
- new Button.ClickListener() {
+ addComponent(
+ new Button("Set primary stylename", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
df.setPrimaryStyleName("my-second-datefield");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldRangeValidation.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldRangeValidation.java
index 070631bac2..fc31491afe 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldRangeValidation.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldRangeValidation.java
@@ -86,34 +86,34 @@ public class DateFieldRangeValidation extends TestBase {
actualDateField = createDateField();
actualDateField.setValue(new Date(2011 - 1900, 12 - 1, 1));
- actualDateField.addValidator(new RangeValidator<Date>("", Date.class,
- null, null) {
- @Override
- public boolean isMinValueIncluded() {
- return range.isFromInclusive();
- }
-
- @Override
- public boolean isMaxValueIncluded() {
- return range.isToInclusive();
- }
-
- @Override
- public Date getMaxValue() {
- return range.getTo();
- }
-
- @Override
- public Date getMinValue() {
- return range.getFrom();
- }
-
- @Override
- public String getErrorMessage() {
- return "Date must be in range " + getMinValue() + " - "
- + getMaxValue();
- }
- });
+ actualDateField.addValidator(
+ new RangeValidator<Date>("", Date.class, null, null) {
+ @Override
+ public boolean isMinValueIncluded() {
+ return range.isFromInclusive();
+ }
+
+ @Override
+ public boolean isMaxValueIncluded() {
+ return range.isToInclusive();
+ }
+
+ @Override
+ public Date getMaxValue() {
+ return range.getTo();
+ }
+
+ @Override
+ public Date getMinValue() {
+ return range.getFrom();
+ }
+
+ @Override
+ public String getErrorMessage() {
+ return "Date must be in range " + getMinValue() + " - "
+ + getMaxValue();
+ }
+ });
addComponent(fromField);
addComponent(fromInclusive);
addComponent(toField);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldRanges.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldRanges.java
index 2daa3e3f96..477fab5590 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldRanges.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldRanges.java
@@ -148,8 +148,8 @@ public class DateFieldRanges extends AbstractTestUI {
Calendar endCal = createCalendar();
endCal.add(Calendar.DATE, 30);
- dynamicDateField = createDateField(startCal.getTime(),
- endCal.getTime(), null, Resolution.DAY, false);
+ dynamicDateField = createDateField(startCal.getTime(), endCal.getTime(),
+ null, Resolution.DAY, false);
inlineDynamicDateField = createDateField(startCal.getTime(),
endCal.getTime(), null, Resolution.DAY, true);
@@ -210,8 +210,8 @@ public class DateFieldRanges extends AbstractTestUI {
DateField df = createDateField(startCal.getTime(), endCal.getTime(),
null, Resolution.DAY, false);
gl.addComponent(df);
- DateField inline = createDateField(startCal.getTime(),
- endCal.getTime(), null, Resolution.DAY, true);
+ DateField inline = createDateField(startCal.getTime(), endCal.getTime(),
+ null, Resolution.DAY, true);
gl.addComponent(inline);
inline.setId("staticInline");
VerticalLayout vl = new VerticalLayout();
@@ -237,9 +237,8 @@ public class DateFieldRanges extends AbstractTestUI {
@Override
public void valueChange(ValueChangeEvent event) {
- label.setValue((gg.getValue() == null ? "Nothing" : gg
- .getValue().toString())
- + " selected. isValid: "
+ label.setValue((gg.getValue() == null ? "Nothing"
+ : gg.getValue().toString()) + " selected. isValid: "
+ gg.isValid());
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldTest.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldTest.java
index 10718cae8b..0f25ee5440 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldTest.java
@@ -31,7 +31,8 @@ public class DateFieldTest<T extends DateField> extends AbstractFieldTest<T> {
protected void createActions() {
super.createActions();
createResolutionSelectAction(CATEGORY_FEATURES);
- createBooleanAction("Lenient", CATEGORY_FEATURES, false, lenientCommand);
+ createBooleanAction("Lenient", CATEGORY_FEATURES, false,
+ lenientCommand);
createBooleanAction("Show week numbers", CATEGORY_FEATURES, false,
weekNumberCommand);
createDateFormatSelectAction(CATEGORY_FEATURES);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldWhenChangingValueAndEnablingParent.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldWhenChangingValueAndEnablingParent.java
index 2c5e9e251b..56b2e5e8f3 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldWhenChangingValueAndEnablingParent.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldWhenChangingValueAndEnablingParent.java
@@ -11,7 +11,8 @@ import com.vaadin.ui.DateField;
import com.vaadin.ui.PopupDateField;
import com.vaadin.ui.VerticalLayout;
-public class DateFieldWhenChangingValueAndEnablingParent extends AbstractTestUI {
+public class DateFieldWhenChangingValueAndEnablingParent
+ extends AbstractTestUI {
@Override
protected void setup(VaadinRequest request) {
@@ -55,8 +56,8 @@ public class DateFieldWhenChangingValueAndEnablingParent extends AbstractTestUI
}
private DateField createDateField(boolean enabled) {
- DateField df = new DateField("DateField, "
- + (enabled ? "enabled" : "disabled"));
+ DateField df = new DateField(
+ "DateField, " + (enabled ? "enabled" : "disabled"));
df.setEnabled(enabled);
df.setId("DATEFIELD_" + (enabled ? "ENABLED" : "DISABLED"));
return df;
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateRangeWithSqlDate.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateRangeWithSqlDate.java
index d3bc4267ec..c97f3deb3c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateRangeWithSqlDate.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateRangeWithSqlDate.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/DefaultDateFieldPopupPosition.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/DefaultDateFieldPopupPosition.java
index 8e4de77837..4fdf9eab76 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/DefaultDateFieldPopupPosition.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/DefaultDateFieldPopupPosition.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -17,9 +17,9 @@ package com.vaadin.tests.components.datefield;
/**
* Test UI for date field Popup calendar in default theme.
- *
+ *
* All UI initialization is defined in super class.
- *
+ *
* @author Vaadin Ltd
*/
public class DefaultDateFieldPopupPosition extends DateFieldPopupPosition {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/DefaultHandleUnparsableDateField.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/DefaultHandleUnparsableDateField.java
index b5842694f0..e1782348d1 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/DefaultHandleUnparsableDateField.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/DefaultHandleUnparsableDateField.java
@@ -25,10 +25,11 @@ public class DefaultHandleUnparsableDateField extends TestBase {
}
});
- final DateField validated = new DateField("Validated Default DateField");
+ final DateField validated = new DateField(
+ "Validated Default DateField");
validated.setImmediate(true);
- validated.addValidator(new NullValidator("Validator: Date is NULL",
- false));
+ validated.addValidator(
+ new NullValidator("Validator: Date is NULL", false));
addComponent(validated);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/DisabledDateFieldPopup.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/DisabledDateFieldPopup.java
index 49590a3cee..0798bb08b0 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/DisabledDateFieldPopup.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/DisabledDateFieldPopup.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/DisabledInlineDateField.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/DisabledInlineDateField.java
index affc5d322c..aaebb2e1a3 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/DisabledInlineDateField.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/DisabledInlineDateField.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/DisabledParentLayout.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/DisabledParentLayout.java
index 49d88630a8..f0d0577039 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/DisabledParentLayout.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/DisabledParentLayout.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ import com.vaadin.ui.DateField;
import com.vaadin.ui.VerticalLayout;
/**
- *
+ *
* @author Vaadin Ltd
*/
public class DisabledParentLayout extends AbstractTestUI {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/DynamicallyChangeDateRange.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/DynamicallyChangeDateRange.java
index 31f97afabd..576d49aa18 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/DynamicallyChangeDateRange.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/DynamicallyChangeDateRange.java
@@ -63,16 +63,16 @@ public class DynamicallyChangeDateRange extends AbstractTestUI {
* @param i
*/
private void setRange(DateField df, int days) {
- df.setRangeStart(new Date(df.getValue().getTime() - days * 24 * 60 * 60
- * 1000));
- df.setRangeEnd(new Date(df.getValue().getTime() + days * 24 * 60 * 60
- * 1000));
+ df.setRangeStart(
+ new Date(df.getValue().getTime() - days * 24 * 60 * 60 * 1000));
+ df.setRangeEnd(
+ new Date(df.getValue().getTime() + days * 24 * 60 * 60 * 1000));
}
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -82,7 +82,7 @@ public class DynamicallyChangeDateRange extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/InlineDateFields.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/InlineDateFields.java
index 1f8ef358af..669d691634 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/InlineDateFields.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/InlineDateFields.java
@@ -46,8 +46,8 @@ public class InlineDateFields extends ComponentTestCase<InlineDateField> {
private InlineDateField createInlineDateField(String caption, String width,
Locale locale) {
- InlineDateField pd = new InlineDateField(caption + "("
- + locale.toString() + ")");
+ InlineDateField pd = new InlineDateField(
+ caption + "(" + locale.toString() + ")");
pd.setWidth(width);
pd.setValue(new Date(12312312313L));
pd.setLocale(locale);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/LenientMode.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/LenientMode.java
index 585395d747..0c99aa6664 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/LenientMode.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/LenientMode.java
@@ -75,8 +75,8 @@ public class LenientMode extends TestBase implements ValueChangeListener {
@Override
public void valueChange(ValueChangeEvent event) {
- getMainWindow().showNotification(
- "New value" + event.getProperty().getValue());
+ getMainWindow()
+ .showNotification("New value" + event.getProperty().getValue());
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/LocaleChange.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/LocaleChange.java
index f69c93419b..e5ac1ac6ac 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/LocaleChange.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/LocaleChange.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/LowResolution.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/LowResolution.java
index 9c2d3d7d51..43f4bbd3ca 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/LowResolution.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/LowResolution.java
@@ -18,8 +18,8 @@ public class LowResolution extends TestBase {
dateField.addListener(new PopupDateField.ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
- getMainWindow().showNotification(
- "Date now" + event.getProperty());
+ getMainWindow()
+ .showNotification("Date now" + event.getProperty());
}
});
dateField.setImmediate(true);
@@ -31,8 +31,8 @@ public class LowResolution extends TestBase {
dateField3.addListener(new PopupDateField.ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
- getMainWindow().showNotification(
- "Date now" + event.getProperty());
+ getMainWindow()
+ .showNotification("Date now" + event.getProperty());
}
});
dateField3.setImmediate(true);
@@ -44,8 +44,8 @@ public class LowResolution extends TestBase {
dateField2.addListener(new PopupDateField.ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
- getMainWindow().showNotification(
- "Date now" + event.getProperty());
+ getMainWindow()
+ .showNotification("Date now" + event.getProperty());
}
});
dateField2.setImmediate(true);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/PopupClosingWithEsc.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/PopupClosingWithEsc.java
index 0b8ffa52fa..dec7e17453 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/PopupClosingWithEsc.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/PopupClosingWithEsc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/PopupDateFieldInputPrompt.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/PopupDateFieldInputPrompt.java
index a267d72b7f..34aa8a0d48 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/PopupDateFieldInputPrompt.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/PopupDateFieldInputPrompt.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.ui.TextField;
/**
* Tests that state change doesn't set input prompt back to PopupDateField if
* focus is still in the input field.
- *
+ *
* @author Vaadin Ltd
*/
public class PopupDateFieldInputPrompt extends AbstractTestUI {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/PopupDateFieldTextEnabled.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/PopupDateFieldTextEnabled.java
index 130ed8f3c5..79dd1b22df 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/PopupDateFieldTextEnabled.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/PopupDateFieldTextEnabled.java
@@ -18,8 +18,8 @@ public class PopupDateFieldTextEnabled extends TestBase {
@Override
public void valueChange(Property.ValueChangeEvent event) {
- field.setTextFieldEnabled((Boolean) event.getProperty()
- .getValue());
+ field.setTextFieldEnabled(
+ (Boolean) event.getProperty().getValue());
if (field.isTextFieldEnabled()) {
box.setCaption(ENABLED);
} else {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/PopupDateFieldValueChangeEvents.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/PopupDateFieldValueChangeEvents.java
index 62a788f4c2..df2825dc66 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/PopupDateFieldValueChangeEvents.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/PopupDateFieldValueChangeEvents.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -15,7 +15,7 @@
*/
/**
- *
+ *
*/
package com.vaadin.tests.components.datefield;
@@ -33,7 +33,7 @@ import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.NativeSelect;
/**
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -43,7 +43,7 @@ public class PopupDateFieldValueChangeEvents extends AbstractTestUIWithLog {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -86,7 +86,7 @@ public class PopupDateFieldValueChangeEvents extends AbstractTestUIWithLog {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -96,7 +96,7 @@ public class PopupDateFieldValueChangeEvents extends AbstractTestUIWithLog {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/PopupDateFields.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/PopupDateFields.java
index 9daf89d950..9bc567c0fc 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/PopupDateFields.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/PopupDateFields.java
@@ -42,8 +42,8 @@ public class PopupDateFields extends ComponentTestCase<PopupDateField> {
private PopupDateField createPopupDateField(String caption, String width,
Locale locale) {
- PopupDateField pd = new PopupDateField(caption + "("
- + locale.toString() + ")");
+ PopupDateField pd = new PopupDateField(
+ caption + "(" + locale.toString() + ")");
pd.setWidth(width);
pd.setValue(new Date(12312312313L));
pd.setLocale(locale);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/ValoDateFieldPopupPosition.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/ValoDateFieldPopupPosition.java
index 59ff6aa9e8..60f1ac0782 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/ValoDateFieldPopupPosition.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/ValoDateFieldPopupPosition.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,9 +19,9 @@ import com.vaadin.annotations.Theme;
/**
* Test UI for date field Popup calendar in Valo theme.
- *
+ *
* All UI initialization is defined in super class.
- *
+ *
* @author Vaadin Ltd
*/
@Theme("valo")
diff --git a/uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropBatchUpload.java b/uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropBatchUpload.java
index b820ccf788..6d92bd51a9 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropBatchUpload.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropBatchUpload.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropFocusObtain.java b/uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropFocusObtain.java
index c7e16440bc..17d3185b17 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropFocusObtain.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropFocusObtain.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -36,7 +36,7 @@ import com.vaadin.ui.VerticalLayout;
/**
* Test UI for text area inside {@link DragAndDropWrapper}: text area should
* obtain focus on click.
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropRelativeWidth.java b/uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropRelativeWidth.java
index 90ec704a8c..3b173847cf 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropRelativeWidth.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropRelativeWidth.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.ui.Label;
/**
* Test UI for DnD image element size
- *
+ *
* @author Vaadin Ltd
*/
public class DragAndDropRelativeWidth extends AbstractTestUI {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropTextArea.java b/uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropTextArea.java
index 2ce3a42957..149c13856b 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropTextArea.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropTextArea.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -24,7 +24,7 @@ import com.vaadin.ui.VerticalLayout;
/**
* Test UI for text area: drag image should contain text-area text.
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/DragStartModes.java b/uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/DragStartModes.java
index 8539f70b17..0f74e57f3f 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/DragStartModes.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/DragStartModes.java
@@ -14,9 +14,8 @@ public class DragStartModes extends TestBase {
@Override
protected void setup() {
- TestUtils
- .injectCSS(getMainWindow(),
- ".v-ddwrapper { background: #ACF; } .extra{ background: #FFA500; }");
+ TestUtils.injectCSS(getMainWindow(),
+ ".v-ddwrapper { background: #ACF; } .extra{ background: #FFA500; }");
addComponent(makeWrapper(DragStartMode.NONE));
addComponent(makeWrapper(DragStartMode.COMPONENT));
diff --git a/uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/SingleUseDragAndDropUpload.java b/uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/SingleUseDragAndDropUpload.java
index 7c7e17a5a6..c00c23a537 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/SingleUseDragAndDropUpload.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/SingleUseDragAndDropUpload.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -41,12 +41,12 @@ public class SingleUseDragAndDropUpload extends AbstractTestUIWithLog {
@Override
protected void setup(VaadinRequest request) {
- Label upload = new Label(FontAwesome.UPLOAD.getHtml(), ContentMode.HTML);
+ Label upload = new Label(FontAwesome.UPLOAD.getHtml(),
+ ContentMode.HTML);
upload.setSizeUndefined();
upload.setStyleName("upload");
- getPage()
- .getStyles()
- .add(".upload{ font-size: 36px; border: 1px solid black; padding:15px;}");
+ getPage().getStyles().add(
+ ".upload{ font-size: 36px; border: 1px solid black; padding:15px;}");
final DragAndDropWrapper dnd = new DragAndDropWrapper(upload);
dnd.setSizeUndefined();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/embedded/EmbeddedAltText.java b/uitest/src/main/java/com/vaadin/tests/components/embedded/EmbeddedAltText.java
index aedfafe627..803cc95a41 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/embedded/EmbeddedAltText.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/embedded/EmbeddedAltText.java
@@ -20,8 +20,8 @@ public class EmbeddedAltText extends TestBase {
@Override
protected void setup() {
- final Embedded e = new Embedded("Caption", new ThemeResource(
- "../runo/icons/64/ok.png"));
+ final Embedded e = new Embedded("Caption",
+ new ThemeResource("../runo/icons/64/ok.png"));
e.setAlternateText("Alt text of the image");
addComponent(e);
final Embedded player = new Embedded();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/embedded/EmbeddedClickListenerRelativeCoordinates.java b/uitest/src/main/java/com/vaadin/tests/components/embedded/EmbeddedClickListenerRelativeCoordinates.java
index 28ffebcf56..3225b0af9a 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/embedded/EmbeddedClickListenerRelativeCoordinates.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/embedded/EmbeddedClickListenerRelativeCoordinates.java
@@ -11,8 +11,8 @@ public class EmbeddedClickListenerRelativeCoordinates extends TestBase {
@Override
protected void setup() {
- Embedded e = new Embedded("Embedded caption", new ThemeResource(
- "../runo/icons/64/ok.png"));
+ Embedded e = new Embedded("Embedded caption",
+ new ThemeResource("../runo/icons/64/ok.png"));
final Label xLabel = new Label();
xLabel.setId("x");
final Label yLabel = new Label();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/embedded/EmbeddedImageRefresh.java b/uitest/src/main/java/com/vaadin/tests/components/embedded/EmbeddedImageRefresh.java
index 52454e115e..7632577227 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/embedded/EmbeddedImageRefresh.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/embedded/EmbeddedImageRefresh.java
@@ -55,8 +55,8 @@ public class EmbeddedImageRefresh extends TestBase {
button.addListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- ((StreamResource) embedded.getSource()).setFilename(new Date()
- .getTime() + ".png");
+ ((StreamResource) embedded.getSource())
+ .setFilename(new Date().getTime() + ".png");
embedded.markAsDirty();
}
});
@@ -130,8 +130,8 @@ public class EmbeddedImageRefresh extends TestBase {
} else {
drawable.setColor(Color.black);
}
- drawable.fillRect(gridx + 1, gridy + 1, gridxnext - gridx
- - 1, gridynext - gridy - 1);
+ drawable.fillRect(gridx + 1, gridy + 1,
+ gridxnext - gridx - 1, gridynext - gridy - 1);
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/embedded/EmbeddedThemeResource.java b/uitest/src/main/java/com/vaadin/tests/components/embedded/EmbeddedThemeResource.java
index ecc746b858..a92c761465 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/embedded/EmbeddedThemeResource.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/embedded/EmbeddedThemeResource.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import com.vaadin.ui.themes.Reindeer;
* Tests that {@link Embedded} uses correct theme when the theme is set with
* {@link #setTheme(String)}, and also updates correctly if theme is changed
* later. {@link Image} is used as the baseline for correct behaviour.
- *
+ *
* @author Vaadin Ltd
*/
public class EmbeddedThemeResource extends AbstractTestUI {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/embedded/EmbeddedTooltip.java b/uitest/src/main/java/com/vaadin/tests/components/embedded/EmbeddedTooltip.java
index aa24337013..28bca2001c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/embedded/EmbeddedTooltip.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/embedded/EmbeddedTooltip.java
@@ -18,9 +18,10 @@ public class EmbeddedTooltip extends TestBase {
@Override
protected void setup() {
- Embedded e = new Embedded("Embedded caption", new ThemeResource(
- "../runo/icons/64/ok.png"));
- e.setDescription("Embedded tooltip, only shown on caption, not on the image");
+ Embedded e = new Embedded("Embedded caption",
+ new ThemeResource("../runo/icons/64/ok.png"));
+ e.setDescription(
+ "Embedded tooltip, only shown on caption, not on the image");
addComponent(e);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/form/FormClearDatasourceRepaint.java b/uitest/src/main/java/com/vaadin/tests/components/form/FormClearDatasourceRepaint.java
index df403ceb78..241c5ff928 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/form/FormClearDatasourceRepaint.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/form/FormClearDatasourceRepaint.java
@@ -49,12 +49,12 @@ public class FormClearDatasourceRepaint extends TestBase {
}
}));
- addComponent(new Button("Change data source",
- new Button.ClickListener() {
+ addComponent(
+ new Button("Change data source", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- form.setItemDataSource(new BeanItem<MyBean>(
- new MyBean()));
+ form.setItemDataSource(
+ new BeanItem<MyBean>(new MyBean()));
}
}));
diff --git a/uitest/src/main/java/com/vaadin/tests/components/form/FormCommitWithInvalidValues.java b/uitest/src/main/java/com/vaadin/tests/components/form/FormCommitWithInvalidValues.java
index b6b0624ba0..1fefe897d4 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/form/FormCommitWithInvalidValues.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/form/FormCommitWithInvalidValues.java
@@ -28,7 +28,8 @@ public class FormCommitWithInvalidValues extends TestBase {
form = new Form();
form.setFooter(null);
TextField tf = new TextField("A field, must contain 1-2 chars");
- tf.addValidator(new StringLengthValidator("Invalid length", 1, 2, false));
+ tf.addValidator(
+ new StringLengthValidator("Invalid length", 1, 2, false));
tf.setRequired(true);
form.addField("a", tf);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/form/FormDescription.java b/uitest/src/main/java/com/vaadin/tests/components/form/FormDescription.java
index 76ea039756..fedf86f675 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/form/FormDescription.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/form/FormDescription.java
@@ -15,8 +15,8 @@ public class FormDescription extends TestBase {
form.addField("AAAA", new TextField());
addComponent(form);
- addComponent(new Button("Toggle description",
- new Button.ClickListener() {
+ addComponent(
+ new Button("Toggle description", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
if (form.getDescription() == null) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/form/FormErrorVisible.java b/uitest/src/main/java/com/vaadin/tests/components/form/FormErrorVisible.java
index fea24d92ad..2d9e8252f9 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/form/FormErrorVisible.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/form/FormErrorVisible.java
@@ -1,12 +1,12 @@
/*
* Copyright 2012 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -35,7 +35,8 @@ public class FormErrorVisible extends AbstractTestUI {
addComponent(new Label("The end to see where the last form ends"));
}
- private Form buildForm(String caption, boolean withError, boolean withFooter) {
+ private Form buildForm(String caption, boolean withError,
+ boolean withFooter) {
Form form = new Form();
form.setCaption(caption);
form.addField("value", new TextField("MyField"));
diff --git a/uitest/src/main/java/com/vaadin/tests/components/form/FormFieldCaptions.java b/uitest/src/main/java/com/vaadin/tests/components/form/FormFieldCaptions.java
index 25487fba7c..f593f15ac5 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/form/FormFieldCaptions.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/form/FormFieldCaptions.java
@@ -14,7 +14,8 @@ public class FormFieldCaptions extends TestBase {
Form form1 = new Form();
Item item1 = createItem();
for (Object propertyId : item1.getItemPropertyIds()) {
- form1.addItemProperty(propertyId, item1.getItemProperty(propertyId));
+ form1.addItemProperty(propertyId,
+ item1.getItemProperty(propertyId));
}
// Method 2
diff --git a/uitest/src/main/java/com/vaadin/tests/components/form/FormNotGettingSmaller.java b/uitest/src/main/java/com/vaadin/tests/components/form/FormNotGettingSmaller.java
index a47ab944a2..7e22818906 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/form/FormNotGettingSmaller.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/form/FormNotGettingSmaller.java
@@ -14,11 +14,11 @@ public class FormNotGettingSmaller extends TestBase {
@Override
protected void setup() {
Item item = new PropertysetItem();
- item.addItemProperty("name", new ObjectProperty<String>(
- "Charles Anthony"));
+ item.addItemProperty("name",
+ new ObjectProperty<String>("Charles Anthony"));
item.addItemProperty("city", new ObjectProperty<String>("London"));
- item.addItemProperty("isTallPerson", new ObjectProperty<Boolean>(
- Boolean.FALSE));
+ item.addItemProperty("isTallPerson",
+ new ObjectProperty<Boolean>(Boolean.FALSE));
Label spacer = new Label();
HorizontalLayout buttons = new HorizontalLayout();
@@ -30,7 +30,8 @@ public class FormNotGettingSmaller extends TestBase {
buttons.setExpandRatio(spacer, 1f);
Form form = new Form();
- form.setDescription("Ooh. Just a demonstration of things, really. Some long lorem ipsum dolor sit amet.Some very long lorem ipsum dolor sit amet.Some very long lorem ipsum dolor sit amet.Some very long lorem ipsum dolor sit amet.");
+ form.setDescription(
+ "Ooh. Just a demonstration of things, really. Some long lorem ipsum dolor sit amet.Some very long lorem ipsum dolor sit amet.Some very long lorem ipsum dolor sit amet.Some very long lorem ipsum dolor sit amet.");
form.setItemDataSource(item);
form.setFooter(buttons);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/form/FormPrimaryStyleName.java b/uitest/src/main/java/com/vaadin/tests/components/form/FormPrimaryStyleName.java
index 241c39d449..8a666a064a 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/form/FormPrimaryStyleName.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/form/FormPrimaryStyleName.java
@@ -24,8 +24,8 @@ public class FormPrimaryStyleName extends TestBase {
addComponent(form);
- addComponent(new Button("Set primary stylename",
- new Button.ClickListener() {
+ addComponent(
+ new Button("Set primary stylename", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
form.setPrimaryStyleName("my-second-form");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/form/FormTest.java b/uitest/src/main/java/com/vaadin/tests/components/form/FormTest.java
index 604beb5fcc..ad137f5a92 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/form/FormTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/form/FormTest.java
@@ -54,7 +54,8 @@ public class FormTest extends AbstractFieldTest<Form> {
private Command<Form, Class<? extends Layout>> formLayoutCommand = new Command<Form, Class<? extends Layout>>() {
@Override
- public void execute(Form c, Class<? extends Layout> value, Object data) {
+ public void execute(Form c, Class<? extends Layout> value,
+ Object data) {
if (value == null) {
c.setLayout(null);
} else {
@@ -77,7 +78,8 @@ public class FormTest extends AbstractFieldTest<Form> {
private Command<Form, Class<? extends Layout>> formFooterCommand = new Command<Form, Class<? extends Layout>>() {
@Override
- public void execute(Form c, Class<? extends Layout> value, Object data) {
+ public void execute(Form c, Class<? extends Layout> value,
+ Object data) {
if (value == null) {
c.setFooter(null);
} else {
@@ -219,15 +221,15 @@ public class FormTest extends AbstractFieldTest<Form> {
LinkedHashMap<String, Alignment> alignmentOptions = new LinkedHashMap<String, Alignment>();
for (AlignmentInfo horizontal : new AlignmentInfo[] {
- AlignmentInfo.LEFT, AlignmentInfo.CENTER, AlignmentInfo.RIGHT }) {
+ AlignmentInfo.LEFT, AlignmentInfo.CENTER,
+ AlignmentInfo.RIGHT }) {
for (AlignmentInfo vertical : new AlignmentInfo[] {
AlignmentInfo.TOP, AlignmentInfo.MIDDLE,
AlignmentInfo.BOTTOM }) {
- Alignment a = new Alignment(horizontal.getBitMask()
- + vertical.getBitMask());
- alignmentOptions.put(
- a.getHorizontalAlignment() + " "
- + a.getVerticalAlignment(), a);
+ Alignment a = new Alignment(
+ horizontal.getBitMask() + vertical.getBitMask());
+ alignmentOptions.put(a.getHorizontalAlignment() + " "
+ + a.getVerticalAlignment(), a);
}
@@ -238,8 +240,8 @@ public class FormTest extends AbstractFieldTest<Form> {
public void execute(Form c, Alignment value, Object data) {
Layout l = c.getFooter();
if (l instanceof AlignmentHandler) {
- ((AlignmentHandler) l).setComponentAlignment(l
- .getComponentIterator().next(), value);
+ ((AlignmentHandler) l).setComponentAlignment(
+ l.getComponentIterator().next(), value);
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/form/FormTooltips.java b/uitest/src/main/java/com/vaadin/tests/components/form/FormTooltips.java
index 6e823204e9..2b248c6389 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/form/FormTooltips.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/form/FormTooltips.java
@@ -33,9 +33,10 @@ public class FormTooltips extends AbstractTestUI {
final Form form = new Form();
form.setId("tooltipForm");
form.setDescription("Some description");
- form.setItemDataSource(new BeanItem<Person>(new Person("foo", "bar",
- "baz", 12, Sex.MALE, null)), Arrays.asList(new String[] {
- "firstName", "lastName", "age" }));
+ form.setItemDataSource(
+ new BeanItem<Person>(
+ new Person("foo", "bar", "baz", 12, Sex.MALE, null)),
+ Arrays.asList(new String[] { "firstName", "lastName", "age" }));
((TextField) form.getField("firstName"))
.setDescription("Fields own tooltip");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/form/FormWithPropertyFormatterConnected.java b/uitest/src/main/java/com/vaadin/tests/components/form/FormWithPropertyFormatterConnected.java
index 24d207739e..d2ea66e838 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/form/FormWithPropertyFormatterConnected.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/form/FormWithPropertyFormatterConnected.java
@@ -31,7 +31,8 @@ public class FormWithPropertyFormatterConnected extends TestBase {
throws Exception {
String str = formattedValue.replaceAll("[^0-9.]",
"");
- if (formattedValue.toLowerCase().contains("months")) {
+ if (formattedValue.toLowerCase()
+ .contains("months")) {
return Double.parseDouble(str) / 12;
}
return Double.parseDouble(str);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/formlayout/FormLayoutClickListener.java b/uitest/src/main/java/com/vaadin/tests/components/formlayout/FormLayoutClickListener.java
index 5d2dc02ccb..67320bb244 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/formlayout/FormLayoutClickListener.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/formlayout/FormLayoutClickListener.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.ui.Label;
/**
* Test UI for Form layout click listener.
- *
+ *
* @author Vaadin Ltd
*/
public class FormLayoutClickListener extends AbstractTestUIWithLog {
@@ -45,12 +45,10 @@ public class FormLayoutClickListener extends AbstractTestUIWithLog {
@Override
public void layoutClick(LayoutClickEvent event) {
- log("Child component: "
- + (event.getChildComponent() == null ? null : event
- .getChildComponent().getId()));
- log("Clicked component: "
- + (event.getClickedComponent() == null ? null : event
- .getClickedComponent().getId()));
+ log("Child component: " + (event.getChildComponent() == null
+ ? null : event.getChildComponent().getId()));
+ log("Clicked component: " + (event.getClickedComponent() == null
+ ? null : event.getClickedComponent().getId()));
log("Source component: " + event.getComponent().getId());
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/components/formlayout/FormLayoutErrorHover.java b/uitest/src/main/java/com/vaadin/tests/components/formlayout/FormLayoutErrorHover.java
index d3932c1df0..3de159facb 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/formlayout/FormLayoutErrorHover.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/formlayout/FormLayoutErrorHover.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/formlayout/FormLayoutInVerticalLayout.java b/uitest/src/main/java/com/vaadin/tests/components/formlayout/FormLayoutInVerticalLayout.java
index 45cb55637c..6e85898f0e 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/formlayout/FormLayoutInVerticalLayout.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/formlayout/FormLayoutInVerticalLayout.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ import com.vaadin.ui.themes.ValoTheme;
/**
* Test UI for H2 label inside FormLayout.
- *
+ *
* @author Vaadin Ltd
*/
@Theme("valo")
diff --git a/uitest/src/main/java/com/vaadin/tests/components/formlayout/FormLayoutResizing.java b/uitest/src/main/java/com/vaadin/tests/components/formlayout/FormLayoutResizing.java
index 7ed91979e2..6c600dddfc 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/formlayout/FormLayoutResizing.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/formlayout/FormLayoutResizing.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/formlayout/FormLayouts.java b/uitest/src/main/java/com/vaadin/tests/components/formlayout/FormLayouts.java
index 6b17c557da..c4c7d3fd3f 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/formlayout/FormLayouts.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/formlayout/FormLayouts.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/formlayout/HtmlCaptionInFormLayout.java b/uitest/src/main/java/com/vaadin/tests/components/formlayout/HtmlCaptionInFormLayout.java
index fc90427c79..cb35e778cc 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/formlayout/HtmlCaptionInFormLayout.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/formlayout/HtmlCaptionInFormLayout.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/formlayout/StylePrefix.java b/uitest/src/main/java/com/vaadin/tests/components/formlayout/StylePrefix.java
index 8ca88fbcd3..f40722afa2 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/formlayout/StylePrefix.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/formlayout/StylePrefix.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ import com.vaadin.ui.FormLayout;
/**
* Test UI for FormLayout: custom additional styles should be prefixed with
* "v-formlayout-", not "v-layout-".
- *
+ *
* @author Vaadin Ltd
*/
public class StylePrefix extends AbstractTestUI {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/BeanRenderer.java b/uitest/src/main/java/com/vaadin/tests/components/grid/BeanRenderer.java
index 3e25f45283..65b8af12f4 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/BeanRenderer.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/BeanRenderer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/CustomRenderer.java b/uitest/src/main/java/com/vaadin/tests/components/grid/CustomRenderer.java
index 171d3f2a5e..e35448ad0e 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/CustomRenderer.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/CustomRenderer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -67,8 +67,8 @@ public class CustomRenderer extends AbstractTestUI {
Grid grid = new Grid(container);
grid.getColumn(INT_ARRAY_PROPERTY).setRenderer(new IntArrayRenderer());
- grid.getColumn(VOID_PROPERTY).setRenderer(
- new RowAwareRenderer(debugLabel));
+ grid.getColumn(VOID_PROPERTY)
+ .setRenderer(new RowAwareRenderer(debugLabel));
grid.getColumn(BEAN_PROPERTY).setRenderer(new BeanRenderer());
grid.setSelectionMode(SelectionMode.NONE);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridAddAndRemoveDataOnInit.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridAddAndRemoveDataOnInit.java
index 36d92d79a0..ed801322fb 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridAddAndRemoveDataOnInit.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridAddAndRemoveDataOnInit.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridAddRow.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridAddRow.java
index fa2d7b5399..71c9f4ed2b 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridAddRow.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridAddRow.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridCellFocusOnResetSize.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridCellFocusOnResetSize.java
index c0e3c9d683..7803106f7c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridCellFocusOnResetSize.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridCellFocusOnResetSize.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,8 +27,8 @@ public class GridCellFocusOnResetSize extends AbstractTestUI {
@Override
protected void setup(VaadinRequest request) {
- addComponent(new TestWidgetComponent(
- GridCellFocusOnResetSizeWidget.class));
+ addComponent(
+ new TestWidgetComponent(GridCellFocusOnResetSizeWidget.class));
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridCheckBoxDisplay.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridCheckBoxDisplay.java
index e6aff73532..d97248eb2c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridCheckBoxDisplay.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridCheckBoxDisplay.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridClientDataChangeHandler.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridClientDataChangeHandler.java
index 7bd1c838d7..4db47d3823 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridClientDataChangeHandler.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridClientDataChangeHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,6 +27,7 @@ public class GridClientDataChangeHandler extends AbstractTestUI {
@Override
protected void setup(VaadinRequest request) {
- addComponent(new TestWidgetComponent(GridDataChangeHandlerWidget.class));
+ addComponent(
+ new TestWidgetComponent(GridDataChangeHandlerWidget.class));
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridColspans.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridColspans.java
index 23d3c3c394..5d59d8946c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridColspans.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridColspans.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -66,8 +66,8 @@ public class GridColspans extends AbstractTestUI {
.join(dataSource.getContainerPropertyIds().toArray())
.setText("All the stuff");
- addComponent(new Button("Show/Hide firstName",
- new Button.ClickListener() {
+ addComponent(
+ new Button("Show/Hide firstName", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
@@ -79,8 +79,8 @@ public class GridColspans extends AbstractTestUI {
}
}));
- addComponent(new Button("Change column order",
- new Button.ClickListener() {
+ addComponent(
+ new Button("Change column order", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridColumnAutoExpand.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridColumnAutoExpand.java
index 5333b3698e..b2a213b84d 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridColumnAutoExpand.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridColumnAutoExpand.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridColumnAutoWidth.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridColumnAutoWidth.java
index a5a8b62d87..568ed3e867 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridColumnAutoWidth.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridColumnAutoWidth.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridColumnAutoWidthClient.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridColumnAutoWidthClient.java
index 0829e09de9..418a740a76 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridColumnAutoWidthClient.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridColumnAutoWidthClient.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,7 +27,7 @@ public class GridColumnAutoWidthClient extends AbstractTestUI {
@Override
protected void setup(VaadinRequest request) {
- addComponent(new TestWidgetComponent(
- GridColumnAutoWidthClientWidget.class));
+ addComponent(
+ new TestWidgetComponent(GridColumnAutoWidthClientWidget.class));
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridColumnExpand.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridColumnExpand.java
index f8338f991a..f9009f5597 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridColumnExpand.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridColumnExpand.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -97,7 +97,8 @@ public class GridColumnExpand extends AbstractTestUI {
return layout;
}
- private Component createWidthButton(final Column column, final double width) {
+ private Component createWidthButton(final Column column,
+ final double width) {
return new Button("" + width, new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridColumnWidthRecalculation.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridColumnWidthRecalculation.java
index 43584eb5e1..a687f6258a 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridColumnWidthRecalculation.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridColumnWidthRecalculation.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridColumnWidthsWithoutData.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridColumnWidthsWithoutData.java
index b04745f17a..0be2ad8cf0 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridColumnWidthsWithoutData.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridColumnWidthsWithoutData.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -50,16 +50,16 @@ public class GridColumnWidthsWithoutData extends AbstractTestUI {
});
addComponent(selectionModeSelector);
- addComponent(new Button("Recreate without data",
- new Button.ClickListener() {
+ addComponent(
+ new Button("Recreate without data", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
replaceGrid(createGrid(false));
}
}));
- addComponent(new Button("Recreate with data",
- new Button.ClickListener() {
+ addComponent(
+ new Button("Recreate with data", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
replaceGrid(createGrid(true));
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridCustomSelectionModel.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridCustomSelectionModel.java
index 008c24cdd3..e14862f9b0 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridCustomSelectionModel.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridCustomSelectionModel.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridDataSourceReset.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridDataSourceReset.java
index b49cf32b62..62b2f46ece 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridDataSourceReset.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridDataSourceReset.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridDefaultSelectionMode.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridDefaultSelectionMode.java
index e2f2704a5d..65e4eba08a 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridDefaultSelectionMode.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridDefaultSelectionMode.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridDetailsDetach.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridDetailsDetach.java
index f18c0f9bdb..9034e48830 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridDetailsDetach.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridDetailsDetach.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -55,8 +55,8 @@ public class GridDetailsDetach extends AbstractTestUI {
}
});
- layout.addComponent(new Button("Reattach Grid",
- new Button.ClickListener() {
+ layout.addComponent(
+ new Button("Reattach Grid", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
gridContainer.removeAllComponents();
@@ -87,8 +87,8 @@ public class GridDetailsDetach extends AbstractTestUI {
public Component getDetails(RowReference rowReference) {
final GridExampleBean bean = (GridExampleBean) rowReference
.getItemId();
- VerticalLayout layout = new VerticalLayout(new Label(
- "Extra data for " + bean.getName()));
+ VerticalLayout layout = new VerticalLayout(
+ new Label("Extra data for " + bean.getName()));
layout.setMargin(true);
return layout;
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridDetailsLayoutExpand.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridDetailsLayoutExpand.java
index be82b49f0c..428c6e3569 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridDetailsLayoutExpand.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridDetailsLayoutExpand.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ import com.vaadin.ui.Label;
/**
* Tests the layouting of Grid's details row when it contains a HorizontalLayout
* with expand ratios.
- *
+ *
* @author Vaadin Ltd
*/
@SuppressWarnings("serial")
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridDetailsLocation.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridDetailsLocation.java
index 2880df44b0..fb50e77e37 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridDetailsLocation.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridDetailsLocation.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -43,8 +43,8 @@ public class GridDetailsLocation extends UI {
@Override
public Component getDetails(RowReference rowReference) {
Person person = (Person) rowReference.getItemId();
- Label label = new Label(person.getFirstName() + " "
- + person.getLastName());
+ Label label = new Label(
+ person.getFirstName() + " " + person.getLastName());
// currently the decorator row doesn't change its height when the
// content height is different.
label.setHeight("30px");
@@ -82,16 +82,16 @@ public class GridDetailsLocation extends UI {
numberTextField.setImmediate(true);
layout.addComponent(numberTextField);
- layout.addComponent(new Button("Toggle and scroll",
- new Button.ClickListener() {
+ layout.addComponent(
+ new Button("Toggle and scroll", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
toggle();
scrollTo();
}
}));
- layout.addComponent(new Button("Scroll and toggle",
- new Button.ClickListener() {
+ layout.addComponent(
+ new Button("Scroll and toggle", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
scrollTo();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridDetailsWidth.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridDetailsWidth.java
index 4955f499ba..31d287caf8 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridDetailsWidth.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridDetailsWidth.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridDragAndDrop.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridDragAndDrop.java
index d77a8ddedc..8a2aeb3d2b 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridDragAndDrop.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridDragAndDrop.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridDragSelectionWhileScrolled.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridDragSelectionWhileScrolled.java
index 1af1ad02d6..ce434115f6 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridDragSelectionWhileScrolled.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridDragSelectionWhileScrolled.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridEditingWithNoScrollBars.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridEditingWithNoScrollBars.java
index d3e0a2a7c7..61cb383b71 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridEditingWithNoScrollBars.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridEditingWithNoScrollBars.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridEditorConverterNotFound.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridEditorConverterNotFound.java
index e5532b10ad..d5cfca2091 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridEditorConverterNotFound.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridEditorConverterNotFound.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridEditorCustomField.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridEditorCustomField.java
index 4703c98994..b1c6ee57c1 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridEditorCustomField.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridEditorCustomField.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridEditorFrozenColumnsUI.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridEditorFrozenColumnsUI.java
index d2414a8c40..65bfdf0e68 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridEditorFrozenColumnsUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridEditorFrozenColumnsUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridEditorUI.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridEditorUI.java
index 0a302967e8..122d50399e 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridEditorUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridEditorUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridExtensionCommunication.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridExtensionCommunication.java
index 181c9cae8d..392b1e7c00 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridExtensionCommunication.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridExtensionCommunication.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridFastAsyncUpdate.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridFastAsyncUpdate.java
index 31fe0275a5..ef8b80c965 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridFastAsyncUpdate.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridFastAsyncUpdate.java
@@ -42,13 +42,14 @@ public class GridFastAsyncUpdate extends AbstractTestUI {
++counter;
Item item = container.addItem(counter);
- item.getItemProperty("sequenceNumber").setValue(
- String.valueOf(counter));
- item.getItemProperty("millis").setValue(
- String.valueOf(Calendar.getInstance()
- .getTimeInMillis() - loggingStart));
- item.getItemProperty("level").setValue(
- Level.INFO.toString());
+ item.getItemProperty("sequenceNumber")
+ .setValue(String.valueOf(counter));
+ item.getItemProperty("millis")
+ .setValue(String.valueOf(Calendar
+ .getInstance().getTimeInMillis()
+ - loggingStart));
+ item.getItemProperty("level")
+ .setValue(Level.INFO.toString());
item.getItemProperty("message").setValue("Message");
if (grid != null && !scrollLock) {
grid.scrollToEnd();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridGeneratedProperties.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridGeneratedProperties.java
index 2782a5fc6c..d11edd7f7b 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridGeneratedProperties.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridGeneratedProperties.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridHeaderFooterComponents.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridHeaderFooterComponents.java
index 6c2efc9a25..8290757949 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridHeaderFooterComponents.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridHeaderFooterComponents.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -89,8 +89,8 @@ public class GridHeaderFooterComponents extends AbstractTestUIWithLog {
}
private void addRemoveHeaderRow(final Grid grid, final HeaderRow row) {
- row.getCell("action").setComponent(
- new Button("Remove row", new ClickListener() {
+ row.getCell("action")
+ .setComponent(new Button("Remove row", new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
grid.removeHeaderRow(row);
@@ -100,8 +100,8 @@ public class GridHeaderFooterComponents extends AbstractTestUIWithLog {
}
private void addRemoveFooterRow(final Grid grid, final FooterRow row) {
- row.getCell("action").setComponent(
- new Button("Remove row", new ClickListener() {
+ row.getCell("action")
+ .setComponent(new Button("Remove row", new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
grid.removeFooterRow(row);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridHeaderFormatChange.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridHeaderFormatChange.java
index fbd6a42a38..be4e7f5403 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridHeaderFormatChange.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridHeaderFormatChange.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -107,8 +107,8 @@ public class GridHeaderFormatChange extends AbstractTestUI {
grid = new Grid(datasource);
grid.setWidth("600px");
grid.getColumn("zipCode").setRenderer(new NumberRenderer());
- grid.setColumnOrder("firstName", "lastName", "streetAddress",
- "zipCode", "city");
+ grid.setColumnOrder("firstName", "lastName", "streetAddress", "zipCode",
+ "city");
grid.setSelectionMode(SelectionMode.SINGLE);
addComponent(grid);
@@ -156,8 +156,8 @@ public class GridHeaderFormatChange extends AbstractTestUI {
if (row == null) {
row = grid.prependHeaderRow();
if (grid.getColumn("firstName") != null) {
- row.join("firstName", "lastName").setText(
- "Full Name");
+ row.join("firstName", "lastName")
+ .setText("Full Name");
}
row.join("streetAddress", "zipCode", "city")
.setText("Address");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridHeaderStyleNames.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridHeaderStyleNames.java
index 019850dabb..78f2cdccfe 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridHeaderStyleNames.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridHeaderStyleNames.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -42,8 +42,8 @@ public class GridHeaderStyleNames extends AbstractTestUIWithLog {
protected void setup(VaadinRequest request) {
Grid grid = new Grid();
grid.setSelectionMode(SelectionMode.MULTI);
- grid.setContainerDataSource(BeanItemContainerGenerator
- .createContainer(100));
+ grid.setContainerDataSource(
+ BeanItemContainerGenerator.createContainer(100));
ageHeaderCell = grid.getDefaultHeaderRow().getCell("age");
grid.getDefaultHeaderRow().setStyleName("foo");
@@ -55,18 +55,14 @@ public class GridHeaderStyleNames extends AbstractTestUIWithLog {
footerRow = grid.appendFooterRow();
ageFooterCell = footerRow.getCell("age");
- getPage()
- .getStyles()
- .add(".age {background-image: linear-gradient(to bottom,green 2%, #efefef 98%) !important;}");
- getPage()
- .getStyles()
- .add(".valo .v-grid-header .v-grid-cell.city-country {background-image: linear-gradient(to bottom,yellow 2%, #efefef 98%) !important;}");
- getPage()
- .getStyles()
- .add(".valo .v-grid-footer .v-grid-cell.age-footer {background-image: linear-gradient(to bottom,blue 2%, #efefef 98%) !important;}");
- getPage()
- .getStyles()
- .add(".valo .v-grid .v-grid-row.custom-row > * {background-image: linear-gradient(to bottom,purple 2%, #efefef 98%);}");
+ getPage().getStyles().add(
+ ".age {background-image: linear-gradient(to bottom,green 2%, #efefef 98%) !important;}");
+ getPage().getStyles().add(
+ ".valo .v-grid-header .v-grid-cell.city-country {background-image: linear-gradient(to bottom,yellow 2%, #efefef 98%) !important;}");
+ getPage().getStyles().add(
+ ".valo .v-grid-footer .v-grid-cell.age-footer {background-image: linear-gradient(to bottom,blue 2%, #efefef 98%) !important;}");
+ getPage().getStyles().add(
+ ".valo .v-grid .v-grid-row.custom-row > * {background-image: linear-gradient(to bottom,purple 2%, #efefef 98%);}");
setCellStyles(true);
setRowStyles(true);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridInGridLayout.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridInGridLayout.java
index 629eba9045..250f337bea 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridInGridLayout.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridInGridLayout.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridInTabSheet.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridInTabSheet.java
index cddbd390f2..d02a08266c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridInTabSheet.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridInTabSheet.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -51,8 +51,8 @@ public class GridInTabSheet extends AbstractTestUI {
grid.addRow(100 + (k++));
}
}));
- addComponent(new Button("Remove row from Grid",
- new Button.ClickListener() {
+ addComponent(
+ new Button("Remove row from Grid", new Button.ClickListener() {
private Integer k = 0;
@@ -61,8 +61,8 @@ public class GridInTabSheet extends AbstractTestUI {
Object firstItemId = grid.getContainerDataSource()
.firstItemId();
if (firstItemId != null) {
- grid.getContainerDataSource().removeItem(
- firstItemId);
+ grid.getContainerDataSource()
+ .removeItem(firstItemId);
}
}
}));
@@ -73,7 +73,8 @@ public class GridInTabSheet extends AbstractTestUI {
public void buttonClick(ClickEvent event) {
grid.setCellStyleGenerator(new CellStyleGenerator() {
@Override
- public String getStyle(CellReference cellReference) {
+ public String getStyle(
+ CellReference cellReference) {
int rowIndex = ((Integer) cellReference
.getItemId()).intValue();
Object propertyId = cellReference
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridInWindowResize.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridInWindowResize.java
index 967e29e134..3f83882a10 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridInWindowResize.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridInWindowResize.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridInitiallyHiddenColumns.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridInitiallyHiddenColumns.java
index 49b344bb85..3df985142b 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridInitiallyHiddenColumns.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridInitiallyHiddenColumns.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridItemSetChange.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridItemSetChange.java
index 4632810561..acc7811cd4 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridItemSetChange.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridItemSetChange.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridLayoutDetailsRow.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridLayoutDetailsRow.java
index 51c2598cc0..9662a63852 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridLayoutDetailsRow.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridLayoutDetailsRow.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import com.vaadin.ui.Label;
/**
* Tests that details row displays GridLayout contents properly.
- *
+ *
* @author Vaadin Ltd
*/
public class GridLayoutDetailsRow extends AbstractTestUI {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridMultiSelectionOnInit.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridMultiSelectionOnInit.java
index 4a11c19242..6317cbae9d 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridMultiSelectionOnInit.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridMultiSelectionOnInit.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -38,8 +38,8 @@ public class GridMultiSelectionOnInit extends AbstractTestUI {
@Override
public void buttonClick(ClickEvent event) {
- ((MultiSelectionModel) grid.getSelectionModel())
- .setSelected(grid.getContainerDataSource().getItemIds());
+ ((MultiSelectionModel) grid.getSelectionModel()).setSelected(
+ grid.getContainerDataSource().getItemIds());
}
}));
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridMultiSelectionScrollBar.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridMultiSelectionScrollBar.java
index be1f32164c..b641f6e214 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridMultiSelectionScrollBar.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridMultiSelectionScrollBar.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridRendererChange.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridRendererChange.java
index 180ed0ded9..576f80b8aa 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridRendererChange.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridRendererChange.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridReplaceContainer.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridReplaceContainer.java
index e81733cb86..998300246f 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridReplaceContainer.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridReplaceContainer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridResizeAndScroll.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridResizeAndScroll.java
index fe4a9884f5..cedf67f734 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridResizeAndScroll.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridResizeAndScroll.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridResizeHiddenColumn.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridResizeHiddenColumn.java
index c970f97500..958749e545 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridResizeHiddenColumn.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridResizeHiddenColumn.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridResizeTerror.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridResizeTerror.java
index 3fa861b32e..89dc661bb1 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridResizeTerror.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridResizeTerror.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridRowHeightChange.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridRowHeightChange.java
index 3cb735d92b..377d0e74e2 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridRowHeightChange.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridRowHeightChange.java
@@ -14,8 +14,8 @@ import java.util.List;
public class GridRowHeightChange extends AbstractTestUI {
- private final List<String> themes = Arrays
- .asList("valo", "reindeer", "runo", "chameleon", "base");
+ private final List<String> themes = Arrays.asList("valo", "reindeer",
+ "runo", "chameleon", "base");
@Override
protected void setup(VaadinRequest request) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridScrollToLineWhileResizing.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridScrollToLineWhileResizing.java
index 194a9a3acc..62dcf5271c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridScrollToLineWhileResizing.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridScrollToLineWhileResizing.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridScrolling.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridScrolling.java
index ce64b3e9f3..3861aee70e 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridScrolling.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridScrolling.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -47,8 +47,8 @@ public class GridScrolling extends AbstractTestUI {
for (int row = 0; row < 65536; row++) {
Item item = ds.addItem(Integer.valueOf(row));
for (int col = 0; col < 5; col++) {
- item.getItemProperty("col" + col).setValue(
- "(" + row + ", " + col + ")");
+ item.getItemProperty("col" + col)
+ .setValue("(" + row + ", " + col + ")");
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridSidebarPosition.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridSidebarPosition.java
index 852ec7cea6..bd4f200f4d 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridSidebarPosition.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridSidebarPosition.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -41,7 +41,8 @@ public class GridSidebarPosition extends AbstractTestUI {
for (int i = 0; i < 30; i++) {
grid.addColumn(
"This is a really really really really long column name "
- + i).setHidable(true);
+ + i)
+ .setHidable(true);
}
hl.addComponent(grid);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridSingleColumn.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridSingleColumn.java
index 2ab0282102..b97036ab74 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridSingleColumn.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridSingleColumn.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridSortIndicator.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridSortIndicator.java
index a05365d575..44c9b1bb0d 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridSortIndicator.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridSortIndicator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -49,16 +49,17 @@ public class GridSortIndicator extends AbstractTestUI {
// is not null.
List<SortOrder> newSortOrder = new ArrayList<SortOrder>();
SortDirection newSortDirection = oldSortDirection;
- if (currentSortOrder.get(0).getPropertyId().equals("Name")) {
- newSortDirection = SortDirection.ASCENDING
- .equals(oldSortDirection) ? SortDirection.DESCENDING
- : SortDirection.ASCENDING;
+ if (currentSortOrder.get(0).getPropertyId()
+ .equals("Name")) {
+ newSortDirection = SortDirection.ASCENDING.equals(
+ oldSortDirection) ? SortDirection.DESCENDING
+ : SortDirection.ASCENDING;
}
if (newSortDirection != null) {
newSortOrder
.add(new SortOrder("Name", newSortDirection));
- newSortOrder.add(new SortOrder("Value",
- newSortDirection));
+ newSortOrder
+ .add(new SortOrder("Value", newSortDirection));
g.setSortOrder(newSortOrder);
}
oldSortDirection = newSortDirection;
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridSubPixelProblemWrapping.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridSubPixelProblemWrapping.java
index 1e921bb18c..d68888e55e 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridSubPixelProblemWrapping.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridSubPixelProblemWrapping.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridSwitchRenderers.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridSwitchRenderers.java
index e233edc5d0..56c6a157a9 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridSwitchRenderers.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridSwitchRenderers.java
@@ -62,8 +62,8 @@ public class GridSwitchRenderers extends AbstractTestUIWithLog {
grid.getColumn(EXPANSION_COLUMN_ID).setWidth(50);
for (int col = MANUALLY_FORMATTED_COLUMNS; col < COLUMNS; col++) {
grid.getColumn(getColumnProperty(col)).setWidth(300);
- grid.getColumn(getColumnProperty(col)).setRenderer(
- new TextRenderer());
+ grid.getColumn(getColumnProperty(col))
+ .setRenderer(new TextRenderer());
}
grid.setSelectionMode(SelectionMode.NONE);
@@ -91,8 +91,8 @@ public class GridSwitchRenderers extends AbstractTestUIWithLog {
int col = MANUALLY_FORMATTED_COLUMNS;
for (; col < COLUMNS; col++) {
- item.getItemProperty(getColumnProperty(col)).setValue(
- "<b>(" + content + ", " + col + ")</b>");
+ item.getItemProperty(getColumnProperty(col))
+ .setValue("<b>(" + content + ", " + col + ")</b>");
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridThemeChange.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridThemeChange.java
index 76f7e22ee0..1f3e8ab0e4 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridThemeChange.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridThemeChange.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridThemeUI.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridThemeUI.java
index b0128e936a..1f70588c13 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridThemeUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridThemeUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -98,9 +98,8 @@ public class GridThemeUI extends AbstractTestUIWithLog {
getColumn("age").getEditorField().addValidator(
new IntegerRangeValidator("Must be between 0 and 100", 0,
100));
- getColumn("birthDate").setRenderer(
- new DateRenderer(DateFormat.getDateInstance(
- DateFormat.MEDIUM, Locale.US)));
+ getColumn("birthDate").setRenderer(new DateRenderer(
+ DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.US)));
}
}
@@ -139,9 +138,8 @@ public class GridThemeUI extends AbstractTestUIWithLog {
getColumn("age").getEditorField().addValidator(
new IntegerRangeValidator("Must be between 0 and 100", 0,
100));
- getColumn("birthDate").setRenderer(
- new DateRenderer(DateFormat.getDateInstance(
- DateFormat.MEDIUM, Locale.US)));
+ getColumn("birthDate").setRenderer(new DateRenderer(
+ DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.US)));
addFooterRowAt(0);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridWidgetRendererChange.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridWidgetRendererChange.java
index 8d9847b428..1aa1fd15f6 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridWidgetRendererChange.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridWidgetRendererChange.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridWidthIncrease.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridWidthIncrease.java
index 6726400327..3c4933c24d 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridWidthIncrease.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridWidthIncrease.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -36,8 +36,8 @@ public class GridWidthIncrease extends AbstractTestUI {
grid.addRow(rowData);
grid.setWidth(400 + "px");
addComponent(grid);
- addComponent(new Button("Increase Grid Width",
- new Button.ClickListener() {
+ addComponent(
+ new Button("Increase Grid Width", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridWithBrokenRenderer.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridWithBrokenRenderer.java
index 4d44eeb248..3315bd3b3f 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridWithBrokenRenderer.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridWithBrokenRenderer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridWithLabelEditor.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridWithLabelEditor.java
index 91c5a06c66..789d9cf2b8 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridWithLabelEditor.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridWithLabelEditor.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridWithoutRenderer.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridWithoutRenderer.java
index fd5e6fdc01..0a418006f5 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridWithoutRenderer.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridWithoutRenderer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/InitialFrozenColumns.java b/uitest/src/main/java/com/vaadin/tests/components/grid/InitialFrozenColumns.java
index b6da30d314..4177c5ce00 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/InitialFrozenColumns.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/InitialFrozenColumns.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/IntArrayRenderer.java b/uitest/src/main/java/com/vaadin/tests/components/grid/IntArrayRenderer.java
index ba3fc9cd0b..582362f0fc 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/IntArrayRenderer.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/IntArrayRenderer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/JavaScriptRenderers.java b/uitest/src/main/java/com/vaadin/tests/components/grid/JavaScriptRenderers.java
index 8f88883161..bb7a93d378 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/JavaScriptRenderers.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/JavaScriptRenderers.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -61,8 +61,8 @@ public class JavaScriptRenderers extends AbstractTestUI {
Integer itemId = Integer.valueOf(i);
Item item = container.addItem(itemId);
item.getItemProperty("id").setValue(itemId);
- item.getItemProperty("bean").setValue(
- new MyBean(i + 1, Integer.toString(i - 1)));
+ item.getItemProperty("bean")
+ .setValue(new MyBean(i + 1, Integer.toString(i - 1)));
item.getItemProperty("string").setValue("string" + i);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/JavaScriptStringRenderer.java b/uitest/src/main/java/com/vaadin/tests/components/grid/JavaScriptStringRenderer.java
index ab3be6f4f1..7b1a281cd9 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/JavaScriptStringRenderer.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/JavaScriptStringRenderer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,8 +19,8 @@ import com.vaadin.annotations.JavaScript;
import com.vaadin.ui.renderers.AbstractJavaScriptRenderer;
@JavaScript("JavaScriptStringRenderer.js")
-public class JavaScriptStringRenderer extends
- AbstractJavaScriptRenderer<String> {
+public class JavaScriptStringRenderer
+ extends AbstractJavaScriptRenderer<String> {
protected JavaScriptStringRenderer() {
super(String.class);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/MyBeanJSRenderer.java b/uitest/src/main/java/com/vaadin/tests/components/grid/MyBeanJSRenderer.java
index a2d1c08ea0..f615e009df 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/MyBeanJSRenderer.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/MyBeanJSRenderer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import com.vaadin.tests.components.grid.JavaScriptRenderers.MyBean;
import com.vaadin.ui.renderers.AbstractJavaScriptRenderer;
/**
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/NullHeaders.java b/uitest/src/main/java/com/vaadin/tests/components/grid/NullHeaders.java
index 10fe20c478..93a091eae7 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/NullHeaders.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/NullHeaders.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/NullRenderers.java b/uitest/src/main/java/com/vaadin/tests/components/grid/NullRenderers.java
index db86847690..4cc3e35a5d 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/NullRenderers.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/NullRenderers.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -44,13 +44,13 @@ public class NullRenderers extends AbstractTestUI {
container.addContainerProperty(TextRenderer.class, String.class, null);
container.addContainerProperty(HtmlRenderer.class, String.class, null);
container.addContainerProperty(DateRenderer.class, Date.class, null);
- container
- .addContainerProperty(NumberRenderer.class, Number.class, null);
+ container.addContainerProperty(NumberRenderer.class, Number.class,
+ null);
container.addContainerProperty(ProgressBarRenderer.class, Double.class,
null);
- container
- .addContainerProperty(ButtonRenderer.class, String.class, null);
+ container.addContainerProperty(ButtonRenderer.class, String.class,
+ null);
container.addContainerProperty(ImageRenderer.class, Resource.class,
null);
@@ -62,27 +62,27 @@ public class NullRenderers extends AbstractTestUI {
gridDefaults.setSelectionMode(SelectionMode.NONE);
gridDefaults.setWidth("100%");
- gridDefaults.getColumn(TextRenderer.class).setRenderer(
- new TextRenderer("-- No Text --"));
- gridDefaults.getColumn(HtmlRenderer.class).setRenderer(
- new HtmlRenderer("-- No Jokes --"));
+ gridDefaults.getColumn(TextRenderer.class)
+ .setRenderer(new TextRenderer("-- No Text --"));
+ gridDefaults.getColumn(HtmlRenderer.class)
+ .setRenderer(new HtmlRenderer("-- No Jokes --"));
gridDefaults.getColumn(DateRenderer.class).setRenderer(
new DateRenderer("%s", Locale.getDefault(), "-- Never --"));
gridDefaults.getColumn(NumberRenderer.class).setRenderer(
new NumberRenderer("%s", Locale.getDefault(), "-- Nothing --"));
- gridDefaults.getColumn(ProgressBarRenderer.class).setRenderer(
- new ProgressBarRenderer());
+ gridDefaults.getColumn(ProgressBarRenderer.class)
+ .setRenderer(new ProgressBarRenderer());
- gridDefaults.getColumn(ButtonRenderer.class).setRenderer(
- new ButtonRenderer(new RendererClickListener() {
+ gridDefaults.getColumn(ButtonRenderer.class)
+ .setRenderer(new ButtonRenderer(new RendererClickListener() {
@Override
public void click(RendererClickEvent event) {
}
}, "-- No Control --"));
- gridDefaults.getColumn(ImageRenderer.class).setRenderer(
- new ImageRenderer(new RendererClickListener() {
+ gridDefaults.getColumn(ImageRenderer.class)
+ .setRenderer(new ImageRenderer(new RendererClickListener() {
@Override
public void click(RendererClickEvent event) {
@@ -97,27 +97,27 @@ public class NullRenderers extends AbstractTestUI {
gridNoDefaults.setSelectionMode(SelectionMode.NONE);
gridNoDefaults.setWidth("100%");
- gridNoDefaults.getColumn(TextRenderer.class).setRenderer(
- new TextRenderer());
- gridNoDefaults.getColumn(HtmlRenderer.class).setRenderer(
- new HtmlRenderer());
- gridNoDefaults.getColumn(DateRenderer.class).setRenderer(
- new DateRenderer());
- gridNoDefaults.getColumn(NumberRenderer.class).setRenderer(
- new NumberRenderer());
+ gridNoDefaults.getColumn(TextRenderer.class)
+ .setRenderer(new TextRenderer());
+ gridNoDefaults.getColumn(HtmlRenderer.class)
+ .setRenderer(new HtmlRenderer());
+ gridNoDefaults.getColumn(DateRenderer.class)
+ .setRenderer(new DateRenderer());
+ gridNoDefaults.getColumn(NumberRenderer.class)
+ .setRenderer(new NumberRenderer());
- gridNoDefaults.getColumn(ProgressBarRenderer.class).setRenderer(
- new ProgressBarRenderer());
+ gridNoDefaults.getColumn(ProgressBarRenderer.class)
+ .setRenderer(new ProgressBarRenderer());
- gridNoDefaults.getColumn(ButtonRenderer.class).setRenderer(
- new ButtonRenderer(new RendererClickListener() {
+ gridNoDefaults.getColumn(ButtonRenderer.class)
+ .setRenderer(new ButtonRenderer(new RendererClickListener() {
@Override
public void click(RendererClickEvent event) {
}
}));
- gridNoDefaults.getColumn(ImageRenderer.class).setRenderer(
- new ImageRenderer(new RendererClickListener() {
+ gridNoDefaults.getColumn(ImageRenderer.class)
+ .setRenderer(new ImageRenderer(new RendererClickListener() {
@Override
public void click(RendererClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/PersonTestGrid.java b/uitest/src/main/java/com/vaadin/tests/components/grid/PersonTestGrid.java
index f654cd153d..f15d100874 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/PersonTestGrid.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/PersonTestGrid.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/RowAwareRenderer.java b/uitest/src/main/java/com/vaadin/tests/components/grid/RowAwareRenderer.java
index 02919f5c1b..3341648482 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/RowAwareRenderer.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/RowAwareRenderer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/SelectDuringInit.java b/uitest/src/main/java/com/vaadin/tests/components/grid/SelectDuringInit.java
index d8394acd19..f999d1e8e9 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/SelectDuringInit.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/SelectDuringInit.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/SortableHeaderStyles.java b/uitest/src/main/java/com/vaadin/tests/components/grid/SortableHeaderStyles.java
index 56e6c608b3..f9605d625d 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/SortableHeaderStyles.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/SortableHeaderStyles.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,17 +32,16 @@ public class SortableHeaderStyles extends AbstractTestUI {
@Override
protected void setup(VaadinRequest request) {
- getPage()
- .getStyles()
- .add(".valo .v-grid-header th.v-grid-cell.sortable { font-weight: bold;}");
+ getPage().getStyles().add(
+ ".valo .v-grid-header th.v-grid-cell.sortable { font-weight: bold;}");
PersonContainer container = PersonContainer.createWithTestData();
Collection<?> sortableContainerPropertyIds = container
.getSortableContainerPropertyIds();
- final OptionGroup sortableSelector = new OptionGroup(
- "Sortable columns", sortableContainerPropertyIds);
+ final OptionGroup sortableSelector = new OptionGroup("Sortable columns",
+ sortableContainerPropertyIds);
sortableSelector.setMultiSelect(true);
sortableSelector.setValue(sortableContainerPropertyIds);
@@ -54,8 +53,8 @@ public class SortableHeaderStyles extends AbstractTestUI {
Collection<?> sortableCols = (Collection<?>) sortableSelector
.getValue();
for (Column column : grid.getColumns()) {
- column.setSortable(sortableCols.contains(column
- .getPropertyId()));
+ column.setSortable(
+ sortableCols.contains(column.getPropertyId()));
}
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/WidgetRenderers.java b/uitest/src/main/java/com/vaadin/tests/components/grid/WidgetRenderers.java
index d1110d4caa..82c699479f 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/WidgetRenderers.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/WidgetRenderers.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -43,8 +43,8 @@ public class WidgetRenderers extends AbstractTestUI {
container.addContainerProperty(ProgressBarRenderer.class, Double.class,
null);
- container
- .addContainerProperty(ButtonRenderer.class, String.class, null);
+ container.addContainerProperty(ButtonRenderer.class, String.class,
+ null);
container.addContainerProperty(ImageRenderer.class, Resource.class,
null);
container.addContainerProperty(PROPERTY_ID, String.class, null);
@@ -53,8 +53,8 @@ public class WidgetRenderers extends AbstractTestUI {
item.getItemProperty(ProgressBarRenderer.class).setValue(0.3);
item.getItemProperty(ButtonRenderer.class).setValue("Click");
- item.getItemProperty(ImageRenderer.class).setValue(
- new ThemeResource("window/img/close.png"));
+ item.getItemProperty(ImageRenderer.class)
+ .setValue(new ThemeResource("window/img/close.png"));
item.getItemProperty(PROPERTY_ID).setValue("Click");
final Grid grid = new Grid(container);
@@ -62,20 +62,20 @@ public class WidgetRenderers extends AbstractTestUI {
grid.setId("test-grid");
grid.setSelectionMode(SelectionMode.NONE);
- grid.getColumn(ProgressBarRenderer.class).setRenderer(
- new ProgressBarRenderer());
+ grid.getColumn(ProgressBarRenderer.class)
+ .setRenderer(new ProgressBarRenderer());
- grid.getColumn(ButtonRenderer.class).setRenderer(
- new ButtonRenderer(new RendererClickListener() {
+ grid.getColumn(ButtonRenderer.class)
+ .setRenderer(new ButtonRenderer(new RendererClickListener() {
@Override
public void click(RendererClickEvent event) {
- item.getItemProperty(ButtonRenderer.class).setValue(
- "Clicked!");
+ item.getItemProperty(ButtonRenderer.class)
+ .setValue("Clicked!");
}
}));
- grid.getColumn(ImageRenderer.class).setRenderer(
- new ImageRenderer(new RendererClickListener() {
+ grid.getColumn(ImageRenderer.class)
+ .setRenderer(new ImageRenderer(new RendererClickListener() {
@Override
public void click(RendererClickEvent event) {
@@ -84,12 +84,12 @@ public class WidgetRenderers extends AbstractTestUI {
}
}));
- grid.getColumn(PROPERTY_ID).setRenderer(
- new ButtonRenderer(new RendererClickListener() {
+ grid.getColumn(PROPERTY_ID)
+ .setRenderer(new ButtonRenderer(new RendererClickListener() {
@Override
public void click(RendererClickEvent event) {
- item.getItemProperty(PROPERTY_ID).setValue(
- event.getPropertyId());
+ item.getItemProperty(PROPERTY_ID)
+ .setValue(event.getPropertyId());
}
}));
@@ -100,7 +100,8 @@ public class WidgetRenderers extends AbstractTestUI {
@Override
public void buttonClick(ClickEvent event) {
grid.setColumnOrder(ImageRenderer.class,
- ProgressBarRenderer.class, ButtonRenderer.class);
+ ProgressBarRenderer.class,
+ ButtonRenderer.class);
}
}));
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/EscalatorBasicClientFeatures.java b/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/EscalatorBasicClientFeatures.java
index 8e1a80a830..92b45f6fb1 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/EscalatorBasicClientFeatures.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/EscalatorBasicClientFeatures.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/EscalatorUpdaterUi.java b/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/EscalatorUpdaterUi.java
index ef997b3cae..9d207ac690 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/EscalatorUpdaterUi.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/EscalatorUpdaterUi.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/GridBasicClientFeatures.java b/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/GridBasicClientFeatures.java
index 429f15bb47..5bf23686c9 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/GridBasicClientFeatures.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/GridBasicClientFeatures.java
@@ -24,7 +24,7 @@ import com.vaadin.ui.UI;
/**
* Initializer shell for GridClientBasicFeatures test application
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -33,7 +33,8 @@ public class GridBasicClientFeatures extends UI {
@Override
protected void init(VaadinRequest request) {
- setContent(new TestWidgetComponent(GridBasicClientFeaturesWidget.class));
+ setContent(
+ new TestWidgetComponent(GridBasicClientFeaturesWidget.class));
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/GridBasicFeatures.java b/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/GridBasicFeatures.java
index c39feeb4da..18cfb56660 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/GridBasicFeatures.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/GridBasicFeatures.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -83,7 +83,7 @@ import com.vaadin.ui.renderers.NumberRenderer;
/**
* Tests the basic features like columns, footers and headers
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -118,7 +118,8 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
Object addedRow = (iter.hasNext() ? iter.next() : "none");
iter = event.getRemoved().iterator();
Object removedRow = (iter.hasNext() ? iter.next() : "none");
- log("SelectionEvent: Added " + addedRow + ", Removed " + removedRow);
+ log("SelectionEvent: Added " + addedRow + ", Removed "
+ + removedRow);
}
};
@@ -126,9 +127,8 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
@Override
public void itemClick(ItemClickEvent event) {
- log("Item " + (event.isDoubleClick() ? "double " : "")
- + "click on " + event.getPropertyId() + ", item "
- + event.getItemId());
+ log("Item " + (event.isDoubleClick() ? "double " : "") + "click on "
+ + event.getPropertyId() + ", item " + event.getItemId());
}
};
@@ -204,8 +204,8 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
cssLayout.addComponent(new Label(string));
}
- final int rowIndex = grid.getContainerDataSource().indexOfId(
- rowReference.getItemId());
+ final int rowIndex = grid.getContainerDataSource()
+ .indexOfId(rowReference.getItemId());
ClickListener clickListener = new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
@@ -293,26 +293,26 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
Item item = ds.addItem(Integer.valueOf(row));
int col = 0;
for (; col < COLUMNS - MANUALLY_FORMATTED_COLUMNS; col++) {
- item.getItemProperty(getColumnProperty(col)).setValue(
- "(" + row + ", " + col + ")");
+ item.getItemProperty(getColumnProperty(col))
+ .setValue("(" + row + ", " + col + ")");
}
item.getItemProperty(getColumnProperty(1)).setReadOnly(true);
- item.getItemProperty(getColumnProperty(col++)).setValue(
- Integer.valueOf(row));
- item.getItemProperty(getColumnProperty(col++)).setValue(
- new Date(timestamp));
+ item.getItemProperty(getColumnProperty(col++))
+ .setValue(Integer.valueOf(row));
+ item.getItemProperty(getColumnProperty(col++))
+ .setValue(new Date(timestamp));
timestamp += 91250000; // a bit over a day, just to get
// variation
- item.getItemProperty(getColumnProperty(col++)).setValue(
- "<b>" + row + "</b>");
+ item.getItemProperty(getColumnProperty(col++))
+ .setValue("<b>" + row + "</b>");
// Random numbers
- item.getItemProperty(getColumnProperty(col++)).setValue(
- rand.nextInt());
+ item.getItemProperty(getColumnProperty(col++))
+ .setValue(rand.nextInt());
// Random between 0 - 5 to test multisorting
- item.getItemProperty(getColumnProperty(col++)).setValue(
- rand.nextInt(5));
+ item.getItemProperty(getColumnProperty(col++))
+ .setValue(rand.nextInt(5));
}
}
@@ -321,21 +321,20 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
{
int col = grid.getContainerDataSource().getContainerPropertyIds()
- .size()
- - MANUALLY_FORMATTED_COLUMNS;
- grid.getColumn(getColumnProperty(col++)).setRenderer(
- new NumberRenderer(new DecimalFormat("0,000.00",
- DecimalFormatSymbols.getInstance(new Locale("fi",
- "FI")))));
+ .size() - MANUALLY_FORMATTED_COLUMNS;
+ grid.getColumn(getColumnProperty(col++))
+ .setRenderer(new NumberRenderer(
+ new DecimalFormat("0,000.00", DecimalFormatSymbols
+ .getInstance(new Locale("fi", "FI")))));
grid.getColumn(getColumnProperty(col++)).setRenderer(
new DateRenderer(new SimpleDateFormat("dd.MM.yy HH:mm")));
- grid.getColumn(getColumnProperty(col++)).setRenderer(
- new HtmlRenderer());
- grid.getColumn(getColumnProperty(col++)).setRenderer(
- new NumberRenderer());
- grid.getColumn(getColumnProperty(col++)).setRenderer(
- new NumberRenderer());
+ grid.getColumn(getColumnProperty(col++))
+ .setRenderer(new HtmlRenderer());
+ grid.getColumn(getColumnProperty(col++))
+ .setRenderer(new NumberRenderer());
+ grid.getColumn(getColumnProperty(col++))
+ .setRenderer(new NumberRenderer());
}
// Create footer
@@ -480,8 +479,8 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
primaryStyleNames.put("v-escalator", "v-escalator");
primaryStyleNames.put("my-grid", "my-grid");
- createMultiClickAction("Primary style name", "State",
- primaryStyleNames, new Command<Grid, String>() {
+ createMultiClickAction("Primary style name", "State", primaryStyleNames,
+ new Command<Grid, String>() {
@Override
public void execute(Grid grid, String value, Object data) {
@@ -504,7 +503,8 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
grid.addSelectionListener(selectionListener);
((SelectionModel.Single) grid.getSelectionModel())
- .setDeselectAllowed(singleSelectAllowDeselect);
+ .setDeselectAllowed(
+ singleSelectAllowDeselect);
} else {
grid.removeSelectionListener(selectionListener);
}
@@ -520,7 +520,8 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
new Command<Grid, Integer>() {
@Override
public void execute(Grid grid, Integer limit, Object data) {
- if (!(grid.getSelectionModel() instanceof MultiSelectionModel)) {
+ if (!(grid
+ .getSelectionModel() instanceof MultiSelectionModel)) {
grid.setSelectionMode(SelectionMode.MULTI);
}
@@ -531,8 +532,8 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
LinkedHashMap<String, List<SortOrder>> sortableProperties = new LinkedHashMap<String, List<SortOrder>>();
for (Object propertyId : ds.getSortableContainerPropertyIds()) {
- sortableProperties.put(propertyId + ", ASC", Sort.by(propertyId)
- .build());
+ sortableProperties.put(propertyId + ", ASC",
+ Sort.by(propertyId).build());
sortableProperties.put(propertyId + ", DESC",
Sort.by(propertyId, SortDirection.DESCENDING).build());
}
@@ -654,12 +655,12 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
}
});
- createSelectAction("Cell style generator", "State",
- cellStyleGenerators, CELL_STYLE_GENERATOR_NONE,
+ createSelectAction("Cell style generator", "State", cellStyleGenerators,
+ CELL_STYLE_GENERATOR_NONE,
new Command<Grid, CellStyleGenerator>() {
@Override
- public void execute(Grid grid,
- CellStyleGenerator generator, Object data) {
+ public void execute(Grid grid, CellStyleGenerator generator,
+ Object data) {
grid.setCellStyleGenerator(generator);
}
});
@@ -669,8 +670,8 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
@Override
public void execute(Grid c, Boolean value, Object data) {
- c.setRowDescriptionGenerator(value ? rowDescriptionGenerator
- : null);
+ c.setRowDescriptionGenerator(
+ value ? rowDescriptionGenerator : null);
}
});
@@ -678,8 +679,8 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
new Command<Grid, Boolean>() {
@Override
public void execute(Grid c, Boolean value, Object data) {
- c.setCellDescriptionGenerator(value ? cellDescriptionGenerator
- : null);
+ c.setCellDescriptionGenerator(
+ value ? cellDescriptionGenerator : null);
}
});
@@ -734,9 +735,11 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
@Override
public void execute(Grid c, Boolean value, Object data) {
if (!value) {
- c.removeItemClickListener(editorOpeningItemClickListener);
+ c.removeItemClickListener(
+ editorOpeningItemClickListener);
} else {
- c.addItemClickListener(editorOpeningItemClickListener);
+ c.addItemClickListener(
+ editorOpeningItemClickListener);
}
}
@@ -750,11 +753,11 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
.getField("Column 0");
if (targetField != null) {
if (!value) {
- targetField
- .removeValueChangeListener(reactiveValueChanger);
+ targetField.removeValueChangeListener(
+ reactiveValueChanger);
} else {
- targetField
- .addValueChangeListener(reactiveValueChanger);
+ targetField.addValueChangeListener(
+ reactiveValueChanger);
}
}
}
@@ -766,9 +769,11 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
@Override
public void execute(Grid grid, Boolean value, Object data) {
if (value) {
- grid.addColumnReorderListener(columnReorderListener);
+ grid.addColumnReorderListener(
+ columnReorderListener);
} else {
- grid.removeColumnReorderListener(columnReorderListener);
+ grid.removeColumnReorderListener(
+ columnReorderListener);
}
}
});
@@ -777,9 +782,11 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
@Override
public void execute(Grid grid, Boolean value, Object data) {
if (value) {
- grid.addColumnVisibilityChangeListener(columnVisibilityListener);
+ grid.addColumnVisibilityChangeListener(
+ columnVisibilityListener);
} else {
- grid.removeColumnVisibilityChangeListener(columnVisibilityListener);
+ grid.removeColumnVisibilityChangeListener(
+ columnVisibilityListener);
}
}
});
@@ -791,8 +798,8 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
SelectionModel model = c.getSelectionModel();
if (model instanceof SelectionModel.Single) {
- ((SelectionModel.Single) model)
- .setDeselectAllowed(singleSelectAllowDeselect);
+ ((SelectionModel.Single) model).setDeselectAllowed(
+ singleSelectAllowDeselect);
}
}
});
@@ -852,8 +859,8 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
if (value.equals("Top")) {
defaultRow = grid.getHeaderRow(0);
} else if (value.equals("Bottom")) {
- defaultRow = grid.getHeaderRow(grid
- .getHeaderRowCount() - 1);
+ defaultRow = grid
+ .getHeaderRow(grid.getHeaderRowCount() - 1);
}
grid.setDefaultHeaderRow(defaultRow);
}
@@ -961,14 +968,17 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
String wasColumnHidingToggleCaption;
@Override
- public void execute(Grid grid, String value, Object data) {
- String columnProperty = getColumnProperty((Integer) data);
+ public void execute(Grid grid, String value,
+ Object data) {
+ String columnProperty = getColumnProperty(
+ (Integer) data);
Column column = grid.getColumn(columnProperty);
if (column == null) {
column = grid.addColumn(columnProperty);
column.setHidable(wasHidable);
column.setHidden(wasHidden);
- column.setHidingToggleCaption(wasColumnHidingToggleCaption);
+ column.setHidingToggleCaption(
+ wasColumnHidingToggleCaption);
} else {
wasHidable = column.isHidable();
wasHidden = column.isHidden();
@@ -982,14 +992,17 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
new Command<Grid, String>() {
@Override
- public void execute(Grid grid, String value, Object data) {
- final String columnProperty = getColumnProperty((Integer) data);
+ public void execute(Grid grid, String value,
+ Object data) {
+ final String columnProperty = getColumnProperty(
+ (Integer) data);
List<Column> cols = grid.getColumns();
List<Object> reordered = new ArrayList<Object>();
boolean addAsLast = false;
for (int i = 0; i < cols.size(); i++) {
Column col = cols.get(i);
- if (col.getPropertyId().equals(columnProperty)) {
+ if (col.getPropertyId()
+ .equals(columnProperty)) {
if (i == 0) {
addAsLast = true;
} else {
@@ -1012,7 +1025,8 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
@Override
public void execute(Grid grid, Boolean value,
Object columnIndex) {
- Object propertyId = getColumnProperty((Integer) columnIndex);
+ Object propertyId = getColumnProperty(
+ (Integer) columnIndex);
Column column = grid.getColumn(propertyId);
column.setSortable(value);
}
@@ -1024,7 +1038,8 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
@Override
public void execute(Grid grid, Boolean value,
Object columnIndex) {
- Object propertyId = getColumnProperty((Integer) columnIndex);
+ Object propertyId = getColumnProperty(
+ (Integer) columnIndex);
Column column = grid.getColumn(propertyId);
column.setResizable(value);
}
@@ -1052,12 +1067,13 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
int count = 0;
@Override
- public void execute(Grid grid, String value, Object data) {
- final String columnProperty = getColumnProperty((Integer) data);
+ public void execute(Grid grid, String value,
+ Object data) {
+ final String columnProperty = getColumnProperty(
+ (Integer) data);
grid.getColumn(columnProperty)
- .setHidingToggleCaption(
- columnProperty + " caption "
- + count++);
+ .setHidingToggleCaption(columnProperty
+ + " caption " + count++);
}
}, null, c);
@@ -1066,8 +1082,10 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
int count = 0;
@Override
- public void execute(Grid grid, String value, Object data) {
- final String columnProperty = getColumnProperty((Integer) data);
+ public void execute(Grid grid, String value,
+ Object data) {
+ final String columnProperty = getColumnProperty(
+ (Integer) data);
grid.getColumn(columnProperty).setHeaderCaption(
columnProperty + " header " + count++);
}
@@ -1081,7 +1099,8 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
@Override
public void execute(Grid grid, Integer value,
Object columnIndex) {
- Object propertyId = getColumnProperty((Integer) columnIndex);
+ Object propertyId = getColumnProperty(
+ (Integer) columnIndex);
Column column = grid.getColumn(propertyId);
column.setWidthUndefined();
}
@@ -1104,7 +1123,8 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
@Override
public void execute(Grid grid, Integer value,
Object columnIndex) {
- Object propertyId = getColumnProperty((Integer) columnIndex);
+ Object propertyId = getColumnProperty(
+ (Integer) columnIndex);
Column column = grid.getColumn(propertyId);
column.setWidth(value);
}
@@ -1120,9 +1140,10 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
defaultRows, new Command<Grid, GridStaticCellType>() {
@Override
- public void execute(Grid grid,
- GridStaticCellType value, Object columnIndex) {
- final Object propertyId = getColumnProperty((Integer) columnIndex);
+ public void execute(Grid grid, GridStaticCellType value,
+ Object columnIndex) {
+ final Object propertyId = getColumnProperty(
+ (Integer) columnIndex);
final HeaderCell cell = grid.getDefaultHeaderRow()
.getCell(propertyId);
switch (value) {
@@ -1158,9 +1179,10 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
defaultRows, new Command<Grid, GridStaticCellType>() {
@Override
- public void execute(Grid grid,
- GridStaticCellType value, Object columnIndex) {
- final Object propertyId = getColumnProperty((Integer) columnIndex);
+ public void execute(Grid grid, GridStaticCellType value,
+ Object columnIndex) {
+ final Object propertyId = getColumnProperty(
+ (Integer) columnIndex);
final FooterCell cell = grid.getFooterRow(0)
.getCell(propertyId);
switch (value) {
@@ -1262,8 +1284,8 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
if (enable.booleanValue()) {
ds.addContainerProperty(propertyId, String.class,
"property value");
- grid.getColumn(propertyId).setHeaderCaption(
- "new property");
+ grid.getColumn(propertyId)
+ .setHeaderCaption("new property");
grid.setColumnOrder(propertyId);
} else {
ds.removeContainerProperty(propertyId);
@@ -1303,7 +1325,8 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
}
}
- private <T extends Object> Property<T> getProperty(Item item, int i) {
+ private <T extends Object> Property<T> getProperty(Item item,
+ int i) {
@SuppressWarnings("unchecked")
Property<T> itemProperty = item
.getItemProperty(getColumnProperty(i));
@@ -1376,9 +1399,8 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
Property<?> property = ds.getContainerProperty(
firstItemId, containerPropertyId);
if (property.getType().equals(String.class)) {
- ((Property<String>) property)
- .setValue("modified: "
- + containerPropertyId);
+ ((Property<String>) property).setValue(
+ "modified: " + containerPropertyId);
}
}
}
@@ -1387,9 +1409,10 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
createBooleanAction("Select first row", "Body rows", false,
new Command<Grid, Boolean>() {
@Override
- public void execute(Grid grid, Boolean select, Object data) {
- final Object firstItemId = grid
- .getContainerDataSource().firstItemId();
+ public void execute(Grid grid, Boolean select,
+ Object data) {
+ final Object firstItemId = grid.getContainerDataSource()
+ .firstItemId();
if (select.booleanValue()) {
grid.select(firstItemId);
} else {
@@ -1520,8 +1543,8 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
createCategory("Height", "Size");
// header 20px + scrollbar 16px = 36px baseline
- createClickAction("86px (no drag scroll select)", "Height",
- sizeCommand, "86px");
+ createClickAction("86px (no drag scroll select)", "Height", sizeCommand,
+ "86px");
createClickAction("96px (drag scroll select limit)", "Height",
sizeCommand, "96px");
createClickAction("106px (drag scroll select enabled)", "Height",
@@ -1542,7 +1565,8 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> {
private void createDetailsActions() {
Command<Grid, DetailsGenerator> swapDetailsGenerator = new Command<Grid, DetailsGenerator>() {
@Override
- public void execute(Grid c, DetailsGenerator generator, Object data) {
+ public void execute(Grid c, DetailsGenerator generator,
+ Object data) {
grid.setDetailsGenerator(generator);
}
};
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/GridBasicFeaturesValo.java b/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/GridBasicFeaturesValo.java
index aef353fe93..91ceb2289e 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/GridBasicFeaturesValo.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/GridBasicFeaturesValo.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/GridClientDataSources.java b/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/GridClientDataSources.java
index 3f84d40b01..65aaf0323b 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/GridClientDataSources.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/GridClientDataSources.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/GridDefaultTextRenderer.java b/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/GridDefaultTextRenderer.java
index 5c4ccfae89..1e1921ce5c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/GridDefaultTextRenderer.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/GridDefaultTextRenderer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,6 +27,7 @@ public class GridDefaultTextRenderer extends UI {
@Override
protected void init(VaadinRequest request) {
- setContent(new TestWidgetComponent(GridDefaultTextRendererWidget.class));
+ setContent(
+ new TestWidgetComponent(GridDefaultTextRendererWidget.class));
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/GridHeightByRowOnInit.java b/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/GridHeightByRowOnInit.java
index 0b6e6c36dd..a57f83907e 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/GridHeightByRowOnInit.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/GridHeightByRowOnInit.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/GridSidebarFeatures.java b/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/GridSidebarFeatures.java
index 9494988cf4..ef0d8aaf36 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/GridSidebarFeatures.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/GridSidebarFeatures.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/GridSortingIndicators.java b/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/GridSortingIndicators.java
index 6d602baf06..9950bd99c2 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/GridSortingIndicators.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/GridSortingIndicators.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/server/GridClearContainer.java b/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/server/GridClearContainer.java
index 8be2dab8fd..29939fe636 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/server/GridClearContainer.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/basicfeatures/server/GridClearContainer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,7 +27,7 @@ import com.vaadin.ui.Grid;
/**
* Tests that removing and adding rows doesn't cause an infinite loop in the
* browser.
- *
+ *
* @author Vaadin Ltd
*/
@Theme("valo")
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/declarative/GridDeclarativeBasicFeatures.java b/uitest/src/main/java/com/vaadin/tests/components/grid/declarative/GridDeclarativeBasicFeatures.java
index cd4bf4e69b..090f03923e 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/declarative/GridDeclarativeBasicFeatures.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/declarative/GridDeclarativeBasicFeatures.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/declarative/GridDeclarativeMultiSelect.java b/uitest/src/main/java/com/vaadin/tests/components/grid/declarative/GridDeclarativeMultiSelect.java
index 83dbdf541e..6c55d8f8bd 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/declarative/GridDeclarativeMultiSelect.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/declarative/GridDeclarativeMultiSelect.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/declarative/GridItemEditor.java b/uitest/src/main/java/com/vaadin/tests/components/grid/declarative/GridItemEditor.java
index 9673626f45..ab7dd7f786 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/declarative/GridItemEditor.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/declarative/GridItemEditor.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/gridlayout/ComponentAlignments.java b/uitest/src/main/java/com/vaadin/tests/components/gridlayout/ComponentAlignments.java
index 8b3cd02d9e..dc334a1a87 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/gridlayout/ComponentAlignments.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/gridlayout/ComponentAlignments.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.ui.VerticalLayout;
/**
* Test UI for TOP_CENTER and TOP_RIGHT alignments in VerticalLayout.
- *
+ *
* @author Vaadin Ltd
*/
public class ComponentAlignments extends AbstractTestUI {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutAlignments.java b/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutAlignments.java
index 06f4f17eb8..b37e47243f 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutAlignments.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutAlignments.java
@@ -57,13 +57,16 @@ public class GridLayoutAlignments extends UI {
setContent(layout);
}
- private Component createButton(final GridLayout g, final Alignment topLeft) {
- return new Button("Align " + topLeft.getVerticalAlignment() + ", "
- + topLeft.getHorizontalAlignment(), new Button.ClickListener() {
- @Override
- public void buttonClick(Button.ClickEvent clickEvent) {
- g.setComponentAlignment(g.getComponent(0, 0), topLeft);
- }
- });
+ private Component createButton(final GridLayout g,
+ final Alignment topLeft) {
+ return new Button(
+ "Align " + topLeft.getVerticalAlignment() + ", "
+ + topLeft.getHorizontalAlignment(),
+ new Button.ClickListener() {
+ @Override
+ public void buttonClick(Button.ClickEvent clickEvent) {
+ g.setComponentAlignment(g.getComponent(0, 0), topLeft);
+ }
+ });
}
} \ No newline at end of file
diff --git a/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutCaptionAlignment.java b/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutCaptionAlignment.java
index 063a36ca04..a00163e504 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutCaptionAlignment.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutCaptionAlignment.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutExtraSpacing.java b/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutExtraSpacing.java
index ce59f9c89f..b40e27ba73 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutExtraSpacing.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutExtraSpacing.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,9 +27,8 @@ public class GridLayoutExtraSpacing extends AbstractTestUI {
@Override
protected void setup(VaadinRequest request) {
- getUI().getPage()
- .getStyles()
- .add(".v-gridlayout {background: red;} .v-csslayout {background: white;}");
+ getUI().getPage().getStyles().add(
+ ".v-gridlayout {background: red;} .v-csslayout {background: white;}");
final GridLayout gl = new GridLayout(4, 4);
@@ -68,7 +67,7 @@ public class GridLayoutExtraSpacing extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -79,7 +78,7 @@ public class GridLayoutExtraSpacing extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutFocusOrderAfterShowChild.java b/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutFocusOrderAfterShowChild.java
index 034ff024d0..7f7ea59d45 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutFocusOrderAfterShowChild.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutFocusOrderAfterShowChild.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutFractionalSizeAndAlignment.java b/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutFractionalSizeAndAlignment.java
index 32d01f9910..a931244312 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutFractionalSizeAndAlignment.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutFractionalSizeAndAlignment.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,8 @@ import com.vaadin.ui.Button;
import com.vaadin.ui.GridLayout;
@Widgetset(TestingWidgetSet.NAME)
-public class GridLayoutFractionalSizeAndAlignment extends AbstractTestUIWithLog {
+public class GridLayoutFractionalSizeAndAlignment
+ extends AbstractTestUIWithLog {
@Override
protected void setup(VaadinRequest request) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutHideMiddleCells.java b/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutHideMiddleCells.java
index 4712b8fb26..1c801333b1 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutHideMiddleCells.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutHideMiddleCells.java
@@ -69,24 +69,24 @@ public class GridLayoutHideMiddleCells extends AbstractTestUI {
horLayout.addComponent(gridLayout);
horLayout.addComponent(gridLayout2);
- mainLayout.addComponent(new Button(
- "Hide/show both middle Column and row",
- new Button.ClickListener() {
- @Override
- public void buttonClick(ClickEvent event) {
- for (int i = 0; i < ROWS; i++) {
- for (int j = 0; j < COLS; j++) {
- if (j == 2 || i == 2) {
- if (labels[i][j].isVisible()) {
- labels[i][j].setVisible(false);
- } else {
- labels[i][j].setVisible(true);
+ mainLayout
+ .addComponent(new Button("Hide/show both middle Column and row",
+ new Button.ClickListener() {
+ @Override
+ public void buttonClick(ClickEvent event) {
+ for (int i = 0; i < ROWS; i++) {
+ for (int j = 0; j < COLS; j++) {
+ if (j == 2 || i == 2) {
+ if (labels[i][j].isVisible()) {
+ labels[i][j].setVisible(false);
+ } else {
+ labels[i][j].setVisible(true);
+ }
+ }
}
}
}
- }
- }
- }));
+ }));
mainLayout.addComponent(new Button("Hide/show middle Column",
new Button.ClickListener() {
@Override
@@ -100,8 +100,8 @@ public class GridLayoutHideMiddleCells extends AbstractTestUI {
}
}
}));
- mainLayout.addComponent(new Button("Hide/show middle Row",
- new Button.ClickListener() {
+ mainLayout.addComponent(
+ new Button("Hide/show middle Row", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
for (int j = 0; j < COLS; j++) {
@@ -114,8 +114,8 @@ public class GridLayoutHideMiddleCells extends AbstractTestUI {
}
}));
- mainLayout.addComponent(new Button("Hide Random button",
- new Button.ClickListener() {
+ mainLayout.addComponent(
+ new Button("Hide Random button", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
@@ -139,7 +139,7 @@ public class GridLayoutHideMiddleCells extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutInForm.java b/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutInForm.java
index e8261ec183..c4a1662f73 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutInForm.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutInForm.java
@@ -29,8 +29,8 @@ public class GridLayoutInForm extends TestBase {
PropertysetItem item = new PropertysetItem();
for (String propertyId : propertyIds) {
- item.addItemProperty(propertyId, new ObjectProperty<String>(
- propertyId));
+ item.addItemProperty(propertyId,
+ new ObjectProperty<String>(propertyId));
}
final Form form = new Form(gridLayout);
@@ -46,20 +46,20 @@ public class GridLayoutInForm extends TestBase {
addComponent(panel);
- addComponent(new Button("Use 15 first fields",
- new Button.ClickListener() {
+ addComponent(
+ new Button("Use 15 first fields", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- form.setVisibleItemProperties(propertyIds
- .subList(0, 15));
+ form.setVisibleItemProperties(
+ propertyIds.subList(0, 15));
}
}));
- addComponent(new Button("Use 15 last fields",
- new Button.ClickListener() {
+ addComponent(
+ new Button("Use 15 last fields", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- form.setVisibleItemProperties(propertyIds.subList(35,
- 50));
+ form.setVisibleItemProperties(
+ propertyIds.subList(35, 50));
}
}));
diff --git a/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutRequiredIndicatorLocation.java b/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutRequiredIndicatorLocation.java
index e432e7b674..b016c6361a 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutRequiredIndicatorLocation.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutRequiredIndicatorLocation.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -36,8 +36,8 @@ public class GridLayoutRequiredIndicatorLocation extends AbstractTestUI {
.add(".colored { background: lime; overflow: visible; }");
getPage().getCurrent().getStyles()
.add(".pink { background: pink; overflow: visible; }");
- getPage().getCurrent().getStyles().add(
- ".v-gridlayout-slot { border: 1px solid red; }");
+ getPage().getCurrent().getStyles()
+ .add(".v-gridlayout-slot { border: 1px solid red; }");
GridLayout rootLayout = new GridLayout(2, 2);
rootLayout.addStyleName("allow-overflow");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutScrollPosition.java b/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutScrollPosition.java
index 9bc29b5c82..9acfd880b5 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutScrollPosition.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutScrollPosition.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -59,8 +59,8 @@ public class GridLayoutScrollPosition extends AbstractTestUI {
.addValueChangeListener(new ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
- toggleableLabel.setVisible(visibilityToggleCheckBox
- .getValue());
+ toggleableLabel.setVisible(
+ visibilityToggleCheckBox.getValue());
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutWithNonIntegerWidth.java b/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutWithNonIntegerWidth.java
index 6cc96332d5..b9afd3007d 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutWithNonIntegerWidth.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutWithNonIntegerWidth.java
@@ -33,7 +33,7 @@ public class GridLayoutWithNonIntegerWidth extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -43,7 +43,7 @@ public class GridLayoutWithNonIntegerWidth extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/gridlayout/InsertRowInMiddle.java b/uitest/src/main/java/com/vaadin/tests/components/gridlayout/InsertRowInMiddle.java
index 0fc764e463..78b4a9d417 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/gridlayout/InsertRowInMiddle.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/gridlayout/InsertRowInMiddle.java
@@ -1,12 +1,12 @@
/*
* Copyright 2012 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/gridlayout/LayoutAfterHidingError.java b/uitest/src/main/java/com/vaadin/tests/components/gridlayout/LayoutAfterHidingError.java
index 0ec8cd5030..48b80357a1 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/gridlayout/LayoutAfterHidingError.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/gridlayout/LayoutAfterHidingError.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/gridlayout/UniformGridLayoutUI.java b/uitest/src/main/java/com/vaadin/tests/components/gridlayout/UniformGridLayoutUI.java
index 07abb61785..2173f1b926 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/gridlayout/UniformGridLayoutUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/gridlayout/UniformGridLayoutUI.java
@@ -23,7 +23,8 @@ public class UniformGridLayoutUI extends UI {
layout.addComponent(createGridWithoutGridBuilder(3, hide));
}
- private GridLayout createGridWithoutGridBuilder(int rows, boolean collapse) {
+ private GridLayout createGridWithoutGridBuilder(int rows,
+ boolean collapse) {
GridLayout grid = new GridLayout(30, 3);
grid.setWidth("100%");
// grid.setMargin(true);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/image/ImageAltText.java b/uitest/src/main/java/com/vaadin/tests/components/image/ImageAltText.java
index efee376bfe..960acfb598 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/image/ImageAltText.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/image/ImageAltText.java
@@ -10,8 +10,8 @@ public class ImageAltText extends TestBase {
@Override
protected void setup() {
- final Image image = new Image("Caption", new ThemeResource(
- "../runo/icons/64/ok.png"));
+ final Image image = new Image("Caption",
+ new ThemeResource("../runo/icons/64/ok.png"));
image.setDebugId("image");
image.setAlternateText("Original alt text");
addComponent(image);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/image/ImageClicks.java b/uitest/src/main/java/com/vaadin/tests/components/image/ImageClicks.java
index 397e31c39c..854210344f 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/image/ImageClicks.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/image/ImageClicks.java
@@ -38,8 +38,8 @@ public class ImageClicks extends TestBase {
@Override
public void click(ClickEvent event) {
++clickCounter;
- imageResource.setFilename("testimage.png?"
- + new Date().getTime());
+ imageResource
+ .setFilename("testimage.png?" + new Date().getTime());
image.markAsDirty();
label.setValue(labelText());
}
@@ -118,8 +118,8 @@ public class ImageClicks extends TestBase {
drawable.setColor(Color.white);
}
- drawable.fillRect(gridx + 1, gridy + 1, gridxnext - gridx
- - 1, gridynext - gridy - 1);
+ drawable.fillRect(gridx + 1, gridy + 1,
+ gridxnext - gridx - 1, gridynext - gridy - 1);
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/javascriptcomponent/BasicJavaScriptComponent.java b/uitest/src/main/java/com/vaadin/tests/components/javascriptcomponent/BasicJavaScriptComponent.java
index 1e193fc3b4..6fa44bf7b0 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/javascriptcomponent/BasicJavaScriptComponent.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/javascriptcomponent/BasicJavaScriptComponent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -95,8 +95,8 @@ public class BasicJavaScriptComponent extends AbstractTestUI {
HasComponents parent = getParent();
int i = 1;
while (parent != null) {
- if (!parentIds.getString(i).equals(
- parent.getConnectorId())) {
+ if (!parentIds.getString(i)
+ .equals(parent.getConnectorId())) {
log.log("parentIds[" + i + "] doesn't match");
}
i++;
@@ -134,10 +134,8 @@ public class BasicJavaScriptComponent extends AbstractTestUI {
getRpcProxy(TestRpc.class).sendRpc("RPC message");
callFunction("messageToClient", "Callback message");
- getState()
- .setMessages(
- Arrays.asList("First state message",
- "Second state message"));
+ getState().setMessages(Arrays.asList("First state message",
+ "Second state message"));
// Dummy resource used to test URL translation
Resource resource = new ConnectorResource() {
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/javascriptcomponent/JavaScriptNoLayoutHandlingUI.java b/uitest/src/main/java/com/vaadin/tests/components/javascriptcomponent/JavaScriptNoLayoutHandlingUI.java
index 0181f17aba..a431ba17aa 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/javascriptcomponent/JavaScriptNoLayoutHandlingUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/javascriptcomponent/JavaScriptNoLayoutHandlingUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/javascriptcomponent/JavaScriptPreloading.java b/uitest/src/main/java/com/vaadin/tests/components/javascriptcomponent/JavaScriptPreloading.java
index f9ef4c98cb..7b9f0199c5 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/javascriptcomponent/JavaScriptPreloading.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/javascriptcomponent/JavaScriptPreloading.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/javascriptcomponent/JavaScriptResizeListener.java b/uitest/src/main/java/com/vaadin/tests/components/javascriptcomponent/JavaScriptResizeListener.java
index b9071ec44c..6dc896bf48 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/javascriptcomponent/JavaScriptResizeListener.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/javascriptcomponent/JavaScriptResizeListener.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -42,8 +42,8 @@ public class JavaScriptResizeListener extends AbstractTestUI {
@Override
protected void setup(VaadinRequest request) {
- addComponent(new Button("Change holder size",
- new Button.ClickListener() {
+ addComponent(
+ new Button("Change holder size", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
updateHolderSize();
@@ -55,8 +55,8 @@ public class JavaScriptResizeListener extends AbstractTestUI {
addValueChangeListener(new ValueChangeListener() {
@Override
public void valueChange(Property.ValueChangeEvent event) {
- resizeJsComponent.setListenerEnabled(event
- .getProperty().getValue() == Boolean.TRUE);
+ resizeJsComponent.setListenerEnabled(
+ event.getProperty().getValue() == Boolean.TRUE);
}
});
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/label/LabelModes.java b/uitest/src/main/java/com/vaadin/tests/components/label/LabelModes.java
index e5bc539f36..d70fd5ab4c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/label/LabelModes.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/label/LabelModes.java
@@ -15,25 +15,30 @@ public class LabelModes extends ComponentTestCase<Label> {
protected void initializeComponents() {
Label l;
- l = createLabel("This is an undefined wide label with default content mode");
+ l = createLabel(
+ "This is an undefined wide label with default content mode");
l.setWidth(null);
addTestComponent(l);
- l = createLabel("This label contains\nnewlines and spaces\nbut is in\ndefault content mode");
+ l = createLabel(
+ "This label contains\nnewlines and spaces\nbut is in\ndefault content mode");
l.setWidth(null);
addTestComponent(l);
- l = createLabel("This label contains\nnewlines and spaces\nand is in\npreformatted mode");
+ l = createLabel(
+ "This label contains\nnewlines and spaces\nand is in\npreformatted mode");
l.setContentMode(ContentMode.PREFORMATTED);
l.setWidth(null);
addTestComponent(l);
- l = createLabel("This label contains\nnewlines and spaces\nand is in\nhtml mode");
+ l = createLabel(
+ "This label contains\nnewlines and spaces\nand is in\nhtml mode");
l.setContentMode(ContentMode.HTML);
l.setWidth(null);
addTestComponent(l);
- l = createLabel("This label contains\nnewlines and spaces\nand is in\nraw mode");
+ l = createLabel(
+ "This label contains\nnewlines and spaces\nand is in\nraw mode");
l.setContentMode(ContentMode.RAW);
l.setWidth(null);
addTestComponent(l);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/label/LabelTest.java b/uitest/src/main/java/com/vaadin/tests/components/label/LabelTest.java
index 8c9a76ea47..5968fccf02 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/label/LabelTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/label/LabelTest.java
@@ -9,8 +9,8 @@ import com.vaadin.shared.ui.label.ContentMode;
import com.vaadin.tests.components.AbstractComponentTest;
import com.vaadin.ui.Label;
-public class LabelTest extends AbstractComponentTest<Label> implements
- ValueChangeListener {
+public class LabelTest extends AbstractComponentTest<Label>
+ implements ValueChangeListener {
private Command<Label, String> setValueCommand = new Command<Label, String>() {
@@ -59,9 +59,11 @@ public class LabelTest extends AbstractComponentTest<Label> implements
List<String> values = new ArrayList<String>();
values.add("Test");
values.add("A little longer value");
- values.add("A very long value with very much text. All in all it is 74 characters long");
+ values.add(
+ "A very long value with very much text. All in all it is 74 characters long");
values.add("<b>Bold</b>");
- values.add("<div style=\"height: 70px; width: 15px; border: 1px dashed red\">With border</div>");
+ values.add(
+ "<div style=\"height: 70px; width: 15px; border: 1px dashed red\">With border</div>");
createClickAction("(empty string)", subCategory, setValueCommand, "");
createClickAction("(null)", subCategory, setValueCommand, null);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/label/Labels.java b/uitest/src/main/java/com/vaadin/tests/components/label/Labels.java
index cd6976543a..0d296b1b92 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/label/Labels.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/label/Labels.java
@@ -15,8 +15,9 @@ public class Labels extends ComponentTestCase<Label> {
@Override
protected void initializeComponents() {
Label l;
- l = createLabel("This is an undefined\nwide\nlabel which do not wrap. It should be clipped at the end of the screen"
- + LoremIpsum.get(1000));
+ l = createLabel(
+ "This is an undefined\nwide\nlabel which do not wrap. It should be clipped at the end of the screen"
+ + LoremIpsum.get(1000));
l.setWidth(null);
addTestComponent(l);
@@ -29,8 +30,9 @@ public class Labels extends ComponentTestCase<Label> {
l.setWidth("100%");
addTestComponent(l);
- l = createLabel("This is a\n\n 100%\t\t\t \twide simple with fixed 65px height. It should wrap. "
- + LoremIpsum.get(5000));
+ l = createLabel(
+ "This is a\n\n 100%\t\t\t \twide simple with fixed 65px height. It should wrap. "
+ + LoremIpsum.get(5000));
l.setWidth("100%");
l.setHeight("65px");
addTestComponent(l);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/label/MarginsInLabels.java b/uitest/src/main/java/com/vaadin/tests/components/label/MarginsInLabels.java
index f503e8966f..b18b92dfc8 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/label/MarginsInLabels.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/label/MarginsInLabels.java
@@ -15,14 +15,15 @@ public class MarginsInLabels extends AbstractTestUI {
@Override
protected void setup(VaadinRequest request) {
AbstractLayout layout = new VerticalLayout();
- layout.addComponent(new Label("<h1>Vertical layout</h1>",
- ContentMode.HTML));
+ layout.addComponent(
+ new Label("<h1>Vertical layout</h1>", ContentMode.HTML));
layout.addComponent(new Label("Next row"));
addComponent(layout);
layout = new GridLayout(1, 2);
layout.setWidth("100%");
- layout.addComponent(new Label("<h1>Grid layout</h1>", ContentMode.HTML));
+ layout.addComponent(
+ new Label("<h1>Grid layout</h1>", ContentMode.HTML));
layout.addComponent(new Label("Next row"));
addComponent(layout);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/layout/EmptySpaceOnPageAfterExpandedComponent.java b/uitest/src/main/java/com/vaadin/tests/components/layout/EmptySpaceOnPageAfterExpandedComponent.java
index c873a7efe7..519ac7069e 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/layout/EmptySpaceOnPageAfterExpandedComponent.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/layout/EmptySpaceOnPageAfterExpandedComponent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/link/LinkIcon.java b/uitest/src/main/java/com/vaadin/tests/components/link/LinkIcon.java
index 970c2f71c7..8378500010 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/link/LinkIcon.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/link/LinkIcon.java
@@ -20,8 +20,8 @@ public class LinkIcon extends TestBase {
@Override
protected void setup() {
- Link l = new Link("www.google.com", new ExternalResource(
- "http://www.vaadin.com/"));
+ Link l = new Link("www.google.com",
+ new ExternalResource("http://www.vaadin.com/"));
l.setIcon(new ThemeResource("../runo/icons/32/calendar.png"));
addComponent(l);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/link/LinkTargetSize.java b/uitest/src/main/java/com/vaadin/tests/components/link/LinkTargetSize.java
index cb537c88ae..05a3b0008e 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/link/LinkTargetSize.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/link/LinkTargetSize.java
@@ -19,8 +19,8 @@ public class LinkTargetSize extends TestBase {
@Override
protected void setup() {
- Link l = new Link("Try it!", new ExternalResource(
- "http://www.google.com/m"));
+ Link l = new Link("Try it!",
+ new ExternalResource("http://www.google.com/m"));
l.setTargetName("_blank");
l.setTargetWidth(300);
l.setTargetHeight(300);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/link/LinkTest.java b/uitest/src/main/java/com/vaadin/tests/components/link/LinkTest.java
index 6deea0fd96..996fc32775 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/link/LinkTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/link/LinkTest.java
@@ -42,11 +42,11 @@ public class LinkTest extends AbstractComponentTest<Link> {
private void createTargetSelect(String category) {
LinkedHashMap<String, Resource> options = new LinkedHashMap<String, Resource>();
options.put("-", null);
- options.put("https://vaadin.com", new ExternalResource(
- "https://vaadin.com"));
+ options.put("https://vaadin.com",
+ new ExternalResource("https://vaadin.com"));
options.put("32x32 theme icon", ICON_32_ATTENTION_PNG_CACHEABLE);
- options.put("linktest-target.html", new ClassResource(
- "linktest-target.html"));
+ options.put("linktest-target.html",
+ new ClassResource("linktest-target.html"));
createSelectAction("Link target", category, options,
"https://vaadin.com", linkTargetCommand, null);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/listselect/ListSelectAddRemoveItems.java b/uitest/src/main/java/com/vaadin/tests/components/listselect/ListSelectAddRemoveItems.java
index 56e9d1f419..f00a923647 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/listselect/ListSelectAddRemoveItems.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/listselect/ListSelectAddRemoveItems.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -97,7 +97,8 @@ public class ListSelectAddRemoveItems extends AbstractTestUIWithLog {
addComponent(new Button("Remove middle", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- container.removeItem(container.getIdByIndex(container.size() / 2));
+ container.removeItem(
+ container.getIdByIndex(container.size() / 2));
logContainer();
}
}));
diff --git a/uitest/src/main/java/com/vaadin/tests/components/listselect/ListSelectAllowNewItem.java b/uitest/src/main/java/com/vaadin/tests/components/listselect/ListSelectAllowNewItem.java
index 8e74a7a53d..4ada4f12ff 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/listselect/ListSelectAllowNewItem.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/listselect/ListSelectAllowNewItem.java
@@ -9,8 +9,8 @@ public class ListSelectAllowNewItem extends TestBase {
@Override
protected void setup() {
- ListSelect select = new ListSelect("Select", Arrays.asList("Option 1",
- "Option 2"));
+ ListSelect select = new ListSelect("Select",
+ Arrays.asList("Option 1", "Option 2"));
select.setImmediate(true);
select.setNewItemsAllowed(true);
addComponent(select);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/listselect/ListSelectPrimaryStylename.java b/uitest/src/main/java/com/vaadin/tests/components/listselect/ListSelectPrimaryStylename.java
index b0137c55cf..cf7d12781c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/listselect/ListSelectPrimaryStylename.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/listselect/ListSelectPrimaryStylename.java
@@ -11,8 +11,8 @@ public class ListSelectPrimaryStylename extends TestBase {
@Override
protected void setup() {
- final ListSelect list = new ListSelect("Caption", Arrays.asList(
- "Option 1", "Option 2", "Option 3"));
+ final ListSelect list = new ListSelect("Caption",
+ Arrays.asList("Option 1", "Option 2", "Option 3"));
list.setPrimaryStyleName("my-list");
addComponent(list);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/listselect/ListSelectPushSelectionChanges.java b/uitest/src/main/java/com/vaadin/tests/components/listselect/ListSelectPushSelectionChanges.java
index 9518456066..d70c04c7e1 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/listselect/ListSelectPushSelectionChanges.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/listselect/ListSelectPushSelectionChanges.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -41,8 +41,8 @@ public class ListSelectPushSelectionChanges extends AbstractTestUI {
// Option group changes propagate to the list select
listSelect.setPropertyDataSource(optionGroup);
- final OptionGroup modeSelect = new OptionGroup("Mode", Arrays.asList(
- "Single", "Multi"));
+ final OptionGroup modeSelect = new OptionGroup("Mode",
+ Arrays.asList("Single", "Multi"));
modeSelect.setValue("Single");
modeSelect.addValueChangeListener(new ValueChangeListener() {
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/loginform/LoginFormTest.java b/uitest/src/main/java/com/vaadin/tests/components/loginform/LoginFormTest.java
index 629edc2130..9379968570 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/loginform/LoginFormTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/loginform/LoginFormTest.java
@@ -27,7 +27,7 @@ public class LoginFormTest extends TestBase {
loginForm.addListener(new LoginListener() {
/**
- *
+ *
*/
private static final long serialVersionUID = 1L;
@@ -87,8 +87,8 @@ public class LoginFormTest extends TestBase {
protected void login(LoginForm loginForm, String user, String password) {
VerticalLayout infoLayout = new VerticalLayout();
- Label info = new Label("User '" + user + "', password='" + password
- + "' logged in");
+ Label info = new Label(
+ "User '" + user + "', password='" + password + "' logged in");
Button logoutButton = new Button("Log out", new ClickListener() {
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/loginform/LoginFormUIInLoginHandler.java b/uitest/src/main/java/com/vaadin/tests/components/loginform/LoginFormUIInLoginHandler.java
index 58656cb7bf..1f608cad7c 100755
--- a/uitest/src/main/java/com/vaadin/tests/components/loginform/LoginFormUIInLoginHandler.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/loginform/LoginFormUIInLoginHandler.java
@@ -18,18 +18,18 @@ public class LoginFormUIInLoginHandler extends TestBase {
public void onLogin(LoginEvent event) {
UI r1 = UI.getCurrent();
if (r1 != null) {
- addComponent(new Label("UI.getCurrent().data: "
- + r1.getData()));
+ addComponent(
+ new Label("UI.getCurrent().data: " + r1.getData()));
} else {
addComponent(new Label("UI.getCurrent() is null"));
}
UI r2 = ((LoginForm) event.getSource()).getUI();
if (r2 != null) {
- addComponent(new Label("event.getSource().data: "
- + r2.getData()));
- } else {
addComponent(new Label(
- "event.getSource().getRoot() is null"));
+ "event.getSource().data: " + r2.getData()));
+ } else {
+ addComponent(
+ new Label("event.getSource().getRoot() is null"));
}
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/components/media/AudioTest.java b/uitest/src/main/java/com/vaadin/tests/components/media/AudioTest.java
index 1e1e26346c..728c62ab8d 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/media/AudioTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/media/AudioTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -56,12 +56,12 @@ public class AudioTest extends TestBase {
new MethodProperty<Boolean>(audio, "htmlContentAllowed"));
checkBox.setImmediate(true);
addComponent(checkBox);
- checkBox = new CheckBox("muted", new MethodProperty<Boolean>(audio,
- "muted"));
+ checkBox = new CheckBox("muted",
+ new MethodProperty<Boolean>(audio, "muted"));
checkBox.setImmediate(true);
addComponent(checkBox);
- checkBox = new CheckBox("autoplay", new MethodProperty<Boolean>(audio,
- "autoplay"));
+ checkBox = new CheckBox("autoplay",
+ new MethodProperty<Boolean>(audio, "autoplay"));
checkBox.setImmediate(true);
addComponent(checkBox);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/media/Media.java b/uitest/src/main/java/com/vaadin/tests/components/media/Media.java
index 5ccf9eb72b..ec4f7abd47 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/media/Media.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/media/Media.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarClickOpenedMenu.java b/uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarClickOpenedMenu.java
index 2bcbbbba3e..bd7db43efa 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarClickOpenedMenu.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarClickOpenedMenu.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.ui.MenuBar.MenuItem;
/**
* Test UI for top click on expanded top level menu and sub-menus.
- *
+ *
* @author Vaadin Ltd
*/
public class MenuBarClickOpenedMenu extends AbstractTestUI {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarFocus.java b/uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarFocus.java
index 2613634576..ef9524254b 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarFocus.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarFocus.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ public class MenuBarFocus extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -86,7 +86,7 @@ public class MenuBarFocus extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarNavigation.java b/uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarNavigation.java
index b4e24c60d9..c8814320f0 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarNavigation.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarNavigation.java
@@ -6,7 +6,8 @@ import com.vaadin.ui.MenuBar;
import com.vaadin.ui.MenuBar.Command;
import com.vaadin.ui.MenuBar.MenuItem;
-public class MenuBarNavigation extends AbstractTestUIWithLog implements Command {
+public class MenuBarNavigation extends AbstractTestUIWithLog
+ implements Command {
private MenuItem edit;
private MenuItem file;
diff --git a/uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarRunsOutOfBrowser.java b/uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarRunsOutOfBrowser.java
index 0d9c3d8bba..a6b76eb18f 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarRunsOutOfBrowser.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarRunsOutOfBrowser.java
@@ -20,7 +20,8 @@ public class MenuBarRunsOutOfBrowser extends AbstractTestCase {
MenuBar menuBar = new MenuBar();
menuBar.addItem("Test", new ThemeResource("icons/16/calendar.png"),
null);
- menuBar.addItem("ABC", new ThemeResource("icons/16/document.png"), null);
+ menuBar.addItem("ABC", new ThemeResource("icons/16/document.png"),
+ null);
menuBar.addItem("123", new ThemeResource("icons/16/help.png"), null);
main.addComponent(menuBar);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarSubmenusClosingValo.java b/uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarSubmenusClosingValo.java
index 88d89abbf4..d284b82ba4 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarSubmenusClosingValo.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarSubmenusClosingValo.java
@@ -28,14 +28,14 @@ public class MenuBarSubmenusClosingValo extends AbstractTestUI {
protected void setup(VaadinRequest request) {
// here we increase animation time to 1 second for to do auto testing
// possible
- getPage().getStyles().add(
- ".valo .v-menubar-popup[class*=\"animate-in\"] {"
+ getPage().getStyles()
+ .add(".valo .v-menubar-popup[class*=\"animate-in\"] {"
+ "-webkit-animation: valo-overlay-animate-in 1000ms; "
+ "-moz-animation: valo-overlay-animate-in 1000ms; "
+ "animation: valo-overlay-animate-in 1000ms;};");
- getPage().getStyles().add(
- ".valo .v-menubar-popup[class*=\"animate-out\"] {"
+ getPage().getStyles()
+ .add(".valo .v-menubar-popup[class*=\"animate-out\"] {"
+ "-webkit-animation: valo-animate-out-fade 1000ms; "
+ "-moz-animation: valo-animate-out-fade 1000ms; "
+ "animation: valo-animate-out-fade 1000ms;};");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarTest.java b/uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarTest.java
index 982b16c6e2..ada6622c98 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarTest.java
@@ -134,8 +134,8 @@ public class MenuBarTest extends AbstractComponentTest<MenuBar> {
options.put("Every second", 2);
options.put("Every third", 3);
- createSelectAction("Checkable", category, options,
- "No items checkable", setMenuItemCheckableDensity);
+ createSelectAction("Checkable", category, options, "No items checkable",
+ setMenuItemCheckableDensity);
}
/* COMMANDS */
@@ -269,8 +269,8 @@ public class MenuBarTest extends AbstractComponentTest<MenuBar> {
parent.addSeparator();
}
- MenuItem subMenuItem = parent.addItem("Sub menu " + parent.getId()
- + "/" + (i + 1), menuCommand);
+ MenuItem subMenuItem = parent.addItem(
+ "Sub menu " + parent.getId() + "/" + (i + 1), menuCommand);
if (disabledDensity != null && i % disabledDensity == 0) {
subMenuItem.setEnabled(false);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarTooltipsNearEdge.java b/uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarTooltipsNearEdge.java
index 4e42d97925..b686e1c5d2 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarTooltipsNearEdge.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarTooltipsNearEdge.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,13 +26,13 @@ import com.vaadin.ui.VerticalLayout;
/**
* Test to see if tooltips will render in the correct locations near the edges.
- *
+ *
* @author Vaadin Ltd
*/
public class MenuBarTooltipsNearEdge extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -76,7 +76,7 @@ public class MenuBarTooltipsNearEdge extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -86,7 +86,7 @@ public class MenuBarTooltipsNearEdge extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarsWithNesting.java b/uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarsWithNesting.java
index 16a0896aa2..b3abe024ac 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarsWithNesting.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/menubar/MenuBarsWithNesting.java
@@ -30,7 +30,7 @@ import com.vaadin.ui.MenuBar.MenuItem;
* Some of the icons are textual (using FontAwesome) and should behave like
* items with image icons: the icon should not be considered to be a part of the
* item's caption.
- *
+ *
* @since
* @author Vaadin
*/
@@ -44,8 +44,8 @@ public class MenuBarsWithNesting extends AbstractTestUI {
public final static String[] itemNames = { "Icon item", "Arrow down",
"Arrow up", "Warning" };
private final static Resource[] itemIcons = {
- new ThemeResource("window/img/restore.png"),
- FontAwesome.ARROW_DOWN, FontAwesome.ARROW_UP, FontAwesome.WARNING };
+ new ThemeResource("window/img/restore.png"), FontAwesome.ARROW_DOWN,
+ FontAwesome.ARROW_UP, FontAwesome.WARNING };
// The last menu item is nested with the following submenu items.
public final static String[] nestedItemnames = { "No icon", "Font icon",
diff --git a/uitest/src/main/java/com/vaadin/tests/components/menubar/MenuItemStyleRemoved.java b/uitest/src/main/java/com/vaadin/tests/components/menubar/MenuItemStyleRemoved.java
index cf06836f94..8efafa3afa 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/menubar/MenuItemStyleRemoved.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/menubar/MenuItemStyleRemoved.java
@@ -34,8 +34,8 @@ public class MenuItemStyleRemoved extends AbstractTestUI {
&& webBrowser.getBrowserMajorVersion() == 8) {
method = "querySelectorAll('." + MENUITEM_CLASS + "')";
}
- JavaScript.getCurrent().execute(
- "var x=document." + method + ";"
+ JavaScript.getCurrent()
+ .execute("var x=document." + method + ";"
+ " var i; for(i=0; i < x.length; i++)"
+ " {x[i].className += ' custom-menu-item'};");
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/menubar/MenuTooltip.java b/uitest/src/main/java/com/vaadin/tests/components/menubar/MenuTooltip.java
index 2c9d43290f..8a25f6c56e 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/menubar/MenuTooltip.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/menubar/MenuTooltip.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,13 +24,13 @@ import com.vaadin.ui.MenuBar.MenuItem;
/**
* Test to see if tooltips on menu items obscure other items on the menu.
- *
+ *
* @author Vaadin Ltd
*/
public class MenuTooltip extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -68,7 +68,7 @@ public class MenuTooltip extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -78,7 +78,7 @@ public class MenuTooltip extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/menubar/SpaceMenuBarNavigation.java b/uitest/src/main/java/com/vaadin/tests/components/menubar/SpaceMenuBarNavigation.java
index 764844751c..3d17248826 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/menubar/SpaceMenuBarNavigation.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/menubar/SpaceMenuBarNavigation.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.ui.MenuBar.Command;
import com.vaadin.ui.MenuBar.MenuItem;
/**
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/components/nativebutton/NativeButtonClick.java b/uitest/src/main/java/com/vaadin/tests/components/nativebutton/NativeButtonClick.java
index b6c80aea0c..cd38ea90c0 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/nativebutton/NativeButtonClick.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/nativebutton/NativeButtonClick.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ import com.vaadin.ui.NativeButton;
/**
* UI used to validate click coordinates reported from clicks on NativeButton
* elements.
- *
+ *
* @author Vaadin Ltd
*/
@SuppressWarnings("serial")
@@ -34,7 +34,7 @@ public class NativeButtonClick extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -47,16 +47,16 @@ public class NativeButtonClick extends AbstractTestUI {
new NativeButton.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- label1.setValue(event.getClientX() + ","
- + event.getClientY());
+ label1.setValue(
+ event.getClientX() + "," + event.getClientY());
}
});
Button button2 = new NativeButton("Button2",
new NativeButton.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- label2.setValue(event.getClientX() + ","
- + event.getClientY());
+ label2.setValue(
+ event.getClientX() + "," + event.getClientY());
}
});
@@ -68,7 +68,7 @@ public class NativeButtonClick extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -78,7 +78,7 @@ public class NativeButtonClick extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/nativebutton/NativeButtonHtml.java b/uitest/src/main/java/com/vaadin/tests/components/nativebutton/NativeButtonHtml.java
index 94023db2d0..c17fa15612 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/nativebutton/NativeButtonHtml.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/nativebutton/NativeButtonHtml.java
@@ -22,8 +22,8 @@ public class NativeButtonHtml extends TestBase {
@Override
public void buttonClick(ClickEvent event) {
- swapButton.setHtmlContentAllowed(!swapButton
- .isHtmlContentAllowed());
+ swapButton.setHtmlContentAllowed(
+ !swapButton.isHtmlContentAllowed());
}
});
addComponent(swapButton);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/nativebutton/NativeButtonIconAndText.java b/uitest/src/main/java/com/vaadin/tests/components/nativebutton/NativeButtonIconAndText.java
index d1a889dcf4..001a388ab9 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/nativebutton/NativeButtonIconAndText.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/nativebutton/NativeButtonIconAndText.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,8 +23,8 @@ import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Button.ClickListener;
import com.vaadin.ui.NativeButton;
-public class NativeButtonIconAndText extends AbstractTestUI implements
- ClickListener {
+public class NativeButtonIconAndText extends AbstractTestUI
+ implements ClickListener {
static final String UPDATED_ALTERNATE_TEXT = "Now has alternate text";
static final String INITIAL_ALTERNATE_TEXT = "Initial alternate text";
@@ -43,8 +43,8 @@ public class NativeButtonIconAndText extends AbstractTestUI implements
buttonTextIcon.setIcon(new ThemeResource("../runo/icons/64/ok.png"));
Button buttonTextIconAlt = new Button("Text icon alt");
- buttonTextIconAlt.setIcon(new ThemeResource(
- "../runo/icons/64/cancel.png"));
+ buttonTextIconAlt
+ .setIcon(new ThemeResource("../runo/icons/64/cancel.png"));
buttonTextIconAlt.setIconAlternateText(INITIAL_ALTERNATE_TEXT);
buttonText.addClickListener(this);
@@ -62,12 +62,13 @@ public class NativeButtonIconAndText extends AbstractTestUI implements
NativeButton nativeButtonText = new NativeButton("Only text");
NativeButton nativeButtonTextIcon = new NativeButton("Text icon");
- nativeButtonTextIcon.setIcon(new ThemeResource(
- "../runo/icons/64/ok.png"));
+ nativeButtonTextIcon
+ .setIcon(new ThemeResource("../runo/icons/64/ok.png"));
- NativeButton nativeButtonTextIconAlt = new NativeButton("Text icon alt");
- nativeButtonTextIconAlt.setIcon(new ThemeResource(
- "../runo/icons/64/cancel.png"));
+ NativeButton nativeButtonTextIconAlt = new NativeButton(
+ "Text icon alt");
+ nativeButtonTextIconAlt
+ .setIcon(new ThemeResource("../runo/icons/64/cancel.png"));
nativeButtonTextIconAlt.setIconAlternateText(INITIAL_ALTERNATE_TEXT);
nativeButtonText.addClickListener(this);
@@ -85,7 +86,7 @@ public class NativeButtonIconAndText extends AbstractTestUI implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -95,7 +96,7 @@ public class NativeButtonIconAndText extends AbstractTestUI implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
@@ -105,7 +106,7 @@ public class NativeButtonIconAndText extends AbstractTestUI implements
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.Button.ClickListener#buttonClick(com.vaadin.ui.Button.
* ClickEvent)
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/components/notification/MiddleNotificationPosition.java b/uitest/src/main/java/com/vaadin/tests/components/notification/MiddleNotificationPosition.java
index b770435161..6cf09d3557 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/notification/MiddleNotificationPosition.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/notification/MiddleNotificationPosition.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.ui.Notification;
/**
* Test UI class for Notification with middle left and middle right positions.
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/components/notification/NotificationDelay.java b/uitest/src/main/java/com/vaadin/tests/components/notification/NotificationDelay.java
index c0db1703bb..75ab3aff1f 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/notification/NotificationDelay.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/notification/NotificationDelay.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ import com.vaadin.ui.Notification.Type;
/**
* UI for notification delay test.
- *
+ *
* @author Vaadin Ltd
*/
public class NotificationDelay extends AbstractTestUI {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/notification/Notifications.java b/uitest/src/main/java/com/vaadin/tests/components/notification/Notifications.java
index 10fef434ca..91c886e9ac 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/notification/Notifications.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/notification/Notifications.java
@@ -30,8 +30,8 @@ public class Notifications extends TestBase implements ClickListener {
.getItemProperty(CAPTION).setValue("Humanized");
type.addItem(Notification.TYPE_ERROR_MESSAGE).getItemProperty(CAPTION)
.setValue("Error");
- type.addItem(Notification.TYPE_WARNING_MESSAGE)
- .getItemProperty(CAPTION).setValue("Warning");
+ type.addItem(Notification.TYPE_WARNING_MESSAGE).getItemProperty(CAPTION)
+ .setValue("Warning");
type.addItem(Notification.TYPE_TRAY_NOTIFICATION)
.getItemProperty(CAPTION).setValue("Tray");
type.setValue(type.getItemIds().iterator().next());
@@ -53,7 +53,8 @@ public class Notifications extends TestBase implements ClickListener {
@Override
public void buttonClick(ClickEvent event) {
- Notification n = new Notification(tf.getValue(), (Type) type.getValue());
+ Notification n = new Notification(tf.getValue(),
+ (Type) type.getValue());
n.setHtmlContentAllowed(true);
n.show(Page.getCurrent());
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/notification/NotificationsHtmlAllowed.java b/uitest/src/main/java/com/vaadin/tests/components/notification/NotificationsHtmlAllowed.java
index 89e97c0b6a..fb896d922a 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/notification/NotificationsHtmlAllowed.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/notification/NotificationsHtmlAllowed.java
@@ -10,7 +10,8 @@ import com.vaadin.ui.Notification;
import com.vaadin.ui.TextArea;
import com.vaadin.ui.TextField;
-public class NotificationsHtmlAllowed extends TestBase implements ClickListener {
+public class NotificationsHtmlAllowed extends TestBase
+ implements ClickListener {
private TextArea messageField;
private CheckBox htmlAllowedBox;
diff --git a/uitest/src/main/java/com/vaadin/tests/components/optiongroup/DisabledOptionGroupItems.java b/uitest/src/main/java/com/vaadin/tests/components/optiongroup/DisabledOptionGroupItems.java
index 877f9aa675..0ecf5e6f8d 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/optiongroup/DisabledOptionGroupItems.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/optiongroup/DisabledOptionGroupItems.java
@@ -9,9 +9,9 @@ import com.vaadin.ui.OptionGroup;
public class DisabledOptionGroupItems extends ComponentTestCase<OptionGroup> {
- private static final List<String> cities = Arrays.asList(new String[] {
- "Berlin", "Brussels", "Helsinki", "Madrid", "Oslo", "Paris",
- "Stockholm" });
+ private static final List<String> cities = Arrays
+ .asList(new String[] { "Berlin", "Brussels", "Helsinki", "Madrid",
+ "Oslo", "Paris", "Stockholm" });
private static final String NULL_SELECTION_ID = "Berlin";
diff --git a/uitest/src/main/java/com/vaadin/tests/components/optiongroup/OptionGroupDisabled.java b/uitest/src/main/java/com/vaadin/tests/components/optiongroup/OptionGroupDisabled.java
index f16bd4b7dd..884b6719e0 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/optiongroup/OptionGroupDisabled.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/optiongroup/OptionGroupDisabled.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/optiongroup/OptionGroupMultipleValueChange.java b/uitest/src/main/java/com/vaadin/tests/components/optiongroup/OptionGroupMultipleValueChange.java
index 213258ed29..b5267781a2 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/optiongroup/OptionGroupMultipleValueChange.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/optiongroup/OptionGroupMultipleValueChange.java
@@ -22,7 +22,8 @@ public class OptionGroupMultipleValueChange extends TestBase {
@Override
protected void setup() {
final OptionGroup og = new OptionGroup();
- og.addItem("Clicking on the text might cause an extra valuechange event");
+ og.addItem(
+ "Clicking on the text might cause an extra valuechange event");
og.addItem("Second option, same thing");
og.setImmediate(true);
addComponent(og);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/optiongroup/OptionGroupRetainFocusKeyboardValueChange.java b/uitest/src/main/java/com/vaadin/tests/components/optiongroup/OptionGroupRetainFocusKeyboardValueChange.java
index bad9723539..ff486340fb 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/optiongroup/OptionGroupRetainFocusKeyboardValueChange.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/optiongroup/OptionGroupRetainFocusKeyboardValueChange.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.ui.OptionGroup;
/**
* Testcase for #10451
- *
+ *
* @author Vaadin Ltd
*/
public class OptionGroupRetainFocusKeyboardValueChange extends AbstractTestUI {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/optiongroup/OptionGroups.java b/uitest/src/main/java/com/vaadin/tests/components/optiongroup/OptionGroups.java
index c4c588d1ea..a1c05ad715 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/optiongroup/OptionGroups.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/optiongroup/OptionGroups.java
@@ -37,8 +37,8 @@ public class OptionGroups extends AbstractSelectTestCase<OptionGroup> {
options.put("32x32", ICON_32_ATTENTION_PNG_CACHEABLE);
options.put("64x64", ICON_64_EMAIL_REPLY_PNG_CACHEABLE);
- createSelectAction(string, CATEGORY_DECORATIONS, options, options
- .keySet().iterator().next(),
+ createSelectAction(string, CATEGORY_DECORATIONS, options,
+ options.keySet().iterator().next(),
new Command<OptionGroup, ThemeResource>() {
@Override
public void execute(OptionGroup c, ThemeResource icon,
diff --git a/uitest/src/main/java/com/vaadin/tests/components/optiongroup/ReadOnlyOptionGroup.java b/uitest/src/main/java/com/vaadin/tests/components/optiongroup/ReadOnlyOptionGroup.java
index 76258e574e..48bfdf152c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/optiongroup/ReadOnlyOptionGroup.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/optiongroup/ReadOnlyOptionGroup.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.ui.OptionGroup;
/**
* Test UI for unset read-only flag of Option group with new items allowed.
- *
+ *
* @author Vaadin Ltd
*/
public class ReadOnlyOptionGroup extends AbstractTestUI {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/BoxLayoutTest.java b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/BoxLayoutTest.java
index 4f7a939ee5..0377ee07ab 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/BoxLayoutTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/BoxLayoutTest.java
@@ -108,10 +108,10 @@ public class BoxLayoutTest extends AbstractTestUI {
public void valueChange(ValueChangeEvent event) {
view.removeAllComponents();
- view.addComponent(createControls(!vertical.getValue()
- .booleanValue()));
- view.addComponent(createTestLayout(!vertical.getValue()
- .booleanValue()));
+ view.addComponent(
+ createControls(!vertical.getValue().booleanValue()));
+ view.addComponent(
+ createTestLayout(!vertical.getValue().booleanValue()));
view.setExpandRatio(view.getComponent(1), 1);
@@ -128,7 +128,8 @@ public class BoxLayoutTest extends AbstractTestUI {
new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- if (event.getButton().getWidth() == -1) {
+ if (event.getButton()
+ .getWidth() == -1) {
event.getButton().setHeight("50px");
event.getButton().setWidth("200px");
} else {
@@ -151,7 +152,8 @@ public class BoxLayoutTest extends AbstractTestUI {
new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- Component last = l.getComponent(l.getComponentCount() - 1);
+ Component last = l
+ .getComponent(l.getComponentCount() - 1);
l.removeComponent(last);
}
});
@@ -237,8 +239,8 @@ public class BoxLayoutTest extends AbstractTestUI {
align = new NativeSelect(null, alignments);
for (Alignment a : alignments) {
- align.setItemCaption(a,
- a.getVerticalAlignment() + "-" + a.getHorizontalAlignment());
+ align.setItemCaption(a, a.getVerticalAlignment() + "-"
+ + a.getHorizontalAlignment());
}
align.setImmediate(true);
align.setEnabled(false);
@@ -312,8 +314,8 @@ public class BoxLayoutTest extends AbstractTestUI {
});
component.addComponent(componentHeight);
- componentCaption = new NativeSelect("Caption", Arrays.asList("Short",
- "Slightly Longer Caption"));
+ componentCaption = new NativeSelect("Caption",
+ Arrays.asList("Short", "Slightly Longer Caption"));
componentCaption.setImmediate(true);
componentCaption.setEnabled(false);
componentCaption.addListener(new ValueChangeListener() {
@@ -328,16 +330,17 @@ public class BoxLayoutTest extends AbstractTestUI {
});
component.addComponent(componentCaption);
- componentIcon = new NativeSelect("Icon", Arrays.asList(
- "../runo/icons/16/folder.png", "../runo/icons/32/document.png"));
+ componentIcon = new NativeSelect("Icon",
+ Arrays.asList("../runo/icons/16/folder.png",
+ "../runo/icons/32/document.png"));
componentIcon.setImmediate(true);
componentIcon.setEnabled(false);
componentIcon.addListener(new ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
if (componentIcon.getValue() != null) {
- target.setIcon(new ThemeResource(componentIcon.getValue()
- .toString()));
+ target.setIcon(new ThemeResource(
+ componentIcon.getValue().toString()));
} else {
target.setIcon(null);
}
@@ -363,8 +366,8 @@ public class BoxLayoutTest extends AbstractTestUI {
@Override
public void valueChange(ValueChangeEvent event) {
if (target != null) {
- target.setComponentError(componentError.getValue() ? new UserError(
- "Error message") : null);
+ target.setComponentError(componentError.getValue()
+ ? new UserError("Error message") : null);
}
}
});
@@ -377,8 +380,8 @@ public class BoxLayoutTest extends AbstractTestUI {
@Override
public void valueChange(ValueChangeEvent event) {
if (target != null && target instanceof AbstractField) {
- ((AbstractField<?>) target).setRequired(componentRequired
- .getValue());
+ ((AbstractField<?>) target)
+ .setRequired(componentRequired.getValue());
}
}
});
@@ -423,22 +426,22 @@ public class BoxLayoutTest extends AbstractTestUI {
componentIcon.setEnabled(target != null);
componentDescription.setEnabled(target != null);
componentError.setEnabled(target != null);
- componentRequired.setEnabled(target != null
- && target instanceof AbstractField);
+ componentRequired.setEnabled(
+ target != null && target instanceof AbstractField);
align.setEnabled(target != null);
expand.setEnabled(target != null);
if (target != null) {
if (target.getWidth() > -1) {
- componentWidth.select(new Float(target.getWidth())
- .intValue()
- + target.getWidthUnits().getSymbol());
+ componentWidth
+ .select(new Float(target.getWidth()).intValue()
+ + target.getWidthUnits().getSymbol());
} else {
componentWidth.select(null);
}
if (target.getHeight() > -1) {
- componentHeight.select(new Float(target.getHeight())
- .intValue()
- + target.getHeightUnits().getSymbol());
+ componentHeight
+ .select(new Float(target.getHeight()).intValue()
+ + target.getHeightUnits().getSymbol());
} else {
componentHeight.select(null);
}
@@ -456,8 +459,8 @@ public class BoxLayoutTest extends AbstractTestUI {
componentDescription.setValue(target.getDescription());
componentError.setValue(target.getComponentError() != null);
if (target instanceof AbstractField) {
- componentRequired.setValue(((AbstractField<?>) target)
- .isRequired());
+ componentRequired.setValue(
+ ((AbstractField<?>) target).isRequired());
}
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/CaptionLeak.java b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/CaptionLeak.java
index c715aa383a..f9fd205c22 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/CaptionLeak.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/CaptionLeak.java
@@ -13,7 +13,7 @@ import com.vaadin.ui.VerticalLayout;
/**
* HorizontalLayout and VerticalLayout should not leak caption elements via
* listeners when removing components from a layout.
- *
+ *
* @since 7.1.13
* @author Vaadin Ltd
*/
@@ -21,7 +21,7 @@ public class CaptionLeak extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -70,7 +70,7 @@ public class CaptionLeak extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -80,7 +80,7 @@ public class CaptionLeak extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/ErrorIndicator.java b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/ErrorIndicator.java
index 89490bd167..4487d0ff2a 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/ErrorIndicator.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/ErrorIndicator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -15,7 +15,7 @@
*/
/**
- *
+ *
*/
package com.vaadin.tests.components.orderedlayout;
@@ -29,7 +29,7 @@ public class ErrorIndicator extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -61,7 +61,7 @@ public class ErrorIndicator extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -71,7 +71,7 @@ public class ErrorIndicator extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/ExpandChangeReattach.java b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/ExpandChangeReattach.java
index 4360ff60d8..550c93bb6f 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/ExpandChangeReattach.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/ExpandChangeReattach.java
@@ -1,12 +1,12 @@
/*
* Copyright 2012 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -33,8 +33,8 @@ public class ExpandChangeReattach extends AbstractTestUI {
Table table = new Table("Table", TestUtils.getISO3166Container());
verticalLayout.addComponent(table);
- verticalLayout.addComponent(new Button("Toggle expand logic",
- new Button.ClickListener() {
+ verticalLayout.addComponent(
+ new Button("Toggle expand logic", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
if (verticalLayout.getHeight() == -1) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/HorizontalLayoutFullsizeContentWithErrorMsg.java b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/HorizontalLayoutFullsizeContentWithErrorMsg.java
index 030bfa693e..91c221c040 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/HorizontalLayoutFullsizeContentWithErrorMsg.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/HorizontalLayoutFullsizeContentWithErrorMsg.java
@@ -10,7 +10,8 @@ import com.vaadin.ui.Button.ClickListener;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.TextField;
-public class HorizontalLayoutFullsizeContentWithErrorMsg extends AbstractTestUI {
+public class HorizontalLayoutFullsizeContentWithErrorMsg
+ extends AbstractTestUI {
static final String FIELD_ID = "f";
static final String BUTTON_ID = "b";
@@ -23,7 +24,7 @@ public class HorizontalLayoutFullsizeContentWithErrorMsg extends AbstractTestUI
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -44,8 +45,8 @@ public class HorizontalLayoutFullsizeContentWithErrorMsg extends AbstractTestUI
toggleError.addClickListener(new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- tf.setComponentError(tf.getComponentError() == null ? new UserError(
- "foo") : null);
+ tf.setComponentError(tf.getComponentError() == null
+ ? new UserError("foo") : null);
}
});
hl.addComponent(toggleError);
@@ -55,7 +56,7 @@ public class HorizontalLayoutFullsizeContentWithErrorMsg extends AbstractTestUI
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/HorizontalLayoutTest.java b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/HorizontalLayoutTest.java
index d9ab760302..dda071df7c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/HorizontalLayoutTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/HorizontalLayoutTest.java
@@ -3,8 +3,8 @@ package com.vaadin.tests.components.orderedlayout;
import com.vaadin.tests.components.AbstractOrderedLayoutTest;
import com.vaadin.ui.HorizontalLayout;
-public class HorizontalLayoutTest extends
- AbstractOrderedLayoutTest<HorizontalLayout> {
+public class HorizontalLayoutTest
+ extends AbstractOrderedLayoutTest<HorizontalLayout> {
@Override
protected Class<HorizontalLayout> getTestClass() {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/HorizontalRelativeSizeWithoutExpand.java b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/HorizontalRelativeSizeWithoutExpand.java
index 8c5953104f..2b050a9c9a 100755
--- a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/HorizontalRelativeSizeWithoutExpand.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/HorizontalRelativeSizeWithoutExpand.java
@@ -25,7 +25,8 @@ public class HorizontalRelativeSizeWithoutExpand extends UI {
verticalLayout1.setSizeFull();
Tree tree = new Tree();
tree.setSizeFull();
- tree.setContainerDataSource(new BeanItemContainer<String>(String.class));
+ tree.setContainerDataSource(
+ new BeanItemContainer<String>(String.class));
String a = "aaaaaaaaaaaaaaaaaaaaaaaa";
String b = "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb";
String c = "ccccccccccccccccccccccccccccccccccccccccccccccccc";
diff --git a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/LayoutClickListenerTest.java b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/LayoutClickListenerTest.java
index 821a5dbb93..6742a5a8db 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/LayoutClickListenerTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/LayoutClickListenerTest.java
@@ -67,8 +67,8 @@ public class LayoutClickListenerTest extends TestBase {
if (clickedComponent == null) {
// Not over any child component
- LayoutClickListenerTest.this.addComponent(new Label(
- "The click was not over any component."));
+ LayoutClickListenerTest.this.addComponent(
+ new Label("The click was not over any component."));
} else {
// Over a child component
String message = "The click was over a "
diff --git a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/LayoutRenderTimeTest.java b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/LayoutRenderTimeTest.java
index 6235ed9617..5fef63ce86 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/LayoutRenderTimeTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/LayoutRenderTimeTest.java
@@ -31,15 +31,13 @@ public class LayoutRenderTimeTest extends LegacyApplication {
// row.setWidth("100%");
// row.setSpacing(true);
- Embedded icon = new Embedded(null, new ThemeResource(
- "../runo/icons/32/document.png"));
+ Embedded icon = new Embedded(null,
+ new ThemeResource("../runo/icons/32/document.png"));
// row.addComponent(icon);
// row.setComponentAlignment(icon, Alignment.MIDDLE_LEFT);
- Label text = new Label(
- "Row content #"
- + i
- + ". In pellentesque faucibus vestibulum. Nulla at nulla justo, eget luctus tortor. Nulla facilisi. Duis aliquet.");
+ Label text = new Label("Row content #" + i
+ + ". In pellentesque faucibus vestibulum. Nulla at nulla justo, eget luctus tortor. Nulla facilisi. Duis aliquet.");
// row.addComponent(text);
// row.setExpandRatio(text, 1);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/LayoutResizeTest.java b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/LayoutResizeTest.java
index 99c80fe4c1..aa945ce04f 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/LayoutResizeTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/LayoutResizeTest.java
@@ -32,17 +32,14 @@ public class LayoutResizeTest extends TestBase {
left.setSpacing(true);
left.setMargin(true);
- left.addComponent(new Label("<h2>Layout resize test</h2>",
- ContentMode.HTML));
+ left.addComponent(
+ new Label("<h2>Layout resize test</h2>", ContentMode.HTML));
Button resize = new Button("Resize to 700x400",
new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- event.getButton()
- .getUI()
- .getPage()
- .getJavaScript()
+ event.getButton().getUI().getPage().getJavaScript()
.execute(
"setTimeout(function() {window.resizeTo(700,400)}, 500)");
}
@@ -52,12 +49,8 @@ public class LayoutResizeTest extends TestBase {
resize = new Button("Resize to 900x600", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- event.getButton()
- .getUI()
- .getPage()
- .getJavaScript()
- .execute(
- "setTimeout(function() {window.resizeTo(900,600)}, 500)");
+ event.getButton().getUI().getPage().getJavaScript().execute(
+ "setTimeout(function() {window.resizeTo(900,600)}, 500)");
}
});
left.addComponent(resize);
@@ -105,15 +98,13 @@ public class LayoutResizeTest extends TestBase {
row.setWidth("100%");
row.setSpacing(true);
- Embedded icon = new Embedded(null, new ThemeResource(
- "../runo/icons/32/document.png"));
+ Embedded icon = new Embedded(null,
+ new ThemeResource("../runo/icons/32/document.png"));
row.addComponent(icon);
row.setComponentAlignment(icon, Alignment.MIDDLE_LEFT);
- Label text = new Label(
- "Row content #"
- + i
- + ". In pellentesque faucibus vestibulum. Nulla at nulla justo, eget luctus tortor. Nulla facilisi. Duis aliquet.");
+ Label text = new Label("Row content #" + i
+ + ". In pellentesque faucibus vestibulum. Nulla at nulla justo, eget luctus tortor. Nulla facilisi. Duis aliquet.");
row.addComponent(text);
row.setExpandRatio(text, 1);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/NestedLayoutCaptionHover.java b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/NestedLayoutCaptionHover.java
index 59e2b0936a..df706be46f 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/NestedLayoutCaptionHover.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/NestedLayoutCaptionHover.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ import com.vaadin.ui.VerticalLayout;
/**
* Test hovering over nested layout caption
- *
+ *
* @author Vaadin Ltd
*/
public class NestedLayoutCaptionHover extends AbstractTestUI {
@@ -30,8 +30,8 @@ public class NestedLayoutCaptionHover extends AbstractTestUI {
protected void setup(VaadinRequest request) {
VerticalLayout test = new VerticalLayout();
test.setCaption("inner layout");
- addComponent(new VerticalLayout(new VerticalLayout(new VerticalLayout(
- test))));
+ addComponent(new VerticalLayout(
+ new VerticalLayout(new VerticalLayout(test))));
}
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/OrderedLayoutCases.java b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/OrderedLayoutCases.java
index d7dbe11769..520e2d10d8 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/OrderedLayoutCases.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/OrderedLayoutCases.java
@@ -42,11 +42,12 @@ public class OrderedLayoutCases extends AbstractTestUI {
new ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
- setHeight(event.getProperty().getValue().toString());
+ setHeight(
+ event.getProperty().getValue().toString());
}
}, dimensionValues));
- addComponent(createSimpleSelector("Caption",
- new ValueChangeListener() {
+ addComponent(
+ createSimpleSelector("Caption", new ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
String value = event.getProperty().getValue()
@@ -54,7 +55,8 @@ public class OrderedLayoutCases extends AbstractTestUI {
if (value.length() == 0) {
setCaption(null);
} else if (value.equals("Long")) {
- setCaption("A rather long caption just to see what happens");
+ setCaption(
+ "A rather long caption just to see what happens");
} else {
setCaption(value);
}
@@ -133,40 +135,40 @@ public class OrderedLayoutCases extends AbstractTestUI {
sizeBar = new HorizontalLayout();
sizeBar.setSpacing(true);
- sizeBar.addComponent(createSimpleSelector("Layout width",
- new ValueChangeListener() {
+ sizeBar.addComponent(
+ createSimpleSelector("Layout width", new ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
- currentLayout.setWidth(event.getProperty().getValue()
- .toString());
+ currentLayout.setWidth(
+ event.getProperty().getValue().toString());
}
}, dimensionValues));
sizeBar.addComponent(createSimpleSelector("Layout height",
new ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
- currentLayout.setHeight(event.getProperty().getValue()
- .toString());
+ currentLayout.setHeight(
+ event.getProperty().getValue().toString());
}
}, dimensionValues));
- sizeBar.addComponent(createSimpleSelector("Spacing",
- new ValueChangeListener() {
+ sizeBar.addComponent(
+ createSimpleSelector("Spacing", new ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
- currentLayout.setSpacing(Boolean.parseBoolean(event
- .getProperty().getValue().toString()));
+ currentLayout.setSpacing(Boolean.parseBoolean(
+ event.getProperty().getValue().toString()));
}
}, "false", "true"));
- sizeBar.addComponent(createSimpleSelector("Margin",
- new ValueChangeListener() {
+ sizeBar.addComponent(
+ createSimpleSelector("Margin", new ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
- currentLayout.setMargin(Boolean.parseBoolean(event
- .getProperty().getValue().toString()));
+ currentLayout.setMargin(Boolean.parseBoolean(
+ event.getProperty().getValue().toString()));
}
}, "false", "true"));
- sizeBar.addComponent(createSimpleSelector("Direction",
- new ValueChangeListener() {
+ sizeBar.addComponent(
+ createSimpleSelector("Direction", new ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
Object value = event.getProperty().getValue();
@@ -206,8 +208,8 @@ public class OrderedLayoutCases extends AbstractTestUI {
}, "Horizontal", "Vertical"));
HorizontalLayout caseBar = new HorizontalLayout();
- caseBar.addComponent(new Button("Undefined without relative",
- new ClickListener() {
+ caseBar.addComponent(
+ new Button("Undefined without relative", new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
resetState();
@@ -220,8 +222,8 @@ public class OrderedLayoutCases extends AbstractTestUI {
setChildState(2, 2, 2);
}
}));
- caseBar.addComponent(new Button("Undefined with relative",
- new ClickListener() {
+ caseBar.addComponent(
+ new Button("Undefined with relative", new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
resetState();
@@ -229,8 +231,8 @@ public class OrderedLayoutCases extends AbstractTestUI {
setChildState(1, 0, 4);
}
}));
- caseBar.addComponent(new Button("Fixed with overflow",
- new ClickListener() {
+ caseBar.addComponent(
+ new Button("Fixed with overflow", new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
resetState();
@@ -240,8 +242,8 @@ public class OrderedLayoutCases extends AbstractTestUI {
setState(sizeBar, 3, 1);
}
}));
- caseBar.addComponent(new Button("Fixed with extra space",
- new ClickListener() {
+ caseBar.addComponent(
+ new Button("Fixed with extra space", new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
resetState();
@@ -258,8 +260,8 @@ public class OrderedLayoutCases extends AbstractTestUI {
}
}));
- caseBar.addComponent(new Button("Expand with alignment",
- new ClickListener() {
+ caseBar.addComponent(
+ new Button("Expand with alignment", new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
resetState();
@@ -276,8 +278,8 @@ public class OrderedLayoutCases extends AbstractTestUI {
}
}));
- caseBar.addComponent(new Button("Multiple expands",
- new ClickListener() {
+ caseBar.addComponent(
+ new Button("Multiple expands", new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
resetState();
@@ -299,8 +301,8 @@ public class OrderedLayoutCases extends AbstractTestUI {
}
}));
- caseBar.addComponent(new Button("Fixed + relative height",
- new ClickListener() {
+ caseBar.addComponent(
+ new Button("Fixed + relative height", new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
resetState();
@@ -317,8 +319,8 @@ public class OrderedLayoutCases extends AbstractTestUI {
}
}));
- caseBar.addComponent(new Button("Undefined + relative height",
- new ClickListener() {
+ caseBar.addComponent(
+ new Button("Undefined + relative height", new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
resetState();
@@ -331,8 +333,8 @@ public class OrderedLayoutCases extends AbstractTestUI {
}
}));
- caseBar.addComponent(new Button("Undefined + alignments",
- new ClickListener() {
+ caseBar.addComponent(
+ new Button("Undefined + alignments", new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
resetState();
@@ -399,12 +401,14 @@ public class OrderedLayoutCases extends AbstractTestUI {
}
}
- private void setChildState(int childIndex, int selectIndex, int valueIndex) {
+ private void setChildState(int childIndex, int selectIndex,
+ int valueIndex) {
Component child = currentLayout.getComponent(childIndex);
setState(child, selectIndex, valueIndex);
}
- private static void setState(Component container, int selectIndex, int value) {
+ private static void setState(Component container, int selectIndex,
+ int value) {
NativeSelect select = (NativeSelect) ((AbstractOrderedLayout) container)
.getComponent(selectIndex);
select.setValue(new ArrayList<Object>(select.getItemIds()).get(value));
diff --git a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/OrderedLayoutComponentOrdering.java b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/OrderedLayoutComponentOrdering.java
index 5857df20b1..114445c5ba 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/OrderedLayoutComponentOrdering.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/OrderedLayoutComponentOrdering.java
@@ -54,7 +54,8 @@ public class OrderedLayoutComponentOrdering extends TestBase {
move.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- hl.addComponentAsFirst(hl.getComponent(hl.getComponentCount() - 1));
+ hl.addComponentAsFirst(
+ hl.getComponent(hl.getComponentCount() - 1));
}
});
addComponent(move);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/OrderedLayoutInfiniteLayoutPasses.java b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/OrderedLayoutInfiniteLayoutPasses.java
index 9c54dbab8d..b45a96526a 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/OrderedLayoutInfiniteLayoutPasses.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/OrderedLayoutInfiniteLayoutPasses.java
@@ -22,7 +22,8 @@ public class OrderedLayoutInfiniteLayoutPasses extends UI {
setContent(layout);
Styles styles = Page.getCurrent().getStyles();
- styles.add(".my-separator {background-color: lightgray; min-height:2px;max-height:2px} ");
+ styles.add(
+ ".my-separator {background-color: lightgray; min-height:2px;max-height:2px} ");
}
private Button createOpenWindowButton() {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/RelativeChildrenWithoutExpand.java b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/RelativeChildrenWithoutExpand.java
index 59447919ef..65a091c7b6 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/RelativeChildrenWithoutExpand.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/RelativeChildrenWithoutExpand.java
@@ -24,8 +24,8 @@ public class RelativeChildrenWithoutExpand extends AbstractTestUI {
setContent(vl);
HorizontalLayout verticalExpand = new HorizontalLayout();
- verticalExpand.addComponent(new Button("Add relative child",
- new Button.ClickListener() {
+ verticalExpand.addComponent(
+ new Button("Add relative child", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
horizontalExpand.addComponent(new Label(loremIpsum), 0);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/SpacingLeak.java b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/SpacingLeak.java
index 647c187568..0705a14ee4 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/SpacingLeak.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/SpacingLeak.java
@@ -9,7 +9,7 @@ import com.vaadin.ui.VerticalLayout;
/**
* HorizontalLayout and VerticalLayout should not leak .v-spacing elements via
* listeners when removing components from a layout.
- *
+ *
* @since 7.1.12
* @author Vaadin Ltd
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/TooltipOnRequiredIndicator.java b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/TooltipOnRequiredIndicator.java
index 233049b0ba..683250e760 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/TooltipOnRequiredIndicator.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/TooltipOnRequiredIndicator.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -15,7 +15,7 @@
*/
/**
- *
+ *
*/
package com.vaadin.tests.components.orderedlayout;
@@ -29,7 +29,7 @@ public class TooltipOnRequiredIndicator extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -60,7 +60,7 @@ public class TooltipOnRequiredIndicator extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -70,7 +70,7 @@ public class TooltipOnRequiredIndicator extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VaadinTunesLayout.java b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VaadinTunesLayout.java
index 6fd7bf362b..70f17600c3 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VaadinTunesLayout.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VaadinTunesLayout.java
@@ -43,7 +43,8 @@ public class VaadinTunesLayout extends AbstractTestUI {
setContent(rootLayout);
// root.showNotification(
- // "This is an example of how you can do layouts in Vaadin.<br/>It is not a working sound player.",
+ // "This is an example of how you can do layouts in Vaadin.<br/>It is
+ // not a working sound player.",
// Notification.TYPE_HUMANIZED_MESSAGE);
// Our root window contains one VerticalLayout, let's make
@@ -140,7 +141,8 @@ public class VaadinTunesLayout extends AbstractTestUI {
// Place all components to the status layout and align them properly
status.addComponent(toggleVisualization);
- status.setComponentAlignment(toggleVisualization, Alignment.MIDDLE_LEFT);
+ status.setComponentAlignment(toggleVisualization,
+ Alignment.MIDDLE_LEFT);
status.addComponent(timeFromStart);
status.setComponentAlignment(timeFromStart, Alignment.BOTTOM_LEFT);
status.addComponent(trackDetails);
@@ -243,11 +245,11 @@ public class VaadinTunesLayout extends AbstractTestUI {
new NativeSelect());
// Lets populate the table with random data
- String[] tracks = new String[] { "Red Flag", "Millstone",
- "Not The Sun", "Breath", "Here We Are", "Deep Heaven",
- "Her Voice Resides", "Natural Tan", "End It All", "Kings",
- "Daylight Slaving", "Mad Man", "Resolve", "Teargas",
- "African Air", "Passing Bird" };
+ String[] tracks = new String[] { "Red Flag", "Millstone", "Not The Sun",
+ "Breath", "Here We Are", "Deep Heaven", "Her Voice Resides",
+ "Natural Tan", "End It All", "Kings", "Daylight Slaving",
+ "Mad Man", "Resolve", "Teargas", "African Air",
+ "Passing Bird" };
String[] times = new String[] { "4:12", "6:03", "5:43", "4:32", "3:42",
"4:45", "2:56", "9:34", "2:10", "3:44", "5:49", "6:30", "5:18",
"7:42", "3:13", "2:52" };
@@ -263,9 +265,8 @@ public class VaadinTunesLayout extends AbstractTestUI {
"Frames", "Fortress", "Phobia", "The Poison", "Manifesto",
"White Pony", "The Big Dirty" };
String[] genres = new String[] { "Rock", "Metal", "Hardcore", "Indie",
- "Pop", "Alternative", "Blues", "Jazz", "Hip Hop",
- "Electronica", "Punk", "Hard Rock", "Dance", "R'n'B", "Gospel",
- "Country" };
+ "Pop", "Alternative", "Blues", "Jazz", "Hip Hop", "Electronica",
+ "Punk", "Hard Rock", "Dance", "R'n'B", "Gospel", "Country" };
for (int i = 0; i < 1000; i++) {
NativeSelect s = new NativeSelect();
s.addItem("1 star");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VerticalLayoutFocusWithDOMChanges.java b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VerticalLayoutFocusWithDOMChanges.java
index d55765b5e4..f5a3175a37 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VerticalLayoutFocusWithDOMChanges.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VerticalLayoutFocusWithDOMChanges.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,8 +23,8 @@ import com.vaadin.ui.Button;
import com.vaadin.ui.TextField;
import com.vaadin.ui.VerticalLayout;
-public class VerticalLayoutFocusWithDOMChanges extends AbstractTestUI implements
- ValueChangeListener {
+public class VerticalLayoutFocusWithDOMChanges extends AbstractTestUI
+ implements ValueChangeListener {
Button dummyButton = new Button("Just a button");
TextField listenedTextField = new TextField();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VerticalLayoutTest.java b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VerticalLayoutTest.java
index 2298364c3f..bdc345fd26 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VerticalLayoutTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VerticalLayoutTest.java
@@ -3,8 +3,8 @@ package com.vaadin.tests.components.orderedlayout;
import com.vaadin.tests.components.AbstractOrderedLayoutTest;
import com.vaadin.ui.VerticalLayout;
-public class VerticalLayoutTest extends
- AbstractOrderedLayoutTest<VerticalLayout> {
+public class VerticalLayoutTest
+ extends AbstractOrderedLayoutTest<VerticalLayout> {
@Override
protected Class<VerticalLayout> getTestClass() {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VerticalRelativeSizeWithoutExpand.java b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VerticalRelativeSizeWithoutExpand.java
index 0ac9a008d2..3f22cb5e12 100755
--- a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VerticalRelativeSizeWithoutExpand.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VerticalRelativeSizeWithoutExpand.java
@@ -28,7 +28,8 @@ public class VerticalRelativeSizeWithoutExpand extends UI {
verticalLayout1.setSizeFull();
Tree tree = new Tree();
tree.setSizeFull();
- tree.setContainerDataSource(new BeanItemContainer<String>(String.class));
+ tree.setContainerDataSource(
+ new BeanItemContainer<String>(String.class));
String a = "aaaaaaaaaaaaaaaaaaaaaaaa";
String b = "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb";
String c = "ccccccccccccccccccccccccccccccccccccccccccccccccc";
diff --git a/uitest/src/main/java/com/vaadin/tests/components/page/PageTitle.java b/uitest/src/main/java/com/vaadin/tests/components/page/PageTitle.java
index 3979ede8c8..1beb1d4033 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/page/PageTitle.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/page/PageTitle.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/panel/BasicPanelTest.java b/uitest/src/main/java/com/vaadin/tests/components/panel/BasicPanelTest.java
index d9a9c14425..0665aabf45 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/panel/BasicPanelTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/panel/BasicPanelTest.java
@@ -18,7 +18,8 @@ public class BasicPanelTest extends TestBase {
private final Label scrollPosition = new Label();
private final Panel panel = new Panel("Panel caption") {
@Override
- public void changeVariables(Object source, Map<String, Object> variables) {
+ public void changeVariables(Object source,
+ Map<String, Object> variables) {
super.changeVariables(source, variables);
updateLabelText();
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/panel/PanelChangeContents.java b/uitest/src/main/java/com/vaadin/tests/components/panel/PanelChangeContents.java
index 3f953bf73a..1cb33fc523 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/panel/PanelChangeContents.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/panel/PanelChangeContents.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,8 +25,8 @@ import com.vaadin.ui.Label;
import com.vaadin.ui.Panel;
import com.vaadin.ui.VerticalLayout;
-public class PanelChangeContents extends AbstractTestUI implements
- ClickListener {
+public class PanelChangeContents extends AbstractTestUI
+ implements ClickListener {
VerticalLayout stats = new VerticalLayout();
VerticalLayout companies = new VerticalLayout();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/panel/PanelClickListenerRelativeCoordinates.java b/uitest/src/main/java/com/vaadin/tests/components/panel/PanelClickListenerRelativeCoordinates.java
index 1dad8d44b0..7cc1d27e43 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/panel/PanelClickListenerRelativeCoordinates.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/panel/PanelClickListenerRelativeCoordinates.java
@@ -17,10 +17,8 @@ public class PanelClickListenerRelativeCoordinates extends TestBase {
@Override
public void click(ClickEvent event) {
- getMainWindow()
- .showNotification(
- "" + event.getRelativeX() + ", "
- + event.getRelativeY());
+ getMainWindow().showNotification("" + event.getRelativeX()
+ + ", " + event.getRelativeY());
}
});
addComponent(panel);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/panel/PanelConcurrentModificationException.java b/uitest/src/main/java/com/vaadin/tests/components/panel/PanelConcurrentModificationException.java
index e05678b7c8..9aa173f195 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/panel/PanelConcurrentModificationException.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/panel/PanelConcurrentModificationException.java
@@ -24,12 +24,12 @@ public class PanelConcurrentModificationException extends TestBase {
panelLayout.addComponent(new Label("Label"));
}
}));
- addComponent(new Button("Or click here first",
- new Button.ClickListener() {
+ addComponent(
+ new Button("Or click here first", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- Notification
- .show("It is now safe to click the other button");
+ Notification.show(
+ "It is now safe to click the other button");
}
}));
addComponent(panel);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/panel/PanelRemoveShortcutListener.java b/uitest/src/main/java/com/vaadin/tests/components/panel/PanelRemoveShortcutListener.java
index 28ebf0e2b2..ff786a029a 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/panel/PanelRemoveShortcutListener.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/panel/PanelRemoveShortcutListener.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import com.vaadin.ui.TextField;
/**
* Test for removing a shortcut listener from Panel.
- *
+ *
* @author Vaadin Ltd
*/
public class PanelRemoveShortcutListener extends AbstractTestUI {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/panel/PanelShouldRemoveActionHandler.java b/uitest/src/main/java/com/vaadin/tests/components/panel/PanelShouldRemoveActionHandler.java
index d0a86cd67f..0b0d97f03f 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/panel/PanelShouldRemoveActionHandler.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/panel/PanelShouldRemoveActionHandler.java
@@ -70,7 +70,8 @@ public class PanelShouldRemoveActionHandler extends TestBase {
public void remove() {
panel.setCaption(panel.getCaption() + " - Removed handler");
- panel.removeActionHandler(actionHandlers.remove(actionHandlers.size() - 1));
+ panel.removeActionHandler(
+ actionHandlers.remove(actionHandlers.size() - 1));
}
private List<Handler> actionHandlers = new ArrayList<Handler>();
@@ -87,7 +88,8 @@ public class PanelShouldRemoveActionHandler extends TestBase {
}
@Override
- public void handleAction(Action action, Object sender, Object target) {
+ public void handleAction(Action action, Object sender,
+ Object target) {
getMainWindow().showNotification(
"Handling action " + action.getCaption());
}
@@ -108,7 +110,8 @@ public class PanelShouldRemoveActionHandler extends TestBase {
}
@Override
- public void handleAction(Action action, Object sender, Object target) {
+ public void handleAction(Action action, Object sender,
+ Object target) {
getMainWindow().showNotification(
"Handling action " + action.getCaption());
}
@@ -121,8 +124,8 @@ public class PanelShouldRemoveActionHandler extends TestBase {
private void addHandler(Handler actionHandler) {
actionHandlers.add(actionHandler);
panel.addActionHandler(actionHandler);
- panel.setCaption("A panel with " + actionHandlers.size()
- + " action handlers");
+ panel.setCaption(
+ "A panel with " + actionHandlers.size() + " action handlers");
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/panel/UndefinedSizeScrollbars.java b/uitest/src/main/java/com/vaadin/tests/components/panel/UndefinedSizeScrollbars.java
index ef535baa0a..03ccc8ead3 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/panel/UndefinedSizeScrollbars.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/panel/UndefinedSizeScrollbars.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/panel/WebkitScrollbarTest.java b/uitest/src/main/java/com/vaadin/tests/components/panel/WebkitScrollbarTest.java
index 2c4bac03b0..7a39edf576 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/panel/WebkitScrollbarTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/panel/WebkitScrollbarTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/popupview/DisabledPopupView.java b/uitest/src/main/java/com/vaadin/tests/components/popupview/DisabledPopupView.java
index ecce1781a5..cc732f1c82 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/popupview/DisabledPopupView.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/popupview/DisabledPopupView.java
@@ -9,7 +9,8 @@ public class DisabledPopupView extends AbstractTestUI {
@Override
protected void setup(VaadinRequest request) {
- PopupView popupView = new PopupView("Disabled Popup", new Button("Hi!"));
+ PopupView popupView = new PopupView("Disabled Popup",
+ new Button("Hi!"));
popupView.setEnabled(false);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewAndFragment.java b/uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewAndFragment.java
index 8178cfdbe2..6289d7a76e 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewAndFragment.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewAndFragment.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewCaption.java b/uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewCaption.java
index 2bf587ba97..18a99b8a06 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewCaption.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewCaption.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ import com.vaadin.ui.Label;
import com.vaadin.ui.PopupView;
/**
- *
+ *
* @author Vaadin Ltd
*/
public class PopupViewCaption extends AbstractTestUI {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewClickShortcut.java b/uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewClickShortcut.java
index a5441f38b1..24b32a9c96 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewClickShortcut.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewClickShortcut.java
@@ -24,8 +24,8 @@ public class PopupViewClickShortcut extends TestBase {
sub.center();
getMainWindow().addWindow(sub);
addComponent(log);
- addComponent(new PopupView("Show popup table", makeTable("Popup",
- KeyCode.P)));
+ addComponent(new PopupView("Show popup table",
+ makeTable("Popup", KeyCode.P)));
addComponent(makeTable("Main window", KeyCode.M));
((ComponentContainer) sub.getContent()).addComponent(new PopupView(
"Show popup table", makeTable("Subwindow popup", KeyCode.U)));
@@ -45,17 +45,18 @@ public class PopupViewClickShortcut extends TestBase {
l.setCaption(caption);
l.setWidth(null);
- Button b = new Button("Submit " + caption + " (Ctrl+Alt+"
- + (char) keyCode + ")", new Button.ClickListener() {
- private int i = 5;
+ Button b = new Button(
+ "Submit " + caption + " (Ctrl+Alt+" + (char) keyCode + ")",
+ new Button.ClickListener() {
+ private int i = 5;
- @Override
- public void buttonClick(ClickEvent event) {
- log.log("Submitted from "
- + event.getButton().getParent().getCaption());
- t.addItem(new String[] { "added " + i++ }, i);
- }
- });
+ @Override
+ public void buttonClick(ClickEvent event) {
+ log.log("Submitted from "
+ + event.getButton().getParent().getCaption());
+ t.addItem(new String[] { "added " + i++ }, i);
+ }
+ });
b.setClickShortcut(keyCode, ModifierKey.CTRL, ModifierKey.ALT);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewInEmbeddedApplication.java b/uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewInEmbeddedApplication.java
index d19f98124e..08cc060191 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewInEmbeddedApplication.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewInEmbeddedApplication.java
@@ -11,8 +11,8 @@ public class PopupViewInEmbeddedApplication extends TestBase {
@Override
protected void setup() {
- PopupView pop = new PopupView("Click me!", new Label(
- "I popped up, woohoo!"));
+ PopupView pop = new PopupView("Click me!",
+ new Label("I popped up, woohoo!"));
addComponent(pop);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewLabelResized.java b/uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewLabelResized.java
index 2776c63e9f..43e3aebb06 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewLabelResized.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewLabelResized.java
@@ -26,10 +26,10 @@ public class PopupViewLabelResized extends TestBase {
gl.addComponent(expander, 1, 0);
gl.setColumnExpandRatio(1, 1);
- gl.addComponent(
- new PopupView("Click here to popup", new Label("test")), 0, 0);
- gl.addComponent(
- new PopupView("Click here to popup", new Label("test")), 2, 0);
+ gl.addComponent(new PopupView("Click here to popup", new Label("test")),
+ 0, 0);
+ gl.addComponent(new PopupView("Click here to popup", new Label("test")),
+ 2, 0);
addComponent(gl);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewNullValues.java b/uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewNullValues.java
index 75f95977bd..7e317bcb20 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewNullValues.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewNullValues.java
@@ -27,15 +27,14 @@ public class PopupViewNullValues extends TestBase {
});
} catch (Exception e) {
- getMainWindow()
- .showNotification(
- "Error, 'null content' should not throw an exception at this point",
- Notification.TYPE_ERROR_MESSAGE);
+ getMainWindow().showNotification(
+ "Error, 'null content' should not throw an exception at this point",
+ Notification.TYPE_ERROR_MESSAGE);
}
try {
- pv[1] = new PopupView(null, new TextField(
- "Empty html, contains component"));
+ pv[1] = new PopupView(null,
+ new TextField("Empty html, contains component"));
addComponent(pv[1]);
b[1] = new Button("Open popupview 2", new ClickListener() {
@@ -46,10 +45,9 @@ public class PopupViewNullValues extends TestBase {
});
} catch (Exception e) {
- getMainWindow()
- .showNotification(
- "Error, 'null html', should not throw an exception at this point",
- Notification.TYPE_ERROR_MESSAGE);
+ getMainWindow().showNotification(
+ "Error, 'null html', should not throw an exception at this point",
+ Notification.TYPE_ERROR_MESSAGE);
}
try {
@@ -64,14 +62,13 @@ public class PopupViewNullValues extends TestBase {
});
} catch (Exception e) {
- getMainWindow()
- .showNotification(
- "Error, 'null html, null content', should not throw an exception at this point",
- Notification.TYPE_ERROR_MESSAGE);
+ getMainWindow().showNotification(
+ "Error, 'null html, null content', should not throw an exception at this point",
+ Notification.TYPE_ERROR_MESSAGE);
}
try {
- pv[3] = new PopupView("Popupview 4 - has component", new TextField(
- "This is the content of popupview 4"));
+ pv[3] = new PopupView("Popupview 4 - has component",
+ new TextField("This is the content of popupview 4"));
addComponent(pv[3]);
b[3] = new Button("Open popupview 4", new ClickListener() {
@@ -82,10 +79,9 @@ public class PopupViewNullValues extends TestBase {
});
} catch (Exception e) {
- getMainWindow()
- .showNotification(
- "Error, 'null html, null content', should not throw an exception at this point",
- Notification.TYPE_ERROR_MESSAGE);
+ getMainWindow().showNotification(
+ "Error, 'null html, null content', should not throw an exception at this point",
+ Notification.TYPE_ERROR_MESSAGE);
}
addComponent(b[0]);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewResizeWhileOpen.java b/uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewResizeWhileOpen.java
index cf3854ee69..70264c230c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewResizeWhileOpen.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewResizeWhileOpen.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.ui.VerticalLayout;
/**
* Resizing PopupView's popup component while it is visible should also resize
* the drop shadow of the overlay.
- *
+ *
* @author Vaadin Ltd
*/
public class PopupViewResizeWhileOpen extends AbstractTestUI {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewShortcutActionHandler.java b/uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewShortcutActionHandler.java
index ca91597aa2..6059c7756f 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewShortcutActionHandler.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewShortcutActionHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,7 +27,7 @@ import com.vaadin.ui.TextField;
/**
* Test UI to check availability of shortcut action listener in the popup view
* oeverlay component.
- *
+ *
* @author Vaadin Ltd
*/
public class PopupViewShortcutActionHandler extends AbstractTestUI {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewWithExtension.java b/uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewWithExtension.java
index 04bbf6df0a..b911afbbc1 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewWithExtension.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/popupview/PopupViewWithExtension.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -26,7 +26,7 @@ import com.vaadin.ui.PopupView;
* collection but is not inside the getChildComponents() collection. Popup view
* should use getChildComponents() to avoid exception when extension is returned
* by getChildren().
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/components/popupview/ReopenPopupView.java b/uitest/src/main/java/com/vaadin/tests/components/popupview/ReopenPopupView.java
index 979bafc688..bd2ca5a2c5 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/popupview/ReopenPopupView.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/popupview/ReopenPopupView.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,8 +28,8 @@ public class ReopenPopupView extends AbstractTestUI {
@Override
protected void setup(VaadinRequest request) {
addComponent(log);
- addComponent(new PopupView("PopupView", new Button("Button",
- new Button.ClickListener() {
+ addComponent(new PopupView("PopupView",
+ new Button("Button", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
log.log("Button clicked");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressBarStaticReindeer.java b/uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressBarStaticReindeer.java
index 6cf7fb0ded..1840c859c5 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressBarStaticReindeer.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressBarStaticReindeer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressBarStaticRuno.java b/uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressBarStaticRuno.java
index 4e1ff7c886..9962f5ca13 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressBarStaticRuno.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressBarStaticRuno.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressBarTest.java b/uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressBarTest.java
index ce51184e7d..e9243d798c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressBarTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressBarTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -65,8 +65,8 @@ public class ProgressBarTest extends AbstractTestUI {
}
}));
- addComponent(new Button("Use ProgressIndicator",
- new Button.ClickListener() {
+ addComponent(
+ new Button("Use ProgressIndicator", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
useComponent(new ProgressIndicator());
diff --git a/uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressIndicatorInvisible.java b/uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressIndicatorInvisible.java
index 4542d0c6c8..6bb9c73411 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressIndicatorInvisible.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressIndicatorInvisible.java
@@ -25,8 +25,8 @@ public class ProgressIndicatorInvisible extends TestBase {
@Override
public void buttonClick(ClickEvent event) {
pi.setVisible(!pi.isVisible());
- event.getButton().setCaption(
- (pi.isVisible() ? "Hide" : "Show")
+ event.getButton()
+ .setCaption((pi.isVisible() ? "Hide" : "Show")
+ " progress indicator");
}
@@ -47,19 +47,19 @@ public class ProgressIndicatorInvisible extends TestBase {
});
addComponent(disableProgressIndicator);
- Button removeProgressIndicator = new Button(
- "Remove progress indicator", new ClickListener() {
+ Button removeProgressIndicator = new Button("Remove progress indicator",
+ new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
if (pi.getParent() != null) {
lo.removeComponent(pi);
- event.getButton().setCaption(
- "Add progress indicator");
+ event.getButton()
+ .setCaption("Add progress indicator");
} else {
lo.addComponent(pi);
- event.getButton().setCaption(
- "Remove progress indicator");
+ event.getButton()
+ .setCaption("Remove progress indicator");
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressIndicatorTest.java b/uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressIndicatorTest.java
index 5b3a931e5b..284cabfeca 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressIndicatorTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/progressindicator/ProgressIndicatorTest.java
@@ -20,7 +20,8 @@ import java.util.LinkedHashMap;
import com.vaadin.tests.components.abstractfield.AbstractFieldTest;
import com.vaadin.ui.ProgressIndicator;
-public class ProgressIndicatorTest extends AbstractFieldTest<ProgressIndicator> {
+public class ProgressIndicatorTest
+ extends AbstractFieldTest<ProgressIndicator> {
ProgressIndicator progress = new ProgressIndicator();
Command<ProgressIndicator, Float> setValueCommand = new Command<ProgressIndicator, Float>() {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/richtextarea/RichTextAreaPreventsTextFieldAccess.java b/uitest/src/main/java/com/vaadin/tests/components/richtextarea/RichTextAreaPreventsTextFieldAccess.java
index c3433c3054..25af7ccec7 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/richtextarea/RichTextAreaPreventsTextFieldAccess.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/richtextarea/RichTextAreaPreventsTextFieldAccess.java
@@ -17,14 +17,13 @@ public class RichTextAreaPreventsTextFieldAccess extends TestBase {
@Override
protected void setup() {
- Label label = new Label(
- "Steps to reproduce problem with IE8. "
- + "<br> Step 1: Click on the 'Open RichTextArea-Dialog' button "
- + "<br> Step 2: Write something in the RichTextArea. "
- + "Do not press outside the textfield for the "
- + "richTextArea. <br> Step 3: Press the 'removeWindowButton' "
- + "<br> Now you cannot write in the TextField on this page "
- + "<br> Resetting the focus to textfield explicitly, works around the issue");
+ Label label = new Label("Steps to reproduce problem with IE8. "
+ + "<br> Step 1: Click on the 'Open RichTextArea-Dialog' button "
+ + "<br> Step 2: Write something in the RichTextArea. "
+ + "Do not press outside the textfield for the "
+ + "richTextArea. <br> Step 3: Press the 'removeWindowButton' "
+ + "<br> Now you cannot write in the TextField on this page "
+ + "<br> Resetting the focus to textfield explicitly, works around the issue");
label.setContentMode(ContentMode.HTML);
addComponent(label);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/richtextarea/RichTextAreaRelativeHeightResize.java b/uitest/src/main/java/com/vaadin/tests/components/richtextarea/RichTextAreaRelativeHeightResize.java
index 870c6cb8cb..9d981a7f45 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/richtextarea/RichTextAreaRelativeHeightResize.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/richtextarea/RichTextAreaRelativeHeightResize.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/select/AbstractSelectTestCase.java b/uitest/src/main/java/com/vaadin/tests/components/select/AbstractSelectTestCase.java
index b0c6c08a62..733aac1df3 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/select/AbstractSelectTestCase.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/select/AbstractSelectTestCase.java
@@ -15,8 +15,8 @@ import com.vaadin.server.Resource;
import com.vaadin.tests.components.abstractfield.AbstractFieldTest;
import com.vaadin.ui.AbstractSelect;
-public abstract class AbstractSelectTestCase<T extends AbstractSelect> extends
- AbstractFieldTest<T> implements ItemClickListener {
+public abstract class AbstractSelectTestCase<T extends AbstractSelect>
+ extends AbstractFieldTest<T> implements ItemClickListener {
public static final String CATEGORY_DATA_SOURCE = "Data source";
@@ -67,7 +67,8 @@ public abstract class AbstractSelectTestCase<T extends AbstractSelect> extends
}
protected void createMultiSelectCheckbox(String category) {
- createBooleanAction("Multi select", category, false, multiselectCommand);
+ createBooleanAction("Multi select", category, false,
+ multiselectCommand);
}
@@ -101,8 +102,8 @@ public abstract class AbstractSelectTestCase<T extends AbstractSelect> extends
for (int i = 1; i <= items; i++) {
Item item = c.addItem("Item " + i);
for (int j = 1; j <= properties; j++) {
- item.getItemProperty("Property " + j).setValue(
- "Item " + i + "," + j);
+ item.getItemProperty("Property " + j)
+ .setValue("Item " + i + "," + j);
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/select/ComboBoxAddWhileFiltering.java b/uitest/src/main/java/com/vaadin/tests/components/select/ComboBoxAddWhileFiltering.java
index 470c97442f..9004e9feaf 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/select/ComboBoxAddWhileFiltering.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/select/ComboBoxAddWhileFiltering.java
@@ -9,7 +9,7 @@ import com.vaadin.ui.ComboBox;
/**
* TODO can't reproduce the issue with this test case, possibly need some
* enhancements.
- *
+ *
*/
public class ComboBoxAddWhileFiltering extends TestBase {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/select/EnumSelect.java b/uitest/src/main/java/com/vaadin/tests/components/select/EnumSelect.java
index 5976952f8c..8592037c12 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/select/EnumSelect.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/select/EnumSelect.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/select/OptionGroupBaseSelects.java b/uitest/src/main/java/com/vaadin/tests/components/select/OptionGroupBaseSelects.java
index 2f58e35dc7..d934647958 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/select/OptionGroupBaseSelects.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/select/OptionGroupBaseSelects.java
@@ -14,7 +14,8 @@ import com.vaadin.ui.NativeSelect;
import com.vaadin.ui.OptionGroup;
import com.vaadin.ui.TwinColSelect;
-public class OptionGroupBaseSelects extends ComponentTestCase<HorizontalLayout> {
+public class OptionGroupBaseSelects
+ extends ComponentTestCase<HorizontalLayout> {
private HorizontalLayout layout;
@@ -66,31 +67,32 @@ public class OptionGroupBaseSelects extends ComponentTestCase<HorizontalLayout>
layout = new HorizontalLayout();
layout.setSpacing(true);
- layout.addComponent(createSelect(
- new ListSelect("List Select, enabled"), true));
- layout.addComponent(createSelect(
- new ListSelect("List Select, disabled"), false));
+ layout.addComponent(
+ createSelect(new ListSelect("List Select, enabled"), true));
+ layout.addComponent(
+ createSelect(new ListSelect("List Select, disabled"), false));
- layout.addComponent(createSelect(new NativeSelect(
- "Native Select, enabled"), true));
- layout.addComponent(createSelect(new NativeSelect(
- "Native Select, disabled"), false));
+ layout.addComponent(
+ createSelect(new NativeSelect("Native Select, enabled"), true));
+ layout.addComponent(createSelect(
+ new NativeSelect("Native Select, disabled"), false));
- layout.addComponent(createSelect(new OptionGroup(
- "Option Group, enabled"), true));
- layout.addComponent(createSelect(new OptionGroup(
- "Option Group, disabled"), false));
+ layout.addComponent(
+ createSelect(new OptionGroup("Option Group, enabled"), true));
+ layout.addComponent(
+ createSelect(new OptionGroup("Option Group, disabled"), false));
- layout.addComponent(createSelect(new TwinColSelect(
- "Twin Column Select, enabled"), true));
- layout.addComponent(createSelect(new TwinColSelect(
- "Twin Column Select, disabled"), false));
+ layout.addComponent(createSelect(
+ new TwinColSelect("Twin Column Select, enabled"), true));
+ layout.addComponent(createSelect(
+ new TwinColSelect("Twin Column Select, disabled"), false));
addTestComponent(layout);
}
- private AbstractSelect createSelect(AbstractSelect select, boolean enabled) {
+ private AbstractSelect createSelect(AbstractSelect select,
+ boolean enabled) {
select.addContainerProperty(CAPTION, String.class, null);
for (int i = 0; i < 10; i++) {
select.addItem("" + i).getItemProperty(CAPTION)
diff --git a/uitest/src/main/java/com/vaadin/tests/components/select/SelectDisplaysOldValue.java b/uitest/src/main/java/com/vaadin/tests/components/select/SelectDisplaysOldValue.java
index 77c187ff60..a7752f6033 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/select/SelectDisplaysOldValue.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/select/SelectDisplaysOldValue.java
@@ -75,7 +75,8 @@ public class SelectDisplaysOldValue extends TestBase {
}
private void buildSlaveDropdown(Integer masterId) {
- IndexedContainer slaveOptionContainer = initSlaveOptionContainer(masterId);
+ IndexedContainer slaveOptionContainer = initSlaveOptionContainer(
+ masterId);
slaveComboBox = new Select(SLAVE_COMBO_BOX_CAPTION,
slaveOptionContainer);
configureSlaveOptionDropdown();
@@ -91,8 +92,8 @@ public class SelectDisplaysOldValue extends TestBase {
for (Integer optionId : controllerOptionMap.keySet()) {
itemAdded = containerToReturn.addItem(optionId);
- itemAdded.getItemProperty(NAME_PROPERTY_ID).setValue(
- controllerOptionMap.get(optionId));
+ itemAdded.getItemProperty(NAME_PROPERTY_ID)
+ .setValue(controllerOptionMap.get(optionId));
}
return containerToReturn;
@@ -139,12 +140,13 @@ public class SelectDisplaysOldValue extends TestBase {
System.out.println("Slave value: " + slaveComboBox.getValue());
}
- private class ControllerUpdatedListener implements
- Property.ValueChangeListener {
+ private class ControllerUpdatedListener
+ implements Property.ValueChangeListener {
@Override
- public void valueChange(Property.ValueChangeEvent valueChangeEvent) {
- refreshSlaveDropdown((Integer) valueChangeEvent.getProperty()
- .getValue());
+ public void valueChange(
+ Property.ValueChangeEvent valueChangeEvent) {
+ refreshSlaveDropdown(
+ (Integer) valueChangeEvent.getProperty().getValue());
}
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/select/SelectIconPlacement.java b/uitest/src/main/java/com/vaadin/tests/components/select/SelectIconPlacement.java
index 0cba74b941..0b3301bb4e 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/select/SelectIconPlacement.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/select/SelectIconPlacement.java
@@ -19,8 +19,8 @@ public class SelectIconPlacement extends TestBase {
mySelect = new Select("Width: " + (width == null ? "auto" : width));
String bar = "Only item";
mySelect.addItem(bar);
- mySelect.setItemIcon(bar, new ThemeResource("common/icons/" + icon
- + "?w=" + width));
+ mySelect.setItemIcon(bar,
+ new ThemeResource("common/icons/" + icon + "?w=" + width));
mySelect.select(bar);
mySelect.setWidth(width);
addComponent(mySelect);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/select/SelectItemCaptionRefresh.java b/uitest/src/main/java/com/vaadin/tests/components/select/SelectItemCaptionRefresh.java
index 458bfda6fa..286221e7ad 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/select/SelectItemCaptionRefresh.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/select/SelectItemCaptionRefresh.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -37,7 +37,7 @@ public class SelectItemCaptionRefresh extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -54,7 +54,7 @@ public class SelectItemCaptionRefresh extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -64,7 +64,7 @@ public class SelectItemCaptionRefresh extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/select/SelectWithIntegers.java b/uitest/src/main/java/com/vaadin/tests/components/select/SelectWithIntegers.java
index 3012105ae9..cfb18defb0 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/select/SelectWithIntegers.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/select/SelectWithIntegers.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/select/StylingPopupOpener.java b/uitest/src/main/java/com/vaadin/tests/components/select/StylingPopupOpener.java
index b97231ae8e..baa06b86a8 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/select/StylingPopupOpener.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/select/StylingPopupOpener.java
@@ -10,10 +10,8 @@ public class StylingPopupOpener extends TestBase {
@Override
protected void setup() {
- TestUtils
- .injectCSS(
- getMainWindow(),
- ".v-filterselect-mystyle .v-filterselect-button { width: 50px; background-color: red; } ");
+ TestUtils.injectCSS(getMainWindow(),
+ ".v-filterselect-mystyle .v-filterselect-button { width: 50px; background-color: red; } ");
final Select select = new Select();
addComponent(select);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/slider/HiddenSliderHandle.java b/uitest/src/main/java/com/vaadin/tests/components/slider/HiddenSliderHandle.java
index 105c20f7c6..e6e33ff942 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/slider/HiddenSliderHandle.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/slider/HiddenSliderHandle.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/slider/SliderDisable.java b/uitest/src/main/java/com/vaadin/tests/components/slider/SliderDisable.java
index a15e0d95ae..afe5ddb881 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/slider/SliderDisable.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/slider/SliderDisable.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/slider/SliderFeedback.java b/uitest/src/main/java/com/vaadin/tests/components/slider/SliderFeedback.java
index f28dfc8f79..2d944003f7 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/slider/SliderFeedback.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/slider/SliderFeedback.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/slider/SliderPrimaryStyleName.java b/uitest/src/main/java/com/vaadin/tests/components/slider/SliderPrimaryStyleName.java
index 00e1713222..1c0716fdce 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/slider/SliderPrimaryStyleName.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/slider/SliderPrimaryStyleName.java
@@ -14,8 +14,8 @@ public class SliderPrimaryStyleName extends TestBase {
slider.setPrimaryStyleName("my-slider");
addComponent(slider);
- addComponent(new Button("Change primary style",
- new Button.ClickListener() {
+ addComponent(
+ new Button("Change primary style", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
slider.setPrimaryStyleName("my-second-slider");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/slider/SliderResize.java b/uitest/src/main/java/com/vaadin/tests/components/slider/SliderResize.java
index 55ed56299c..6c1c296d25 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/slider/SliderResize.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/slider/SliderResize.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/slider/SliderUpdateFromValueChange.java b/uitest/src/main/java/com/vaadin/tests/components/slider/SliderUpdateFromValueChange.java
index 89f834a42f..d53799fc9d 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/slider/SliderUpdateFromValueChange.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/slider/SliderUpdateFromValueChange.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -15,7 +15,7 @@
*/
/**
- *
+ *
*/
package com.vaadin.tests.components.slider;
@@ -27,7 +27,7 @@ import com.vaadin.ui.Slider;
/**
* Testcase for #12133
- *
+ *
* @author Vaadin Ltd
*/
public class SliderUpdateFromValueChange extends AbstractTestUI {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/splitpanel/AbstractSplitPanelTest.java b/uitest/src/main/java/com/vaadin/tests/components/splitpanel/AbstractSplitPanelTest.java
index 7c0648876b..5fa6860c34 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/splitpanel/AbstractSplitPanelTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/splitpanel/AbstractSplitPanelTest.java
@@ -8,17 +8,19 @@ import com.vaadin.ui.AbstractSplitPanel.SplitterClickEvent;
import com.vaadin.ui.AbstractSplitPanel.SplitterClickListener;
public abstract class AbstractSplitPanelTest<T extends AbstractSplitPanel>
- extends AbstractComponentContainerTest<T> implements
- SplitterClickListener {
+ extends AbstractComponentContainerTest<T>
+ implements SplitterClickListener {
private Command<T, Boolean> splitterClickListenerCommand = new Command<T, Boolean>() {
@Override
public void execute(T c, Boolean value, Object data) {
if (value) {
- c.addListener((SplitterClickListener) AbstractSplitPanelTest.this);
+ c.addListener(
+ (SplitterClickListener) AbstractSplitPanelTest.this);
} else {
- c.removeListener((SplitterClickListener) AbstractSplitPanelTest.this);
+ c.removeListener(
+ (SplitterClickListener) AbstractSplitPanelTest.this);
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/splitpanel/HorizontalSplitPanelHeight.java b/uitest/src/main/java/com/vaadin/tests/components/splitpanel/HorizontalSplitPanelHeight.java
index 4da5430cb1..1e6dcbe7ca 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/splitpanel/HorizontalSplitPanelHeight.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/splitpanel/HorizontalSplitPanelHeight.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.ui.VerticalSplitPanel;
/**
* Test UI for horizontal split panel height.
- *
+ *
* @author Vaadin Ltd
*/
public class HorizontalSplitPanelHeight extends AbstractTestUI {
@@ -35,7 +35,8 @@ public class HorizontalSplitPanelHeight extends AbstractTestUI {
getLayout().setMargin(new MarginInfo(true, false, false, false));
HorizontalSplitPanel panel = new HorizontalSplitPanel();
- panel.setCaption("Horizontal 1 - no first component, label as second component");
+ panel.setCaption(
+ "Horizontal 1 - no first component, label as second component");
panel.setId("Horizontal 1");
Label label = new Label("Label");
label.addStyleName("target");
@@ -44,7 +45,8 @@ public class HorizontalSplitPanelHeight extends AbstractTestUI {
addComponent(panel);
panel = new HorizontalSplitPanel();
- panel.setCaption("Horizontal 2 - button as first component, label as second component");
+ panel.setCaption(
+ "Horizontal 2 - button as first component, label as second component");
panel.setId("Horizontal 2");
label = new Label("Label");
label.addStyleName("target");
@@ -54,7 +56,8 @@ public class HorizontalSplitPanelHeight extends AbstractTestUI {
addComponent(panel);
panel = new HorizontalSplitPanel();
- panel.setCaption("Horizontal 3 - fixed height, no first component, label as second component");
+ panel.setCaption(
+ "Horizontal 3 - fixed height, no first component, label as second component");
panel.setId("Horizontal 3");
label = new Label("Label");
label.addStyleName("target");
@@ -64,7 +67,8 @@ public class HorizontalSplitPanelHeight extends AbstractTestUI {
addComponent(panel);
VerticalSplitPanel vPanel = new VerticalSplitPanel();
- vPanel.setCaption("Vertical 1 - no first component, label as second component");
+ vPanel.setCaption(
+ "Vertical 1 - no first component, label as second component");
vPanel.setId("Vertical 1");
vPanel.setHeight(100, Unit.PIXELS);
Label vLabel = new Label("Label");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/splitpanel/HorizontalSplitPanels.java b/uitest/src/main/java/com/vaadin/tests/components/splitpanel/HorizontalSplitPanels.java
index a330581f22..a9c2d6bb6f 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/splitpanel/HorizontalSplitPanels.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/splitpanel/HorizontalSplitPanels.java
@@ -2,8 +2,8 @@ package com.vaadin.tests.components.splitpanel;
import com.vaadin.ui.HorizontalSplitPanel;
-public class HorizontalSplitPanels extends
- AbstractSplitPanelTest<HorizontalSplitPanel> {
+public class HorizontalSplitPanels
+ extends AbstractSplitPanelTest<HorizontalSplitPanel> {
@Override
protected Class<HorizontalSplitPanel> getTestClass() {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/splitpanel/RetainSplitterPositionWhenOutOfBounds.java b/uitest/src/main/java/com/vaadin/tests/components/splitpanel/RetainSplitterPositionWhenOutOfBounds.java
index ee5a1a62e7..f4caac67ca 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/splitpanel/RetainSplitterPositionWhenOutOfBounds.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/splitpanel/RetainSplitterPositionWhenOutOfBounds.java
@@ -1,12 +1,12 @@
/*
* Copyright 2012 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelDuplicateStyleName.java b/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelDuplicateStyleName.java
index e6079dba60..d36a179dd4 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelDuplicateStyleName.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelDuplicateStyleName.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.ui.VerticalSplitPanel;
/**
* Test UI for duplicate primary style name in SplitPanel.
- *
+ *
* @author Vaadin Ltd
*/
public class SplitPanelDuplicateStyleName extends AbstractTestUIWithLog {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelExtraScrollbars.java b/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelExtraScrollbars.java
index 7328983f21..3025da57e7 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelExtraScrollbars.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelExtraScrollbars.java
@@ -10,8 +10,8 @@ import com.vaadin.ui.HorizontalSplitPanel;
import com.vaadin.ui.LegacyWindow;
import com.vaadin.ui.NativeButton;
-public class SplitPanelExtraScrollbars extends AbstractTestCase implements
- ClickListener {
+public class SplitPanelExtraScrollbars extends AbstractTestCase
+ implements ClickListener {
private HorizontalSplitPanel sp;
private HorizontalLayout hl;
diff --git a/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelMoveComponent.java b/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelMoveComponent.java
index b788b568c2..a27ad897e1 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelMoveComponent.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelMoveComponent.java
@@ -1,12 +1,12 @@
/*
* 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelSplitterWidth.java b/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelSplitterWidth.java
index eb1fee145d..f8f56f17d6 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelSplitterWidth.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelSplitterWidth.java
@@ -45,8 +45,8 @@ public class SplitPanelSplitterWidth extends TestBase {
p.setSizeFull();
split2.addComponent(p);
- getLayout().addComponent(
- new Button("Unlock", new Button.ClickListener() {
+ getLayout()
+ .addComponent(new Button("Unlock", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelStyleLeak.java b/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelStyleLeak.java
index b634e43f46..101764ff92 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelStyleLeak.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelStyleLeak.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelWithMinimumAndMaximum.java b/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelWithMinimumAndMaximum.java
index 3359ec0559..6e4fd58391 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelWithMinimumAndMaximum.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelWithMinimumAndMaximum.java
@@ -21,10 +21,10 @@ public class SplitPanelWithMinimumAndMaximum extends AbstractTestUI {
horizontalSplitsLayout.setCaption("Horizontal splits");
HorizontalSplitPanel percentagePositionWithPercentageLimitsHorizontal = new HorizontalSplitPanel();
- percentagePositionWithPercentageLimitsHorizontal.setMinSplitPosition(
- 10, Sizeable.UNITS_PERCENTAGE);
- percentagePositionWithPercentageLimitsHorizontal.setMaxSplitPosition(
- 80, Sizeable.UNITS_PERCENTAGE);
+ percentagePositionWithPercentageLimitsHorizontal.setMinSplitPosition(10,
+ Sizeable.UNITS_PERCENTAGE);
+ percentagePositionWithPercentageLimitsHorizontal.setMaxSplitPosition(80,
+ Sizeable.UNITS_PERCENTAGE);
percentagePositionWithPercentageLimitsHorizontal
.setFirstComponent(new Label("Min 10 % - 50 % position"));
percentagePositionWithPercentageLimitsHorizontal
@@ -53,10 +53,10 @@ public class SplitPanelWithMinimumAndMaximum extends AbstractTestUI {
Sizeable.UNITS_PIXELS);
pixelPositionWithPixelLimitsHorizontal.setMaxSplitPosition(550,
Sizeable.UNITS_PIXELS);
- pixelPositionWithPixelLimitsHorizontal.setFirstComponent(new Label(
- "Min 100 px - 400 px position"));
- pixelPositionWithPixelLimitsHorizontal.setSecondComponent(new Label(
- "Max 550 px"));
+ pixelPositionWithPixelLimitsHorizontal
+ .setFirstComponent(new Label("Min 100 px - 400 px position"));
+ pixelPositionWithPixelLimitsHorizontal
+ .setSecondComponent(new Label("Max 550 px"));
pixelPositionWithPixelLimitsHorizontal.setSplitPosition(400,
Sizeable.UNITS_PIXELS);
horizontalSplitsLayout
@@ -82,38 +82,36 @@ public class SplitPanelWithMinimumAndMaximum extends AbstractTestUI {
percentagePositionWithPercentageLimitsHorizontalResersed
.setMaxSplitPosition(80, Sizeable.UNITS_PERCENTAGE);
percentagePositionWithPercentageLimitsHorizontalResersed
- .setFirstComponent(new Label(
- "Max 80 % - Reversed 50 % position"));
+ .setFirstComponent(
+ new Label("Max 80 % - Reversed 50 % position"));
percentagePositionWithPercentageLimitsHorizontalResersed
.setSecondComponent(new Label("Min 10 %"));
percentagePositionWithPercentageLimitsHorizontalResersed
.setSplitPosition(50, Sizeable.UNITS_PERCENTAGE, true);
- horizontalSplitsLayout
- .addComponent(percentagePositionWithPercentageLimitsHorizontalResersed);
+ horizontalSplitsLayout.addComponent(
+ percentagePositionWithPercentageLimitsHorizontalResersed);
HorizontalSplitPanel pixelPositionWithPercentageLimitsHorizontalResersed = new HorizontalSplitPanel();
pixelPositionWithPercentageLimitsHorizontalResersed
.setMinSplitPosition(10, Sizeable.UNITS_PERCENTAGE);
pixelPositionWithPercentageLimitsHorizontalResersed
.setMaxSplitPosition(80, Sizeable.UNITS_PERCENTAGE);
- pixelPositionWithPercentageLimitsHorizontalResersed
- .setFirstComponent(new Label(
- "Max 80 % - Reversed 400 px position"));
+ pixelPositionWithPercentageLimitsHorizontalResersed.setFirstComponent(
+ new Label("Max 80 % - Reversed 400 px position"));
pixelPositionWithPercentageLimitsHorizontalResersed
.setSecondComponent(new Label("Min 10 %"));
- pixelPositionWithPercentageLimitsHorizontalResersed.setSplitPosition(
- 400, Sizeable.UNITS_PIXELS, true);
- horizontalSplitsLayout
- .addComponent(pixelPositionWithPercentageLimitsHorizontalResersed);
+ pixelPositionWithPercentageLimitsHorizontalResersed
+ .setSplitPosition(400, Sizeable.UNITS_PIXELS, true);
+ horizontalSplitsLayout.addComponent(
+ pixelPositionWithPercentageLimitsHorizontalResersed);
HorizontalSplitPanel pixelPositionWithPixelLimitsHorizontalResersed = new HorizontalSplitPanel();
pixelPositionWithPixelLimitsHorizontalResersed.setMinSplitPosition(100,
Sizeable.UNITS_PIXELS);
pixelPositionWithPixelLimitsHorizontalResersed.setMaxSplitPosition(550,
Sizeable.UNITS_PIXELS);
- pixelPositionWithPixelLimitsHorizontalResersed
- .setFirstComponent(new Label(
- "Max 550 px - Reversed 400 px position"));
+ pixelPositionWithPixelLimitsHorizontalResersed.setFirstComponent(
+ new Label("Max 550 px - Reversed 400 px position"));
pixelPositionWithPixelLimitsHorizontalResersed
.setSecondComponent(new Label("Min 100 px"));
pixelPositionWithPixelLimitsHorizontalResersed.setSplitPosition(400,
@@ -126,15 +124,14 @@ public class SplitPanelWithMinimumAndMaximum extends AbstractTestUI {
.setMinSplitPosition(100, Sizeable.UNITS_PIXELS);
percentagePositionWithPixelLimitsHorizontalResersed
.setMaxSplitPosition(550, Sizeable.UNITS_PIXELS);
- percentagePositionWithPixelLimitsHorizontalResersed
- .setFirstComponent(new Label(
- "Max 550 px - Reversed 30 % position"));
+ percentagePositionWithPixelLimitsHorizontalResersed.setFirstComponent(
+ new Label("Max 550 px - Reversed 30 % position"));
percentagePositionWithPixelLimitsHorizontalResersed
.setSecondComponent(new Label("Min 100 px"));
- percentagePositionWithPixelLimitsHorizontalResersed.setSplitPosition(
- 30, Sizeable.UNITS_PERCENTAGE, true);
- horizontalSplitsLayout
- .addComponent(percentagePositionWithPixelLimitsHorizontalResersed);
+ percentagePositionWithPixelLimitsHorizontalResersed.setSplitPosition(30,
+ Sizeable.UNITS_PERCENTAGE, true);
+ horizontalSplitsLayout.addComponent(
+ percentagePositionWithPixelLimitsHorizontalResersed);
horizontalSplitsLayout.setSizeFull();
tabs.addComponent(horizontalSplitsLayout);
@@ -161,10 +158,10 @@ public class SplitPanelWithMinimumAndMaximum extends AbstractTestUI {
Sizeable.UNITS_PERCENTAGE);
pixelPositionWithPercentageLimitsVertical.setMaxSplitPosition(80,
Sizeable.UNITS_PERCENTAGE);
- pixelPositionWithPercentageLimitsVertical.setFirstComponent(new Label(
- "Min 10 % - 400 px position"));
- pixelPositionWithPercentageLimitsVertical.setSecondComponent(new Label(
- "Max 80 %"));
+ pixelPositionWithPercentageLimitsVertical
+ .setFirstComponent(new Label("Min 10 % - 400 px position"));
+ pixelPositionWithPercentageLimitsVertical
+ .setSecondComponent(new Label("Max 80 %"));
pixelPositionWithPercentageLimitsVertical.setSplitPosition(400,
Sizeable.UNITS_PIXELS);
verticalSplitsLayout
@@ -175,10 +172,10 @@ public class SplitPanelWithMinimumAndMaximum extends AbstractTestUI {
Sizeable.UNITS_PIXELS);
pixelPositionWithPixelLimitsVertical.setMaxSplitPosition(450,
Sizeable.UNITS_PIXELS);
- pixelPositionWithPixelLimitsVertical.setFirstComponent(new Label(
- "Min 100 px - 400 px position"));
- pixelPositionWithPixelLimitsVertical.setSecondComponent(new Label(
- "Max 450 px"));
+ pixelPositionWithPixelLimitsVertical
+ .setFirstComponent(new Label("Min 100 px - 400 px position"));
+ pixelPositionWithPixelLimitsVertical
+ .setSecondComponent(new Label("Max 450 px"));
pixelPositionWithPixelLimitsVertical.setSplitPosition(400,
Sizeable.UNITS_PIXELS);
verticalSplitsLayout.addComponent(pixelPositionWithPixelLimitsVertical);
@@ -188,10 +185,10 @@ public class SplitPanelWithMinimumAndMaximum extends AbstractTestUI {
Sizeable.UNITS_PIXELS);
percentagePositionWithPixelLimitsVertical.setMaxSplitPosition(450,
Sizeable.UNITS_PIXELS);
- percentagePositionWithPixelLimitsVertical.setFirstComponent(new Label(
- "Min 100 px - 30 % position"));
- percentagePositionWithPixelLimitsVertical.setSecondComponent(new Label(
- "Max 450 px"));
+ percentagePositionWithPixelLimitsVertical
+ .setFirstComponent(new Label("Min 100 px - 30 % position"));
+ percentagePositionWithPixelLimitsVertical
+ .setSecondComponent(new Label("Max 450 px"));
percentagePositionWithPixelLimitsVertical.setSplitPosition(30,
Sizeable.UNITS_PERCENTAGE);
verticalSplitsLayout
@@ -203,38 +200,36 @@ public class SplitPanelWithMinimumAndMaximum extends AbstractTestUI {
percentagePositionWithPercentageLimitsVerticalReversed
.setMaxSplitPosition(80, Sizeable.UNITS_PERCENTAGE);
percentagePositionWithPercentageLimitsVerticalReversed
- .setFirstComponent(new Label(
- "Max 80 % - Reversed 50 % position"));
+ .setFirstComponent(
+ new Label("Max 80 % - Reversed 50 % position"));
percentagePositionWithPercentageLimitsVerticalReversed
.setSecondComponent(new Label("Min 10 %"));
percentagePositionWithPercentageLimitsVerticalReversed
.setSplitPosition(50, Sizeable.UNITS_PERCENTAGE, true);
- verticalSplitsLayout
- .addComponent(percentagePositionWithPercentageLimitsVerticalReversed);
+ verticalSplitsLayout.addComponent(
+ percentagePositionWithPercentageLimitsVerticalReversed);
VerticalSplitPanel pixelPositionWithPercentageLimitsVerticalReversed = new VerticalSplitPanel();
- pixelPositionWithPercentageLimitsVerticalReversed.setMinSplitPosition(
- 10, Sizeable.UNITS_PERCENTAGE);
- pixelPositionWithPercentageLimitsVerticalReversed.setMaxSplitPosition(
- 80, Sizeable.UNITS_PERCENTAGE);
pixelPositionWithPercentageLimitsVerticalReversed
- .setFirstComponent(new Label(
- "Max 80 % - Reversed 400 px position"));
+ .setMinSplitPosition(10, Sizeable.UNITS_PERCENTAGE);
+ pixelPositionWithPercentageLimitsVerticalReversed
+ .setMaxSplitPosition(80, Sizeable.UNITS_PERCENTAGE);
+ pixelPositionWithPercentageLimitsVerticalReversed.setFirstComponent(
+ new Label("Max 80 % - Reversed 400 px position"));
pixelPositionWithPercentageLimitsVerticalReversed
.setSecondComponent(new Label("Min 10 %"));
pixelPositionWithPercentageLimitsVerticalReversed.setSplitPosition(400,
Sizeable.UNITS_PIXELS, true);
- verticalSplitsLayout
- .addComponent(pixelPositionWithPercentageLimitsVerticalReversed);
+ verticalSplitsLayout.addComponent(
+ pixelPositionWithPercentageLimitsVerticalReversed);
VerticalSplitPanel pixelPositionWithPixelLimitsVerticalReversed = new VerticalSplitPanel();
pixelPositionWithPixelLimitsVerticalReversed.setMinSplitPosition(100,
Sizeable.UNITS_PIXELS);
pixelPositionWithPixelLimitsVerticalReversed.setMaxSplitPosition(400,
Sizeable.UNITS_PIXELS);
- pixelPositionWithPixelLimitsVerticalReversed
- .setFirstComponent(new Label(
- "Max 400 px - Reversed 300 px position"));
+ pixelPositionWithPixelLimitsVerticalReversed.setFirstComponent(
+ new Label("Max 400 px - Reversed 300 px position"));
pixelPositionWithPixelLimitsVerticalReversed
.setSecondComponent(new Label("Min 100 px"));
pixelPositionWithPixelLimitsVerticalReversed.setSplitPosition(300,
@@ -243,19 +238,18 @@ public class SplitPanelWithMinimumAndMaximum extends AbstractTestUI {
.addComponent(pixelPositionWithPixelLimitsVerticalReversed);
VerticalSplitPanel percentagePositionWithPixelLimitsVerticalReversed = new VerticalSplitPanel();
- percentagePositionWithPixelLimitsVerticalReversed.setMinSplitPosition(
- 100, Sizeable.UNITS_PIXELS);
- percentagePositionWithPixelLimitsVerticalReversed.setMaxSplitPosition(
- 400, Sizeable.UNITS_PIXELS);
percentagePositionWithPixelLimitsVerticalReversed
- .setFirstComponent(new Label(
- "Max 400 px - Reversed 30 % position"));
+ .setMinSplitPosition(100, Sizeable.UNITS_PIXELS);
+ percentagePositionWithPixelLimitsVerticalReversed
+ .setMaxSplitPosition(400, Sizeable.UNITS_PIXELS);
+ percentagePositionWithPixelLimitsVerticalReversed.setFirstComponent(
+ new Label("Max 400 px - Reversed 30 % position"));
percentagePositionWithPixelLimitsVerticalReversed
.setSecondComponent(new Label("Min 100 px"));
percentagePositionWithPixelLimitsVerticalReversed.setSplitPosition(30,
Sizeable.UNITS_PERCENTAGE, true);
- verticalSplitsLayout
- .addComponent(percentagePositionWithPixelLimitsVerticalReversed);
+ verticalSplitsLayout.addComponent(
+ percentagePositionWithPixelLimitsVerticalReversed);
tabs.addComponent(verticalSplitsLayout);
verticalSplitsLayout.setSizeFull();
@@ -266,8 +260,8 @@ public class SplitPanelWithMinimumAndMaximum extends AbstractTestUI {
final HorizontalSplitPanel togglableSplitPanel = new HorizontalSplitPanel();
togglableSplitPanel.setMinSplitPosition(10, Sizeable.UNITS_PERCENTAGE);
togglableSplitPanel.setMaxSplitPosition(80, Sizeable.UNITS_PERCENTAGE);
- togglableSplitPanel.setFirstComponent(new Label(
- "Min 10 % - 50 % position"));
+ togglableSplitPanel
+ .setFirstComponent(new Label("Min 10 % - 50 % position"));
togglableSplitPanel.setSecondComponent(new Label("Max 80 %"));
togglableSplitPanel.setSplitPosition(50, Sizeable.UNITS_PERCENTAGE);
togglableSplitPanel.setHeight("250px");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPositionChange.java b/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPositionChange.java
index 81c449731c..e7f40bf65e 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPositionChange.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPositionChange.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ import com.vaadin.ui.VerticalSplitPanel;
/**
* Test for {@link SplitPositionChangeListeners}.
- *
+ *
* @author Vaadin Ltd
*/
public class SplitPositionChange extends AbstractTestUIWithLog {
@@ -49,8 +49,8 @@ public class SplitPositionChange extends AbstractTestUIWithLog {
splitPanel.setHeight("200px");
splitPanel.addComponent(buildPanel(firstCaption));
splitPanel.addComponent(buildPanel(secondCaption));
- splitPanel
- .addSplitPositionChangeListener(new AbstractSplitPanel.SplitPositionChangeListener() {
+ splitPanel.addSplitPositionChangeListener(
+ new AbstractSplitPanel.SplitPositionChangeListener() {
@Override
public void onSplitPositionChanged(
diff --git a/uitest/src/main/java/com/vaadin/tests/components/splitpanel/VerticalSplitPanels.java b/uitest/src/main/java/com/vaadin/tests/components/splitpanel/VerticalSplitPanels.java
index 219a72c196..f366d59591 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/splitpanel/VerticalSplitPanels.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/splitpanel/VerticalSplitPanels.java
@@ -2,8 +2,8 @@ package com.vaadin.tests.components.splitpanel;
import com.vaadin.ui.VerticalSplitPanel;
-public class VerticalSplitPanels extends
- AbstractSplitPanelTest<VerticalSplitPanel> {
+public class VerticalSplitPanels
+ extends AbstractSplitPanelTest<VerticalSplitPanel> {
@Override
protected Class<VerticalSplitPanel> getTestClass() {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/AddSelectionToRemovedRange.java b/uitest/src/main/java/com/vaadin/tests/components/table/AddSelectionToRemovedRange.java
index 2d8a30cb12..47fbabdb59 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/AddSelectionToRemovedRange.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/AddSelectionToRemovedRange.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import com.vaadin.ui.VerticalLayout;
/**
* Test to see if selecting and deselecting a table row after select range has
* been removed.
- *
+ *
* @since 7.1.13
* @author Vaadin Ltd
*/
@@ -64,8 +64,7 @@ public class AddSelectionToRemovedRange extends AbstractTestUI {
for (Integer item : selected) {
if (null == item) {
- new Notification(
- "ERROR",
+ new Notification("ERROR",
"Table value has null in Set of selected items!",
Type.ERROR_MESSAGE).show(getPage());
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/AsyncPushUpdates.java b/uitest/src/main/java/com/vaadin/tests/components/table/AsyncPushUpdates.java
index 6f9f1df89f..98b3ddb5d5 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/AsyncPushUpdates.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/AsyncPushUpdates.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -25,7 +25,7 @@ import com.vaadin.ui.Table;
/**
* Test to see if VScrollTable handles Push updates correctly.
- *
+ *
* @author Vaadin Ltd
*/
@Push
@@ -69,9 +69,8 @@ public class AsyncPushUpdates extends AbstractTestUI {
for (int i = 0; i < 11; i++) {
container.getContainerProperty(
container.addItem(), VALUE_PROPERTY_ID)
- .setValue(
- clickCount + " - " + id + " - "
- + i);
+ .setValue(clickCount + " - " + id
+ + " - " + i);
}
} catch (InterruptedException e) {
@@ -96,7 +95,7 @@ public class AsyncPushUpdates extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -106,7 +105,7 @@ public class AsyncPushUpdates extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/CellStyleGeneratorTest.java b/uitest/src/main/java/com/vaadin/tests/components/table/CellStyleGeneratorTest.java
index fb4bc5a045..84824718b9 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/CellStyleGeneratorTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/CellStyleGeneratorTest.java
@@ -10,9 +10,8 @@ public class CellStyleGeneratorTest extends TestBase {
@Override
protected void setup() {
- TestUtils
- .injectCSS(getMainWindow(),
- ".v-table-cell-content-red{background:red;}.v-table-row-blue{background:blue;}");
+ TestUtils.injectCSS(getMainWindow(),
+ ".v-table-cell-content-red{background:red;}.v-table-row-blue{background:blue;}");
CellStyleGenerator g = new CellStyleGenerator() {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/ColumnCollapsingAndColumnExpansion.java b/uitest/src/main/java/com/vaadin/tests/components/table/ColumnCollapsingAndColumnExpansion.java
index 8d1a9fc7df..769f988c15 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/ColumnCollapsingAndColumnExpansion.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/ColumnCollapsingAndColumnExpansion.java
@@ -37,7 +37,8 @@ public class ColumnCollapsingAndColumnExpansion extends AbstractTestUIWithLog {
}
@Override
- public void handleAction(Action action, Object sender, Object target) {
+ public void handleAction(Action action, Object sender,
+ Object target) {
table.setColumnCollapsed("Col2",
!table.isColumnCollapsed("Col2"));
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/ColumnResizeEvent.java b/uitest/src/main/java/com/vaadin/tests/components/table/ColumnResizeEvent.java
index f092ba8bca..77d490ea7d 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/ColumnResizeEvent.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/ColumnResizeEvent.java
@@ -85,20 +85,21 @@ public class ColumnResizeEvent extends TestBase {
table.addListener(new ColumnResizeListener() {
@Override
- public void columnResize(com.vaadin.ui.Table.ColumnResizeEvent event) {
+ public void columnResize(
+ com.vaadin.ui.Table.ColumnResizeEvent event) {
if (event.getPropertyId().equals("firstname")) {
- column1Width.setValue(event.getCurrentWidth()
- + "px (previously " + event.getPreviousWidth()
- + "px)");
+ column1Width.setValue(
+ event.getCurrentWidth() + "px (previously "
+ + event.getPreviousWidth() + "px)");
} else if (event.getPropertyId().equals("lastname")) {
- column2Width.setValue(event.getCurrentWidth()
- + "px (previously " + event.getPreviousWidth()
- + "px)");
+ column2Width.setValue(
+ event.getCurrentWidth() + "px (previously "
+ + event.getPreviousWidth() + "px)");
} else if (event.getPropertyId().equals("150pxfixedCol")) {
- column3Width.setValue(event.getCurrentWidth()
- + "px (previously " + event.getPreviousWidth()
- + "px)");
+ column3Width.setValue(
+ event.getCurrentWidth() + "px (previously "
+ + event.getPreviousWidth() + "px)");
}
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/ColumnWidthsAfterChangeTableColumnsCountOrOrder.java b/uitest/src/main/java/com/vaadin/tests/components/table/ColumnWidthsAfterChangeTableColumnsCountOrOrder.java
index 7e33de502c..27d2d82113 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/ColumnWidthsAfterChangeTableColumnsCountOrOrder.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/ColumnWidthsAfterChangeTableColumnsCountOrOrder.java
@@ -10,8 +10,8 @@ import com.vaadin.ui.Button;
import com.vaadin.ui.Table;
import com.vaadin.ui.VerticalLayout;
-public class ColumnWidthsAfterChangeTableColumnsCountOrOrder extends
- AbstractTestUI {
+public class ColumnWidthsAfterChangeTableColumnsCountOrOrder
+ extends AbstractTestUI {
protected static final String BUTTON_CHANGE_ORDER_AND_WIDTH_ID = "buttonChangeOrderAndWidth";
protected static final String BUTTON_CHANGE_COLUMN_COUNT_AND_WIDTH = "buttonChangeColumnCountAndWidth";
@@ -40,8 +40,8 @@ public class ColumnWidthsAfterChangeTableColumnsCountOrOrder extends
new Button.ClickListener() {
@Override
public void buttonClick(Button.ClickEvent clickEvent) {
- table.setVisibleColumns(new Object[] { "name", "descr",
- "id" });
+ table.setVisibleColumns(
+ new Object[] { "name", "descr", "id" });
table.setColumnWidth("descr", NEW_COLUMN_WIDTH);
}
});
@@ -51,7 +51,8 @@ public class ColumnWidthsAfterChangeTableColumnsCountOrOrder extends
"Change columns count and width", new Button.ClickListener() {
@Override
public void buttonClick(Button.ClickEvent clickEvent) {
- table.setVisibleColumns(new Object[] { "name", "descr" });
+ table.setVisibleColumns(
+ new Object[] { "name", "descr" });
table.setColumnWidth("descr", NEW_COLUMN_WIDTH);
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/ContainerSizeChangeDuringTablePaint.java b/uitest/src/main/java/com/vaadin/tests/components/table/ContainerSizeChangeDuringTablePaint.java
index 12f28332f4..348a10040e 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/ContainerSizeChangeDuringTablePaint.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/ContainerSizeChangeDuringTablePaint.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -111,8 +111,8 @@ public class ContainerSizeChangeDuringTablePaint extends AbstractTestUI {
addItem(container, "A", "New", "Row");
container.sabotageNextPaint();
- event.getButton().setCaption(
- "Event was fired successfully.");
+ event.getButton()
+ .setCaption("Event was fired successfully.");
}
});
button.setId("addRow");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/ContextMenuSize.java b/uitest/src/main/java/com/vaadin/tests/components/table/ContextMenuSize.java
index ec7301099f..fe1071671e 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/ContextMenuSize.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/ContextMenuSize.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.ui.Table;
/**
* Test UI for table context menu position and size.
- *
+ *
* @author Vaadin Ltd
*/
public class ContextMenuSize extends AbstractTestUI {
@@ -36,7 +36,8 @@ public class ContextMenuSize extends AbstractTestUI {
table.addActionHandler(new Handler() {
@Override
- public void handleAction(Action action, Object sender, Object target) {
+ public void handleAction(Action action, Object sender,
+ Object target) {
}
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/DelayedColumnLayouting.java b/uitest/src/main/java/com/vaadin/tests/components/table/DelayedColumnLayouting.java
index c327ddb6f3..a8b22832b9 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/DelayedColumnLayouting.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/DelayedColumnLayouting.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,9 +26,9 @@ import com.vaadin.ui.VerticalLayout;
/**
* For tables that are contained in a layout, a delayed column layouting should
* not be visible (because it makes the column jump around).
- *
+ *
* #15189
- *
+ *
* @author Vaadin Ltd
*/
public class DelayedColumnLayouting extends UI {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/DndEmptyTable.java b/uitest/src/main/java/com/vaadin/tests/components/table/DndEmptyTable.java
index baac7ce057..48fe6b19df 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/DndEmptyTable.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/DndEmptyTable.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -29,7 +29,7 @@ import com.vaadin.ui.Table;
/**
* Test UI for empty table: empty table (without any data) throws client side
* exception if it's a target for DnD.
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/DndTableTargetDetails.java b/uitest/src/main/java/com/vaadin/tests/components/table/DndTableTargetDetails.java
index 7bebfafd4e..bedfb6839a 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/DndTableTargetDetails.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/DndTableTargetDetails.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -32,7 +32,7 @@ import com.vaadin.ui.VerticalLayout;
/**
* Test UI for table as a drop target: AbstractSelectTargetDetails should
* provide getMouseEvent() method.
- *
+ *
* @author Vaadin Ltd
*/
public class DndTableTargetDetails extends AbstractTestUI {
@@ -86,11 +86,11 @@ public class DndTableTargetDetails extends AbstractTestUI {
.getTargetDetails();
MouseEventDetails mouseDetails = details.getMouseEvent();
- VerticalLayout layout = (VerticalLayout) details.getTarget()
- .getUI().getContent();
+ VerticalLayout layout = (VerticalLayout) details.getTarget().getUI()
+ .getContent();
- Label name = new Label("Button name="
- + mouseDetails.getButtonName());
+ Label name = new Label(
+ "Button name=" + mouseDetails.getButtonName());
name.addStyleName("dnd-button-name");
layout.addComponent(name);
if (mouseDetails.isCtrlKey()) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/EditableModeChange.java b/uitest/src/main/java/com/vaadin/tests/components/table/EditableModeChange.java
index e792c90af1..b24e60369f 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/EditableModeChange.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/EditableModeChange.java
@@ -81,7 +81,8 @@ public class EditableModeChange extends AbstractTestUI {
Object propertyId, Component uiContext) {
if (selectionEvent != null) {
if ((selectionEvent.getItemId().equals(itemId))
- && (selectionEvent.getPropertyId().equals(propertyId))) {
+ && (selectionEvent.getPropertyId()
+ .equals(propertyId))) {
return super.createField(container, itemId, propertyId,
uiContext);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/EmptyRowsWhenScrolling.java b/uitest/src/main/java/com/vaadin/tests/components/table/EmptyRowsWhenScrolling.java
index 3bc0d3dd1f..a19b73f22b 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/EmptyRowsWhenScrolling.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/EmptyRowsWhenScrolling.java
@@ -25,7 +25,7 @@ import com.vaadin.ui.VerticalLayout;
/**
* This test cannot be automated. http://dev.vaadin.com/ticket/6160, base code
* by user radosdesign.
- *
+ *
* The test fails if even occasionally empty rows appear in the table. A
* relatively good way to get them (before the fix) is to wait for the page to
* load, move the scrollbar down, press 'R' before the rows have time to be
@@ -35,9 +35,9 @@ import com.vaadin.ui.VerticalLayout;
* happen at all. On a slow 32-bit Windows 7 with Chrome version 22.0.1229.94 m
* (no GWT dev mode) this test has managed to reproduce the problem maybe nine
* times out of ten.
- *
+ *
* @author Anna Koskinen / Vaadin Oy
- *
+ *
*/
public class EmptyRowsWhenScrolling extends UI {
@@ -70,7 +70,7 @@ public class EmptyRowsWhenScrolling extends UI {
/**
* The constructor should first build the main layout, set the
* composition root and then do any custom initialization.
- *
+ *
* The constructor will not be automatically regenerated by the visual
* editor.
*/
@@ -83,9 +83,9 @@ public class EmptyRowsWhenScrolling extends UI {
SimpleBean.class);
container.setBeanIdProperty("id");
for (int i = 1; i <= 50; ++i) {
- container.addBean(new SimpleBean(i, "image",
- "Column1 row " + i, "Column2 row " + i, "Column3 row "
- + i, "Column4 row " + i));
+ container.addBean(new SimpleBean(i, "image", "Column1 row " + i,
+ "Column2 row " + i, "Column3 row " + i,
+ "Column4 row " + i));
}
table.setContainerDataSource(container);
table.setEditable(true);
@@ -99,8 +99,8 @@ public class EmptyRowsWhenScrolling extends UI {
int imgNum = new Random().nextInt(5) + 1;
try {
// Simulate background work
- System.out
- .println("Generated column for image /com/example/simpletable/img/px50-"
+ System.out.println(
+ "Generated column for image /com/example/simpletable/img/px50-"
+ imgNum + ".jpg");
Thread.sleep(50);
} catch (InterruptedException e) {
@@ -112,13 +112,14 @@ public class EmptyRowsWhenScrolling extends UI {
Embedded image = new Embedded("", resource);
image.setWidth("50px");
image.setHeight("50px");
- image.addClickListener(new com.vaadin.event.MouseEvents.ClickListener() {
- @Override
- public void click(
- com.vaadin.event.MouseEvents.ClickEvent event) {
- Notification.show("Image clicked!");
- }
- });
+ image.addClickListener(
+ new com.vaadin.event.MouseEvents.ClickListener() {
+ @Override
+ public void click(
+ com.vaadin.event.MouseEvents.ClickEvent event) {
+ Notification.show("Image clicked!");
+ }
+ });
return image;
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/EmptyTable.java b/uitest/src/main/java/com/vaadin/tests/components/table/EmptyTable.java
index ad9c70444d..fb175a21fa 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/EmptyTable.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/EmptyTable.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ public class EmptyTable extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -37,7 +37,7 @@ public class EmptyTable extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -47,7 +47,7 @@ public class EmptyTable extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/ExpandingContainer.java b/uitest/src/main/java/com/vaadin/tests/components/table/ExpandingContainer.java
index a7d387477d..532c03b91a 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/ExpandingContainer.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/ExpandingContainer.java
@@ -114,7 +114,7 @@ public class ExpandingContainer extends AbstractContainer implements
@Override
@SuppressWarnings("rawtypes")
- public Property/* <?> */getContainerProperty(Object itemId,
+ public Property/* <?> */ getContainerProperty(Object itemId,
Object propertyId) {
BeanItem<MyBean> item = getItem(itemId);
return item != null ? item.getItemProperty(propertyId) : null;
@@ -222,8 +222,8 @@ public class ExpandingContainer extends AbstractContainer implements
}
final int size = currentSize;
if (index >= size) {
- throw new IndexOutOfBoundsException("index=" + index + " but size="
- + size);
+ throw new IndexOutOfBoundsException(
+ "index=" + index + " but size=" + size);
}
checkExpand(index);
return index;
@@ -237,8 +237,8 @@ public class ExpandingContainer extends AbstractContainer implements
final int size = currentSize;
checkExpand(startIndex);
if (startIndex < 0 || startIndex > size) {
- throw new IndexOutOfBoundsException("startIndex=" + startIndex
- + " but size=" + size);
+ throw new IndexOutOfBoundsException(
+ "startIndex=" + startIndex + " but size=" + size);
}
if (startIndex + numberOfItems > size) {
numberOfItems = size - startIndex;
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/FocusOnSelectedItem.java b/uitest/src/main/java/com/vaadin/tests/components/table/FocusOnSelectedItem.java
index 177f4d68fc..e2df62d029 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/FocusOnSelectedItem.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/FocusOnSelectedItem.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -24,14 +24,14 @@ import com.vaadin.ui.Table;
/**
* Test to see if the correct row gets the focus when the row is selected from
* the serverside and forces the table to scroll down
- *
+ *
* @author Vaadin Ltd
*/
public class FocusOnSelectedItem extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -61,7 +61,7 @@ public class FocusOnSelectedItem extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -71,7 +71,7 @@ public class FocusOnSelectedItem extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/Footer.java b/uitest/src/main/java/com/vaadin/tests/components/table/Footer.java
index 5d2d68898c..fdbca92c58 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/Footer.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/Footer.java
@@ -64,9 +64,8 @@ public class Footer extends AbstractTestUI {
Button footer1Btn = new Button("Change", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- table.setColumnFooter("col1",
- footer1Value.getValue() == null ? "" : footer1Value
- .getValue().toString());
+ table.setColumnFooter("col1", footer1Value.getValue() == null
+ ? "" : footer1Value.getValue().toString());
}
});
HorizontalLayout footer1 = new HorizontalLayout();
@@ -79,9 +78,8 @@ public class Footer extends AbstractTestUI {
Button footer2Btn = new Button("Change", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- table.setColumnFooter("col2",
- footer2Value.getValue() == null ? "" : footer2Value
- .getValue().toString());
+ table.setColumnFooter("col2", footer2Value.getValue() == null
+ ? "" : footer2Value.getValue().toString());
}
});
HorizontalLayout footer2 = new HorizontalLayout();
@@ -94,9 +92,8 @@ public class Footer extends AbstractTestUI {
Button footer3Btn = new Button("Change", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- table.setColumnFooter("col3",
- footer3Value.getValue() == null ? "" : footer3Value
- .getValue().toString());
+ table.setColumnFooter("col3", footer3Value.getValue() == null
+ ? "" : footer3Value.getValue().toString());
}
});
HorizontalLayout footer3 = new HorizontalLayout();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/FooterClick.java b/uitest/src/main/java/com/vaadin/tests/components/table/FooterClick.java
index 8d6a32c9bb..9cd1be7b01 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/FooterClick.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/FooterClick.java
@@ -53,8 +53,8 @@ public class FooterClick extends AbstractTestUIWithLog {
@Override
public void valueChange(ValueChangeEvent event) {
- table.setImmediate((Boolean) event.getProperty()
- .getValue());
+ table.setImmediate(
+ (Boolean) event.getProperty().getValue());
}
});
@@ -67,8 +67,8 @@ public class FooterClick extends AbstractTestUIWithLog {
@Override
public void valueChange(ValueChangeEvent event) {
- table.setColumnReorderingAllowed((Boolean) event
- .getProperty().getValue());
+ table.setColumnReorderingAllowed(
+ (Boolean) event.getProperty().getValue());
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/HeaderClick.java b/uitest/src/main/java/com/vaadin/tests/components/table/HeaderClick.java
index 2bb48a2b40..8ebda98af8 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/HeaderClick.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/HeaderClick.java
@@ -42,8 +42,8 @@ public class HeaderClick extends AbstractTestUI {
@Override
public void valueChange(ValueChangeEvent event) {
- table.setImmediate((Boolean) event.getProperty()
- .getValue());
+ table.setImmediate(
+ (Boolean) event.getProperty().getValue());
}
});
@@ -55,8 +55,8 @@ public class HeaderClick extends AbstractTestUI {
@Override
public void valueChange(ValueChangeEvent event) {
- table.setSortEnabled((Boolean) event.getProperty()
- .getValue());
+ table.setSortEnabled(
+ (Boolean) event.getProperty().getValue());
}
});
@@ -69,8 +69,8 @@ public class HeaderClick extends AbstractTestUI {
@Override
public void valueChange(ValueChangeEvent event) {
- table.setColumnReorderingAllowed((Boolean) event
- .getProperty().getValue());
+ table.setColumnReorderingAllowed(
+ (Boolean) event.getProperty().getValue());
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/HeaderFooterClickLeftRightMiddle.java b/uitest/src/main/java/com/vaadin/tests/components/table/HeaderFooterClickLeftRightMiddle.java
index 09b3dde32c..5440b998ce 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/HeaderFooterClickLeftRightMiddle.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/HeaderFooterClickLeftRightMiddle.java
@@ -62,7 +62,8 @@ public class HeaderFooterClickLeftRightMiddle extends AbstractTestUIWithLog {
.isEmpty()) {
table.addHeaderClickListener(headerClickListener);
} else {
- table.removeHeaderClickListener(headerClickListener);
+ table.removeHeaderClickListener(
+ headerClickListener);
}
}
});
@@ -92,7 +93,8 @@ public class HeaderFooterClickLeftRightMiddle extends AbstractTestUIWithLog {
.isEmpty()) {
table.addFooterClickListener(footerClickListener);
} else {
- table.removeFooterClickListener(footerClickListener);
+ table.removeFooterClickListener(
+ footerClickListener);
}
}
});
@@ -117,8 +119,8 @@ public class HeaderFooterClickLeftRightMiddle extends AbstractTestUIWithLog {
@Override
public void valueChange(ValueChangeEvent event) {
- table.setColumnReorderingAllowed((Boolean) event
- .getProperty().getValue());
+ table.setColumnReorderingAllowed(
+ (Boolean) event.getProperty().getValue());
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/HeaderPositionWhenSorting.java b/uitest/src/main/java/com/vaadin/tests/components/table/HeaderPositionWhenSorting.java
index 6376ad7df0..c3f1190192 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/HeaderPositionWhenSorting.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/HeaderPositionWhenSorting.java
@@ -15,8 +15,8 @@ import com.vaadin.ui.Link;
import com.vaadin.ui.Notification;
import com.vaadin.ui.Table;
-public class HeaderPositionWhenSorting extends AbstractTestUI implements
- Action.Handler, ItemClickListener {
+public class HeaderPositionWhenSorting extends AbstractTestUI
+ implements Action.Handler, ItemClickListener {
private Table table;
private boolean actionHandlerHasActions = false;
@@ -32,7 +32,8 @@ public class HeaderPositionWhenSorting extends AbstractTestUI implements
if (((Boolean) event.getProperty().getValue())) {
table.addItemClickListener(HeaderPositionWhenSorting.this);
} else {
- table.removeItemClickListener(HeaderPositionWhenSorting.this);
+ table.removeItemClickListener(
+ HeaderPositionWhenSorting.this);
}
}
@@ -55,7 +56,8 @@ public class HeaderPositionWhenSorting extends AbstractTestUI implements
});
addComponent(cbActionHandler);
- CheckBox cbActionHasActions = new CheckBox("Action handler has actions");
+ CheckBox cbActionHasActions = new CheckBox(
+ "Action handler has actions");
cbActionHasActions.setImmediate(true);
cbActionHasActions.addValueChangeListener(new ValueChangeListener() {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/HeaderRightClickAfterDrag.java b/uitest/src/main/java/com/vaadin/tests/components/table/HeaderRightClickAfterDrag.java
index e9c948ddf7..7642ac2bc8 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/HeaderRightClickAfterDrag.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/HeaderRightClickAfterDrag.java
@@ -14,8 +14,8 @@ public class HeaderRightClickAfterDrag extends AbstractTestUI {
@Override
protected void setup(VaadinRequest request) {
Table table = new Table();
- table.setContainerDataSource(new BeanItemContainer<TestBean>(
- TestBean.class));
+ table.setContainerDataSource(
+ new BeanItemContainer<TestBean>(TestBean.class));
for (int i = 0; i < 10; i++) {
table.addItem(new TestBean(i));
}
@@ -25,12 +25,11 @@ public class HeaderRightClickAfterDrag extends AbstractTestUI {
table.addHeaderClickListener(new Table.HeaderClickListener() {
@Override
public void headerClick(Table.HeaderClickEvent event) {
- if (MouseEventDetails.MouseButton.RIGHT.equals(event
- .getButton())) {
+ if (MouseEventDetails.MouseButton.RIGHT
+ .equals(event.getButton())) {
Window window = new Window("Right-clicked:", new Label(
- "<center>"
- + event.getPropertyId().toString()
- .toUpperCase() + "</center>",
+ "<center>" + event.getPropertyId().toString()
+ .toUpperCase() + "</center>",
ContentMode.HTML));
window.setPositionX(event.getClientX());
window.setPositionY(event.getClientY());
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/HeaderUpdateWhenNoRows.java b/uitest/src/main/java/com/vaadin/tests/components/table/HeaderUpdateWhenNoRows.java
index b89582bb7e..d0ab91487d 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/HeaderUpdateWhenNoRows.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/HeaderUpdateWhenNoRows.java
@@ -25,7 +25,8 @@ public class HeaderUpdateWhenNoRows extends AbstractTestUI {
@Override
public void valueChange(ValueChangeEvent event) {
if (showHeaders.getValue()) {
- table.setColumnHeaderMode(ColumnHeaderMode.EXPLICIT_DEFAULTS_ID);
+ table.setColumnHeaderMode(
+ ColumnHeaderMode.EXPLICIT_DEFAULTS_ID);
} else {
table.setColumnHeaderMode(ColumnHeaderMode.HIDDEN);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/HiddenColumnsExpandRatios.java b/uitest/src/main/java/com/vaadin/tests/components/table/HiddenColumnsExpandRatios.java
index 4a729d221f..e4d894057a 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/HiddenColumnsExpandRatios.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/HiddenColumnsExpandRatios.java
@@ -37,8 +37,8 @@ public class HiddenColumnsExpandRatios extends TestBase {
addComponent(new Button("All", new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- table.setVisibleColumns(table.getContainerPropertyIds()
- .toArray());
+ table.setVisibleColumns(
+ table.getContainerPropertyIds().toArray());
}
}));
addComponent(new Button("Some", new ClickListener() {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/HiddenComponentCells.java b/uitest/src/main/java/com/vaadin/tests/components/table/HiddenComponentCells.java
index fa88325429..c5717c1556 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/HiddenComponentCells.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/HiddenComponentCells.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -15,7 +15,7 @@
*/
/**
- *
+ *
*/
package com.vaadin.tests.components.table;
@@ -26,7 +26,7 @@ import com.vaadin.ui.Label;
import com.vaadin.ui.Table;
/**
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/ItemClickEvents.java b/uitest/src/main/java/com/vaadin/tests/components/table/ItemClickEvents.java
index cb69856e95..85eeee75e9 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/ItemClickEvents.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/ItemClickEvents.java
@@ -58,9 +58,7 @@ public class ItemClickEvents extends AbstractTestUI {
tree.setParent("2. Child 1", "Root 2");
tree.addItem("2. Child 2");
tree.setParent("2. Child 2", "Root 2");
- tree.addContainerProperty(
- "icon",
- ExternalResource.class,
+ tree.addContainerProperty("icon", ExternalResource.class,
new ExternalResource(
"https://vaadin.com/vaadin-theme/images/vaadin-logo.png"));
@@ -137,19 +135,20 @@ public class ItemClickEvents extends AbstractTestUI {
private static HorizontalLayout createHorizontalLayout(Component c) {
HorizontalLayout layout = new HorizontalLayout();
- CheckBox b = new CheckBox("immediate", new MethodProperty<Boolean>(c,
- "immediate"));
+ CheckBox b = new CheckBox("immediate",
+ new MethodProperty<Boolean>(c, "immediate"));
b.setImmediate(true);
layout.addComponent(b);
- b = new CheckBox("selectable", new MethodProperty<Boolean>(c,
- "selectable"));
+ b = new CheckBox("selectable",
+ new MethodProperty<Boolean>(c, "selectable"));
b.setImmediate(true);
layout.addComponent(b);
- b = new CheckBox("nullsel", new MethodProperty<Boolean>(c,
- "nullSelectionAllowed"));
+ b = new CheckBox("nullsel",
+ new MethodProperty<Boolean>(c, "nullSelectionAllowed"));
b.setImmediate(true);
layout.addComponent(b);
- b = new CheckBox("multi", new MethodProperty<Boolean>(c, "multiSelect"));
+ b = new CheckBox("multi",
+ new MethodProperty<Boolean>(c, "multiSelect"));
b.setImmediate(true);
layout.addComponent(b);
return layout;
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/KeyControl.java b/uitest/src/main/java/com/vaadin/tests/components/table/KeyControl.java
index 2998940db1..6611cef707 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/KeyControl.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/KeyControl.java
@@ -45,7 +45,8 @@ public class KeyControl extends TestBase {
public void valueChange(ValueChangeEvent event) {
@SuppressWarnings("unchecked")
Set<String> value = (Set<String>) table1.getValue();
- selected1.setValue(value.toString() + " TOTAL: " + value.size());
+ selected1
+ .setValue(value.toString() + " TOTAL: " + value.size());
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/KeyboardNavigationWithChangingContent.java b/uitest/src/main/java/com/vaadin/tests/components/table/KeyboardNavigationWithChangingContent.java
index f9a0add6fc..fe678f7980 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/KeyboardNavigationWithChangingContent.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/KeyboardNavigationWithChangingContent.java
@@ -31,24 +31,23 @@ public class KeyboardNavigationWithChangingContent extends TestBase {
t.setMultiSelect(true);
getLayout().addComponent(t);
- getLayout().addComponent(
- new Button("Change elements and selection",
- new ClickListener() {
-
- @Override
- public void buttonClick(ClickEvent event) {
-
- bic.removeAllItems();
- ValueHolder<String> v4 = null;
- for (int i = 4; i < 30; i++) {
- v4 = new ValueHolder<String>("test" + i);
- bic.addBean(v4);
-
- }
- t.select(t.firstItemId());
- t.focus();
- }
- }));
+ getLayout().addComponent(new Button("Change elements and selection",
+ new ClickListener() {
+
+ @Override
+ public void buttonClick(ClickEvent event) {
+
+ bic.removeAllItems();
+ ValueHolder<String> v4 = null;
+ for (int i = 4; i < 30; i++) {
+ v4 = new ValueHolder<String>("test" + i);
+ bic.addBean(v4);
+
+ }
+ t.select(t.firstItemId());
+ t.focus();
+ }
+ }));
}
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/LabelEmbeddedClickThroughForTable.java b/uitest/src/main/java/com/vaadin/tests/components/table/LabelEmbeddedClickThroughForTable.java
index b9062236de..ada685960d 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/LabelEmbeddedClickThroughForTable.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/LabelEmbeddedClickThroughForTable.java
@@ -38,23 +38,21 @@ public class LabelEmbeddedClickThroughForTable extends AbstractTestUI {
Item item = table.addItem("Item 1 (row 1)");
item.getItemProperty("Column 1").setValue("String A");
item.getItemProperty("Column 2").setValue(new Label("Label A"));
- item.getItemProperty("Column 3").setValue(
- new Label("<b>Label A</b>", ContentMode.HTML));
- item.getItemProperty("Column 4").setValue(
- new Embedded("An embedded image", new ThemeResource(
- "../runo/icons/32/ok.png")));
+ item.getItemProperty("Column 3")
+ .setValue(new Label("<b>Label A</b>", ContentMode.HTML));
+ item.getItemProperty("Column 4")
+ .setValue(new Embedded("An embedded image",
+ new ThemeResource("../runo/icons/32/ok.png")));
item = table.addItem("Item 2 (row 2)");
item.getItemProperty("Column 1").setValue("String B");
item.getItemProperty("Column 2").setValue(new Label("Label B"));
item.getItemProperty("Column 3")
- .setValue(
- new Label(
- "<a style=\"color: blue\" href=\"javascript:false\">Label B</a>",
- ContentMode.HTML));
- item.getItemProperty("Column 4").setValue(
- new Embedded("", new ThemeResource(
- "../runo/icons/32/cancel.png")));
+ .setValue(new Label(
+ "<a style=\"color: blue\" href=\"javascript:false\">Label B</a>",
+ ContentMode.HTML));
+ item.getItemProperty("Column 4").setValue(new Embedded("",
+ new ThemeResource("../runo/icons/32/cancel.png")));
table.addItemClickListener(new ItemClickListener() {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/LargeSelectionCausesNPE.java b/uitest/src/main/java/com/vaadin/tests/components/table/LargeSelectionCausesNPE.java
index b6ee62ea59..715ace04eb 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/LargeSelectionCausesNPE.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/LargeSelectionCausesNPE.java
@@ -86,8 +86,8 @@ public class LargeSelectionCausesNPE extends TestBase {
// set column headers
table.setVisibleColumns(new String[] { CODE, NAME, ID });
- table.setColumnHeaders(new String[] { "DummyCode", "DummyName",
- "DummyId" });
+ table.setColumnHeaders(
+ new String[] { "DummyCode", "DummyName", "DummyId" });
// Column alignment
table.setColumnAlignment(ID, Align.CENTER);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/LastColumnNegative.java b/uitest/src/main/java/com/vaadin/tests/components/table/LastColumnNegative.java
index 87ff6d9d7b..c230a1b257 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/LastColumnNegative.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/LastColumnNegative.java
@@ -48,11 +48,8 @@ public class LastColumnNegative extends TestBase {
private Table setupTable() {
IndexedContainer container = new IndexedContainer();
- container
- .addContainerProperty(
- "fileName",
- String.class,
- "Long enough string to cause a scrollbar when the window is set to a dencently small size.");
+ container.addContainerProperty("fileName", String.class,
+ "Long enough string to cause a scrollbar when the window is set to a dencently small size.");
container.addContainerProperty("size", Long.class, 23958l);
container.addItem();
container.addItem();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/LeftColumnAlignment.java b/uitest/src/main/java/com/vaadin/tests/components/table/LeftColumnAlignment.java
index 7789d0ae19..3840dbf325 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/LeftColumnAlignment.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/LeftColumnAlignment.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,7 +27,7 @@ import com.vaadin.ui.Table.Align;
/**
* Test UI for issue #13399 : Left alignment should not be set explicitly
* instead of relying on default behavior
- *
+ *
* @author Vaadin Ltd
*/
@Theme("tests-table")
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/LongMultiselect.java b/uitest/src/main/java/com/vaadin/tests/components/table/LongMultiselect.java
index d5302cdf45..05f1d538fd 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/LongMultiselect.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/LongMultiselect.java
@@ -40,8 +40,8 @@ public class LongMultiselect extends AbstractTestUI {
// Set ItemProperty.COLUMN2 for all selected values of table
Collection selectedIds = (Collection) table.getValue();
for (final Object itemId : selectedIds) {
- final Property p = table.getItem(itemId).getItemProperty(
- ItemProperty.COLUMN2);
+ final Property p = table.getItem(itemId)
+ .getItemProperty(ItemProperty.COLUMN2);
if (p.getValue() instanceof String) {
p.setValue(null);
} else {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/ModifyContainerProperty.java b/uitest/src/main/java/com/vaadin/tests/components/table/ModifyContainerProperty.java
index 00965220db..c888fd98d0 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/ModifyContainerProperty.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/ModifyContainerProperty.java
@@ -27,14 +27,16 @@ public class ModifyContainerProperty extends TestBase {
addComponent(new Button("Remove container property",
new Button.ClickListener() {
@Override
- public void buttonClick(com.vaadin.ui.Button.ClickEvent arg0) {
+ public void buttonClick(
+ com.vaadin.ui.Button.ClickEvent arg0) {
ic.removeContainerProperty("one");
}
}));
addComponent(new Button("Add container property",
new Button.ClickListener() {
@Override
- public void buttonClick(com.vaadin.ui.Button.ClickEvent arg0) {
+ public void buttonClick(
+ com.vaadin.ui.Button.ClickEvent arg0) {
boolean added = ic.addContainerProperty("three",
String.class, "three");
if (added) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/MultiSelectWithRemovedRow.java b/uitest/src/main/java/com/vaadin/tests/components/table/MultiSelectWithRemovedRow.java
index 9c063fd42e..a7058b41e3 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/MultiSelectWithRemovedRow.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/MultiSelectWithRemovedRow.java
@@ -35,10 +35,11 @@ public class MultiSelectWithRemovedRow extends TestBase {
addComponent(log);
final BeanItemContainer<Person> container = new BeanItemContainer<Person>(
- Person.class, Arrays.asList(new Person("Joe"), new Person(
- "William"), new Person("Jack"), new Person("Averell"),
- new Person("Bob"), new Person("Grat"), new Person(
- "Bill"), new Person("Emmett")));
+ Person.class,
+ Arrays.asList(new Person("Joe"), new Person("William"),
+ new Person("Jack"), new Person("Averell"),
+ new Person("Bob"), new Person("Grat"),
+ new Person("Bill"), new Person("Emmett")));
final Table table = new Table("Table", container);
table.setSelectable(true);
table.setMultiSelect(true);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/OddEvenRowStyling.java b/uitest/src/main/java/com/vaadin/tests/components/table/OddEvenRowStyling.java
index 808b05e233..6bd361c599 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/OddEvenRowStyling.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/OddEvenRowStyling.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import com.vaadin.ui.Table;
/**
* @author jonatan
- *
+ *
*/
public class OddEvenRowStyling extends TestBase {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/PopupViewInTable.java b/uitest/src/main/java/com/vaadin/tests/components/table/PopupViewInTable.java
index f070d28aa8..9a118ab979 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/PopupViewInTable.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/PopupViewInTable.java
@@ -41,8 +41,8 @@ public class PopupViewInTable extends AbstractTestUI {
}
private Component createContent() {
- VerticalLayout vl = new VerticalLayout(new Label("Hello"), new Button(
- "World"));
+ VerticalLayout vl = new VerticalLayout(new Label("Hello"),
+ new Button("World"));
return vl;
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/PropertyValueChange.java b/uitest/src/main/java/com/vaadin/tests/components/table/PropertyValueChange.java
index 1e3c058458..be9fdeea99 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/PropertyValueChange.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/PropertyValueChange.java
@@ -49,8 +49,8 @@ public class PropertyValueChange extends TestBase {
Object columnId) {
final Label l = new Label();
@SuppressWarnings("unchecked")
- final Property<Integer> integer = source.getContainerProperty(
- itemId, "integer");
+ final Property<Integer> integer = source
+ .getContainerProperty(itemId, "integer");
l.setValue(String.valueOf(getMultipliedValue(integer)));
// we must hook value change listener to ensure updates in all use
@@ -107,8 +107,9 @@ public class PropertyValueChange extends TestBase {
t2.setId("disabled table");
Table reader = new Table("Reader table");
- reader.setDescription("This table should be redrawn on container changes as container data is "
- + "displayed directly in cells.");
+ reader.setDescription(
+ "This table should be redrawn on container changes as container data is "
+ + "displayed directly in cells.");
reader.setContainerDataSource(container);
reader.addGeneratedColumn("integer x 3", multiplier);
reader.setPageLength(0);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/RefreshRenderedCellsOnlyIfAttached.java b/uitest/src/main/java/com/vaadin/tests/components/table/RefreshRenderedCellsOnlyIfAttached.java
index 809cb67226..258ce70f28 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/RefreshRenderedCellsOnlyIfAttached.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/RefreshRenderedCellsOnlyIfAttached.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,7 +27,7 @@ import com.vaadin.ui.VerticalLayout;
/**
* There shouldn't be any attempts to refresh table's cells if the table isn't
* attached.
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -38,7 +38,7 @@ public class RefreshRenderedCellsOnlyIfAttached extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -53,7 +53,7 @@ public class RefreshRenderedCellsOnlyIfAttached extends AbstractTestUI {
final Table t = new Table() {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.Table#refreshRenderedCells()
*/
@Override
@@ -91,7 +91,7 @@ public class RefreshRenderedCellsOnlyIfAttached extends AbstractTestUI {
/**
* Remove Table's parent component.
- *
+ *
* @since
*/
protected void removeTableParent() {
@@ -100,7 +100,7 @@ public class RefreshRenderedCellsOnlyIfAttached extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -110,7 +110,7 @@ public class RefreshRenderedCellsOnlyIfAttached extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/ReloadWidgets.java b/uitest/src/main/java/com/vaadin/tests/components/table/ReloadWidgets.java
index ef72f92a4e..77acb153b8 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/ReloadWidgets.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/ReloadWidgets.java
@@ -15,8 +15,8 @@ public class ReloadWidgets extends AbstractTestUI {
@Override
protected void setup(VaadinRequest request) {
- final Table table = new Table(null, new BeanItemContainer<Bean>(
- Bean.class));
+ final Table table = new Table(null,
+ new BeanItemContainer<Bean>(Bean.class));
table.setId("table");
table.setSizeFull();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/RowAdditionTest.java b/uitest/src/main/java/com/vaadin/tests/components/table/RowAdditionTest.java
index c6d071f34c..3645f88a69 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/RowAdditionTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/RowAdditionTest.java
@@ -39,16 +39,16 @@ public class RowAdditionTest extends TestBase {
item.getItemProperty("column1").setValue("0");
}
}));
- hl.addComponent(new Button("Add at position 50",
- new Button.ClickListener() {
+ hl.addComponent(
+ new Button("Add at position 50", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
Item item = container.addItemAt(50, new Object());
item.getItemProperty("column1").setValue("50");
}
}));
- hl.addComponent(new Button("Add at position 100",
- new Button.ClickListener() {
+ hl.addComponent(
+ new Button("Add at position 100", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
Item item = container.addItemAt(100, new Object());
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/RowUpdateShouldRetainContextMenu.java b/uitest/src/main/java/com/vaadin/tests/components/table/RowUpdateShouldRetainContextMenu.java
index bcae4dc6d9..0f8d590909 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/RowUpdateShouldRetainContextMenu.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/RowUpdateShouldRetainContextMenu.java
@@ -54,7 +54,8 @@ public class RowUpdateShouldRetainContextMenu extends TestBase {
table.addActionHandler(new Action.Handler() {
@Override
- public void handleAction(Action action, Object sender, Object target) {
+ public void handleAction(Action action, Object sender,
+ Object target) {
}
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/SelectAllConstantViewport.java b/uitest/src/main/java/com/vaadin/tests/components/table/SelectAllConstantViewport.java
index 5a406eac48..0a0fb46462 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/SelectAllConstantViewport.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/SelectAllConstantViewport.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.ui.CssLayout;
import com.vaadin.ui.Table;
/**
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -31,7 +31,7 @@ public class SelectAllConstantViewport extends AbstractTestUIWithLog {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -76,7 +76,7 @@ public class SelectAllConstantViewport extends AbstractTestUIWithLog {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -87,7 +87,7 @@ public class SelectAllConstantViewport extends AbstractTestUIWithLog {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/SelectAllRows.java b/uitest/src/main/java/com/vaadin/tests/components/table/SelectAllRows.java
index 4778bca3b5..39da709ada 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/SelectAllRows.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/SelectAllRows.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/SelectAllRowsShiftFirst.java b/uitest/src/main/java/com/vaadin/tests/components/table/SelectAllRowsShiftFirst.java
index 8d3e922fa9..79a8f0c7ec 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/SelectAllRowsShiftFirst.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/SelectAllRowsShiftFirst.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/SetCurrentPageFirstItemIndex.java b/uitest/src/main/java/com/vaadin/tests/components/table/SetCurrentPageFirstItemIndex.java
index 5e1c4cca66..32e5ee3589 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/SetCurrentPageFirstItemIndex.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/SetCurrentPageFirstItemIndex.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -15,7 +15,7 @@
*/
/**
- *
+ *
*/
package com.vaadin.tests.components.table;
@@ -29,7 +29,7 @@ import com.vaadin.ui.Table.ColumnHeaderMode;
import com.vaadin.ui.VerticalLayout;
/**
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -39,7 +39,7 @@ public class SetCurrentPageFirstItemIndex extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -83,7 +83,7 @@ public class SetCurrentPageFirstItemIndex extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -93,7 +93,7 @@ public class SetCurrentPageFirstItemIndex extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
@@ -104,7 +104,8 @@ public class SetCurrentPageFirstItemIndex extends AbstractTestUI {
public class ImageGenerator implements ColumnGenerator {
@Override
- public Object generateCell(Table source, Object itemId, Object columnId) {
+ public Object generateCell(Table source, Object itemId,
+ Object columnId) {
return "" + itemId;
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/SetPageFirstItemLoadsNeededRowsOnly.java b/uitest/src/main/java/com/vaadin/tests/components/table/SetPageFirstItemLoadsNeededRowsOnly.java
index e643ef5fa0..97a240ae2e 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/SetPageFirstItemLoadsNeededRowsOnly.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/SetPageFirstItemLoadsNeededRowsOnly.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ import com.vaadin.ui.Table;
import com.vaadin.ui.VerticalLayout;
/**
- *
+ *
* @author Vaadin Ltd
*/
@@ -35,7 +35,7 @@ public class SetPageFirstItemLoadsNeededRowsOnly extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -70,7 +70,7 @@ public class SetPageFirstItemLoadsNeededRowsOnly extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -82,7 +82,7 @@ public class SetPageFirstItemLoadsNeededRowsOnly extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/ShowLastItem.java b/uitest/src/main/java/com/vaadin/tests/components/table/ShowLastItem.java
index 6d6f744918..d73aa7a4f3 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/ShowLastItem.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/ShowLastItem.java
@@ -10,7 +10,7 @@ public class ShowLastItem extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -35,7 +35,8 @@ public class ShowLastItem extends AbstractTestUI {
table.addItem(itemId).getItemProperty("Col")
.setValue(String.valueOf(itemId));
- table.setCurrentPageFirstItemIndex(table.getItemIds().size() - 1);
+ table.setCurrentPageFirstItemIndex(
+ table.getItemIds().size() - 1);
}
});
@@ -45,7 +46,7 @@ public class ShowLastItem extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -55,7 +56,7 @@ public class ShowLastItem extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/SortLabelsInTable.java b/uitest/src/main/java/com/vaadin/tests/components/table/SortLabelsInTable.java
index 499cce58c8..d27ff16998 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/SortLabelsInTable.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/SortLabelsInTable.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/SortableHeaderStyles.java b/uitest/src/main/java/com/vaadin/tests/components/table/SortableHeaderStyles.java
index a41f4248d9..a961b0b205 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/SortableHeaderStyles.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/SortableHeaderStyles.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,16 +29,16 @@ public class SortableHeaderStyles extends AbstractTestUI {
@Override
protected void setup(VaadinRequest request) {
- getPage().getStyles().add(
- ".v-table-header-sortable { font-weight: bold;}");
+ getPage().getStyles()
+ .add(".v-table-header-sortable { font-weight: bold;}");
PersonContainer container = PersonContainer.createWithTestData();
Collection<?> sortableContainerPropertyIds = container
.getSortableContainerPropertyIds();
- final OptionGroup sortableSelector = new OptionGroup(
- "Sortable columns", sortableContainerPropertyIds);
+ final OptionGroup sortableSelector = new OptionGroup("Sortable columns",
+ sortableContainerPropertyIds);
sortableSelector.setMultiSelect(true);
sortableSelector.setValue(sortableContainerPropertyIds);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableAfterRemovingExpandRatios.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableAfterRemovingExpandRatios.java
index a2c8dd02e6..993524f20c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableAfterRemovingExpandRatios.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableAfterRemovingExpandRatios.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -17,7 +17,7 @@ package com.vaadin.tests.components.table;
/**
* Test that column natural width is restored after removing expand ratio
- *
+ *
* @author Vaadin Ltd
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableAndBrowserContextMenu.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableAndBrowserContextMenu.java
index eb5beec6bd..f38603b78d 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableAndBrowserContextMenu.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableAndBrowserContextMenu.java
@@ -13,8 +13,8 @@ import com.vaadin.ui.Component;
import com.vaadin.ui.Link;
import com.vaadin.ui.Table;
-public class TableAndBrowserContextMenu extends TestBase implements
- Action.Handler, ItemClickListener {
+public class TableAndBrowserContextMenu extends TestBase
+ implements Action.Handler, ItemClickListener {
private Table table;
private boolean actionHandlerHasActions = false;
@@ -53,7 +53,8 @@ public class TableAndBrowserContextMenu extends TestBase implements
});
addComponent(cbActionHandler);
- CheckBox cbActionHasActions = new CheckBox("Action handler has actions");
+ CheckBox cbActionHasActions = new CheckBox(
+ "Action handler has actions");
cbActionHasActions.setImmediate(true);
cbActionHasActions.addListener(new ValueChangeListener() {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableBlurFocus.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableBlurFocus.java
index d95b406c1a..cbf7887195 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableBlurFocus.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableBlurFocus.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -33,7 +33,7 @@ import com.vaadin.ui.Table;
/**
* Tests that previously focused component's blur event happens before any
* variable changes in the focused Table.
- *
+ *
* @author Vaadin Ltd
*/
public class TableBlurFocus extends AbstractTestUIWithLog {
@@ -134,8 +134,8 @@ public class TableBlurFocus extends AbstractTestUIWithLog {
Notification.show("Clicked!");
}
});
- table.addItem(new Object[] { "entryString" + x, buttonLabel,
- button, " " }, "entryID" + x);
+ table.addItem(new Object[] { "entryString" + x, buttonLabel, button,
+ " " }, "entryID" + x);
}
return table;
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableChildMeasurementHint.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableChildMeasurementHint.java
index dd5d162e17..a7d81427da 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableChildMeasurementHint.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableChildMeasurementHint.java
@@ -47,16 +47,16 @@ public class TableChildMeasurementHint extends AbstractTestUI {
table3.setSizeFull();
table3.setChildMeasurementHint(ChildMeasurementHint.MEASURE_NEVER);
- buttonLayout.addComponent(new Button("Show table1",
- new ClickListener() {
+ buttonLayout
+ .addComponent(new Button("Show table1", new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
layout.addComponent(table1);
table1.focus();
}
}));
- buttonLayout.addComponent(new Button("Show table2",
- new ClickListener() {
+ buttonLayout
+ .addComponent(new Button("Show table2", new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
layout.removeComponent(table1);
@@ -64,8 +64,8 @@ public class TableChildMeasurementHint extends AbstractTestUI {
table2.focus();
}
}));
- buttonLayout.addComponent(new Button("Show table3",
- new ClickListener() {
+ buttonLayout
+ .addComponent(new Button("Show table3", new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
layout.removeComponent(table2);
@@ -92,7 +92,8 @@ public class TableChildMeasurementHint extends AbstractTestUI {
for (int i = 0; i < 2; i++) {
table.addItem(
makeRow(new Object[] { "Nicolaus" + i, "Copernicus", 1473 },
- 5), j++);
+ 5),
+ j++);
table.addItem(
makeRow(new Object[] { "Tycho" + i, "Brahe", 1546 }, 5),
j++);
@@ -123,8 +124,8 @@ public class TableChildMeasurementHint extends AbstractTestUI {
@Override
public Object generateCell(Table components, Object o, Object o2) {
GridLayout b = new GridLayout();
- b.addComponents(new Label("l1"), new Button("b"), new Label(
- "l2"));
+ b.addComponents(new Label("l1"), new Button("b"),
+ new Label("l2"));
b.setWidthUndefined();
return b;
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableClickAndDragOnIconAndComponents.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableClickAndDragOnIconAndComponents.java
index 64f1a64558..c0cf73f43b 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableClickAndDragOnIconAndComponents.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableClickAndDragOnIconAndComponents.java
@@ -61,8 +61,8 @@ public class TableClickAndDragOnIconAndComponents extends AbstractTestUI {
Object columnId) {
Item item = source.getItem(itemId);
TextField textfield = new TextField();
- textfield.setValue(String.valueOf(item.getItemProperty("foo")
- .getValue()));
+ textfield.setValue(
+ String.valueOf(item.getItemProperty("foo").getValue()));
return textfield;
}
});
@@ -75,8 +75,8 @@ public class TableClickAndDragOnIconAndComponents extends AbstractTestUI {
Object columnId) {
Item item = source.getItem(itemId);
TextField textfield = new TextField();
- textfield.setValue(String.valueOf(item.getItemProperty("foo")
- .getValue()));
+ textfield.setValue(
+ String.valueOf(item.getItemProperty("foo").getValue()));
textfield.setReadOnly(true);
return textfield;
}
@@ -88,8 +88,8 @@ public class TableClickAndDragOnIconAndComponents extends AbstractTestUI {
@Override
public Component generateCell(Table source, Object itemId,
Object columnId) {
- Embedded embedded = new Embedded(null, new ThemeResource(
- "../runo/icons/16/ok.png"));
+ Embedded embedded = new Embedded(null,
+ new ThemeResource("../runo/icons/16/ok.png"));
return embedded;
}
});
@@ -134,8 +134,8 @@ public class TableClickAndDragOnIconAndComponents extends AbstractTestUI {
}
item.getItemProperty("foo").setValue("foo " + itemId);
item.getItemProperty("red").setValue("red " + itemId);
- item.getItemProperty("icon").setValue(
- new ThemeResource("../runo/icons/16/ok.png"));
+ item.getItemProperty("icon")
+ .setValue(new ThemeResource("../runo/icons/16/ok.png"));
}
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableClickValueChangeInteraction.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableClickValueChangeInteraction.java
index 6fa86543cb..f50a5c6a04 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableClickValueChangeInteraction.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableClickValueChangeInteraction.java
@@ -73,8 +73,8 @@ public class TableClickValueChangeInteraction extends TestBase {
@Override
public void valueChange(ValueChangeEvent event) {
- valueChangeLabel.setValue("Value "
- + event.getProperty().getValue());
+ valueChangeLabel.setValue(
+ "Value " + event.getProperty().getValue());
}
});
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableColumnAddAndResize.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableColumnAddAndResize.java
index 40751047b1..587acba8eb 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableColumnAddAndResize.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableColumnAddAndResize.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,15 +27,11 @@ public class TableColumnAddAndResize extends AbstractTestUI {
@Override
protected void setup(VaadinRequest request) {
- String people[][] = {
- { "Galileo", "Liked to go around the Sun" },
+ String people[][] = { { "Galileo", "Liked to go around the Sun" },
{ "Monnier", "Liked star charts" },
- { "VÀisÀlÀ", "Liked optics" },
- { "Oterma", "Liked comets" },
- {
- "Valtaoja",
- "Likes cosmology and still "
- + "lives unlike the others above" }, };
+ { "VÀisÀlÀ", "Liked optics" }, { "Oterma", "Liked comets" },
+ { "Valtaoja", "Likes cosmology and still "
+ + "lives unlike the others above" }, };
VerticalLayout content = new VerticalLayout();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableColumnWidthsAndSorting.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableColumnWidthsAndSorting.java
index 8f0a8803f3..b40cf2749d 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableColumnWidthsAndSorting.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableColumnWidthsAndSorting.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableContextMenu.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableContextMenu.java
index 9416ffe70c..1cfb28c793 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableContextMenu.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableContextMenu.java
@@ -17,7 +17,8 @@ public class TableContextMenu extends TestBase {
table.addActionHandler(new Action.Handler() {
@Override
- public void handleAction(Action action, Object sender, Object target) {
+ public void handleAction(Action action, Object sender,
+ Object target) {
Notification.show("Done that :-)");
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableContextMenuOnField.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableContextMenuOnField.java
index 3b639be21f..2638cf8c05 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableContextMenuOnField.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableContextMenuOnField.java
@@ -23,7 +23,8 @@ public class TableContextMenuOnField extends TestBase {
table.addActionHandler(new Action.Handler() {
@Override
- public void handleAction(Action action, Object sender, Object target) {
+ public void handleAction(Action action, Object sender,
+ Object target) {
// TODO Auto-generated method stub
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableContextMenuTouch.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableContextMenuTouch.java
index 1d909d101e..229df893b2 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableContextMenuTouch.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableContextMenuTouch.java
@@ -30,7 +30,8 @@ public class TableContextMenuTouch extends AbstractTestUI {
table.addActionHandler(new Action.Handler() {
@Override
- public void handleAction(Action action, Object sender, Object target) {
+ public void handleAction(Action action, Object sender,
+ Object target) {
Notification.show("Done that :-)");
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableExtraScrollbars.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableExtraScrollbars.java
index ccf521c500..00f3bb3463 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableExtraScrollbars.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableExtraScrollbars.java
@@ -42,8 +42,8 @@ public class TableExtraScrollbars extends AbstractTestCase {
for (int i = 0; i < ROWS; ++i) {
Item item = container.addItem(i);
for (int p = 0; p < PROPS; ++p) {
- item.getItemProperty("prop" + p).setValue(
- "property value 1234567890");
+ item.getItemProperty("prop" + p)
+ .setValue("property value 1234567890");
}
}
return container;
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableHeightWhenHidingHeaders.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableHeightWhenHidingHeaders.java
index 055820210a..70353ef48f 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableHeightWhenHidingHeaders.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableHeightWhenHidingHeaders.java
@@ -11,7 +11,7 @@ import com.vaadin.ui.Table;
* Setting table height and setting column header mode as hidden leaves the body
* height of the table as it would be with the headers visible and leaves an
* empty area below the body.
- *
+ *
*/
@SuppressWarnings("serial")
public class TableHeightWhenHidingHeaders extends AbstractTestCase {
@@ -39,7 +39,8 @@ public class TableHeightWhenHidingHeaders extends AbstractTestCase {
if ((Boolean) event.getProperty().getValue()) {
// table body height is now 77px, which together
// with header makes 100px
- table.setColumnHeaderMode(Table.COLUMN_HEADER_MODE_EXPLICIT_DEFAULTS_ID);
+ table.setColumnHeaderMode(
+ Table.COLUMN_HEADER_MODE_EXPLICIT_DEFAULTS_ID);
} else {
table.setColumnHeaderMode(Table.COLUMN_HEADER_MODE_HIDDEN);
// header disappears, but table body height stays at
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableItemDescriptionGeneratorUI.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableItemDescriptionGeneratorUI.java
index 809e639448..a0de92fca4 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableItemDescriptionGeneratorUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableItemDescriptionGeneratorUI.java
@@ -32,8 +32,8 @@ public class TableItemDescriptionGeneratorUI extends AbstractTestUI {
@Override
public void valueChange(ValueChangeEvent event) {
- table.setContainerDataSource(createContainer(componentDescription
- .getValue()));
+ table.setContainerDataSource(
+ createContainer(componentDescription.getValue()));
}
});
componentDescription.setImmediate(true);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableJumpUI.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableJumpUI.java
index 9718236c42..8454d27a98 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableJumpUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableJumpUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,7 +32,7 @@ import com.vaadin.ui.themes.ValoTheme;
/**
* Test for ensuring page doesn't jump up to the Table selection on IE with
* these steps:
- *
+ *
* <p>
* 1. refresh page <br>
* 2. click within URL bar <br>
@@ -44,7 +44,7 @@ import com.vaadin.ui.themes.ValoTheme;
* The problem is that IE for some reason does not fire a blur event for the
* table at step 4, leading to table thinking it is focused when it is updated
* in step 6.
- *
+ *
* @author Vaadin Ltd
*/
@Theme(ValoTheme.THEME_NAME)
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableMatchesMouseDownMouseUpElement.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableMatchesMouseDownMouseUpElement.java
index 1515589b4c..e5adaaf4c2 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableMatchesMouseDownMouseUpElement.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableMatchesMouseDownMouseUpElement.java
@@ -41,8 +41,8 @@ public class TableMatchesMouseDownMouseUpElement extends AbstractTestUI {
Item item = table.addItem("Item 1 (row 1)");
item.getItemProperty("Column 1").setValue("String A");
item.getItemProperty("Column 2").setValue(new Label("Label A"));
- item.getItemProperty("Column 3").setValue(
- new Label("<b>Label A</b>", ContentMode.HTML));
+ item.getItemProperty("Column 3")
+ .setValue(new Label("<b>Label A</b>", ContentMode.HTML));
VerticalLayout l = new VerticalLayout();
l.setId("row-1");
l.setHeight(100, Unit.PIXELS);
@@ -52,10 +52,9 @@ public class TableMatchesMouseDownMouseUpElement extends AbstractTestUI {
item.getItemProperty("Column 1").setValue("String B");
item.getItemProperty("Column 2").setValue(new Label("Label B"));
item.getItemProperty("Column 3")
- .setValue(
- new Label(
- "<a style=\"color: blue\" href=\"javascript:false\">Label B</a>",
- ContentMode.HTML));
+ .setValue(new Label(
+ "<a style=\"color: blue\" href=\"javascript:false\">Label B</a>",
+ ContentMode.HTML));
l = new VerticalLayout();
l.setId("row-2");
l.setSizeFull();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableMoveFocusWithSelection.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableMoveFocusWithSelection.java
index 8f6e6c685f..347368e224 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableMoveFocusWithSelection.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableMoveFocusWithSelection.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -33,7 +33,7 @@ public class TableMoveFocusWithSelection extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -72,9 +72,8 @@ public class TableMoveFocusWithSelection extends AbstractTestUI {
addComponent(t);
// Select mode
- Button toggleSelectMode = new Button(
- t.isMultiSelect() ? "Press to use single select"
- : "Press to use multi select");
+ Button toggleSelectMode = new Button(t.isMultiSelect()
+ ? "Press to use single select" : "Press to use multi select");
toggleSelectMode.setId("toggle-mode");
toggleSelectMode.addClickListener(new ClickListener() {
@@ -104,7 +103,7 @@ public class TableMoveFocusWithSelection extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -114,7 +113,7 @@ public class TableMoveFocusWithSelection extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableMultiSelectSimple.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableMultiSelectSimple.java
index d6a79759ac..58506e83a9 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableMultiSelectSimple.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableMultiSelectSimple.java
@@ -30,8 +30,8 @@ public class TableMultiSelectSimple extends TestBase {
@Override
public void valueChange(ValueChangeEvent event) {
- TreeSet<?> sorted = new TreeSet<Object>((Set<?>) event
- .getProperty().getValue());
+ TreeSet<?> sorted = new TreeSet<Object>(
+ (Set<?>) event.getProperty().getValue());
log.log("Selected value: " + sorted);
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableNavigationPageDown.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableNavigationPageDown.java
index b1281dcc7b..3221324b26 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableNavigationPageDown.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableNavigationPageDown.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableParentEnabledStateChange.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableParentEnabledStateChange.java
index 9aeb25002d..220e88ccdf 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableParentEnabledStateChange.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableParentEnabledStateChange.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -37,8 +37,8 @@ public class TableParentEnabledStateChange extends AbstractTestUIWithLog {
final MyCustomComponent customComponent = new MyCustomComponent();
- toggle = new Button("Toggle enabled state ; "
- + customComponent.isEnabled());
+ toggle = new Button(
+ "Toggle enabled state ; " + customComponent.isEnabled());
toggle.addClickListener(new Button.ClickListener() {
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableReduceContainerSize.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableReduceContainerSize.java
index 30db12371d..a7012976c0 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableReduceContainerSize.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableReduceContainerSize.java
@@ -73,8 +73,8 @@ public class TableReduceContainerSize extends TestBase {
label.setValue("Index: "
+ table.getCurrentPageFirstItemIndex());
} catch (Exception e) {
- label.setValue("Exception: "
- + e.getClass().getSimpleName());
+ label.setValue(
+ "Exception: " + e.getClass().getSimpleName());
}
}
});
@@ -95,8 +95,8 @@ public class TableReduceContainerSize extends TestBase {
label.setValue("Index: "
+ table.getCurrentPageFirstItemIndex());
} catch (Exception e) {
- label.setValue("Exception: "
- + e.getClass().getSimpleName());
+ label.setValue(
+ "Exception: " + e.getClass().getSimpleName());
}
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableRemovedQuicklySendsInvalidRpcCalls.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableRemovedQuicklySendsInvalidRpcCalls.java
index 710a4f8fe3..b475c99846 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableRemovedQuicklySendsInvalidRpcCalls.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableRemovedQuicklySendsInvalidRpcCalls.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -129,7 +129,8 @@ public class TableRemovedQuicklySendsInvalidRpcCalls extends AbstractTestUI {
}
@Override
- public void setDiffState(ClientConnector connector, JsonObject diffState) {
+ public void setDiffState(ClientConnector connector,
+ JsonObject diffState) {
tracker.setDiffState(connector, diffState);
}
@@ -161,7 +162,8 @@ public class TableRemovedQuicklySendsInvalidRpcCalls extends AbstractTestUI {
}
@Override
- public void cleanStreamVariable(String connectorId, String variableName) {
+ public void cleanStreamVariable(String connectorId,
+ String variableName) {
tracker.cleanStreamVariable(connectorId, variableName);
}
@@ -185,7 +187,8 @@ public class TableRemovedQuicklySendsInvalidRpcCalls extends AbstractTestUI {
@Override
public void cleanConcurrentlyRemovedConnectorIds(
int lastSyncIdSeenByClient) {
- tracker.cleanConcurrentlyRemovedConnectorIds(lastSyncIdSeenByClient);
+ tracker.cleanConcurrentlyRemovedConnectorIds(
+ lastSyncIdSeenByClient);
}
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableRepairsScrollPositionOnReAddingAllRows.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableRepairsScrollPositionOnReAddingAllRows.java
index bee0839663..acb2d8eb8e 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableRepairsScrollPositionOnReAddingAllRows.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableRepairsScrollPositionOnReAddingAllRows.java
@@ -14,10 +14,11 @@ import com.vaadin.ui.Table;
/**
* Scroll position should be restored when removing and re-adding all rows in
* Table.
- *
+ *
* @author Vaadin Ltd
*/
-public class TableRepairsScrollPositionOnReAddingAllRows extends AbstractTestUI {
+public class TableRepairsScrollPositionOnReAddingAllRows
+ extends AbstractTestUI {
private static final long serialVersionUID = 1L;
@@ -50,8 +51,8 @@ public class TableRepairsScrollPositionOnReAddingAllRows extends AbstractTestUI
@Override
public void buttonClick(com.vaadin.ui.Button.ClickEvent event) {
- List<TableItem> originalItemIds = new ArrayList<TableItem>(cont
- .getItemIds());
+ List<TableItem> originalItemIds = new ArrayList<TableItem>(
+ cont.getItemIds());
cont.removeAllItems();
cont.addAll(originalItemIds);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableRequiredIndicator.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableRequiredIndicator.java
index 2985932145..3067a8a82c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableRequiredIndicator.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableRequiredIndicator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableRowHeight.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableRowHeight.java
index eb5efbc4f3..d752364c38 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableRowHeight.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableRowHeight.java
@@ -33,12 +33,13 @@ public class TableRowHeight extends TestBase {
addComponent(table1);
Table table2 = initTable(PAGELENGTH, true, false, false);
- addComponent(new Label("Table with label component in generated column"));
+ addComponent(
+ new Label("Table with label component in generated column"));
addComponent(table2);
Table table3 = initTable(PAGELENGTH, false, true, false);
- addComponent(new Label(
- "Table with layout component in generated column"));
+ addComponent(
+ new Label("Table with layout component in generated column"));
addComponent(table3);
Table table4 = initTable(PAGELENGTH, true, true, false);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableRowHeight2.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableRowHeight2.java
index 5c733b9e24..c612af6194 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableRowHeight2.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableRowHeight2.java
@@ -46,7 +46,8 @@ public class TableRowHeight2 extends AbstractTestUI {
b.setStyleName(BaseTheme.BUTTON_LINK);
b.addStyleName("nowraplink");
- b.setCaption("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper, elit quis elementum iaculis, dui est rutrum risus, at cursus sem leo eget arcu. Proin vel eros ut tortor luctus pretium. Nulla facilisi. Donec in dui. Proin ac diam vitae massa tempus faucibus. Fusce eu risus. Nunc ac risus. Cras libero.");
+ b.setCaption(
+ "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper, elit quis elementum iaculis, dui est rutrum risus, at cursus sem leo eget arcu. Proin vel eros ut tortor luctus pretium. Nulla facilisi. Donec in dui. Proin ac diam vitae massa tempus faucibus. Fusce eu risus. Nunc ac risus. Cras libero.");
item.getItemProperty("title").setValue(b);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableRowHeight3.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableRowHeight3.java
index c31b87f9da..5acc9713f3 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableRowHeight3.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableRowHeight3.java
@@ -40,7 +40,8 @@ public class TableRowHeight3 extends TestBase {
b.setStyleName(BaseTheme.BUTTON_LINK);
b.addStyleName("nowraplink");
if (i < 2) {
- b.setCaption("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper, elit quis elementum iaculis, dui est rutrum risus, at cursus sem leo eget arcu. Proin vel eros ut tortor luctus pretium. Nulla facilisi. Donec in dui. Proin ac diam vitae massa tempus faucibus. Fusce eu risus. Nunc ac risus. Cras libero.");
+ b.setCaption(
+ "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper, elit quis elementum iaculis, dui est rutrum risus, at cursus sem leo eget arcu. Proin vel eros ut tortor luctus pretium. Nulla facilisi. Donec in dui. Proin ac diam vitae massa tempus faucibus. Fusce eu risus. Nunc ac risus. Cras libero.");
} else if (2 <= i && i < 4) {
b.setCaption("One line");
} else {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableRowScrolledBottom.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableRowScrolledBottom.java
index e1fe4d0514..0574a1de6c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableRowScrolledBottom.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableRowScrolledBottom.java
@@ -28,10 +28,12 @@ public class TableRowScrolledBottom extends AbstractTestUI {
public void buttonClick(Button.ClickEvent event) {
for (int j = 0; j < 100; j++) {
++i;
- table.addItem(new Object[] { new Label(part1 + "<b>" + i
- + "</b>" + part2, ContentMode.HTML) }, i);
- table.setCurrentPageFirstItemIndex(table
- .getContainerDataSource().size() - 1);
+ table.addItem(new Object[] {
+ new Label(part1 + "<b>" + i + "</b>" + part2,
+ ContentMode.HTML) },
+ i);
+ table.setCurrentPageFirstItemIndex(
+ table.getContainerDataSource().size() - 1);
}
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableScrollAfterAddRow.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableScrollAfterAddRow.java
index d1d6edaa67..c6512cebc1 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableScrollAfterAddRow.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableScrollAfterAddRow.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -16,7 +16,7 @@
package com.vaadin.tests.components.table;
/**
- *
+ *
* @author Vaadin Ltd
*/
import com.vaadin.data.Item;
@@ -31,13 +31,13 @@ import com.vaadin.ui.VerticalLayout;
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -46,7 +46,7 @@ import com.vaadin.ui.VerticalLayout;
*/
/**
- *
+ *
* @author Vaadin Ltd
*/
@SuppressWarnings("serial")
@@ -54,7 +54,7 @@ public class TableScrollAfterAddRow extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.UI#init(com.vaadin.server.VaadinRequest)
*/
@Override
@@ -114,8 +114,8 @@ public class TableScrollAfterAddRow extends AbstractTestUI {
new NativeButton.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- label.setValue(Integer.toString(table
- .getCurrentPageFirstItemIndex()));
+ label.setValue(Integer.toString(
+ table.getCurrentPageFirstItemIndex()));
}
});
layout.addComponent(addRowButton);
@@ -146,7 +146,7 @@ public class TableScrollAfterAddRow extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -157,7 +157,7 @@ public class TableScrollAfterAddRow extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableScrollUpOnSelect.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableScrollUpOnSelect.java
index 0e2e1b76e1..9d66e166bf 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableScrollUpOnSelect.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableScrollUpOnSelect.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import com.vaadin.ui.Window;
* Test to see if Table appears to scroll up under an obscure set of conditions
* (Scrolled down, set to expand, selecting updates a TextField that precedes
* the Table in a VerticalLayout.) (#10106)
- *
+ *
* @author Vaadin Ltd
*/
public class TableScrollUpOnSelect extends AbstractTestUI {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableScrollingWithSQLContainer.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableScrollingWithSQLContainer.java
index 61f8952041..29fd306aca 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableScrollingWithSQLContainer.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableScrollingWithSQLContainer.java
@@ -44,8 +44,8 @@ public class TableScrollingWithSQLContainer extends UI {
// Will fail if table doesn't exist, which is OK.
conn.rollback();
}
- statement
- .execute("create table people (id integer generated always as identity,"
+ statement.execute(
+ "create table people (id integer generated always as identity,"
+ " name varchar(32), AGE INTEGER)");
statement.execute("alter table people add primary key (id)");
for (int i = 0; i < 5000; i++) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableSelectPagingOff.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableSelectPagingOff.java
index d97e0a5cef..e9ddd2d20e 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableSelectPagingOff.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableSelectPagingOff.java
@@ -21,9 +21,10 @@ public class TableSelectPagingOff extends TestBase {
}
private Collection<MyBean> getBeans() {
- return Arrays.asList(new MyBean("a", "description a"), new MyBean("b",
- "description b"), new MyBean("c", "description c"), new MyBean(
- "d", "description d"));
+ return Arrays.asList(new MyBean("a", "description a"),
+ new MyBean("b", "description b"),
+ new MyBean("c", "description c"),
+ new MyBean("d", "description d"));
}
public class MyBean {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableSetUndefinedSize.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableSetUndefinedSize.java
index e355c0d0ea..7a857995df 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableSetUndefinedSize.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableSetUndefinedSize.java
@@ -36,22 +36,22 @@ public class TableSetUndefinedSize extends AbstractTestUI {
private HorizontalLayout createWidthButtons(final Table table) {
HorizontalLayout layout = new HorizontalLayout();
- layout.addComponent(new Button("width 500px",
- new Button.ClickListener() {
+ layout.addComponent(
+ new Button("width 500px", new Button.ClickListener() {
@Override
public void buttonClick(Button.ClickEvent event) {
table.setWidth("500px");
}
}));
- layout.addComponent(new Button("width 100%",
- new Button.ClickListener() {
+ layout.addComponent(
+ new Button("width 100%", new Button.ClickListener() {
@Override
public void buttonClick(Button.ClickEvent event) {
table.setWidth("100%");
}
}));
- layout.addComponent(new Button("undefined width",
- new Button.ClickListener() {
+ layout.addComponent(
+ new Button("undefined width", new Button.ClickListener() {
@Override
public void buttonClick(Button.ClickEvent event) {
table.setWidthUndefined();
@@ -64,29 +64,29 @@ public class TableSetUndefinedSize extends AbstractTestUI {
private HorizontalLayout createHeigthButtons(final Table table) {
HorizontalLayout layout = new HorizontalLayout();
- layout.addComponent(new Button("height 200px",
- new Button.ClickListener() {
+ layout.addComponent(
+ new Button("height 200px", new Button.ClickListener() {
@Override
public void buttonClick(Button.ClickEvent event) {
table.setHeight("200px");
}
}));
- layout.addComponent(new Button("height 300px",
- new Button.ClickListener() {
+ layout.addComponent(
+ new Button("height 300px", new Button.ClickListener() {
@Override
public void buttonClick(Button.ClickEvent event) {
table.setHeight("300px");
}
}));
- layout.addComponent(new Button("height 100%",
- new Button.ClickListener() {
+ layout.addComponent(
+ new Button("height 100%", new Button.ClickListener() {
@Override
public void buttonClick(Button.ClickEvent event) {
table.setHeight("100%");
}
}));
- layout.addComponent(new Button("undefined height",
- new Button.ClickListener() {
+ layout.addComponent(
+ new Button("undefined height", new Button.ClickListener() {
@Override
public void buttonClick(Button.ClickEvent event) {
table.setHeightUndefined();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableShouldNotEatValueChanges.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableShouldNotEatValueChanges.java
index 030a4ee259..6dc37aacd6 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableShouldNotEatValueChanges.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableShouldNotEatValueChanges.java
@@ -12,7 +12,8 @@ public class TableShouldNotEatValueChanges extends TestBase {
@Override
protected void setup() {
- Table t = new Table("Table with multiselection and item click listener");
+ Table t = new Table(
+ "Table with multiselection and item click listener");
t.focus();
t.setPageLength(3);
t.addContainerProperty("foo", String.class, "bar");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableSizeInTabsheet.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableSizeInTabsheet.java
index da37d1f2d2..4ee80d8643 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableSizeInTabsheet.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableSizeInTabsheet.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableSorting.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableSorting.java
index 85819784c0..48b98987ad 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableSorting.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableSorting.java
@@ -34,8 +34,8 @@ public class TableSorting extends TestBase {
testTable.addListener(new Property.ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
- System.out.println("ValueChanged: "
- + testTable.getValue().toString());
+ System.out.println(
+ "ValueChanged: " + testTable.getValue().toString());
showID.setCaption("ID: " + testTable.getValue().toString());
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableSortingIndicator.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableSortingIndicator.java
index 93fe8d7d9e..a032cd142c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableSortingIndicator.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableSortingIndicator.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -29,14 +29,14 @@ import com.vaadin.ui.Table;
/**
* Test if the table sorting indicators update correctly when the table is
* sorted serverside
- *
+ *
* @author Vaadin Ltd
*/
public class TableSortingIndicator extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -70,7 +70,7 @@ public class TableSortingIndicator extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -80,7 +80,7 @@ public class TableSortingIndicator extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableSqlContainer.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableSqlContainer.java
index 3b5949dd40..4a9ef40ab3 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableSqlContainer.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableSqlContainer.java
@@ -59,8 +59,8 @@ public class TableSqlContainer extends AbstractTestUI {
table.addValueChangeListener(new Property.ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
- selectedLabel.setValue("Selected: "
- + event.getProperty().getValue());
+ selectedLabel.setValue(
+ "Selected: " + event.getProperty().getValue());
}
});
@@ -76,7 +76,7 @@ public class TableSqlContainer extends AbstractTestUI {
/**
* (Re)creates the test table
- *
+ *
* @param connectionPool
*/
private void createTestTable(JDBCConnectionPool connectionPool) {
@@ -102,7 +102,7 @@ public class TableSqlContainer extends AbstractTestUI {
/**
* Adds test data to the test table
- *
+ *
* @param connectionPool
* @throws SQLException
*/
@@ -113,14 +113,14 @@ public class TableSqlContainer extends AbstractTestUI {
conn = connectionPool.reserveConnection();
Statement statement = conn.createStatement();
- statement
- .executeUpdate("INSERT INTO mytable VALUES(1, '2013-05-24', 'A0')");
- statement
- .executeUpdate("INSERT INTO mytable VALUES(2, '2013-04-26', 'A1')");
- statement
- .executeUpdate("INSERT INTO mytable VALUES(3, '2013-05-27', 'B0')");
- statement
- .executeUpdate("INSERT INTO mytable VALUES(4, '2013-04-28', 'B1')");
+ statement.executeUpdate(
+ "INSERT INTO mytable VALUES(1, '2013-05-24', 'A0')");
+ statement.executeUpdate(
+ "INSERT INTO mytable VALUES(2, '2013-04-26', 'A1')");
+ statement.executeUpdate(
+ "INSERT INTO mytable VALUES(3, '2013-05-27', 'B0')");
+ statement.executeUpdate(
+ "INSERT INTO mytable VALUES(4, '2013-04-28', 'B1')");
statement.close();
conn.commit();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableToggleColumnVisibility.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableToggleColumnVisibility.java
index e78f247184..6aac469c26 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableToggleColumnVisibility.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableToggleColumnVisibility.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableToggleColumnVisibilityWidth.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableToggleColumnVisibilityWidth.java
index 442f00f346..b29207943b 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableToggleColumnVisibilityWidth.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableToggleColumnVisibilityWidth.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -58,7 +58,8 @@ public class TableToggleColumnVisibilityWidth extends AbstractTestUI {
if (detailed) {
table.setVisibleColumns(new Object[] { "Name" });
} else {
- table.setVisibleColumns(new Object[] { "Name", "Last Name" });
+ table.setVisibleColumns(
+ new Object[] { "Name", "Last Name" });
}
detailed = !detailed;
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableToggleVisibility.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableToggleVisibility.java
index f89d2d2934..856d9e04fd 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableToggleVisibility.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableToggleVisibility.java
@@ -148,9 +148,9 @@ public class TableToggleVisibility extends AbstractTestCase {
ToggleButton.this.table.setVisible(!wasVisible);
setCaption((wasVisible ? "+ " : "- ")
+ ToggleButton.this.table.getCaption());
- setDescription((wasVisible ? "Show " : "Hide ")
- + "the list with "
- + ToggleButton.this.table.getCaption());
+ setDescription(
+ (wasVisible ? "Show " : "Hide ") + "the list with "
+ + ToggleButton.this.table.getCaption());
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableTooManyColumns.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableTooManyColumns.java
index 2d27636420..ac50b5c149 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableTooManyColumns.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableTooManyColumns.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -44,7 +44,7 @@ public class TableTooManyColumns extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -54,7 +54,7 @@ public class TableTooManyColumns extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableUndefinedSize.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableUndefinedSize.java
index 544fe9bb67..0430061946 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableUndefinedSize.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableUndefinedSize.java
@@ -37,8 +37,8 @@ public class TableUndefinedSize extends TestBase {
log = new Log(5);
- controls.addComponent(new Button("Fixed size (200x200)",
- new Button.ClickListener() {
+ controls.addComponent(
+ new Button("Fixed size (200x200)", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
tbl.setWidth("200px");
@@ -47,8 +47,8 @@ public class TableUndefinedSize extends TestBase {
}
}));
- controls.addComponent(new Button("Fixed size (600x200)",
- new Button.ClickListener() {
+ controls.addComponent(
+ new Button("Fixed size (600x200)", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
tbl.setWidth("600px");
@@ -57,8 +57,8 @@ public class TableUndefinedSize extends TestBase {
}
}));
- controls.addComponent(new Button("Undefined size",
- new Button.ClickListener() {
+ controls.addComponent(
+ new Button("Undefined size", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
tbl.setSizeUndefined();
@@ -66,15 +66,15 @@ public class TableUndefinedSize extends TestBase {
}
}));
- NativeSelect pageLength = new NativeSelect("PageLength", Arrays.asList(
- 0, 1, 2, 4, 8, 10));
+ NativeSelect pageLength = new NativeSelect("PageLength",
+ Arrays.asList(0, 1, 2, 4, 8, 10));
pageLength.setImmediate(true);
pageLength.setNullSelectionAllowed(false);
pageLength.addListener(new Property.ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
- int pageLength = Integer.valueOf(event.getProperty().getValue()
- .toString());
+ int pageLength = Integer
+ .valueOf(event.getProperty().getValue().toString());
tbl.setPageLength(pageLength);
log.log("Page length: " + pageLength);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableUnregisterComponent.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableUnregisterComponent.java
index 11f450baf2..5912e8b148 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableUnregisterComponent.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableUnregisterComponent.java
@@ -30,7 +30,8 @@ public class TableUnregisterComponent extends TestBase {
container.addContainerProperty(COL_B, String.class, "");
Item it = container.addItem("a");
- final ObjectProperty<String> valA = new ObjectProperty<String>("orgVal");
+ final ObjectProperty<String> valA = new ObjectProperty<String>(
+ "orgVal");
final TextField fieldA = new TextField(valA) {
@Override
public void setPropertyDataSource(Property newDataSource) {
@@ -54,7 +55,8 @@ public class TableUnregisterComponent extends TestBase {
if (COL_B.equals(propertyId)) {
Field<String> field = new TextField() {
@Override
- public void setPropertyDataSource(Property newDataSource) {
+ public void setPropertyDataSource(
+ Property newDataSource) {
super.setPropertyDataSource(newDataSource);
if (newDataSource == null) {
log.log("Edit field property data source cleared");
@@ -78,7 +80,8 @@ public class TableUnregisterComponent extends TestBase {
addComponent(new Button("Switch column collapse", new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- table.setColumnCollapsed(COL_A, !table.isColumnCollapsed(COL_A));
+ table.setColumnCollapsed(COL_A,
+ !table.isColumnCollapsed(COL_A));
}
}));
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableWidthItemRemove.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableWidthItemRemove.java
index bd84fab309..2b7fe48536 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableWidthItemRemove.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableWidthItemRemove.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -24,14 +24,14 @@ import com.vaadin.ui.Table;
/**
* Test whether adding the first item to a table calculates the table width
* correctly
- *
+ *
* @author Vaadin Ltd
*/
public class TableWidthItemRemove extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -55,8 +55,7 @@ public class TableWidthItemRemove extends AbstractTestUI {
addButton("Populate", new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- table.addItem(
- new Object[] { "John", "Doe", new Integer(1980) },
+ table.addItem(new Object[] { "John", "Doe", new Integer(1980) },
Math.random() * 1000);
}
});
@@ -66,7 +65,7 @@ public class TableWidthItemRemove extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -76,7 +75,7 @@ public class TableWidthItemRemove extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableWithBrokenGeneratorAndContainer.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableWithBrokenGeneratorAndContainer.java
index c571329d14..631ba22f97 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableWithBrokenGeneratorAndContainer.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableWithBrokenGeneratorAndContainer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -45,11 +45,11 @@ public class TableWithBrokenGeneratorAndContainer extends TestBase {
/**
* Container which throws an exception on every fifth call to
* {@link #getContainerProperty(Object, Object)}.
- *
+ *
* @author Vaadin Ltd
* @version @VERSION@
* @since 7.0
- *
+ *
*/
public class BrokenContainer extends IndexedContainer {
private int counter = 0;
@@ -79,11 +79,12 @@ public class TableWithBrokenGeneratorAndContainer extends TestBase {
}
@Override
- public Object generateCell(Table source, Object itemId, Object columnId) {
+ public Object generateCell(Table source, Object itemId,
+ Object columnId) {
if (counter++ % brokenInterval == 0
&& Boolean.TRUE.equals(brokenGenerator.getValue())) {
- throw new IllegalArgumentException("Broken generator for "
- + itemId + "/" + columnId);
+ throw new IllegalArgumentException(
+ "Broken generator for " + itemId + "/" + columnId);
} else {
return "Generated " + itemId + "/" + columnId;
}
@@ -142,9 +143,9 @@ public class TableWithBrokenGeneratorAndContainer extends TestBase {
Table table = ((CacheUpdateException) t)
.getTable();
table.removeAllItems();
- Notification
- .show("Problem updating table. Please try again later",
- Notification.Type.ERROR_MESSAGE);
+ Notification.show(
+ "Problem updating table. Please try again later",
+ Notification.Type.ERROR_MESSAGE);
}
}
}
@@ -164,8 +165,8 @@ public class TableWithBrokenGeneratorAndContainer extends TestBase {
for (int i = 1; i <= rows; i++) {
Item item = container.addItem("item" + i);
for (int j = 1; j <= cols; j++) {
- item.getItemProperty("prop" + j).setValue(
- "item" + i + "/prop" + j);
+ item.getItemProperty("prop" + j)
+ .setValue("item" + i + "/prop" + j);
}
}
return container;
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableWithChildComponents.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableWithChildComponents.java
index 7eb9c3239c..cfec94e6c3 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableWithChildComponents.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableWithChildComponents.java
@@ -11,7 +11,8 @@ import com.vaadin.ui.NativeButton;
import com.vaadin.ui.Table;
import com.vaadin.ui.Table.ColumnGenerator;
-public class TableWithChildComponents extends TestBase implements ClickListener {
+public class TableWithChildComponents extends TestBase
+ implements ClickListener {
private static final String COL2 = "Column 2 - generated";
private static final String COL1 = "Column 1 - components";
@@ -30,16 +31,15 @@ public class TableWithChildComponents extends TestBase implements ClickListener
@Override
public Object generateCell(Table source, Object itemId,
Object columnId) {
- return new Button(
- "Item id: " + itemId + " column: " + columnId,
+ return new Button("Item id: " + itemId + " column: " + columnId,
TableWithChildComponents.this);
}
});
for (int i = 0; i < 100; i++) {
Item item = table.addItem("Row " + i);
- item.getItemProperty(COL1).setValue(
- new NativeButton("Row " + i + " native", this));
+ item.getItemProperty(COL1)
+ .setValue(new NativeButton("Row " + i + " native", this));
}
addComponent(table);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableWithContainerRequiringEqualsForItemId.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableWithContainerRequiringEqualsForItemId.java
index 4ca83b22bd..3d2ead9fe9 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableWithContainerRequiringEqualsForItemId.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableWithContainerRequiringEqualsForItemId.java
@@ -18,19 +18,22 @@ public class TableWithContainerRequiringEqualsForItemId extends AbstractTestUI {
private MyEntityContainer container = new MyEntityContainer();
private Log log = new Log(10);
- public static class MyEntityContainer extends BeanContainer<Long, MyEntity> {
+ public static class MyEntityContainer
+ extends BeanContainer<Long, MyEntity> {
public MyEntityContainer() {
super(MyEntity.class);
- setBeanIdResolver(new BeanIdResolver<Long, TableWithContainerRequiringEqualsForItemId.MyEntity>() {
-
- @Override
- public Long getIdForBean(MyEntity bean) {
- // Return a new instance every time to ensure Table can
- // handle it
- return new Long(bean.getId());
- }
- });
+ setBeanIdResolver(
+ new BeanIdResolver<Long, TableWithContainerRequiringEqualsForItemId.MyEntity>() {
+
+ @Override
+ public Long getIdForBean(MyEntity bean) {
+ // Return a new instance every time to ensure Table
+ // can
+ // handle it
+ return new Long(bean.getId());
+ }
+ });
}
@@ -66,14 +69,15 @@ public class TableWithContainerRequiringEqualsForItemId extends AbstractTestUI {
for (int i = 0; i < 1000; i++) {
MyEntity myEntity = new MyEntity(i + "st");
- myEntity.setCreated(new Date(new Date().getTime() - 24 * 60 * 60
- * 1000L));
+ myEntity.setCreated(
+ new Date(new Date().getTime() - 24 * 60 * 60 * 1000L));
myEntity.setId(i);
container.addBean(myEntity);
}
t.setContainerDataSource(container);
- t.setVisibleColumns(new Object[] { "id", "created", "name", "Actions" });
+ t.setVisibleColumns(
+ new Object[] { "id", "created", "name", "Actions" });
addComponent(t);
addComponent(log);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableWithCustomConverterFactory.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableWithCustomConverterFactory.java
index a3f0ce2f13..a6a5747b85 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableWithCustomConverterFactory.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableWithCustomConverterFactory.java
@@ -25,8 +25,8 @@ import com.vaadin.ui.Table;
public class TableWithCustomConverterFactory extends AbstractTestUI {
- public static class MyIntegerConverter implements
- Converter<String, Integer> {
+ public static class MyIntegerConverter
+ implements Converter<String, Integer> {
@Override
public Integer convertToModel(String value,
@@ -57,7 +57,8 @@ public class TableWithCustomConverterFactory extends AbstractTestUI {
public static class MyConverterFactory extends DefaultConverterFactory {
@Override
- protected Converter<String, ?> createStringConverter(Class<?> sourceType) {
+ protected Converter<String, ?> createStringConverter(
+ Class<?> sourceType) {
if (Integer.class.isAssignableFrom(sourceType)) {
return new MyIntegerConverter();
} else {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableWithNoncollapsibleColumns.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableWithNoncollapsibleColumns.java
index 226fde3b29..6cd5995296 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableWithNoncollapsibleColumns.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableWithNoncollapsibleColumns.java
@@ -21,9 +21,10 @@ public class TableWithNoncollapsibleColumns extends TestBase {
table.addContainerProperty("Column 1 - noncollapsible", String.class,
null);
- table.addContainerProperty("Column 2 - collapsible", String.class, null);
- table.addContainerProperty("Column 3 - toggle collapsing",
- String.class, null);
+ table.addContainerProperty("Column 2 - collapsible", String.class,
+ null);
+ table.addContainerProperty("Column 3 - toggle collapsing", String.class,
+ null);
table.setColumnCollapsible("Column 1 - noncollapsible", false);
layout.addComponent(table);
@@ -32,18 +33,18 @@ public class TableWithNoncollapsibleColumns extends TestBase {
new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- table.setColumnCollapsed(
- "Column 1 - noncollapsible",
- !table.isColumnCollapsed("Column 1 - noncollapsible"));
+ table.setColumnCollapsed("Column 1 - noncollapsible",
+ !table.isColumnCollapsed(
+ "Column 1 - noncollapsible"));
}
});
final Button button2 = new Button("Column 2: collapse/show",
new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- table.setColumnCollapsed(
- "Column 2 - collapsible",
- !table.isColumnCollapsed("Column 2 - collapsible"));
+ table.setColumnCollapsed("Column 2 - collapsible",
+ !table.isColumnCollapsed(
+ "Column 2 - collapsible"));
}
});
@@ -51,9 +52,9 @@ public class TableWithNoncollapsibleColumns extends TestBase {
new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- table.setColumnCollapsed(
- "Column 3 - toggle collapsing",
- !table.isColumnCollapsed("Column 3 - toggle collapsing"));
+ table.setColumnCollapsed("Column 3 - toggle collapsing",
+ !table.isColumnCollapsed(
+ "Column 3 - toggle collapsing"));
}
});
final Button button4 = new Button(
@@ -63,7 +64,8 @@ public class TableWithNoncollapsibleColumns extends TestBase {
public void buttonClick(ClickEvent event) {
table.setColumnCollapsible(
"Column 3 - toggle collapsing",
- !table.isColumnCollapsible("Column 3 - toggle collapsing"));
+ !table.isColumnCollapsible(
+ "Column 3 - toggle collapsing"));
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableWithPolling.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableWithPolling.java
index fdd5c2901a..ebfe4df455 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableWithPolling.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableWithPolling.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -40,8 +40,9 @@ public class TableWithPolling extends AbstractTestUI {
table.addContainerProperty("Last Name", String.class, null);
table.addContainerProperty("Year", Integer.class, null);
- table.addItem(new Object[] { "Nicolaus", "Copernicus",
- new Integer(1473) }, new Integer(1));
+ table.addItem(
+ new Object[] { "Nicolaus", "Copernicus", new Integer(1473) },
+ new Integer(1));
table.addItem(new Object[] { "Tycho", "Brahe", new Integer(1546) },
new Integer(2));
table.addItem(new Object[] { "Giordano", "Bruno", new Integer(1548) },
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/Tables.java b/uitest/src/main/java/com/vaadin/tests/components/table/Tables.java
index e82cb8321f..f6dfc6de4b 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/Tables.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/Tables.java
@@ -59,8 +59,8 @@ public class Tables<T extends Table> extends AbstractSelectTestCase<T>
private Command<T, Boolean> columnVisibleCommand = new Command<T, Boolean>() {
@Override
public void execute(Table c, Boolean visible, Object propertyId) {
- List<Object> visibleColumns = new ArrayList<Object>(Arrays.asList(c
- .getVisibleColumns()));
+ List<Object> visibleColumns = new ArrayList<Object>(
+ Arrays.asList(c.getVisibleColumns()));
if (visible) {
// Table should really check this... Completely fails without
// the check (#
@@ -205,7 +205,8 @@ public class Tables<T extends Table> extends AbstractSelectTestCase<T>
private Command<T, ColumnHeaderMode> columnHeaderModeCommand = new Command<T, ColumnHeaderMode>() {
@Override
- public void execute(T c, ColumnHeaderMode columnHeaderMode, Object data) {
+ public void execute(T c, ColumnHeaderMode columnHeaderMode,
+ Object data) {
c.setColumnHeaderMode(columnHeaderMode);
}
@@ -246,8 +247,8 @@ public class Tables<T extends Table> extends AbstractSelectTestCase<T>
@Override
public void execute(T c, final GeneratedColumn col, Object data) {
- while (c.getColumnGenerator(generatedColumnId
- + generatedColumnNextNr) != null) {
+ while (c.getColumnGenerator(
+ generatedColumnId + generatedColumnNextNr) != null) {
generatedColumnNextNr++;
}
@@ -314,7 +315,8 @@ public class Tables<T extends Table> extends AbstractSelectTestCase<T>
private final Object itemId;
private final Object propertyId;
- public CellStyleInfo(String styleName, Object itemId, Object propertyId) {
+ public CellStyleInfo(String styleName, Object itemId,
+ Object propertyId) {
this.styleName = styleName;
this.itemId = itemId;
this.propertyId = propertyId;
@@ -322,15 +324,17 @@ public class Tables<T extends Table> extends AbstractSelectTestCase<T>
public boolean appliesTo(Object itemId, Object propertyId) {
return (this.itemId != null && this.itemId.equals(itemId))
- && (this.propertyId == propertyId || (this.propertyId != null && this.propertyId
- .equals(propertyId)));
+ && (this.propertyId == propertyId
+ || (this.propertyId != null
+ && this.propertyId.equals(propertyId)));
}
}
private Command<T, CellStyleInfo> cellStyleCommand = new Command<T, CellStyleInfo>() {
@Override
- public void execute(T c, final CellStyleInfo cellStyleInfo, Object data) {
+ public void execute(T c, final CellStyleInfo cellStyleInfo,
+ Object data) {
if (cellStyleInfo == null) {
c.setCellStyleGenerator(null);
} else {
@@ -384,12 +388,13 @@ public class Tables<T extends Table> extends AbstractSelectTestCase<T>
c.setRowGenerator(new RowGenerator() {
@Override
- public GeneratedRow generateRow(Table table, Object itemId) {
+ public GeneratedRow generateRow(Table table,
+ Object itemId) {
if (generatedRowInfo.appliesTo(itemId)) {
GeneratedRow generatedRow = new GeneratedRow(
generatedRowInfo.text);
- generatedRow
- .setHtmlContentAllowed(generatedRowInfo.isHtml);
+ generatedRow.setHtmlContentAllowed(
+ generatedRowInfo.isHtml);
return generatedRow;
}
return null;
@@ -455,34 +460,34 @@ public class Tables<T extends Table> extends AbstractSelectTestCase<T>
createClickAction("Add Button", category, addGeneratedColumnCommand,
new GeneratedColumn(Button.class, null, false));
createClickAction("Add 200px wide Button", category,
- addGeneratedColumnCommand, new GeneratedColumn(Button.class,
- "200px", false));
+ addGeneratedColumnCommand,
+ new GeneratedColumn(Button.class, "200px", false));
createClickAction("Add 100% wide Button", category,
- addGeneratedColumnCommand, new GeneratedColumn(Button.class,
- "100%", false));
+ addGeneratedColumnCommand,
+ new GeneratedColumn(Button.class, "100%", false));
createClickAction("Add Label", category, addGeneratedColumnCommand,
new GeneratedColumn(Label.class, null, false));
createClickAction("Add 100px Label", category,
- addGeneratedColumnCommand, new GeneratedColumn(Label.class,
- "100px", false));
+ addGeneratedColumnCommand,
+ new GeneratedColumn(Label.class, "100px", false));
createClickAction("Add 100% wide Label", category,
- addGeneratedColumnCommand, new GeneratedColumn(Label.class,
- "100%", false));
+ addGeneratedColumnCommand,
+ new GeneratedColumn(Label.class, "100%", false));
createClickAction("Remove generated columns", category,
removeGeneratedColumnsCommand, null);
createClickAction("Add string as generated column", category,
- addGeneratedColumnCommand, new GeneratedColumn(String.class,
- "", false));
+ addGeneratedColumnCommand,
+ new GeneratedColumn(String.class, "", false));
createClickAction("Add HTML string as generated column", category,
- addGeneratedColumnCommand, new GeneratedColumn(String.class,
- "", true));
+ addGeneratedColumnCommand,
+ new GeneratedColumn(String.class, "", true));
createClickAction("Add 100px HTML Label", category,
- addGeneratedColumnCommand, new GeneratedColumn(Label.class,
- "100px", true));
+ addGeneratedColumnCommand,
+ new GeneratedColumn(Label.class, "100px", true));
createClickAction("Add Object as generated column", category,
- addGeneratedColumnCommand, new GeneratedColumn(Object.class,
- "", false));
+ addGeneratedColumnCommand,
+ new GeneratedColumn(Object.class, "", false));
}
private void createCellStyleAction(String categoryFeatures) {
@@ -506,14 +511,13 @@ public class Tables<T extends Table> extends AbstractSelectTestCase<T>
for (int ix = 0; ix < props; ix++) {
text[ix] = "foo" + ix;
}
- options.put("Every tenth row, no spanning", new GeneratedRowInfo(10,
- false, text));
- options.put(
- "Every eight row, spanned, html formatted",
+ options.put("Every tenth row, no spanning",
+ new GeneratedRowInfo(10, false, text));
+ options.put("Every eight row, spanned, html formatted",
new GeneratedRowInfo(8, true,
"<b>foo</b> <i>bar</i> <span style='color:red;text-size:0.5em;'>baz</span>"));
- options.put("Every row, spanned", new GeneratedRowInfo(1, false,
- "spanned"));
+ options.put("Every row, spanned",
+ new GeneratedRowInfo(1, false, "spanned"));
createSelectAction("Row generator", categoryFeatures, options, "None",
rowGeneratorCommand, true);
}
@@ -549,8 +553,8 @@ public class Tables<T extends Table> extends AbstractSelectTestCase<T>
cm.addItem("Caption only", null);
cm.addItem("Has icon", ICON_16_USER_PNG_UNCACHEABLE);
options.put("With and without icon", cm);
- options.put("Only one large icon", new ContextMenu("Icon",
- ICON_64_EMAIL_REPLY_PNG_UNCACHEABLE));
+ options.put("Only one large icon",
+ new ContextMenu("Icon", ICON_64_EMAIL_REPLY_PNG_UNCACHEABLE));
options.put("Empty", new ContextMenu() {
@Override
public Action[] getActions(Object target, Object sender) {
@@ -752,10 +756,8 @@ public class Tables<T extends Table> extends AbstractSelectTestCase<T>
&& nr % 2 == 0) {
c.setColumnHeader(propertyId, null);
} else if (value != null) {
- c.setColumnHeader(
- propertyId,
- value.replace("{id}",
- propertyId.toString()));
+ c.setColumnHeader(propertyId, value.replace(
+ "{id}", propertyId.toString()));
} else {
c.setColumnHeader(propertyId, null);
}
@@ -812,7 +814,8 @@ public class Tables<T extends Table> extends AbstractSelectTestCase<T>
"Explicit defaults id", new Command<T, ColumnHeaderMode>() {
@Override
- public void execute(T c, ColumnHeaderMode value, Object data) {
+ public void execute(T c, ColumnHeaderMode value,
+ Object data) {
c.setColumnHeaderMode(value);
}
@@ -852,7 +855,8 @@ public class Tables<T extends Table> extends AbstractSelectTestCase<T>
"Multi - ctrl/shift", new Command<T, SelectMode>() {
@Override
- public void execute(Table t, SelectMode value, Object data) {
+ public void execute(Table t, SelectMode value,
+ Object data) {
switch (value) {
case NONE:
t.setSelectable(false);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TabletContextMenu.java b/uitest/src/main/java/com/vaadin/tests/components/table/TabletContextMenu.java
index 193cb499a7..eb05bcb0f2 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TabletContextMenu.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TabletContextMenu.java
@@ -36,7 +36,7 @@ public class TabletContextMenu extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -104,7 +104,8 @@ public class TabletContextMenu extends AbstractTestUI {
ShortcutAction.KeyCode.DELETE, null);
@Override
- public void handleAction(Action action, Object sender, Object target) {
+ public void handleAction(Action action, Object sender,
+ Object target) {
System.out.println(action.getCaption());
}
@@ -118,7 +119,7 @@ public class TabletContextMenu extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -128,7 +129,7 @@ public class TabletContextMenu extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TestCurrentPageFirstItem.java b/uitest/src/main/java/com/vaadin/tests/components/table/TestCurrentPageFirstItem.java
index 8244835df7..3891fb8212 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TestCurrentPageFirstItem.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TestCurrentPageFirstItem.java
@@ -10,7 +10,8 @@ import com.vaadin.ui.Button.ClickListener;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Table;
-public class TestCurrentPageFirstItem extends TestBase implements ClickListener {
+public class TestCurrentPageFirstItem extends TestBase
+ implements ClickListener {
private Button buttonIndex;
private Button buttonItem;
@@ -56,8 +57,9 @@ public class TestCurrentPageFirstItem extends TestBase implements ClickListener
Table t = tables[i];
t.select(counter);
if (event.getButton() == buttonIndex) {
- t.setCurrentPageFirstItemIndex(((Container.Indexed) t
- .getContainerDataSource()).indexOfId(counter));
+ t.setCurrentPageFirstItemIndex(
+ ((Container.Indexed) t.getContainerDataSource())
+ .indexOfId(counter));
} else {
t.setCurrentPageFirstItemId(counter);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/UnnecessaryScrollbarWhenZooming.java b/uitest/src/main/java/com/vaadin/tests/components/table/UnnecessaryScrollbarWhenZooming.java
index 8d95261825..2e78927947 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/UnnecessaryScrollbarWhenZooming.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/UnnecessaryScrollbarWhenZooming.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/ValueAfterClearingContainer.java b/uitest/src/main/java/com/vaadin/tests/components/table/ValueAfterClearingContainer.java
index b0622e748c..f8f1b8379f 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/ValueAfterClearingContainer.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/ValueAfterClearingContainer.java
@@ -51,8 +51,8 @@ public class ValueAfterClearingContainer extends TestBase {
@Override
public void buttonClick(ClickEvent event) {
if (!table.getItemIds().isEmpty()) {
- Notification
- .show("Only possible when the table is empty");
+ Notification.show(
+ "Only possible when the table is empty");
return;
} else {
for (int i = 0; i < 5; i++) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleInTabsheet.java b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleInTabsheet.java
index 3e132c583b..3d32cadb0a 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleInTabsheet.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleInTabsheet.java
@@ -25,8 +25,8 @@ public class FirstTabNotVisibleInTabsheet extends AbstractTestUI {
tabSheet.addTab(new Label("visible tab " + i), "visible tab " + i);
}
- addComponent(new VerticalLayout(tabSheet, new Button(
- "Toggle first tab", new Button.ClickListener() {
+ addComponent(new VerticalLayout(tabSheet,
+ new Button("Toggle first tab", new Button.ClickListener() {
@Override
public void buttonClick(Button.ClickEvent event) {
firstTab.setVisible(!firstTab.isVisible());
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/HtmlInTabCaption.java b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/HtmlInTabCaption.java
index 66a27a10b5..281104cac1 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/HtmlInTabCaption.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/HtmlInTabCaption.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ public class HtmlInTabCaption extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/NewSelectionAfterTabRemove.java b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/NewSelectionAfterTabRemove.java
index 939bd645ea..f6fc84fc4e 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/NewSelectionAfterTabRemove.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/NewSelectionAfterTabRemove.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,10 +23,10 @@ import com.vaadin.ui.TabSheet.Tab;
/**
* In case a selected tab is removed the new selected one should be a neighbor.
- *
+ *
* In case an unselected tab is removed and the selected one is not visible, the
* scroll should not jump to the selected one.
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/PreventTabChange.java b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/PreventTabChange.java
index fddb036728..6a3d308733 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/PreventTabChange.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/PreventTabChange.java
@@ -7,8 +7,8 @@ import com.vaadin.ui.TabSheet;
import com.vaadin.ui.TabSheet.SelectedTabChangeEvent;
import com.vaadin.ui.TabSheet.SelectedTabChangeListener;
-public class PreventTabChange extends TestBase implements
- SelectedTabChangeListener {
+public class PreventTabChange extends TestBase
+ implements SelectedTabChangeListener {
private TabSheet tabSheet;
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabBarWidth.java b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabBarWidth.java
index accd77ae0e..456b28126c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabBarWidth.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabBarWidth.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ import com.vaadin.ui.VerticalLayout;
/**
* Tests the width of the tab bar, especially when using relative width for the
* {@link TabSheet}.
- *
+ *
* Created for ticket <a href="http://dev.vaadin.com/ticket/12805">#12805</a>.
*/
public class TabBarWidth extends AbstractTestUI {
@@ -82,9 +82,8 @@ public class TabBarWidth extends AbstractTestUI {
String originalWidth = (String) ((TabSheet) component)
.getData();
component.setWidth(originalWidth);
- component.setCaption("Width: "
- + (originalWidth == null ? "undefined"
- : originalWidth));
+ component.setCaption("Width: " + (originalWidth == null
+ ? "undefined" : originalWidth));
}
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabGetAndReplaceComponent.java b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabGetAndReplaceComponent.java
index 0d4f1fe562..a480751b15 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabGetAndReplaceComponent.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabGetAndReplaceComponent.java
@@ -34,8 +34,8 @@ public class TabGetAndReplaceComponent extends TestBase {
Tab tab = tabs.getTab(content2);
// Replace content
- tabs.replaceComponent(tab.getComponent(), new Label(
- "Replacement 2"));
+ tabs.replaceComponent(tab.getComponent(),
+ new Label("Replacement 2"));
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabKeyboardNavigation.java b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabKeyboardNavigation.java
index 620f04fe60..ac31b99abd 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabKeyboardNavigation.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabKeyboardNavigation.java
@@ -23,9 +23,9 @@ import com.vaadin.ui.VerticalLayout;
/**
* Test if the click and key tab selection in a tabsheet generate the correct
* focus/blur events.
- *
+ *
* The solution was broken in ticket (#14304)
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSelectionRevertedByServer.java b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSelectionRevertedByServer.java
index 0d7ec48a99..6ccec44113 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSelectionRevertedByServer.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSelectionRevertedByServer.java
@@ -14,10 +14,10 @@ import com.vaadin.ui.TabSheet.SelectedTabChangeListener;
/**
* TabSheet test in case user selects a tab and on the selection listener the
* selected tab is changed to another one.
- *
+ *
* This test used to cause nonfunctional TabSheet if the current tab was 1, user
* selects 5, then the selection listener will revert the selected tab to 1.
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetCaptions.java b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetCaptions.java
index 09e34307c0..899de78252 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetCaptions.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetCaptions.java
@@ -38,8 +38,8 @@ public class TabSheetCaptions extends TestBase {
VerticalLayout layout1 = new VerticalLayout();
layout1.setMargin(true);
layout1.setSizeFull();
- panel1 = new Panel(
- "Panel initial caption (should also be tab caption)", layout1);
+ panel1 = new Panel("Panel initial caption (should also be tab caption)",
+ layout1);
panel1.setSizeFull();
layout1.addComponent(new Label("This is a panel"));
tabSheet.addTab(panel1);
@@ -48,9 +48,8 @@ public class TabSheetCaptions extends TestBase {
button.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- tabSheet.getTab(panel1).setCaption(
- "This is a new tab caption "
- + dateFormatter.format(date));
+ tabSheet.getTab(panel1).setCaption("This is a new tab caption "
+ + dateFormatter.format(date));
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetClose.java b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetClose.java
index 2cadde567f..caa9b0efbf 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetClose.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetClose.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.ui.TabSheet.Tab;
/**
* This test UI is used for checking that when a tab is closed, another one is
* scrolled into view.
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -32,7 +32,7 @@ public class TabSheetClose extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -52,7 +52,7 @@ public class TabSheetClose extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -62,7 +62,7 @@ public class TabSheetClose extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetErrorTooltip.java b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetErrorTooltip.java
index c4af98eb3f..32496a1227 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetErrorTooltip.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetErrorTooltip.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetFocusing.java b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetFocusing.java
index 941073d617..b4ab64e20b 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetFocusing.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetFocusing.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetHotKeysWithModifiers.java b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetHotKeysWithModifiers.java
index 779ab6b614..26e4ab64f8 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetHotKeysWithModifiers.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetHotKeysWithModifiers.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -15,7 +15,7 @@
*/
/**
- *
+ *
*/
package com.vaadin.tests.components.tabsheet;
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetInDisabledParent.java b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetInDisabledParent.java
index 2ccbfeef76..e7c31b33fd 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetInDisabledParent.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetInDisabledParent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ import com.vaadin.ui.TabSheet;
/**
* Test UI to check that TabsheetBaseConnector reacts on disabling its parent.
- *
+ *
* @author Vaadin Ltd
*/
public class TabSheetInDisabledParent extends AbstractTestUI {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetInSplitPanel.java b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetInSplitPanel.java
index b2313020a3..e597867260 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetInSplitPanel.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetInSplitPanel.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetIndexOperations.java b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetIndexOperations.java
index de637bbed7..8e6b17d81e 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetIndexOperations.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetIndexOperations.java
@@ -59,9 +59,8 @@ public class TabSheetIndexOperations extends TestBase {
@Override
public void buttonClick(ClickEvent event) {
getMainWindow().showNotification(
- "Index: "
- + tabs.getTabPosition(tabs.getTab(tabs
- .getSelectedTab())));
+ "Index: " + tabs.getTabPosition(
+ tabs.getTab(tabs.getSelectedTab())));
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetScrollOnTabClose.java b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetScrollOnTabClose.java
index 1400100f3b..038ed3a7c6 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetScrollOnTabClose.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetScrollOnTabClose.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import com.vaadin.ui.TabSheet.Tab;
* This testUI is used for testing that the scroll position of a tab sheet does
* not change when tabs are removed. The exception is removing the leftmost
* visible tab.
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -36,7 +36,7 @@ public class TabSheetScrollOnTabClose extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -78,7 +78,7 @@ public class TabSheetScrollOnTabClose extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -88,7 +88,7 @@ public class TabSheetScrollOnTabClose extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetTabStyleNames.java b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetTabStyleNames.java
index c14203e765..4114abfd99 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetTabStyleNames.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetTabStyleNames.java
@@ -21,8 +21,8 @@ public class TabSheetTabStyleNames extends TestBase {
tab1.setStyleName(STYLE_NAME);
- addComponent(new Button("Update style names",
- new Button.ClickListener() {
+ addComponent(
+ new Button("Update style names", new Button.ClickListener() {
int counter = 0;
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetTabTheming.java b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetTabTheming.java
index 5c76effefd..bd86191451 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetTabTheming.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetTabTheming.java
@@ -11,7 +11,8 @@ public class TabSheetTabTheming extends TestBase {
TabSheet tabsheet = new TabSheet();
tabsheet.setStyleName("pg");
tabsheet.addTab(new Label(), "Brown fox and the fence", null);
- tabsheet.addTab(new Label(), "Something about using all the keys", null);
+ tabsheet.addTab(new Label(), "Something about using all the keys",
+ null);
addComponent(tabsheet);
setTheme("tests-tickets");
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetTest.java b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetTest.java
index 56836037b7..c106b5bde2 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetTest.java
@@ -165,8 +165,8 @@ public class TabSheetTest<T extends TabSheet> extends
iconOptions.put("16x16 (cachable)", ICON_16_USER_PNG_CACHEABLE);
iconOptions.put("16x16 (uncachable)", ICON_16_USER_PNG_UNCACHEABLE);
iconOptions.put("32x32 (cachable)", ICON_32_ATTENTION_PNG_CACHEABLE);
- iconOptions
- .put("32x32 (uncachable)", ICON_32_ATTENTION_PNG_UNCACHEABLE);
+ iconOptions.put("32x32 (uncachable)",
+ ICON_32_ATTENTION_PNG_UNCACHEABLE);
iconOptions.put("64x64 (cachable)", ICON_64_EMAIL_REPLY_PNG_CACHEABLE);
iconOptions.put("64x64 (uncachable)",
ICON_64_EMAIL_REPLY_PNG_UNCACHEABLE);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetWithHasComponent.java b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetWithHasComponent.java
index 2dd4993aca..b242e192b0 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetWithHasComponent.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetWithHasComponent.java
@@ -64,8 +64,8 @@ public class TabSheetWithHasComponent extends AbstractTestUI {
}
protected TabSheet createSmallTabSheet() {
- return new TabSheet(new Button("Tab1 inside popup"), new NativeButton(
- "Tab 2 inside popup"));
+ return new TabSheet(new Button("Tab1 inside popup"),
+ new NativeButton("Tab 2 inside popup"));
}
private Panel createPanel() {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetWithTabIds.java b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetWithTabIds.java
index 42d65f66c9..f496d6d8b7 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetWithTabIds.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetWithTabIds.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -15,7 +15,7 @@
*/
/**
- *
+ *
*/
package com.vaadin.tests.components.tabsheet;
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSpaceNotScroll.java b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSpaceNotScroll.java
index 3a5be51e47..912dc8b83d 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSpaceNotScroll.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSpaceNotScroll.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ import com.vaadin.ui.VerticalLayout;
/**
* If the space is pressed on the tabs of a tabsheet the browser default scroll
* behavior must be prevented.
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabsheetNotEnoughHorizontalSpace.java b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabsheetNotEnoughHorizontalSpace.java
index 0105498f27..408b2d71ca 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabsheetNotEnoughHorizontalSpace.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabsheetNotEnoughHorizontalSpace.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.ui.TabSheet;
/**
* Test to see if tabsheet navigation buttons render correctly in Chameleon
- *
+ *
* @author Vaadin Ltd
*/
@Theme("chameleon")
@@ -33,7 +33,7 @@ public class TabsheetNotEnoughHorizontalSpace extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -54,7 +54,7 @@ public class TabsheetNotEnoughHorizontalSpace extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -64,7 +64,7 @@ public class TabsheetNotEnoughHorizontalSpace extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabsheetScrolling.java b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabsheetScrolling.java
index fe1bcd0a1a..a3301a905d 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabsheetScrolling.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabsheetScrolling.java
@@ -76,7 +76,8 @@ public class TabsheetScrolling extends TestBase {
new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- int lastFixed = fixedSizeTabSheet.getComponentCount() - 1;
+ int lastFixed = fixedSizeTabSheet.getComponentCount()
+ - 1;
fixedSizeTabSheet.setSelectedTab(lastFixed);
int lastAuto = autoWideTabSheet.getComponentCount() - 1;
autoWideTabSheet.setSelectedTab(lastAuto);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabsheetShouldUpdateHeight.java b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabsheetShouldUpdateHeight.java
index bbbd4ca7e4..0e1a3389a9 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabsheetShouldUpdateHeight.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabsheetShouldUpdateHeight.java
@@ -37,7 +37,8 @@ public class TabsheetShouldUpdateHeight extends TestBase {
addComponent(btnSwitch);
}
- private VerticalLayout getLayoutWithComponents(final int inAmount, String id) {
+ private VerticalLayout getLayoutWithComponents(final int inAmount,
+ String id) {
final VerticalLayout v = new VerticalLayout();
v.setDebugId(id);
v.setSpacing(true);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/VerticalScrollbarPosition.java b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/VerticalScrollbarPosition.java
index 110f26d478..531c0f73d0 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/VerticalScrollbarPosition.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/VerticalScrollbarPosition.java
@@ -25,8 +25,7 @@ public class VerticalScrollbarPosition extends TestBase {
tf.setRows(2);
tf.setHeight("300px");
tf.setWidth("200px");
- tabsheet.addTab(
- tf,
+ tabsheet.addTab(tf,
"A text area that is 200px wide, the tab bar for the tabsheet is wider",
null);
TextArea tf2 = new TextArea("Another tab", "b");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/VetoTabChange.java b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/VetoTabChange.java
index 6671b8641d..3bf872377e 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/VetoTabChange.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/VetoTabChange.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/textarea/ScrollCursor.java b/uitest/src/main/java/com/vaadin/tests/components/textarea/ScrollCursor.java
index 154a30a64b..d3e9f528ef 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/textarea/ScrollCursor.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/textarea/ScrollCursor.java
@@ -8,7 +8,7 @@ import com.vaadin.ui.TextArea;
/**
* @author denis
- *
+ *
*/
public class ScrollCursor extends TestBase {
@@ -18,11 +18,11 @@ public class ScrollCursor extends TestBase {
@Override
protected void setup() {
textArea = new TextArea();
- textArea.setValue("saddddddddddd fdgdfgfdgfd\n"
- + "aasddddddddddd\n" + "dsaffffffdsf\n" + "sdf\n"
- + "dsfsdfsdfsdfsd\n\n" + "ffffffffffffffffffff\n"
- + "sdfdsfdsfsdfsdfsd xxxxxxxxxxxxxxxx\n" + "sdgfsd\n"
- + "dsf\n" + "ds\n" + "fds\n" + "fds\nfs");
+ textArea.setValue("saddddddddddd fdgdfgfdgfd\n" + "aasddddddddddd\n"
+ + "dsaffffffdsf\n" + "sdf\n" + "dsfsdfsdfsdfsd\n\n"
+ + "ffffffffffffffffffff\n"
+ + "sdfdsfdsfsdfsdfsd xxxxxxxxxxxxxxxx\n" + "sdgfsd\n" + "dsf\n"
+ + "ds\n" + "fds\n" + "fds\nfs");
addComponent(textArea);
Button button = new Button("Scroll");
button.addListener(new ClickListener() {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/textarea/TextAreaCursorPosition.java b/uitest/src/main/java/com/vaadin/tests/components/textarea/TextAreaCursorPosition.java
index 756970898e..e8f670feda 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/textarea/TextAreaCursorPosition.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/textarea/TextAreaCursorPosition.java
@@ -37,8 +37,8 @@ public class TextAreaCursorPosition extends TestBase {
public void textChange(TextChangeEvent event) {
AbstractTextField component = (AbstractTextField) event
.getComponent();
- cursorPosition.setValue(String.valueOf(component
- .getCursorPosition()));
+ cursorPosition.setValue(
+ String.valueOf(component.getCursorPosition()));
}
});
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/textarea/TextAreaSizeResetted.java b/uitest/src/main/java/com/vaadin/tests/components/textarea/TextAreaSizeResetted.java
index b2607050a4..c11c369b20 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/textarea/TextAreaSizeResetted.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/textarea/TextAreaSizeResetted.java
@@ -92,8 +92,8 @@ public class TextAreaSizeResetted extends AbstractTestUI {
addPollListener(new UIEvents.PollListener() {
@Override
public void poll(UIEvents.PollEvent event) {
- pollIndicator.setValue(String.valueOf(System
- .currentTimeMillis()));
+ pollIndicator
+ .setValue(String.valueOf(System.currentTimeMillis()));
}
});
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/textfield/AutomaticImmediate.java b/uitest/src/main/java/com/vaadin/tests/components/textfield/AutomaticImmediate.java
index ac51b5fc87..e62d0e779c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/textfield/AutomaticImmediate.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/textfield/AutomaticImmediate.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,32 +28,32 @@ import com.vaadin.ui.TextField;
/**
* Test to verify fields become implicitly "immediate" when adding value change
* listener to them.
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
public class AutomaticImmediate extends AbstractTestUIWithLog {
/**
- *
+ *
*/
static final String BUTTON = "button";
/**
- *
+ *
*/
static final String EXPLICIT_FALSE = "explicit-false";
/**
- *
+ *
*/
static final String FIELD = "field";
/**
- *
+ *
*/
static final String LISTENER_TOGGLE = "listener-toggle";
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -64,7 +64,7 @@ public class AutomaticImmediate extends AbstractTestUIWithLog {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.ui.AbstractField#fireValueChange(boolean)
*/
@Override
@@ -126,7 +126,7 @@ public class AutomaticImmediate extends AbstractTestUIWithLog {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -136,7 +136,7 @@ public class AutomaticImmediate extends AbstractTestUIWithLog {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/textfield/BigDecimalTextField.java b/uitest/src/main/java/com/vaadin/tests/components/textfield/BigDecimalTextField.java
index c7e449c314..19e062b980 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/textfield/BigDecimalTextField.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/textfield/BigDecimalTextField.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -86,7 +86,7 @@ public class BigDecimalTextField extends AbstractTestUIWithLog {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -96,7 +96,7 @@ public class BigDecimalTextField extends AbstractTestUIWithLog {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/textfield/EnterShortcutMaySendInputPromptAsValue.java b/uitest/src/main/java/com/vaadin/tests/components/textfield/EnterShortcutMaySendInputPromptAsValue.java
index 938ecf60ce..f108aaa5da 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/textfield/EnterShortcutMaySendInputPromptAsValue.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/textfield/EnterShortcutMaySendInputPromptAsValue.java
@@ -37,7 +37,8 @@ public class EnterShortcutMaySendInputPromptAsValue extends TestBase {
}
@Override
- public void handleAction(Action action, Object sender, Object target) {
+ public void handleAction(Action action, Object sender,
+ Object target) {
if (action == enter) {
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/textfield/EnumTextField.java b/uitest/src/main/java/com/vaadin/tests/components/textfield/EnumTextField.java
index 99e08ae32d..958564a0c7 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/textfield/EnumTextField.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/textfield/EnumTextField.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/textfield/InputPromptAndCursorPosition.java b/uitest/src/main/java/com/vaadin/tests/components/textfield/InputPromptAndCursorPosition.java
index b8f9c9aa3f..b1fa785247 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/textfield/InputPromptAndCursorPosition.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/textfield/InputPromptAndCursorPosition.java
@@ -13,17 +13,20 @@ public class InputPromptAndCursorPosition extends AbstractTestUI {
protected void setup(VaadinRequest request) {
final TextField tf = new TextField();
tf.setColumns(40);
- tf.setValue("Delete this text to reveal input prompt and update cursor position.");
+ tf.setValue(
+ "Delete this text to reveal input prompt and update cursor position.");
tf.setInputPrompt("This is an input prompt");
final Label l = new Label("Cursor position: ?");
- Button button = new Button("Update cursor position", new Button.ClickListener() {
-
- @Override
- public void buttonClick(ClickEvent event) {
- l.setValue("Cursor position: " + tf.getCursorPosition());
- }
- });
+ Button button = new Button("Update cursor position",
+ new Button.ClickListener() {
+
+ @Override
+ public void buttonClick(ClickEvent event) {
+ l.setValue(
+ "Cursor position: " + tf.getCursorPosition());
+ }
+ });
addComponent(tf);
addComponent(l);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/textfield/InputPromptGetText.java b/uitest/src/main/java/com/vaadin/tests/components/textfield/InputPromptGetText.java
index e117657a3a..d109140741 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/textfield/InputPromptGetText.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/textfield/InputPromptGetText.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,9 +28,9 @@ import com.vaadin.ui.TextField;
/**
* To verify bug fix: Reproducing of bug Textfield value not updated when
* InputPromt and ShortcutListener are used
- *
+ *
* #13492
- *
+ *
* @author Vaadin Ltd
*/
@Theme("reindeer")
@@ -43,7 +43,7 @@ public class InputPromptGetText extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -67,17 +67,17 @@ public class InputPromptGetText extends AbstractTestUI {
getLayout().addComponent(label);
}
});
- tf.addShortcutListener(new ShortcutListener("Shortcut", KeyCode.ENTER,
- null) {
+ tf.addShortcutListener(
+ new ShortcutListener("Shortcut", KeyCode.ENTER, null) {
- @Override
- public void handleAction(Object sender, Object target) {
- String input = tf.getValue();
- Label label = new Label("Your input was: " + input);
- label.setId(LABEL1);
- getLayout().addComponent(label);
- }
- });
+ @Override
+ public void handleAction(Object sender, Object target) {
+ String input = tf.getValue();
+ Label label = new Label("Your input was: " + input);
+ label.setId(LABEL1);
+ getLayout().addComponent(label);
+ }
+ });
getLayout().addComponent(tf);
getLayout().addComponent(button);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/textfield/OutOfSyncIssueWithKeyboardShortcut.java b/uitest/src/main/java/com/vaadin/tests/components/textfield/OutOfSyncIssueWithKeyboardShortcut.java
index 955a9c2772..6215d41d18 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/textfield/OutOfSyncIssueWithKeyboardShortcut.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/textfield/OutOfSyncIssueWithKeyboardShortcut.java
@@ -86,9 +86,8 @@ public class OutOfSyncIssueWithKeyboardShortcut extends TestBase {
public void valueChange(ValueChangeEvent event) {
Object value = event.getProperty().getValue();
if (value != null) {
- String fragment = "edit/"
- + String.valueOf(value)
- .replaceAll("[^0-9]", "");
+ String fragment = "edit/" + String.valueOf(value)
+ .replaceAll("[^0-9]", "");
if (!fragment.equals(previousFragment)) {
navigateTo(fragment);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/textfield/RequiredTextField.java b/uitest/src/main/java/com/vaadin/tests/components/textfield/RequiredTextField.java
index 79f5a7e83b..7089770386 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/textfield/RequiredTextField.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/textfield/RequiredTextField.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.ui.TextField;
/**
* Test for required text field.
- *
+ *
* @author Vaadin Ltd
*/
public class RequiredTextField extends AbstractTestUI {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/textfield/SelectionAndCursorPosition.java b/uitest/src/main/java/com/vaadin/tests/components/textfield/SelectionAndCursorPosition.java
index d63d7ddc66..1f959be136 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/textfield/SelectionAndCursorPosition.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/textfield/SelectionAndCursorPosition.java
@@ -52,8 +52,8 @@ public class SelectionAndCursorPosition extends TestBase {
fl.addComponent(b);
HorizontalLayout selectRange = new HorizontalLayout();
- selectRange
- .setCaption("Select range of text ( setSelectionRange(int start, int lengt) )");
+ selectRange.setCaption(
+ "Select range of text ( setSelectionRange(int start, int lengt) )");
final TextField start = new TextField("From:");
final TextField length = new TextField("Selection length:");
b = new Button("select");
@@ -85,8 +85,8 @@ public class SelectionAndCursorPosition extends TestBase {
setCursorPosition.addComponent(pos);
setCursorPosition.addComponent(b);
- setCursorPosition
- .setCaption("Set cursor position ( setCursorPosition(int pos) )");
+ setCursorPosition.setCaption(
+ "Set cursor position ( setCursorPosition(int pos) )");
fl.addComponent(setCursorPosition);
getLayout().addComponent(textField);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/textfield/SetTabIndex.java b/uitest/src/main/java/com/vaadin/tests/components/textfield/SetTabIndex.java
index da4ea9de0b..f12ebc6ff2 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/textfield/SetTabIndex.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/textfield/SetTabIndex.java
@@ -30,8 +30,8 @@ public class SetTabIndex extends TestBase {
readonly.addListener(new Property.ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
- boolean readonly = Boolean.valueOf(event.getProperty()
- .getValue().toString());
+ boolean readonly = Boolean
+ .valueOf(event.getProperty().getValue().toString());
field1.setReadOnly(readonly);
field2.setReadOnly(readonly);
field3.setReadOnly(readonly);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/textfield/TextChangeEvents.java b/uitest/src/main/java/com/vaadin/tests/components/textfield/TextChangeEvents.java
index 531392b84a..b149cbce5c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/textfield/TextChangeEvents.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/textfield/TextChangeEvents.java
@@ -66,15 +66,15 @@ public class TextChangeEvents extends TestBase {
/**
* "Autosuggest"
- *
+ *
* Known issue is timing if suggestion comes while typing more content. IMO
* we will not support this kind of features in default TextField, but
* hopefully make it easily extendable to perfect suggest feature. MT
* 2010-10
- *
+ *
*/
- private class VaadinDeveloperNameField extends TextField implements
- TextChangeListener {
+ private class VaadinDeveloperNameField extends TextField
+ implements TextChangeListener {
private String[] names = new String[] { "Matti Tahvonen",
"Marc Englund", "Joonas Lehtinen", "Jouni Koivuviita",
"Marko Grönroos", "Artur Signell" };
@@ -94,7 +94,8 @@ public class TextChangeEvents extends TestBase {
@Override
public void textChange(TextChangeEvent event) {
- boolean atTheEndOfText = event.getText().length() == getCursorPosition();
+ boolean atTheEndOfText = event.getText()
+ .length() == getCursorPosition();
String match = findMatch(event.getText());
if (match != null) {
setStyleName("match");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/textfield/TextChangeEvents2.java b/uitest/src/main/java/com/vaadin/tests/components/textfield/TextChangeEvents2.java
index d64dbb42d6..26342a71cc 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/textfield/TextChangeEvents2.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/textfield/TextChangeEvents2.java
@@ -149,8 +149,8 @@ public class TextChangeEvents2 extends TestBase {
TextField next = tfs[idx + 1];
next.focus();
if (len > 4) {
- next.setValue(txt.substring(4, len > 8 ? 8
- : len));
+ next.setValue(txt.substring(4,
+ len > 8 ? 8 : len));
} else {
next.selectAll();
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/textfield/TextChangeListenerChangingNonTextProperties.java b/uitest/src/main/java/com/vaadin/tests/components/textfield/TextChangeListenerChangingNonTextProperties.java
index 5991ac6ff7..b61a6015f8 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/textfield/TextChangeListenerChangingNonTextProperties.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/textfield/TextChangeListenerChangingNonTextProperties.java
@@ -22,11 +22,8 @@ public class TextChangeListenerChangingNonTextProperties extends TestBase {
@Override
public void attach() {
super.attach();
- TestUtils
- .injectCSS(
- getUI(),
- ".red { background:red;} "
- + ".green { background:green;} .blue { background:blue;} .cyan { background:cyan;} .magenta { background:magenta;}");
+ TestUtils.injectCSS(getUI(), ".red { background:red;} "
+ + ".green { background:green;} .blue { background:blue;} .cyan { background:cyan;} .magenta { background:magenta;}");
}
};
tf2.setTextChangeEventMode(TextChangeEventMode.EAGER);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldEmptyingPrompt.java b/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldEmptyingPrompt.java
index 9fe18f131b..0f2812e66b 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldEmptyingPrompt.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldEmptyingPrompt.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldFocusAndBlurListeners.java b/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldFocusAndBlurListeners.java
index 21dba6a196..f0d2d44720 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldFocusAndBlurListeners.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldFocusAndBlurListeners.java
@@ -10,8 +10,8 @@ import com.vaadin.tests.components.TestBase;
import com.vaadin.tests.util.Log;
import com.vaadin.ui.TextField;
-public class TextFieldFocusAndBlurListeners extends TestBase implements
- FocusListener, BlurListener, ValueChangeListener {
+public class TextFieldFocusAndBlurListeners extends TestBase
+ implements FocusListener, BlurListener, ValueChangeListener {
private Log log = new Log(5).setNumberLogRows(false);
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldInLayoutInTable.java b/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldInLayoutInTable.java
index 4299336f74..fc0a5d9b8e 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldInLayoutInTable.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldInLayoutInTable.java
@@ -12,8 +12,8 @@ public class TextFieldInLayoutInTable extends LegacyApplication {
@Override
public void init() {
- final LegacyWindow mainWindow = new LegacyWindow(this.getClass()
- .getName());
+ final LegacyWindow mainWindow = new LegacyWindow(
+ this.getClass().getName());
setMainWindow(mainWindow);
final Table table = new Table();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldTest.java b/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldTest.java
index 10793a8bad..401d901df0 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldTest.java
@@ -4,8 +4,8 @@ import com.vaadin.event.FieldEvents.TextChangeListener;
import com.vaadin.tests.components.abstractfield.AbstractTextFieldTest;
import com.vaadin.ui.TextField;
-public class TextFieldTest extends AbstractTextFieldTest<TextField> implements
- TextChangeListener {
+public class TextFieldTest extends AbstractTextFieldTest<TextField>
+ implements TextChangeListener {
@Override
protected Class<TextField> getTestClass() {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldTruncatesUnderscoresInModalDialogs.java b/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldTruncatesUnderscoresInModalDialogs.java
index c125d8da86..89d2a76370 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldTruncatesUnderscoresInModalDialogs.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldTruncatesUnderscoresInModalDialogs.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,7 +27,8 @@ import com.vaadin.ui.Window;
@SuppressWarnings("serial")
@Theme("chameleon")
-public class TextFieldTruncatesUnderscoresInModalDialogs extends AbstractTestUI {
+public class TextFieldTruncatesUnderscoresInModalDialogs
+ extends AbstractTestUI {
@Override
protected void setup(VaadinRequest request) {
@@ -36,8 +37,8 @@ public class TextFieldTruncatesUnderscoresInModalDialogs extends AbstractTestUI
FormLayout formLayout = new FormLayout();
formLayout.setSpacing(true);
- formLayout.addComponent(new Button("Disappear",
- new Button.ClickListener() {
+ formLayout.addComponent(
+ new Button("Disappear", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tree/DndTreeTargetDetails.java b/uitest/src/main/java/com/vaadin/tests/components/tree/DndTreeTargetDetails.java
index 443f290809..42b47508ac 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tree/DndTreeTargetDetails.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tree/DndTreeTargetDetails.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -22,7 +22,7 @@ import com.vaadin.ui.Tree;
/**
* Test UI for tree as a drop target: AbstractSelectTargetDetails should provide
* getMouseEvent() method.
- *
+ *
* @author Vaadin Ltd
*/
public class DndTreeTargetDetails extends DndTableTargetDetails {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tree/TreeConnectors.java b/uitest/src/main/java/com/vaadin/tests/components/tree/TreeConnectors.java
index ab9bcd9a99..f93ea99867 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tree/TreeConnectors.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tree/TreeConnectors.java
@@ -64,16 +64,16 @@ public class TreeConnectors extends TestBase {
});
- tree.setItemIcon("Item 1", new ThemeResource(
- "../runo/icons/32/folder.png"));
- tree.setItemIcon("Item 3", new ThemeResource(
- "../runo/icons/32/document.png"));
- tree.setItemIcon("Item 13", new ThemeResource(
- "../runo/icons/64/user.png"));
- tree.setItemIcon("Item 72", new ThemeResource(
- "../runo/icons/64/users.png"));
- tree.setItemIcon("Item 17", new ThemeResource(
- "../runo/icons/16/document-pdf.png"));
+ tree.setItemIcon("Item 1",
+ new ThemeResource("../runo/icons/32/folder.png"));
+ tree.setItemIcon("Item 3",
+ new ThemeResource("../runo/icons/32/document.png"));
+ tree.setItemIcon("Item 13",
+ new ThemeResource("../runo/icons/64/user.png"));
+ tree.setItemIcon("Item 72",
+ new ThemeResource("../runo/icons/64/users.png"));
+ tree.setItemIcon("Item 17",
+ new ThemeResource("../runo/icons/16/document-pdf.png"));
return tree;
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tree/TreeFiltering.java b/uitest/src/main/java/com/vaadin/tests/components/tree/TreeFiltering.java
index 6df69c850b..41e7d1527e 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tree/TreeFiltering.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tree/TreeFiltering.java
@@ -49,8 +49,8 @@ public class TreeFiltering extends TestBase {
@Override
public void valueChange(ValueChangeEvent event) {
- cont.setIncludeParentsWhenFiltering(((CheckBox) event
- .getProperty()).getValue());
+ cont.setIncludeParentsWhenFiltering(
+ ((CheckBox) event.getProperty()).getValue());
ccTree.markAsDirty();
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tree/TreeHtmlContentAllowed.java b/uitest/src/main/java/com/vaadin/tests/components/tree/TreeHtmlContentAllowed.java
index b20b7c3aab..e381c5c358 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tree/TreeHtmlContentAllowed.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tree/TreeHtmlContentAllowed.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tree/TreeKeyboardNavigationScrolls.java b/uitest/src/main/java/com/vaadin/tests/components/tree/TreeKeyboardNavigationScrolls.java
index bb7c0350f2..21b45f7111 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tree/TreeKeyboardNavigationScrolls.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tree/TreeKeyboardNavigationScrolls.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tree/TreeKeyboardNavigationToNone.java b/uitest/src/main/java/com/vaadin/tests/components/tree/TreeKeyboardNavigationToNone.java
index dfea493281..342aa398e4 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tree/TreeKeyboardNavigationToNone.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tree/TreeKeyboardNavigationToNone.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.ui.Tree;
/**
* Test UI for keyboard navigation for first and last tree item.
- *
+ *
* @author Vaadin Ltd
*/
public class TreeKeyboardNavigationToNone extends AbstractTestUI {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tree/TreeNodeCaptionWrapping.java b/uitest/src/main/java/com/vaadin/tests/components/tree/TreeNodeCaptionWrapping.java
index f885e1d1da..409df2b18d 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tree/TreeNodeCaptionWrapping.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tree/TreeNodeCaptionWrapping.java
@@ -29,8 +29,8 @@ public class TreeNodeCaptionWrapping extends TestBase {
String subItem = "Subitem - also long";
tree.addItem(mainItem);
- tree.setItemIcon(mainItem, new ThemeResource(
- "../runo/icons/16/error.png"));
+ tree.setItemIcon(mainItem,
+ new ThemeResource("../runo/icons/16/error.png"));
tree.addItem(subItem);
tree.setParent(subItem, mainItem);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tree/TreeToolTips.java b/uitest/src/main/java/com/vaadin/tests/components/tree/TreeToolTips.java
index 59e3fec1f9..6839e6837c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tree/TreeToolTips.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tree/TreeToolTips.java
@@ -12,13 +12,14 @@ public class TreeToolTips extends TestBase {
@Override
protected void setup() {
final Tree tree = new Tree(null, createContainer());
- tree.setItemDescriptionGenerator(new AbstractSelect.ItemDescriptionGenerator() {
- @Override
- public String generateDescription(Component source, Object itemId,
- Object propertyId) {
- return "This is a tooltip for item id '" + itemId + "'";
- }
- });
+ tree.setItemDescriptionGenerator(
+ new AbstractSelect.ItemDescriptionGenerator() {
+ @Override
+ public String generateDescription(Component source,
+ Object itemId, Object propertyId) {
+ return "This is a tooltip for item id '" + itemId + "'";
+ }
+ });
for (Object rootItems : tree.rootItemIds()) {
tree.expandItemsRecursively(rootItems);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tree/Trees.java b/uitest/src/main/java/com/vaadin/tests/components/tree/Trees.java
index f12d6adbb3..d41cdd94d2 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tree/Trees.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tree/Trees.java
@@ -19,8 +19,8 @@ import com.vaadin.ui.Tree.ExpandEvent;
import com.vaadin.ui.Tree.ExpandListener;
import com.vaadin.ui.Tree.ItemStyleGenerator;
-public class Trees extends AbstractSelectTestCase<Tree> implements
- ExpandListener, CollapseListener {
+public class Trees extends AbstractSelectTestCase<Tree>
+ implements ExpandListener, CollapseListener {
private int rootItemIds = 3;
@@ -137,8 +137,8 @@ public class Trees extends AbstractSelectTestCase<Tree> implements
cm.addItem("Caption only", null);
cm.addItem("Has icon", ICON_16_USER_PNG_UNCACHEABLE);
options.put("With and without icon", cm);
- options.put("Only one large icon", new ContextMenu("Icon",
- ICON_64_EMAIL_REPLY_PNG_UNCACHEABLE));
+ options.put("Only one large icon",
+ new ContextMenu("Icon", ICON_64_EMAIL_REPLY_PNG_UNCACHEABLE));
createSelectAction("Context menu", category, options, "None",
contextMenuCommand, true);
@@ -149,7 +149,8 @@ public class Trees extends AbstractSelectTestCase<Tree> implements
LinkedHashMap<String, com.vaadin.ui.Tree.ItemStyleGenerator> options = new LinkedHashMap<String, com.vaadin.ui.Tree.ItemStyleGenerator>();
options.put("-", null);
- options.put(rootGreenSecondLevelRed.toString(), rootGreenSecondLevelRed);
+ options.put(rootGreenSecondLevelRed.toString(),
+ rootGreenSecondLevelRed);
options.put(evenItemsBold.toString(), evenItemsBold);
createSelectAction("Item Style generator", category, options, "-",
@@ -387,8 +388,8 @@ public class Trees extends AbstractSelectTestCase<Tree> implements
private Command<Tree, com.vaadin.ui.Tree.ItemStyleGenerator> itemStyleGeneratorCommand = new Command<Tree, com.vaadin.ui.Tree.ItemStyleGenerator>() {
@Override
- public void execute(Tree c,
- com.vaadin.ui.Tree.ItemStyleGenerator value, Object data) {
+ public void execute(Tree c, com.vaadin.ui.Tree.ItemStyleGenerator value,
+ Object data) {
c.setItemStyleGenerator(value);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/treetable/ChangeDataSourcePageLengthZero.java b/uitest/src/main/java/com/vaadin/tests/components/treetable/ChangeDataSourcePageLengthZero.java
index 3d40bc47cf..69cb884c07 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/treetable/ChangeDataSourcePageLengthZero.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/treetable/ChangeDataSourcePageLengthZero.java
@@ -43,9 +43,9 @@ public class ChangeDataSourcePageLengthZero extends TestBase {
.getContainerDataSource();
Object itemId = container.addItem();
container.getContainerProperty(itemId, "i").setValue(i++);
- container.getContainerProperty(itemId, "link").setValue(
- new Link(String.valueOf(i + 1), new ExternalResource(
- "http://www.google.fi")));
+ container.getContainerProperty(itemId, "link")
+ .setValue(new Link(String.valueOf(i + 1),
+ new ExternalResource("http://www.google.fi")));
container.setChildrenAllowed(itemId, false);
container.setParent(itemId, null);
}
@@ -68,9 +68,9 @@ public class ChangeDataSourcePageLengthZero extends TestBase {
for (int i = 0; i < num; i++) {
Object item = container.addItem();
container.getContainerProperty(item, "i").setValue(i + 1);
- container.getContainerProperty(item, "link").setValue(
- new Link(String.valueOf(i + 1), new ExternalResource(
- "http://www.google.fi")));
+ container.getContainerProperty(item, "link")
+ .setValue(new Link(String.valueOf(i + 1),
+ new ExternalResource("http://www.google.fi")));
if (i > 0 && (i + 1) % 2 == 0) {
container.setChildrenAllowed(item, false);
container.setParent(item, previous);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/treetable/DisappearingComponents.java b/uitest/src/main/java/com/vaadin/tests/components/treetable/DisappearingComponents.java
index ee64007234..c60090d974 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/treetable/DisappearingComponents.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/treetable/DisappearingComponents.java
@@ -21,8 +21,7 @@ public class DisappearingComponents extends AbstractTestUI {
for (int i = 0; i < items.length; i++) {
items[i] = tt
.addItem(
- new Object[] {
- i + 1,
+ new Object[] { i + 1,
new Link(String.valueOf(i + 1),
new ExternalResource(
"http://www.google.fi")) },
diff --git a/uitest/src/main/java/com/vaadin/tests/components/treetable/DynamicallyModified.java b/uitest/src/main/java/com/vaadin/tests/components/treetable/DynamicallyModified.java
index e089237b54..484076d804 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/treetable/DynamicallyModified.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/treetable/DynamicallyModified.java
@@ -8,8 +8,8 @@ import com.vaadin.ui.Tree.CollapseEvent;
import com.vaadin.ui.Tree.ExpandEvent;
import com.vaadin.ui.TreeTable;
-public class DynamicallyModified extends TestBase implements
- Tree.ExpandListener, Tree.CollapseListener {
+public class DynamicallyModified extends TestBase
+ implements Tree.ExpandListener, Tree.CollapseListener {
protected static final String NAME_PROPERTY = "Name";
protected static final String HOURS_PROPERTY = "Hours done";
protected static final String MODIFIED_PROPERTY = "Last Modified";
@@ -36,22 +36,22 @@ public class DynamicallyModified extends TestBase implements
DEFAULT_DATE);
// Populate table
- Object allProjects = treetable.addItem(new Object[] { "All Projects",
- 18, DEFAULT_DATE }, null);
- Object year2010 = treetable.addItem(new Object[] { "Year 2010", 18,
- DEFAULT_DATE }, null);
- Object customerProject1 = treetable.addItem(new Object[] {
- "Customer Project 1", 13, DEFAULT_DATE }, null);
- Object customerProject1Implementation = treetable.addItem(new Object[] {
- "Implementation", 5, DEFAULT_DATE }, null);
- Object customerProject1Planning = treetable.addItem(new Object[] {
- "Planning", 2, DEFAULT_DATE }, null);
- Object customerProject1Prototype = treetable.addItem(new Object[] {
- "Prototype", 5, DEFAULT_DATE }, null);
- Object customerProject2 = treetable.addItem(new Object[] {
- "Customer Project 2", 5, DEFAULT_DATE }, null);
- Object customerProject2Planning = treetable.addItem(new Object[] {
- "Planning", 5, DEFAULT_DATE }, null);
+ Object allProjects = treetable.addItem(
+ new Object[] { "All Projects", 18, DEFAULT_DATE }, null);
+ Object year2010 = treetable
+ .addItem(new Object[] { "Year 2010", 18, DEFAULT_DATE }, null);
+ Object customerProject1 = treetable.addItem(
+ new Object[] { "Customer Project 1", 13, DEFAULT_DATE }, null);
+ Object customerProject1Implementation = treetable.addItem(
+ new Object[] { "Implementation", 5, DEFAULT_DATE }, null);
+ Object customerProject1Planning = treetable
+ .addItem(new Object[] { "Planning", 2, DEFAULT_DATE }, null);
+ Object customerProject1Prototype = treetable
+ .addItem(new Object[] { "Prototype", 5, DEFAULT_DATE }, null);
+ Object customerProject2 = treetable.addItem(
+ new Object[] { "Customer Project 2", 5, DEFAULT_DATE }, null);
+ Object customerProject2Planning = treetable
+ .addItem(new Object[] { "Planning", 5, DEFAULT_DATE }, null);
// Set hierarchy
treetable.setParent(year2010, allProjects);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/treetable/ExpandAnimationsInChameleon.java b/uitest/src/main/java/com/vaadin/tests/components/treetable/ExpandAnimationsInChameleon.java
index 2042edeea2..9c34efb539 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/treetable/ExpandAnimationsInChameleon.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/treetable/ExpandAnimationsInChameleon.java
@@ -62,13 +62,12 @@ public class ExpandAnimationsInChameleon extends TestBase {
super.addComponent(c);
setComponentAlignment(c, Alignment.MIDDLE_CENTER);
if (c.getStyleName() != "") {
- ((AbstractComponent) c).setDescription(c.getClass()
- .getSimpleName()
- + ".addStyleName(\""
- + c.getStyleName() + "\")");
+ ((AbstractComponent) c).setDescription(
+ c.getClass().getSimpleName() + ".addStyleName(\""
+ + c.getStyleName() + "\")");
} else {
- ((AbstractComponent) c).setDescription("new "
- + c.getClass().getSimpleName() + "()");
+ ((AbstractComponent) c).setDescription(
+ "new " + c.getClass().getSimpleName() + "()");
}
}
};
@@ -106,8 +105,8 @@ public class ExpandAnimationsInChameleon extends TestBase {
hc.setParent(j, 2);
}
- t.setColumnIcon("Third", new ThemeResource(
- "../runo/icons/16/document.png"));
+ t.setColumnIcon("Third",
+ new ThemeResource("../runo/icons/16/document.png"));
t.select(1);
return t;
diff --git a/uitest/src/main/java/com/vaadin/tests/components/treetable/KeepAllItemsVisible.java b/uitest/src/main/java/com/vaadin/tests/components/treetable/KeepAllItemsVisible.java
index f444b781dd..09477213a8 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/treetable/KeepAllItemsVisible.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/treetable/KeepAllItemsVisible.java
@@ -12,8 +12,8 @@ import com.vaadin.ui.Tree.ExpandEvent;
import com.vaadin.ui.Tree.ExpandListener;
import com.vaadin.ui.TreeTable;
-public class KeepAllItemsVisible extends TestBase implements ExpandListener,
- CollapseListener {
+public class KeepAllItemsVisible extends TestBase
+ implements ExpandListener, CollapseListener {
private static final String CAPTION = "caption";
diff --git a/uitest/src/main/java/com/vaadin/tests/components/treetable/MinimalWidthColumns.java b/uitest/src/main/java/com/vaadin/tests/components/treetable/MinimalWidthColumns.java
index c4679f739b..f47357c9c1 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/treetable/MinimalWidthColumns.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/treetable/MinimalWidthColumns.java
@@ -10,7 +10,7 @@ public class MinimalWidthColumns extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/components/treetable/ProgrammaticCollapse.java b/uitest/src/main/java/com/vaadin/tests/components/treetable/ProgrammaticCollapse.java
index ea76a9639a..c9f74dd654 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/treetable/ProgrammaticCollapse.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/treetable/ProgrammaticCollapse.java
@@ -22,14 +22,15 @@ public class ProgrammaticCollapse extends TestBase {
table.addItem(new Object[] { "A" + i, "B" + i }, parentid);
for (int j = 1; j < 5; ++j) {
int id = 1000 * i + j;
- table.addItem(new Object[] { "A" + i + "." + j,
- "B" + i + "." + j }, id);
+ table.addItem(
+ new Object[] { "A" + i + "." + j, "B" + i + "." + j },
+ id);
table.setParent(id, parentid);
}
}
layout.addComponent(table);
- layout.addComponent(new Button("Expand / Collapse",
- new ClickListener() {
+ layout.addComponent(
+ new Button("Expand / Collapse", new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
boolean collapsed = !table.isCollapsed(1);
@@ -37,8 +38,8 @@ public class ProgrammaticCollapse extends TestBase {
table.setCollapsed(1, collapsed);
}
}));
- layout.addComponent(new Button("Expand / Collapse last",
- new ClickListener() {
+ layout.addComponent(
+ new Button("Expand / Collapse last", new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
boolean collapsed = !table.isCollapsed(100);
@@ -46,8 +47,8 @@ public class ProgrammaticCollapse extends TestBase {
table.setCollapsed(100, collapsed);
}
}));
- layout.addComponent(new Button("Expand / Collapse multiple",
- new ClickListener() {
+ layout.addComponent(
+ new Button("Expand / Collapse multiple", new ClickListener() {
private boolean collapsed = true;
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/treetable/ProgrammaticSelect.java b/uitest/src/main/java/com/vaadin/tests/components/treetable/ProgrammaticSelect.java
index 7088497b4e..23776a14b7 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/treetable/ProgrammaticSelect.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/treetable/ProgrammaticSelect.java
@@ -109,8 +109,8 @@ public class ProgrammaticSelect extends TestBase {
for (int i = 1; i <= items; i++) {
Item item = c.addItem("Item " + i);
for (int j = 1; j <= properties; j++) {
- item.getItemProperty("Property " + j).setValue(
- "Item " + i + "," + j);
+ item.getItemProperty("Property " + j)
+ .setValue("Item " + i + "," + j);
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/treetable/RemoveAllItemsRefresh.java b/uitest/src/main/java/com/vaadin/tests/components/treetable/RemoveAllItemsRefresh.java
index 4372341161..ba80e52814 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/treetable/RemoveAllItemsRefresh.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/treetable/RemoveAllItemsRefresh.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -80,14 +80,14 @@ public class RemoveAllItemsRefresh extends TestBase {
containerItem = treeContainer.addItem("first");
containerItem.getItemProperty(NAME_PROPERTY)
.setValue("1 NAME_PROPERTY");
- containerItem.getItemProperty(TITLE_PROPERTY).setValue(
- "1 TITLE_PROPERTY");
+ containerItem.getItemProperty(TITLE_PROPERTY)
+ .setValue("1 TITLE_PROPERTY");
containerItem = treeContainer.addItem("second");
containerItem.getItemProperty(NAME_PROPERTY)
.setValue("2 NAME_PROPERTY");
- containerItem.getItemProperty(TITLE_PROPERTY).setValue(
- "2 TITLE_PROPERTY");
+ containerItem.getItemProperty(TITLE_PROPERTY)
+ .setValue("2 TITLE_PROPERTY");
treetable.setContainerDataSource(treeContainer);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableCacheOnPartialUpdates.java b/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableCacheOnPartialUpdates.java
index de33d26051..35db40b966 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableCacheOnPartialUpdates.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableCacheOnPartialUpdates.java
@@ -74,8 +74,8 @@ public class TreeTableCacheOnPartialUpdates extends TestBase {
TestBean tb = (TestBean) itemId;
String identifier = "Item " + itemId + "/" + columnId;
Button btnCol3 = new NativeButton(identifier);
- btnCol3.setId("cacheTestButton-" + tb.getCol1() + "-"
- + tb.getCol2());
+ btnCol3.setId(
+ "cacheTestButton-" + tb.getCol1() + "-" + tb.getCol2());
btnCol3.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableExtraScrollbar.java b/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableExtraScrollbar.java
index 79c967914f..eb7053ab0d 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableExtraScrollbar.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableExtraScrollbar.java
@@ -70,14 +70,16 @@ public class TreeTableExtraScrollbar extends TestBase {
private class EmptyColumnGenerator implements Table.ColumnGenerator {
@Override
- public Object generateCell(Table table, Object itemId, Object columnId) {
+ public Object generateCell(Table table, Object itemId,
+ Object columnId) {
return null;
}
}
private class TypeColumnGenerator implements Table.ColumnGenerator {
@Override
- public Object generateCell(Table table, Object itemId, Object columnId) {
+ public Object generateCell(Table table, Object itemId,
+ Object columnId) {
if (itemId instanceof TestObject) {
return new Label(((TestObject) itemId).getValue());
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableExtraScrollbarWithChildren.java b/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableExtraScrollbarWithChildren.java
index 0dc98b2c2e..85d7030b46 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableExtraScrollbarWithChildren.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableExtraScrollbarWithChildren.java
@@ -75,7 +75,8 @@ public class TreeTableExtraScrollbarWithChildren extends TestBase {
private class HierarchyColumnGenerator implements Table.ColumnGenerator {
@Override
- public Object generateCell(Table table, Object itemId, Object columnId) {
+ public Object generateCell(Table table, Object itemId,
+ Object columnId) {
Label label = new Label("this should be mostly hidden");
label.setSizeUndefined();
return label;
@@ -84,7 +85,8 @@ public class TreeTableExtraScrollbarWithChildren extends TestBase {
private class TypeColumnGenerator implements Table.ColumnGenerator {
@Override
- public Object generateCell(Table table, Object itemId, Object columnId) {
+ public Object generateCell(Table table, Object itemId,
+ Object columnId) {
if (itemId instanceof TestObject) {
return new Label(((TestObject) itemId).getValue());
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableItemDescriptionGeneratorUI.java b/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableItemDescriptionGeneratorUI.java
index ba057f4c41..ebe3f0e1a8 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableItemDescriptionGeneratorUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableItemDescriptionGeneratorUI.java
@@ -19,8 +19,8 @@ import com.vaadin.tests.components.table.TableItemDescriptionGeneratorUI;
import com.vaadin.ui.Table;
import com.vaadin.ui.TreeTable;
-public class TreeTableItemDescriptionGeneratorUI extends
- TableItemDescriptionGeneratorUI {
+public class TreeTableItemDescriptionGeneratorUI
+ extends TableItemDescriptionGeneratorUI {
@Override
protected Table createTable() {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableModifyAndSetCollapsed.java b/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableModifyAndSetCollapsed.java
index 02ce397a05..133b024004 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableModifyAndSetCollapsed.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableModifyAndSetCollapsed.java
@@ -33,8 +33,8 @@ public class TreeTableModifyAndSetCollapsed extends TestBase {
int parentId = counter++;
Item parent = container.addItem(parentId);
tt.setCollapsed(parentId, false);
- parent.getItemProperty("value").setValue(
- "parent " + (counter++) + "");
+ parent.getItemProperty("value")
+ .setValue("parent " + (counter++) + "");
for (int i = 0; i < 4; i++) {
int childId = counter++;
Item child = container.addItem(childId);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableOutOfSync.java b/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableOutOfSync.java
index b8a0ac61c2..9684306fcf 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableOutOfSync.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableOutOfSync.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTablePartialUpdates.java b/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTablePartialUpdates.java
index 78d67ee090..467eaba120 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTablePartialUpdates.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTablePartialUpdates.java
@@ -45,7 +45,8 @@ public class TreeTablePartialUpdates extends AbstractTestUI {
}
@SuppressWarnings("unchecked")
- private void addNodesToRoot(HierarchicalContainer hc, Object root, int count) {
+ private void addNodesToRoot(HierarchicalContainer hc, Object root,
+ int count) {
for (int ix = 0; ix < count; ix++) {
Object id = hc.addItem();
hc.getItem(id).getItemProperty("p1").setValue(String.valueOf(ix));
diff --git a/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTablePartialUpdatesPageLength0.java b/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTablePartialUpdatesPageLength0.java
index 686d86a0dc..002ea08429 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTablePartialUpdatesPageLength0.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTablePartialUpdatesPageLength0.java
@@ -50,7 +50,8 @@ public class TreeTablePartialUpdatesPageLength0 extends AbstractTestUI {
}
@SuppressWarnings("unchecked")
- private void addNodesToRoot(HierarchicalContainer hc, Object root, int count) {
+ private void addNodesToRoot(HierarchicalContainer hc, Object root,
+ int count) {
for (int ix = 0; ix < count; ix++) {
Object id = hc.addItem();
hc.getItem(id).getItemProperty("p1").setValue(String.valueOf(ix));
diff --git a/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableRowGenerator.java b/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableRowGenerator.java
index e8da4abbec..0ac904e0cb 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableRowGenerator.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableRowGenerator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableRowHeaderMode.java b/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableRowHeaderMode.java
index 6bc6fa74c0..3996852686 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableRowHeaderMode.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableRowHeaderMode.java
@@ -9,7 +9,7 @@ import com.vaadin.ui.TreeTable;
/**
* Test UI for RowHeaderMode.ICON_ONLY in TreeTable.
- *
+ *
* @author Vaadin Ltd
*/
public class TreeTableRowHeaderMode extends AbstractTestUI {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableRowIcons.java b/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableRowIcons.java
index 0668a6aeeb..b32644cd29 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableRowIcons.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableRowIcons.java
@@ -18,8 +18,8 @@ public class TreeTableRowIcons extends AbstractTestUI {
layout.setSpacing(true);
addComponent(layout);
- layout.addComponent(createTreeTableAndPopulate(new ThemeResource(
- "../runo/icons/16/ok.png")));
+ layout.addComponent(createTreeTableAndPopulate(
+ new ThemeResource("../runo/icons/16/ok.png")));
layout.addComponent(createTreeTableAndPopulate(FontAwesome.ANDROID));
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableScrollOnExpand.java b/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableScrollOnExpand.java
index 07cf7f8c2e..921bd6cada 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableScrollOnExpand.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableScrollOnExpand.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableTest.java b/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableTest.java
index 02f848cd40..f3ac9fc602 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/treetable/TreeTableTest.java
@@ -17,8 +17,8 @@ import com.vaadin.ui.Tree.ExpandEvent;
import com.vaadin.ui.Tree.ExpandListener;
import com.vaadin.ui.TreeTable;
-public class TreeTableTest extends Tables<TreeTable> implements
- CollapseListener, ExpandListener {
+public class TreeTableTest extends Tables<TreeTable>
+ implements CollapseListener, ExpandListener {
@Override
protected Class<TreeTable> getTestClass() {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/ui/ComboboxSelectedItemText.java b/uitest/src/main/java/com/vaadin/tests/components/ui/ComboboxSelectedItemText.java
index d4599fc1a3..c2f640f7c8 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/ui/ComboboxSelectedItemText.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/ui/ComboboxSelectedItemText.java
@@ -8,10 +8,8 @@ import com.vaadin.ui.Label;
public class ComboboxSelectedItemText extends AbstractTestUIWithLog {
@Override
protected void setup(VaadinRequest request) {
- getLayout()
- .addComponent(
- new Label(
- "Select first ANTIGUA AND BARBUDA from the first combobox. Then select ANTIGUA AND BARBUDA from the second combobox. Finally, click the popup button on the first combobox. Before fix you would see UA AND BAR in the field."));
+ getLayout().addComponent(new Label(
+ "Select first ANTIGUA AND BARBUDA from the first combobox. Then select ANTIGUA AND BARBUDA from the second combobox. Finally, click the popup button on the first combobox. Before fix you would see UA AND BAR in the field."));
ComboBox combobox = new ComboBox("Text input enabled:");
combobox.setWidth("100px");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/ui/CurrentUiRetained.java b/uitest/src/main/java/com/vaadin/tests/components/ui/CurrentUiRetained.java
index cba2adb5db..fe7edacb6c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/ui/CurrentUiRetained.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/ui/CurrentUiRetained.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/ui/CustomUITest.java b/uitest/src/main/java/com/vaadin/tests/components/ui/CustomUITest.java
index a960e9cc46..52aded0cdb 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/ui/CustomUITest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/ui/CustomUITest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/ui/DynamicViewport.java b/uitest/src/main/java/com/vaadin/tests/components/ui/DynamicViewport.java
index ca9ebcd451..e6608a035a 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/ui/DynamicViewport.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/ui/DynamicViewport.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/ui/InvalidViewport.java b/uitest/src/main/java/com/vaadin/tests/components/ui/InvalidViewport.java
index 9557a2d2b0..26452f2c71 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/ui/InvalidViewport.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/ui/InvalidViewport.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/ui/LazyInitUIs.java b/uitest/src/main/java/com/vaadin/tests/components/ui/LazyInitUIs.java
index 984ac69d6e..aa4fee34f1 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/ui/LazyInitUIs.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/ui/LazyInitUIs.java
@@ -48,7 +48,8 @@ public class LazyInitUIs extends AbstractTestUIProvider {
layout.setMargin(true);
setContent(layout);
- layout.addComponent(getRequestInfo("LazyCreateUI", request));
+ layout.addComponent(
+ getRequestInfo("LazyCreateUI", request));
}
};
return uI;
diff --git a/uitest/src/main/java/com/vaadin/tests/components/ui/MultiFileUploadTest.java b/uitest/src/main/java/com/vaadin/tests/components/ui/MultiFileUploadTest.java
index 007a49e0e2..b7661184f7 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/ui/MultiFileUploadTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/ui/MultiFileUploadTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -51,8 +51,8 @@ public class MultiFileUploadTest extends AbstractTestUIWithLog {
@Override
protected void setup(VaadinRequest request) {
- getPage().getStyles().add(
- ".v-upload-hidden-button .v-button {display:none};");
+ getPage().getStyles()
+ .add(".v-upload-hidden-button .v-button {display:none};");
addUpload();
addComponent(uploadsLayout);
addComponent(new Button("Upload files", new ClickListener() {
@@ -95,7 +95,8 @@ public class MultiFileUploadTest extends AbstractTestUIWithLog {
upload.setReceiver(new Receiver() {
@Override
- public OutputStream receiveUpload(String filename, String mimeType) {
+ public OutputStream receiveUpload(String filename,
+ String mimeType) {
return new OutputStream() {
@Override
public void write(int arg0) throws IOException {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/ui/MultipleUIUploadTest.java b/uitest/src/main/java/com/vaadin/tests/components/ui/MultipleUIUploadTest.java
index f92e22d06b..db19dcbaea 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/ui/MultipleUIUploadTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/ui/MultipleUIUploadTest.java
@@ -58,8 +58,8 @@ public class MultipleUIUploadTest extends AbstractTestUI {
}
- public class MemoryBuffer implements StreamResource.StreamSource,
- Upload.Receiver {
+ public class MemoryBuffer
+ implements StreamResource.StreamSource, Upload.Receiver {
ByteArrayOutputStream outputBuffer = null;
String mimeType;
@@ -97,7 +97,7 @@ public class MultipleUIUploadTest extends AbstractTestUI {
/**
* Returns the fileName.
- *
+ *
* @return String
*/
public String getFileName() {
@@ -106,7 +106,7 @@ public class MultipleUIUploadTest extends AbstractTestUI {
/**
* Returns the mimeType.
- *
+ *
* @return String
*/
public String getMimeType() {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/ui/PollListening.java b/uitest/src/main/java/com/vaadin/tests/components/ui/PollListening.java
index 1ec4f4d9f7..8dae69afe1 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/ui/PollListening.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/ui/PollListening.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -34,8 +34,8 @@ public class PollListening extends AbstractTestUI {
@Override
public void poll(PollEvent event) {
setPollInterval(-1);
- statusLabel.setValue(event.getClass().getSimpleName()
- + " received");
+ statusLabel.setValue(
+ event.getClass().getSimpleName() + " received");
removePollListener(this);
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/components/ui/StaticViewport.java b/uitest/src/main/java/com/vaadin/tests/components/ui/StaticViewport.java
index 813206dbe8..f1cc2a2add 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/ui/StaticViewport.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/ui/StaticViewport.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/ui/TextAreaEventPropagation.java b/uitest/src/main/java/com/vaadin/tests/components/ui/TextAreaEventPropagation.java
index 0d38de5923..95c420a16c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/ui/TextAreaEventPropagation.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/ui/TextAreaEventPropagation.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ import com.vaadin.ui.TextField;
/**
* UI test for TextArea behavior when ENTER has been assigned as a keyboard
* shortcut.
- *
+ *
* @author Vaadin Ltd
*/
public class TextAreaEventPropagation extends AbstractTestUIWithLog {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/ui/TimeoutRedirectResetsOnActivity.java b/uitest/src/main/java/com/vaadin/tests/components/ui/TimeoutRedirectResetsOnActivity.java
index cb62ccdb19..3ce7711127 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/ui/TimeoutRedirectResetsOnActivity.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/ui/TimeoutRedirectResetsOnActivity.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -67,8 +67,8 @@ public class TimeoutRedirectResetsOnActivity extends AbstractTestUI {
}
private void setupTimeout(VaadinRequest request) {
- request.getService().setSystemMessagesProvider(
- new SystemMessagesProvider() {
+ request.getService()
+ .setSystemMessagesProvider(new SystemMessagesProvider() {
@Override
public SystemMessages getSystemMessages(
SystemMessagesInfo systemMessagesInfo) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/ui/UIAccess.java b/uitest/src/main/java/com/vaadin/tests/components/ui/UIAccess.java
index 70a69ef7d3..0c7fcb6c65 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/ui/UIAccess.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/ui/UIAccess.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -52,8 +52,8 @@ public class UIAccess extends AbstractTestUIWithLog {
@Override
protected void setup(VaadinRequest request) {
- addComponent(new Button("Access from UI thread",
- new Button.ClickListener() {
+ addComponent(
+ new Button("Access from UI thread", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
@@ -84,14 +84,15 @@ public class UIAccess extends AbstractTestUIWithLog {
.getCurrentResponse() != null;
// session is locked by request thread at this
// point
- final Future<Void> initialFuture = access(new Runnable() {
- @Override
- public void run() {
- log("Initial background message");
- log("Thread has current response? "
- + threadHasCurrentResponse);
- }
- });
+ final Future<Void> initialFuture = access(
+ new Runnable() {
+ @Override
+ public void run() {
+ log("Initial background message");
+ log("Thread has current response? "
+ + threadHasCurrentResponse);
+ }
+ });
// Let request thread continue
latch.countDown();
@@ -171,8 +172,8 @@ public class UIAccess extends AbstractTestUIWithLog {
log("future was cancelled, should not start");
}
}));
- addComponent(new Button("Cancel running future",
- new Button.ClickListener() {
+ addComponent(
+ new Button("Cancel running future", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
log.clear();
@@ -232,10 +233,11 @@ public class UIAccess extends AbstractTestUIWithLog {
@Override
public void run() {
log.log("accessSynchronously has request? "
- + (VaadinService.getCurrentRequest() != null));
+ + (VaadinService
+ .getCurrentRequest() != null));
log.log("Test value in accessSynchronously: "
- + CurrentInstance
- .get(CurrentInstanceTestType.class));
+ + CurrentInstance.get(
+ CurrentInstanceTestType.class));
CurrentInstance.set(
CurrentInstanceTestType.class,
new CurrentInstanceTestType(
@@ -255,18 +257,18 @@ public class UIAccess extends AbstractTestUIWithLog {
public void buttonClick(ClickEvent event) {
log.clear();
// accessSynchronously should maintain values
- CurrentInstance
- .setInheritable(CurrentInstanceTestType.class,
- new CurrentInstanceTestType(
- "Set before access"));
+ CurrentInstance.setInheritable(
+ CurrentInstanceTestType.class,
+ new CurrentInstanceTestType(
+ "Set before access"));
access(new Runnable() {
@Override
public void run() {
- log.log("access has request? "
- + (VaadinService.getCurrentRequest() != null));
+ log.log("access has request? " + (VaadinService
+ .getCurrentRequest() != null));
log.log("Test value in access: "
- + CurrentInstance
- .get(CurrentInstanceTestType.class));
+ + CurrentInstance.get(
+ CurrentInstanceTestType.class));
CurrentInstance.setInheritable(
CurrentInstanceTestType.class,
new CurrentInstanceTestType(
@@ -278,14 +280,13 @@ public class UIAccess extends AbstractTestUIWithLog {
new CurrentInstanceTestType(
"Set before run pending"));
- getSession().getService().runPendingAccessTasks(
- getSession());
+ getSession().getService()
+ .runPendingAccessTasks(getSession());
log.log("has request after access? "
+ (VaadinService.getCurrentRequest() != null));
- log("Test value after access: "
- + CurrentInstance
- .get(CurrentInstanceTestType.class));
+ log("Test value after access: " + CurrentInstance
+ .get(CurrentInstanceTestType.class));
}
}));
@@ -294,7 +295,8 @@ public class UIAccess extends AbstractTestUIWithLog {
@Override
public void buttonClick(ClickEvent event) {
log.clear();
- if (getPushConfiguration().getPushMode() != PushMode.AUTOMATIC) {
+ if (getPushConfiguration()
+ .getPushMode() != PushMode.AUTOMATIC) {
log("Can only test with automatic push enabled");
return;
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/ui/UIAccessExceptionHandling.java b/uitest/src/main/java/com/vaadin/tests/components/ui/UIAccessExceptionHandling.java
index bd18d93328..1f2837c837 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/ui/UIAccessExceptionHandling.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/ui/UIAccessExceptionHandling.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,8 +30,8 @@ import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.UI;
import com.vaadin.util.CurrentInstance;
-public class UIAccessExceptionHandling extends AbstractTestUIWithLog implements
- ErrorHandler {
+public class UIAccessExceptionHandling extends AbstractTestUIWithLog
+ implements ErrorHandler {
private Future<Void> future;
@@ -81,35 +81,36 @@ public class UIAccessExceptionHandling extends AbstractTestUIWithLog implements
}
}));
- addComponent(new Button(
- "Throw RuntimeException after removing instances",
- new Button.ClickListener() {
+ addComponent(
+ new Button("Throw RuntimeException after removing instances",
+ new Button.ClickListener() {
- @Override
- public void buttonClick(ClickEvent event) {
- log.clear();
+ @Override
+ public void buttonClick(ClickEvent event) {
+ log.clear();
- // Ensure beforeClientResponse is invoked
- markAsDirty();
+ // Ensure beforeClientResponse is invoked
+ markAsDirty();
- assert UI.getCurrent() == UIAccessExceptionHandling.this;
+ assert UI
+ .getCurrent() == UIAccessExceptionHandling.this;
- Map<Class<?>, CurrentInstance> instances = CurrentInstance
- .getInstances(false);
- CurrentInstance.clearAll();
+ Map<Class<?>, CurrentInstance> instances = CurrentInstance
+ .getInstances(false);
+ CurrentInstance.clearAll();
- assert UI.getCurrent() == null;
+ assert UI.getCurrent() == null;
- future = access(new Runnable() {
- @Override
- public void run() {
- throw new RuntimeException();
- }
- });
+ future = access(new Runnable() {
+ @Override
+ public void run() {
+ throw new RuntimeException();
+ }
+ });
- CurrentInstance.restoreInstances(instances);
- }
- }));
+ CurrentInstance.restoreInstances(instances);
+ }
+ }));
addComponent(new Button("Clear", new Button.ClickListener() {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/ui/UIAutoGeneratedStyleName.java b/uitest/src/main/java/com/vaadin/tests/components/ui/UIAutoGeneratedStyleName.java
index 35dc4cd325..7346878e28 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/ui/UIAutoGeneratedStyleName.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/ui/UIAutoGeneratedStyleName.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import com.vaadin.tests.components.AbstractTestUI;
/**
* Empty test ui to check auto-generated style name for UI.
- *
+ *
* @author Vaadin Ltd
*/
public class UIAutoGeneratedStyleName extends AbstractTestUI {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/ui/UIInitTest.java b/uitest/src/main/java/com/vaadin/tests/components/ui/UIInitTest.java
index 7d5bbe156b..6f36c1bf16 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/ui/UIInitTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/ui/UIInitTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/ui/UIPolling.java b/uitest/src/main/java/com/vaadin/tests/components/ui/UIPolling.java
index 7d9f09892c..37ad97cae6 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/ui/UIPolling.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/ui/UIPolling.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/ui/UIRefresh.java b/uitest/src/main/java/com/vaadin/tests/components/ui/UIRefresh.java
index 9fcc1eedde..4168e7689e 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/ui/UIRefresh.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/ui/UIRefresh.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/ui/UISerialization.java b/uitest/src/main/java/com/vaadin/tests/components/ui/UISerialization.java
index cbd317b027..b76b2292d1 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/ui/UISerialization.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/ui/UISerialization.java
@@ -55,8 +55,8 @@ public class UISerialization extends AbstractTestUI {
.getDiffState(UISerialization.this);
UISerialization app = (UISerialization) deserialize(result);
log.log("Deserialized UI in " + elapsed + "ms");
- Object diffStateAfter = getConnectorTracker().getDiffState(
- UISerialization.this);
+ Object diffStateAfter = getConnectorTracker()
+ .getDiffState(UISerialization.this);
if (diffStateBefore.equals(diffStateAfter)) {
log.log("Diff states match, size: "
+ diffStateBefore.toString().length());
@@ -67,8 +67,8 @@ public class UISerialization extends AbstractTestUI {
log.log("Exception caught: " + e.getMessage());
StringWriter sw = new StringWriter();
e.printStackTrace(new PrintWriter(sw));
- addComponent(new Label(sw.toString(),
- ContentMode.PREFORMATTED));
+ addComponent(
+ new Label(sw.toString(), ContentMode.PREFORMATTED));
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/ui/UiDependenciesInHtml.java b/uitest/src/main/java/com/vaadin/tests/components/ui/UiDependenciesInHtml.java
index 96210b2027..ce8963a2ba 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/ui/UiDependenciesInHtml.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/ui/UiDependenciesInHtml.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/ui/UnnecessaryPaddingInResponsiveUI.java b/uitest/src/main/java/com/vaadin/tests/components/ui/UnnecessaryPaddingInResponsiveUI.java
index e80686f6f3..68c470351f 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/ui/UnnecessaryPaddingInResponsiveUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/ui/UnnecessaryPaddingInResponsiveUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,7 +27,7 @@ import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.themes.ValoTheme;
/**
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/components/ui/UriFragment.java b/uitest/src/main/java/com/vaadin/tests/components/ui/UriFragment.java
index c726c49b12..bcad8589d6 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/ui/UriFragment.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/ui/UriFragment.java
@@ -29,7 +29,8 @@ public class UriFragment extends AbstractTestUI {
addComponent(createButton("null", "setUriFragment(null)", null));
}
- private Button createButton(String id, String caption, final String fragment) {
+ private Button createButton(String id, String caption,
+ final String fragment) {
Button button = new Button(caption, new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/ui/WindowAndUIShortcuts.java b/uitest/src/main/java/com/vaadin/tests/components/ui/WindowAndUIShortcuts.java
index c5c9c16e2d..1db45c7ba2 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/ui/WindowAndUIShortcuts.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/ui/WindowAndUIShortcuts.java
@@ -23,16 +23,15 @@ public class WindowAndUIShortcuts extends UI {
final VerticalLayout mainLayout = new VerticalLayout();
- mainLayout.addComponent(new Button("Show page",
- new Button.ClickListener() {
+ mainLayout.addComponent(
+ new Button("Show page", new Button.ClickListener() {
@Override
public void buttonClick(Button.ClickEvent clickEvent) {
final VerticalLayout pageLayout = new VerticalLayout();
pageLayout.setSpacing(true);
pageLayout.addComponent(new Label("Page"));
- pageLayout.addComponent(new Button(
- "Open dialog window",
+ pageLayout.addComponent(new Button("Open dialog window",
new Button.ClickListener() {
@Override
public void buttonClick(
@@ -55,12 +54,12 @@ public class WindowAndUIShortcuts extends UI {
Button.ClickEvent clickEvent) {
mainLayout.removeComponent(pageLayout);
- Notification
- .show("OMG! Page is also closed!");
+ Notification.show(
+ "OMG! Page is also closed!");
}
});
- closeButton
- .setClickShortcut(ShortcutAction.KeyCode.ESCAPE);
+ closeButton.setClickShortcut(
+ ShortcutAction.KeyCode.ESCAPE);
pageLayout.addComponent(closeButton);
mainLayout.addComponent(pageLayout);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/uitest/BackButtonTest.java b/uitest/src/main/java/com/vaadin/tests/components/uitest/BackButtonTest.java
index 7e7a084eed..475f6c7b0a 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/uitest/BackButtonTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/uitest/BackButtonTest.java
@@ -35,7 +35,8 @@ public class BackButtonTest extends AbstractTestUI {
new UriFragmentChangedListener() {
@Override
- public void uriFragmentChanged(UriFragmentChangedEvent event) {
+ public void uriFragmentChanged(
+ UriFragmentChangedEvent event) {
String f = event.getUriFragment();
if ("page2".equals(f)) {
showPage2();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/uitest/TestSampler.java b/uitest/src/main/java/com/vaadin/tests/components/uitest/TestSampler.java
index fce2ef680d..ef2ed2ffda 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/uitest/TestSampler.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/uitest/TestSampler.java
@@ -163,7 +163,8 @@ public class TestSampler extends TabSheet {
createComponentLayout(caption, hl);
}
- private void createComponentLayout(String caption, ComponentContainer layout) {
+ private void createComponentLayout(String caption,
+ ComponentContainer layout) {
addTab(layout, caption);
currentTab = layout;
}
@@ -177,7 +178,7 @@ public class TestSampler extends TabSheet {
/**
* Register a component to the TestSampler for style name changes/additions.
- *
+ *
* @param component
*/
public void registerComponent(Component component) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/uitest/components/EmbeddedCssTest.java b/uitest/src/main/java/com/vaadin/tests/components/uitest/components/EmbeddedCssTest.java
index 57783f6eb3..3108341216 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/uitest/components/EmbeddedCssTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/uitest/components/EmbeddedCssTest.java
@@ -10,8 +10,8 @@ public class EmbeddedCssTest {
private int debugIdCounter = 0;
public EmbeddedCssTest(TestSampler parent) {
- Embedded e = new Embedded("Embedded with a caption", new ThemeResource(
- parent.ICON_URL));
+ Embedded e = new Embedded("Embedded with a caption",
+ new ThemeResource(parent.ICON_URL));
e.setId("embedded" + debugIdCounter);
parent.addComponent(e);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/uitest/components/LayoutsCssTest.java b/uitest/src/main/java/com/vaadin/tests/components/uitest/components/LayoutsCssTest.java
index 0ef37bf5c4..0e4cc931f3 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/uitest/components/LayoutsCssTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/uitest/components/LayoutsCssTest.java
@@ -101,8 +101,8 @@ public class LayoutsCssTest extends GridLayout {
CustomLayout custom;
try {
- custom = new CustomLayout(new ByteArrayInputStream(
- customLayoutSrc.getBytes()));
+ custom = new CustomLayout(
+ new ByteArrayInputStream(customLayoutSrc.getBytes()));
custom.addComponent(new Label("Some content"), "pos1");
custom.setComponentError(new UserError("A error mesasge..."));
custom.setCaption("CustomLayout");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/uitest/components/SelectsCssTest.java b/uitest/src/main/java/com/vaadin/tests/components/uitest/components/SelectsCssTest.java
index cf63222ee8..9c3f91c661 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/uitest/components/SelectsCssTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/uitest/components/SelectsCssTest.java
@@ -76,7 +76,8 @@ public class SelectsCssTest extends GridLayout {
addComponent(s);
createComboBoxWith(null, null, "100px");
- createComboBoxWith("CB Search", ChameleonTheme.COMBOBOX_SEARCH, "100px");
+ createComboBoxWith("CB Search", ChameleonTheme.COMBOBOX_SEARCH,
+ "100px");
createComboBoxWith("SelectButton",
ChameleonTheme.COMBOBOX_SELECT_BUTTON, "100px");
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/uitest/components/TabSheetsCssTest.java b/uitest/src/main/java/com/vaadin/tests/components/uitest/components/TabSheetsCssTest.java
index b05eb2f32a..40fcac0d82 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/uitest/components/TabSheetsCssTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/uitest/components/TabSheetsCssTest.java
@@ -31,8 +31,8 @@ public class TabSheetsCssTest {
Reindeer.TABSHEET_MINIMAL);
parent.addComponent(minimal);
- TabSheet hoverClosable = createTabSheetWith(
- "A hover-closable TabSheet", Reindeer.TABSHEET_HOVER_CLOSABLE);
+ TabSheet hoverClosable = createTabSheetWith("A hover-closable TabSheet",
+ Reindeer.TABSHEET_HOVER_CLOSABLE);
parent.addComponent(hoverClosable);
TabSheet selectedClosable = createTabSheetWith(
diff --git a/uitest/src/main/java/com/vaadin/tests/components/uitest/components/TablesCssTest.java b/uitest/src/main/java/com/vaadin/tests/components/uitest/components/TablesCssTest.java
index 2d77354174..2d914f98f1 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/uitest/components/TablesCssTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/uitest/components/TablesCssTest.java
@@ -67,8 +67,8 @@ public class TablesCssTest extends GridLayout {
t.setColumnReorderingAllowed(true);
t.setColumnCollapsingAllowed(true);
// t.setColumnHeaders(new String[] { "Country", "Code", "Icon file" });
- t.setColumnIcon(TestUtils.iso3166_PROPERTY_NAME, new ThemeResource(
- parent.ICON_URL));
+ t.setColumnIcon(TestUtils.iso3166_PROPERTY_NAME,
+ new ThemeResource(parent.ICON_URL));
// Actions (a.k.a context menu)
t.addActionHandler(new Action.Handler() {
@@ -82,7 +82,8 @@ public class TablesCssTest extends GridLayout {
}
@Override
- public void handleAction(Action action, Object sender, Object target) {
+ public void handleAction(Action action, Object sender,
+ Object target) {
// We just want the actions UI.. don't care about the logic...
if (ACTION_MARK == action) {
markedRows.add(target);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/uitest/components/TextFieldsCssTest.java b/uitest/src/main/java/com/vaadin/tests/components/uitest/components/TextFieldsCssTest.java
index 6ae220bb3a..3610957ebf 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/uitest/components/TextFieldsCssTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/uitest/components/TextFieldsCssTest.java
@@ -71,8 +71,8 @@ public class TextFieldsCssTest extends GridLayout {
@Override
public void addComponent(Component component, int column1, int row1,
- int column2, int row2) throws OverlapsException,
- OutOfBoundsException {
+ int column2, int row2)
+ throws OverlapsException, OutOfBoundsException {
parent.registerComponent(component);
super.addComponent(component, column1, row1, column2, row2);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/uitest/components/TreeCssTest.java b/uitest/src/main/java/com/vaadin/tests/components/uitest/components/TreeCssTest.java
index 0508bfc0f9..626d9f47a0 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/uitest/components/TreeCssTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/uitest/components/TreeCssTest.java
@@ -25,7 +25,8 @@ public class TreeCssTest {
tree.addActionHandler(new Action.Handler() {
@Override
- public void handleAction(Action action, Object sender, Object target) {
+ public void handleAction(Action action, Object sender,
+ Object target) {
// We don't care about functionality, we just want the UI for
// testing..
diff --git a/uitest/src/main/java/com/vaadin/tests/components/uitest/components/WindowsCssTest.java b/uitest/src/main/java/com/vaadin/tests/components/uitest/components/WindowsCssTest.java
index 9a2ebae7f3..18db56ea36 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/uitest/components/WindowsCssTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/uitest/components/WindowsCssTest.java
@@ -74,7 +74,7 @@ public class WindowsCssTest extends VerticalLayout {
}
/**
- *
+ *
* @param caption
* @param primaryStyleName
* - the style defined styleName
diff --git a/uitest/src/main/java/com/vaadin/tests/components/upload/TestFileUpload.java b/uitest/src/main/java/com/vaadin/tests/components/upload/TestFileUpload.java
index b57c236b20..621141ce31 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/upload/TestFileUpload.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/upload/TestFileUpload.java
@@ -25,7 +25,8 @@ public class TestFileUpload extends TestBase implements Receiver {
Upload u = new Upload("Upload", new Upload.Receiver() {
@Override
- public OutputStream receiveUpload(String filename, String mimeType) {
+ public OutputStream receiveUpload(String filename,
+ String mimeType) {
return baos;
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/components/upload/TestFileUploadSize.java b/uitest/src/main/java/com/vaadin/tests/components/upload/TestFileUploadSize.java
index 178f8f9393..4744c935c6 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/upload/TestFileUploadSize.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/upload/TestFileUploadSize.java
@@ -29,7 +29,8 @@ public class TestFileUploadSize extends TestBase implements Receiver {
Upload u = new Upload("Upload", new Upload.Receiver() {
@Override
- public OutputStream receiveUpload(String filename, String mimeType) {
+ public OutputStream receiveUpload(String filename,
+ String mimeType) {
return baos;
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/components/upload/TestImmediateUploadInFormLayout.java b/uitest/src/main/java/com/vaadin/tests/components/upload/TestImmediateUploadInFormLayout.java
index 7607536357..5ac15a7814 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/upload/TestImmediateUploadInFormLayout.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/upload/TestImmediateUploadInFormLayout.java
@@ -11,8 +11,8 @@ import com.vaadin.ui.FormLayout;
import com.vaadin.ui.Upload;
import com.vaadin.ui.Upload.Receiver;
-public class TestImmediateUploadInFormLayout extends
- ComponentTestCase<FormLayout> implements Receiver {
+public class TestImmediateUploadInFormLayout
+ extends ComponentTestCase<FormLayout> implements Receiver {
@Override
protected String getDescription() {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/upload/UploadImmediateButtonWidth.java b/uitest/src/main/java/com/vaadin/tests/components/upload/UploadImmediateButtonWidth.java
index 48dd96bc43..c0593b7bb5 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/upload/UploadImmediateButtonWidth.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/upload/UploadImmediateButtonWidth.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/upload/UploadNoSelection.java b/uitest/src/main/java/com/vaadin/tests/components/upload/UploadNoSelection.java
index ecde5760c9..3d26f6cb77 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/upload/UploadNoSelection.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/upload/UploadNoSelection.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,8 +25,8 @@ import com.vaadin.ui.Upload.FailedEvent;
import com.vaadin.ui.Upload.FinishedEvent;
import com.vaadin.ui.Upload.Receiver;
-public class UploadNoSelection extends AbstractTestUIWithLog implements
- Receiver {
+public class UploadNoSelection extends AbstractTestUIWithLog
+ implements Receiver {
static final String LOG_ID_PREFIX = "Log_row_";
static final String UPLOAD_ID = "u";
diff --git a/uitest/src/main/java/com/vaadin/tests/components/upload/UploadTitleWithTooltip.java b/uitest/src/main/java/com/vaadin/tests/components/upload/UploadTitleWithTooltip.java
index e2d47ab901..21c18c1feb 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/upload/UploadTitleWithTooltip.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/upload/UploadTitleWithTooltip.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ import com.vaadin.ui.Upload;
/**
* Test UI for browser-dependent tootlip for Upload component.
- *
+ *
* @author Vaadin Ltd
*/
public class UploadTitleWithTooltip extends AbstractTestUI {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/BackspaceKeyWithModalOpened.java b/uitest/src/main/java/com/vaadin/tests/components/window/BackspaceKeyWithModalOpened.java
index 7f23362efd..8a99c8f493 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/BackspaceKeyWithModalOpened.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/BackspaceKeyWithModalOpened.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/BottomComponentScrollsUp.java b/uitest/src/main/java/com/vaadin/tests/components/window/BottomComponentScrollsUp.java
index 2c5e415408..19887fc5cd 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/BottomComponentScrollsUp.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/BottomComponentScrollsUp.java
@@ -31,7 +31,7 @@ import com.vaadin.ui.Window;
/**
* Reproducing bug #12943 where an action on a Button or ComboBox placed at the
* bottom of a window in a scroll panel, will scroll up the parent panel.
- *
+ *
* This was due to the fact that with the state confirmation notification from
* the server, the window.setVisible would be call again, and the hack that
* solved the scrollbars in a window (#11994) would cause the our bug.
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/CenteredInVisualViewport.java b/uitest/src/main/java/com/vaadin/tests/components/window/CenteredInVisualViewport.java
index 428b2ae3f9..c241d42dff 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/CenteredInVisualViewport.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/CenteredInVisualViewport.java
@@ -30,8 +30,8 @@ public class CenteredInVisualViewport extends TestBase {
@Override
public void buttonClick(ClickEvent event) {
- Window centered = new Window("A window", new Label(
- "Centered window"));
+ Window centered = new Window("A window",
+ new Label("Centered window"));
centered.center();
getMainWindow().addWindow(centered);
}
@@ -42,8 +42,8 @@ public class CenteredInVisualViewport extends TestBase {
@Override
public void buttonClick(ClickEvent event) {
- Window centered = new Window("A window", new Label(
- "Centered window"));
+ Window centered = new Window("A window",
+ new Label("Centered window"));
centered.center();
getMainWindow().addWindow(centered);
}
@@ -54,8 +54,8 @@ public class CenteredInVisualViewport extends TestBase {
@Override
public void buttonClick(ClickEvent event) {
- Window centered = new Window("A window", new Label(
- "Centered window"));
+ Window centered = new Window("A window",
+ new Label("Centered window"));
centered.center();
getMainWindow().addWindow(centered);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/CloseModalSubWindow.java b/uitest/src/main/java/com/vaadin/tests/components/window/CloseModalSubWindow.java
index 4e07c591ae..2b2bf47009 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/CloseModalSubWindow.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/CloseModalSubWindow.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/ComboboxScrollableWindow.java b/uitest/src/main/java/com/vaadin/tests/components/window/ComboboxScrollableWindow.java
index b952df0ed9..34e385fe15 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/ComboboxScrollableWindow.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/ComboboxScrollableWindow.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.Window;
/**
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/DownloadAndUpdate.java b/uitest/src/main/java/com/vaadin/tests/components/window/DownloadAndUpdate.java
index 573f55b29d..cd057f48b0 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/DownloadAndUpdate.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/DownloadAndUpdate.java
@@ -10,8 +10,8 @@ public class DownloadAndUpdate extends TestBase {
@Override
protected void setup() {
- addComponent(new Button("Download and update",
- new Button.ClickListener() {
+ addComponent(
+ new Button("Download and update", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
downloadAndUpdate();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/ExtraWindowShown.java b/uitest/src/main/java/com/vaadin/tests/components/window/ExtraWindowShown.java
index 92fbcffd01..925dfd28c6 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/ExtraWindowShown.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/ExtraWindowShown.java
@@ -22,8 +22,8 @@ public class ExtraWindowShown extends AbstractTestUI {
layout.setMargin(true);
final Window w = new Window("Sub window", layout);
w.center();
- layout.addComponent(new Button("Close",
- new Button.ClickListener() {
+ layout.addComponent(
+ new Button("Close", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/ExtraWindowShownWaiAria.java b/uitest/src/main/java/com/vaadin/tests/components/window/ExtraWindowShownWaiAria.java
index c7379f666b..828855afb6 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/ExtraWindowShownWaiAria.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/ExtraWindowShownWaiAria.java
@@ -61,10 +61,10 @@ public class ExtraWindowShownWaiAria extends AbstractTestUI {
}
w.setTabStopEnabled(tabStop.getValue());
- w.setTabStopTopAssistiveText(topTabStopMessage
- .getValue());
- w.setTabStopBottomAssistiveText(bottomTabStopMessage
- .getValue());
+ w.setTabStopTopAssistiveText(
+ topTabStopMessage.getValue());
+ w.setTabStopBottomAssistiveText(
+ bottomTabStopMessage.getValue());
Button close = new Button("Close",
new Button.ClickListener() {
@@ -75,8 +75,8 @@ public class ExtraWindowShownWaiAria extends AbstractTestUI {
});
layout.addComponent(close);
Button iconButton = new Button("A button with icon");
- iconButton.setIcon(new ThemeResource(
- "../runo/icons/16/ok.png"));
+ iconButton.setIcon(
+ new ThemeResource("../runo/icons/16/ok.png"));
layout.addComponent(iconButton);
event.getButton().getUI().addWindow(w);
@@ -118,10 +118,10 @@ public class ExtraWindowShownWaiAria extends AbstractTestUI {
}
w.setTabStopEnabled(tabStop.getValue());
- w.setTabStopTopAssistiveText(topTabStopMessage
- .getValue());
- w.setTabStopBottomAssistiveText(bottomTabStopMessage
- .getValue());
+ w.setTabStopTopAssistiveText(
+ topTabStopMessage.getValue());
+ w.setTabStopBottomAssistiveText(
+ bottomTabStopMessage.getValue());
TextField name = new TextField("Name:");
form.addComponent(name);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/GridInWindow.java b/uitest/src/main/java/com/vaadin/tests/components/window/GridInWindow.java
index 918a991cc1..c9da90e257 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/GridInWindow.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/GridInWindow.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/LegacyWindowOpenTest.java b/uitest/src/main/java/com/vaadin/tests/components/window/LegacyWindowOpenTest.java
index ad36e04d88..3a46d8c299 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/LegacyWindowOpenTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/LegacyWindowOpenTest.java
@@ -53,7 +53,8 @@ public class LegacyWindowOpenTest extends TestBase {
new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- win.executeJavaScript("window.open(\"http://www.google.com\", \"_blank\");");
+ win.executeJavaScript(
+ "window.open(\"http://www.google.com\", \"_blank\");");
}
}));
addComponent(new Button(
@@ -61,7 +62,8 @@ public class LegacyWindowOpenTest extends TestBase {
new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- win.executeJavaScript("window.open(\"http://www.google.com\", \"_blank\", \"resizable=yes,menubar=yes,toolbar=yes,directories=yes,location=yes,scrollbars=yes,status=yes\");");
+ win.executeJavaScript(
+ "window.open(\"http://www.google.com\", \"_blank\", \"resizable=yes,menubar=yes,toolbar=yes,directories=yes,location=yes,scrollbars=yes,status=yes\");");
}
}));
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/LongNotifications.java b/uitest/src/main/java/com/vaadin/tests/components/window/LongNotifications.java
index be67cfe9a0..621c869e43 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/LongNotifications.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/LongNotifications.java
@@ -28,8 +28,7 @@ public class LongNotifications extends TestBase {
@Override
public void buttonClick(ClickEvent event) {
- getMainWindow().showNotification(
- text,
+ getMainWindow().showNotification(text,
"This is description for the same notifications."
+ text,
Notification.TYPE_HUMANIZED_MESSAGE);
@@ -56,12 +55,10 @@ public class LongNotifications extends TestBase {
@Override
public void buttonClick(ClickEvent event) {
- getMainWindow()
- .showNotification(
- text,
- "This is description for the same notifications."
- + text,
- Notification.TYPE_ERROR_MESSAGE);
+ getMainWindow().showNotification(text,
+ "This is description for the same notifications."
+ + text,
+ Notification.TYPE_ERROR_MESSAGE);
}
});
getLayout().addComponent(b);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/MaximizeRestoreWindowWithManagedLayout.java b/uitest/src/main/java/com/vaadin/tests/components/window/MaximizeRestoreWindowWithManagedLayout.java
index 2cbd154dbf..5044691d1b 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/MaximizeRestoreWindowWithManagedLayout.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/MaximizeRestoreWindowWithManagedLayout.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/MaximizedWindowOrder.java b/uitest/src/main/java/com/vaadin/tests/components/window/MaximizedWindowOrder.java
index 7da1517e8f..fb53eaba72 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/MaximizedWindowOrder.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/MaximizedWindowOrder.java
@@ -42,8 +42,8 @@ public class MaximizedWindowOrder extends AbstractTestUI {
layout.addComponent(button);
window.setContent(layout);
- window.setWindowMode(maximized ? WindowMode.MAXIMIZED
- : WindowMode.NORMAL);
+ window.setWindowMode(
+ maximized ? WindowMode.MAXIMIZED : WindowMode.NORMAL);
addWindow(window);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/ModalWindowFocus.java b/uitest/src/main/java/com/vaadin/tests/components/window/ModalWindowFocus.java
index 574a2d4991..01f27dc954 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/ModalWindowFocus.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/ModalWindowFocus.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/ModalWindowInitialLocation.java b/uitest/src/main/java/com/vaadin/tests/components/window/ModalWindowInitialLocation.java
index 3fa3730104..f07fb3d177 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/ModalWindowInitialLocation.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/ModalWindowInitialLocation.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/MoveToTop.java b/uitest/src/main/java/com/vaadin/tests/components/window/MoveToTop.java
index a5a4eb6df3..292484faaf 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/MoveToTop.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/MoveToTop.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.ui.Window;
/**
- *
+ *
* @author Vaadin Ltd
*/
public class MoveToTop extends AbstractTestUI {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/OpenModalWindowAndFocusField.java b/uitest/src/main/java/com/vaadin/tests/components/window/OpenModalWindowAndFocusField.java
index 1c82a3de02..7658fa89a9 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/OpenModalWindowAndFocusField.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/OpenModalWindowAndFocusField.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/PageOpenTest.java b/uitest/src/main/java/com/vaadin/tests/components/window/PageOpenTest.java
index a566b09cdc..6816417208 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/PageOpenTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/PageOpenTest.java
@@ -54,10 +54,8 @@ public class PageOpenTest extends AbstractTestUI {
new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- JavaScript
- .getCurrent()
- .execute(
- "window.open(\"http://www.google.com\", \"_blank\");");
+ JavaScript.getCurrent().execute(
+ "window.open(\"http://www.google.com\", \"_blank\");");
}
}));
addComponent(new Button(
@@ -65,10 +63,8 @@ public class PageOpenTest extends AbstractTestUI {
new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- JavaScript
- .getCurrent()
- .execute(
- "window.open(\"http://www.google.com\", \"_blank\", \"resizable=yes,menubar=yes,toolbar=yes,directories=yes,location=yes,scrollbars=yes,status=yes\");");
+ JavaScript.getCurrent().execute(
+ "window.open(\"http://www.google.com\", \"_blank\", \"resizable=yes,menubar=yes,toolbar=yes,directories=yes,location=yes,scrollbars=yes,status=yes\");");
}
}));
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/ScrollingBodyElementWithModalOpened.java b/uitest/src/main/java/com/vaadin/tests/components/window/ScrollingBodyElementWithModalOpened.java
index 403795b676..492d304d11 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/ScrollingBodyElementWithModalOpened.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/ScrollingBodyElementWithModalOpened.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.Window;
/**
- *
+ *
* @since 7.1.9
* @author Vaadin Ltd
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/SubWindowFocus.java b/uitest/src/main/java/com/vaadin/tests/components/window/SubWindowFocus.java
index 637df36e19..b233ef0d0d 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/SubWindowFocus.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/SubWindowFocus.java
@@ -71,8 +71,8 @@ public class SubWindowFocus extends TestBase {
if (action == esc) {
getMainWindow().removeWindow(win);
} else {
- getMainWindow().showNotification(
- action.getCaption());
+ getMainWindow()
+ .showNotification(action.getCaption());
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/SubWindowFocusAndBlurListeners.java b/uitest/src/main/java/com/vaadin/tests/components/window/SubWindowFocusAndBlurListeners.java
index 2a0f60f390..94d9d484b0 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/SubWindowFocusAndBlurListeners.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/SubWindowFocusAndBlurListeners.java
@@ -63,7 +63,8 @@ public class SubWindowFocusAndBlurListeners extends TestBase {
}
@Override
- public void handleAction(Action action, Object sender, Object target) {
+ public void handleAction(Action action, Object sender,
+ Object target) {
Notification.show("Action!");
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/SubWindowWithUndefinedHeight.java b/uitest/src/main/java/com/vaadin/tests/components/window/SubWindowWithUndefinedHeight.java
index 473b3e1f9c..8e47c608f2 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/SubWindowWithUndefinedHeight.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/SubWindowWithUndefinedHeight.java
@@ -42,7 +42,8 @@ public class SubWindowWithUndefinedHeight extends TestBase {
tabsheet.addComponent(table);
tabsheet.addListener(new TabSheet.SelectedTabChangeListener() {
@Override
- public void selectedTabChange(TabSheet.SelectedTabChangeEvent event) {
+ public void selectedTabChange(
+ TabSheet.SelectedTabChangeEvent event) {
if (tabsheet.getSelectedTab() == tabButton) {
tabsheet.setSizeUndefined();
layout.setSizeUndefined();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/TestTooSmallSubwindowSize.java b/uitest/src/main/java/com/vaadin/tests/components/window/TestTooSmallSubwindowSize.java
index 669774f715..1d9861fce3 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/TestTooSmallSubwindowSize.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/TestTooSmallSubwindowSize.java
@@ -9,7 +9,7 @@ import com.vaadin.ui.Window;
/**
* Tests that the styles work correctly in tiny subwindows that have more
* content than can fit.
- *
+ *
* @author Vaadin Ltd
*/
public class TestTooSmallSubwindowSize extends AbstractTestUI {
@@ -36,12 +36,11 @@ public class TestTooSmallSubwindowSize extends AbstractTestUI {
VerticalLayout layout = new VerticalLayout();
layout.setMargin(true);
Window w = new Window("Scroll", layout);
- Label desc = new Label(
- "This is a new child window with a preset"
- + " width, height and position. Resizing has been"
- + " disabled for this window. Additionally, this text label"
- + " is intentionally too large to fit the window. You can"
- + " use the scrollbars to view different parts of the window content.");
+ Label desc = new Label("This is a new child window with a preset"
+ + " width, height and position. Resizing has been"
+ + " disabled for this window. Additionally, this text label"
+ + " is intentionally too large to fit the window. You can"
+ + " use the scrollbars to view different parts of the window content.");
layout.addComponent(desc);
// Set window position
@@ -62,13 +61,12 @@ public class TestTooSmallSubwindowSize extends AbstractTestUI {
VerticalLayout layout = new VerticalLayout();
layout.setMargin(true);
Window w = new Window("Scroll", layout);
- Label desc = new Label(
- "This is a new child window with a preset"
- + " width, height and position. Resizing has been"
- + " disabled for this window. Additionally, this text label"
- + " is intentionally too large to fit the window. You could"
- + " use the scrollbars to view different parts of the window content,"
- + " except it's too small for that either.");
+ Label desc = new Label("This is a new child window with a preset"
+ + " width, height and position. Resizing has been"
+ + " disabled for this window. Additionally, this text label"
+ + " is intentionally too large to fit the window. You could"
+ + " use the scrollbars to view different parts of the window content,"
+ + " except it's too small for that either.");
// disable wrapping
desc.setSizeUndefined();
layout.addComponent(desc);
@@ -91,12 +89,11 @@ public class TestTooSmallSubwindowSize extends AbstractTestUI {
VerticalLayout layout = new VerticalLayout();
layout.setMargin(true);
Window w = new Window("Resize", layout);
- Label desc = new Label(
- "This is a new child window with a preset"
- + " width, height and position. Resizing has not been"
- + " disabled for this window. Additionally, this text label"
- + " is intentionally too large to fit the window. You can resize or"
- + " use the scrollbars to view different parts of the window content.");
+ Label desc = new Label("This is a new child window with a preset"
+ + " width, height and position. Resizing has not been"
+ + " disabled for this window. Additionally, this text label"
+ + " is intentionally too large to fit the window. You can resize or"
+ + " use the scrollbars to view different parts of the window content.");
layout.addComponent(desc);
// Set window position
@@ -116,12 +113,11 @@ public class TestTooSmallSubwindowSize extends AbstractTestUI {
VerticalLayout layout = new VerticalLayout();
layout.setMargin(true);
Window w = new Window("Resize", layout);
- Label desc = new Label(
- "This is a new child window with a preset"
- + " width, height and position. Resizing has not been"
- + " disabled for this window. Additionally, this text label"
- + " is intentionally too large to fit the window. You can resize"
- + " to view different parts of the window content.");
+ Label desc = new Label("This is a new child window with a preset"
+ + " width, height and position. Resizing has not been"
+ + " disabled for this window. Additionally, this text label"
+ + " is intentionally too large to fit the window. You can resize"
+ + " to view different parts of the window content.");
// disable wrapping
desc.setSizeUndefined();
layout.addComponent(desc);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/ToolTipInWindow.java b/uitest/src/main/java/com/vaadin/tests/components/window/ToolTipInWindow.java
index 144b5a0d3f..87524f4166 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/ToolTipInWindow.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/ToolTipInWindow.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2015 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.ui.Window;
/**
* Test to demonstrate that tooltips are shown for both Window header and
* content
- *
+ *
* @author Vaadin Ltd
*/
public class ToolTipInWindow extends AbstractTestUI {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/UncloseableWindowCloseShortcut.java b/uitest/src/main/java/com/vaadin/tests/components/window/UncloseableWindowCloseShortcut.java
index 1db8e0c87b..d49a424d58 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/UncloseableWindowCloseShortcut.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/UncloseableWindowCloseShortcut.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/WindowCaption.java b/uitest/src/main/java/com/vaadin/tests/components/window/WindowCaption.java
index fcb915f363..f7302cb2fb 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/WindowCaption.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/WindowCaption.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -48,7 +48,8 @@ public class WindowCaption extends AbstractTestUI {
Button red = new Button("Red", new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- setWindowCaption("<font style='color: red;'>This may or may not be red</font>");
+ setWindowCaption(
+ "<font style='color: red;'>This may or may not be red</font>");
}
});
Button plainText = new Button("Plain text", new ClickListener() {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/WindowCloseShortcuts.java b/uitest/src/main/java/com/vaadin/tests/components/window/WindowCloseShortcuts.java
index d9c22a26ee..39d1ca6839 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/WindowCloseShortcuts.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/WindowCloseShortcuts.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/WindowInUiWithNoContent.java b/uitest/src/main/java/com/vaadin/tests/components/window/WindowInUiWithNoContent.java
index 0915b93c26..db22aaa246 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/WindowInUiWithNoContent.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/WindowInUiWithNoContent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ import com.vaadin.ui.Window;
/**
* Test UI for Window attached to the UI with not content.
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/WindowMaximizeRestoreTest.java b/uitest/src/main/java/com/vaadin/tests/components/window/WindowMaximizeRestoreTest.java
index a8102a7d1a..49c4c35790 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/WindowMaximizeRestoreTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/WindowMaximizeRestoreTest.java
@@ -145,8 +145,8 @@ public class WindowMaximizeRestoreTest extends AbstractTestUI {
@Override
public void windowClose(CloseEvent e) {
Item item = addWindowAgain.addItem(w);
- addWindowAgain.setItemCaption(w, "Window "
- + w.getData().toString());
+ addWindowAgain.setItemCaption(w,
+ "Window " + w.getData().toString());
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/WindowMoveListener.java b/uitest/src/main/java/com/vaadin/tests/components/window/WindowMoveListener.java
index 63aebebdad..acc6043d5a 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/WindowMoveListener.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/WindowMoveListener.java
@@ -12,7 +12,7 @@ public class WindowMoveListener extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -45,7 +45,7 @@ public class WindowMoveListener extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -56,7 +56,7 @@ public class WindowMoveListener extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/WindowScrollingComponentIntoView.java b/uitest/src/main/java/com/vaadin/tests/components/window/WindowScrollingComponentIntoView.java
index 09d03cdd28..94ff75386b 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/WindowScrollingComponentIntoView.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/WindowScrollingComponentIntoView.java
@@ -60,16 +60,16 @@ public class WindowScrollingComponentIntoView extends AbstractTestCase {
window.setPositionX(200);
window.setPositionY(200);
- layout.addComponent(new Button("Scroll mainwin to X9",
- new ClickListener() {
+ layout.addComponent(
+ new Button("Scroll mainwin to X9", new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
getMainWindow().scrollIntoView(x9);
}
}));
- layout.addComponent(new Button("Scroll mainwin to Y9",
- new ClickListener() {
+ layout.addComponent(
+ new Button("Scroll mainwin to Y9", new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
getMainWindow().scrollIntoView(y9);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/WindowShouldRemoveActionHandler.java b/uitest/src/main/java/com/vaadin/tests/components/window/WindowShouldRemoveActionHandler.java
index ba991eebec..7782d7518c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/WindowShouldRemoveActionHandler.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/WindowShouldRemoveActionHandler.java
@@ -81,7 +81,8 @@ public class WindowShouldRemoveActionHandler extends AbstractTestUI {
}
@Override
- public void handleAction(Action action, Object sender, Object target) {
+ public void handleAction(Action action, Object sender,
+ Object target) {
Notification.show("Handling action " + action.getCaption());
}
@@ -101,7 +102,8 @@ public class WindowShouldRemoveActionHandler extends AbstractTestUI {
}
@Override
- public void handleAction(Action action, Object sender, Object target) {
+ public void handleAction(Action action, Object sender,
+ Object target) {
Notification.show("Handling action " + action.getCaption());
}
@@ -113,8 +115,8 @@ public class WindowShouldRemoveActionHandler extends AbstractTestUI {
private void addHandler(Handler actionHandler) {
actionHandlers.add(actionHandler);
addActionHandler(actionHandler);
- state.setValue("An UI with " + actionHandlers.size()
- + " action handlers");
+ state.setValue(
+ "An UI with " + actionHandlers.size() + " action handlers");
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/WindowThemes.java b/uitest/src/main/java/com/vaadin/tests/components/window/WindowThemes.java
index 788adc7902..c9df098d6c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/WindowThemes.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/WindowThemes.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -15,7 +15,7 @@
*/
/**
- *
+ *
*/
package com.vaadin.tests.components.window;
diff --git a/uitest/src/main/java/com/vaadin/tests/containers/BeanItemContainerFilteringTest.java b/uitest/src/main/java/com/vaadin/tests/containers/BeanItemContainerFilteringTest.java
index 8b8ad4cf70..7801477d3e 100644
--- a/uitest/src/main/java/com/vaadin/tests/containers/BeanItemContainerFilteringTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/containers/BeanItemContainerFilteringTest.java
@@ -93,8 +93,9 @@ public class BeanItemContainerFilteringTest extends TestBase {
public void valueChange(ValueChangeEvent event) {
container.removeAllContainerFilters();
if (((CheckBox) event.getProperty()).getValue()) {
- container.addContainerFilter("value", filterString
- .getValue().toString(), false, false);
+ container.addContainerFilter("value",
+ filterString.getValue().toString(), false,
+ false);
}
}
});
@@ -111,8 +112,9 @@ public class BeanItemContainerFilteringTest extends TestBase {
new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- container.addItem(new TestBean("addItem() "
- + nextToAdd, "value " + nextToAdd));
+ container.addItem(
+ new TestBean("addItem() " + nextToAdd,
+ "value " + nextToAdd));
nextToAdd++;
nextLabel.setCaption("Next id: " + nextToAdd);
}
@@ -128,13 +130,14 @@ public class BeanItemContainerFilteringTest extends TestBase {
if (selection == null) {
return;
}
- TestBean bean = new TestBean("addItemAfter() "
- + nextToAdd, "value " + nextToAdd);
+ TestBean bean = new TestBean(
+ "addItemAfter() " + nextToAdd,
+ "value " + nextToAdd);
Item item = container.addItemAfter(selection, bean);
if (item == null) {
- getMainWindow().showNotification(
- "Adding item after " + selection
- + " failed");
+ getMainWindow()
+ .showNotification("Adding item after "
+ + selection + " failed");
}
nextToAdd++;
nextLabel.setCaption("Next id: " + nextToAdd);
@@ -150,10 +153,11 @@ public class BeanItemContainerFilteringTest extends TestBase {
new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- int index = Integer.parseInt(position.getValue()
- .toString());
- TestBean bean = new TestBean("addItemAt() "
- + nextToAdd, "value " + nextToAdd);
+ int index = Integer
+ .parseInt(position.getValue().toString());
+ TestBean bean = new TestBean(
+ "addItemAt() " + nextToAdd,
+ "value " + nextToAdd);
Item item = container.addItemAt(index, bean);
if (item == null) {
getMainWindow().showNotification(
diff --git a/uitest/src/main/java/com/vaadin/tests/containers/BeanItemContainerTest.java b/uitest/src/main/java/com/vaadin/tests/containers/BeanItemContainerTest.java
index 905ec2f9ff..fb996bddb9 100644
--- a/uitest/src/main/java/com/vaadin/tests/containers/BeanItemContainerTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/containers/BeanItemContainerTest.java
@@ -9,12 +9,12 @@ public class BeanItemContainerTest {
/**
* Test class for BeanItemContainer
- *
+ *
* @throws IllegalAccessException
* @throws InstantiationException
*/
- public static void main(String[] args) throws InstantiationException,
- IllegalAccessException {
+ public static void main(String[] args)
+ throws InstantiationException, IllegalAccessException {
BeanItemContainer<Hello> c = new BeanItemContainer<Hello>(Hello.class);
c.addItem(new Hello());
diff --git a/uitest/src/main/java/com/vaadin/tests/containers/IndexedContainerFilteringTest.java b/uitest/src/main/java/com/vaadin/tests/containers/IndexedContainerFilteringTest.java
index a1dba3eed8..6c5c70efdb 100644
--- a/uitest/src/main/java/com/vaadin/tests/containers/IndexedContainerFilteringTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/containers/IndexedContainerFilteringTest.java
@@ -60,8 +60,8 @@ public class IndexedContainerFilteringTest extends TestBase {
public void valueChange(ValueChangeEvent event) {
container.removeAllContainerFilters();
if (((CheckBox) event.getProperty()).getValue()) {
- container.addContainerFilter("column1", filterString
- .getValue().toString(), false, false);
+ container.addContainerFilter("column1",
+ filterString.getValue().toString(), false, false);
}
}
});
@@ -80,8 +80,8 @@ public class IndexedContainerFilteringTest extends TestBase {
public void buttonClick(ClickEvent event) {
Item item = container.addItem("addItem() " + nextToAdd);
if (item != null) {
- item.getItemProperty("column1").setValue(
- "addItem() " + nextToAdd);
+ item.getItemProperty("column1")
+ .setValue("addItem() " + nextToAdd);
}
nextToAdd++;
nextLabel.setCaption("Next id: " + nextToAdd);
@@ -104,9 +104,9 @@ public class IndexedContainerFilteringTest extends TestBase {
item.getItemProperty("column1").setValue(id);
table.setValue(id);
} else {
- getMainWindow().showNotification(
- "Adding item after " + selection
- + " failed");
+ getMainWindow()
+ .showNotification("Adding item after "
+ + selection + " failed");
}
nextToAdd++;
nextLabel.setCaption("Next id: " + nextToAdd);
@@ -122,16 +122,16 @@ public class IndexedContainerFilteringTest extends TestBase {
new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- int index = Integer.parseInt(position.getValue()
- .toString());
+ int index = Integer
+ .parseInt(position.getValue().toString());
String id = "addItemAt() " + nextToAdd;
Item item = container.addItemAt(index, id);
if (item != null) {
item.getItemProperty("column1").setValue(id);
table.setValue(id);
} else {
- getMainWindow().showNotification(
- "Adding item at index "
+ getMainWindow()
+ .showNotification("Adding item at index "
+ position.getValue() + " failed");
}
nextToAdd++;
diff --git a/uitest/src/main/java/com/vaadin/tests/containers/TableWithFileSystemContainer.java b/uitest/src/main/java/com/vaadin/tests/containers/TableWithFileSystemContainer.java
index 25d0053fb2..8e9a5bb3af 100644
--- a/uitest/src/main/java/com/vaadin/tests/containers/TableWithFileSystemContainer.java
+++ b/uitest/src/main/java/com/vaadin/tests/containers/TableWithFileSystemContainer.java
@@ -12,8 +12,8 @@ public class TableWithFileSystemContainer extends TestBase {
@Override
public void setup() {
- Table table = new Table("Documents", new FilesystemContainer(new File(
- testPath)));
+ Table table = new Table("Documents",
+ new FilesystemContainer(new File(testPath)));
table.setWidth("100%");
getMainWindow().addComponent(table);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/containers/TestItemSorter.java b/uitest/src/main/java/com/vaadin/tests/containers/TestItemSorter.java
index 2e217fd961..e9fd01ec71 100644
--- a/uitest/src/main/java/com/vaadin/tests/containers/TestItemSorter.java
+++ b/uitest/src/main/java/com/vaadin/tests/containers/TestItemSorter.java
@@ -38,8 +38,8 @@ public class TestItemSorter extends TestBase {
return caption1.compareTo(caption2);
} else if (o1 instanceof String && o2 instanceof String) {
- return ((String) o1).toLowerCase().compareTo(
- ((String) o2).toLowerCase());
+ return ((String) o1).toLowerCase()
+ .compareTo(((String) o2).toLowerCase());
}
return 0;
@@ -61,8 +61,8 @@ public class TestItemSorter extends TestBase {
Item item = container.getItem(id);
item.getItemProperty(STRING).setValue(s);
item.getItemProperty(BUTTON).setValue(new Button(s));
- item.getItemProperty(CHECKBOX).setValue(
- new CheckBox("", s.equals("true")));
+ item.getItemProperty(CHECKBOX)
+ .setValue(new CheckBox("", s.equals("true")));
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/containers/filesystemcontainer/FileSystemContainerInTreeTable.java b/uitest/src/main/java/com/vaadin/tests/containers/filesystemcontainer/FileSystemContainerInTreeTable.java
index c9d4a07c22..57e2ad95ce 100644
--- a/uitest/src/main/java/com/vaadin/tests/containers/filesystemcontainer/FileSystemContainerInTreeTable.java
+++ b/uitest/src/main/java/com/vaadin/tests/containers/filesystemcontainer/FileSystemContainerInTreeTable.java
@@ -71,16 +71,16 @@ public class FileSystemContainerInTreeTable extends TestBase {
HorizontalLayout buttonLayout = new HorizontalLayout();
buttonLayout.setSpacing(true);
- buttonLayout.addComponent(new Button("Create dir11",
- new Button.ClickListener() {
+ buttonLayout.addComponent(
+ new Button("Create dir11", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
new File(folder, "dir11").mkdir();
log.log("Row dir11 created");
}
}));
- buttonLayout.addComponent(new Button("Delete dir11",
- new Button.ClickListener() {
+ buttonLayout.addComponent(
+ new Button("Delete dir11", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
new File(folder, "dir11").delete();
@@ -88,8 +88,8 @@ public class FileSystemContainerInTreeTable extends TestBase {
}
}));
// to clean up explicitly before ending an automated test
- buttonLayout.addComponent(new Button("Clean all files",
- new Button.ClickListener() {
+ buttonLayout.addComponent(
+ new Button("Clean all files", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
folder.delete();
diff --git a/uitest/src/main/java/com/vaadin/tests/containers/sqlcontainer/CheckboxUpdateProblem.java b/uitest/src/main/java/com/vaadin/tests/containers/sqlcontainer/CheckboxUpdateProblem.java
index 49416a73e5..4d0155c1bf 100644
--- a/uitest/src/main/java/com/vaadin/tests/containers/sqlcontainer/CheckboxUpdateProblem.java
+++ b/uitest/src/main/java/com/vaadin/tests/containers/sqlcontainer/CheckboxUpdateProblem.java
@@ -15,8 +15,8 @@ import com.vaadin.ui.HorizontalSplitPanel;
import com.vaadin.ui.LegacyWindow;
import com.vaadin.ui.Table;
-public class CheckboxUpdateProblem extends LegacyApplication implements
- Property.ValueChangeListener {
+public class CheckboxUpdateProblem extends LegacyApplication
+ implements Property.ValueChangeListener {
private final DatabaseHelper databaseHelper = new DatabaseHelper();
private Table testList;
private final HorizontalSplitPanel horizontalSplit = new HorizontalSplitPanel();
@@ -36,14 +36,15 @@ public class CheckboxUpdateProblem extends LegacyApplication implements
testList.setImmediate(true);
testList.addListener(this);
- databaseHelper.getTestContainer().addListener(
- new ItemSetChangeListener() {
+ databaseHelper.getTestContainer()
+ .addListener(new ItemSetChangeListener() {
@Override
- public void containerItemSetChange(ItemSetChangeEvent event) {
+ public void containerItemSetChange(
+ ItemSetChangeEvent event) {
Object selected = testList.getValue();
if (selected != null) {
- testForm.setItemDataSource(testList
- .getItem(selected));
+ testForm.setItemDataSource(
+ testList.getItem(selected));
}
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/containers/sqlcontainer/DatabaseHelper.java b/uitest/src/main/java/com/vaadin/tests/containers/sqlcontainer/DatabaseHelper.java
index 93bd265eda..63e4357621 100644
--- a/uitest/src/main/java/com/vaadin/tests/containers/sqlcontainer/DatabaseHelper.java
+++ b/uitest/src/main/java/com/vaadin/tests/containers/sqlcontainer/DatabaseHelper.java
@@ -42,34 +42,22 @@ class DatabaseHelper {
}
switch (SQLTestsConstants.db) {
case HSQLDB:
- statement
- .execute("create table "
- + TABLENAME
- + " (id integer GENERATED BY DEFAULT AS IDENTITY, field1 varchar(100), field2 boolean, primary key(id))");
- statement
- .execute("create table "
- + LARGE_TABLENAME
- + " (id integer GENERATED BY DEFAULT AS IDENTITY, field1 varchar(100), primary key(id))");
+ statement.execute("create table " + TABLENAME
+ + " (id integer GENERATED BY DEFAULT AS IDENTITY, field1 varchar(100), field2 boolean, primary key(id))");
+ statement.execute("create table " + LARGE_TABLENAME
+ + " (id integer GENERATED BY DEFAULT AS IDENTITY, field1 varchar(100), primary key(id))");
break;
case MYSQL:
- statement
- .execute("create table "
- + TABLENAME
- + " (id integer auto_increment not null, field1 varchar(100), field2 boolean, primary key(id))");
- statement
- .execute("create table "
- + LARGE_TABLENAME
- + " (id integer auto_increment not null, field1 varchar(100), primary key(id))");
+ statement.execute("create table " + TABLENAME
+ + " (id integer auto_increment not null, field1 varchar(100), field2 boolean, primary key(id))");
+ statement.execute("create table " + LARGE_TABLENAME
+ + " (id integer auto_increment not null, field1 varchar(100), primary key(id))");
break;
case POSTGRESQL:
- statement
- .execute("create table "
- + TABLENAME
- + " (\"id\" serial primary key, \"field1\" varchar(100), \"field2\" boolean)");
- statement
- .execute("create table "
- + LARGE_TABLENAME
- + " (\"id\" serial primary key, \"field1\" varchar(100))");
+ statement.execute("create table " + TABLENAME
+ + " (\"id\" serial primary key, \"field1\" varchar(100), \"field2\" boolean)");
+ statement.execute("create table " + LARGE_TABLENAME
+ + " (\"id\" serial primary key, \"field1\" varchar(100))");
break;
}
statement.executeUpdate("insert into " + TABLENAME
diff --git a/uitest/src/main/java/com/vaadin/tests/containers/sqlcontainer/MassInsertMemoryLeakTestApp.java b/uitest/src/main/java/com/vaadin/tests/containers/sqlcontainer/MassInsertMemoryLeakTestApp.java
index d099b92fb3..8d368bfa78 100644
--- a/uitest/src/main/java/com/vaadin/tests/containers/sqlcontainer/MassInsertMemoryLeakTestApp.java
+++ b/uitest/src/main/java/com/vaadin/tests/containers/sqlcontainer/MassInsertMemoryLeakTestApp.java
@@ -72,18 +72,18 @@ public class MassInsertMemoryLeakTestApp extends LegacyApplication {
SQLContainer c = new SQLContainer(q);
for (int i = 0; i < 100; i++) {
Object id = c.addItem();
- c.getContainerProperty(id, "FIRST_NAMES").setValue(
- getRandonName());
- c.getContainerProperty(id, "LAST_NAME").setValue(
- getRandonName());
+ c.getContainerProperty(id, "FIRST_NAMES")
+ .setValue(getRandonName());
+ c.getContainerProperty(id, "LAST_NAME")
+ .setValue(getRandonName());
}
c.commit();
getContext().lock();
try {
proggress
.setValue(new Float((1.0f * cent) / cents));
- proggress.setCaption("" + 100 * cent
- + " rows inserted");
+ proggress.setCaption(
+ "" + 100 * cent + " rows inserted");
} finally {
getContext().unlock();
}
diff --git a/uitest/src/main/java/com/vaadin/tests/containers/sqlcontainer/TableQueryWithNonUniqueFirstPrimaryKey.java b/uitest/src/main/java/com/vaadin/tests/containers/sqlcontainer/TableQueryWithNonUniqueFirstPrimaryKey.java
index 2ff74a76ef..12528e8c90 100644
--- a/uitest/src/main/java/com/vaadin/tests/containers/sqlcontainer/TableQueryWithNonUniqueFirstPrimaryKey.java
+++ b/uitest/src/main/java/com/vaadin/tests/containers/sqlcontainer/TableQueryWithNonUniqueFirstPrimaryKey.java
@@ -51,8 +51,8 @@ public class TableQueryWithNonUniqueFirstPrimaryKey extends AbstractTestUI {
@Override
public void valueChange(ValueChangeEvent event) {
if (myCombo.getValue() != null) {
- Item item = myCombo.getItem(event.getProperty()
- .getValue());
+ Item item = myCombo
+ .getItem(event.getProperty().getValue());
String selected = item.getItemProperty("MYFIELD")
.getValue().toString();
System.out.println("Selected " + selected);
@@ -67,7 +67,7 @@ public class TableQueryWithNonUniqueFirstPrimaryKey extends AbstractTestUI {
/**
* (Re)creates the test table
- *
+ *
* @param connectionPool
*/
private void createTestTable(JDBCConnectionPool connectionPool) {
@@ -80,8 +80,7 @@ public class TableQueryWithNonUniqueFirstPrimaryKey extends AbstractTestUI {
} catch (SQLException e) {
}
String q = "CREATE TABLE mytable2 (id INTEGER GENERATED BY DEFAULT AS IDENTITY,"
- + " MYFIELD varchar(60),"
- + " PFX varchar(1),"
+ + " MYFIELD varchar(60)," + " PFX varchar(1),"
+ " numero integer" + ", PRIMARY KEY (pfx,numero));";
statement.execute(q);
statement.close();
@@ -95,7 +94,7 @@ public class TableQueryWithNonUniqueFirstPrimaryKey extends AbstractTestUI {
/**
* Adds test data to the test table
- *
+ *
* @param connectionPool
* @throws SQLException
*/
@@ -106,8 +105,8 @@ public class TableQueryWithNonUniqueFirstPrimaryKey extends AbstractTestUI {
conn = connectionPool.reserveConnection();
Statement statement = conn.createStatement();
- statement
- .executeUpdate("insert into mytable2(myfield,pfx,numero) values ('COSTRUEDIL DI GAGLIOSTRO & C.SNC','C',6),('AUTOBUDA SRL','C',7),('CAFARELLI TINDARO AUTORICAMBI','C',8),('LARTE DEL MOBILE DI QUINTO CUTRI','C',9),('GRAPHIC DESIGN','C',10),('FOTI CARMELO','C',11),('MALAGRECA MICHELE OFF.ELETTR.','C',12),('CLIENTE NUOVO FRANCESCO','C',13),('LAROCCA ETTORE','C',14),('ALCAM SNC DI MARAFIOTI ALESSANDRO E','C',15),('EUROPA TYRES S.R.L.','C',16),('CROCE ROSSA ITALIANA COM.LOCALE','C',17),('RUGNETTA BRUNO','C',18),('BOSA VINCENZO TUTTO PER LA PESCA','C',19),('C.P.R.CENTRO POSE ROMEO','C',20),('VIOLI ORESTE OFF.AUTOCARROZ.','C',21),('LIGATO SALVATORE','C',22),('DECORFORM DI IANNINO DARIO','C',23),('BEVI SUD DI DAGOSTINO GIUSEPPE','C',24),('BUSTE E CARTA DI GALLICO DARIO','C',25),('CELESTINO CRISAFULLI','C',26),('IMPRESA EDILE IS.AS.DI SALVATORE','C',27),('RASO GIUSEPPE','C',28),('EUROTECNICA 3A SAS DI ANELLO FRANC.','C',29),('EXO AUTOMOTIVE S.P.A.','C',30),('GHEA SISTEM S.R.L.','C',31),('AUTOTECNICA DI IANNELLI GIUSEPPE','C',32),('NATURAL SALUMI DI ARENA GIANCARLO','C',33),('LOIACONO PASQUALE & C. S.a.s.','C',34),('LONGO CLAUDIO','C',35),('CLASS SERVICING S.R.L.','C',36),('CADI SNC F.LLI MILASI','C',37),('MARTURANO FRANCESCO','C',38),('ARICOASSICUR.DI ARICOMARIATERESA','C',39),('','C',40),('SICILIANO FRANCESCO','C',41),('PREVITERA CATERINA ALIMENTARI','C',42),('AUTOFFICINA LUCAGIOVANNI','C',43),('NON UTILIZZARE','C',44),('','C',45),('SAFFIOTI MELO MACELLERIA GASTRON.','C',46),('MANGERUGA SERAFINO','C',47),('S.D.A. s.a.s.di Palmitessa Carlo','C',48),('IPER SCAVI S.R.L.','C',49),('','C',50),('FABBRICA ARTIGIANA LUIGI COLOMBO','C',51),('ELETTRO GLOBAL SERVICE DI ELIA','C',52),('FORTUNATO','C',53),('STEFANO BAJLO','C',54),('.','C',55),('FORTUGNO S.R.L.','C',56),('PARRELLO GIUSEPPE','C',57),('GAS E CUCINE DI SANTORO GIOVANNI','C',58),('LUPPINO MAURIZIO','C',59),('','C',60),('CHARTER LINE SAS','C',61),('CAMPAGNA GIUSEPPE EREDE DI CAMPAGNA','C',62),('TREBI DI BARBARO FRANCESCO','C',63),('COOPERATIVA SOCIALE ONLUS','C',64),('','C',65),('SASOL ITALY S.P.A.','C',66),('AVATI ROCCO','C',67),('DOLCE FREDDO DI DAGOSTINO G.PPE','C',68),('GUERRERA FRANCESCO','C',69),('','C',70),('AGRICOLA PALMESE DI ARICO EMAN.&C.','C',71),('BORRELLO COSIMO TENDAGGI TAPPEZZ.','C',72),('DAMIANO PUTRINO OFF.MECC.','C',73),('CENTRO FORNITURE S.R.L.','C',74),('','C',75),('CLIENTE NUOVO FORTUNATO','C',76),('AVV.FERDINANDO DE LEONARDIS','C',77),('INSTALLAZIONE DI IMPINATI ELETTR.','C',78),('VIOLI PIETRO','C',79),('','C',80),('BASILE VINCENZO','C',81),('SAFFIOTI APPALTI & COSTRUZIONI','C',82),('SOC.COOP.MULTISERVICE MAMMOLA','C',83),('ARCH.TIZIANA GAGLIOTI','C',84),('','C',85),('GAGLIOTI SRL','C',86),('PINO MICHELE IMPRESA COSTRUZ.','C',87),('','C',88),('BORGESE GIUSEPPE','C',89),('','C',90),('PREVITERA SALVATORE','C',91),('PASTORE SRL','C',92),('OFF.LUCI CARMELO','C',93),('GIOFFRE CARMELO','C',94),('','C',95),('COGIMI S.R.L.','C',96),('CANTINE ZAGARI SNC','C',97),('ALBEDA IMPIANTI DI LOPRETE ANTONIO','C',98),('VETRARIA BRUTIA S.R.L. UNIPERSONALE','C',99),('COSTANZO TOTI','C',100),('GRASSO DAVIDE','C',101),('SGROMO BERNARDO','C',102),('PANIFICIO CIAPPINA','C',103),('ARCA INDUSTRIAL SUPPLIES S.R.L.','C',104),('','C',105),('ZUMBO DR.TOMMASO','C',106),('PUNTO SIDIS DI SACCA PASQUALE','C',107),('BARRARA SALVATORE','C',108),('IMEX P-TRADE S.R.L.','C',109),('','C',110),('DOTT.AGR.VINCENZO CILONA','C',111),('PIANEGONDA DARIO S.A.S.','C',112),('DALOI GIUSEPPE AUTOFFICINA','C',113),('BARBARO MOTO SAS','C',114),('','C',115),('DE FRANCESCO VINCENZO','C',116),('RICAUTO SPA','C',117),('GERICO SAS','C',118),('GISMONDO VINCENZO','C',119),('','C',120),('IMPRESA COSTR.EUROEDIL DI MOIO F.SC','C',121),('SUD.INFORMATICA S.R.L.','C',122),('CRAZY MOBIL SNC DI GAGLIOTI G.PPE','C',123),('A.D.S.S.E. SRL DI RUGGIERO PACIFICO','C',124),('','C',125),('GRAMUGLIA VINCENZO','C',126),('LUIGI NIZZARI SUBAGENTE ALLIANZ SPA','C',127),('BRUZZESE ANNUNZIATA','C',128),('HOTEL STELLA MARIS SRL','C',129),('','C',130),('ATRE EXPRESS SRL','C',131),('GATTO ANTONINO','C',132),('BO.GE.CO. S.R.L.','C',133),('VALENTINO TECNICA SNC','C',134),('','C',135),('NASO GIUSEPPE','C',136),('GALIBERTI LUCIANO STEFANO','C',137),('MURACE FRANCESCO','C',138),('GEOM.GIOFFRE SAVERIO','C',139),('','C',140),('PIANA PALMI MULTISERVIZI S.P.A.','C',141),('GOLDEN GROUP SNC','C',142),('DE CREA FORTUNATO','C',143),('LUPPINO MICHELE','C',144),('','C',145),('STILLITANO SRL','C',146),('FERREDIL DI MANUCRA GEOM.MARIO','C',147),('L & R LABORATORI E RICERCHE SRL','C',148),('EDIL SUD DI MALACRINOALESSIO G.','C',149),('','C',150),('FRESH BLU DI MELISSARI CETTINA','C',151),('BAGALA ROBERTO','C',152),('SERGI ROSALBA','C',153),('CO.MEC. DI VIOLI DOMENICO','C',154),('','C',155),('RADIO FRECCIA NET WORK','C',156),('GIOVINAZZO IPPOLITO','C',157),('ELECTRONIC CENTER DI ZAGARI ROSARIO','C',158),('EMPORIO ROGGIO GIUSEPPE','C',159),('','C',160),('CALAFIORE ANTONIO','C',161),('PARRELLO GIUSEPPE','C',162),('RUGGERI & PIAZZA SNC','C',163),('FRESCHEZZA IN TAVOLA DI FOTI ROSA','C',164),('','C',165),('AUGIMERI CARMINE AUTOFFICINA','C',166),('MATTIANI DOMENICO','C',167),('CALDERAZZO GIANCARLO','C',168),('ROMANIN ELVIO STUDIO COMMERCIALE','C',169),('','C',170),('G.TRIPODI SRL','C',171),('DEDMONDO FRANCESCO','C',172),('IDROCAR DI IANTORNO MARIO','C',173),('ZAGARI PAOLO IMP.ELETTRICI','C',174),('','C',175),('SELF AREA AGIP \"LA SOSTA S.A.S.\"DI','C',176),('MARKET MIMMO DI MAMMONE ANNA MARIA','C',177),('OSRAV ALFEO MORET S.P.A.','C',178),('A.S.PALLAVOLO PALMI','C',179),('','C',180),('GN.RISTRUTTUR.DI GANGEMI NICOLA','C',181),('ANNULLATO PRESO PER TRADE EVOLUT','C',182),('PULEIO PASQUALE','C',183),('ROTONDO S.R.L.','C',184),('','C',185),('DOMENICO ORTUSO & C. S.a.s','C',186),('FABIO PIERANGELI','C',187),('EDIL PALMI SAS di CRUCITTI F.SCO &C','C',188),('MLD LOGISTICA E DISTRIBUZIONE SRL','C',189),('','C',190),('HOTEL SANTA CROCE','C',191),('CUBA MOTOR','C',192),('CENTRO SERVIZI AUTO DI FURFARO','C',193),('TRAS PUGLIA DI SPINA GIUSEPPE','C',194),('','C',195),('LAMINAZIONE SOTTILE SPA','C',196),('FULCO DOMENICO OFFICINA','C',197),('DAMICO MICHELE AUTOFFICINA','C',198),('CAPRARI ADRIANO','C',199),('','C',200),('FARINA ANTONIO','C',201),('CALABROROSARIO DOMENICO','C',202),('NUOVA CASALAUTO DI CREPALDI GIAN','C',203),('AS TAUREANA CARS DI PALMA FEBBO','C',204),('REPACI TEODORO TRASPORTO MERCI','C',205),('GIEMME IMPIANTI DI IANNELLO MICHELE','C',206),('MUSICO S.R.L.','C',207),('GULLI CARMELO','C',208),('CASCIANO GIACOMO','C',209),('MARKET MARTURANO LETTERIO','C',210),('FOGLIARO FORTUNATO & C. SNC','C',211),('RAVAGLI VITTORIO FERRAMENTA UTENS.','C',212),('GRIMI AUTO DI GRIMI DOMENICO SNC','C',213),('BARONE DOMENICO','C',214),('RANUCCIO SONIA AZIENDA AGRICOLA','C',215),('A.B.COMPUTING DI BAGALAANTONIO','C',216),('GIOIA CAR SRL','C',217),('TOTO MONTAGGI DI MARINO ANTONIO G.','C',218),('GEOM.GIUSEPPE OLIVERI','C',219),('IMPRESA COSTR.EDILI CILONA G.PPE','C',220),('TERMOIDRAULICA DI TALLARIDA G.PPE','C',221),('RIGHETTINI EMANUELE','C',222),('CM INDUSTRIE SRL','C',223),('AUTOGOLD DI DE SANCTIS G.','C',224),('RIGON GIAN CARLO AUTOTRASPORTI','C',225),('IMPIOMBATO ANTONINO','C',226),('I.F.E.S.DI CUTRI GIUSEPPE','C',227),('COMPANIE DHOTELLERIE SUISSE SRL','C',228),('LARTE DEL FALEGNAME SNC','C',230),('AUTOSERVICE 2000 SAS','C',231),('SERVICE RICAMBI E ACCESSORI DI','C',232),('CAPPONE MICHELE LAV.VETRI','C',250),('COLELLA FRANCECSO','C',251),('LA PIANA SNC DI BARBARO ANGELINA','C',252),('SURACE GIANFRANCO','C',253),('EDIL CERAMICHE PALMI DI SCHIPILLITI','C',254),('AGOSTINO ROMEO SRL','C',260),('SGROFRANCESCO','C',261),('IMPRESA EDILE DI CERAVOLO GIUSEPPE','C',262),('FICARRA ROBERTO IMPRESA EDILE MOV.','C',263),('CAR SERVICE DI GALLO DANIELE','C',264),('LAGRICOLA DI BALDO FRANCESCO & C.','C',265),('ARENA VINCENZO','C',266),('ROMEO MARIA','C',267),('BERTIM EDILIZIA E COSTA SRL','C',268),('ITALIA TRASPORTI E LOGISTICA SRL','C',269),('STUDIO DI PROGETTAZIONE ARCHITETTO','C',270),('CALOGERO SALVATORE','C',271),('CANANZI AUTO','C',272),('OLEIFICIO BORGESE FILOMENA','C',273),('ASSOCIAZ.DI VOLONTARIATO PRESENZA','C',274),('IPO S.R.L.','C',275),('SMAC SNC & C. DI MERCURI SALVATORE','C',276),('MODAFFERI MICHELE ELETTRAUTO','C',277),('ROMEO FORTUNATO','C',278),('BAR BRUZZESE FRANCESCO','C',279),('AUTOFFICINA MARCELLO GULLI','C',280),('SCAVA ROSARIO','C',281),('CASELLA DOTT.MARIO DOMENICO','C',290),('SAFFIOTI ROCCO','C',999),('POINT CAR SERVICE SAS','C',1000),('AUTORICAMBI PRAIA SAS DI UGO','C',3001),('AUTOF.CATANANTI DI DIBIANCO GIOV.NI','C',3002),('AUTOPIU DI GRIFFO V.&.C. sas','C',3003),('ARMENI AUTO DI ARMENI ANDREA & C.','C',3004),('LA BELLA ROBERTO','C',3005),('TERMOIDRAULICA DI IANNINO SOCCORSA','C',3006),('AUTOBUDA DI ZAPPIA ANTONELLA','C',3007),('BELCASTRO ROSARIO R.B.AUTOR.','C',3008),('PNEUSERVICE SRL','C',3009),('AUTOFORNITURE MILANESI SPA','C',3010),('ORTOLANI CARLUMBERTO','C',3011),('AZZARA CARMELO','C',3012),('AUTOSILA S.R.L.','C',3013),('ATTISANO MICHELE','C',3014),('AMMENDOLA GIUSEPPE','C',3023),('ANNULLATO AUTOPARTS DI FIEROMONTE T','C',3026),('CENT.TELEFONIA DE PASCALE DANIELA','C',3027),('TYRE HUNTER DI CANTISANI CARMINE','C',3028),('AUTOFFICINA AMMENDOLA DEMETRIO','C',3029),('CENTER CAR S.R.L.','C',3032),('MACELLERIA DI BARBERA FRANCESCO','C',3101),('BLEVIO PIETRO','C',3103),('AZIENDA AGRICOLA SURACE GIUSEPPINA','C',3104),('C.F.S.CARRELL FULL SERVICE DUE sas','C',3106),('IMPRESA COSTRUZ.GEOM.CIAPPINA F.SCO','C',3107),('BELLISSIMO ANTONIO','C',3108),('BARBARO GIUSEPPE DITTA','C',3111),('BARILLARI GABRIELE AUTORICAMBI','C',3112),('BORGESE GIUSEPPE','C',3113),('BARA GIUSEPPE OFF.& RICAMBI','C',3114),('AUTO IARIA S.R.L.','C',3115),('TRIPODI GEOM.ANTONINO IMPRESA EDILE','C',3120),('BARRECA DEMETRIO','C',3129),('BOVA VINCENZO','C',3139),('BRUNO AUTORICAMBI S.a.s.','C',3145),('CILIONE & C. SRL','C',3200),('CANDIDO GIULIO','C',3202),('LUDDENI MARIO MARKET DEL RIC.','C',3205),('RIOTTO SAVERIO','C',3207),('MOTORSPORT DI CIRICOSTA G.PPE','C',3209),('CE.D.R.A. DI CUCUNATO NATALE','C',3211),('S.D.S. CARBURANTI S.A.S.','C',3215),('TURANO G.PPE & C.snc AUTORICAMBI','C',3216),('CILIONE CONSOLATO !! SOSPESO !!','C',3217),('PUGLIESE ERNESTO','C',3219),('CALABRO LORENZO','C',3220),('LAGANADOMENICO','C',3222),('ANNULLATO INVIATO A TETI A.','C',3224),('AUTO SERVICE DI IOPPOLO G.GIULINO','C',3226),('TRIPODI FORTUNATO','C',3228),('COMEDIL DI P.SGRO & C. sas','C',3232),('SGROORLANDO AUTORICAMBI','C',3234),('DOTT.PALMIRO ZAPPONE','C',3236),('POLIRICAMBI SRLS','C',3240),('ROCCHETTO RENATO','C',3241),('CURRA ANTONINO','C',3242),('COLOSI FRANCESCO INFISSI IN','C',3244),('CUORE ANTONIO','C',3245),('GRAMUGLIA DOMENICO OFF.MECC.','C',3246),('CALIO srl RICAMBI AUTO','C',3248),('COZZA ELIO','C',3252),('OERRE PARTS S.R.L.','C',3257),('EURODIESEL DI CASSALIA MAURIZIO','C',3262),('@ 2X INSTALLAZIONI DI PUGLIESE A.','C',3263),('TECNO TRADE SRL','C',3265),('CROCCO FRANCO','C',3267),('CARTELLA MASSIMO','C',3269),('SCARMATO FORTUNATO','C',3275),('C.M.G. BRAM SRL','C',3278),('CARONZOLO ROSARIO','C',3279),('CALIPARI SERAFINO','C',3286),('EDIL DORA DI BRUNO ROMEO','C',3294),('EXIDE TECHNOLOGIES SRL','C',3295),('IL TEMPIO DEL RIC.DI GIORDANO LUIGI','C',3301),('OFFICINA DE GRAZIA SAS','C',3302),('REGALI E SORRISI DI GUERRERA D.CO','C',3304),('UNIFLUID SUD SRL','C',3305),('CONSORZIO PDA','C',3307),('SURACE ROCCO','C',3308),('DITTA CILONA VINCENZO','C',3309),('DAGOSTINO AUTORICAMBI','C',3310),('DATTOLA AUTO & C. snc','C',3312),('DE NISI DOMENICO','C',3315),('IMPRESA COSTRUZ.SIMONETTA VINCENZO','C',3316),('AUTORICAMBI E ACCESSORI DI MARZIA','C',3317),('CHIAPPALONE ANNUNZIATO','C',3319),('EUROPA RICAMBI DI DE MARIA CARLO &','C',3320),('BRUZZESE FRANCESCO','C',3323),('DE GREGORIO SRL','C',3325),('LOGATTO VINCENZO V.L AUTORICAMBI','C',3326),('TARUSCIO GIOVANNI','C',3331),('TODARO SAVERIO','C',3334),('FERRARO LUIGI','C',3403),('AUTORICAMBI ERRIGO C.& C. S.A.S','C',3404),('PISANO GAETANO','C',3409),('AGRINOVA DI CORRADO NICOLA','C',3501),('FE e SA & C. DI SANTORO B. sas','C',3502),('CAR SHOP AUTORICAMBI','C',3503),('BRIGA LUCIANO','C',3504),('FIDALE GIACOMO & C.sas CAR SERVICES','C',3505),('FERRERO MASSIMILIANO IF.AUTORIC.','C',3506),('ASSOCIAZIONE RADIOAMATORI ITALIANI','C',3507),('FALBO ANTONIO','C',3508),('DAGOSTINO BIRRE DI GINO','C',3510),('FULLONE MARIO','C',3512),('EMMEDUE COSTRUZIONI','C',3514),('PALMCART OLIVERIO GIUSEPPE','C',3516),('BORGESE RANIERI & CLAUDIO SNC','C',3519),('FUTIA SALVATORE','C',3522),('FRANCHINA MASSIMILIANO Autoricambi','C',3523),('FUTIA DOMENICO Ricambi Auto','C',3525),('IMPRESA EDILE SCHIPILLITI V.ZO','C',3526),('MEDITERRANEA TRASPORTI SOC.COOP','C',3527),('AGENZIA LOGISTICA MERIDIONALE','C',3528),('RAGO UMILE RICAMBI-OFFICINA','C',3531),('SE.MA.C. SRL','C',3534),('IMPRESA EDILE GAGLIOSTRO V.ZO','C',3541),('FIGLIUZZI SALVATORE','C',3544),('FRAGOMENI DOMENICO','C',3548),('FIEROMONTE & CHIAPPALONE sas','C',3551),('F.T.R. F.LLI TRIULCIO SRL','C',3553),('GIORDANELLI SERGIO','C',3602),('F.LLI GUIDA sas','C',3603),('GRILLO GIUSEPPE','C',3604),('GALLO STANISLAO MANGIMI CONCIMI','C',3605),('COARSA SOC.CONS.IMP.SANLURESI SRL','C',3606),('PASCHOU MARIA','C',3607),('PELLEGRINO PIETRO ROCCO AZIENDA','C',3608),('ROSANNA EX GRM RICAMBI','C',3609),('INDUSTRIA BOSCHIVA DICH.STEL.','C',3610),('GILBERTO DROGHETTI DOTT.','C',3611),('GALLE NICOLA','C',3615),('EUROELETTRA S.N.C.DI NICOLOSI &','C',3616),('PALETTA ALBERTO AUTORIC.','C',3617),('GIOFFRE GIUSEPPE','C',3620),('PRINTING CENTER S.A.S.','C',3621),('SUD CARNI DI LEONELLO PASQUALE','C',3622),('GIOVINAZZO AUTORICAMBI','C',3623),('GENCARELLI GIUSEPPE','C',3627),('GRASSO FRANCESCO','C',3631),('GALLO GIOVANBATTISTA','C',3632),('CIESSEGI SNC DI CATOZZA MARIO & C.','C',3639),('AUTOMARKET DI PAPALIA ROBERTO','C',3646),('CENTRO RICAMBI DI MARINO & C.SNC','C',3700),('IMPRESA EDILE RECHICHI GIANCARLO','C',3701),('G.R.RICAMBI SRL','C',3704),('BRUZIA RICAMBI DI HRISCU CARMEN','C',3705),('AUTORIC.IANNI DI IANNI FRANCESCO','C',3706),('ITAL RICAMBI DI IAROPOLI V.& C.sas','C',3708),('INFORTUNA SANTO','C',3710),('IOVINE NICOLA','C',3711),('FILIPPONE ANTONINO','C',3712),('INFANTINO GIUSEPPE ELETTRAUTO','C',3717),('IDA RAG.ENZO','C',3719),('DE MASI PASQUALE DE.CA AUTORICAMBI','C',3800),('CANTIERI NAUTICI COSTA VIOLA','C',3803),('BG.CAFFE DI GIUSEPPE BALO','C',3805),('GUARASCIO LUIGI AUTORICAMBI','C',3806),('GIOFFREGAETANO','C',3807),('CENTRO AUTO MOTO DI LAGANA sas','C',3810),('LONGO CLAUDIO','C',3811),('LAGANA GIOVANNI','C',3814),('EDILDECORO DI FORTUGNO & SAFFIOTI','C',3815),('ATC DI PUGLIESE ALBERTO & C.SAS','C',3818),('LONDINO SERGIO','C',3822),('ANANIA ROCCO & GRILLO F.SCO SNC','C',3825),('FARMACIA FORGIONE DANIELA','C',3827),('AUTORICAMBI RAG.SAVERIO LAGAZZO','C',3828),('SERVICE AUTO SAS CENTRO REVISIONI','C',3829),('MASSARA NICOLA ACCESSORI PER AUTO','C',3832),('FANELLI GIOVANNI','C',3833),('LOIACONO GIUSEPPE','C',3835),('ANNULLATO UTILIZZATO PER IL WEB','C',3843),('ANNULLATO','C',3844),('AUTORICAMBI LAGANAROBERTO DI','C',3845),('ANNULLATO UTILIZZATO PER IL WEB','C',3846),('MELITO GIAMPIERO','C',3901),('MRC RICAMBI S.R.L.','C',3903),('MARONGELLI ANTONIO','C',3908),('MORELLO ANTONIO','C',3911),('M.A.I.R.S.AGATA DI DE BENEDETTO N.A','C',3912),('MONTELEONE MICHELE Autoricambi','C',3913),('FOTI PASQUALE','C',3914),('METALLURGICA RIVORALESE SPA','C',3915),('MARTINO DOMENICO','C',3917),('MALIZIA PASQUALE','C',3918),('DE SIBIO MECCANICA sas DI DESIBIO D','C',3924),('PUBBLIWORLD DI GULLO ANTONINO','C',3926),('MAZZITELLI & TASSONE S.N.C.','C',3927),('LANDRO AUTOMOBILI','C',3928),('MEZZATESTA ANTONIO','C',3931),('MOTOR SHOP Autoricambi sas','C',3932),('REPACI GIOVANNI','C',3933),('MERLINO CARMELO','C',3934),('ONESHOT S.A.S.','C',3935),('MANARITI GIUSEPPE','C',3936),('FESTA LEONA','C',3937),('CB SPECIAL COMPONENTS DI BERTOT','C',3939),('EDICOLA ARCURI LUCIA','C',3942),('LANDRO LEONE','C',3943),('COOPERATIVA REGGINA 08','C',3944),('MUZZI BRUNO','C',3952),('CAMERA ANTONIO','C',3957),('MAMONE GERARDO CENTRO RICAMBI AUTO','C',3961),('MALARA GIUSEPPE','C',3962),('R.C. TUNING DI LORENZO ANTIMO','C',3963),('MAIO CESARE','C',3966),('MACELLERIA LEONELLO SALVATORE','C',3967),('CAMERA DOMENICO','C',3972),('COZZOLINO SAVERIO AUTOPARTS','C',3976),('MARINO GABRIELE & F. sas','C',3978),('SYSTEM SUD SNC','C',3981),('MSC AUTOVEICOLI DI MUSICOARNALDO','C',4001),('GALATI ANTONIO AUTOTRASPORTI','C',4003),('NILAUTO srl','C',4004),('NUCERA FILOMENO','C',4007),('NUCERA MAURIZIO','C',4008),('OTTOBRE TRADE SRL','C',4205),('CONDOLUCI MARIA GIUSEPPA','C',4207),('PUGLIESE SALVATORE RICAMBI AUTO','C',4208),('NOVEMBRE ROSANNA MINUT.E MECC.','C',4210),('CABBOI GRAZIELLA','C',4212),('PETRONAS LUBRICANTS ITALY SPA','C',4213),('PERRI MIMMO','C',4215),('D.SSA ZAPPONE LILIANA','C',4222),('PUPO GIUSEPPE AUTORICAMBI','C',4226),('OFF.MECC.FRATELLI PIRILLI','C',4229),('RACO ELISABETTA RIF.TAMOIL','C',4230),('PICCOLO MARIO AUTORICAMBI','C',4232),('AUTORICAMBI VENTURA VINCENZO','C',4236),('TECNO EDIL DI VIOLA SANTO','C',4242),('PALMA AUTORICAMBI S.R.L.','C',4243),('PULIMENI ANTONIO & C. sas','C',4244),('PALERMO OLIVA Autoricambi','C',4246),('MAX MOTO DI PELLEGRINO M.A.','C',4249),('POLIMENI FRANCO','C',4256),('PEZZANO PIETRO','C',4261),('POLITI FRANCESCO Elettrauto','C',4263),('TROPEANO STEFANO RICAMBI AUTO','C',4303),('ROPERTO ALDO CENTRO COMMERC.RICAMBI','C',4304),('TENUTA GIANFRANCO AUTORICAMBI','C',4305),('F.LLI ROSE Snc di UMILE & FRANCO R','C',4308),('AUTORICAMBI RUGGIERO sas','C',4310),('VIOLA ERMANNO STAZ.SERV.ERG','C',4312),('R.AUTO IN snc','C',4313),('GOMMAUTO DI RODA & C. snc','C',4314),('DECA S.a.s. DI G.PPE DE PASCALI &C.','C',4318),('A.G.C.SRL','C',4320),('NUOVA RIMA DI CAPULA RAFFAELE','C',4324),('CRUCITTI GROUP SRL','C',4325),('INFORAMA DI DENISI V.ZO E C.SAS','C',4328),('EVALTO FRANCESCO & FIGLI','C',4401),('SCHIPANI RICAMBI','C',4404),('SPINA ALEXANDRO','C',4405),('SCUOLA CALCIO VIGOR PALMI 2004','C',4406),('SURIANO ALV SAS','C',4407),('AUDINO SAVERIO','C',4408),('SOBER RICAMBI AUTO sas','C',4409),('ROMEO VINCENZO & C. SNC','C',4411),('SAIM snc DI TAVELLA ANTONIA','C',4414),('SAINATO PASQUALE','C',4415),('SMEC SRL','C',4416),('F.LLI SINOPOLI snc Ric.Auto-Moto','C',4417),('F.LLI SPINELLI snc','C',4418),('AZ.AGR SORGES DI ROSA SORLETI','C',4420),('DUEMME S.A.S.','C',4421),('SPOLETO NUOVA AUTOACCESSORI','C',4422),('LOMBARDO DOMENICO FU GREGORIO','C',4423),('MULTISERVIZI M.G.D. DI PARRELLO','C',4427),('SCIARRONE SPA','C',4429),('SCRIVO ANTONIO','C',4432),('SERRATORE FRANCESCO','C',4440),('ANNULLATO UTILIZZATO PER IL WEB','C',4441),('LA BOTTEGA DEL RESTAURO DI FOTI R.','C',4442),('EREDI SURACE LORENZO di SURACE','C',4443),('S.D.R. sas','C',4446),('SAMA & CODISPOTI SAS','C',4451),('SCIONTI ROCCO Jr.','C',4452),('SOFI PAOLO','C',4454),('SISCA ANTONIO MECCANICO ARTIGIANO','C',4460),('ITALCOGE SPA','C',4463),('ANNULLATO TASSO SAL','C',4466),('BISCARDI LUIGI TUTTO PER LAUTO','C',4501),('B.P.SOLLEVAMENTI di ETTORE BELLINI','C',4502),('TROVATO AUTORIPARAZIONE','C',4506),('TASSONE PASQUALE','C',4514),('LA TIRRENICA DI CAPUA GIUSEPPE','C',4517),('TASSONE sas DI TASSONE GUERINO & C.','C',4521),('TASSO ANTONIO LEONE AUTORICAMBI','C',4522),('MAZZA ANDREA','C',4523),('TORCHIA ANGELO','C',4525),('TAVELLA ANTONIO','C',4533),('ANNULATO','C',4600),('VENTRA SAS di VENTRA VINCENZO & C.','C',4601),('VALOTTA FRANCESCO','C',4606),('VONO S.A.S. DI VONO G.& CO.','C',4607),('MEG DI ROMEO CARMELO','C',4611),('VENTRE AUTORICAMBI DI VENTRE G.PPE','C',4612),('TECHNO BUS SRL','C',4613),('LA FLAVIA DI FILIPPO SPINELLI','C',4614),('VRENNA LUCA MECC.& SICUREZZA','C',4615),('DELIZIE DI CALABRIA S.A.S DI ARENA','C',4621),('GENTILE FRANCESCO','C',4702),('ZICARELLI SALVATORE','C',4704),('ZAPPIA CARMELO','C',4705),('ATTENZIONE ! LA MECCANICA 2','C',5000),('EVA TECH S.A.S.DI DANIELE MEGALIZZI','C',5002),('RESTUCCIA ROSA RITA BOSCH CAR SERV.','C',5003),('PIMEC SRL','C',5004),('DAVIGIUSEPPE','C',5007),('VITETTA ANTONINO','C',5009),('STIL GOMMA DI NINO IANNELLI','C',5011),('ANNULLATO UTILIZZATO PER IL WEB','C',5017),('OFF.MECCANICA ROTONDO ANTONIO','C',5019),('COMBUSTION AND ENERGEY SRL','C',5020),('HOTEL RESIDENCE \"ARCOBALENO\"','C',5022),('BRANDO CARMELO','C',5024),('CASILE ROBERTO','C',5029),('AVVENTURA SOC.COOPERATIVA ARL','C',5035),('RA.DI SRL','C',5036),('CENTRO GOMME DI CONDINA GIOVANNI','C',5040),('JOLLY FRUTTA DI PAPASERGIO ANGELA','C',5043),('SURACE ANTONINO','C',5055),('FORTEBUONO METALLINFISSI S.r.l.','C',5056),('BAGALAGIUSEPPE','C',5057),('CASEIFICIO IL GRANATORE DI ZAGARI','C',5060),('RUSSO GAETANO AUTORICAMBI','C',5062),('RAFFAELI SRL','C',5073),('ALESSI PINA IMPRESA EDILE','C',5075),('ERREBI SRL','C',5076),('LA CORTE DELLA CARNE DI PEPPINO','C',5078),('MANOCCIO GENNARO','C',5084),('DE CARIA MOTORS SRL','C',5085),('DOTT.MARCELLO MELARA','C',5087),('F.LLI ATTISANO SRL ORTOFRUTTA','C',5088),('GIOFFRE PASQUALE','C',5089),('M.G. LOGISTIES SERVICES SRL','C',5091),('CONSORZIO ACQUEDOTTO VINA','C',5094),('MD COLLECTION DI MARRA DOMENICO','C',5100),('CRUCITTI SRL','C',5101),('VITALONE ROCCO OFF.MECC.','C',5102),('MOTORCYCLE & AUTO REPAIRS','C',5107),('QUASED SRL','C',5108),('CADI SERVICE S.A.S.','C',5110),('CO.DI.M. SRL','C',5114),('LEUZZI GIANCARLO','C',5115),('SCUTERI FRANCESCO','C',5116),('DI PINO TINDARO AUTORICAMBI','C',5117),('COMUNE DI SEMINARA','C',5123),('MATINA DOMENICO','C',5125),('ACCARDO ANNUNZIATO FILIPPO','C',5127),('BOLIGNANO ROBERTA DONATELLA','C',5131),('EVENTI FIORITI DI ROBERTA ANGALO','C',5132),('RAZIONALE ROSARIO HIPPONIO AUTO EL.','C',5133),('ERREMME di ROMEO DOMENICO MASSIMO','C',5134),('MAXICAR DI A.TRICOMI','C',5136),('MONTELEONE MARIA MADDALENA','C',5141),('REGGIORICAMBI DI MICHELANGELO','C',5142),('IL GENIO DEL PANE DI GARZO GREGORIO','C',5143),('ANNULLATO UTILIZZATO PER IL WEB','C',5144),('DAL MASO GIADOMENICO','C',5146),('RIZZITANO ANTONINO','C',5147),('MAURO AUTORICAMBI DI BADAMI MARIA','C',5150),('EDIL QUATTRO DI SAPONE G.& C. SNC','C',5151),('MARIA MADDALENA SICA','C',5163),('CILONA ANTONINO','C',5164),('MAGAZZU ARREDAMENTI','C',5165),('BORGESE VINCENZO','C',5166),('ARCHIMEDE DI MATTIANI PASQUALE','C',5169),('BAR RISTORANTE ULIVARELLA','C',5174),('CENTRO RICAMBI CALABRESI SNC CRC','C',5178),('PINNERI ANTONINO','C',5179),('F.LLI SCORDAMAGLIA S.N.C DI F.SCO','C',5182),('PANUCCIO ING.DOMENICO IMPR.COSTRUZ.','C',5183),('LOMBARDO ALLESTIMENTI','C',5195),('BOSCHETTO FRANCESCO ELETTRAUTO','C',5198),('PONTECOPROGES SRL','C',5199),('G.C.SERVICE DI GAGLIOSTRO CARMELO','C',5203),('PELLICANO S.R.L.','C',5208),('MACELLERIA DA ROCCO DI PRONESTI','C',5209),('MAGNETI MARELLI AFTER MARKET PARTS','C',5210),('IL POLLICE VERDE DI FARFAGLIA','C',5212),('COMUNE DI PALMI','C',5215),('BARA MOTO DI BARA FABIO','C',5225),('SAFFIOTI MASSIMO EMILIANO','C',5226),('LOIACONO GIULIO','C',5231),('SETTECERZE VINCENZO','C',5232),('BAGNOLI ROBERTO ELETTRAUTO','C',5234),('ALAMPI SALAVATORE IMPRESA EDILE','C',5236),('PANETTA CARLO','C',5239),('MYPLANET SRL','C',5240),('AUTO 3 snc F.LLI ARTESI','C',5241),('MATTIANI GIUSEPPE','C',5243),('ASP N.5 DI REGGIO CALABRIA','C',5244),('CANNIZZARO GIUSEPPE','C',5246),('SORICAL SPA','C',5248),('ROSACE GIUSEPPE','C',5249),('MOTORSPORT SNC DI SALVATI G.PPE & C','C',5250),('SLESC-SCHITRY DI SCHIPILLITI C.LO','C',5251),('LAURENDI GIOVANNA','C',5252),('OFF.MECC.GANGEMI DOMENICO','C',5253),('CUSAN di SANTORO & C. snc','C',5256),('MAISANO MARIANNA EURORICAMBI','C',5259),('NICOLI SANTINO ASS.PIAGGIO','C',5260),('ELETTROSISTEM DI LAFACE GIUSEPPE','C',5261),('F.LLI CAPOGRECO snc','C',5263),('COSENTINO FRANCESCA','C',5264),('TERMINE CLAUDIO AUTORICAMBI','C',5266),('CHIRICO PAOLO','C',5267),('MERCURI VINCENZA','C',5268),('AZIENDA AGRICOLA BIVONE MARIA','C',5269),('ANDREARCHIO ALESSANDRO','C',5271),('SICILIANO PASQUALE','C',5272),('APEIRON S.A.S DI F.SCO BARONE & C.','C',5273),('STAR SERVICE PICCOLA SOC.COOP.ARL','C',5274),('ZOCCALI ANTONIO','C',5276),('CONDELLO MARCO ALIMENTARI','C',5278),('MARTINO PAOLO PIETRO','C',5279),('PRELIBATEZZE DI RITA ARICO','C',5280),('AMORUSO LUIGI SRL','C',5281),('MAZZULLO LUCIANO','C',5282),('POLIAUTO DI POLIZZO UMILE','C',5286),('RIGANOFRANCESCO','C',5289),('AMBROGIO GIUSEPPE','C',5290),('ISOTERM DI VIGLIANTE GEOM.D.CO','C',5296),('MACELLERIA MICHELE LUPPINO','C',5297),('MARTORANO PASQUALE','C',5299),('TECNOVIDEO DI LAGANA','C',5301),('ASSIST.RENAULT ARCISIACONO ORAZIO','C',5302),('AUTOSERVICE MINNITI S.A.S.','C',5305),('CRO.MAR TRONIC DI G.MARZULLO','C',5308),('CRD SRL','C',5310),('VALENTE PNEUMATICI srl','C',5312),('SPADA AGOSTINO','C',5316),('RAMONDINO MARCO','C',5317),('SHOPSTORE SRL','C',5319),('LOIACONO ANNALISA','C',5321),('COLLURA ALESSANDRO','C',5324),('AP.RICAMBI DI PLUMARI ANTONINO','C',5325),('CENTRO DIAGNOSI DI GRAZIANO','C',5326),('MILITANO FRANCESCANTONIO','C',5327),('EUROSERVICE 2000 DI GIANLUCA CIMINO','C',5329),('CELESTI PIETRO ELETTRAUTO','C',5336),('AUTORICAMBI GABRIELE DI GABRIELE','C',5337),('JONICA RICAMBI SNC DI MUSCOLINO E','C',5338),('THE BEST AUTORIC.S.A.S.DI GALLO','C',5339),('VOLPE CARMELA OFF.RICAMBI AUTO','C',5341),('LOCCASIONE snc di PELLICANO P & C.','C',5342),('AZ.AGR.CARMELITANO MATTEO','C',5343),('PRISCOGLIO GIUSEPPE FRANCESCO','C',5344),('ANNULLATO INVIATO A motorline','C',5347),('PUTRINO DOMENICO STUDIO DI GEOLOGIA','C',5348),('CAPUTO NATALE AUTORIC.','C',5350),('SPORTAUTO di GAGLIOSTRO VINCENZO','C',5355),('ZERBI FABIO','C',5357),('ARICONATALE','C',5358),('VALOTTA LEOLUCA OFF.ELETTROMEC.','C',5360),('BARBARO CONCETTA LUCIA','C',5361),('PENNESTRILUIGI OFF.MECC.','C',5364),('RETTIFICHE MANNINO SRL','C',5366),('SPAGNOLO DOMENICO','C',5373),('AUTORICAMBI DLC DI ABOSSIDA G&C sas','C',5375),('AMBROGIO DOMENICO','C',5376),('BENEDETTO STEFANO','C',5377),('NICOLETTA GIUSEPPE','C',5378),('ESSERICAMBI DI ANNA MARIA SCHIRRIPA','C',5379),('DOTT.DOMENICO FARERI','C',5383),('V.I.M.A.R. SAS','C',5384),('AUTORICAMBI \"RUGGERI\" DI C.&D.CAR','C',5385),('ICOREL DI IERACE ROBERTO','C',5386),('S.G.AVIATION SRL','C',5387),('SUPERMERCATO PRINCI SAS','C',5388),('CALABRIA LUCIANO AUTORICAMBI C.D.R','C',5389),('MISALE GIUSEPPE','C',5390),('LASCALA DOMENICO','C',5393),('DELIVERY EXPRESS DI NUCARA A.','C',5394),('CUCCI FERDINANDO AUTORICAMBI','C',5402),('LENTINI MONTEDORO AUTORICAMBI','C',5407),('BORGESE CARMELO','C',5408),('TECNOSTUDIO DI ZACCURI GIOVANNI','C',5409),('SOC.COOP.ARCOBALENO A.R.L.','C',5411),('DE.SAL.CAR. DI DE SALVO ROBERTO','C',5412),('PM 2 DI MILITANO NATALE','C',5416),('EURO CAR DI BARONE ANTONINO','C',5417),('ROSINA ANTONINO','C',5418),('PALMERI MICHELE','C',5419),('S.D.CAR DI SALVATORE DOMENICO','C',5421),('CENTRO RICAMBI MINNITI','C',5422),('A.B.S. AQUILA BROADCASTING SETS','C',5424),('EDIL CASA DI DANDREA DOMENICA','C',5427),('RICAMBI 2000 S.N.C. DI LAGONIA &','C',5428),('KRIOS AC S.R.L.','C',5429),('MUSICO ANTONINO','C',5430),('NSA NUOVI SERVIZI AUTO S.P.A','C',5432),('FRAMEL SRL','C',5433),('ANNUL.LA BELLA FRANCESCO','C',5434),('IMPIOMBATO ANTONIO','C',5435),('ALFIERI SALVATORE','C',5436),('PASTIFICIO LANTICO MULINO','C',5437),('RICAMBI INDUSTRIALI S.R.L.','C',5438),('ANNULLATO INVIATO A CARPOINT','C',5439),('BARBIERI AUTORICAMBI di COSMA','C',5440),('SGRO GIUSEPPE','C',5441),('GIOIA HOSPITAL','C',5442),('AUTORICAMBI MAMONE PEPPINO','C',5444),('LA SOSPENS LIDO DI GABRIELE PIETRO','C',5445),('MICHELE SURACE DOTT.COMMERCIALISTA','C',5446),('CERENZIA GAETANO','C',5447),('BARBARO CARMINE','C',5448),('CALANNI RINDINA SPRINT AUTORICAMBI','C',5449),('ALAMPI SANTO','C',5450),('GIDAR srl','C',5451),('MARTELLI GIUSEPPE','C',5452),('OFF.MECC.BARBERA MATTEO','C',5453),('MARIANO GAETANO RIC.OFF.GOMME','C',5454),('CANNISTRA FRANCESCO','C',5455),('PIZZINO GIUSEPPE','C',5456),('GRIPPAUDO VINCENZO','C',5457),('SCANDURRA TIZIANA DIMENSIONE AUTO','C',5458),('AUTOSHOP S.R.L.','C',5459),('AUTORICAMBI DIANA ROBERTO & C.SAS','C',5460),('OLIVERI FRANCESCO','C',5461),('COSENTINO VITTORIO','C',5462),('C&P CERTIFICAZIONI S.R.L..','C',5463),('AR.RICAMBI SNC ARUTA SALV.& SANDRO','C',5464),('MAZZA ANTONIO','C',5466),('GANGEMI GIUSEPPE','C',5467),('STUDIO LEG.AVV.PELLEGRINO PASQUALE','C',5468),('OLIVERIO GIOVANNI','C',5469),('CASTAGNA PASQUALE AUTORICAMBI GOMME','C',5470),('GRAFIA PUBLICITA DI CIPRI GIUSEPPE','C',5471),('SAIJA ANGELO','C',5472),('CILIBERTO RENATO','C',5473),('CATANZARO SALVATORE','C',5474),('EUROAUTO srl','C',5475),('AGENZ.VIAGGI E TURISMO DE NICOLA','C',5476),('LA CONCORDIA SNC','C',5477),('MACOS srl','C',5478),('SIC.COM. S.A.S.','C',5479),('DONATO DANIELE AUTOR.','C',5480),('TROPICAL FRUIT DI LUPPINO FRANCESCO','C',5481),('SCIARRONE VINCENZO RICAMBI','C',5482),('CLIMAUTO DI TRAPASSO GIUSEPPE SNC','C',5483),('DABATE ORAZIO C.R. CENTRO RICAMBI','C',5484),('LB RICAMBI AUTO SAS','C',5485),('FAR.O.L.RICAMBI srl FAROL','C',5486),('CAPRINO ANTONIO AUTORICAMBI','C',5487),('MEGNA ANTONIO','C',5488),('MARINCOLO SERAFINO ELETTRAUTO','C',5489),('TECNORICAMBI SNC','C',5490),('PRESTIPINO SALVATORE','C',5491),('COSENTINO GIUSEPPE','C',5492),('SANTORO ANTONINO','C',5493),('R.S.STORE SRL','C',5494),('DE LUCA SERVICE DI DELUCA F.SCO SAS','C',5495),('AUTORICAMBI BRUNO SERGIO','C',5496),('INDUSTRIAL POINT S.R.L.','C',5497),('ANNULLATO PRESO PER IL WEB','C',5498),('MORABITO LEONARDO ITALRICAMBI','C',5499),('PENNA ANTONINO IMP.AGIP 8898','C',5500),('CARUSO ROCCO','C',5501),('COMPUTER & INTERNET DI FORTUNATO','C',5502),('IGRO SUD DI MERCURI GIANCARLO','C',5503),('PISANELLI SANTO','C',5504),('PISANO ANTONIO','C',5505),('RUFFO GELSOMINA GFC AUTORICAMBI','C',5506),('SUORE SALESIANE DEI SACRI CUORI','C',5507),('ALPA AUTO S.R.L.','C',5508),('ESPOSITO LORENZO','C',5509),('GAGLIOSTRO STEFANO','C',5510),('SIRIO AUTORICAMBI DI UFRASCATI G.','C',5511),('ELETTRAUTO AMATO FAUSTO','C',5512),('ALBANESE GIUSEPPE','C',5513),('ANNULLATO PRESO PER IL WEB','C',5514),('RI.A S.R.L.','C',5515),('AUTOFORNITURE TINO DAGATE','C',5516),('GLORIOSO ADRIANO','C',5517),('AUTORICAMBI ITALIANO di CURCURUTO','C',5518),('AUTOFORNITURE GULLOTTA','C',5519),('MANGIARRATTI EMANUELE IDROTEC','C',5520),('DOMINICI SRL','C',5521),('C.R.A.E.di DI BENEDETTO PROVVIDENZA','C',5522),('SPADA CARMELA SRL','C',5523),('LOMBARDO GIUSEPPE','C',5524),('MANOLA SALVATORE SA.MA','C',5525),('FARACI RAFFAELE TUTTAUTO','C',5526),('AUTORICAMBI CIARCIA CARMELO','C',5527),('MESSINA GIUSEPPE','C',5528),('AUTORICAMBI MEGARA SNC','C',5529),('MOTORPOINT SRL','C',5530),('ANASTASI GIOVANNI','C',5531),('AUTORICAMBI G.S.di SCOZZARICARLO','C',5532),('MA.DI.DI snc AUTOMARKET 2000','C',5533),('R.A.V. DI SORRENTINO LUIGI S.A.S','C',5534),('SA.MA RICAMBI DI SALAFIA MAURO','C',5535),('O.R.A. SPALLITTA & C. snc','C',5536),('TUTTAUTO ALBERGHINA GIANFRANCO','C',5537),('VINCI CONCETTO AUTOTECNICA AUTOR.','C',5538),('ANULLATO UTILIZZATO PER IL WEB','C',5539),('GIANNUSO GIOVANNI','C',5540),('CE.RI. DI CATANIA BIAGIO & C. SAS','C',5541),('ILARDI MARGHERITA & C. SNC','C',5542),('PUNTO RICAMBI SRL','C',5543),('NIGRELLI LUIGI','C',5544),('A.R.A.T. DI MARIO DI GIOVANNI','C',5545),('DILIBERTO AUTORICAMBI','C',5546),('DI COSTA S.R.L.','C',5547),('C.R.SERVICE SRL','C',5548),('ALOISI ANTONIO','C',5549),('PAONE RICAMBI DI PAONE G. SAS','C',5550),('FERICAM DI PISU FEDERICO','C',5551),('SANTOCONO & C. R.A.I.E.snc','C',5552),('VESPO SALVATORE','C',5553),('AUTORICAMBI MOTTA srl','C',5554),('GRASSO & FIGLI sas DI GRASSO D.e C.','C',5555),('VECCHI SNC','C',5556),('F.LLI CHIARAMIDA AUTORICAMBI sas','C',5557),('FUTURA RICAMBI DI SCACCIAFERRO','C',5558),('COSENTINO F.e G. snc','C',5559),('FENECH AUTORICAMBI srl','C',5560),('SAMMITO ANGELA','C',5561),('CENTRO RICAMBI SRL','C',5562),('AUTORICAMBI STRANO SRL','C',5563),('SURIANO PAOLO','C',5564),('AUTORICAMBI GLORIOSO srl','C',5565),('VECAM DI OLIVELLI VENERANDO E C.snc','C',5566),('MEC.CARS RICAMBI DI SCIALFA G.PPE','C',5567),('PENNISI AUTO DI G.PENNISI','C',5568),('AUTORICAMBI MAGGIO GIUSEPPE','C',5569),('GRILLO NICOLA AUTOFORN.','C',5570),('AUTORICAMBI TROGYLOS SRL','C',5571),('PRIVITERA STEFANO','C',5572),('AUTOFFICINA M.A.&.V S.a.s di OSCAR','C',5573),('IEMMOLO VINCENZO','C',5574),('GENNUSA GIUSEPPE AUTORICAMBI','C',5575),('C.R.A. Snc di Salvatore Tanasi & C.','C',5576),('F.LLI MUSARRA sas','C',5577),('S.G.R. DI ROSANO V.ZO & C. sas','C',5578),('ADAMO ROBERTO','C',5579),('ELIOS AUTORICAMBI SRL','C',5580),('DIEMME SRL','C',5581),('NUZZO FILIPPO','C',5582),('AUTOR.FISICARO DI FISICARO FILIPPO','C',5583),('CENTRO RICAMBI DESARI GIUSEPPE','C',5584),('AUTORIC.PROFETA DI PROFETA ONOFRIO','C',5585),('MARTUCCI REMO AUTORICAMBI','C',5586),('CHECKS SRL','C',5587),('AUTOETNA DI INTRESSALVI M.& C. snc','C',5588),('FRICANO ROBERTO & C.RI.AS.sas','C',5589),('GAGLIARDI VALENTINO','C',5590),('MICIELI SALVATORE SNC','C',5591),('GIARDINA GIOVANNI','C',5592),('BOCCHIARO GIUSTO & C. snc','C',5593),('R.D.C. DI VALERIA FILI','C',5594),('PALAZZOLO GIUSEPPE','C',5595),('CARILLO MARTINO AUTORICAMBI','C',5596),('AUTORIC.FAVUZZA SOC.COOP.','C',5597),('F.LLI RUSSO DI GAETANO RUSSO & C','C',5598),('DI.R.MEC SRL','C',5599),('AUTOCOMPONENTI COSENTINO','C',5600),('OLIVERI FRANCESCO AUTORICAMBI','C',5601),('PULIZZI GIOACCHINO','C',5602),('AUTORICAMBI RIITANO DOMENICO','C',5603),('FARRUGGIO BIAGIO','C',5604),('DISTEFANO M.& PELLEGRINO A. S.N.C.','C',5605),('SORTINO S.r.l.','C',5606),('B.R.M. di MARINELLI G.PPE & C. snc','C',5607),('C.A.R. DI CAMPISI ISABELLA','C',5608),('ARENA SRL','C',5609),('AUTOMECHANIKA SRL','C',5610),('PRECAV S.N.C. DI CAVALLARO ROSARIO','C',5611),('COIR srl','C',5612),('DI BELLA SERVICE','C',5613),('GARDEN BAR RACITI PAOLA & C. SNC','C',5614),('TUTTORICAMBI snc DI MUSCIA V.& G.','C',5615),('RICAS RICAMBI E ACCESSORI DI','C',5616),('DI PIETRO AUTOSERVICE DI PIETRO C.','C',5617),('EUROPARTIAUTO DI COCO CARMELO','C',5618),('AUTORICAMBI ODDO CARMELO','C',5619),('LAUTORICAMBI SRL','C',5620),('CUNSOLO MARIO AUTORICAMBI','C',5621),('AUTORICAMBI GRECO FINA','C',5622),('CORRADO CASALE SNC','C',5623),('R.A.I.A.R. srl','C',5624),('CASA DEL RADIATORE','C',5625),('CENTRO CLIMA SNC','C',5626),('SCARLATO SALVATORE ELETTROCAR','C',5627),('VIOLA FRANCESCO','C',5628),('CENTRORICAMBI NIGRO srl','C',5629),('MASTROGIOVANNI SRL','C',5630),('F.LLI PIZZA SNC','C',5631),('VIOLI CARLO','C',5632),('AVV.CARMELA CLEMENTE','C',5633),('DE CARIA ROCCO AUTORICAMBI','C',5634),('DIESEL TRUCKS DI SCADUTO ANGELO','C',5635),('MESSINA FILIPPO AUTORICAMBI','C',5636),('ERRECI DI RAFFAELE CANTAFIO','C',5637),('DOTT.GIUSEPPE FAVIA GUARNIERI SRL','C',5638),('ROSSETTI ALESSANDRO','C',5639),('STAZIONE DI SERVIZIO MANGANI','C',5640),('RONDINELLI GIOVANNI BATTISTA','C',5641),('DALTORICAMBI SRL','C',5642),('CORDIANO MARCELLO','C',5643),('EURORICAMBI DI TUSCIANO GIUSEPPE','C',5644),('AUTORIPARAZIONI IORI SNC.DI GRASSI','C',5645),('RI.CAR. srl','C',5646),('CAPPARELLI FRANCESCO','C',5647),('TUTTO MARMITTE DI BORSELLINO TANINA','C',5648),('PUGLIESE ANTONINO','C',5649),('AUTOFFICINA FUDA DI','C',5650),('TUTTO RICAMBI DI PRIOLO MARCO','C',5651),('LUCKY BAR RUGARI & GALLETTA S.A.S','C',5652),('ROCCAFORTE EURORICAMBI','C',5653),('CENTRO MIDAS REGGIO CALABRIA','C',5654),('BELLANTONI VINCENZO','C',5655),('AUTOFFICINA MISIANO SALVATORE','C',5656),('DEMASI GIUSEPPE','C',5657),('DIESELTRUCK DI ALFANO FABIO','C',5658),('ARIGANELLO MASSIMO AUTORICAMBI','C',5659),('MI.RA. RICAMBI SAS MIRA','C',5660),('AGF SICILIA srl','C',5661),('MOLISE RICAMBI di A.Tamburri SNC','C',5662),('GARANZIA EUROPA GROUP SPA','C',5663),('FORESTIERI BRUNO ITALTRONYC','C',5664),('MORABITO VITO','C',5666),('MORABITO SALVATORE','C',5667),('LA MECCANICA SRL','C',5668),('GENNARO CACCIAPUOTI','C',5669),('PALAMARA GIUSEPPE PIT STOP','C',5670),('POLITO CARBURANTI DI ROCCO POLITO','C',5671),('STAZ.SERV.AGIP DI FRUCI GIUSEPPE','C',5672),('MARTINO SRL','C',5673),('SCHIPANI MARIANGELA AUTORICAMBI','C',5674),('AUTO VIP SRL','C',5675),('VECCHI GIUSEPPE RICAMBI','C',5676),('FARNO FULVIO & S. snc','C',5677),('CIRIMELLI AUTORICAMBI DI SAVERIO P.','C',5678),('IL CANNETO TAMOIL DI POLITO A. SAS','C',5679),('CARDINALE AUTOMOBILI SRL','C',5680),('D.R.A.M. snc','C',5681),('MANCUSO ILARIA AUTORICAMBI','C',5682),('COTRONEO DOMENICO','C',5683),('GRANATA F.CO F.G. AUTORICAMBI','C',5684),('RE.MA.DI ESPOSITO R.& BELSITO M.SRL','C',5685),('STAZ.SERV.AGIP DI BAGNATO SALVATORE','C',5686),('CAMMILLERI GAETANO AUTO GT','C',5687),('AGRILU DI MALVASI LUCIA','C',5688),('R.G. di ROSARIO GAROFOLO','C',5689),('AUTOELETTRONICA F.LLI DOMINICI snc','C',5690),('MELI CAR RENTALS LTD','C',5691),('RF srl','C',5692),('RUSSO GIUSEPPE','C',5693),('FALCONE FRANCESCO','C',5694),('STEFANELLI DOMENICO','C',5695),('GR srl','C',5696),('DIMENSIONE AUTO SRL','C',5697),('LATTANZIO DONATELLA','C',5698),('AUTOCOM SRL','C',5699),('GIORDANO SALVATORE OFF.CHEVROLET','C',5700),('CO.R.A.R.09 SRL','C',5701),('TRIMARCAR AUTORIC.DI MACRI PALMA','C',5702),('VIOLAUTO SRL','C',5703),('G.& V.POLICASTRI SNC','C',5704),('A.G.S.RICAMBI SRL','C',5705),('FLORI MOTORI SRL unipersonale','C',5706),('CUCINOTTA ANGELO AUTORICAMBI','C',5707),('ARCURI MARCELLO AUTORICAMBI','C',5708),('GAMMA RICAMBI SRL','C',5709),('VIOLA VINCENZO AUTORICAMBI','C',5710),('BELLOCCO RAFFAELE','C',5711),('BELCASTRO ANGELO ACCESSORI','C',5712),('SAFFIOTI CARMELO IMPRESA EDILE','C',5713),('A.M.RICAMBI DI ESPOSITO S.','C',5714),('3C RICAMBI DI COLAPRISTI VINCENZO','C',5715),('SURACE AUTO DI SURACE ROCCO','C',5716),('DIEMME SRL','C',5717),('F.LLI SCANGA SRL','C',5718),('ARTE FERRO DI ROSARIO BAGNATO','C',5719),('AUTORIC.CHIURCO DI LORICCHIO V.ZO','C',5720),('TIRRENO SNC.DI LUCCHESE V.ZO','C',5721),('CO.GE.TECH SRL','C',5722),('SALADINI SRL','C',5723),('TURANO ARMANDO','C',5724),('G.E.S.T. AUTORICAMBI SRL','C',5725),('CONDO ANTONIO','C',5726),('PUNTO MARMITTE DI FERRARA DOMENICO','C',5727),('INTERNAZIONALE RICAMBI SRL','C',5728),('A.A.R. DI CURCIO VINCENZO','C',5729),('RIC.PIAGGIO F.LLI SERGI DI SERGI G.','C',5730),('LAURITO GIUSEPPE AUTORICAMBI','C',5731),('AUTORICAMBI TRE A DI A.LUZZI','C',5732),('VISCOMI AGOSTINO','C',5733),('GROUP ECO ITALIA SRL','C',5734),('MESITI LUCA','C',5735),('AUTORICAMBI SCHIRRIPA SAS','C',5736),('TRUSCELLI ANTONIO','C',5737),('AUTORIC.GODINO DI MENDICINO LORETTA','C',5739),('MICHELE CAROLI SRL','C',5741),('CIRIA ALESSIO AUTORICAMBI','C',5742),('F.LLI LORENTI RICAMBI AUTO SRL','C',5743),('R.S.RICAMBI DI ROBERTO SGAMBELLURI','C',5744),('ARCURI SISTINO AUTORICAMBI','C',5745),('2V CAR PARTS DI VALERIO MACRI','C',5746),('BARILLARI GIUSEPPE AUTORICAMBI','C',5747),('AUTORICAMBI COSENTINO SRL uniperson','C',5748),('EURORICAMBI SRLS','C',5749),('AUTORICAMBI 2G DI GIANFRANCO GARUFI','C',9002),('A.R.A. RICAMBI VENETICO srl','C',9005),('BELLANTONI DOMENICO','C',9034),('BASILE SANTO','C',9036),('AUTORICAMBIFOX DI FOSSATI MATTEO','C',9062),('GRANDI RICAMBI DI GRANDI SIMONE','C',9070),('CARUSO CALOGERO','C',9071),('CALDERONE PAOLO FRANCESCO','C',9074),('GAGLIO GIUSEPPE Ricambi Auto e Acc.','C',9185),('GIORGIANNI AUTORICAMBI S.N.C.','C',9190),('SAPORITO MASSIMO LAUTORICAMBIO','C',9284),('LOMBARDO SANTO','C',9285),('MICALI GIOVANNI','C',9324),('MERLINO ANTONINO','C',9331),('MILONE GIUSEPPE','C',9352),('CENTRO AUTO DI TRAMONTANO','C',9380),('PINTAUDI ROCCO','C',9422),('AUTORICAMBI DI PINO SRL','C',9475),('SETTIMO GIOVANNI','C',9502),('SANFILIPPO GIUSEPPE','C',9505),('STURNIOLO ANTONINO Elettrauto','C',9507),('SUD RICAMBI snc DI GUGLIOTTA C.& C.','C',9508),('SPRINT CAR AUTORICAMBI DI GRECO A.','C',9511),('GIORGIO FRANCESCO','C',9534),('TRIFILO FILIPPO TUTTO AUTORICAMBI','C',9537),('RIGGIO GIUSEPPE & C. SNC','C',9620),('CORRISPETTIVI','C',999999),('','F',0),('SAFFIOTI CARMELO SNC','F',1),('TRENTINELLA FRANCESCO','F',2),('PRINTING.CENTER','F',3),('MAZZULLO FORTUNATO','F',4),('MGG ITALIA S.R.L. GRUPPO IMCO','F',5),('GLS GENERAL LOGISTICS SYSTEMS','F',6),('CIFANI SRL','F',7),('BARTOLINI spa','F',8),('ITALIA RECAPITI S.R.L','F',9),('UNI EURO S.P.A','F',10),('FORMAT S.A.S. DI PISCOPO ANTONIO &C','F',11),('GIAMMARRESI NICOLO','F',12),('CANNATA VINCENZO srl','F',13),('GRIMAS srl Etichette','F',14),('CONSORZIO ASSORICAMBI','F',15),('B.C.R. srl','F',16),('CADI snc F.LLI MILASI','F',17),('JET EXPRESS srl CORRIERE ESPRESSO','F',18),('PAPERNET SPA','F',19),('FIAMMA DI A.SEMINARA','F',20),('COSTANZO SALVATORE','F',21),('MONDOFFICE SRL','F',22),('SOF.INN. INFORMATICA srl','F',23),('G.TRIPODI SRL','F',24),('ARMES SPA','F',25),('J-SOFTWARE SRL','F',26),('SARITEL','F',27),('SDA EXPRESS COURIER','F',28),('TRASPORTI PE.CAM','F',29),('CONSOZIO PDA','F',30),('OPITERGINA MARMITTE DI NESPOLO','F',31),('SCATOLIFICIO VENETO S.R.L.','F',32),('AUTOCOM SRL','F',33),('LT SRL LOGISTICA E TRASPORTI','F',34),('FUTIA DOMENICO','F',35),('SETEFI SPA GRUPPO INTESABCI','F',36),('ELPIDA D.O.O.','F',37),('I.F.R. DI MAURIZIO ROMANO','F',38),('CRUCITTI SRL','F',39),('GRAFICAJONICA SNC','F',40),('PANALPINA TRASP.MOND.SPA','F',41),('ARUBA SPA','F',42),('ENGINET SRL','F',43),('POLIGRAFICO SRL','F',44),('SERIBAG DI ZAGARI DANIELA','F',46),('PISANI FRANCESCO & FIGLI SPA','F',50),('INGROSUD DI PRATICO ANTONIO','F',51),('MEDIA WORLD COMPRA ON-LINE','F',53),('PM2 DI MILITANO NATALE','F',58),('RAG.PARISI GIUSEPPE','F',60),('REDOIL ITALIA spa','F',64),('BARBARO SPORT S.A.S.','F',75),('KRIOS A.C. srl','F',83),('SERFEM DI SERGIO FEMIA','F',86),('SOVEB AUTO SRL','F',90),('SUSA TRASPORTI SPA','F',93),('SDA sas DI PALMITESSA (UNIGOM)','F',94),('NOTAIO MARCELLA CLARA RENI','F',96),('AB ELETTROSISTEMI','F',97),('SOCET srl (TOTAL)','F',100),('DELIVERY EXPRESS','F',101),('TAZZETTI GUIDO & C. SPA Div.ACR','F',102),('COMPUTER ASSIST S.A.S. DI RUFFOLO','F',103),('ALDASA DI FRANCO SILENO','F',104),('STUDIO LEGALE AVV.GIULIANA METE','F',105),('TRIONE RICAMBI S.P.A','F',107),('RICAMBIFLEX GM srl','F',110),('CASA DEL RICAMBIO SRL','F',111),('LEONARDO SNC DIGITAL STUDIO','F',112),('MUSICO MACCHINE AGRICOLE','F',115),('ROBERT BOSCH spa','F',116),('C.B.F. BALDUCCI SPA','F',117),('ENGINE COMPONENTS srl GLASER','F',118),('SEAL-TECH SRL','F',119),('SMAT NORD srl','F',120),('RIVOIRA S.P.A','F',121),('BRENTA SRL','F',122),('RAPISARDA CARLO CARMELO','F',123),('CIEFFEBI TRASPORTI','F',124),('CAST BOLZONELLA S.A.S.','F',125),('EURODECOS S.R.L.','F',126),('DALTORICAMBI SRL','F',127),('LUBEX S.P.A.','F',128),('ITALTRADE SRL','F',129),('SAMAUTO SPA','F',130),('FRAP srl','F',135),('SOGEFI FILTRATION SPA','F',140),('UNIPART NV INTERNATIONAL RADIATOR','F',145),('EXIDE ITALIA SRL','F',150),('IBS SRL','F',155),('ASSOMARMITTE SRL','F',160),('IPS PARTS SRL','F',165),('OSRAV ALFEO MORET SPA DAMPO','F',170),('EXO AUTOMOTIVE SPA REMSA-OPENPARTS','F',175),('KAYABA ITALY GmbH','F',180),('SALADINI SRL','F',185),('CARTIERA LUCCHESE SPA (LUCART)','F',190),('TIRRENA IMPEX SRL','F',195),('FAAL BATTERIE SRL','F',200),('NRF ITALIA SRL','F',205),('DICRA SPA','F',210),('MECARM srl','F',215),('LEART-DIVISIONE EUROLITES SPA','F',1202),('EUROLITES S.P.A ARIC','F',1203),('MORONI CESARE & C. snc','F',1307),('M.T.S. spa','F',1310),('MAGNETI MARELLI AFTERMARKET AND SER','F',1323),('MALO spa','F',1329),('NEWFREN SPA','F',1401),('OLYMPIA srl','F',1501),('F.LLI TRIPODI SNC','F',1502),('FL.ITALIA srl OLEOBLITZ','F',1505),('OSRAM spa','F',1507),('PHILIPS SPA','F',1602),('DAYCO EUROPE SRL','F',1605),('RICAUTO SPA','F',1804),('R.M.S. S.P.A.','F',1817),('COMMERCIALE LUCANA snc','F',1901),('ENZO PARISI S.R.L.','F',1902),('SIOM S.R.L.','F',1908),('SIA INDUSTRIA ACCUMULATORI spa','F',1914),('SIMAKA','F',1923),('SITO GRUPPO INDISTRIALE spa','F',1935),('TOMAS RENATO & BRUNO sas','F',2001),('UMMAC srl','F',2201),('VEMA srl','F',2306),('VALEO SERVICE ITALIA S.P.A.','F',2308),('WD-40 COMPANY LTD','F',2309),('A.C.S. DI CORDOVANA SALVATORE','F',3101),('DELTA SERVICE snc','F',3103),('AUTOFORNITURE MILANESI spa','F',3104),('AGIP PETROLI ( Agenzia RC )','F',3105),('ARSAUTO SRL','F',3110),('AREXONS DIVISIONE DI FL SELENIA SPA','F',3116),('BOSATTA F.LLI \"F.B.\"srl','F',3201),('BIFFI & PREMOLI srl','F',3205),('BERGAMASCHI & F. spa','F',3213),('F.G.WOLF SRL','F',3302),('C.D.A. spa','F',3303),('CENTAURO srl','F',3307),('CASA DEL BULLONE sas','F',3311),('ORIGINAL BIRTH spa','F',3314),('FORTEBUONO METALLINFISSI SRL','F',3321),('C.C.R. srl CENTRO CUSCINETTI','F',3325),('CRAMER SRL','F',3328),('TOMMASELLI srl','F',3401),('DELLORTO spa','F',3403),('FEDERAL MOGUL ITALY SRL','F',3408),('F.A. ITALIA snc','F',3620),('FODONE sas','F',3621),('GUARNITAUTO spa','F',3707),('G.V.S. DI SALA RINALDO','F',3718),('PRES-SING S.A.S.','F',3906),('CODICI ANNULLATI','F',9999),('','F',999999);");
+ statement.executeUpdate(
+ "insert into mytable2(myfield,pfx,numero) values ('COSTRUEDIL DI GAGLIOSTRO & C.SNC','C',6),('AUTOBUDA SRL','C',7),('CAFARELLI TINDARO AUTORICAMBI','C',8),('LARTE DEL MOBILE DI QUINTO CUTRI','C',9),('GRAPHIC DESIGN','C',10),('FOTI CARMELO','C',11),('MALAGRECA MICHELE OFF.ELETTR.','C',12),('CLIENTE NUOVO FRANCESCO','C',13),('LAROCCA ETTORE','C',14),('ALCAM SNC DI MARAFIOTI ALESSANDRO E','C',15),('EUROPA TYRES S.R.L.','C',16),('CROCE ROSSA ITALIANA COM.LOCALE','C',17),('RUGNETTA BRUNO','C',18),('BOSA VINCENZO TUTTO PER LA PESCA','C',19),('C.P.R.CENTRO POSE ROMEO','C',20),('VIOLI ORESTE OFF.AUTOCARROZ.','C',21),('LIGATO SALVATORE','C',22),('DECORFORM DI IANNINO DARIO','C',23),('BEVI SUD DI DAGOSTINO GIUSEPPE','C',24),('BUSTE E CARTA DI GALLICO DARIO','C',25),('CELESTINO CRISAFULLI','C',26),('IMPRESA EDILE IS.AS.DI SALVATORE','C',27),('RASO GIUSEPPE','C',28),('EUROTECNICA 3A SAS DI ANELLO FRANC.','C',29),('EXO AUTOMOTIVE S.P.A.','C',30),('GHEA SISTEM S.R.L.','C',31),('AUTOTECNICA DI IANNELLI GIUSEPPE','C',32),('NATURAL SALUMI DI ARENA GIANCARLO','C',33),('LOIACONO PASQUALE & C. S.a.s.','C',34),('LONGO CLAUDIO','C',35),('CLASS SERVICING S.R.L.','C',36),('CADI SNC F.LLI MILASI','C',37),('MARTURANO FRANCESCO','C',38),('ARICOASSICUR.DI ARICOMARIATERESA','C',39),('','C',40),('SICILIANO FRANCESCO','C',41),('PREVITERA CATERINA ALIMENTARI','C',42),('AUTOFFICINA LUCAGIOVANNI','C',43),('NON UTILIZZARE','C',44),('','C',45),('SAFFIOTI MELO MACELLERIA GASTRON.','C',46),('MANGERUGA SERAFINO','C',47),('S.D.A. s.a.s.di Palmitessa Carlo','C',48),('IPER SCAVI S.R.L.','C',49),('','C',50),('FABBRICA ARTIGIANA LUIGI COLOMBO','C',51),('ELETTRO GLOBAL SERVICE DI ELIA','C',52),('FORTUNATO','C',53),('STEFANO BAJLO','C',54),('.','C',55),('FORTUGNO S.R.L.','C',56),('PARRELLO GIUSEPPE','C',57),('GAS E CUCINE DI SANTORO GIOVANNI','C',58),('LUPPINO MAURIZIO','C',59),('','C',60),('CHARTER LINE SAS','C',61),('CAMPAGNA GIUSEPPE EREDE DI CAMPAGNA','C',62),('TREBI DI BARBARO FRANCESCO','C',63),('COOPERATIVA SOCIALE ONLUS','C',64),('','C',65),('SASOL ITALY S.P.A.','C',66),('AVATI ROCCO','C',67),('DOLCE FREDDO DI DAGOSTINO G.PPE','C',68),('GUERRERA FRANCESCO','C',69),('','C',70),('AGRICOLA PALMESE DI ARICO EMAN.&C.','C',71),('BORRELLO COSIMO TENDAGGI TAPPEZZ.','C',72),('DAMIANO PUTRINO OFF.MECC.','C',73),('CENTRO FORNITURE S.R.L.','C',74),('','C',75),('CLIENTE NUOVO FORTUNATO','C',76),('AVV.FERDINANDO DE LEONARDIS','C',77),('INSTALLAZIONE DI IMPINATI ELETTR.','C',78),('VIOLI PIETRO','C',79),('','C',80),('BASILE VINCENZO','C',81),('SAFFIOTI APPALTI & COSTRUZIONI','C',82),('SOC.COOP.MULTISERVICE MAMMOLA','C',83),('ARCH.TIZIANA GAGLIOTI','C',84),('','C',85),('GAGLIOTI SRL','C',86),('PINO MICHELE IMPRESA COSTRUZ.','C',87),('','C',88),('BORGESE GIUSEPPE','C',89),('','C',90),('PREVITERA SALVATORE','C',91),('PASTORE SRL','C',92),('OFF.LUCI CARMELO','C',93),('GIOFFRE CARMELO','C',94),('','C',95),('COGIMI S.R.L.','C',96),('CANTINE ZAGARI SNC','C',97),('ALBEDA IMPIANTI DI LOPRETE ANTONIO','C',98),('VETRARIA BRUTIA S.R.L. UNIPERSONALE','C',99),('COSTANZO TOTI','C',100),('GRASSO DAVIDE','C',101),('SGROMO BERNARDO','C',102),('PANIFICIO CIAPPINA','C',103),('ARCA INDUSTRIAL SUPPLIES S.R.L.','C',104),('','C',105),('ZUMBO DR.TOMMASO','C',106),('PUNTO SIDIS DI SACCA PASQUALE','C',107),('BARRARA SALVATORE','C',108),('IMEX P-TRADE S.R.L.','C',109),('','C',110),('DOTT.AGR.VINCENZO CILONA','C',111),('PIANEGONDA DARIO S.A.S.','C',112),('DALOI GIUSEPPE AUTOFFICINA','C',113),('BARBARO MOTO SAS','C',114),('','C',115),('DE FRANCESCO VINCENZO','C',116),('RICAUTO SPA','C',117),('GERICO SAS','C',118),('GISMONDO VINCENZO','C',119),('','C',120),('IMPRESA COSTR.EUROEDIL DI MOIO F.SC','C',121),('SUD.INFORMATICA S.R.L.','C',122),('CRAZY MOBIL SNC DI GAGLIOTI G.PPE','C',123),('A.D.S.S.E. SRL DI RUGGIERO PACIFICO','C',124),('','C',125),('GRAMUGLIA VINCENZO','C',126),('LUIGI NIZZARI SUBAGENTE ALLIANZ SPA','C',127),('BRUZZESE ANNUNZIATA','C',128),('HOTEL STELLA MARIS SRL','C',129),('','C',130),('ATRE EXPRESS SRL','C',131),('GATTO ANTONINO','C',132),('BO.GE.CO. S.R.L.','C',133),('VALENTINO TECNICA SNC','C',134),('','C',135),('NASO GIUSEPPE','C',136),('GALIBERTI LUCIANO STEFANO','C',137),('MURACE FRANCESCO','C',138),('GEOM.GIOFFRE SAVERIO','C',139),('','C',140),('PIANA PALMI MULTISERVIZI S.P.A.','C',141),('GOLDEN GROUP SNC','C',142),('DE CREA FORTUNATO','C',143),('LUPPINO MICHELE','C',144),('','C',145),('STILLITANO SRL','C',146),('FERREDIL DI MANUCRA GEOM.MARIO','C',147),('L & R LABORATORI E RICERCHE SRL','C',148),('EDIL SUD DI MALACRINOALESSIO G.','C',149),('','C',150),('FRESH BLU DI MELISSARI CETTINA','C',151),('BAGALA ROBERTO','C',152),('SERGI ROSALBA','C',153),('CO.MEC. DI VIOLI DOMENICO','C',154),('','C',155),('RADIO FRECCIA NET WORK','C',156),('GIOVINAZZO IPPOLITO','C',157),('ELECTRONIC CENTER DI ZAGARI ROSARIO','C',158),('EMPORIO ROGGIO GIUSEPPE','C',159),('','C',160),('CALAFIORE ANTONIO','C',161),('PARRELLO GIUSEPPE','C',162),('RUGGERI & PIAZZA SNC','C',163),('FRESCHEZZA IN TAVOLA DI FOTI ROSA','C',164),('','C',165),('AUGIMERI CARMINE AUTOFFICINA','C',166),('MATTIANI DOMENICO','C',167),('CALDERAZZO GIANCARLO','C',168),('ROMANIN ELVIO STUDIO COMMERCIALE','C',169),('','C',170),('G.TRIPODI SRL','C',171),('DEDMONDO FRANCESCO','C',172),('IDROCAR DI IANTORNO MARIO','C',173),('ZAGARI PAOLO IMP.ELETTRICI','C',174),('','C',175),('SELF AREA AGIP \"LA SOSTA S.A.S.\"DI','C',176),('MARKET MIMMO DI MAMMONE ANNA MARIA','C',177),('OSRAV ALFEO MORET S.P.A.','C',178),('A.S.PALLAVOLO PALMI','C',179),('','C',180),('GN.RISTRUTTUR.DI GANGEMI NICOLA','C',181),('ANNULLATO PRESO PER TRADE EVOLUT','C',182),('PULEIO PASQUALE','C',183),('ROTONDO S.R.L.','C',184),('','C',185),('DOMENICO ORTUSO & C. S.a.s','C',186),('FABIO PIERANGELI','C',187),('EDIL PALMI SAS di CRUCITTI F.SCO &C','C',188),('MLD LOGISTICA E DISTRIBUZIONE SRL','C',189),('','C',190),('HOTEL SANTA CROCE','C',191),('CUBA MOTOR','C',192),('CENTRO SERVIZI AUTO DI FURFARO','C',193),('TRAS PUGLIA DI SPINA GIUSEPPE','C',194),('','C',195),('LAMINAZIONE SOTTILE SPA','C',196),('FULCO DOMENICO OFFICINA','C',197),('DAMICO MICHELE AUTOFFICINA','C',198),('CAPRARI ADRIANO','C',199),('','C',200),('FARINA ANTONIO','C',201),('CALABROROSARIO DOMENICO','C',202),('NUOVA CASALAUTO DI CREPALDI GIAN','C',203),('AS TAUREANA CARS DI PALMA FEBBO','C',204),('REPACI TEODORO TRASPORTO MERCI','C',205),('GIEMME IMPIANTI DI IANNELLO MICHELE','C',206),('MUSICO S.R.L.','C',207),('GULLI CARMELO','C',208),('CASCIANO GIACOMO','C',209),('MARKET MARTURANO LETTERIO','C',210),('FOGLIARO FORTUNATO & C. SNC','C',211),('RAVAGLI VITTORIO FERRAMENTA UTENS.','C',212),('GRIMI AUTO DI GRIMI DOMENICO SNC','C',213),('BARONE DOMENICO','C',214),('RANUCCIO SONIA AZIENDA AGRICOLA','C',215),('A.B.COMPUTING DI BAGALAANTONIO','C',216),('GIOIA CAR SRL','C',217),('TOTO MONTAGGI DI MARINO ANTONIO G.','C',218),('GEOM.GIUSEPPE OLIVERI','C',219),('IMPRESA COSTR.EDILI CILONA G.PPE','C',220),('TERMOIDRAULICA DI TALLARIDA G.PPE','C',221),('RIGHETTINI EMANUELE','C',222),('CM INDUSTRIE SRL','C',223),('AUTOGOLD DI DE SANCTIS G.','C',224),('RIGON GIAN CARLO AUTOTRASPORTI','C',225),('IMPIOMBATO ANTONINO','C',226),('I.F.E.S.DI CUTRI GIUSEPPE','C',227),('COMPANIE DHOTELLERIE SUISSE SRL','C',228),('LARTE DEL FALEGNAME SNC','C',230),('AUTOSERVICE 2000 SAS','C',231),('SERVICE RICAMBI E ACCESSORI DI','C',232),('CAPPONE MICHELE LAV.VETRI','C',250),('COLELLA FRANCECSO','C',251),('LA PIANA SNC DI BARBARO ANGELINA','C',252),('SURACE GIANFRANCO','C',253),('EDIL CERAMICHE PALMI DI SCHIPILLITI','C',254),('AGOSTINO ROMEO SRL','C',260),('SGROFRANCESCO','C',261),('IMPRESA EDILE DI CERAVOLO GIUSEPPE','C',262),('FICARRA ROBERTO IMPRESA EDILE MOV.','C',263),('CAR SERVICE DI GALLO DANIELE','C',264),('LAGRICOLA DI BALDO FRANCESCO & C.','C',265),('ARENA VINCENZO','C',266),('ROMEO MARIA','C',267),('BERTIM EDILIZIA E COSTA SRL','C',268),('ITALIA TRASPORTI E LOGISTICA SRL','C',269),('STUDIO DI PROGETTAZIONE ARCHITETTO','C',270),('CALOGERO SALVATORE','C',271),('CANANZI AUTO','C',272),('OLEIFICIO BORGESE FILOMENA','C',273),('ASSOCIAZ.DI VOLONTARIATO PRESENZA','C',274),('IPO S.R.L.','C',275),('SMAC SNC & C. DI MERCURI SALVATORE','C',276),('MODAFFERI MICHELE ELETTRAUTO','C',277),('ROMEO FORTUNATO','C',278),('BAR BRUZZESE FRANCESCO','C',279),('AUTOFFICINA MARCELLO GULLI','C',280),('SCAVA ROSARIO','C',281),('CASELLA DOTT.MARIO DOMENICO','C',290),('SAFFIOTI ROCCO','C',999),('POINT CAR SERVICE SAS','C',1000),('AUTORICAMBI PRAIA SAS DI UGO','C',3001),('AUTOF.CATANANTI DI DIBIANCO GIOV.NI','C',3002),('AUTOPIU DI GRIFFO V.&.C. sas','C',3003),('ARMENI AUTO DI ARMENI ANDREA & C.','C',3004),('LA BELLA ROBERTO','C',3005),('TERMOIDRAULICA DI IANNINO SOCCORSA','C',3006),('AUTOBUDA DI ZAPPIA ANTONELLA','C',3007),('BELCASTRO ROSARIO R.B.AUTOR.','C',3008),('PNEUSERVICE SRL','C',3009),('AUTOFORNITURE MILANESI SPA','C',3010),('ORTOLANI CARLUMBERTO','C',3011),('AZZARA CARMELO','C',3012),('AUTOSILA S.R.L.','C',3013),('ATTISANO MICHELE','C',3014),('AMMENDOLA GIUSEPPE','C',3023),('ANNULLATO AUTOPARTS DI FIEROMONTE T','C',3026),('CENT.TELEFONIA DE PASCALE DANIELA','C',3027),('TYRE HUNTER DI CANTISANI CARMINE','C',3028),('AUTOFFICINA AMMENDOLA DEMETRIO','C',3029),('CENTER CAR S.R.L.','C',3032),('MACELLERIA DI BARBERA FRANCESCO','C',3101),('BLEVIO PIETRO','C',3103),('AZIENDA AGRICOLA SURACE GIUSEPPINA','C',3104),('C.F.S.CARRELL FULL SERVICE DUE sas','C',3106),('IMPRESA COSTRUZ.GEOM.CIAPPINA F.SCO','C',3107),('BELLISSIMO ANTONIO','C',3108),('BARBARO GIUSEPPE DITTA','C',3111),('BARILLARI GABRIELE AUTORICAMBI','C',3112),('BORGESE GIUSEPPE','C',3113),('BARA GIUSEPPE OFF.& RICAMBI','C',3114),('AUTO IARIA S.R.L.','C',3115),('TRIPODI GEOM.ANTONINO IMPRESA EDILE','C',3120),('BARRECA DEMETRIO','C',3129),('BOVA VINCENZO','C',3139),('BRUNO AUTORICAMBI S.a.s.','C',3145),('CILIONE & C. SRL','C',3200),('CANDIDO GIULIO','C',3202),('LUDDENI MARIO MARKET DEL RIC.','C',3205),('RIOTTO SAVERIO','C',3207),('MOTORSPORT DI CIRICOSTA G.PPE','C',3209),('CE.D.R.A. DI CUCUNATO NATALE','C',3211),('S.D.S. CARBURANTI S.A.S.','C',3215),('TURANO G.PPE & C.snc AUTORICAMBI','C',3216),('CILIONE CONSOLATO !! SOSPESO !!','C',3217),('PUGLIESE ERNESTO','C',3219),('CALABRO LORENZO','C',3220),('LAGANADOMENICO','C',3222),('ANNULLATO INVIATO A TETI A.','C',3224),('AUTO SERVICE DI IOPPOLO G.GIULINO','C',3226),('TRIPODI FORTUNATO','C',3228),('COMEDIL DI P.SGRO & C. sas','C',3232),('SGROORLANDO AUTORICAMBI','C',3234),('DOTT.PALMIRO ZAPPONE','C',3236),('POLIRICAMBI SRLS','C',3240),('ROCCHETTO RENATO','C',3241),('CURRA ANTONINO','C',3242),('COLOSI FRANCESCO INFISSI IN','C',3244),('CUORE ANTONIO','C',3245),('GRAMUGLIA DOMENICO OFF.MECC.','C',3246),('CALIO srl RICAMBI AUTO','C',3248),('COZZA ELIO','C',3252),('OERRE PARTS S.R.L.','C',3257),('EURODIESEL DI CASSALIA MAURIZIO','C',3262),('@ 2X INSTALLAZIONI DI PUGLIESE A.','C',3263),('TECNO TRADE SRL','C',3265),('CROCCO FRANCO','C',3267),('CARTELLA MASSIMO','C',3269),('SCARMATO FORTUNATO','C',3275),('C.M.G. BRAM SRL','C',3278),('CARONZOLO ROSARIO','C',3279),('CALIPARI SERAFINO','C',3286),('EDIL DORA DI BRUNO ROMEO','C',3294),('EXIDE TECHNOLOGIES SRL','C',3295),('IL TEMPIO DEL RIC.DI GIORDANO LUIGI','C',3301),('OFFICINA DE GRAZIA SAS','C',3302),('REGALI E SORRISI DI GUERRERA D.CO','C',3304),('UNIFLUID SUD SRL','C',3305),('CONSORZIO PDA','C',3307),('SURACE ROCCO','C',3308),('DITTA CILONA VINCENZO','C',3309),('DAGOSTINO AUTORICAMBI','C',3310),('DATTOLA AUTO & C. snc','C',3312),('DE NISI DOMENICO','C',3315),('IMPRESA COSTRUZ.SIMONETTA VINCENZO','C',3316),('AUTORICAMBI E ACCESSORI DI MARZIA','C',3317),('CHIAPPALONE ANNUNZIATO','C',3319),('EUROPA RICAMBI DI DE MARIA CARLO &','C',3320),('BRUZZESE FRANCESCO','C',3323),('DE GREGORIO SRL','C',3325),('LOGATTO VINCENZO V.L AUTORICAMBI','C',3326),('TARUSCIO GIOVANNI','C',3331),('TODARO SAVERIO','C',3334),('FERRARO LUIGI','C',3403),('AUTORICAMBI ERRIGO C.& C. S.A.S','C',3404),('PISANO GAETANO','C',3409),('AGRINOVA DI CORRADO NICOLA','C',3501),('FE e SA & C. DI SANTORO B. sas','C',3502),('CAR SHOP AUTORICAMBI','C',3503),('BRIGA LUCIANO','C',3504),('FIDALE GIACOMO & C.sas CAR SERVICES','C',3505),('FERRERO MASSIMILIANO IF.AUTORIC.','C',3506),('ASSOCIAZIONE RADIOAMATORI ITALIANI','C',3507),('FALBO ANTONIO','C',3508),('DAGOSTINO BIRRE DI GINO','C',3510),('FULLONE MARIO','C',3512),('EMMEDUE COSTRUZIONI','C',3514),('PALMCART OLIVERIO GIUSEPPE','C',3516),('BORGESE RANIERI & CLAUDIO SNC','C',3519),('FUTIA SALVATORE','C',3522),('FRANCHINA MASSIMILIANO Autoricambi','C',3523),('FUTIA DOMENICO Ricambi Auto','C',3525),('IMPRESA EDILE SCHIPILLITI V.ZO','C',3526),('MEDITERRANEA TRASPORTI SOC.COOP','C',3527),('AGENZIA LOGISTICA MERIDIONALE','C',3528),('RAGO UMILE RICAMBI-OFFICINA','C',3531),('SE.MA.C. SRL','C',3534),('IMPRESA EDILE GAGLIOSTRO V.ZO','C',3541),('FIGLIUZZI SALVATORE','C',3544),('FRAGOMENI DOMENICO','C',3548),('FIEROMONTE & CHIAPPALONE sas','C',3551),('F.T.R. F.LLI TRIULCIO SRL','C',3553),('GIORDANELLI SERGIO','C',3602),('F.LLI GUIDA sas','C',3603),('GRILLO GIUSEPPE','C',3604),('GALLO STANISLAO MANGIMI CONCIMI','C',3605),('COARSA SOC.CONS.IMP.SANLURESI SRL','C',3606),('PASCHOU MARIA','C',3607),('PELLEGRINO PIETRO ROCCO AZIENDA','C',3608),('ROSANNA EX GRM RICAMBI','C',3609),('INDUSTRIA BOSCHIVA DICH.STEL.','C',3610),('GILBERTO DROGHETTI DOTT.','C',3611),('GALLE NICOLA','C',3615),('EUROELETTRA S.N.C.DI NICOLOSI &','C',3616),('PALETTA ALBERTO AUTORIC.','C',3617),('GIOFFRE GIUSEPPE','C',3620),('PRINTING CENTER S.A.S.','C',3621),('SUD CARNI DI LEONELLO PASQUALE','C',3622),('GIOVINAZZO AUTORICAMBI','C',3623),('GENCARELLI GIUSEPPE','C',3627),('GRASSO FRANCESCO','C',3631),('GALLO GIOVANBATTISTA','C',3632),('CIESSEGI SNC DI CATOZZA MARIO & C.','C',3639),('AUTOMARKET DI PAPALIA ROBERTO','C',3646),('CENTRO RICAMBI DI MARINO & C.SNC','C',3700),('IMPRESA EDILE RECHICHI GIANCARLO','C',3701),('G.R.RICAMBI SRL','C',3704),('BRUZIA RICAMBI DI HRISCU CARMEN','C',3705),('AUTORIC.IANNI DI IANNI FRANCESCO','C',3706),('ITAL RICAMBI DI IAROPOLI V.& C.sas','C',3708),('INFORTUNA SANTO','C',3710),('IOVINE NICOLA','C',3711),('FILIPPONE ANTONINO','C',3712),('INFANTINO GIUSEPPE ELETTRAUTO','C',3717),('IDA RAG.ENZO','C',3719),('DE MASI PASQUALE DE.CA AUTORICAMBI','C',3800),('CANTIERI NAUTICI COSTA VIOLA','C',3803),('BG.CAFFE DI GIUSEPPE BALO','C',3805),('GUARASCIO LUIGI AUTORICAMBI','C',3806),('GIOFFREGAETANO','C',3807),('CENTRO AUTO MOTO DI LAGANA sas','C',3810),('LONGO CLAUDIO','C',3811),('LAGANA GIOVANNI','C',3814),('EDILDECORO DI FORTUGNO & SAFFIOTI','C',3815),('ATC DI PUGLIESE ALBERTO & C.SAS','C',3818),('LONDINO SERGIO','C',3822),('ANANIA ROCCO & GRILLO F.SCO SNC','C',3825),('FARMACIA FORGIONE DANIELA','C',3827),('AUTORICAMBI RAG.SAVERIO LAGAZZO','C',3828),('SERVICE AUTO SAS CENTRO REVISIONI','C',3829),('MASSARA NICOLA ACCESSORI PER AUTO','C',3832),('FANELLI GIOVANNI','C',3833),('LOIACONO GIUSEPPE','C',3835),('ANNULLATO UTILIZZATO PER IL WEB','C',3843),('ANNULLATO','C',3844),('AUTORICAMBI LAGANAROBERTO DI','C',3845),('ANNULLATO UTILIZZATO PER IL WEB','C',3846),('MELITO GIAMPIERO','C',3901),('MRC RICAMBI S.R.L.','C',3903),('MARONGELLI ANTONIO','C',3908),('MORELLO ANTONIO','C',3911),('M.A.I.R.S.AGATA DI DE BENEDETTO N.A','C',3912),('MONTELEONE MICHELE Autoricambi','C',3913),('FOTI PASQUALE','C',3914),('METALLURGICA RIVORALESE SPA','C',3915),('MARTINO DOMENICO','C',3917),('MALIZIA PASQUALE','C',3918),('DE SIBIO MECCANICA sas DI DESIBIO D','C',3924),('PUBBLIWORLD DI GULLO ANTONINO','C',3926),('MAZZITELLI & TASSONE S.N.C.','C',3927),('LANDRO AUTOMOBILI','C',3928),('MEZZATESTA ANTONIO','C',3931),('MOTOR SHOP Autoricambi sas','C',3932),('REPACI GIOVANNI','C',3933),('MERLINO CARMELO','C',3934),('ONESHOT S.A.S.','C',3935),('MANARITI GIUSEPPE','C',3936),('FESTA LEONA','C',3937),('CB SPECIAL COMPONENTS DI BERTOT','C',3939),('EDICOLA ARCURI LUCIA','C',3942),('LANDRO LEONE','C',3943),('COOPERATIVA REGGINA 08','C',3944),('MUZZI BRUNO','C',3952),('CAMERA ANTONIO','C',3957),('MAMONE GERARDO CENTRO RICAMBI AUTO','C',3961),('MALARA GIUSEPPE','C',3962),('R.C. TUNING DI LORENZO ANTIMO','C',3963),('MAIO CESARE','C',3966),('MACELLERIA LEONELLO SALVATORE','C',3967),('CAMERA DOMENICO','C',3972),('COZZOLINO SAVERIO AUTOPARTS','C',3976),('MARINO GABRIELE & F. sas','C',3978),('SYSTEM SUD SNC','C',3981),('MSC AUTOVEICOLI DI MUSICOARNALDO','C',4001),('GALATI ANTONIO AUTOTRASPORTI','C',4003),('NILAUTO srl','C',4004),('NUCERA FILOMENO','C',4007),('NUCERA MAURIZIO','C',4008),('OTTOBRE TRADE SRL','C',4205),('CONDOLUCI MARIA GIUSEPPA','C',4207),('PUGLIESE SALVATORE RICAMBI AUTO','C',4208),('NOVEMBRE ROSANNA MINUT.E MECC.','C',4210),('CABBOI GRAZIELLA','C',4212),('PETRONAS LUBRICANTS ITALY SPA','C',4213),('PERRI MIMMO','C',4215),('D.SSA ZAPPONE LILIANA','C',4222),('PUPO GIUSEPPE AUTORICAMBI','C',4226),('OFF.MECC.FRATELLI PIRILLI','C',4229),('RACO ELISABETTA RIF.TAMOIL','C',4230),('PICCOLO MARIO AUTORICAMBI','C',4232),('AUTORICAMBI VENTURA VINCENZO','C',4236),('TECNO EDIL DI VIOLA SANTO','C',4242),('PALMA AUTORICAMBI S.R.L.','C',4243),('PULIMENI ANTONIO & C. sas','C',4244),('PALERMO OLIVA Autoricambi','C',4246),('MAX MOTO DI PELLEGRINO M.A.','C',4249),('POLIMENI FRANCO','C',4256),('PEZZANO PIETRO','C',4261),('POLITI FRANCESCO Elettrauto','C',4263),('TROPEANO STEFANO RICAMBI AUTO','C',4303),('ROPERTO ALDO CENTRO COMMERC.RICAMBI','C',4304),('TENUTA GIANFRANCO AUTORICAMBI','C',4305),('F.LLI ROSE Snc di UMILE & FRANCO R','C',4308),('AUTORICAMBI RUGGIERO sas','C',4310),('VIOLA ERMANNO STAZ.SERV.ERG','C',4312),('R.AUTO IN snc','C',4313),('GOMMAUTO DI RODA & C. snc','C',4314),('DECA S.a.s. DI G.PPE DE PASCALI &C.','C',4318),('A.G.C.SRL','C',4320),('NUOVA RIMA DI CAPULA RAFFAELE','C',4324),('CRUCITTI GROUP SRL','C',4325),('INFORAMA DI DENISI V.ZO E C.SAS','C',4328),('EVALTO FRANCESCO & FIGLI','C',4401),('SCHIPANI RICAMBI','C',4404),('SPINA ALEXANDRO','C',4405),('SCUOLA CALCIO VIGOR PALMI 2004','C',4406),('SURIANO ALV SAS','C',4407),('AUDINO SAVERIO','C',4408),('SOBER RICAMBI AUTO sas','C',4409),('ROMEO VINCENZO & C. SNC','C',4411),('SAIM snc DI TAVELLA ANTONIA','C',4414),('SAINATO PASQUALE','C',4415),('SMEC SRL','C',4416),('F.LLI SINOPOLI snc Ric.Auto-Moto','C',4417),('F.LLI SPINELLI snc','C',4418),('AZ.AGR SORGES DI ROSA SORLETI','C',4420),('DUEMME S.A.S.','C',4421),('SPOLETO NUOVA AUTOACCESSORI','C',4422),('LOMBARDO DOMENICO FU GREGORIO','C',4423),('MULTISERVIZI M.G.D. DI PARRELLO','C',4427),('SCIARRONE SPA','C',4429),('SCRIVO ANTONIO','C',4432),('SERRATORE FRANCESCO','C',4440),('ANNULLATO UTILIZZATO PER IL WEB','C',4441),('LA BOTTEGA DEL RESTAURO DI FOTI R.','C',4442),('EREDI SURACE LORENZO di SURACE','C',4443),('S.D.R. sas','C',4446),('SAMA & CODISPOTI SAS','C',4451),('SCIONTI ROCCO Jr.','C',4452),('SOFI PAOLO','C',4454),('SISCA ANTONIO MECCANICO ARTIGIANO','C',4460),('ITALCOGE SPA','C',4463),('ANNULLATO TASSO SAL','C',4466),('BISCARDI LUIGI TUTTO PER LAUTO','C',4501),('B.P.SOLLEVAMENTI di ETTORE BELLINI','C',4502),('TROVATO AUTORIPARAZIONE','C',4506),('TASSONE PASQUALE','C',4514),('LA TIRRENICA DI CAPUA GIUSEPPE','C',4517),('TASSONE sas DI TASSONE GUERINO & C.','C',4521),('TASSO ANTONIO LEONE AUTORICAMBI','C',4522),('MAZZA ANDREA','C',4523),('TORCHIA ANGELO','C',4525),('TAVELLA ANTONIO','C',4533),('ANNULATO','C',4600),('VENTRA SAS di VENTRA VINCENZO & C.','C',4601),('VALOTTA FRANCESCO','C',4606),('VONO S.A.S. DI VONO G.& CO.','C',4607),('MEG DI ROMEO CARMELO','C',4611),('VENTRE AUTORICAMBI DI VENTRE G.PPE','C',4612),('TECHNO BUS SRL','C',4613),('LA FLAVIA DI FILIPPO SPINELLI','C',4614),('VRENNA LUCA MECC.& SICUREZZA','C',4615),('DELIZIE DI CALABRIA S.A.S DI ARENA','C',4621),('GENTILE FRANCESCO','C',4702),('ZICARELLI SALVATORE','C',4704),('ZAPPIA CARMELO','C',4705),('ATTENZIONE ! LA MECCANICA 2','C',5000),('EVA TECH S.A.S.DI DANIELE MEGALIZZI','C',5002),('RESTUCCIA ROSA RITA BOSCH CAR SERV.','C',5003),('PIMEC SRL','C',5004),('DAVIGIUSEPPE','C',5007),('VITETTA ANTONINO','C',5009),('STIL GOMMA DI NINO IANNELLI','C',5011),('ANNULLATO UTILIZZATO PER IL WEB','C',5017),('OFF.MECCANICA ROTONDO ANTONIO','C',5019),('COMBUSTION AND ENERGEY SRL','C',5020),('HOTEL RESIDENCE \"ARCOBALENO\"','C',5022),('BRANDO CARMELO','C',5024),('CASILE ROBERTO','C',5029),('AVVENTURA SOC.COOPERATIVA ARL','C',5035),('RA.DI SRL','C',5036),('CENTRO GOMME DI CONDINA GIOVANNI','C',5040),('JOLLY FRUTTA DI PAPASERGIO ANGELA','C',5043),('SURACE ANTONINO','C',5055),('FORTEBUONO METALLINFISSI S.r.l.','C',5056),('BAGALAGIUSEPPE','C',5057),('CASEIFICIO IL GRANATORE DI ZAGARI','C',5060),('RUSSO GAETANO AUTORICAMBI','C',5062),('RAFFAELI SRL','C',5073),('ALESSI PINA IMPRESA EDILE','C',5075),('ERREBI SRL','C',5076),('LA CORTE DELLA CARNE DI PEPPINO','C',5078),('MANOCCIO GENNARO','C',5084),('DE CARIA MOTORS SRL','C',5085),('DOTT.MARCELLO MELARA','C',5087),('F.LLI ATTISANO SRL ORTOFRUTTA','C',5088),('GIOFFRE PASQUALE','C',5089),('M.G. LOGISTIES SERVICES SRL','C',5091),('CONSORZIO ACQUEDOTTO VINA','C',5094),('MD COLLECTION DI MARRA DOMENICO','C',5100),('CRUCITTI SRL','C',5101),('VITALONE ROCCO OFF.MECC.','C',5102),('MOTORCYCLE & AUTO REPAIRS','C',5107),('QUASED SRL','C',5108),('CADI SERVICE S.A.S.','C',5110),('CO.DI.M. SRL','C',5114),('LEUZZI GIANCARLO','C',5115),('SCUTERI FRANCESCO','C',5116),('DI PINO TINDARO AUTORICAMBI','C',5117),('COMUNE DI SEMINARA','C',5123),('MATINA DOMENICO','C',5125),('ACCARDO ANNUNZIATO FILIPPO','C',5127),('BOLIGNANO ROBERTA DONATELLA','C',5131),('EVENTI FIORITI DI ROBERTA ANGALO','C',5132),('RAZIONALE ROSARIO HIPPONIO AUTO EL.','C',5133),('ERREMME di ROMEO DOMENICO MASSIMO','C',5134),('MAXICAR DI A.TRICOMI','C',5136),('MONTELEONE MARIA MADDALENA','C',5141),('REGGIORICAMBI DI MICHELANGELO','C',5142),('IL GENIO DEL PANE DI GARZO GREGORIO','C',5143),('ANNULLATO UTILIZZATO PER IL WEB','C',5144),('DAL MASO GIADOMENICO','C',5146),('RIZZITANO ANTONINO','C',5147),('MAURO AUTORICAMBI DI BADAMI MARIA','C',5150),('EDIL QUATTRO DI SAPONE G.& C. SNC','C',5151),('MARIA MADDALENA SICA','C',5163),('CILONA ANTONINO','C',5164),('MAGAZZU ARREDAMENTI','C',5165),('BORGESE VINCENZO','C',5166),('ARCHIMEDE DI MATTIANI PASQUALE','C',5169),('BAR RISTORANTE ULIVARELLA','C',5174),('CENTRO RICAMBI CALABRESI SNC CRC','C',5178),('PINNERI ANTONINO','C',5179),('F.LLI SCORDAMAGLIA S.N.C DI F.SCO','C',5182),('PANUCCIO ING.DOMENICO IMPR.COSTRUZ.','C',5183),('LOMBARDO ALLESTIMENTI','C',5195),('BOSCHETTO FRANCESCO ELETTRAUTO','C',5198),('PONTECOPROGES SRL','C',5199),('G.C.SERVICE DI GAGLIOSTRO CARMELO','C',5203),('PELLICANO S.R.L.','C',5208),('MACELLERIA DA ROCCO DI PRONESTI','C',5209),('MAGNETI MARELLI AFTER MARKET PARTS','C',5210),('IL POLLICE VERDE DI FARFAGLIA','C',5212),('COMUNE DI PALMI','C',5215),('BARA MOTO DI BARA FABIO','C',5225),('SAFFIOTI MASSIMO EMILIANO','C',5226),('LOIACONO GIULIO','C',5231),('SETTECERZE VINCENZO','C',5232),('BAGNOLI ROBERTO ELETTRAUTO','C',5234),('ALAMPI SALAVATORE IMPRESA EDILE','C',5236),('PANETTA CARLO','C',5239),('MYPLANET SRL','C',5240),('AUTO 3 snc F.LLI ARTESI','C',5241),('MATTIANI GIUSEPPE','C',5243),('ASP N.5 DI REGGIO CALABRIA','C',5244),('CANNIZZARO GIUSEPPE','C',5246),('SORICAL SPA','C',5248),('ROSACE GIUSEPPE','C',5249),('MOTORSPORT SNC DI SALVATI G.PPE & C','C',5250),('SLESC-SCHITRY DI SCHIPILLITI C.LO','C',5251),('LAURENDI GIOVANNA','C',5252),('OFF.MECC.GANGEMI DOMENICO','C',5253),('CUSAN di SANTORO & C. snc','C',5256),('MAISANO MARIANNA EURORICAMBI','C',5259),('NICOLI SANTINO ASS.PIAGGIO','C',5260),('ELETTROSISTEM DI LAFACE GIUSEPPE','C',5261),('F.LLI CAPOGRECO snc','C',5263),('COSENTINO FRANCESCA','C',5264),('TERMINE CLAUDIO AUTORICAMBI','C',5266),('CHIRICO PAOLO','C',5267),('MERCURI VINCENZA','C',5268),('AZIENDA AGRICOLA BIVONE MARIA','C',5269),('ANDREARCHIO ALESSANDRO','C',5271),('SICILIANO PASQUALE','C',5272),('APEIRON S.A.S DI F.SCO BARONE & C.','C',5273),('STAR SERVICE PICCOLA SOC.COOP.ARL','C',5274),('ZOCCALI ANTONIO','C',5276),('CONDELLO MARCO ALIMENTARI','C',5278),('MARTINO PAOLO PIETRO','C',5279),('PRELIBATEZZE DI RITA ARICO','C',5280),('AMORUSO LUIGI SRL','C',5281),('MAZZULLO LUCIANO','C',5282),('POLIAUTO DI POLIZZO UMILE','C',5286),('RIGANOFRANCESCO','C',5289),('AMBROGIO GIUSEPPE','C',5290),('ISOTERM DI VIGLIANTE GEOM.D.CO','C',5296),('MACELLERIA MICHELE LUPPINO','C',5297),('MARTORANO PASQUALE','C',5299),('TECNOVIDEO DI LAGANA','C',5301),('ASSIST.RENAULT ARCISIACONO ORAZIO','C',5302),('AUTOSERVICE MINNITI S.A.S.','C',5305),('CRO.MAR TRONIC DI G.MARZULLO','C',5308),('CRD SRL','C',5310),('VALENTE PNEUMATICI srl','C',5312),('SPADA AGOSTINO','C',5316),('RAMONDINO MARCO','C',5317),('SHOPSTORE SRL','C',5319),('LOIACONO ANNALISA','C',5321),('COLLURA ALESSANDRO','C',5324),('AP.RICAMBI DI PLUMARI ANTONINO','C',5325),('CENTRO DIAGNOSI DI GRAZIANO','C',5326),('MILITANO FRANCESCANTONIO','C',5327),('EUROSERVICE 2000 DI GIANLUCA CIMINO','C',5329),('CELESTI PIETRO ELETTRAUTO','C',5336),('AUTORICAMBI GABRIELE DI GABRIELE','C',5337),('JONICA RICAMBI SNC DI MUSCOLINO E','C',5338),('THE BEST AUTORIC.S.A.S.DI GALLO','C',5339),('VOLPE CARMELA OFF.RICAMBI AUTO','C',5341),('LOCCASIONE snc di PELLICANO P & C.','C',5342),('AZ.AGR.CARMELITANO MATTEO','C',5343),('PRISCOGLIO GIUSEPPE FRANCESCO','C',5344),('ANNULLATO INVIATO A motorline','C',5347),('PUTRINO DOMENICO STUDIO DI GEOLOGIA','C',5348),('CAPUTO NATALE AUTORIC.','C',5350),('SPORTAUTO di GAGLIOSTRO VINCENZO','C',5355),('ZERBI FABIO','C',5357),('ARICONATALE','C',5358),('VALOTTA LEOLUCA OFF.ELETTROMEC.','C',5360),('BARBARO CONCETTA LUCIA','C',5361),('PENNESTRILUIGI OFF.MECC.','C',5364),('RETTIFICHE MANNINO SRL','C',5366),('SPAGNOLO DOMENICO','C',5373),('AUTORICAMBI DLC DI ABOSSIDA G&C sas','C',5375),('AMBROGIO DOMENICO','C',5376),('BENEDETTO STEFANO','C',5377),('NICOLETTA GIUSEPPE','C',5378),('ESSERICAMBI DI ANNA MARIA SCHIRRIPA','C',5379),('DOTT.DOMENICO FARERI','C',5383),('V.I.M.A.R. SAS','C',5384),('AUTORICAMBI \"RUGGERI\" DI C.&D.CAR','C',5385),('ICOREL DI IERACE ROBERTO','C',5386),('S.G.AVIATION SRL','C',5387),('SUPERMERCATO PRINCI SAS','C',5388),('CALABRIA LUCIANO AUTORICAMBI C.D.R','C',5389),('MISALE GIUSEPPE','C',5390),('LASCALA DOMENICO','C',5393),('DELIVERY EXPRESS DI NUCARA A.','C',5394),('CUCCI FERDINANDO AUTORICAMBI','C',5402),('LENTINI MONTEDORO AUTORICAMBI','C',5407),('BORGESE CARMELO','C',5408),('TECNOSTUDIO DI ZACCURI GIOVANNI','C',5409),('SOC.COOP.ARCOBALENO A.R.L.','C',5411),('DE.SAL.CAR. DI DE SALVO ROBERTO','C',5412),('PM 2 DI MILITANO NATALE','C',5416),('EURO CAR DI BARONE ANTONINO','C',5417),('ROSINA ANTONINO','C',5418),('PALMERI MICHELE','C',5419),('S.D.CAR DI SALVATORE DOMENICO','C',5421),('CENTRO RICAMBI MINNITI','C',5422),('A.B.S. AQUILA BROADCASTING SETS','C',5424),('EDIL CASA DI DANDREA DOMENICA','C',5427),('RICAMBI 2000 S.N.C. DI LAGONIA &','C',5428),('KRIOS AC S.R.L.','C',5429),('MUSICO ANTONINO','C',5430),('NSA NUOVI SERVIZI AUTO S.P.A','C',5432),('FRAMEL SRL','C',5433),('ANNUL.LA BELLA FRANCESCO','C',5434),('IMPIOMBATO ANTONIO','C',5435),('ALFIERI SALVATORE','C',5436),('PASTIFICIO LANTICO MULINO','C',5437),('RICAMBI INDUSTRIALI S.R.L.','C',5438),('ANNULLATO INVIATO A CARPOINT','C',5439),('BARBIERI AUTORICAMBI di COSMA','C',5440),('SGRO GIUSEPPE','C',5441),('GIOIA HOSPITAL','C',5442),('AUTORICAMBI MAMONE PEPPINO','C',5444),('LA SOSPENS LIDO DI GABRIELE PIETRO','C',5445),('MICHELE SURACE DOTT.COMMERCIALISTA','C',5446),('CERENZIA GAETANO','C',5447),('BARBARO CARMINE','C',5448),('CALANNI RINDINA SPRINT AUTORICAMBI','C',5449),('ALAMPI SANTO','C',5450),('GIDAR srl','C',5451),('MARTELLI GIUSEPPE','C',5452),('OFF.MECC.BARBERA MATTEO','C',5453),('MARIANO GAETANO RIC.OFF.GOMME','C',5454),('CANNISTRA FRANCESCO','C',5455),('PIZZINO GIUSEPPE','C',5456),('GRIPPAUDO VINCENZO','C',5457),('SCANDURRA TIZIANA DIMENSIONE AUTO','C',5458),('AUTOSHOP S.R.L.','C',5459),('AUTORICAMBI DIANA ROBERTO & C.SAS','C',5460),('OLIVERI FRANCESCO','C',5461),('COSENTINO VITTORIO','C',5462),('C&P CERTIFICAZIONI S.R.L..','C',5463),('AR.RICAMBI SNC ARUTA SALV.& SANDRO','C',5464),('MAZZA ANTONIO','C',5466),('GANGEMI GIUSEPPE','C',5467),('STUDIO LEG.AVV.PELLEGRINO PASQUALE','C',5468),('OLIVERIO GIOVANNI','C',5469),('CASTAGNA PASQUALE AUTORICAMBI GOMME','C',5470),('GRAFIA PUBLICITA DI CIPRI GIUSEPPE','C',5471),('SAIJA ANGELO','C',5472),('CILIBERTO RENATO','C',5473),('CATANZARO SALVATORE','C',5474),('EUROAUTO srl','C',5475),('AGENZ.VIAGGI E TURISMO DE NICOLA','C',5476),('LA CONCORDIA SNC','C',5477),('MACOS srl','C',5478),('SIC.COM. S.A.S.','C',5479),('DONATO DANIELE AUTOR.','C',5480),('TROPICAL FRUIT DI LUPPINO FRANCESCO','C',5481),('SCIARRONE VINCENZO RICAMBI','C',5482),('CLIMAUTO DI TRAPASSO GIUSEPPE SNC','C',5483),('DABATE ORAZIO C.R. CENTRO RICAMBI','C',5484),('LB RICAMBI AUTO SAS','C',5485),('FAR.O.L.RICAMBI srl FAROL','C',5486),('CAPRINO ANTONIO AUTORICAMBI','C',5487),('MEGNA ANTONIO','C',5488),('MARINCOLO SERAFINO ELETTRAUTO','C',5489),('TECNORICAMBI SNC','C',5490),('PRESTIPINO SALVATORE','C',5491),('COSENTINO GIUSEPPE','C',5492),('SANTORO ANTONINO','C',5493),('R.S.STORE SRL','C',5494),('DE LUCA SERVICE DI DELUCA F.SCO SAS','C',5495),('AUTORICAMBI BRUNO SERGIO','C',5496),('INDUSTRIAL POINT S.R.L.','C',5497),('ANNULLATO PRESO PER IL WEB','C',5498),('MORABITO LEONARDO ITALRICAMBI','C',5499),('PENNA ANTONINO IMP.AGIP 8898','C',5500),('CARUSO ROCCO','C',5501),('COMPUTER & INTERNET DI FORTUNATO','C',5502),('IGRO SUD DI MERCURI GIANCARLO','C',5503),('PISANELLI SANTO','C',5504),('PISANO ANTONIO','C',5505),('RUFFO GELSOMINA GFC AUTORICAMBI','C',5506),('SUORE SALESIANE DEI SACRI CUORI','C',5507),('ALPA AUTO S.R.L.','C',5508),('ESPOSITO LORENZO','C',5509),('GAGLIOSTRO STEFANO','C',5510),('SIRIO AUTORICAMBI DI UFRASCATI G.','C',5511),('ELETTRAUTO AMATO FAUSTO','C',5512),('ALBANESE GIUSEPPE','C',5513),('ANNULLATO PRESO PER IL WEB','C',5514),('RI.A S.R.L.','C',5515),('AUTOFORNITURE TINO DAGATE','C',5516),('GLORIOSO ADRIANO','C',5517),('AUTORICAMBI ITALIANO di CURCURUTO','C',5518),('AUTOFORNITURE GULLOTTA','C',5519),('MANGIARRATTI EMANUELE IDROTEC','C',5520),('DOMINICI SRL','C',5521),('C.R.A.E.di DI BENEDETTO PROVVIDENZA','C',5522),('SPADA CARMELA SRL','C',5523),('LOMBARDO GIUSEPPE','C',5524),('MANOLA SALVATORE SA.MA','C',5525),('FARACI RAFFAELE TUTTAUTO','C',5526),('AUTORICAMBI CIARCIA CARMELO','C',5527),('MESSINA GIUSEPPE','C',5528),('AUTORICAMBI MEGARA SNC','C',5529),('MOTORPOINT SRL','C',5530),('ANASTASI GIOVANNI','C',5531),('AUTORICAMBI G.S.di SCOZZARICARLO','C',5532),('MA.DI.DI snc AUTOMARKET 2000','C',5533),('R.A.V. DI SORRENTINO LUIGI S.A.S','C',5534),('SA.MA RICAMBI DI SALAFIA MAURO','C',5535),('O.R.A. SPALLITTA & C. snc','C',5536),('TUTTAUTO ALBERGHINA GIANFRANCO','C',5537),('VINCI CONCETTO AUTOTECNICA AUTOR.','C',5538),('ANULLATO UTILIZZATO PER IL WEB','C',5539),('GIANNUSO GIOVANNI','C',5540),('CE.RI. DI CATANIA BIAGIO & C. SAS','C',5541),('ILARDI MARGHERITA & C. SNC','C',5542),('PUNTO RICAMBI SRL','C',5543),('NIGRELLI LUIGI','C',5544),('A.R.A.T. DI MARIO DI GIOVANNI','C',5545),('DILIBERTO AUTORICAMBI','C',5546),('DI COSTA S.R.L.','C',5547),('C.R.SERVICE SRL','C',5548),('ALOISI ANTONIO','C',5549),('PAONE RICAMBI DI PAONE G. SAS','C',5550),('FERICAM DI PISU FEDERICO','C',5551),('SANTOCONO & C. R.A.I.E.snc','C',5552),('VESPO SALVATORE','C',5553),('AUTORICAMBI MOTTA srl','C',5554),('GRASSO & FIGLI sas DI GRASSO D.e C.','C',5555),('VECCHI SNC','C',5556),('F.LLI CHIARAMIDA AUTORICAMBI sas','C',5557),('FUTURA RICAMBI DI SCACCIAFERRO','C',5558),('COSENTINO F.e G. snc','C',5559),('FENECH AUTORICAMBI srl','C',5560),('SAMMITO ANGELA','C',5561),('CENTRO RICAMBI SRL','C',5562),('AUTORICAMBI STRANO SRL','C',5563),('SURIANO PAOLO','C',5564),('AUTORICAMBI GLORIOSO srl','C',5565),('VECAM DI OLIVELLI VENERANDO E C.snc','C',5566),('MEC.CARS RICAMBI DI SCIALFA G.PPE','C',5567),('PENNISI AUTO DI G.PENNISI','C',5568),('AUTORICAMBI MAGGIO GIUSEPPE','C',5569),('GRILLO NICOLA AUTOFORN.','C',5570),('AUTORICAMBI TROGYLOS SRL','C',5571),('PRIVITERA STEFANO','C',5572),('AUTOFFICINA M.A.&.V S.a.s di OSCAR','C',5573),('IEMMOLO VINCENZO','C',5574),('GENNUSA GIUSEPPE AUTORICAMBI','C',5575),('C.R.A. Snc di Salvatore Tanasi & C.','C',5576),('F.LLI MUSARRA sas','C',5577),('S.G.R. DI ROSANO V.ZO & C. sas','C',5578),('ADAMO ROBERTO','C',5579),('ELIOS AUTORICAMBI SRL','C',5580),('DIEMME SRL','C',5581),('NUZZO FILIPPO','C',5582),('AUTOR.FISICARO DI FISICARO FILIPPO','C',5583),('CENTRO RICAMBI DESARI GIUSEPPE','C',5584),('AUTORIC.PROFETA DI PROFETA ONOFRIO','C',5585),('MARTUCCI REMO AUTORICAMBI','C',5586),('CHECKS SRL','C',5587),('AUTOETNA DI INTRESSALVI M.& C. snc','C',5588),('FRICANO ROBERTO & C.RI.AS.sas','C',5589),('GAGLIARDI VALENTINO','C',5590),('MICIELI SALVATORE SNC','C',5591),('GIARDINA GIOVANNI','C',5592),('BOCCHIARO GIUSTO & C. snc','C',5593),('R.D.C. DI VALERIA FILI','C',5594),('PALAZZOLO GIUSEPPE','C',5595),('CARILLO MARTINO AUTORICAMBI','C',5596),('AUTORIC.FAVUZZA SOC.COOP.','C',5597),('F.LLI RUSSO DI GAETANO RUSSO & C','C',5598),('DI.R.MEC SRL','C',5599),('AUTOCOMPONENTI COSENTINO','C',5600),('OLIVERI FRANCESCO AUTORICAMBI','C',5601),('PULIZZI GIOACCHINO','C',5602),('AUTORICAMBI RIITANO DOMENICO','C',5603),('FARRUGGIO BIAGIO','C',5604),('DISTEFANO M.& PELLEGRINO A. S.N.C.','C',5605),('SORTINO S.r.l.','C',5606),('B.R.M. di MARINELLI G.PPE & C. snc','C',5607),('C.A.R. DI CAMPISI ISABELLA','C',5608),('ARENA SRL','C',5609),('AUTOMECHANIKA SRL','C',5610),('PRECAV S.N.C. DI CAVALLARO ROSARIO','C',5611),('COIR srl','C',5612),('DI BELLA SERVICE','C',5613),('GARDEN BAR RACITI PAOLA & C. SNC','C',5614),('TUTTORICAMBI snc DI MUSCIA V.& G.','C',5615),('RICAS RICAMBI E ACCESSORI DI','C',5616),('DI PIETRO AUTOSERVICE DI PIETRO C.','C',5617),('EUROPARTIAUTO DI COCO CARMELO','C',5618),('AUTORICAMBI ODDO CARMELO','C',5619),('LAUTORICAMBI SRL','C',5620),('CUNSOLO MARIO AUTORICAMBI','C',5621),('AUTORICAMBI GRECO FINA','C',5622),('CORRADO CASALE SNC','C',5623),('R.A.I.A.R. srl','C',5624),('CASA DEL RADIATORE','C',5625),('CENTRO CLIMA SNC','C',5626),('SCARLATO SALVATORE ELETTROCAR','C',5627),('VIOLA FRANCESCO','C',5628),('CENTRORICAMBI NIGRO srl','C',5629),('MASTROGIOVANNI SRL','C',5630),('F.LLI PIZZA SNC','C',5631),('VIOLI CARLO','C',5632),('AVV.CARMELA CLEMENTE','C',5633),('DE CARIA ROCCO AUTORICAMBI','C',5634),('DIESEL TRUCKS DI SCADUTO ANGELO','C',5635),('MESSINA FILIPPO AUTORICAMBI','C',5636),('ERRECI DI RAFFAELE CANTAFIO','C',5637),('DOTT.GIUSEPPE FAVIA GUARNIERI SRL','C',5638),('ROSSETTI ALESSANDRO','C',5639),('STAZIONE DI SERVIZIO MANGANI','C',5640),('RONDINELLI GIOVANNI BATTISTA','C',5641),('DALTORICAMBI SRL','C',5642),('CORDIANO MARCELLO','C',5643),('EURORICAMBI DI TUSCIANO GIUSEPPE','C',5644),('AUTORIPARAZIONI IORI SNC.DI GRASSI','C',5645),('RI.CAR. srl','C',5646),('CAPPARELLI FRANCESCO','C',5647),('TUTTO MARMITTE DI BORSELLINO TANINA','C',5648),('PUGLIESE ANTONINO','C',5649),('AUTOFFICINA FUDA DI','C',5650),('TUTTO RICAMBI DI PRIOLO MARCO','C',5651),('LUCKY BAR RUGARI & GALLETTA S.A.S','C',5652),('ROCCAFORTE EURORICAMBI','C',5653),('CENTRO MIDAS REGGIO CALABRIA','C',5654),('BELLANTONI VINCENZO','C',5655),('AUTOFFICINA MISIANO SALVATORE','C',5656),('DEMASI GIUSEPPE','C',5657),('DIESELTRUCK DI ALFANO FABIO','C',5658),('ARIGANELLO MASSIMO AUTORICAMBI','C',5659),('MI.RA. RICAMBI SAS MIRA','C',5660),('AGF SICILIA srl','C',5661),('MOLISE RICAMBI di A.Tamburri SNC','C',5662),('GARANZIA EUROPA GROUP SPA','C',5663),('FORESTIERI BRUNO ITALTRONYC','C',5664),('MORABITO VITO','C',5666),('MORABITO SALVATORE','C',5667),('LA MECCANICA SRL','C',5668),('GENNARO CACCIAPUOTI','C',5669),('PALAMARA GIUSEPPE PIT STOP','C',5670),('POLITO CARBURANTI DI ROCCO POLITO','C',5671),('STAZ.SERV.AGIP DI FRUCI GIUSEPPE','C',5672),('MARTINO SRL','C',5673),('SCHIPANI MARIANGELA AUTORICAMBI','C',5674),('AUTO VIP SRL','C',5675),('VECCHI GIUSEPPE RICAMBI','C',5676),('FARNO FULVIO & S. snc','C',5677),('CIRIMELLI AUTORICAMBI DI SAVERIO P.','C',5678),('IL CANNETO TAMOIL DI POLITO A. SAS','C',5679),('CARDINALE AUTOMOBILI SRL','C',5680),('D.R.A.M. snc','C',5681),('MANCUSO ILARIA AUTORICAMBI','C',5682),('COTRONEO DOMENICO','C',5683),('GRANATA F.CO F.G. AUTORICAMBI','C',5684),('RE.MA.DI ESPOSITO R.& BELSITO M.SRL','C',5685),('STAZ.SERV.AGIP DI BAGNATO SALVATORE','C',5686),('CAMMILLERI GAETANO AUTO GT','C',5687),('AGRILU DI MALVASI LUCIA','C',5688),('R.G. di ROSARIO GAROFOLO','C',5689),('AUTOELETTRONICA F.LLI DOMINICI snc','C',5690),('MELI CAR RENTALS LTD','C',5691),('RF srl','C',5692),('RUSSO GIUSEPPE','C',5693),('FALCONE FRANCESCO','C',5694),('STEFANELLI DOMENICO','C',5695),('GR srl','C',5696),('DIMENSIONE AUTO SRL','C',5697),('LATTANZIO DONATELLA','C',5698),('AUTOCOM SRL','C',5699),('GIORDANO SALVATORE OFF.CHEVROLET','C',5700),('CO.R.A.R.09 SRL','C',5701),('TRIMARCAR AUTORIC.DI MACRI PALMA','C',5702),('VIOLAUTO SRL','C',5703),('G.& V.POLICASTRI SNC','C',5704),('A.G.S.RICAMBI SRL','C',5705),('FLORI MOTORI SRL unipersonale','C',5706),('CUCINOTTA ANGELO AUTORICAMBI','C',5707),('ARCURI MARCELLO AUTORICAMBI','C',5708),('GAMMA RICAMBI SRL','C',5709),('VIOLA VINCENZO AUTORICAMBI','C',5710),('BELLOCCO RAFFAELE','C',5711),('BELCASTRO ANGELO ACCESSORI','C',5712),('SAFFIOTI CARMELO IMPRESA EDILE','C',5713),('A.M.RICAMBI DI ESPOSITO S.','C',5714),('3C RICAMBI DI COLAPRISTI VINCENZO','C',5715),('SURACE AUTO DI SURACE ROCCO','C',5716),('DIEMME SRL','C',5717),('F.LLI SCANGA SRL','C',5718),('ARTE FERRO DI ROSARIO BAGNATO','C',5719),('AUTORIC.CHIURCO DI LORICCHIO V.ZO','C',5720),('TIRRENO SNC.DI LUCCHESE V.ZO','C',5721),('CO.GE.TECH SRL','C',5722),('SALADINI SRL','C',5723),('TURANO ARMANDO','C',5724),('G.E.S.T. AUTORICAMBI SRL','C',5725),('CONDO ANTONIO','C',5726),('PUNTO MARMITTE DI FERRARA DOMENICO','C',5727),('INTERNAZIONALE RICAMBI SRL','C',5728),('A.A.R. DI CURCIO VINCENZO','C',5729),('RIC.PIAGGIO F.LLI SERGI DI SERGI G.','C',5730),('LAURITO GIUSEPPE AUTORICAMBI','C',5731),('AUTORICAMBI TRE A DI A.LUZZI','C',5732),('VISCOMI AGOSTINO','C',5733),('GROUP ECO ITALIA SRL','C',5734),('MESITI LUCA','C',5735),('AUTORICAMBI SCHIRRIPA SAS','C',5736),('TRUSCELLI ANTONIO','C',5737),('AUTORIC.GODINO DI MENDICINO LORETTA','C',5739),('MICHELE CAROLI SRL','C',5741),('CIRIA ALESSIO AUTORICAMBI','C',5742),('F.LLI LORENTI RICAMBI AUTO SRL','C',5743),('R.S.RICAMBI DI ROBERTO SGAMBELLURI','C',5744),('ARCURI SISTINO AUTORICAMBI','C',5745),('2V CAR PARTS DI VALERIO MACRI','C',5746),('BARILLARI GIUSEPPE AUTORICAMBI','C',5747),('AUTORICAMBI COSENTINO SRL uniperson','C',5748),('EURORICAMBI SRLS','C',5749),('AUTORICAMBI 2G DI GIANFRANCO GARUFI','C',9002),('A.R.A. RICAMBI VENETICO srl','C',9005),('BELLANTONI DOMENICO','C',9034),('BASILE SANTO','C',9036),('AUTORICAMBIFOX DI FOSSATI MATTEO','C',9062),('GRANDI RICAMBI DI GRANDI SIMONE','C',9070),('CARUSO CALOGERO','C',9071),('CALDERONE PAOLO FRANCESCO','C',9074),('GAGLIO GIUSEPPE Ricambi Auto e Acc.','C',9185),('GIORGIANNI AUTORICAMBI S.N.C.','C',9190),('SAPORITO MASSIMO LAUTORICAMBIO','C',9284),('LOMBARDO SANTO','C',9285),('MICALI GIOVANNI','C',9324),('MERLINO ANTONINO','C',9331),('MILONE GIUSEPPE','C',9352),('CENTRO AUTO DI TRAMONTANO','C',9380),('PINTAUDI ROCCO','C',9422),('AUTORICAMBI DI PINO SRL','C',9475),('SETTIMO GIOVANNI','C',9502),('SANFILIPPO GIUSEPPE','C',9505),('STURNIOLO ANTONINO Elettrauto','C',9507),('SUD RICAMBI snc DI GUGLIOTTA C.& C.','C',9508),('SPRINT CAR AUTORICAMBI DI GRECO A.','C',9511),('GIORGIO FRANCESCO','C',9534),('TRIFILO FILIPPO TUTTO AUTORICAMBI','C',9537),('RIGGIO GIUSEPPE & C. SNC','C',9620),('CORRISPETTIVI','C',999999),('','F',0),('SAFFIOTI CARMELO SNC','F',1),('TRENTINELLA FRANCESCO','F',2),('PRINTING.CENTER','F',3),('MAZZULLO FORTUNATO','F',4),('MGG ITALIA S.R.L. GRUPPO IMCO','F',5),('GLS GENERAL LOGISTICS SYSTEMS','F',6),('CIFANI SRL','F',7),('BARTOLINI spa','F',8),('ITALIA RECAPITI S.R.L','F',9),('UNI EURO S.P.A','F',10),('FORMAT S.A.S. DI PISCOPO ANTONIO &C','F',11),('GIAMMARRESI NICOLO','F',12),('CANNATA VINCENZO srl','F',13),('GRIMAS srl Etichette','F',14),('CONSORZIO ASSORICAMBI','F',15),('B.C.R. srl','F',16),('CADI snc F.LLI MILASI','F',17),('JET EXPRESS srl CORRIERE ESPRESSO','F',18),('PAPERNET SPA','F',19),('FIAMMA DI A.SEMINARA','F',20),('COSTANZO SALVATORE','F',21),('MONDOFFICE SRL','F',22),('SOF.INN. INFORMATICA srl','F',23),('G.TRIPODI SRL','F',24),('ARMES SPA','F',25),('J-SOFTWARE SRL','F',26),('SARITEL','F',27),('SDA EXPRESS COURIER','F',28),('TRASPORTI PE.CAM','F',29),('CONSOZIO PDA','F',30),('OPITERGINA MARMITTE DI NESPOLO','F',31),('SCATOLIFICIO VENETO S.R.L.','F',32),('AUTOCOM SRL','F',33),('LT SRL LOGISTICA E TRASPORTI','F',34),('FUTIA DOMENICO','F',35),('SETEFI SPA GRUPPO INTESABCI','F',36),('ELPIDA D.O.O.','F',37),('I.F.R. DI MAURIZIO ROMANO','F',38),('CRUCITTI SRL','F',39),('GRAFICAJONICA SNC','F',40),('PANALPINA TRASP.MOND.SPA','F',41),('ARUBA SPA','F',42),('ENGINET SRL','F',43),('POLIGRAFICO SRL','F',44),('SERIBAG DI ZAGARI DANIELA','F',46),('PISANI FRANCESCO & FIGLI SPA','F',50),('INGROSUD DI PRATICO ANTONIO','F',51),('MEDIA WORLD COMPRA ON-LINE','F',53),('PM2 DI MILITANO NATALE','F',58),('RAG.PARISI GIUSEPPE','F',60),('REDOIL ITALIA spa','F',64),('BARBARO SPORT S.A.S.','F',75),('KRIOS A.C. srl','F',83),('SERFEM DI SERGIO FEMIA','F',86),('SOVEB AUTO SRL','F',90),('SUSA TRASPORTI SPA','F',93),('SDA sas DI PALMITESSA (UNIGOM)','F',94),('NOTAIO MARCELLA CLARA RENI','F',96),('AB ELETTROSISTEMI','F',97),('SOCET srl (TOTAL)','F',100),('DELIVERY EXPRESS','F',101),('TAZZETTI GUIDO & C. SPA Div.ACR','F',102),('COMPUTER ASSIST S.A.S. DI RUFFOLO','F',103),('ALDASA DI FRANCO SILENO','F',104),('STUDIO LEGALE AVV.GIULIANA METE','F',105),('TRIONE RICAMBI S.P.A','F',107),('RICAMBIFLEX GM srl','F',110),('CASA DEL RICAMBIO SRL','F',111),('LEONARDO SNC DIGITAL STUDIO','F',112),('MUSICO MACCHINE AGRICOLE','F',115),('ROBERT BOSCH spa','F',116),('C.B.F. BALDUCCI SPA','F',117),('ENGINE COMPONENTS srl GLASER','F',118),('SEAL-TECH SRL','F',119),('SMAT NORD srl','F',120),('RIVOIRA S.P.A','F',121),('BRENTA SRL','F',122),('RAPISARDA CARLO CARMELO','F',123),('CIEFFEBI TRASPORTI','F',124),('CAST BOLZONELLA S.A.S.','F',125),('EURODECOS S.R.L.','F',126),('DALTORICAMBI SRL','F',127),('LUBEX S.P.A.','F',128),('ITALTRADE SRL','F',129),('SAMAUTO SPA','F',130),('FRAP srl','F',135),('SOGEFI FILTRATION SPA','F',140),('UNIPART NV INTERNATIONAL RADIATOR','F',145),('EXIDE ITALIA SRL','F',150),('IBS SRL','F',155),('ASSOMARMITTE SRL','F',160),('IPS PARTS SRL','F',165),('OSRAV ALFEO MORET SPA DAMPO','F',170),('EXO AUTOMOTIVE SPA REMSA-OPENPARTS','F',175),('KAYABA ITALY GmbH','F',180),('SALADINI SRL','F',185),('CARTIERA LUCCHESE SPA (LUCART)','F',190),('TIRRENA IMPEX SRL','F',195),('FAAL BATTERIE SRL','F',200),('NRF ITALIA SRL','F',205),('DICRA SPA','F',210),('MECARM srl','F',215),('LEART-DIVISIONE EUROLITES SPA','F',1202),('EUROLITES S.P.A ARIC','F',1203),('MORONI CESARE & C. snc','F',1307),('M.T.S. spa','F',1310),('MAGNETI MARELLI AFTERMARKET AND SER','F',1323),('MALO spa','F',1329),('NEWFREN SPA','F',1401),('OLYMPIA srl','F',1501),('F.LLI TRIPODI SNC','F',1502),('FL.ITALIA srl OLEOBLITZ','F',1505),('OSRAM spa','F',1507),('PHILIPS SPA','F',1602),('DAYCO EUROPE SRL','F',1605),('RICAUTO SPA','F',1804),('R.M.S. S.P.A.','F',1817),('COMMERCIALE LUCANA snc','F',1901),('ENZO PARISI S.R.L.','F',1902),('SIOM S.R.L.','F',1908),('SIA INDUSTRIA ACCUMULATORI spa','F',1914),('SIMAKA','F',1923),('SITO GRUPPO INDISTRIALE spa','F',1935),('TOMAS RENATO & BRUNO sas','F',2001),('UMMAC srl','F',2201),('VEMA srl','F',2306),('VALEO SERVICE ITALIA S.P.A.','F',2308),('WD-40 COMPANY LTD','F',2309),('A.C.S. DI CORDOVANA SALVATORE','F',3101),('DELTA SERVICE snc','F',3103),('AUTOFORNITURE MILANESI spa','F',3104),('AGIP PETROLI ( Agenzia RC )','F',3105),('ARSAUTO SRL','F',3110),('AREXONS DIVISIONE DI FL SELENIA SPA','F',3116),('BOSATTA F.LLI \"F.B.\"srl','F',3201),('BIFFI & PREMOLI srl','F',3205),('BERGAMASCHI & F. spa','F',3213),('F.G.WOLF SRL','F',3302),('C.D.A. spa','F',3303),('CENTAURO srl','F',3307),('CASA DEL BULLONE sas','F',3311),('ORIGINAL BIRTH spa','F',3314),('FORTEBUONO METALLINFISSI SRL','F',3321),('C.C.R. srl CENTRO CUSCINETTI','F',3325),('CRAMER SRL','F',3328),('TOMMASELLI srl','F',3401),('DELLORTO spa','F',3403),('FEDERAL MOGUL ITALY SRL','F',3408),('F.A. ITALIA snc','F',3620),('FODONE sas','F',3621),('GUARNITAUTO spa','F',3707),('G.V.S. DI SALA RINALDO','F',3718),('PRES-SING S.A.S.','F',3906),('CODICI ANNULLATI','F',9999),('','F',999999);");
statement.close();
conn.commit();
diff --git a/uitest/src/main/java/com/vaadin/tests/contextclick/AbstractContextClickUI.java b/uitest/src/main/java/com/vaadin/tests/contextclick/AbstractContextClickUI.java
index e1d741ee88..cd5c99e210 100644
--- a/uitest/src/main/java/com/vaadin/tests/contextclick/AbstractContextClickUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/contextclick/AbstractContextClickUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -89,9 +89,9 @@ public abstract class AbstractContextClickUI<T extends AbstractComponent, E exte
protected HorizontalLayout createContextClickControls() {
HorizontalLayout contextClickControls = new HorizontalLayout();
- contextClickControls.addComponent(new Button(
- "Add/Remove default listener", new ListenerHandler(
- defaultListener)));
+ contextClickControls
+ .addComponent(new Button("Add/Remove default listener",
+ new ListenerHandler(defaultListener)));
contextClickControls
.addComponent(new Button("Add/Remove typed listener",
new ListenerHandler(typedListener)));
diff --git a/uitest/src/main/java/com/vaadin/tests/contextclick/BrowserContextMenuInSubComponent.java b/uitest/src/main/java/com/vaadin/tests/contextclick/BrowserContextMenuInSubComponent.java
index d3edf0ba43..7033f93bd4 100644
--- a/uitest/src/main/java/com/vaadin/tests/contextclick/BrowserContextMenuInSubComponent.java
+++ b/uitest/src/main/java/com/vaadin/tests/contextclick/BrowserContextMenuInSubComponent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/contextclick/GridContextClick.java b/uitest/src/main/java/com/vaadin/tests/contextclick/GridContextClick.java
index 77009a0762..51d6aab92e 100644
--- a/uitest/src/main/java/com/vaadin/tests/contextclick/GridContextClick.java
+++ b/uitest/src/main/java/com/vaadin/tests/contextclick/GridContextClick.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,8 +24,8 @@ import com.vaadin.ui.Grid;
import com.vaadin.ui.Grid.GridContextClickEvent;
import com.vaadin.ui.HorizontalLayout;
-public class GridContextClick extends
- AbstractContextClickUI<Grid, GridContextClickEvent> {
+public class GridContextClick
+ extends AbstractContextClickUI<Grid, GridContextClickEvent> {
@Override
protected Grid createTestComponent() {
@@ -66,8 +66,8 @@ public class GridContextClick extends
@Override
protected HorizontalLayout createContextClickControls() {
HorizontalLayout controls = super.createContextClickControls();
- controls.addComponent(new Button("Remove all content",
- new Button.ClickListener() {
+ controls.addComponent(
+ new Button("Remove all content", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/contextclick/TableContextClick.java b/uitest/src/main/java/com/vaadin/tests/contextclick/TableContextClick.java
index 95fa85dc90..0383c34845 100644
--- a/uitest/src/main/java/com/vaadin/tests/contextclick/TableContextClick.java
+++ b/uitest/src/main/java/com/vaadin/tests/contextclick/TableContextClick.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,8 +24,8 @@ import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Table;
import com.vaadin.ui.Table.TableContextClickEvent;
-public class TableContextClick extends
- AbstractContextClickUI<Table, TableContextClickEvent> {
+public class TableContextClick
+ extends AbstractContextClickUI<Table, TableContextClickEvent> {
@Override
protected Table createTestComponent() {
@@ -57,8 +57,8 @@ public class TableContextClick extends
@Override
protected HorizontalLayout createContextClickControls() {
HorizontalLayout controls = super.createContextClickControls();
- controls.addComponent(new Button("Remove all content",
- new Button.ClickListener() {
+ controls.addComponent(
+ new Button("Remove all content", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/contextclick/TreeContextClick.java b/uitest/src/main/java/com/vaadin/tests/contextclick/TreeContextClick.java
index 6b58138ab2..9abd22457a 100644
--- a/uitest/src/main/java/com/vaadin/tests/contextclick/TreeContextClick.java
+++ b/uitest/src/main/java/com/vaadin/tests/contextclick/TreeContextClick.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -18,8 +18,8 @@ package com.vaadin.tests.contextclick;
import com.vaadin.ui.Tree;
import com.vaadin.ui.Tree.TreeContextClickEvent;
-public class TreeContextClick extends
- AbstractContextClickUI<Tree, TreeContextClickEvent> {
+public class TreeContextClick
+ extends AbstractContextClickUI<Tree, TreeContextClickEvent> {
@Override
protected Tree createTestComponent() {
diff --git a/uitest/src/main/java/com/vaadin/tests/contextclick/TreeTableContextClick.java b/uitest/src/main/java/com/vaadin/tests/contextclick/TreeTableContextClick.java
index 406f5d589e..abc924c124 100644
--- a/uitest/src/main/java/com/vaadin/tests/contextclick/TreeTableContextClick.java
+++ b/uitest/src/main/java/com/vaadin/tests/contextclick/TreeTableContextClick.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,8 +24,8 @@ import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Table.TableContextClickEvent;
import com.vaadin.ui.TreeTable;
-public class TreeTableContextClick extends
- AbstractContextClickUI<TreeTable, TableContextClickEvent> {
+public class TreeTableContextClick
+ extends AbstractContextClickUI<TreeTable, TableContextClickEvent> {
@Override
protected TreeTable createTestComponent() {
@@ -58,8 +58,8 @@ public class TreeTableContextClick extends
@Override
protected HorizontalLayout createContextClickControls() {
HorizontalLayout controls = super.createContextClickControls();
- controls.addComponent(new Button("Remove all content",
- new Button.ClickListener() {
+ controls.addComponent(
+ new Button("Remove all content", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/converter/ConverterThatEnforcesAFormat.java b/uitest/src/main/java/com/vaadin/tests/converter/ConverterThatEnforcesAFormat.java
index 9d0c835c68..c90bf559b0 100644
--- a/uitest/src/main/java/com/vaadin/tests/converter/ConverterThatEnforcesAFormat.java
+++ b/uitest/src/main/java/com/vaadin/tests/converter/ConverterThatEnforcesAFormat.java
@@ -21,15 +21,14 @@ public class ConverterThatEnforcesAFormat extends AbstractTestUIWithLog {
tf.addValueChangeListener(new ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
- log("Value changed to "
- + event.getProperty().getValue()
- + "(converted value is "
- + tf.getConvertedValue()
+ log("Value changed to " + event.getProperty().getValue()
+ + "(converted value is " + tf.getConvertedValue()
+ "). Two-way conversion gives: "
+ tf.getConverter().convertToPresentation(
tf.getConverter().convertToModel(tf.getValue(),
Double.class, tf.getLocale()),
- String.class, tf.getLocale()) + ")");
+ String.class, tf.getLocale())
+ + ")");
}
});
tf.setImmediate(true);
diff --git a/uitest/src/main/java/com/vaadin/tests/converter/StringToDoubleConverterWithThreeFractionDigits.java b/uitest/src/main/java/com/vaadin/tests/converter/StringToDoubleConverterWithThreeFractionDigits.java
index 23c22a7026..abaa17f661 100644
--- a/uitest/src/main/java/com/vaadin/tests/converter/StringToDoubleConverterWithThreeFractionDigits.java
+++ b/uitest/src/main/java/com/vaadin/tests/converter/StringToDoubleConverterWithThreeFractionDigits.java
@@ -5,8 +5,8 @@ import java.util.Locale;
import com.vaadin.data.util.converter.StringToDoubleConverter;
-public class StringToDoubleConverterWithThreeFractionDigits extends
- StringToDoubleConverter {
+public class StringToDoubleConverterWithThreeFractionDigits
+ extends StringToDoubleConverter {
@Override
protected NumberFormat getFormat(Locale locale) {
diff --git a/uitest/src/main/java/com/vaadin/tests/data/bean/Country.java b/uitest/src/main/java/com/vaadin/tests/data/bean/Country.java
index afdf8dcfa1..159333212f 100644
--- a/uitest/src/main/java/com/vaadin/tests/data/bean/Country.java
+++ b/uitest/src/main/java/com/vaadin/tests/data/bean/Country.java
@@ -2,8 +2,8 @@ package com.vaadin.tests.data.bean;
public enum Country {
- FINLAND("Finland"), SWEDEN("Sweden"), USA("USA"), RUSSIA("Russia"), NETHERLANDS(
- "Netherlands"), SOUTH_AFRICA("South Africa");
+ FINLAND("Finland"), SWEDEN("Sweden"), USA("USA"), RUSSIA(
+ "Russia"), NETHERLANDS("Netherlands"), SOUTH_AFRICA("South Africa");
private String name;
diff --git a/uitest/src/main/java/com/vaadin/tests/data/bean/Person.java b/uitest/src/main/java/com/vaadin/tests/data/bean/Person.java
index f7bad31d0e..00d28a1cd8 100644
--- a/uitest/src/main/java/com/vaadin/tests/data/bean/Person.java
+++ b/uitest/src/main/java/com/vaadin/tests/data/bean/Person.java
@@ -136,8 +136,8 @@ public class Person {
}
public static Person createTestPerson2() {
- return new Person("Maya", "Dinkelstein", "maya@foo.bar", 18,
- Sex.FEMALE, new Address("Red street", 12, "Amsterdam",
+ return new Person("Maya", "Dinkelstein", "maya@foo.bar", 18, Sex.FEMALE,
+ new Address("Red street", 12, "Amsterdam",
Country.NETHERLANDS));
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/dd/AcceptAnythingWindow.java b/uitest/src/main/java/com/vaadin/tests/dd/AcceptAnythingWindow.java
index 5d57de388c..c978455cd7 100644
--- a/uitest/src/main/java/com/vaadin/tests/dd/AcceptAnythingWindow.java
+++ b/uitest/src/main/java/com/vaadin/tests/dd/AcceptAnythingWindow.java
@@ -77,8 +77,8 @@ public class AcceptAnythingWindow extends Window {
int clientY = eventDetails.getClientY();
try {
- layout.getPosition(component).setTopValue(
- Float.valueOf(clientY - top));
+ layout.getPosition(component)
+ .setTopValue(Float.valueOf(clientY - top));
layout.getPosition(component).setLeftValue(
Float.valueOf(clientX - left));
} catch (Exception e) {
diff --git a/uitest/src/main/java/com/vaadin/tests/dd/AcceptFromComponent.java b/uitest/src/main/java/com/vaadin/tests/dd/AcceptFromComponent.java
index 99dd069142..b01ea3c163 100644
--- a/uitest/src/main/java/com/vaadin/tests/dd/AcceptFromComponent.java
+++ b/uitest/src/main/java/com/vaadin/tests/dd/AcceptFromComponent.java
@@ -78,8 +78,9 @@ public class AcceptFromComponent extends Window {
// Item id
Label l = new Label();
l.setSizeUndefined();
- l.setValue("ItemId : "
- + ((DataBoundTransferable) ctr).getItemId());
+ l.setValue(
+ "ItemId : " + ((DataBoundTransferable) ctr)
+ .getItemId());
layout.addComponent(l);
component = l;
@@ -100,8 +101,8 @@ public class AcceptFromComponent extends Window {
int clientY = eventDetails.getClientY();
try {
- layout.getPosition(component).setTopValue(
- Float.valueOf(clientY - top));
+ layout.getPosition(component)
+ .setTopValue(Float.valueOf(clientY - top));
layout.getPosition(component).setLeftValue(
Float.valueOf(clientX - left));
} catch (Exception e) {
diff --git a/uitest/src/main/java/com/vaadin/tests/dd/ActiveDragSourceClassName.java b/uitest/src/main/java/com/vaadin/tests/dd/ActiveDragSourceClassName.java
index 9ef1b4029b..7f60dacecf 100644
--- a/uitest/src/main/java/com/vaadin/tests/dd/ActiveDragSourceClassName.java
+++ b/uitest/src/main/java/com/vaadin/tests/dd/ActiveDragSourceClassName.java
@@ -94,8 +94,8 @@ public class ActiveDragSourceClassName extends TestBase {
}
next = componentIterator.next();
}
- if (dropTargetData.getData("horizontalLocation").equals(
- "LEFT")) {
+ if (dropTargetData.getData("horizontalLocation")
+ .equals("LEFT")) {
index--;
if (index < 0) {
index = 0;
diff --git a/uitest/src/main/java/com/vaadin/tests/dd/CustomDDImplementation.java b/uitest/src/main/java/com/vaadin/tests/dd/CustomDDImplementation.java
index f6e196761e..ad5d391385 100644
--- a/uitest/src/main/java/com/vaadin/tests/dd/CustomDDImplementation.java
+++ b/uitest/src/main/java/com/vaadin/tests/dd/CustomDDImplementation.java
@@ -17,7 +17,7 @@ import com.vaadin.ui.Layout;
/**
* Test/Example/Draft code how to build custom DD implementation using the thing
* framework provided by Vaadin.
- *
+ *
*/
public class CustomDDImplementation extends CustomComponent {
@@ -30,12 +30,12 @@ public class CustomDDImplementation extends CustomComponent {
/**
* Server side component that accepts drags must implement HasDropHandler
* that have one method to get reference of DropHandler.
- *
+ *
* DropHandler may be implemented directly or probably most commonly using a
* half baked implementation {@link AbstractDropHandler}.
- *
+ *
* Check the @ClientWidget
- *
+ *
*/
class MyDropTarget extends AbstractComponent implements DropTarget {
@Override
@@ -71,12 +71,12 @@ public class CustomDDImplementation extends CustomComponent {
/**
* Server side implementation of source does not necessary need to contain
* anything.
- *
+ *
* Check the @ClientWidget
- *
+ *
* However component might have different modes to support starting drag
* operations that are controlled via server side api.
- *
+ *
*/
public class MyDragSource extends AbstractComponent implements Component {
diff --git a/uitest/src/main/java/com/vaadin/tests/dd/DDInterrupt.java b/uitest/src/main/java/com/vaadin/tests/dd/DDInterrupt.java
index 1939bbbce5..ef64fb44d8 100644
--- a/uitest/src/main/java/com/vaadin/tests/dd/DDInterrupt.java
+++ b/uitest/src/main/java/com/vaadin/tests/dd/DDInterrupt.java
@@ -18,7 +18,7 @@ import com.vaadin.ui.Label;
/**
* Test for interrupting drag-and-drop.
- *
+ *
* @author Vaadin Ltd
*/
@Widgetset(TestingWidgetSet.NAME)
@@ -46,7 +46,8 @@ public class DDInterrupt extends AbstractTestUI {
DragAndDropWrapper dndLayoutWrapper = new DragAndDropWrapper(layout);
addComponent(dndLayoutWrapper);
- DragAndDropWrapper labelWrapper = new DragAndDropWrapper(draggableLabel);
+ DragAndDropWrapper labelWrapper = new DragAndDropWrapper(
+ draggableLabel);
draggableLabel.setSizeUndefined();
labelWrapper.setDragStartMode(DragStartMode.COMPONENT);
labelWrapper.setSizeUndefined();
diff --git a/uitest/src/main/java/com/vaadin/tests/dd/DDTest1.java b/uitest/src/main/java/com/vaadin/tests/dd/DDTest1.java
index 161a9b423e..4aed1bf196 100644
--- a/uitest/src/main/java/com/vaadin/tests/dd/DDTest1.java
+++ b/uitest/src/main/java/com/vaadin/tests/dd/DDTest1.java
@@ -46,8 +46,8 @@ public class DDTest1 extends TestBase {
pane1.addComponent(label);
- Link l = new Link("This is link", new ExternalResource(
- "http://www.google.com/"));
+ Link l = new Link("This is link",
+ new ExternalResource("http://www.google.com/"));
pane1.addComponent(l, "top:100px; left: 20px;");
label = new Label("Bar");
@@ -55,10 +55,11 @@ public class DDTest1 extends TestBase {
pane1.addComponent(label);
DragDropPane pane2 = new DragDropPane();
- pane2.setCaption("Pane2 (accept needs server side visit, check for \"Bar\")");
+ pane2.setCaption(
+ "Pane2 (accept needs server side visit, check for \"Bar\")");
final AcceptCriterion crit = new ServerSideCriterion() {
/**
- *
+ *
*/
private static final long serialVersionUID = 1L;
@@ -120,7 +121,7 @@ public class DDTest1 extends TestBase {
/*
* Moves items in tree (and could work in Table too). Also supports
* "building" tree.
- *
+ *
* TODO fix algorithm, broken in some cases.
*/
DropHandler itemSorter = new DropHandler() {
@@ -139,10 +140,8 @@ public class DDTest1 extends TestBase {
Collection<?> itemPropertyIds = item
.getItemPropertyIds();
for (Object propId : itemPropertyIds) {
- addItem.getItemProperty(propId)
- .setValue(
- item.getItemProperty(propId)
- .getValue());
+ addItem.getItemProperty(propId).setValue(item
+ .getItemProperty(propId).getValue());
}
}
idx.setParent(childId, itemId);
@@ -178,10 +177,8 @@ public class DDTest1 extends TestBase {
Collection<?> itemPropertyIds = item
.getItemPropertyIds();
for (Object propertyId : itemPropertyIds) {
- addedItem.getItemProperty(propertyId)
- .setValue(
- item.getItemProperty(propertyId)
- .getValue());
+ addedItem.getItemProperty(propertyId).setValue(item
+ .getItemProperty(propertyId).getValue());
}
copyChildren(source, target, childId);
}
@@ -249,8 +246,8 @@ public class DDTest1 extends TestBase {
main.addComponent(pane3);
main.addComponent(t);
main.addComponent(ta);
- main.addComponent(new Link("Foo", new ExternalResource(
- "http://www.itmill.com/")));
+ main.addComponent(new Link("Foo",
+ new ExternalResource("http://www.itmill.com/")));
getLayout().setSizeFull();
addComponent(main);
diff --git a/uitest/src/main/java/com/vaadin/tests/dd/DDTest2.java b/uitest/src/main/java/com/vaadin/tests/dd/DDTest2.java
index e9fb2910b0..ebc09a7685 100644
--- a/uitest/src/main/java/com/vaadin/tests/dd/DDTest2.java
+++ b/uitest/src/main/java/com/vaadin/tests/dd/DDTest2.java
@@ -73,7 +73,7 @@ public class DDTest2 extends TestBase {
/*
* An example of lazy initializing drop criterion with component
* specific api for easy rule writing.
- *
+ *
* Example is pretty stupid (accepts drop on all nodes, but by
* explicitly defining them here), but demonstrates lazy initialization
* option if rules are heavy.
@@ -272,8 +272,8 @@ public class DDTest2 extends TestBase {
for (int i = 0; i < 10; i++) {
Item addItem = table.addItem("Item" + i);
Person p = testData.getIdByIndex(i);
- addItem.getItemProperty("Name").setValue(
- p.getFirstName() + " " + p.getLastName());
+ addItem.getItemProperty("Name")
+ .setValue(p.getFirstName() + " " + p.getLastName());
addItem.getItemProperty("Weight").setValue(50 + r.nextInt(60));
}
diff --git a/uitest/src/main/java/com/vaadin/tests/dd/DDTest4.java b/uitest/src/main/java/com/vaadin/tests/dd/DDTest4.java
index acd54274da..c2af2cca77 100644
--- a/uitest/src/main/java/com/vaadin/tests/dd/DDTest4.java
+++ b/uitest/src/main/java/com/vaadin/tests/dd/DDTest4.java
@@ -30,16 +30,14 @@ public class DDTest4 extends TestBase {
protected void setup() {
UI w = getLayout().getUI();
- TestUtils
- .injectCSS(
- w,
- ".v-table-row-drag-middle .v-table-cell-content {"
- + " background-color: inherit ; border-bottom: 1px solid cyan;"
- + "}"
- + ".v-table-row-drag-middle .v-table-cell-wrapper {"
- + " margin-bottom: -1px;" + "}" + ""
+ TestUtils.injectCSS(w,
+ ".v-table-row-drag-middle .v-table-cell-content {"
+ + " background-color: inherit ; border-bottom: 1px solid cyan;"
+ + "}"
+ + ".v-table-row-drag-middle .v-table-cell-wrapper {"
+ + " margin-bottom: -1px;" + "}" + ""
- );
+ );
// hl.addComponent(tree1);
hl.addComponent(table);
@@ -86,7 +84,8 @@ public class DDTest4 extends TestBase {
IndexedContainer containerDataSource = (IndexedContainer) table
.getContainerDataSource();
int newIndex = containerDataSource.indexOfId(itemIdOver) - 1;
- if (dropTargetData.getDropLocation() != VerticalDropLocation.TOP) {
+ if (dropTargetData
+ .getDropLocation() != VerticalDropLocation.TOP) {
newIndex++;
}
if (newIndex < 0) {
@@ -143,8 +142,8 @@ public class DDTest4 extends TestBase {
for (int i = 0; i < 10; i++) {
Item addItem = table.addItem("Item" + i);
Person p = testData.getIdByIndex(i);
- addItem.getItemProperty("Name").setValue(
- p.getFirstName() + " " + p.getLastName());
+ addItem.getItemProperty("Name")
+ .setValue(p.getFirstName() + " " + p.getLastName());
addItem.getItemProperty("Weight").setValue(50 + r.nextInt(60));
}
diff --git a/uitest/src/main/java/com/vaadin/tests/dd/DDTest5.java b/uitest/src/main/java/com/vaadin/tests/dd/DDTest5.java
index 43342fdc35..0e7fd737d0 100644
--- a/uitest/src/main/java/com/vaadin/tests/dd/DDTest5.java
+++ b/uitest/src/main/java/com/vaadin/tests/dd/DDTest5.java
@@ -52,14 +52,11 @@ public class DDTest5 extends TestBase {
HorizontalSortableCssLayoutWithWrappers verticalSortableCssLayoutWithWrappers = new HorizontalSortableCssLayoutWithWrappers();
w.addWindow(verticalSortableCssLayoutWithWrappers);
verticalSortableCssLayoutWithWrappers.setPositionX(200);
- verticalSortableCssLayoutWithWrappers.setPositionY(40); /*
- * FIXME:
- * subwindow
- * horizontal
- * position does
- * not work if
- * only x set
- */
+ verticalSortableCssLayoutWithWrappers
+ .setPositionY(40); /*
+ * FIXME: subwindow horizontal position does
+ * not work if only x set
+ */
Label l;
@@ -81,8 +78,8 @@ public class DDTest5 extends TestBase {
cssLayout.setHeight("300px");
dragAndDropWrapper2 = new DragAndDropWrapper(cssLayout);
- dragAndDropWrapper2
- .setCaption("Drop here or sort with dd (wrapper(csslayout(n*wrapper(label))))");
+ dragAndDropWrapper2.setCaption(
+ "Drop here or sort with dd (wrapper(csslayout(n*wrapper(label))))");
dh = new DropHandler() {
@@ -99,7 +96,8 @@ public class DDTest5 extends TestBase {
* here)
*/
- if (dropEvent.getTransferable() instanceof WrapperTransferable) {
+ if (dropEvent
+ .getTransferable() instanceof WrapperTransferable) {
WrapperTransferable transferable = (WrapperTransferable) dropEvent
.getTransferable();
Component sourceComponent = transferable
@@ -148,8 +146,8 @@ public class DDTest5 extends TestBase {
} else {
// no component, add label with "Text"
- String data = (String) dropEvent.getTransferable().getData(
- "text/plain");
+ String data = (String) dropEvent.getTransferable()
+ .getData("text/plain");
if (data == null || "".equals(data)) {
data = "-- no Text --";
}
diff --git a/uitest/src/main/java/com/vaadin/tests/dd/DDTest6.java b/uitest/src/main/java/com/vaadin/tests/dd/DDTest6.java
index 2122e8e982..e2705aecba 100644
--- a/uitest/src/main/java/com/vaadin/tests/dd/DDTest6.java
+++ b/uitest/src/main/java/com/vaadin/tests/dd/DDTest6.java
@@ -110,11 +110,13 @@ public class DDTest6 extends TestBase {
TreeTargetDetails dropTargetData = (TreeTargetDetails) dropEvent
.getTargetDetails();
folder = (Folder) dropTargetData.getItemIdInto();
- if (dropEvent.getTransferable() instanceof DataBoundTransferable) {
+ if (dropEvent
+ .getTransferable() instanceof DataBoundTransferable) {
DataBoundTransferable transferable = (DataBoundTransferable) dropEvent
.getTransferable();
file = (File) transferable.getItemId();
- } else if (dropEvent.getTransferable().getSourceComponent() instanceof FileIcon) {
+ } else if (dropEvent.getTransferable()
+ .getSourceComponent() instanceof FileIcon) {
FileIcon draggedIcon = (FileIcon) dropEvent
.getTransferable().getSourceComponent();
file = draggedIcon.file;
@@ -131,7 +133,8 @@ public class DDTest6 extends TestBase {
private Action[] actions = new Action[] { new Action("Remove") };
@Override
- public void handleAction(Action action, Object sender, Object target) {
+ public void handleAction(Action action, Object sender,
+ Object target) {
ContainerHierarchicalWrapper containerDataSource = (ContainerHierarchicalWrapper) tree1
.getContainerDataSource();
containerDataSource.removeItemRecursively(target);
@@ -163,15 +166,12 @@ public class DDTest6 extends TestBase {
getLayout().setSizeFull();
getLayout().addComponent(sp);
- TestUtils
- .injectCSS(
- getLayout().getUI(),
- ""
- + ".v-tree .v-icon {height:16px;} "
- + ".v-tree-node-caption-drag-top {/*border-top: none;*/} "
- + ".v-tree-node-caption-drag-bottom {border-bottom: none ;} "
- + ".v-tree-node-caption-drag-center {background-color: transparent;}"
- + ".v-tree-node-caption-dragfolder { background-color: cyan;} ");
+ TestUtils.injectCSS(getLayout().getUI(), ""
+ + ".v-tree .v-icon {height:16px;} "
+ + ".v-tree-node-caption-drag-top {/*border-top: none;*/} "
+ + ".v-tree-node-caption-drag-bottom {border-bottom: none ;} "
+ + ".v-tree-node-caption-drag-center {background-color: transparent;}"
+ + ".v-tree-node-caption-dragfolder { background-color: cyan;} ");
}
@@ -256,7 +256,8 @@ public class DDTest6 extends TestBase {
private void openFile(File file) {
// ATM supports only images.
if (file.getType().equals("image/png")) {
- Embedded embedded = new Embedded(file.getName(), file.getResource());
+ Embedded embedded = new Embedded(file.getName(),
+ file.getResource());
VerticalLayout layout = new VerticalLayout();
layout.setMargin(true);
Window w = new Window(file.getName(), layout);
@@ -331,8 +332,9 @@ public class DDTest6 extends TestBase {
@SuppressWarnings("static-access")
void reload() {
- Collection<?> children = folder == null ? DDTest6.get().tree1
- .rootItemIds() : DDTest6.get().tree1.getChildren(folder);
+ Collection<?> children = folder == null
+ ? DDTest6.get().tree1.rootItemIds()
+ : DDTest6.get().tree1.getChildren(folder);
if (children == null) {
l.removeAllComponents();
return;
@@ -370,7 +372,8 @@ public class DDTest6 extends TestBase {
@SuppressWarnings("static-access")
public void drop(DragAndDropEvent dropEvent) {
- if (dropEvent.getTransferable().getSourceComponent() instanceof FileIcon) {
+ if (dropEvent.getTransferable()
+ .getSourceComponent() instanceof FileIcon) {
// update the position
DragAndDropWrapper.WrapperTransferable transferable = (WrapperTransferable) dropEvent
@@ -389,12 +392,14 @@ public class DDTest6 extends TestBase {
int deltaY = mouseEvent.getClientY()
- mouseDownEvent.getClientY();
- ComponentPosition position = l.getPosition(transferable
- .getSourceComponent());
+ ComponentPosition position = l
+ .getPosition(transferable.getSourceComponent());
position.setTop(position.getTopValue() + deltaY, UNITS_PIXELS);
- position.setLeft(position.getLeftValue() + deltaX, UNITS_PIXELS);
+ position.setLeft(position.getLeftValue() + deltaX,
+ UNITS_PIXELS);
- } else if (dropEvent.getTransferable().getSourceComponent() == tree1) {
+ } else if (dropEvent.getTransferable()
+ .getSourceComponent() == tree1) {
// dragged something from tree to the folder shown
@@ -425,7 +430,8 @@ public class DDTest6 extends TestBase {
}
@Override
- public void onProgress(StreamingProgressEvent event) {
+ public void onProgress(
+ StreamingProgressEvent event) {
}
@Override
@@ -536,7 +542,8 @@ public class DDTest6 extends TestBase {
public void drop(DragAndDropEvent dropEvent) {
File f = null;
- if (dropEvent.getTransferable().getSourceComponent() instanceof FileIcon) {
+ if (dropEvent.getTransferable()
+ .getSourceComponent() instanceof FileIcon) {
FileIcon new_name = (FileIcon) dropEvent
.getTransferable().getSourceComponent();
f = new_name.file;
diff --git a/uitest/src/main/java/com/vaadin/tests/dd/DDTest7.java b/uitest/src/main/java/com/vaadin/tests/dd/DDTest7.java
index 3c819ce15c..32082d2fe9 100644
--- a/uitest/src/main/java/com/vaadin/tests/dd/DDTest7.java
+++ b/uitest/src/main/java/com/vaadin/tests/dd/DDTest7.java
@@ -31,22 +31,18 @@ public class DDTest7 extends TestBase {
protected void setup() {
UI w = getLayout().getUI();
- TestUtils
- .injectCSS(
- w,
- ".v-table-row-drag-middle .v-table-cell-content {"
- + " background-color: inherit ; border-bottom: 1px solid cyan;"
- + "}"
- + ".v-table-row-drag-middle .v-table-cell-wrapper {"
- + " margin-bottom: -1px;"
- + "}"
- + ""
- // always show the drop hint below
- + ".v-table-row-drag-top .v-table-cell-content {"
- + "border-top: 0; margin-top:0;border-bottom:1px solid cyan;"
- + " margin-bottom: -1px;" + "}" + ""
-
- );
+ TestUtils.injectCSS(w,
+ ".v-table-row-drag-middle .v-table-cell-content {"
+ + " background-color: inherit ; border-bottom: 1px solid cyan;"
+ + "}"
+ + ".v-table-row-drag-middle .v-table-cell-wrapper {"
+ + " margin-bottom: -1px;" + "}" + ""
+ // always show the drop hint below
+ + ".v-table-row-drag-top .v-table-cell-content {"
+ + "border-top: 0; margin-top:0;border-bottom:1px solid cyan;"
+ + " margin-bottom: -1px;" + "}" + ""
+
+ );
// hl.addComponent(tree1);
hl.addComponent(table);
@@ -171,8 +167,8 @@ public class DDTest7 extends TestBase {
for (int i = 0; i < 40; i++) {
Item addItem = table.addItem("Item" + i);
Person p = testData.getIdByIndex(i);
- addItem.getItemProperty("Name").setValue(
- p.getFirstName() + " " + p.getLastName());
+ addItem.getItemProperty("Name")
+ .setValue(p.getFirstName() + " " + p.getLastName());
addItem.getItemProperty("Weight").setValue(50 + r.nextInt(60));
}
diff --git a/uitest/src/main/java/com/vaadin/tests/dd/DDTest8.java b/uitest/src/main/java/com/vaadin/tests/dd/DDTest8.java
index beaae4175e..45adff78cb 100644
--- a/uitest/src/main/java/com/vaadin/tests/dd/DDTest8.java
+++ b/uitest/src/main/java/com/vaadin/tests/dd/DDTest8.java
@@ -51,9 +51,9 @@ public class DDTest8 extends AbstractTestUI {
/**
* Moves items in tree (and could work in Table too). Also supports
* "building" tree.
- *
+ *
* TODO fix algorithm, broken in some cases.
- *
+ *
* @param tree
* @param container
* @return drop handler
@@ -76,10 +76,8 @@ public class DDTest8 extends AbstractTestUI {
Collection<?> itemPropertyIds = item
.getItemPropertyIds();
for (Object propId : itemPropertyIds) {
- addItem.getItemProperty(propId)
- .setValue(
- item.getItemProperty(propId)
- .getValue());
+ addItem.getItemProperty(propId).setValue(item
+ .getItemProperty(propId).getValue());
}
}
idx.setParent(childId, itemId);
@@ -116,10 +114,8 @@ public class DDTest8 extends AbstractTestUI {
Collection<?> itemPropertyIds = item
.getItemPropertyIds();
for (Object propertyId : itemPropertyIds) {
- addedItem.getItemProperty(propertyId)
- .setValue(
- item.getItemProperty(propertyId)
- .getValue());
+ addedItem.getItemProperty(propertyId).setValue(item
+ .getItemProperty(propertyId).getValue());
}
copyChildren(source, target, childId);
}
@@ -166,8 +162,9 @@ public class DDTest8 extends AbstractTestUI {
@Override
public AcceptCriterion getAcceptCriterion() {
- return new Or(new AbstractSelect.TargetItemIs(tree, "Foo",
- "Bar"), new AbstractSelect.AcceptItem(tree, "Foo"),
+ return new Or(
+ new AbstractSelect.TargetItemIs(tree, "Foo", "Bar"),
+ new AbstractSelect.AcceptItem(tree, "Foo"),
tree.new TargetInSubtree("Bar5") //
);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/dd/DragAndDropFiles.java b/uitest/src/main/java/com/vaadin/tests/dd/DragAndDropFiles.java
index 4ecabee617..384a02b87b 100644
--- a/uitest/src/main/java/com/vaadin/tests/dd/DragAndDropFiles.java
+++ b/uitest/src/main/java/com/vaadin/tests/dd/DragAndDropFiles.java
@@ -51,11 +51,9 @@ public class DragAndDropFiles extends TestBase {
Html5File file = files[i];
// Max 1 MB files are uploaded
if (file.getFileSize() > 1024 * 1024) {
- getMainWindow()
- .showNotification(
- "File "
- + file.getFileName()
- + " was too large, not transferred to the server side.");
+ getMainWindow().showNotification("File "
+ + file.getFileName()
+ + " was too large, not transferred to the server side.");
continue;
}
@@ -72,32 +70,33 @@ public class DragAndDropFiles extends TestBase {
}
@Override
- public void onProgress(StreamingProgressEvent event) {
- System.err.println("Progress"
- + event.getBytesReceived());
+ public void onProgress(
+ StreamingProgressEvent event) {
+ System.err.println(
+ "Progress" + event.getBytesReceived());
}
@Override
public void streamingStarted(
StreamingStartEvent event) {
- getMainWindow().showNotification(
- "Started uploading "
+ getMainWindow()
+ .showNotification("Started uploading "
+ event.getFileName());
}
@Override
public void streamingFinished(
StreamingEndEvent event) {
- getMainWindow().showNotification(
- "Finished uploading "
+ getMainWindow()
+ .showNotification("Finished uploading "
+ event.getFileName());
}
@Override
public void streamingFailed(
StreamingErrorEvent event) {
- getMainWindow().showNotification(
- "Failed uploading "
+ getMainWindow()
+ .showNotification("Failed uploading "
+ event.getFileName());
}
diff --git a/uitest/src/main/java/com/vaadin/tests/dd/DragDropPane.java b/uitest/src/main/java/com/vaadin/tests/dd/DragDropPane.java
index 6296051ee2..79b21fffbc 100644
--- a/uitest/src/main/java/com/vaadin/tests/dd/DragDropPane.java
+++ b/uitest/src/main/java/com/vaadin/tests/dd/DragDropPane.java
@@ -38,7 +38,7 @@ public class DragDropPane extends DragAndDropWrapper implements DropHandler {
}
/**
- *
+ *
*/
private static final long serialVersionUID = 1L;
@@ -85,10 +85,10 @@ public class DragDropPane extends DragAndDropWrapper implements DropHandler {
int clientY = eventDetails.getClientY();
try {
- root.getPosition(component).setTopValue(
- Float.valueOf(clientY - top));
- root.getPosition(component).setLeftValue(
- Float.valueOf(clientX - left));
+ root.getPosition(component)
+ .setTopValue(Float.valueOf(clientY - top));
+ root.getPosition(component)
+ .setLeftValue(Float.valueOf(clientX - left));
} catch (Exception e) {
}
} else {
@@ -150,13 +150,16 @@ public class DragDropPane extends DragAndDropWrapper implements DropHandler {
}
@Override
- public void streamingStarted(StreamingStartEvent event) {
+ public void streamingStarted(
+ StreamingStartEvent event) {
}
@Override
public void streamingFinished(StreamingEndEvent event) {
- l.setValue((new String(byteArrayOutputStream
- .toByteArray()).substring(0, 80) + "..."));
+ l.setValue((new String(
+ byteArrayOutputStream.toByteArray())
+ .substring(0, 80)
+ + "..."));
}
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/dd/HorizontalLayoutSortableWithWrappers.java b/uitest/src/main/java/com/vaadin/tests/dd/HorizontalLayoutSortableWithWrappers.java
index fe33bce76b..7d09e96d00 100644
--- a/uitest/src/main/java/com/vaadin/tests/dd/HorizontalLayoutSortableWithWrappers.java
+++ b/uitest/src/main/java/com/vaadin/tests/dd/HorizontalLayoutSortableWithWrappers.java
@@ -22,8 +22,8 @@ import com.vaadin.ui.Window;
/**
* Same as with css layout but tests size change propagation on emphasis +
* rules.
- *
- *
+ *
+ *
*/
public class HorizontalLayoutSortableWithWrappers extends Window {
@@ -51,8 +51,9 @@ public class HorizontalLayoutSortableWithWrappers extends Window {
}
private DropHandler dh = new DropHandler() {
- AcceptCriterion crit = new And(new TargetDetailIs("horizontalLocation",
- "LEFT"), new Not(SourceIsTarget.get()));
+ AcceptCriterion crit = new And(
+ new TargetDetailIs("horizontalLocation", "LEFT"),
+ new Not(SourceIsTarget.get()));
@Override
public AcceptCriterion getAcceptCriterion() {
@@ -78,8 +79,8 @@ public class HorizontalLayoutSortableWithWrappers extends Window {
}
next = componentIterator.next();
}
- if (dropTargetData.getData("horizontalLocation").equals(
- "LEFT")) {
+ if (dropTargetData.getData("horizontalLocation")
+ .equals("LEFT")) {
index--;
if (index < 0) {
index = 0;
@@ -96,7 +97,8 @@ public class HorizontalLayoutSortableWithWrappers extends Window {
};
public HorizontalLayoutSortableWithWrappers() {
- setCaption("Horizontally sortable layout via (ddwrappers): Try sorting blocks by dragging them");
+ setCaption(
+ "Horizontally sortable layout via (ddwrappers): Try sorting blocks by dragging them");
DragAndDropWrapper pane = new DragAndDropWrapper(layout);
setContent(pane);
pane.setSizeFull();
diff --git a/uitest/src/main/java/com/vaadin/tests/dd/HorizontalSortableCssLayoutWithWrappers.java b/uitest/src/main/java/com/vaadin/tests/dd/HorizontalSortableCssLayoutWithWrappers.java
index d17c618f59..1d7fb5d273 100644
--- a/uitest/src/main/java/com/vaadin/tests/dd/HorizontalSortableCssLayoutWithWrappers.java
+++ b/uitest/src/main/java/com/vaadin/tests/dd/HorizontalSortableCssLayoutWithWrappers.java
@@ -72,8 +72,8 @@ public class HorizontalSortableCssLayoutWithWrappers extends Window {
}
next = componentIterator.next();
}
- if (dropTargetData.getData("horizontalLocation").equals(
- "LEFT")) {
+ if (dropTargetData.getData("horizontalLocation")
+ .equals("LEFT")) {
index--;
if (index < 0) {
index = 0;
@@ -90,7 +90,8 @@ public class HorizontalSortableCssLayoutWithWrappers extends Window {
};
public HorizontalSortableCssLayoutWithWrappers() {
- setCaption("Horizontally sortable csslayout via (ddwrappers):Try sorting blocks by draggin them");
+ setCaption(
+ "Horizontally sortable csslayout via (ddwrappers):Try sorting blocks by draggin them");
DragAndDropWrapper pane = new DragAndDropWrapper(cssLayout);
setContent(pane);
pane.setSizeFull();
diff --git a/uitest/src/main/java/com/vaadin/tests/dd/MyDragSourceConnector.java b/uitest/src/main/java/com/vaadin/tests/dd/MyDragSourceConnector.java
index 66179692b4..3aeae77dec 100644
--- a/uitest/src/main/java/com/vaadin/tests/dd/MyDragSourceConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/dd/MyDragSourceConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,8 +23,8 @@ import com.vaadin.shared.ui.Connect;
import com.vaadin.tests.dd.CustomDDImplementation.MyDragSource;
@Connect(MyDragSource.class)
-public class MyDragSourceConnector extends AbstractComponentConnector implements
- Paintable {
+public class MyDragSourceConnector extends AbstractComponentConnector
+ implements Paintable {
@Override
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
diff --git a/uitest/src/main/java/com/vaadin/tests/dd/MyDropTargetConnector.java b/uitest/src/main/java/com/vaadin/tests/dd/MyDropTargetConnector.java
index 5bbb397502..a8fb07ea2b 100644
--- a/uitest/src/main/java/com/vaadin/tests/dd/MyDropTargetConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/dd/MyDropTargetConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,8 +23,8 @@ import com.vaadin.shared.ui.Connect;
import com.vaadin.tests.dd.CustomDDImplementation.MyDropTarget;
@Connect(MyDropTarget.class)
-public class MyDropTargetConnector extends AbstractComponentConnector implements
- Paintable {
+public class MyDropTargetConnector extends AbstractComponentConnector
+ implements Paintable {
@Override
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
diff --git a/uitest/src/main/java/com/vaadin/tests/dd/NotPaintedAcceptSource.java b/uitest/src/main/java/com/vaadin/tests/dd/NotPaintedAcceptSource.java
index 020a6b56c5..ba30c32155 100644
--- a/uitest/src/main/java/com/vaadin/tests/dd/NotPaintedAcceptSource.java
+++ b/uitest/src/main/java/com/vaadin/tests/dd/NotPaintedAcceptSource.java
@@ -35,8 +35,8 @@ public class NotPaintedAcceptSource extends TestBase {
public void drop(DragAndDropEvent event) {
TableTransferable transferable = (TableTransferable) event
.getTransferable();
- Item item = transferable.getSourceComponent().getItem(
- transferable.getItemId());
+ Item item = transferable.getSourceComponent()
+ .getItem(transferable.getItemId());
Object value = item.getItemProperty("value").getValue();
AbstractSelectTargetDetails targetDetails = (AbstractSelectTargetDetails) event
.getTargetDetails();
@@ -44,8 +44,8 @@ public class NotPaintedAcceptSource extends TestBase {
Object addItemAfter = target.addItemAfter(targetItemId);
target.getItem(addItemAfter).getItemProperty("value")
.setValue(value);
- transferable.getSourceComponent().removeItem(
- transferable.getItemId());
+ transferable.getSourceComponent()
+ .removeItem(transferable.getItemId());
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/dd/NotPaintedAcceptSourceInTabSheet.java b/uitest/src/main/java/com/vaadin/tests/dd/NotPaintedAcceptSourceInTabSheet.java
index e19bbaf2c5..974e10eb19 100644
--- a/uitest/src/main/java/com/vaadin/tests/dd/NotPaintedAcceptSourceInTabSheet.java
+++ b/uitest/src/main/java/com/vaadin/tests/dd/NotPaintedAcceptSourceInTabSheet.java
@@ -33,8 +33,8 @@ public class NotPaintedAcceptSourceInTabSheet extends TestBase {
public void drop(DragAndDropEvent event) {
TableTransferable transferable = (TableTransferable) event
.getTransferable();
- Item item = transferable.getSourceComponent().getItem(
- transferable.getItemId());
+ Item item = transferable.getSourceComponent()
+ .getItem(transferable.getItemId());
Object value = item.getItemProperty("value").getValue();
AbstractSelectTargetDetails targetDetails = (AbstractSelectTargetDetails) event
.getTargetDetails();
@@ -42,8 +42,8 @@ public class NotPaintedAcceptSourceInTabSheet extends TestBase {
Object addItemAfter = target.addItemAfter(targetItemId);
target.getItem(addItemAfter).getItemProperty("value")
.setValue(value);
- transferable.getSourceComponent().removeItem(
- transferable.getItemId());
+ transferable.getSourceComponent()
+ .removeItem(transferable.getItemId());
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/dd/StartHtml5Drag.java b/uitest/src/main/java/com/vaadin/tests/dd/StartHtml5Drag.java
index 609b2fe4fc..be940f64d4 100644
--- a/uitest/src/main/java/com/vaadin/tests/dd/StartHtml5Drag.java
+++ b/uitest/src/main/java/com/vaadin/tests/dd/StartHtml5Drag.java
@@ -17,14 +17,14 @@ public class StartHtml5Drag extends TestBase {
@Override
protected void setup() {
- DragAndDropWrapper dragStart = new DragAndDropWrapper(new Label(
- "Drag me"));
+ DragAndDropWrapper dragStart = new DragAndDropWrapper(
+ new Label("Drag me"));
dragStart.setDragStartMode(DragStartMode.HTML5);
dragStart.setHTML5DataFlavor("Text", "HTML5!");
addComponent(dragStart);
- DragAndDropWrapper dropTarget = new DragAndDropWrapper(new Label(
- "over here"));
+ DragAndDropWrapper dropTarget = new DragAndDropWrapper(
+ new Label("over here"));
dropTarget.setDropHandler(new DropHandler() {
@Override
@@ -34,12 +34,9 @@ public class StartHtml5Drag extends TestBase {
@Override
public void drop(DragAndDropEvent event) {
- getWindows()
- .iterator()
- .next()
- .showNotification(
- ((WrapperTransferable) event.getTransferable())
- .getText());
+ getWindows().iterator().next().showNotification(
+ ((WrapperTransferable) event.getTransferable())
+ .getText());
}
});
addComponent(dropTarget);
diff --git a/uitest/src/main/java/com/vaadin/tests/dd/TreeDragStart.java b/uitest/src/main/java/com/vaadin/tests/dd/TreeDragStart.java
index b86cb361c0..ae92e32460 100644
--- a/uitest/src/main/java/com/vaadin/tests/dd/TreeDragStart.java
+++ b/uitest/src/main/java/com/vaadin/tests/dd/TreeDragStart.java
@@ -81,8 +81,8 @@ public class TreeDragStart extends TestBase {
public AcceptCriterion getAcceptCriterion() {
// Accept drops in the middle of container items
// and below and above all items.
- return new Or(Tree.TargetItemAllowsChildren.get(), new Not(
- VerticalLocationIs.MIDDLE));
+ return new Or(Tree.TargetItemAllowsChildren.get(),
+ new Not(VerticalLocationIs.MIDDLE));
}
@Override
@@ -259,20 +259,17 @@ public class TreeDragStart extends TestBase {
new InventoryObject("+5 Quarterstaff (blessed)", 3.5, false),
new InventoryObject("+3 Elven Dagger (blessed)", 0.2, false),
new InventoryObject("+5 Helmet (greased)", 1.5, false),
- new Object[] {
- new InventoryObject("Sack", 0.2, true),
+ new Object[] { new InventoryObject("Sack", 0.2, true),
new InventoryObject("Pick-Axe", 2.5, false),
new InventoryObject("Lock Pick", 0.1, false),
new InventoryObject("Tinning Kit", 0.5, false),
new InventoryObject("Potion of Healing (blessed)", 0.7,
false), },
- new Object[] {
- new InventoryObject("Bag of Holding", 0.1, true),
+ new Object[] { new InventoryObject("Bag of Holding", 0.1, true),
new InventoryObject("Magic Marker", 0.05, false),
new InventoryObject("Can of Grease (blessed)", 0.5,
false), },
- new Object[] {
- new InventoryObject("Chest", 10.0, true),
+ new Object[] { new InventoryObject("Chest", 10.0, true),
new InventoryObject("Scroll of Identify", 0.1, false),
new InventoryObject("Scroll of Genocide", 0.1, false),
new InventoryObject("Towel", 0.3, false),
@@ -308,8 +305,8 @@ public class TreeDragStart extends TestBase {
put(sub, item, container);
}
- inventoryStore
- .put(item.getBean().getName(), item.getBean());
+ inventoryStore.put(item.getBean().getName(),
+ item.getBean());
}
}
}.put(inventory, null, container);
diff --git a/uitest/src/main/java/com/vaadin/tests/dd/VMyDragSource.java b/uitest/src/main/java/com/vaadin/tests/dd/VMyDragSource.java
index 8cca6d6459..41f25bf02b 100644
--- a/uitest/src/main/java/com/vaadin/tests/dd/VMyDragSource.java
+++ b/uitest/src/main/java/com/vaadin/tests/dd/VMyDragSource.java
@@ -17,8 +17,8 @@ import com.vaadin.client.ui.dd.VTransferable;
/**
* Example code to implement Component that has something to drag.
*/
-public class VMyDragSource extends Composite implements MouseDownHandler,
- MouseMoveHandler, MouseOutHandler {
+public class VMyDragSource extends Composite
+ implements MouseDownHandler, MouseMoveHandler, MouseOutHandler {
private boolean mouseDown;
private MouseDownEvent mDownEvent;
diff --git a/uitest/src/main/java/com/vaadin/tests/dd/VMyDropTarget.java b/uitest/src/main/java/com/vaadin/tests/dd/VMyDropTarget.java
index 58bd326524..ace53d0421 100644
--- a/uitest/src/main/java/com/vaadin/tests/dd/VMyDropTarget.java
+++ b/uitest/src/main/java/com/vaadin/tests/dd/VMyDropTarget.java
@@ -7,8 +7,8 @@ import com.vaadin.client.ui.dd.VDragEvent;
import com.vaadin.client.ui.dd.VDropHandler;
import com.vaadin.client.ui.dd.VHasDropHandler;
-public class VMyDropTarget extends Composite implements VHasDropHandler,
- VDropHandler {
+public class VMyDropTarget extends Composite
+ implements VHasDropHandler, VDropHandler {
ApplicationConnection client;
diff --git a/uitest/src/main/java/com/vaadin/tests/debug/HierarchyAfterAnalyzeLayouts.java b/uitest/src/main/java/com/vaadin/tests/debug/HierarchyAfterAnalyzeLayouts.java
index 88b0386c97..89ce67cda7 100644
--- a/uitest/src/main/java/com/vaadin/tests/debug/HierarchyAfterAnalyzeLayouts.java
+++ b/uitest/src/main/java/com/vaadin/tests/debug/HierarchyAfterAnalyzeLayouts.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/debug/PreserveCustomDebugSectionOpen.java b/uitest/src/main/java/com/vaadin/tests/debug/PreserveCustomDebugSectionOpen.java
index 0ac2e87510..5c6d587884 100644
--- a/uitest/src/main/java/com/vaadin/tests/debug/PreserveCustomDebugSectionOpen.java
+++ b/uitest/src/main/java/com/vaadin/tests/debug/PreserveCustomDebugSectionOpen.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/debug/ProfilerZeroOverhead.java b/uitest/src/main/java/com/vaadin/tests/debug/ProfilerZeroOverhead.java
index 7daf38a0e5..04a16589ce 100644
--- a/uitest/src/main/java/com/vaadin/tests/debug/ProfilerZeroOverhead.java
+++ b/uitest/src/main/java/com/vaadin/tests/debug/ProfilerZeroOverhead.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/debug/PushVersionInfo.java b/uitest/src/main/java/com/vaadin/tests/debug/PushVersionInfo.java
index d8c23a390f..183ae96436 100644
--- a/uitest/src/main/java/com/vaadin/tests/debug/PushVersionInfo.java
+++ b/uitest/src/main/java/com/vaadin/tests/debug/PushVersionInfo.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.ui.Label;
/**
* Test UI for PUSH version string in debug window.
- *
+ *
* @author Vaadin Ltd
*/
public class PushVersionInfo extends AbstractTestUI {
diff --git a/uitest/src/main/java/com/vaadin/tests/declarative/DeclarativeEditor.java b/uitest/src/main/java/com/vaadin/tests/declarative/DeclarativeEditor.java
index d62f71b513..eec5a0c289 100644
--- a/uitest/src/main/java/com/vaadin/tests/declarative/DeclarativeEditor.java
+++ b/uitest/src/main/java/com/vaadin/tests/declarative/DeclarativeEditor.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -54,8 +54,8 @@ public class DeclarativeEditor extends UI {
editor = new TextArea();
editor.setSizeFull();
try {
- editor.setValue(IOUtils.toString(getClass().getResourceAsStream(
- "DeclarativeEditorInitial.html")));
+ editor.setValue(IOUtils.toString(getClass()
+ .getResourceAsStream("DeclarativeEditorInitial.html")));
} catch (ReadOnlyException e) {
e.printStackTrace();
} catch (IOException e) {
diff --git a/uitest/src/main/java/com/vaadin/tests/declarative/Potus.java b/uitest/src/main/java/com/vaadin/tests/declarative/Potus.java
index 23448a9b7f..a203a7464a 100644
--- a/uitest/src/main/java/com/vaadin/tests/declarative/Potus.java
+++ b/uitest/src/main/java/com/vaadin/tests/declarative/Potus.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -18,7 +18,7 @@ package com.vaadin.tests.declarative;
import java.util.Date;
/**
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/declarative/PotusCrud.java b/uitest/src/main/java/com/vaadin/tests/declarative/PotusCrud.java
index 70ad956045..cc5a5748f6 100644
--- a/uitest/src/main/java/com/vaadin/tests/declarative/PotusCrud.java
+++ b/uitest/src/main/java/com/vaadin/tests/declarative/PotusCrud.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/declarative/PotusCrudUI.java b/uitest/src/main/java/com/vaadin/tests/declarative/PotusCrudUI.java
index f1d94f7f16..cffa7924cd 100644
--- a/uitest/src/main/java/com/vaadin/tests/declarative/PotusCrudUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/declarative/PotusCrudUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import com.vaadin.server.VaadinRequest;
import com.vaadin.ui.UI;
/**
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/declarative/PotusForm.java b/uitest/src/main/java/com/vaadin/tests/declarative/PotusForm.java
index 506a25f663..8fec33ac33 100644
--- a/uitest/src/main/java/com/vaadin/tests/declarative/PotusForm.java
+++ b/uitest/src/main/java/com/vaadin/tests/declarative/PotusForm.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/errorhandler/ErrorHandlers.java b/uitest/src/main/java/com/vaadin/tests/errorhandler/ErrorHandlers.java
index a123af0f7d..1d22a98ae2 100644
--- a/uitest/src/main/java/com/vaadin/tests/errorhandler/ErrorHandlers.java
+++ b/uitest/src/main/java/com/vaadin/tests/errorhandler/ErrorHandlers.java
@@ -32,8 +32,8 @@ public class ErrorHandlers extends AbstractTestUI {
protected void setup(VaadinRequest request) {
addComponent(runtimeExceptionOnClick(new Button("Standard button")));
addComponent(npeOnClick(new Button("Standard button with NPE")));
- Button customErrorButton = notificationErrorHandler(new Button(
- "Button with notification error handler"));
+ Button customErrorButton = notificationErrorHandler(
+ new Button("Button with notification error handler"));
addComponent(runtimeExceptionOnClick(customErrorButton));
final VerticalLayout layoutWithErrorHandler = new VerticalLayout(
@@ -42,15 +42,14 @@ public class ErrorHandlers extends AbstractTestUI {
@Override
public void error(com.vaadin.server.ErrorEvent event) {
- layoutWithErrorHandler.addComponent(new Label("Layout error: "
- + getErrorMessage(event)));
+ layoutWithErrorHandler.addComponent(
+ new Label("Layout error: " + getErrorMessage(event)));
}
};
layoutWithErrorHandler.setErrorHandler(e);
- layoutWithErrorHandler
- .addComponent(notificationErrorHandler(npeOnClick(new Button(
- "Error handler on button and parent"))));
+ layoutWithErrorHandler.addComponent(notificationErrorHandler(
+ npeOnClick(new Button("Error handler on button and parent"))));
addComponent(layoutWithErrorHandler);
}
@@ -59,7 +58,8 @@ public class ErrorHandlers extends AbstractTestUI {
return button;
}
- protected static String getErrorMessage(com.vaadin.server.ErrorEvent event) {
+ protected static String getErrorMessage(
+ com.vaadin.server.ErrorEvent event) {
Component c = DefaultErrorHandler.findAbstractComponent(event);
String errorMsg = "Error: '" + getMessage(event) + "' in ";
errorMsg += c.getClass().getSimpleName() + " with caption '"
diff --git a/uitest/src/main/java/com/vaadin/tests/extensions/BasicExtension.java b/uitest/src/main/java/com/vaadin/tests/extensions/BasicExtension.java
index a9615ff5d7..5ea476bfe3 100644
--- a/uitest/src/main/java/com/vaadin/tests/extensions/BasicExtension.java
+++ b/uitest/src/main/java/com/vaadin/tests/extensions/BasicExtension.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/extensions/BasicExtensionTest.java b/uitest/src/main/java/com/vaadin/tests/extensions/BasicExtensionTest.java
index c56cfb10ab..a019cc5b8a 100644
--- a/uitest/src/main/java/com/vaadin/tests/extensions/BasicExtensionTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/extensions/BasicExtensionTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/extensions/BrowserPopupExtensionTest.java b/uitest/src/main/java/com/vaadin/tests/extensions/BrowserPopupExtensionTest.java
index 732b1aca74..ff3ab1767b 100644
--- a/uitest/src/main/java/com/vaadin/tests/extensions/BrowserPopupExtensionTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/extensions/BrowserPopupExtensionTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2012 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/extensions/HelloWorldExtension.java b/uitest/src/main/java/com/vaadin/tests/extensions/HelloWorldExtension.java
index 34711a4b92..ffb10801bc 100644
--- a/uitest/src/main/java/com/vaadin/tests/extensions/HelloWorldExtension.java
+++ b/uitest/src/main/java/com/vaadin/tests/extensions/HelloWorldExtension.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/extensions/HelloWorldExtensionTest.java b/uitest/src/main/java/com/vaadin/tests/extensions/HelloWorldExtensionTest.java
index 021d2dfa30..f90ab259ac 100644
--- a/uitest/src/main/java/com/vaadin/tests/extensions/HelloWorldExtensionTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/extensions/HelloWorldExtensionTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/extensions/IframeIsOpenedInNonIOS.java b/uitest/src/main/java/com/vaadin/tests/extensions/IframeIsOpenedInNonIOS.java
index d1b2e12e42..8825e36dd5 100644
--- a/uitest/src/main/java/com/vaadin/tests/extensions/IframeIsOpenedInNonIOS.java
+++ b/uitest/src/main/java/com/vaadin/tests/extensions/IframeIsOpenedInNonIOS.java
@@ -18,8 +18,8 @@ public class IframeIsOpenedInNonIOS extends AbstractTestUI {
protected void setup(VaadinRequest request) {
final Label errorLabel = new Label("No error");
Button button = new Button("Download");
- FileDownloader downloader = new FileDownloader(new StreamResource(
- new StreamResource.StreamSource() {
+ FileDownloader downloader = new FileDownloader(
+ new StreamResource(new StreamResource.StreamSource() {
@Override
public InputStream getStream() {
return createSomeFile();
diff --git a/uitest/src/main/java/com/vaadin/tests/extensions/JavascriptManagerTest.java b/uitest/src/main/java/com/vaadin/tests/extensions/JavascriptManagerTest.java
index f2a8b24cb1..f7f829aefc 100644
--- a/uitest/src/main/java/com/vaadin/tests/extensions/JavascriptManagerTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/extensions/JavascriptManagerTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/extensions/LayoutMemoryUsageIE8Extension.java b/uitest/src/main/java/com/vaadin/tests/extensions/LayoutMemoryUsageIE8Extension.java
index f61d3b8bdd..201ca0d4a0 100644
--- a/uitest/src/main/java/com/vaadin/tests/extensions/LayoutMemoryUsageIE8Extension.java
+++ b/uitest/src/main/java/com/vaadin/tests/extensions/LayoutMemoryUsageIE8Extension.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,11 +21,11 @@ import com.vaadin.ui.UI;
/**
* Test extension for finding out the size of the measuredSizes map of
* LayoutManagerIE8.
- *
+ *
* This UI extension uses JSNI to register a JavaScript method
* window.vaadin.getMeasuredSizesCount() that can be used to query the size of
* the internal map of the layout manager. It should only be used on IE8.
- *
+ *
* @since 7.1.13
* @author Vaadin Ltd
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/extensions/ResponsiveUI.java b/uitest/src/main/java/com/vaadin/tests/extensions/ResponsiveUI.java
index f534215e18..73dba06fe3 100644
--- a/uitest/src/main/java/com/vaadin/tests/extensions/ResponsiveUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/extensions/ResponsiveUI.java
@@ -51,7 +51,8 @@ public class ResponsiveUI extends AbstractTestUI {
+ "span the entire width of the container.</p><p>This label will "
+ "adapt its font size and line height for different widths.</p>"
+ "<p><a href=\"http://vaadin.com/download\">Download "
- + "Vaadin</a></p>", ContentMode.HTML);
+ + "Vaadin</a></p>",
+ ContentMode.HTML);
description.addStyleName("description");
split.addComponent(description);
diff --git a/uitest/src/main/java/com/vaadin/tests/extensions/ResponsiveWithCrossDomainStyles.java b/uitest/src/main/java/com/vaadin/tests/extensions/ResponsiveWithCrossDomainStyles.java
index 9f9453d505..129ede05a3 100644
--- a/uitest/src/main/java/com/vaadin/tests/extensions/ResponsiveWithCrossDomainStyles.java
+++ b/uitest/src/main/java/com/vaadin/tests/extensions/ResponsiveWithCrossDomainStyles.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/extensions/SetThemeAndResponsiveLayout.java b/uitest/src/main/java/com/vaadin/tests/extensions/SetThemeAndResponsiveLayout.java
index f3df1a1176..1d0418d671 100644
--- a/uitest/src/main/java/com/vaadin/tests/extensions/SetThemeAndResponsiveLayout.java
+++ b/uitest/src/main/java/com/vaadin/tests/extensions/SetThemeAndResponsiveLayout.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,9 +32,8 @@ public class SetThemeAndResponsiveLayout extends AbstractTestUI {
responsiveLayout.addStyleName("width-and-height");
responsiveLayout.setSizeFull();
setContent(responsiveLayout);
- responsiveLayout
- .addComponent(new Label(
- "First set the theme using the button and then resize the browser window in both dimensions to see the background color change."));
+ responsiveLayout.addComponent(new Label(
+ "First set the theme using the button and then resize the browser window in both dimensions to see the background color change."));
Button setThemeButton = new Button("Set theme");
setThemeButton.addClickListener(new Button.ClickListener() {
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/extensions/SimpleJavaScriptExtensionTest.java b/uitest/src/main/java/com/vaadin/tests/extensions/SimpleJavaScriptExtensionTest.java
index 6f14fb301c..a095276355 100644
--- a/uitest/src/main/java/com/vaadin/tests/extensions/SimpleJavaScriptExtensionTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/extensions/SimpleJavaScriptExtensionTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,8 +32,8 @@ import elemental.json.JsonArray;
public class SimpleJavaScriptExtensionTest extends AbstractTestUI {
- public static class SimpleJavaScriptExtensionState extends
- JavaScriptExtensionState {
+ public static class SimpleJavaScriptExtensionState
+ extends JavaScriptExtensionState {
private String prefix;
public void setPrefix(String prefix) {
@@ -45,20 +45,20 @@ public class SimpleJavaScriptExtensionTest extends AbstractTestUI {
}
}
- public static interface SimpleJavaScriptExtensionClientRpc extends
- ClientRpc {
+ public static interface SimpleJavaScriptExtensionClientRpc
+ extends ClientRpc {
public void greet(String message);
}
- public static interface SimpleJavaScriptExtensionServerRpc extends
- ServerRpc {
+ public static interface SimpleJavaScriptExtensionServerRpc
+ extends ServerRpc {
public void greet(String message);
}
@JavaScript("/statictestfiles/jsextension.js")
@StyleSheet("/VAADIN/external1.css")
- public static class SimpleJavascriptExtension extends
- AbstractJavaScriptExtension {
+ public static class SimpleJavascriptExtension
+ extends AbstractJavaScriptExtension {
public SimpleJavascriptExtension() {
registerRpc(new SimpleJavaScriptExtensionServerRpc() {
@@ -70,8 +70,8 @@ public class SimpleJavaScriptExtensionTest extends AbstractTestUI {
addFunction("greetToServer", new JavaScriptFunction() {
@Override
public void call(JsonArray arguments) {
- Notification.show(getState().getPrefix()
- + arguments.getString(0));
+ Notification.show(
+ getState().getPrefix() + arguments.getString(0));
}
});
}
@@ -100,8 +100,8 @@ public class SimpleJavaScriptExtensionTest extends AbstractTestUI {
final SimpleJavascriptExtension simpleJavascriptExtension = new SimpleJavascriptExtension();
simpleJavascriptExtension.setPrefix("Prefix: ");
addExtension(simpleJavascriptExtension);
- addComponent(new Button("Send rpc greeting",
- new Button.ClickListener() {
+ addComponent(
+ new Button("Send rpc greeting", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
simpleJavascriptExtension.greetRpc("Rpc greeting");
diff --git a/uitest/src/main/java/com/vaadin/tests/fieldgroup/AbstractBasicCrud.java b/uitest/src/main/java/com/vaadin/tests/fieldgroup/AbstractBasicCrud.java
index 0405ea2e10..5c7a83385e 100644
--- a/uitest/src/main/java/com/vaadin/tests/fieldgroup/AbstractBasicCrud.java
+++ b/uitest/src/main/java/com/vaadin/tests/fieldgroup/AbstractBasicCrud.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -64,7 +64,7 @@ public abstract class AbstractBasicCrud extends AbstractTestUIWithLog {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -134,7 +134,7 @@ public abstract class AbstractBasicCrud extends AbstractTestUIWithLog {
/*
* Currently only sets the initial state because of
* https://dev.vaadin.com/ticket/17847
- *
+ *
* Must set lastName state initially as BeanFieldGroup can't tell it
* should be read-only before setting an item data source
*/
@@ -264,8 +264,8 @@ public abstract class AbstractBasicCrud extends AbstractTestUIWithLog {
public AutoGeneratedForm(Class<? extends Field> class1) {
for (String p : columns) {
- Field f = fieldGroup.getFieldFactory().createField(
- container.getType(p), class1);
+ Field f = fieldGroup.getFieldFactory()
+ .createField(container.getType(p), class1);
f.setCaption(SharedUtil.propertyIdToHumanFriendly(p));
fieldGroup.bind(f, p);
addComponent(f);
diff --git a/uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicCrudGrid.java b/uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicCrudGrid.java
index d7f66b0cd9..4db138281b 100644
--- a/uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicCrudGrid.java
+++ b/uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicCrudGrid.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -39,8 +39,8 @@ public class BasicCrudGrid extends AbstractBasicCrud {
@Override
public void select(SelectionEvent event) {
- Item item = grid.getContainerDataSource().getItem(
- grid.getSelectedRow());
+ Item item = grid.getContainerDataSource()
+ .getItem(grid.getSelectedRow());
form.edit((BeanItem<ComplexPerson>) item);
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicCrudGridEditorRow.java b/uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicCrudGridEditorRow.java
index 0fc0669288..20719214d0 100644
--- a/uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicCrudGridEditorRow.java
+++ b/uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicCrudGridEditorRow.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -44,21 +44,17 @@ public class BasicCrudGridEditorRow extends AbstractBasicCrud {
grid.addSelectionListener(new SelectionListener() {
@Override
public void select(SelectionEvent event) {
- Item item = grid.getContainerDataSource().getItem(
- grid.getSelectedRow());
+ Item item = grid.getContainerDataSource()
+ .getItem(grid.getSelectedRow());
form.edit((BeanItem<ComplexPerson>) item);
}
});
grid.setEditorEnabled(true);
grid.setSizeFull();
- grid.getColumn("age")
- .getEditorField()
- .addValidator(
- new IntegerRangeValidator("Must be between 0 and 100",
- 0, 100));
- grid.getColumn("birthDate").setRenderer(
- new DateRenderer(DateFormat.getDateInstance(DateFormat.MEDIUM,
- Locale.US)));
+ grid.getColumn("age").getEditorField().addValidator(
+ new IntegerRangeValidator("Must be between 0 and 100", 0, 100));
+ grid.getColumn("birthDate").setRenderer(new DateRenderer(
+ DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.US)));
addComponent(grid);
getLayout().setExpandRatio(grid, 1);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicCrudTable.java b/uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicCrudTable.java
index ad54cd55ba..664299451a 100644
--- a/uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicCrudTable.java
+++ b/uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicCrudTable.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -38,8 +38,8 @@ public class BasicCrudTable extends AbstractBasicCrud {
table.addValueChangeListener(new ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
- form.edit((BeanItem<ComplexPerson>) table.getItem(table
- .getValue()));
+ form.edit((BeanItem<ComplexPerson>) table
+ .getItem(table.getValue()));
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicPersonForm.java b/uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicPersonForm.java
index 52d3e60af5..5feda6c261 100644
--- a/uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicPersonForm.java
+++ b/uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicPersonForm.java
@@ -71,8 +71,8 @@ public class BasicPersonForm extends AbstractTestUIWithLog {
confFieldGroup.setBuffered(false);
for (Object propertyId : bi.getItemPropertyIds()) {
- ((ComponentContainer) getContent()).addComponent(confFieldGroup
- .buildAndBind(propertyId));
+ ((ComponentContainer) getContent())
+ .addComponent(confFieldGroup.buildAndBind(propertyId));
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/fieldgroup/ComplexAddress.java b/uitest/src/main/java/com/vaadin/tests/fieldgroup/ComplexAddress.java
index d6d657379a..6444af1bf7 100644
--- a/uitest/src/main/java/com/vaadin/tests/fieldgroup/ComplexAddress.java
+++ b/uitest/src/main/java/com/vaadin/tests/fieldgroup/ComplexAddress.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/fieldgroup/ComplexPerson.java b/uitest/src/main/java/com/vaadin/tests/fieldgroup/ComplexPerson.java
index bb4fe89575..3570448964 100644
--- a/uitest/src/main/java/com/vaadin/tests/fieldgroup/ComplexPerson.java
+++ b/uitest/src/main/java/com/vaadin/tests/fieldgroup/ComplexPerson.java
@@ -96,8 +96,8 @@ public class ComplexPerson {
cp.lastName = TestDataGenerator.getLastName(r);
cp.setAlive(r.nextBoolean());
cp.setBirthDate(TestDataGenerator.getBirthDate(r));
- cp.setAge((int) ((new Date(2014 - 1900, 1, 1).getTime() - cp
- .getBirthDate().getTime()) / 1000 / 3600 / 24 / 365));
+ cp.setAge((int) ((new Date(2014 - 1900, 1, 1).getTime()
+ - cp.getBirthDate().getTime()) / 1000 / 3600 / 24 / 365));
cp.setSalary(TestDataGenerator.getSalary(r));
cp.setAddress(ComplexAddress.create(r));
cp.setGender(TestDataGenerator.getEnum(Gender.class, r));
diff --git a/uitest/src/main/java/com/vaadin/tests/fieldgroup/Country.java b/uitest/src/main/java/com/vaadin/tests/fieldgroup/Country.java
index 2c2ffd7160..11ff8f1cdd 100644
--- a/uitest/src/main/java/com/vaadin/tests/fieldgroup/Country.java
+++ b/uitest/src/main/java/com/vaadin/tests/fieldgroup/Country.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/fieldgroup/DateForm.java b/uitest/src/main/java/com/vaadin/tests/fieldgroup/DateForm.java
index 6080f18391..8bea8a0bdf 100644
--- a/uitest/src/main/java/com/vaadin/tests/fieldgroup/DateForm.java
+++ b/uitest/src/main/java/com/vaadin/tests/fieldgroup/DateForm.java
@@ -127,8 +127,8 @@ public class DateForm extends AbstractTestUIWithLog {
addComponent(discardButton);
addComponent(showBean);
- DateObject d = new DateObject(new Date(443457289789L), new Date(
- 443457289789L), new Date(443457289789L),
+ DateObject d = new DateObject(new Date(443457289789L),
+ new Date(443457289789L), new Date(443457289789L),
new Date(443457289789L));
fieldGroup.setItemDataSource(new BeanItem<DateObject>(d));
}
diff --git a/uitest/src/main/java/com/vaadin/tests/fieldgroup/FieldBinderWithBeanValidation.java b/uitest/src/main/java/com/vaadin/tests/fieldgroup/FieldBinderWithBeanValidation.java
index 2c202af02b..e5ad382dfe 100644
--- a/uitest/src/main/java/com/vaadin/tests/fieldgroup/FieldBinderWithBeanValidation.java
+++ b/uitest/src/main/java/com/vaadin/tests/fieldgroup/FieldBinderWithBeanValidation.java
@@ -82,11 +82,10 @@ public class FieldBinderWithBeanValidation extends TestBase {
sex.setPageLength(0);
PersonWithBeanValidationAnnotations p = new PersonWithBeanValidationAnnotations(
- "John", "Doe", "john@doe.com", 64, Sex.MALE, new Address(
- "John street", 11223, "John's town", Country.USA));
- fieldGroup
- .setItemDataSource(new BeanItem<PersonWithBeanValidationAnnotations>(
- p));
+ "John", "Doe", "john@doe.com", 64, Sex.MALE,
+ new Address("John street", 11223, "John's town", Country.USA));
+ fieldGroup.setItemDataSource(
+ new BeanItem<PersonWithBeanValidationAnnotations>(p));
}
public static PersonWithBeanValidationAnnotations getPerson(
diff --git a/uitest/src/main/java/com/vaadin/tests/fieldgroup/FormBuilderWithNestedProperties.java b/uitest/src/main/java/com/vaadin/tests/fieldgroup/FormBuilderWithNestedProperties.java
index 5f25070f2e..eb3aadea92 100644
--- a/uitest/src/main/java/com/vaadin/tests/fieldgroup/FormBuilderWithNestedProperties.java
+++ b/uitest/src/main/java/com/vaadin/tests/fieldgroup/FormBuilderWithNestedProperties.java
@@ -28,8 +28,8 @@ public class FormBuilderWithNestedProperties extends TestBase {
addComponent(streetAddress);
fieldGroup.setItemDataSource(new BeanItem<Person>(new Person("Who",
- "me?", "email", 1, Sex.MALE, new Address("street name", 202020,
- "City", Country.FINLAND))));
+ "me?", "email", 1, Sex.MALE,
+ new Address("street name", 202020, "City", Country.FINLAND))));
}
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/fieldgroup/FormWithNestedProperties.java b/uitest/src/main/java/com/vaadin/tests/fieldgroup/FormWithNestedProperties.java
index 6caa8f3e26..71c310d764 100644
--- a/uitest/src/main/java/com/vaadin/tests/fieldgroup/FormWithNestedProperties.java
+++ b/uitest/src/main/java/com/vaadin/tests/fieldgroup/FormWithNestedProperties.java
@@ -45,10 +45,9 @@ public class FormWithNestedProperties extends AbstractBeanFieldGroupTest {
addComponent(getDiscardButton());
addComponent(getShowBeanButton());
- getFieldBinder().setItemDataSource(
- new Person("First", "Last", "Email", 52, Sex.FEMALE,
- new Address("street address", 01234, "City",
- Country.FINLAND)));
+ getFieldBinder().setItemDataSource(new Person("First", "Last", "Email",
+ 52, Sex.FEMALE,
+ new Address("street address", 01234, "City", Country.FINLAND)));
}
diff --git a/uitest/src/main/java/com/vaadin/tests/fieldgroup/Gender.java b/uitest/src/main/java/com/vaadin/tests/fieldgroup/Gender.java
index dcc6687c17..706e4c2d2d 100644
--- a/uitest/src/main/java/com/vaadin/tests/fieldgroup/Gender.java
+++ b/uitest/src/main/java/com/vaadin/tests/fieldgroup/Gender.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/fieldgroup/MultipleValidationErrors.java b/uitest/src/main/java/com/vaadin/tests/fieldgroup/MultipleValidationErrors.java
index 58f2292f84..c2d1b67e8b 100644
--- a/uitest/src/main/java/com/vaadin/tests/fieldgroup/MultipleValidationErrors.java
+++ b/uitest/src/main/java/com/vaadin/tests/fieldgroup/MultipleValidationErrors.java
@@ -39,8 +39,8 @@ public class MultipleValidationErrors extends AbstractTestUI {
try {
fieldGroup.commit();
} catch (FieldGroup.CommitException e) {
- if (e.getCause() != null
- && e.getCause() instanceof Validator.InvalidValueException) {
+ if (e.getCause() != null && e
+ .getCause() instanceof Validator.InvalidValueException) {
validationErrors.setValue(StringEscapeUtils
.unescapeHtml(AbstractErrorMessage
.getErrorMessageForException(
diff --git a/uitest/src/main/java/com/vaadin/tests/fonticon/FontIcons.java b/uitest/src/main/java/com/vaadin/tests/fonticon/FontIcons.java
index e9d2b91e95..37f0fa6452 100644
--- a/uitest/src/main/java/com/vaadin/tests/fonticon/FontIcons.java
+++ b/uitest/src/main/java/com/vaadin/tests/fonticon/FontIcons.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -71,13 +71,13 @@ public class FontIcons extends AbstractTestUI {
layout.setIcon(icon);
- layout.addComponent(new Button("Switch icon type",
- new Button.ClickListener() {
+ layout.addComponent(
+ new Button("Switch icon type", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- buildUI(icon instanceof FontIcon ? new ThemeResource(
- "../runo/icons/16/user.png")
+ buildUI(icon instanceof FontIcon
+ ? new ThemeResource("../runo/icons/16/user.png")
: FontAwesome.ANDROID);
}
}));
@@ -86,7 +86,8 @@ public class FontIcons extends AbstractTestUI {
Action[] actions = { new Action("Do it!", icon) };
@Override
- public void handleAction(Action action, Object sender, Object target) {
+ public void handleAction(Action action, Object sender,
+ Object target) {
}
@@ -109,10 +110,9 @@ public class FontIcons extends AbstractTestUI {
layout.addComponent(gl);
// Basic components, caption icon only
- Class<?>[] components = { Button.class, CheckBox.class,
- DateField.class, NativeButton.class, Link.class, Label.class,
- Panel.class, Slider.class, TextArea.class, TextField.class,
- Upload.class };
+ Class<?>[] components = { Button.class, CheckBox.class, DateField.class,
+ NativeButton.class, Link.class, Label.class, Panel.class,
+ Slider.class, TextArea.class, TextField.class, Upload.class };
for (Class<?> clazz : components) {
Component c;
try {
diff --git a/uitest/src/main/java/com/vaadin/tests/integration/FlagSeResource.java b/uitest/src/main/java/com/vaadin/tests/integration/FlagSeResource.java
index 6c2fcdc2d4..dc214448a8 100644
--- a/uitest/src/main/java/com/vaadin/tests/integration/FlagSeResource.java
+++ b/uitest/src/main/java/com/vaadin/tests/integration/FlagSeResource.java
@@ -6,11 +6,9 @@ public class FlagSeResource extends ClassResource {
public FlagSeResource() {
super("/"
- + FlagSeResource.class
- .getName()
- .replace('.', '/')
- .replaceAll(FlagSeResource.class.getSimpleName() + "$",
- "") + "se.gif");
+ + FlagSeResource.class.getName().replace('.', '/').replaceAll(
+ FlagSeResource.class.getSimpleName() + "$", "")
+ + "se.gif");
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/integration/JSR286Portlet.java b/uitest/src/main/java/com/vaadin/tests/integration/JSR286Portlet.java
index 800a056041..78b51c7ecd 100644
--- a/uitest/src/main/java/com/vaadin/tests/integration/JSR286Portlet.java
+++ b/uitest/src/main/java/com/vaadin/tests/integration/JSR286Portlet.java
@@ -84,7 +84,8 @@ public class JSR286Portlet extends UI {
Upload upload = new Upload("Upload a file", new Receiver() {
@Override
- public OutputStream receiveUpload(String filename, String mimeType) {
+ public OutputStream receiveUpload(String filename,
+ String mimeType) {
return new ByteArrayOutputStream();
}
});
@@ -114,18 +115,20 @@ public class JSR286Portlet extends UI {
String censoredUserAgent = getPage().getWebBrowser()
.getBrowserApplication();
- if (censoredUserAgent != null && censoredUserAgent.contains("Chrome/")) {
+ if (censoredUserAgent != null
+ && censoredUserAgent.contains("Chrome/")) {
// Censor version info as it tends to change
censoredUserAgent = censoredUserAgent.replaceAll("Chrome/[^ ]* ",
"Chrome/xyz ");
}
userAgent.setValue(censoredUserAgent);
screenWidth.setValue(String.valueOf(getPage().getBrowserWindowWidth()));
- screenHeight.setValue(String
- .valueOf(getPage().getBrowserWindowHeight()));
+ screenHeight
+ .setValue(String.valueOf(getPage().getBrowserWindowHeight()));
boolean inViewMode = (request.getPortletMode() == PortletMode.VIEW);
- boolean inNormalState = (request.getWindowState() == WindowState.NORMAL);
+ boolean inNormalState = (request
+ .getWindowState() == WindowState.NORMAL);
// Portlet up-and-running, enable stuff
portletEdit.setEnabled(true);
portletMax.setEnabled(true);
@@ -134,10 +137,10 @@ public class JSR286Portlet extends UI {
tf.setEnabled(!inViewMode);
// Show notification about current mode and state
- getPage().showNotification(
- new Notification("Portlet status", "Mode: "
- + request.getPortletMode() + " State: "
- + request.getWindowState(), Type.WARNING_MESSAGE));
+ getPage().showNotification(new Notification(
+ "Portlet status", "Mode: " + request.getPortletMode()
+ + " State: " + request.getWindowState(),
+ Type.WARNING_MESSAGE));
// Display current user info
Map<?, ?> uinfo = (Map<?, ?>) request
@@ -195,8 +198,8 @@ public class JSR286Portlet extends UI {
if (someAction == null) {
url = getSession().generateActionURL("someAction");
try {
- someAction = new Link("An action", new ExternalResource(
- url.toString()));
+ someAction = new Link("An action",
+ new ExternalResource(url.toString()));
main.addComponent(someAction);
} catch (Exception e) {
// Oops
@@ -211,9 +214,9 @@ public class JSR286Portlet extends UI {
@Override
public void handleActionRequest(ActionRequest request,
ActionResponse response, UI window) {
- main.addComponent(new Label("Action '"
- + request.getParameter("javax.portlet.action")
- + "' received"));
+ main.addComponent(new Label(
+ "Action '" + request.getParameter("javax.portlet.action")
+ + "' received"));
}
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/integration/LiferayThemeDemo.java b/uitest/src/main/java/com/vaadin/tests/integration/LiferayThemeDemo.java
index 8a8df93742..9f89938ae8 100644
--- a/uitest/src/main/java/com/vaadin/tests/integration/LiferayThemeDemo.java
+++ b/uitest/src/main/java/com/vaadin/tests/integration/LiferayThemeDemo.java
@@ -80,10 +80,8 @@ public class LiferayThemeDemo extends LegacyApplication {
@Override
public Action[] getActions(Object target, Object sender) {
- return new Action[] {
- new Action("Open"),
- new Action("Delete", new ThemeResource(
- "../runo/icons/16/trash.png")) };
+ return new Action[] { new Action("Open"), new Action("Delete",
+ new ThemeResource("../runo/icons/16/trash.png")) };
}
};
@@ -153,10 +151,10 @@ public class LiferayThemeDemo extends LegacyApplication {
l.addComponent(b);
b = new NativeButton("Native Button");
- b.setDescription("<h2><img src=\"/html/VAADIN/themes/runo/icons/16/globe.png\"/>A richtext tooltip</h2>"
- + "<ul>"
- + "<li>HTML formatting</li><li>Images<br/>"
- + "</li><li>etc...</li></ul>");
+ b.setDescription(
+ "<h2><img src=\"/html/VAADIN/themes/runo/icons/16/globe.png\"/>A richtext tooltip</h2>"
+ + "<ul>" + "<li>HTML formatting</li><li>Images<br/>"
+ + "</li><li>etc...</li></ul>");
l.addComponent(b);
b = new CheckBox("Checkbox");
@@ -353,9 +351,9 @@ public class LiferayThemeDemo extends LegacyApplication {
pl.addComponent(new Label("Panel content"));
l.addComponent(p);
- l.addComponent(new Label(
- "Light Style (<code>LiferayTheme.PANEL_LIGHT</code>)",
- ContentMode.HTML));
+ l.addComponent(
+ new Label("Light Style (<code>LiferayTheme.PANEL_LIGHT</code>)",
+ ContentMode.HTML));
VerticalLayout p2l = new VerticalLayout();
p2l.setMargin(true);
@@ -381,8 +379,8 @@ public class LiferayThemeDemo extends LegacyApplication {
t.setColumnReorderingAllowed(true);
t.addActionHandler(handler);
- t.addContainerProperty("First", String.class, null, "First",
- ICON_GLOBE, Table.ALIGN_RIGHT);
+ t.addContainerProperty("First", String.class, null, "First", ICON_GLOBE,
+ Table.ALIGN_RIGHT);
t.addContainerProperty("Second", String.class, null);
t.addContainerProperty("Third", String.class, null);
t.addContainerProperty("Fourth", TextField.class, null);
@@ -624,8 +622,8 @@ public class LiferayThemeDemo extends LegacyApplication {
@Override
public void buttonClick(ClickEvent event) {
new Notification(title.getValue(), message.getValue(),
- Notification.TYPE_WARNING_MESSAGE, true).show(Page
- .getCurrent());
+ Notification.TYPE_WARNING_MESSAGE, true)
+ .show(Page.getCurrent());
}
});
@@ -636,8 +634,8 @@ public class LiferayThemeDemo extends LegacyApplication {
@Override
public void buttonClick(ClickEvent event) {
new Notification(title.getValue(), message.getValue(),
- Notification.TYPE_ERROR_MESSAGE, true).show(Page
- .getCurrent());
+ Notification.TYPE_ERROR_MESSAGE, true)
+ .show(Page.getCurrent());
}
});
@@ -648,8 +646,8 @@ public class LiferayThemeDemo extends LegacyApplication {
@Override
public void buttonClick(ClickEvent event) {
new Notification(title.getValue(), message.getValue(),
- Notification.TYPE_TRAY_NOTIFICATION, true).show(Page
- .getCurrent());
+ Notification.TYPE_TRAY_NOTIFICATION, true)
+ .show(Page.getCurrent());
}
});
@@ -683,8 +681,8 @@ public class LiferayThemeDemo extends LegacyApplication {
menubar.setWidth("100%");
final MenuBar.MenuItem file = menubar.addItem("File", null);
final MenuBar.MenuItem newItem = file.addItem("New", null);
- file.addItem("Open file...", new ThemeResource(
- "../runo/icons/16/folder.png"), null);
+ file.addItem("Open file...",
+ new ThemeResource("../runo/icons/16/folder.png"), null);
file.addSeparator();
newItem.addItem("File", null);
@@ -714,8 +712,8 @@ public class LiferayThemeDemo extends LegacyApplication {
find.addItem("Google Search", new Command() {
@Override
public void menuSelected(MenuItem selectedItem) {
- getMainWindow().open(
- new ExternalResource("http://www.google.com"));
+ getMainWindow()
+ .open(new ExternalResource("http://www.google.com"));
}
});
find.addSeparator();
diff --git a/uitest/src/main/java/com/vaadin/tests/integration/PortletSizeInLiferayFreeformLayoutApplication.java b/uitest/src/main/java/com/vaadin/tests/integration/PortletSizeInLiferayFreeformLayoutApplication.java
index c8fa448172..667365e9ea 100644
--- a/uitest/src/main/java/com/vaadin/tests/integration/PortletSizeInLiferayFreeformLayoutApplication.java
+++ b/uitest/src/main/java/com/vaadin/tests/integration/PortletSizeInLiferayFreeformLayoutApplication.java
@@ -8,11 +8,11 @@ import com.vaadin.ui.VerticalLayout;
/**
* On Liferay in a freeform layout, this application should get its height from
* the height of the portlet container in the Liferay layout.
- *
+ *
* See ticket #5521.
*/
-public class PortletSizeInLiferayFreeformLayoutApplication extends
- LegacyApplication {
+public class PortletSizeInLiferayFreeformLayoutApplication
+ extends LegacyApplication {
@Override
public void init() {
LegacyWindow mainWindow = new LegacyWindow("Portlet5521 Application");
diff --git a/uitest/src/main/java/com/vaadin/tests/integration/ProxyTest.java b/uitest/src/main/java/com/vaadin/tests/integration/ProxyTest.java
index 04d493eef5..99831fb6a6 100644
--- a/uitest/src/main/java/com/vaadin/tests/integration/ProxyTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/integration/ProxyTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -98,14 +98,12 @@ public class ProxyTest extends AbstractTestUI {
ServletContextHandler contextHandler = new ServletContextHandler();
server.setHandler(contextHandler);
contextHandler.setContextPath("/");
- ServletHolder servletHolder = contextHandler.addServlet(
- ProxyServlet.Transparent.class, "/*");
+ ServletHolder servletHolder = contextHandler
+ .addServlet(ProxyServlet.Transparent.class, "/*");
// Configure servlet to forward to the root of the original server
- servletHolder.setInitParameter(
- "ProxyTo",
- "http://" + request.getLocalAddr() + ":"
- + request.getLocalPort() + "/");
+ servletHolder.setInitParameter("ProxyTo", "http://"
+ + request.getLocalAddr() + ":" + request.getLocalPort() + "/");
// Configure servlet to strip beginning of paths
servletHolder.setInitParameter("Prefix", "/proxypath/");
@@ -125,8 +123,8 @@ public class ProxyTest extends AbstractTestUI {
new ExternalResource(linkBase + "embed1")));
linkHolder.addComponent(new Link("Open embed1/ in proxy",
new ExternalResource(linkBase + "embed1/")));
- linkHolder.addComponent(new Link("Open Buttons in proxy",
- new ExternalResource(linkBase
+ linkHolder.addComponent(
+ new Link("Open Buttons in proxy", new ExternalResource(linkBase
+ "run/com.vaadin.tests.components.button.Buttons")));
}
diff --git a/uitest/src/main/java/com/vaadin/tests/integration/ServletIntegrationDefaultPushUI.java b/uitest/src/main/java/com/vaadin/tests/integration/ServletIntegrationDefaultPushUI.java
index 4c3e1beaa5..83733b1854 100644
--- a/uitest/src/main/java/com/vaadin/tests/integration/ServletIntegrationDefaultPushUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/integration/ServletIntegrationDefaultPushUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import com.vaadin.annotations.Push;
/**
* Server test which uses the default push mechanisms
- *
+ *
* @since 7.1.12
* @author Vaadin Ltd
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/integration/ServletIntegrationLongPollingUI.java b/uitest/src/main/java/com/vaadin/tests/integration/ServletIntegrationLongPollingUI.java
index 0bcac5575d..752d07a545 100644
--- a/uitest/src/main/java/com/vaadin/tests/integration/ServletIntegrationLongPollingUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/integration/ServletIntegrationLongPollingUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import com.vaadin.shared.ui.ui.Transport;
/**
* Server test which uses long polling
- *
+ *
* @since 7.1
* @author Vaadin Ltd
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/integration/ServletIntegrationStreamingUI.java b/uitest/src/main/java/com/vaadin/tests/integration/ServletIntegrationStreamingUI.java
index 5d5801f0db..3a190005c0 100644
--- a/uitest/src/main/java/com/vaadin/tests/integration/ServletIntegrationStreamingUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/integration/ServletIntegrationStreamingUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import com.vaadin.shared.ui.ui.Transport;
/**
* Server test which uses streaming
- *
+ *
* @since 7.1
* @author Vaadin Ltd
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/integration/ServletIntegrationWebsocketUI.java b/uitest/src/main/java/com/vaadin/tests/integration/ServletIntegrationWebsocketUI.java
index 18e275618a..f3abd99304 100644
--- a/uitest/src/main/java/com/vaadin/tests/integration/ServletIntegrationWebsocketUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/integration/ServletIntegrationWebsocketUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ import com.vaadin.shared.ui.ui.UIState.PushConfigurationState;
/**
* Server test which uses websockets
- *
+ *
* @since 7.1
* @author Vaadin Ltd
*/
@@ -31,7 +31,7 @@ public class ServletIntegrationWebsocketUI extends ServletIntegrationUI {
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.tests.integration.IntegrationTestUI#init(com.vaadin.server
* .VaadinRequest)
diff --git a/uitest/src/main/java/com/vaadin/tests/layoutmanager/LayoutDuringStateUpdate.java b/uitest/src/main/java/com/vaadin/tests/layoutmanager/LayoutDuringStateUpdate.java
index cfebfef004..3ac5f17e4c 100644
--- a/uitest/src/main/java/com/vaadin/tests/layoutmanager/LayoutDuringStateUpdate.java
+++ b/uitest/src/main/java/com/vaadin/tests/layoutmanager/LayoutDuringStateUpdate.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayouts.java b/uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayouts.java
index 74cfe12ad7..d2017c6f40 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayouts.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayouts.java
@@ -245,8 +245,8 @@ public class CaptionsInLayouts extends AbstractTestUI {
for (String width : new String[] { "400px", "auto" }) {
Object id = layoutSelect.addItem();
Item i = layoutSelect.getItem(id);
- i.getItemProperty(CAPTION).setValue(
- cls.getSimpleName() + ", " + width);
+ i.getItemProperty(CAPTION)
+ .setValue(cls.getSimpleName() + ", " + width);
i.getItemProperty(CLASS).setValue(cls);
i.getItemProperty(WIDTH).setValue(width);
}
@@ -260,10 +260,11 @@ public class CaptionsInLayouts extends AbstractTestUI {
public void valueChange(ValueChangeEvent event) {
Item i = layoutSelect.getItem(event.getProperty().getValue());
- setLayout(getLayout((String) i.getItemProperty(CAPTION)
- .getValue(), (Class<? extends Layout>) i
- .getItemProperty(CLASS).getValue(), (String) i
- .getItemProperty(WIDTH).getValue()));
+ setLayout(getLayout(
+ (String) i.getItemProperty(CAPTION).getValue(),
+ (Class<? extends Layout>) i.getItemProperty(CLASS)
+ .getValue(),
+ (String) i.getItemProperty(WIDTH).getValue()));
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayoutsWaiAria.java b/uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayoutsWaiAria.java
index ec323f2db2..afeb53f633 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayoutsWaiAria.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/CaptionsInLayoutsWaiAria.java
@@ -337,8 +337,8 @@ public class CaptionsInLayoutsWaiAria extends TestBase {
for (String width : new String[] { "auto" }) {
Object id = layoutSelect.addItem();
Item i = layoutSelect.getItem(id);
- i.getItemProperty(CAPTION).setValue(
- cls.getSimpleName() + ", " + width);
+ i.getItemProperty(CAPTION)
+ .setValue(cls.getSimpleName() + ", " + width);
i.getItemProperty(CLASS).setValue(cls);
i.getItemProperty(WIDTH).setValue(width);
}
@@ -352,10 +352,11 @@ public class CaptionsInLayoutsWaiAria extends TestBase {
public void valueChange(ValueChangeEvent event) {
Item i = layoutSelect.getItem(event.getProperty().getValue());
- setLayout(getLayout((String) i.getItemProperty(CAPTION)
- .getValue(), (Class<? extends Layout>) i
- .getItemProperty(CLASS).getValue(), (String) i
- .getItemProperty(WIDTH).getValue()));
+ setLayout(getLayout(
+ (String) i.getItemProperty(CAPTION).getValue(),
+ (Class<? extends Layout>) i.getItemProperty(CLASS)
+ .getValue(),
+ (String) i.getItemProperty(WIDTH).getValue()));
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/CssLayoutAbsoluteUrl.java b/uitest/src/main/java/com/vaadin/tests/layouts/CssLayoutAbsoluteUrl.java
index e5430a09af..86aeb4f687 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/CssLayoutAbsoluteUrl.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/CssLayoutAbsoluteUrl.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/GridLayoutCaptions.java b/uitest/src/main/java/com/vaadin/tests/layouts/GridLayoutCaptions.java
index 923f91f246..de35ef6fc9 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/GridLayoutCaptions.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/GridLayoutCaptions.java
@@ -42,21 +42,24 @@ public class GridLayoutCaptions extends TestBase {
} else if (propertyId.equals(DataPOJO.Fields.hp.name())) {
Field<?> f = DefaultFieldFactory.get().createField(item,
propertyId, uiContext);
- f.setCaption("This is a long caption for the HP field, but it has a VL as a wrapper");
+ f.setCaption(
+ "This is a long caption for the HP field, but it has a VL as a wrapper");
return f;
} else if (propertyId.equals(DataPOJO.Fields.place.name())) {
Field<?> f = DefaultFieldFactory.get().createField(item,
propertyId, uiContext);
- f.setCaption("This is a long caption for the Place field, but it has a CSSLo as a wrapper");
+ f.setCaption(
+ "This is a long caption for the Place field, but it has a CSSLo as a wrapper");
return f;
} else if (propertyId.equals(DataPOJO.Fields.price.name())) {
Field<?> f = DefaultFieldFactory.get().createField(item,
propertyId, uiContext);
- f.setCaption("With size undefined the caption behaves like this...");
+ f.setCaption(
+ "With size undefined the caption behaves like this...");
f.setSizeFull();
return f;
@@ -98,9 +101,8 @@ public class GridLayoutCaptions extends TestBase {
"Ipsum lipsum laarum lop... ");
for (Object propIDs : getItemDataSource().getItemPropertyIds()) {
- ((TextField) getField(propIDs))
- .setComponentError(AbstractErrorMessage
- .getErrorMessageForException(ive));
+ ((TextField) getField(propIDs)).setComponentError(
+ AbstractErrorMessage.getErrorMessageForException(ive));
}
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/GridLayoutExpandRatioModification.java b/uitest/src/main/java/com/vaadin/tests/layouts/GridLayoutExpandRatioModification.java
index 4bf33903a1..5eb1f81e99 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/GridLayoutExpandRatioModification.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/GridLayoutExpandRatioModification.java
@@ -10,8 +10,8 @@ import com.vaadin.ui.LegacyWindow;
import com.vaadin.ui.TextField;
import com.vaadin.ui.VerticalLayout;
-public class GridLayoutExpandRatioModification extends TestBase implements
- ClickListener {
+public class GridLayoutExpandRatioModification extends TestBase
+ implements ClickListener {
private boolean isVisible = false;
private GridLayout mainLayout;
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/GridLayoutInsidePanel.java b/uitest/src/main/java/com/vaadin/tests/layouts/GridLayoutInsidePanel.java
index 524799ab3c..413d225c22 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/GridLayoutInsidePanel.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/GridLayoutInsidePanel.java
@@ -23,8 +23,8 @@ public class GridLayoutInsidePanel extends TestBase {
{
GridLayout gl = new GridLayout(1, 1);
gl.setSizeUndefined();
- gl.addComponent(new Label(
- "A label which defines the size of the GL"));
+ gl.addComponent(
+ new Label("A label which defines the size of the GL"));
VerticalLayout pl = new VerticalLayout();
pl.setMargin(true);
@@ -39,8 +39,8 @@ public class GridLayoutInsidePanel extends TestBase {
{
GridLayout gl = new GridLayout(1, 1);
gl.setSizeUndefined();
- gl.addComponent(new Label(
- "A label which defines the size of the GL"));
+ gl.addComponent(
+ new Label("A label which defines the size of the GL"));
Panel p = new Panel("Panel 2", gl);
gl.setMargin(false);
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/GridLayoutSpanExpansion.java b/uitest/src/main/java/com/vaadin/tests/layouts/GridLayoutSpanExpansion.java
index 9753526a9e..814a3f128f 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/GridLayoutSpanExpansion.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/GridLayoutSpanExpansion.java
@@ -14,8 +14,9 @@ public class GridLayoutSpanExpansion extends TestBase {
heightSpan.setWidth("200px");
heightSpan.addComponent(new Label("1"), 0, 0);
heightSpan.addComponent(new Label("2"), 0, 1);
- heightSpan.addComponent(new Label(
- "This is a somewhat long text that spans over a few lines."),
+ heightSpan.addComponent(
+ new Label(
+ "This is a somewhat long text that spans over a few lines."),
1, 0, 1, 1);
heightSpan.setRowExpandRatio(1, 1);
addComponent(heightSpan);
@@ -23,8 +24,9 @@ public class GridLayoutSpanExpansion extends TestBase {
GridLayout widthSpan = new GridLayout(2, 2);
widthSpan.setHeight("100px");
widthSpan.setWidth("200px");
- widthSpan.addComponent(new Label(
- "This is a somewhat long text that spans over both columns."),
+ widthSpan.addComponent(
+ new Label(
+ "This is a somewhat long text that spans over both columns."),
0, 0, 1, 0);
Label label1 = new Label("1");
label1.setSizeUndefined();
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/HiddenHorizontalLayout.java b/uitest/src/main/java/com/vaadin/tests/layouts/HiddenHorizontalLayout.java
index 739779a3e0..ba3716eec8 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/HiddenHorizontalLayout.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/HiddenHorizontalLayout.java
@@ -36,12 +36,13 @@ public class HiddenHorizontalLayout extends TestBase {
hl.addComponent(new Label("label4"));
vl.addComponent(hl);
- Label l = new Label("Steps to reproduce with Vaadin 6.0.1:<br/>"
- + "1. set browser size smaller than fullscreen<br/>"
- + "2. Refresh page with browser<br/>"
- + "3. Click \"toggle layout visibility\"<br>"
- + "4. Resize browser window to full <br/>"
- + "5. Click \"toggle layout visibility\"<br/>",
+ Label l = new Label(
+ "Steps to reproduce with Vaadin 6.0.1:<br/>"
+ + "1. set browser size smaller than fullscreen<br/>"
+ + "2. Refresh page with browser<br/>"
+ + "3. Click \"toggle layout visibility\"<br>"
+ + "4. Resize browser window to full <br/>"
+ + "5. Click \"toggle layout visibility\"<br/>",
ContentMode.HTML);
vl.addComponent(l);
Button b = new Button("toggle layout visibility",
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/HorizontalLayoutAndCaretPosition.java b/uitest/src/main/java/com/vaadin/tests/layouts/HorizontalLayoutAndCaretPosition.java
index a8a25d03ce..455a22ff4f 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/HorizontalLayoutAndCaretPosition.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/HorizontalLayoutAndCaretPosition.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,13 +24,13 @@ import com.vaadin.ui.TextField;
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/HorizontalLayoutWithLabelAndButton.java b/uitest/src/main/java/com/vaadin/tests/layouts/HorizontalLayoutWithLabelAndButton.java
index 9381f2caeb..4bb3c50415 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/HorizontalLayoutWithLabelAndButton.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/HorizontalLayoutWithLabelAndButton.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/HtmlInCaption.java b/uitest/src/main/java/com/vaadin/tests/layouts/HtmlInCaption.java
index 830b96b3d7..e03e346dee 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/HtmlInCaption.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/HtmlInCaption.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -36,7 +36,7 @@ import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.Window;
/**
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/IE8MeasuredSizeMemoryLeak.java b/uitest/src/main/java/com/vaadin/tests/layouts/IE8MeasuredSizeMemoryLeak.java
index 504ee8b41b..e4085f6854 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/IE8MeasuredSizeMemoryLeak.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/IE8MeasuredSizeMemoryLeak.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -55,7 +55,7 @@ public class IE8MeasuredSizeMemoryLeak extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -91,7 +91,7 @@ public class IE8MeasuredSizeMemoryLeak extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -101,7 +101,7 @@ public class IE8MeasuredSizeMemoryLeak extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/LayoutPerformanceTests.java b/uitest/src/main/java/com/vaadin/tests/layouts/LayoutPerformanceTests.java
index 4e50f0d83b..6034eea5c1 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/LayoutPerformanceTests.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/LayoutPerformanceTests.java
@@ -34,8 +34,8 @@ public class LayoutPerformanceTests extends TestBase {
AbstractOrderedLayout layout = createOrderedLayout(depth,
fullHeight);
- layout.addComponent(buildLayout(depth - 1, leafs, leafType,
- fullHeight));
+ layout.addComponent(
+ buildLayout(depth - 1, leafs, leafType, fullHeight));
return layout;
}
},
@@ -52,8 +52,8 @@ public class LayoutPerformanceTests extends TestBase {
Component content = leafType.createContent();
content.setSizeUndefined();
layout.addComponent(content);
- layout.addComponent(buildLayout(depth - 1, leafs, leafType,
- fullHeight));
+ layout.addComponent(
+ buildLayout(depth - 1, leafs, leafType, fullHeight));
layout.setExpandRatio(layout.getComponent(1), 1);
return layout;
}
@@ -68,10 +68,10 @@ public class LayoutPerformanceTests extends TestBase {
AbstractOrderedLayout layout = createOrderedLayout(depth,
fullHeight);
- layout.addComponent(buildLayout(depth - 1, leafs, leafType,
- fullHeight));
- layout.addComponent(buildLayout(depth - 1, leafs, leafType,
- fullHeight));
+ layout.addComponent(
+ buildLayout(depth - 1, leafs, leafType, fullHeight));
+ layout.addComponent(
+ buildLayout(depth - 1, leafs, leafType, fullHeight));
layout.setExpandRatio(layout.getComponent(0), 1);
layout.setExpandRatio(layout.getComponent(1), 2);
return layout;
@@ -82,8 +82,8 @@ public class LayoutPerformanceTests extends TestBase {
protected AbstractOrderedLayout createOrderedLayout(int depth,
boolean fullHeight) {
- AbstractOrderedLayout layout = (depth % 2) == 0 ? new VerticalLayout()
- : new HorizontalLayout();
+ AbstractOrderedLayout layout = (depth % 2) == 0
+ ? new VerticalLayout() : new HorizontalLayout();
layout.setWidth("100%");
if (fullHeight) {
layout.setHeight("100%");
@@ -254,8 +254,9 @@ public class LayoutPerformanceTests extends TestBase {
if (component instanceof NativeSelect) {
NativeSelect nativeSelect = (NativeSelect) component;
nativeSelect.setNullSelectionAllowed(false);
- nativeSelect.setValue(new ArrayList<Object>(nativeSelect
- .getItemIds()).get(0));
+ nativeSelect.setValue(
+ new ArrayList<Object>(nativeSelect.getItemIds())
+ .get(0));
}
controls.setComponentAlignment(component, Alignment.BOTTOM_LEFT);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/MarginWithExpandRatio.java b/uitest/src/main/java/com/vaadin/tests/layouts/MarginWithExpandRatio.java
index 3697ab1c26..fd6654bfc3 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/MarginWithExpandRatio.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/MarginWithExpandRatio.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/MovingComponentsWhileOldParentInvisible.java b/uitest/src/main/java/com/vaadin/tests/layouts/MovingComponentsWhileOldParentInvisible.java
index 364a0e267a..aa9d9dd0f1 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/MovingComponentsWhileOldParentInvisible.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/MovingComponentsWhileOldParentInvisible.java
@@ -58,15 +58,16 @@ public class MovingComponentsWhileOldParentInvisible extends TestBase {
@SuppressWarnings("unchecked")
public void valueChange(ValueChangeEvent event) {
HasComponents oldCC = cc;
- cc = createComponentContainer((Class<? extends HasComponents>) event
- .getProperty().getValue());
+ cc = createComponentContainer(
+ (Class<? extends HasComponents>) event.getProperty()
+ .getValue());
addToCC(lab);
replaceComponent(oldCC, cc);
}
});
- componentContainerSelect.setValue(componentContainerSelect.getItemIds()
- .iterator().next());
+ componentContainerSelect.setValue(
+ componentContainerSelect.getItemIds().iterator().next());
Button but1 = new Button("Move in and out of component container",
new Button.ClickListener() {
@@ -96,8 +97,8 @@ public class MovingComponentsWhileOldParentInvisible extends TestBase {
} else if (cc instanceof SingleComponentContainer) {
((SingleComponentContainer) cc).setContent(lab);
} else {
- throw new RuntimeException("Don't know how to add to "
- + cc.getClass().getName());
+ throw new RuntimeException(
+ "Don't know how to add to " + cc.getClass().getName());
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/OrderedLayoutBasics.java b/uitest/src/main/java/com/vaadin/tests/layouts/OrderedLayoutBasics.java
index 3d4b20d5d9..2f1df7152e 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/OrderedLayoutBasics.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/OrderedLayoutBasics.java
@@ -50,38 +50,68 @@ public class OrderedLayoutBasics extends TestBase {
}
private void createUI(Layout layout) {
- layout.addComponent(wrapLayout(layout_field_100pct_button_field(new HorizontalLayout())));
- layout.addComponent(wrapLayout(layout_field_100pct_button_field(new VerticalLayout())));
- layout.addComponent(wrapLayout(layout_overfilled(new HorizontalLayout())));
- layout.addComponent(wrapLayout(layout_overfilled(new VerticalLayout())));
- layout.addComponent(wrapLayout(layout_overfilled_dynamic_height(new HorizontalLayout())));
- layout.addComponent(wrapLayout(layout_overfilled_dynamic_height(new VerticalLayout())));
- layout.addComponent(wrapLayout(layout_symmetric_fields(new HorizontalLayout())));
- layout.addComponent(wrapLayout(layout_symmetric_fields(new VerticalLayout())));
- layout.addComponent(wrapLayout(layout_leftAndRight(new HorizontalLayout())));
- layout.addComponent(wrapLayout(layout_leftAndRight(new VerticalLayout())));
- layout.addComponent(wrapLayout(layout_fixed_filled(new HorizontalLayout())));
- layout.addComponent(wrapLayout(layout_fixed_filled(new VerticalLayout())));
+ layout.addComponent(wrapLayout(
+ layout_field_100pct_button_field(new HorizontalLayout())));
+ layout.addComponent(wrapLayout(
+ layout_field_100pct_button_field(new VerticalLayout())));
+ layout.addComponent(
+ wrapLayout(layout_overfilled(new HorizontalLayout())));
+ layout.addComponent(
+ wrapLayout(layout_overfilled(new VerticalLayout())));
+ layout.addComponent(wrapLayout(
+ layout_overfilled_dynamic_height(new HorizontalLayout())));
+ layout.addComponent(wrapLayout(
+ layout_overfilled_dynamic_height(new VerticalLayout())));
+ layout.addComponent(
+ wrapLayout(layout_symmetric_fields(new HorizontalLayout())));
+ layout.addComponent(
+ wrapLayout(layout_symmetric_fields(new VerticalLayout())));
+ layout.addComponent(
+ wrapLayout(layout_leftAndRight(new HorizontalLayout())));
+ layout.addComponent(
+ wrapLayout(layout_leftAndRight(new VerticalLayout())));
+ layout.addComponent(
+ wrapLayout(layout_fixed_filled(new HorizontalLayout())));
+ layout.addComponent(
+ wrapLayout(layout_fixed_filled(new VerticalLayout())));
layout.addComponent(wrapLayout(layout_dynamic(new HorizontalLayout())));
layout.addComponent(wrapLayout(layout_dynamic(new VerticalLayout())));
layout.addComponent(wrapLayout(layout_labels(new HorizontalLayout())));
layout.addComponent(wrapLayout(layout_labels(new VerticalLayout())));
- layout.addComponent(wrapLayout(layout_captions(new HorizontalLayout())));
+ layout.addComponent(
+ wrapLayout(layout_captions(new HorizontalLayout())));
layout.addComponent(wrapLayout(layout_captions(new VerticalLayout())));
- layout.addComponent(wrapLayout(layout_captions_fixed_size(new HorizontalLayout())));
- layout.addComponent(wrapLayout(layout_captions_fixed_size(new VerticalLayout())));
- layout.addComponent(wrapLayout(layout_captions_fixed_size_and_relative_size(new HorizontalLayout())));
- layout.addComponent(wrapLayout(layout_captions_fixed_size_and_relative_size(new VerticalLayout())));
- layout.addComponent(wrapLayout(layout_captions_fixed_size_and_fixed_size(new HorizontalLayout())));
- layout.addComponent(wrapLayout(layout_captions_fixed_size_and_fixed_size(new VerticalLayout())));
- layout.addComponent(wrapLayout(layout_add_remove_components(new HorizontalLayout())));
- layout.addComponent(wrapLayout(layout_add_remove_components(new VerticalLayout())));
- layout.addComponent(wrapLayout(layout_pctFilled(new HorizontalLayout())));
+ layout.addComponent(
+ wrapLayout(layout_captions_fixed_size(new HorizontalLayout())));
+ layout.addComponent(
+ wrapLayout(layout_captions_fixed_size(new VerticalLayout())));
+ layout.addComponent(
+ wrapLayout(layout_captions_fixed_size_and_relative_size(
+ new HorizontalLayout())));
+ layout.addComponent(
+ wrapLayout(layout_captions_fixed_size_and_relative_size(
+ new VerticalLayout())));
+ layout.addComponent(
+ wrapLayout(layout_captions_fixed_size_and_fixed_size(
+ new HorizontalLayout())));
+ layout.addComponent(
+ wrapLayout(layout_captions_fixed_size_and_fixed_size(
+ new VerticalLayout())));
+ layout.addComponent(wrapLayout(
+ layout_add_remove_components(new HorizontalLayout())));
+ layout.addComponent(
+ wrapLayout(layout_add_remove_components(new VerticalLayout())));
+ layout.addComponent(
+ wrapLayout(layout_pctFilled(new HorizontalLayout())));
layout.addComponent(wrapLayout(layout_pctFilled(new VerticalLayout())));
- layout.addComponent(wrapLayout(layout_underFilled(new HorizontalLayout())));
- layout.addComponent(wrapLayout(layout_underFilled(new VerticalLayout())));
- layout.addComponent(wrapLayout(layout_basic_test(new HorizontalLayout())));
- layout.addComponent(wrapLayout(layout_basic_test(new VerticalLayout())));
+ layout.addComponent(
+ wrapLayout(layout_underFilled(new HorizontalLayout())));
+ layout.addComponent(
+ wrapLayout(layout_underFilled(new VerticalLayout())));
+ layout.addComponent(
+ wrapLayout(layout_basic_test(new HorizontalLayout())));
+ layout.addComponent(
+ wrapLayout(layout_basic_test(new VerticalLayout())));
}
private Layout wrapLayout(Layout ol) {
@@ -364,9 +394,8 @@ public class OrderedLayoutBasics extends TestBase {
ol.setSpacing(true);
// ol.setWidth("");
- ol.setCaption("Fixed width (" + ol.getWidth()
- + "px) and fixed height (" + ol.getHeight()
- + "px) / layout_field_100pct_button_field");
+ ol.setCaption("Fixed width (" + ol.getWidth() + "px) and fixed height ("
+ + ol.getHeight() + "px) / layout_field_100pct_button_field");
TextArea tf;
tf = new TextArea("300px x 300px Field");
@@ -406,9 +435,8 @@ public class OrderedLayoutBasics extends TestBase {
ol.setSpacing(true);
// ol.setWidth("");
- ol.setCaption("Fixed width (" + ol.getWidth()
- + "px) and fixed height (" + ol.getHeight()
- + "px) / layout_basic_test");
+ ol.setCaption("Fixed width (" + ol.getWidth() + "px) and fixed height ("
+ + ol.getHeight() + "px) / layout_basic_test");
TextArea tf;
tf = new TextArea("300px x 300px Field");
@@ -448,9 +476,8 @@ public class OrderedLayoutBasics extends TestBase {
ol.setSpacing(false);
// ol.setWidth("");
- ol.setCaption("Fixed width (" + ol.getWidth()
- + "px) and fixed height (" + ol.getHeight()
- + "px) / layout_symmetric_fields");
+ ol.setCaption("Fixed width (" + ol.getWidth() + "px) and fixed height ("
+ + ol.getHeight() + "px) / layout_symmetric_fields");
TextArea tf;
tf = new TextArea("300px x 300px Field");
@@ -487,9 +514,8 @@ public class OrderedLayoutBasics extends TestBase {
ol.setSpacing(true);
// ol.setWidth("");
- ol.setCaption("Fixed width (" + ol.getWidth()
- + "px) and fixed height (" + ol.getHeight()
- + "px) / layout_leftAndRight");
+ ol.setCaption("Fixed width (" + ol.getWidth() + "px) and fixed height ("
+ + ol.getHeight() + "px) / layout_leftAndRight");
TextArea tf;
// tf = new TextField("100%x100% Field");
@@ -733,9 +759,8 @@ public class OrderedLayoutBasics extends TestBase {
ol.setSpacing(true);
// ol.setWidth("");
- ol.setCaption("Fixed width (" + ol.getWidth()
- + "px) and fixed height (" + ol.getHeight()
- + "px) / layout_add_remove_components");
+ ol.setCaption("Fixed width (" + ol.getWidth() + "px) and fixed height ("
+ + ol.getHeight() + "px) / layout_add_remove_components");
for (int i = 0; i < 2; i++) {
AbstractOrderedLayout inner = createAddRemove(ol, "", "");
@@ -1053,7 +1078,8 @@ public class OrderedLayoutBasics extends TestBase {
}
- protected void addBefore(AbstractOrderedLayout ol, Component c, String width) {
+ protected void addBefore(AbstractOrderedLayout ol, Component c,
+ String width) {
int index = 0;
Iterator<Component> iter = ol.getComponentIterator();
while (iter.hasNext()) {
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/RelativeSizeInUndefinedCssLayout.java b/uitest/src/main/java/com/vaadin/tests/layouts/RelativeSizeInUndefinedCssLayout.java
index a139c7f67a..a28ba9960d 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/RelativeSizeInUndefinedCssLayout.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/RelativeSizeInUndefinedCssLayout.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/TestAbsoluteLayout.java b/uitest/src/main/java/com/vaadin/tests/layouts/TestAbsoluteLayout.java
index 5abe915307..eb95e84adb 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/TestAbsoluteLayout.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/TestAbsoluteLayout.java
@@ -50,8 +50,8 @@ public class TestAbsoluteLayout extends TestBase {
s.setNullSelectionAllowed(false);
for (int i = 0; i < Layout.Unit.values().length; i++) {
Item unitItem = s.addItem(i);
- unitItem.getItemProperty("caption").setValue(
- Layout.Unit.values()[i]);
+ unitItem.getItemProperty("caption")
+ .setValue(Layout.Unit.values()[i]);
}
return s;
}
@@ -173,8 +173,8 @@ public class TestAbsoluteLayout extends TestBase {
select.addListener(new ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
- editcomponent((Component) event.getProperty()
- .getValue());
+ editcomponent(
+ (Component) event.getProperty().getValue());
getMainWindow().removeWindow(chooser);
}
@@ -217,9 +217,8 @@ public class TestAbsoluteLayout extends TestBase {
// we are only interested in .class files
if (files[j].endsWith(".class")) {
// removes the .class extension
- String p = resource.toString()
- + files[j].substring(0,
- files[j].length() - 6);
+ String p = resource.toString() + files[j]
+ .substring(0, files[j].length() - 6);
p = p.replaceAll(".*classes/", "");
p = p.replaceAll("/", ".");
Class<?> c;
@@ -227,10 +226,10 @@ public class TestAbsoluteLayout extends TestBase {
c = Class.forName(p);
if (AbstractComponent.class
.isAssignableFrom(c)
- && !p.toLowerCase().contains(
- "layout")
- && !p.toLowerCase().contains(
- "abstract")) {
+ && !p.toLowerCase()
+ .contains("layout")
+ && !p.toLowerCase()
+ .contains("abstract")) {
container.addItem(c);
}
} catch (ClassNotFoundException e) {
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/TestLayoutClickListeners.java b/uitest/src/main/java/com/vaadin/tests/layouts/TestLayoutClickListeners.java
index 22a37022c2..ae007794e4 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/TestLayoutClickListeners.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/TestLayoutClickListeners.java
@@ -36,10 +36,12 @@ public class TestLayoutClickListeners extends AbstractTestUIWithLog {
al.setStyleName("borders");
al.setWidth("300px");
al.setHeight("500px");
- al.addComponent(new TextField("This is its caption",
- "This is a textfield"), "top: 60px; left: 0px; width: 100px;");
- al.addComponent(new TextField("Another textfield caption",
- "This is another textfield"),
+ al.addComponent(
+ new TextField("This is its caption", "This is a textfield"),
+ "top: 60px; left: 0px; width: 100px;");
+ al.addComponent(
+ new TextField("Another textfield caption",
+ "This is another textfield"),
"top: 120px; left: 20px; width: 100px;");
al.addComponent(new Button("A button with its own click listener",
@@ -71,8 +73,8 @@ public class TestLayoutClickListeners extends AbstractTestUIWithLog {
cl.setStyleName("borders");
cl.setWidth("300px");
cl.setHeight("500px");
- cl.addComponent(new TextField("This is its caption",
- "This is a textfield"));
+ cl.addComponent(
+ new TextField("This is its caption", "This is a textfield"));
cl.addComponent(new TextField("Another textfield caption",
"This is another textfield"));
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/VerticalLayoutExpandRatioModification.java b/uitest/src/main/java/com/vaadin/tests/layouts/VerticalLayoutExpandRatioModification.java
index bc7268356d..19629437cb 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/VerticalLayoutExpandRatioModification.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/VerticalLayoutExpandRatioModification.java
@@ -9,8 +9,8 @@ import com.vaadin.ui.LegacyWindow;
import com.vaadin.ui.TextField;
import com.vaadin.ui.VerticalLayout;
-public class VerticalLayoutExpandRatioModification extends TestBase implements
- ClickListener {
+public class VerticalLayoutExpandRatioModification extends TestBase
+ implements ClickListener {
private boolean isVisible = false;
private VerticalLayout mainLayout;
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/VerticalLayoutWithRelativeSizeComponentsInitiallyHidden.java b/uitest/src/main/java/com/vaadin/tests/layouts/VerticalLayoutWithRelativeSizeComponentsInitiallyHidden.java
index f3d4029663..d00acf0983 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/VerticalLayoutWithRelativeSizeComponentsInitiallyHidden.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/VerticalLayoutWithRelativeSizeComponentsInitiallyHidden.java
@@ -7,8 +7,8 @@ import com.vaadin.ui.Button.ClickListener;
import com.vaadin.ui.Label;
import com.vaadin.ui.VerticalLayout;
-public class VerticalLayoutWithRelativeSizeComponentsInitiallyHidden extends
- TestBase {
+public class VerticalLayoutWithRelativeSizeComponentsInitiallyHidden
+ extends TestBase {
@Override
protected String getDescription() {
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/customlayout/DefaultLocationInCustomLayout.java b/uitest/src/main/java/com/vaadin/tests/layouts/customlayout/DefaultLocationInCustomLayout.java
index 18ec491c0b..58743e9168 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/customlayout/DefaultLocationInCustomLayout.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/customlayout/DefaultLocationInCustomLayout.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/gridlayout/GridLayoutMoveComponent.java b/uitest/src/main/java/com/vaadin/tests/layouts/gridlayout/GridLayoutMoveComponent.java
index cd86fbcf3c..a90dfa583c 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/gridlayout/GridLayoutMoveComponent.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/gridlayout/GridLayoutMoveComponent.java
@@ -29,8 +29,8 @@ public class GridLayoutMoveComponent extends AbstractTestUI {
grid.addComponent(b, 0, 1);
grid.addComponent(tf, 0, 2);
- addComponent(new Button("Shift label right",
- new Button.ClickListener() {
+ addComponent(
+ new Button("Shift label right", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
// Moving component from 0,0 -> 1,0
@@ -39,8 +39,8 @@ public class GridLayoutMoveComponent extends AbstractTestUI {
}
}));
- addComponent(new Button("Shift button right",
- new Button.ClickListener() {
+ addComponent(
+ new Button("Shift button right", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
grid.removeComponent(b);
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/gridlayout/GridSpanEmptyColumns.java b/uitest/src/main/java/com/vaadin/tests/layouts/gridlayout/GridSpanEmptyColumns.java
index fc37455752..83f31e83aa 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/gridlayout/GridSpanEmptyColumns.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/gridlayout/GridSpanEmptyColumns.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ import com.vaadin.ui.GridLayout;
import com.vaadin.ui.Label;
/**
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/BaseAddReplaceMove.java b/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/BaseAddReplaceMove.java
index 7ea8739cf4..ead8138beb 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/BaseAddReplaceMove.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/BaseAddReplaceMove.java
@@ -56,8 +56,10 @@ public class BaseAddReplaceMove extends BaseLayoutTestUI {
source.addComponent(new Label("OTHER LABEL 1"));
source.addComponent(new Label("OTHER LABEL 2"));
- final AbstractComponent c1 = new Label("<b>LABEL</b>", ContentMode.HTML);
- final AbstractComponent c2 = new Label("<b>LABEL</b>", ContentMode.HTML);
+ final AbstractComponent c1 = new Label("<b>LABEL</b>",
+ ContentMode.HTML);
+ final AbstractComponent c2 = new Label("<b>LABEL</b>",
+ ContentMode.HTML);
final AbstractComponent c3 = new Table("TABLE");
c3.setHeight("100px");
c3.setWidth("100%");
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/BaseLayoutTestUI.java b/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/BaseLayoutTestUI.java
index 02fcb677cd..73176f46fd 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/BaseLayoutTestUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/BaseLayoutTestUI.java
@@ -229,7 +229,7 @@ public abstract class BaseLayoutTestUI extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -242,7 +242,7 @@ public abstract class BaseLayoutTestUI extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -276,7 +276,7 @@ public abstract class BaseLayoutTestUI extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/GridLayout/GridAddReplaceMove.java b/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/GridLayout/GridAddReplaceMove.java
index 84254b4935..69f1942d9e 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/GridLayout/GridAddReplaceMove.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/GridLayout/GridAddReplaceMove.java
@@ -36,7 +36,7 @@ public class GridAddReplaceMove extends GridBaseLayoutTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -52,8 +52,10 @@ public class GridAddReplaceMove extends GridBaseLayoutTestUI {
source.addComponent(new Label("OTHER LABEL 1"));
source.addComponent(new Label("OTHER LABEL 2"));
- final AbstractComponent c1 = new Label("<b>LABEL</b>", ContentMode.HTML);
- final AbstractComponent c2 = new Label("<b>LABEL</b>", ContentMode.HTML);
+ final AbstractComponent c1 = new Label("<b>LABEL</b>",
+ ContentMode.HTML);
+ final AbstractComponent c2 = new Label("<b>LABEL</b>",
+ ContentMode.HTML);
final AbstractComponent c3 = new Table("TABLE");
c3.setHeight("100px");
c3.setWidth("100%");
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/broadcastingmessages/Broadcaster.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/broadcastingmessages/Broadcaster.java
index e268aed7b6..cd73f87523 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/broadcastingmessages/Broadcaster.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/broadcastingmessages/Broadcaster.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v70/CookieMonsterUI.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v70/CookieMonsterUI.java
index dbe1cbb717..7b7ba1e792 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v70/CookieMonsterUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v70/CookieMonsterUI.java
@@ -55,8 +55,8 @@ public class CookieMonsterUI extends UI {
} else {
// Create a new cookie
nameCookie = new Cookie(NAME_COOKIE, name);
- nameCookie
- .setComment("Cookie for storing the name of the user");
+ nameCookie.setComment(
+ "Cookie for storing the name of the user");
Notification.show("Stored name " + name + " in cookie");
}
@@ -65,8 +65,8 @@ public class CookieMonsterUI extends UI {
nameCookie.setMaxAge(120);
// Set the cookie path.
- nameCookie.setPath(VaadinService.getCurrentRequest()
- .getContextPath());
+ nameCookie.setPath(
+ VaadinService.getCurrentRequest().getContextPath());
// Save cookie
VaadinService.getCurrentResponse().addCookie(nameCookie);
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v70/SimpleLoginUI.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v70/SimpleLoginUI.java
index 1f94d43abe..2d1c6bb687 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v70/SimpleLoginUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v70/SimpleLoginUI.java
@@ -38,7 +38,8 @@ public class SimpleLoginUI extends UI {
// Check if a user has logged in
boolean isLoggedIn = getSession().getAttribute("user") != null;
- boolean isLoginView = event.getNewView() instanceof SimpleLoginView;
+ boolean isLoginView = event
+ .getNewView() instanceof SimpleLoginView;
if (!isLoggedIn && !isLoginView) {
// Redirect to login view always if a user has not yet
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v70/SimpleLoginView.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v70/SimpleLoginView.java
index 3ff1c2df40..89d0e43753 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v70/SimpleLoginView.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v70/SimpleLoginView.java
@@ -14,8 +14,8 @@ import com.vaadin.ui.TextField;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.themes.Reindeer;
-public class SimpleLoginView extends CustomComponent implements View,
- Button.ClickListener {
+public class SimpleLoginView extends CustomComponent
+ implements View, Button.ClickListener {
public static final String NAME = "login";
@@ -33,8 +33,8 @@ public class SimpleLoginView extends CustomComponent implements View,
user.setWidth("300px");
user.setRequired(true);
user.setInputPrompt("Your username (eg. joe@email.com)");
- user.addValidator(new EmailValidator(
- "Username must be an email address"));
+ user.addValidator(
+ new EmailValidator("Username must be an email address"));
user.setInvalidAllowed(false);
// Create the password input field
@@ -50,7 +50,8 @@ public class SimpleLoginView extends CustomComponent implements View,
// Add both to a panel
VerticalLayout fields = new VerticalLayout(user, password, loginButton);
- fields.setCaption("Please login to access the application. (test@test.com/passw0rd)");
+ fields.setCaption(
+ "Please login to access the application. (test@test.com/passw0rd)");
fields.setSpacing(true);
fields.setMargin(new MarginInfo(true, true, true, false));
fields.setSizeUndefined();
@@ -72,8 +73,8 @@ public class SimpleLoginView extends CustomComponent implements View,
/*
* Validator for validating the passwords
*/
- private static final class PasswordValidator extends
- AbstractValidator<String> {
+ private static final class PasswordValidator
+ extends AbstractValidator<String> {
public PasswordValidator() {
super("The password provided is not valid");
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v71beta/CSSInjectWithColorpicker.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v71beta/CSSInjectWithColorpicker.java
index 63e43b29f1..9c38102840 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v71beta/CSSInjectWithColorpicker.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v71beta/CSSInjectWithColorpicker.java
@@ -29,26 +29,27 @@ public class CSSInjectWithColorpicker extends UI {
protected void init(VaadinRequest request) {
// Create a text editor
- Component editor = createEditor("Lorem ipsum dolor sit amet, lacus pharetra sed, sit a "
- + "tortor. Id aliquam lorem pede, orci ut enim metus, diam nulla mi "
- + "suspendisse tempor tortor. Eleifend lorem proin, morbi vel diam ut. "
- + "Tempor est tellus vitae, pretium condimentum facilisis sit. Sagittis "
- + "quam, ac urna eros est cras id cras, eleifend eu mattis nec."
- + "Lorem ipsum dolor sit amet, lacus pharetra sed, sit a "
- + "tortor. Id aliquam lorem pede, orci ut enim metus, diam nulla mi "
- + "suspendisse tempor tortor. Eleifend lorem proin, morbi vel diam ut. "
- + "Tempor est tellus vitae, pretium condimentum facilisis sit. Sagittis "
- + "quam, ac urna eros est cras id cras, eleifend eu mattis nec."
- + "Lorem ipsum dolor sit amet, lacus pharetra sed, sit a "
- + "tortor. Id aliquam lorem pede, orci ut enim metus, diam nulla mi "
- + "suspendisse tempor tortor. Eleifend lorem proin, morbi vel diam ut. "
- + "Tempor est tellus vitae, pretium condimentum facilisis sit. Sagittis "
- + "quam, ac urna eros est cras id cras, eleifend eu mattis nec."
- + "Lorem ipsum dolor sit amet, lacus pharetra sed, sit a "
- + "tortor. Id aliquam lorem pede, orci ut enim metus, diam nulla mi "
- + "suspendisse tempor tortor. Eleifend lorem proin, morbi vel diam ut. "
- + "Tempor est tellus vitae, pretium condimentum facilisis sit. Sagittis "
- + "quam, ac urna eros est cras id cras, eleifend eu mattis nec.");
+ Component editor = createEditor(
+ "Lorem ipsum dolor sit amet, lacus pharetra sed, sit a "
+ + "tortor. Id aliquam lorem pede, orci ut enim metus, diam nulla mi "
+ + "suspendisse tempor tortor. Eleifend lorem proin, morbi vel diam ut. "
+ + "Tempor est tellus vitae, pretium condimentum facilisis sit. Sagittis "
+ + "quam, ac urna eros est cras id cras, eleifend eu mattis nec."
+ + "Lorem ipsum dolor sit amet, lacus pharetra sed, sit a "
+ + "tortor. Id aliquam lorem pede, orci ut enim metus, diam nulla mi "
+ + "suspendisse tempor tortor. Eleifend lorem proin, morbi vel diam ut. "
+ + "Tempor est tellus vitae, pretium condimentum facilisis sit. Sagittis "
+ + "quam, ac urna eros est cras id cras, eleifend eu mattis nec."
+ + "Lorem ipsum dolor sit amet, lacus pharetra sed, sit a "
+ + "tortor. Id aliquam lorem pede, orci ut enim metus, diam nulla mi "
+ + "suspendisse tempor tortor. Eleifend lorem proin, morbi vel diam ut. "
+ + "Tempor est tellus vitae, pretium condimentum facilisis sit. Sagittis "
+ + "quam, ac urna eros est cras id cras, eleifend eu mattis nec."
+ + "Lorem ipsum dolor sit amet, lacus pharetra sed, sit a "
+ + "tortor. Id aliquam lorem pede, orci ut enim metus, diam nulla mi "
+ + "suspendisse tempor tortor. Eleifend lorem proin, morbi vel diam ut. "
+ + "Tempor est tellus vitae, pretium condimentum facilisis sit. Sagittis "
+ + "quam, ac urna eros est cras id cras, eleifend eu mattis nec.");
VerticalLayout content = new VerticalLayout(editor);
content.setMargin(true);
@@ -57,7 +58,7 @@ public class CSSInjectWithColorpicker extends UI {
/**
* Creates a text editor for visually editing text
- *
+ *
* @param text
* The text editor
* @return
@@ -203,8 +204,8 @@ public class CSSInjectWithColorpicker extends UI {
*/
private Component createFontSizeSelect() {
- final ComboBox select = new ComboBox(null, Arrays.asList(8, 9, 10, 12,
- 14, 16, 20, 25, 30, 40, 50));
+ final ComboBox select = new ComboBox(null,
+ Arrays.asList(8, 9, 10, 12, 14, 16, 20, 25, 30, 40, 50));
select.setWidth("100px");
select.setValue(12);
select.setInputPrompt("Font size");
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_3/ThemeChangeUI.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_3/ThemeChangeUI.java
index c0082edcca..93f9fb59ab 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_3/ThemeChangeUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_3/ThemeChangeUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/ConfiguringColumnWidths.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/ConfiguringColumnWidths.java
index 3204ebd11c..582ff1e927 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/ConfiguringColumnWidths.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/ConfiguringColumnWidths.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/ConfiguringGridHeadersAndFooters.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/ConfiguringGridHeadersAndFooters.java
index 57e807a224..64357f2b67 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/ConfiguringGridHeadersAndFooters.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/ConfiguringGridHeadersAndFooters.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/FormattingDataInGrid.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/FormattingDataInGrid.java
index 3fd9c87262..f47202ff37 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/FormattingDataInGrid.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/FormattingDataInGrid.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -43,7 +43,8 @@ public class FormattingDataInGrid extends UI {
public String getStyle(CellReference cellReference) {
if ("amount".equals(cellReference.getPropertyId())) {
Double value = (Double) cellReference.getValue();
- if (value.doubleValue() == Math.round(value.doubleValue())) {
+ if (value.doubleValue() == Math
+ .round(value.doubleValue())) {
return "integer";
}
}
@@ -62,8 +63,8 @@ public class FormattingDataInGrid extends UI {
public String convertToPresentation(Integer value,
Class<? extends String> targetType, Locale locale)
throws Converter.ConversionException {
- String stringRepresentation = super.convertToPresentation(
- value, targetType, locale);
+ String stringRepresentation = super.convertToPresentation(value,
+ targetType, locale);
if (value.intValue() % 2 == 0) {
return "<strong>" + stringRepresentation + "</strong>";
} else {
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/GridExampleBean.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/GridExampleBean.java
index c39f458a6b..d64c45e5c8 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/GridExampleBean.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/GridExampleBean.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/GridExampleHelper.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/GridExampleHelper.java
index 539d3431e8..8cd4b78ede 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/GridExampleHelper.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/GridExampleHelper.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/ShowingInlineDataInGrid.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/ShowingInlineDataInGrid.java
index 72f101ab7a..2d76054e91 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/ShowingInlineDataInGrid.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/ShowingInlineDataInGrid.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/UsingGridWithAContainer.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/UsingGridWithAContainer.java
index 4cf3f14c2b..f4fbadade0 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/UsingGridWithAContainer.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/UsingGridWithAContainer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_5/ShowingExtraDataForRows.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_5/ShowingExtraDataForRows.java
index eaa099f3eb..449dc637b7 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_5/ShowingExtraDataForRows.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_5/ShowingExtraDataForRows.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -62,13 +62,14 @@ public class ShowingExtraDataForRows extends UI {
new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- Notification.show("Button clicked for "
- + bean.getName());
+ Notification.show(
+ "Button clicked for " + bean.getName());
}
});
// Wrap up all the parts into a vertical layout
- VerticalLayout layout = new VerticalLayout(label, image, button);
+ VerticalLayout layout = new VerticalLayout(label, image,
+ button);
layout.setSpacing(true);
layout.setMargin(true);
return layout;
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/AutoGeneratingForm.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/AutoGeneratingForm.java
index 0cb4492929..b35926be9a 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/AutoGeneratingForm.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/AutoGeneratingForm.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,7 +27,7 @@ import com.vaadin.ui.VerticalLayout;
* Mini tutorial code for
* https://vaadin.com/wiki/-/wiki/Main/Auto%20generating%20
* a%20form%20based%20on%20a%20bean%20-%20Vaadin%206%20style%20Form
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
@@ -43,8 +43,8 @@ public class AutoGeneratingForm extends UI {
// We need an item data source before we create the fields to be able to
// find the properties, otherwise we have to specify them by hand
- fieldGroup.setItemDataSource(new BeanItem<Person>(new Person("John",
- "Doe", 34)));
+ fieldGroup.setItemDataSource(
+ new BeanItem<Person>(new Person("John", "Doe", 34)));
// Loop through the properties, build fields for them and add the fields
// to this root
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/BasicApplication.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/BasicApplication.java
index a0e4a5851b..af8beb5c97 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/BasicApplication.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/BasicApplication.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.ui.VerticalLayout;
/**
* Mini tutorial code for
* https://vaadin.com/wiki/-/wiki/Main/Creating%20a%20basic%20application
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/CreatingPreserveState.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/CreatingPreserveState.java
index 952cf8c681..989fea3fb9 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/CreatingPreserveState.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/CreatingPreserveState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,7 +27,7 @@ import com.vaadin.ui.UI;
* Mini tutorial code for
* https://vaadin.com/wiki/-/wiki/Main/Creating%20an%20application
* %20that%20preserves%20state%20on%20refresh
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
@@ -48,7 +48,7 @@ public class CreatingPreserveState extends UI {
@Override
protected void refresh(VaadinRequest request) {
- content.addComponent(new Label("UI was refreshed @"
- + System.currentTimeMillis()));
+ content.addComponent(
+ new Label("UI was refreshed @" + System.currentTimeMillis()));
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/DefineUITheme.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/DefineUITheme.java
index 408995867c..da8a845f3e 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/DefineUITheme.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/DefineUITheme.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.ui.VerticalLayout;
/**
* Mini tutorial code for
* https://vaadin.com/wiki/-/wiki/Main/Defining%20the%20theme%20for%20a%20Root
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/DifferentFeaturesForDifferentClients.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/DifferentFeaturesForDifferentClients.java
index 213e23982b..bbab0df296 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/DifferentFeaturesForDifferentClients.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/DifferentFeaturesForDifferentClients.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import com.vaadin.ui.UI;
* Mini tutorial code for
* https://vaadin.com/wiki/-/wiki/Main/Creating%20an%20application
* %20with%20different%20features%20for%20different%20clients
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
@@ -69,7 +69,7 @@ class TouchUI extends UI {
WebBrowser webBrowser = getPage().getWebBrowser();
String screenSize = "" + webBrowser.getScreenWidth() + "x"
+ webBrowser.getScreenHeight();
- setContent(new Label("Using a touch enabled device with screen size"
- + screenSize));
+ setContent(new Label(
+ "Using a touch enabled device with screen size" + screenSize));
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/DynamicImageUI.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/DynamicImageUI.java
index f4eed8ddd6..fc3cf0b30a 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/DynamicImageUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/DynamicImageUI.java
@@ -28,8 +28,8 @@ public class DynamicImageUI extends AbstractTestUI {
String text = request.getParameter("text");
BufferedImage bi = new BufferedImage(100, 30,
BufferedImage.TYPE_3BYTE_BGR);
- bi.getGraphics().drawChars(text.toCharArray(), 0,
- text.length(), 10, 20);
+ bi.getGraphics().drawChars(text.toCharArray(), 0, text.length(),
+ 10, 20);
response.setContentType("image/png");
ImageIO.write(bi, "png", response.getOutputStream());
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/FindCurrentUI.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/FindCurrentUI.java
index b744a8de5c..0b8585dd79 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/FindCurrentUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/FindCurrentUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import com.vaadin.ui.UI;
* Mini tutorial code for
* https://vaadin.com/wiki/-/wiki/Main/Finding%20the%20current
* %20Root%20and%20Application
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/FormUsingExistingLayout.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/FormUsingExistingLayout.java
index 84f6ec26ff..26176ea858 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/FormUsingExistingLayout.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/FormUsingExistingLayout.java
@@ -78,8 +78,8 @@ public class FormUsingExistingLayout extends AbstractTestUI {
MyFormLayout myFormLayout = new MyFormLayout();
// Create a field group and use it to bind the fields in the layout
- FieldGroup fieldGroup = new FieldGroup(new BeanItem<Notice>(new Notice(
- "John", "Doe", "")));
+ FieldGroup fieldGroup = new FieldGroup(
+ new BeanItem<Notice>(new Notice("John", "Doe", "")));
fieldGroup.bindMemberFields(myFormLayout);
addComponent(myFormLayout);
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/IntegerTextFieldDataSource.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/IntegerTextFieldDataSource.java
index 9a9bc8fae0..fd0dc07a1e 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/IntegerTextFieldDataSource.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/IntegerTextFieldDataSource.java
@@ -32,7 +32,8 @@ public class IntegerTextFieldDataSource extends AbstractTestUI {
final Property<Integer> integerProperty = beanItem
.getItemProperty("value");
- final TextField textField = new TextField("Text field", integerProperty);
+ final TextField textField = new TextField("Text field",
+ integerProperty);
Button submitButton = new Button("Submit value", new ClickListener() {
@Override
@@ -48,7 +49,8 @@ public class IntegerTextFieldDataSource extends AbstractTestUI {
});
addComponent(new Label("Text field type: " + textField.getType()));
- addComponent(new Label("Text field type: " + integerProperty.getType()));
+ addComponent(
+ new Label("Text field type: " + integerProperty.getType()));
addComponent(textField);
addComponent(submitButton);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/MultiTabApplication.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/MultiTabApplication.java
index 4ef080afc2..346abd5d5d 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/MultiTabApplication.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/MultiTabApplication.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ import com.vaadin.ui.VerticalLayout;
/**
* Mini tutorial code for
* https://vaadin.com/wiki/-/wiki/Main/Creating%20multi%20tab%20applications
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
@@ -34,10 +34,10 @@ public class MultiTabApplication extends UI {
private class MainView extends VerticalLayout {
public MainView() {
- addComponent(new Link("Edit person 1", new ExternalResource(
- "?editPerson=person1")));
- addComponent(new Link("Edit person 2", new ExternalResource(
- "?editPerson=person2")));
+ addComponent(new Link("Edit person 1",
+ new ExternalResource("?editPerson=person1")));
+ addComponent(new Link("Edit person 2",
+ new ExternalResource("?editPerson=person2")));
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/StringMyTypeConverter.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/StringMyTypeConverter.java
index 8197cd82ae..df81050a07 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/StringMyTypeConverter.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/StringMyTypeConverter.java
@@ -59,8 +59,8 @@ class StringToNameConverter implements Converter<String, Name> {
}
String[] parts = text.split(" ");
if (parts.length != 2) {
- throw new ConversionException("Can not convert text to a name: "
- + text);
+ throw new ConversionException(
+ "Can not convert text to a name: " + text);
}
return new Name(parts[0], parts[1]);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/UsingBeanValidation.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/UsingBeanValidation.java
index 39aef56a1e..77491f792d 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/UsingBeanValidation.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/UsingBeanValidation.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,7 +30,7 @@ import com.vaadin.ui.UI;
* Mini tutorial code for
* https://vaadin.com/wiki/-/wiki/Main/Using%20Bean%20Validation
* %20to%20validate%20input
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/UsingUriFragments.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/UsingUriFragments.java
index fb84a4068b..363df23a4d 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/UsingUriFragments.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/UsingUriFragments.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import com.vaadin.ui.VerticalLayout;
/**
* Mini tutorial code for
* https://vaadin.com/wiki/-/wiki/Main/Using%20URI%20fragments
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
@@ -42,8 +42,8 @@ public class UsingUriFragments extends UI {
layout.setMargin(true);
setContent(layout);
- Label label = new Label("Hello, your fragment is "
- + getPage().getUriFragment());
+ Label label = new Label(
+ "Hello, your fragment is " + getPage().getUriFragment());
layout.addComponent(label);
// React to fragment changes
@@ -57,8 +57,8 @@ public class UsingUriFragments extends UI {
// Handle the fragment received in the initial request
handleFragment(getPage().getUriFragment());
- layout.addComponent(new Button("Show and set fragment",
- new Button.ClickListener() {
+ layout.addComponent(
+ new Button("Show and set fragment", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
handleFragment(getPage().getUriFragment());
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/UsingXyzWhenInitializing.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/UsingXyzWhenInitializing.java
index 4d95d9cc48..2e3d7d3581 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/UsingXyzWhenInitializing.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/UsingXyzWhenInitializing.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ import com.vaadin.ui.VerticalLayout;
* Mini tutorial code for
* https://vaadin.com/wiki/-/wiki/Main/Using%20URI%20or%20
* parameters%20or%20screen%20size%20when%20initializing%20an%20application
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
@@ -56,12 +56,12 @@ public class UsingXyzWhenInitializing extends UI {
String resolution = "Your browser window on startup was "
+ browser.getScreenWidth() + "x" + browser.getScreenHeight();
if (browser.getScreenWidth() > 1024) {
- layout.addComponent(new Label(
- "The is the large version of the application. "
+ layout.addComponent(
+ new Label("The is the large version of the application. "
+ resolution));
} else {
- layout.addComponent(new Label(
- "This is the small version of the application. "
+ layout.addComponent(
+ new Label("This is the small version of the application. "
+ resolution));
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/ComponentInStateComponent.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/ComponentInStateComponent.java
index 18a27b85b2..a217d519d3 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/ComponentInStateComponent.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/ComponentInStateComponent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/ComponentInStateUI.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/ComponentInStateUI.java
index 986811e0f4..43308ced30 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/ComponentInStateUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/ComponentInStateUI.java
@@ -10,7 +10,7 @@ import com.vaadin.ui.VerticalLayout;
* Mini tutorial code for
* https://vaadin.com/wiki/-/wiki/Main/Using%20Components%
* 20in%20the%20shared%20state
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/MyComponent.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/MyComponent.java
index 6512754683..75b06e02ef 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/MyComponent.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/MyComponent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,8 +32,8 @@ public class MyComponent extends AbstractComponent {
// nag every 5:th click
if (clickCount % 5 == 0) {
- getRpcProxy(MyComponentClientRpc.class).alert(
- "Ok, that's enough!");
+ getRpcProxy(MyComponentClientRpc.class)
+ .alert("Ok, that's enough!");
}
setText("You have clicked " + clickCount + " times");
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/MyComponentUI.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/MyComponentUI.java
index f291dfe1a9..9f49b1f61d 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/MyComponentUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/MyComponentUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import com.vaadin.ui.UI;
* 20events%20from%20the%20client%20to%20the%20server%20using%20RPC,
* https://vaadin
* .com/wiki/-/wiki/Main/Using%20RPC%20to%20send%20events%20to%20the%20client
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/MyPickerConnector.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/MyPickerConnector.java
index 8a73e90496..544e7c3b59 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/MyPickerConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/MyPickerConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,12 +28,12 @@ import com.vaadin.client.ui.layout.ElementResizeListener;
* https
* ://vaadin.com/wiki/-/wiki/Main/Lightweight%20calculations%20of%20widget%20l
* ayout and https://vaadin.com/wiki/-/wiki/Main/Complex%20widget%20layouts
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
-public class MyPickerConnector extends AbstractComponentConnector implements
- SimpleManagedLayout {
+public class MyPickerConnector extends AbstractComponentConnector
+ implements SimpleManagedLayout {
@Override
public MyPickerWidget getWidget() {
return (MyPickerWidget) super.getWidget();
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/ResourceInStateComponent.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/ResourceInStateComponent.java
index b22d3dfc1a..1e881d8f08 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/ResourceInStateComponent.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/ResourceInStateComponent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/ResourceInStateUI.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/ResourceInStateUI.java
index 148e7f22ea..49c93aa223 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/ResourceInStateUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/ResourceInStateUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.ui.UI;
* Mini tutorial code for
* https://vaadin.com/wiki/-/wiki/Main/Using%20Resources%20
* in%20the%20shared%20state
- *
+ *
* @author Vaadin Ltd
* @since 7.0.0
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/WidgetContainer.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/WidgetContainer.java
index 850fa1044f..8d1f4a1f9f 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/WidgetContainer.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a2/WidgetContainer.java
@@ -24,7 +24,8 @@ public class WidgetContainer extends AbstractComponentContainer {
}
@Override
- public void replaceComponent(Component oldComponent, Component newComponent) {
+ public void replaceComponent(Component oldComponent,
+ Component newComponent) {
int index = children.indexOf(oldComponent);
if (index != -1) {
children.remove(index);
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/Analytics.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/Analytics.java
index 338fb20893..15b7244a78 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/Analytics.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/Analytics.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/AnalyticsUI.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/AnalyticsUI.java
index b12f5829fc..a5de408474 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/AnalyticsUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/AnalyticsUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/CapsLockWarning.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/CapsLockWarning.java
index 4165e63951..eb806c61ad 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/CapsLockWarning.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/CapsLockWarning.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/CapsLockWarningUI.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/CapsLockWarningUI.java
index 19a7da7114..8411a857ae 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/CapsLockWarningUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/CapsLockWarningUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/ComplexTypesBean.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/ComplexTypesBean.java
index 002e3478bf..996062d93b 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/ComplexTypesBean.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/ComplexTypesBean.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/ComplexTypesComponent.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/ComplexTypesComponent.java
index 7b37166eab..e2da305eda 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/ComplexTypesComponent.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/ComplexTypesComponent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/ComplexTypesRpc.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/ComplexTypesRpc.java
index 1bc282de19..76244b3216 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/ComplexTypesRpc.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/ComplexTypesRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/ComplexTypesUI.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/ComplexTypesUI.java
index d233a54d86..c16a1b04cb 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/ComplexTypesUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/ComplexTypesUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/Flot.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/Flot.java
index 86666b12e8..8f1df6bc5c 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/Flot.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/Flot.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -34,8 +34,8 @@ public class Flot extends AbstractJavaScriptComponent {
registerRpc(new FlotClickRpc() {
@Override
public void onPlotClick(int seriesIndex, int dataIndex) {
- Notification.show("Clicked on [" + seriesIndex + ", "
- + dataIndex + "]");
+ Notification.show(
+ "Clicked on [" + seriesIndex + ", " + dataIndex + "]");
}
});
addFunction("onPlotClick", new JavaScriptFunction() {
@@ -43,8 +43,8 @@ public class Flot extends AbstractJavaScriptComponent {
public void call(JsonArray arguments) {
int seriesIndex = (int) arguments.getNumber(0);
int dataIndex = (int) arguments.getNumber(1);
- Notification.show("Clicked on [" + seriesIndex + ", "
- + dataIndex + "]");
+ Notification.show(
+ "Clicked on [" + seriesIndex + ", " + dataIndex + "]");
}
});
}
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/FlotHighlightRpc.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/FlotHighlightRpc.java
index 99c4fdd91b..060514ee03 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/FlotHighlightRpc.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/FlotHighlightRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/FlotJavaScriptUI.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/FlotJavaScriptUI.java
index f6449b1997..db2eff21e9 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/FlotJavaScriptUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/FlotJavaScriptUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -37,8 +37,8 @@ public class FlotJavaScriptUI extends UI {
flot.addSeries(1, 2, 4, 8, 16);
layout.addComponent(flot);
- layout.addComponent(new Button("Highlight point",
- new Button.ClickListener() {
+ layout.addComponent(
+ new Button("Highlight point", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
flot.highlight(0, 3);
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/JSAPIUI.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/JSAPIUI.java
index ea9cd52d34..1c32e0c7ca 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/JSAPIUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/JSAPIUI.java
@@ -40,9 +40,7 @@ public class JSAPIUI extends UI {
}
});
- setContent(new Link(
- "Send message",
- new ExternalResource(
- "javascript:(function(){com.example.api.notify(prompt('Message'),2);})();")));
+ setContent(new Link("Send message", new ExternalResource(
+ "javascript:(function(){com.example.api.notify(prompt('Message'),2);})();")));
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/RedButton.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/RedButton.java
index 5c5037d5ad..fb8d9e5e1c 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/RedButton.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/RedButton.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/RedButtonUI.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/RedButtonUI.java
index fb6a4dc83a..df77b7293e 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/RedButtonUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/RedButtonUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/RefresherTestUI.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/RefresherTestUI.java
index e9243ac0cb..ffa63975bc 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/RefresherTestUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a3/RefresherTestUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2012 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b1/Addition.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b1/Addition.java
index 696137c3b1..ae05322deb 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b1/Addition.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b1/Addition.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b1/AxessingWebPageAndBrowserInfoUI.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b1/AxessingWebPageAndBrowserInfoUI.java
index 4fbe62a2ce..87ef3b529b 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b1/AxessingWebPageAndBrowserInfoUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b1/AxessingWebPageAndBrowserInfoUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2012 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b1/BootstrapListenerCode.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b1/BootstrapListenerCode.java
index 422e44e402..634da84963 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b1/BootstrapListenerCode.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b1/BootstrapListenerCode.java
@@ -1,12 +1,12 @@
/*
* Copyright 2012 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -45,7 +45,8 @@ public class BootstrapListenerCode {
}
@Override
- public void modifyBootstrapFragment(BootstrapFragmentResponse response) {
+ public void modifyBootstrapFragment(
+ BootstrapFragmentResponse response) {
// Wrap the fragment in a custom div element
Element myDiv = new Element(Tag.valueOf("div"), "");
List<Node> nodes = response.getFragmentNodes();
@@ -66,8 +67,8 @@ class MyVaadinServlet extends VaadinServlet {
@Override
public void sessionInit(SessionInitEvent event)
throws ServiceException {
- event.getSession().addBootstrapListener(
- BootstrapListenerCode.listener);
+ event.getSession()
+ .addBootstrapListener(BootstrapListenerCode.listener);
}
});
}
@@ -83,8 +84,8 @@ class MyVaadinPortlet extends VaadinPortlet {
@Override
public void sessionInit(SessionInitEvent event)
throws ServiceException {
- event.getSession().addBootstrapListener(
- BootstrapListenerCode.listener);
+ event.getSession()
+ .addBootstrapListener(BootstrapListenerCode.listener);
}
});
}
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b1/CapsLockWarningWithRpc.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b1/CapsLockWarningWithRpc.java
index 280be5982e..dc36825bbf 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b1/CapsLockWarningWithRpc.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b1/CapsLockWarningWithRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b1/ReducingRoundTrips.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b1/ReducingRoundTrips.java
index 03310ab9e8..1552d4280f 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b1/ReducingRoundTrips.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b1/ReducingRoundTrips.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b2/CleanupUI.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b2/CleanupUI.java
index 4e70748985..262c14e42e 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b2/CleanupUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b2/CleanupUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2012 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b5/HandlingLogout.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b5/HandlingLogout.java
index 0356b4c5a8..864d4c148f 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b5/HandlingLogout.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b5/HandlingLogout.java
@@ -1,12 +1,12 @@
/*
* Copyright 2012 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b5/SettingReadingSessionAttributesUI.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b5/SettingReadingSessionAttributesUI.java
index 99b5973661..a923185869 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b5/SettingReadingSessionAttributesUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b5/SettingReadingSessionAttributesUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2012 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -42,17 +42,18 @@ public class SettingReadingSessionAttributesUI extends UI {
layout.addComponent(statusHolder);
layout.addComponent(textField);
- layout.addComponent(new Button("Set new values",
- new Button.ClickListener() {
+ layout.addComponent(
+ new Button("Set new values", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
String value = textField.getValue();
- saveValue(SettingReadingSessionAttributesUI.this, value);
+ saveValue(SettingReadingSessionAttributesUI.this,
+ value);
}
}));
- layout.addComponent(new Button("Reload page",
- new Button.ClickListener() {
+ layout.addComponent(
+ new Button("Reload page", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
getPage().setLocation(getPage().getLocation());
@@ -79,12 +80,11 @@ public class SettingReadingSessionAttributesUI extends UI {
private static void showValue(SettingReadingSessionAttributesUI ui) {
ui.statusHolder.removeAllComponents();
ui.statusHolder.addComponent(new Label("Value in UI: " + ui.value));
+ ui.statusHolder.addComponent(new Label("Value in VaadinServiceSession: "
+ + ui.getSession().getAttribute("myValue")));
ui.statusHolder.addComponent(new Label(
- "Value in VaadinServiceSession: "
- + ui.getSession().getAttribute("myValue")));
- ui.statusHolder.addComponent(new Label("Value in HttpSession: "
- + VaadinService.getCurrentRequest().getWrappedSession()
- .getAttribute("myValue")));
+ "Value in HttpSession: " + VaadinService.getCurrentRequest()
+ .getWrappedSession().getAttribute("myValue")));
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b6/LettingUserDownloadFile.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b6/LettingUserDownloadFile.java
index d5c99c931b..b6a7af1038 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b6/LettingUserDownloadFile.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b6/LettingUserDownloadFile.java
@@ -1,12 +1,12 @@
/*
* Copyright 2012 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -51,8 +51,8 @@ public class LettingUserDownloadFile extends UI {
String text = "My image";
BufferedImage bi = new BufferedImage(100, 30,
BufferedImage.TYPE_3BYTE_BGR);
- bi.getGraphics().drawChars(text.toCharArray(), 0,
- text.length(), 10, 20);
+ bi.getGraphics().drawChars(text.toCharArray(), 0, text.length(),
+ 10, 20);
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b6/MyPopupUI.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b6/MyPopupUI.java
index eb9afc02cd..2d09b8f27f 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b6/MyPopupUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b6/MyPopupUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2012 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b6/OpeningUIInPopup.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b6/OpeningUIInPopup.java
index da9c73dd94..52e14239d5 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b6/OpeningUIInPopup.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b6/OpeningUIInPopup.java
@@ -1,12 +1,12 @@
/*
* Copyright 2012 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b9/LoginView.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b9/LoginView.java
index 28f8443440..111c295dc3 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b9/LoginView.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b9/LoginView.java
@@ -33,8 +33,8 @@ public class LoginView extends Panel implements View {
Notification.show("Ok, let's pretend you're " + email);
// indicate the user is logged in
- ((NavigationtestUI) UI.getCurrent()).setLoggedInUser(email
- .getValue());
+ ((NavigationtestUI) UI.getCurrent())
+ .setLoggedInUser(email.getValue());
// navigate back to the intended place
navigator.navigateTo(fragmentAndParameters);
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b9/MainView.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b9/MainView.java
index 3764b7622e..38a10dd3c6 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b9/MainView.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b9/MainView.java
@@ -25,20 +25,20 @@ public class MainView extends Panel implements View {
new ExternalResource("#!" + CountView.NAME));
layout.addComponent(lnk);
- lnk = new Link("Message: Hello", new ExternalResource("#!"
- + MessageView.NAME + "/Hello"));
+ lnk = new Link("Message: Hello",
+ new ExternalResource("#!" + MessageView.NAME + "/Hello"));
layout.addComponent(lnk);
- lnk = new Link("Message: Bye", new ExternalResource("#!"
- + MessageView.NAME + "/Bye/Goodbye"));
+ lnk = new Link("Message: Bye",
+ new ExternalResource("#!" + MessageView.NAME + "/Bye/Goodbye"));
layout.addComponent(lnk);
- lnk = new Link("Private message: Secret", new ExternalResource("#!"
- + SecretView.NAME + "/Secret"));
+ lnk = new Link("Private message: Secret",
+ new ExternalResource("#!" + SecretView.NAME + "/Secret"));
layout.addComponent(lnk);
- lnk = new Link("Private message: Topsecret", new ExternalResource("#!"
- + SecretView.NAME + "/Topsecret"));
+ lnk = new Link("Private message: Topsecret",
+ new ExternalResource("#!" + SecretView.NAME + "/Topsecret"));
layout.addComponent(lnk);
logOut = new Button("Logout", new Button.ClickListener() {
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b9/MainViewEarlierExample.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b9/MainViewEarlierExample.java
index e638770346..7750bdafd6 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b9/MainViewEarlierExample.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b9/MainViewEarlierExample.java
@@ -22,20 +22,20 @@ public class MainViewEarlierExample extends Panel implements View {
new ExternalResource("#!" + CountView.NAME));
layout.addComponent(lnk);
- lnk = new Link("Message: Hello", new ExternalResource("#!"
- + MessageView.NAME + "/Hello"));
+ lnk = new Link("Message: Hello",
+ new ExternalResource("#!" + MessageView.NAME + "/Hello"));
layout.addComponent(lnk);
- lnk = new Link("Message: Bye", new ExternalResource("#!"
- + MessageView.NAME + "/Bye/Goodbye"));
+ lnk = new Link("Message: Bye",
+ new ExternalResource("#!" + MessageView.NAME + "/Bye/Goodbye"));
layout.addComponent(lnk);
- lnk = new Link("Private message: Secret", new ExternalResource("#!"
- + SecretView.NAME + "/Secret"));
+ lnk = new Link("Private message: Secret",
+ new ExternalResource("#!" + SecretView.NAME + "/Secret"));
layout.addComponent(lnk);
- lnk = new Link("Private message: Topsecret", new ExternalResource("#!"
- + SecretView.NAME + "/Topsecret"));
+ lnk = new Link("Private message: Topsecret",
+ new ExternalResource("#!" + SecretView.NAME + "/Topsecret"));
layout.addComponent(lnk);
// login/logout toggle so we can test this
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b9/MainView__LastNavigatorExample.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b9/MainView__LastNavigatorExample.java
index 5344a06a31..707ac7b05e 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b9/MainView__LastNavigatorExample.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b9/MainView__LastNavigatorExample.java
@@ -14,8 +14,8 @@ public class MainView__LastNavigatorExample extends Panel implements View {
public MainView__LastNavigatorExample(final Navigator navigator) {
- Link lnk = new Link("Settings", new ExternalResource("#!"
- + SettingsView.NAME));
+ Link lnk = new Link("Settings",
+ new ExternalResource("#!" + SettingsView.NAME));
VerticalLayout vl = new VerticalLayout();
vl.addComponent(lnk);
setContent(vl);
diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b9/NavigationtestUI.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b9/NavigationtestUI.java
index 62941443b2..e066e945c1 100644
--- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b9/NavigationtestUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b9/NavigationtestUI.java
@@ -29,23 +29,23 @@ public class NavigationtestUI extends UI {
/*
* Commented away from other example // no fragment for main view
* navigator.addView(MainView.NAME, new MainView(navigator));
- *
+ *
* navigator.addView(CountView.NAME, CountView.class);
- *
+ *
* // #message adds a label with whatever it receives as a parameter
* navigator.addView(MessageView.NAME, new MessageView());
- *
+ *
* // #secret works as #message, but you need to be logged in
* navigator.addView(SecretView.NAME, new SecretView());
- *
+ *
* // #login will navigate to the main view if invoked via this
* mechanism navigator.addView(LoginView.NAME, new LoginView(navigator,
* MainView.NAME));
- *
+ *
* // we'll handle permissions with a listener here, you could also do
* // that in the View itself. navigator.addViewChangeListener(new
* ViewChangeListener() {
- *
+ *
* @Override public boolean beforeViewChange(ViewChangeEvent event) { if
* (((NavigationtestUI)UI.getCurrent()).getLoggedInUser() == null) { //
* Show to LoginView instead, pass intended view String
@@ -54,11 +54,11 @@ public class NavigationtestUI extends UI {
* fragmentAndParameters += event.getParameters(); }
* navigator.getDisplay().showView(new LoginView(navigator,
* fragmentAndParameters)); return false;
- *
+ *
* } else { return true; } }
- *
+ *
* @Override public void afterViewChange(ViewChangeEvent event) {
- *
+ *
* } });
*/
// react to initial fragment, received before we created the Navigator
diff --git a/uitest/src/main/java/com/vaadin/tests/navigator/NavigatorTest.java b/uitest/src/main/java/com/vaadin/tests/navigator/NavigatorTest.java
index ebbc684c9c..62aa8eec86 100644
--- a/uitest/src/main/java/com/vaadin/tests/navigator/NavigatorTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/navigator/NavigatorTest.java
@@ -37,9 +37,8 @@ public class NavigatorTest extends UI {
@Override
public void enter(ViewChangeEvent event) {
String params = event.getParameters();
- log.log("Navigated to ListView "
- + (params.isEmpty() ? "without params" : "with params "
- + params));
+ log.log("Navigated to ListView " + (params.isEmpty()
+ ? "without params" : "with params " + params));
removeAllItems();
for (String arg : params.split(",")) {
addItem(arg.split("=|$", 2), arg);
@@ -52,9 +51,8 @@ public class NavigatorTest extends UI {
@Override
public void enter(ViewChangeEvent event) {
String params = event.getParameters();
- log.log("Navigated to EditView "
- + (params.isEmpty() ? "without params" : "with params "
- + params));
+ log.log("Navigated to EditView " + (params.isEmpty()
+ ? "without params" : "with params " + params));
setValue("Displaying edit view with parameters " + params);
}
}
@@ -75,9 +73,8 @@ public class NavigatorTest extends UI {
@Override
public void enter(ViewChangeEvent event) {
String params = event.getParameters();
- log.log("Navigated to DefaultView "
- + (params.isEmpty() ? "without params" : "with params "
- + params));
+ log.log("Navigated to DefaultView " + (params.isEmpty()
+ ? "without params" : "with params " + params));
setValue("Default view: " + event.getParameters());
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/navigator/NavigatorViewBlocksBackButtonAction.java b/uitest/src/main/java/com/vaadin/tests/navigator/NavigatorViewBlocksBackButtonAction.java
index 5c78a3f42a..9f255fb8b3 100644
--- a/uitest/src/main/java/com/vaadin/tests/navigator/NavigatorViewBlocksBackButtonAction.java
+++ b/uitest/src/main/java/com/vaadin/tests/navigator/NavigatorViewBlocksBackButtonAction.java
@@ -55,8 +55,8 @@ public class NavigatorViewBlocksBackButtonAction extends AbstractTestUI {
}
- class ViewWithPromptedLeave extends VerticalLayout implements View,
- ViewChangeListener {
+ class ViewWithPromptedLeave extends VerticalLayout
+ implements View, ViewChangeListener {
public static final String NAME = "prompted";
@@ -89,17 +89,17 @@ public class NavigatorViewBlocksBackButtonAction extends AbstractTestUI {
confirmationWindow.setContent(confirmationWindowLayout);
confirmationWindowLayout.setMargin(true);
confirmationWindowLayout.setSpacing(true);
- confirmationWindowLayout.addComponent(new Label(
- "Really exit this view?"));
- confirmationWindowLayout.addComponent(new Button("Yeah, sure!",
- new Button.ClickListener() {
+ confirmationWindowLayout
+ .addComponent(new Label("Really exit this view?"));
+ confirmationWindowLayout.addComponent(
+ new Button("Yeah, sure!", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent buttonEvent) {
okToLeave = true;
getUI().removeWindow(confirmationWindow);
- event.getNavigator().navigateTo(
- event.getViewName() + "/"
+ event.getNavigator()
+ .navigateTo(event.getViewName() + "/"
+ event.getParameters());
}
}));
diff --git a/uitest/src/main/java/com/vaadin/tests/overlays/OverlayTouchScrolling.java b/uitest/src/main/java/com/vaadin/tests/overlays/OverlayTouchScrolling.java
index fdcfdf7266..d5f7359bb0 100644
--- a/uitest/src/main/java/com/vaadin/tests/overlays/OverlayTouchScrolling.java
+++ b/uitest/src/main/java/com/vaadin/tests/overlays/OverlayTouchScrolling.java
@@ -35,8 +35,8 @@ public class OverlayTouchScrolling extends AbstractTestUI {
@Override
public void buttonClick(ClickEvent event) {
- Notification
- .show("Now close this and you can scroll in mad places.");
+ Notification.show(
+ "Now close this and you can scroll in mad places.");
green.addComponent(new Label(
"Thank you for clicking, now scroll (with touch device) to area without green background, which shouldn't be possible."));
}
diff --git a/uitest/src/main/java/com/vaadin/tests/performance/BasicPerformanceTest.java b/uitest/src/main/java/com/vaadin/tests/performance/BasicPerformanceTest.java
index a97f2611d1..4e351628a3 100644
--- a/uitest/src/main/java/com/vaadin/tests/performance/BasicPerformanceTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/performance/BasicPerformanceTest.java
@@ -49,8 +49,8 @@ public class BasicPerformanceTest extends UI {
this.performanceTopic = performanceTopic;
this.serverLimit = serverLimit;
this.clientLimit = clientLimit;
- reportPerformanceButton.setCaption("Report performance for "
- + performanceTopic);
+ reportPerformanceButton
+ .setCaption("Report performance for " + performanceTopic);
reportPerformanceButton.setEnabled(true);
reportBootstap = false;
}
@@ -97,8 +97,8 @@ public class BasicPerformanceTest extends UI {
}
}));
- leftBar.addComponent(new Button("Update all labels",
- new Button.ClickListener() {
+ leftBar.addComponent(
+ new Button("Update all labels", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
Iterator<Component> componentIterator = contentLayout
@@ -129,8 +129,8 @@ public class BasicPerformanceTest extends UI {
}
}));
- leftBar.addComponent(new Button("Update one label",
- new Button.ClickListener() {
+ leftBar.addComponent(
+ new Button("Update one label", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
Component child = contentLayout.getComponent(0);
@@ -149,8 +149,8 @@ public class BasicPerformanceTest extends UI {
}
}));
- leftBar.addComponent(new Button("Clear content",
- new Button.ClickListener() {
+ leftBar.addComponent(
+ new Button("Clear content", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
contentLayout.removeAllComponents();
diff --git a/uitest/src/main/java/com/vaadin/tests/push/BarInUIDL.java b/uitest/src/main/java/com/vaadin/tests/push/BarInUIDL.java
index a5d23dcd1f..75d9e71494 100644
--- a/uitest/src/main/java/com/vaadin/tests/push/BarInUIDL.java
+++ b/uitest/src/main/java/com/vaadin/tests/push/BarInUIDL.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ public class BarInUIDL extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -46,7 +46,7 @@ public class BarInUIDL extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -56,7 +56,7 @@ public class BarInUIDL extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/push/BasicPush.java b/uitest/src/main/java/com/vaadin/tests/push/BasicPush.java
index 7379b08f5b..4b0fa9219b 100644
--- a/uitest/src/main/java/com/vaadin/tests/push/BasicPush.java
+++ b/uitest/src/main/java/com/vaadin/tests/push/BasicPush.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -98,7 +98,8 @@ public class BasicPush extends AbstractTestUI {
access(new Runnable() {
@Override
public void run() {
- counter2.setValue(counter2.getValue() + 1);
+ counter2.setValue(
+ counter2.getValue() + 1);
}
});
}
diff --git a/uitest/src/main/java/com/vaadin/tests/push/BasicPushLongPolling.java b/uitest/src/main/java/com/vaadin/tests/push/BasicPushLongPolling.java
index 8b6f634aae..ae1f1ee86d 100644
--- a/uitest/src/main/java/com/vaadin/tests/push/BasicPushLongPolling.java
+++ b/uitest/src/main/java/com/vaadin/tests/push/BasicPushLongPolling.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/push/BasicPushStreaming.java b/uitest/src/main/java/com/vaadin/tests/push/BasicPushStreaming.java
index c906c5f6e1..5316c29d69 100644
--- a/uitest/src/main/java/com/vaadin/tests/push/BasicPushStreaming.java
+++ b/uitest/src/main/java/com/vaadin/tests/push/BasicPushStreaming.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/push/BasicPushWebsocket.java b/uitest/src/main/java/com/vaadin/tests/push/BasicPushWebsocket.java
index 84c0b19ce8..386ff700dc 100644
--- a/uitest/src/main/java/com/vaadin/tests/push/BasicPushWebsocket.java
+++ b/uitest/src/main/java/com/vaadin/tests/push/BasicPushWebsocket.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/push/BasicPushWebsocketXhr.java b/uitest/src/main/java/com/vaadin/tests/push/BasicPushWebsocketXhr.java
index e31eb2a369..82996e1820 100644
--- a/uitest/src/main/java/com/vaadin/tests/push/BasicPushWebsocketXhr.java
+++ b/uitest/src/main/java/com/vaadin/tests/push/BasicPushWebsocketXhr.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/push/EnableDisablePush.java b/uitest/src/main/java/com/vaadin/tests/push/EnableDisablePush.java
index d5646c976b..98b5e3e2e8 100644
--- a/uitest/src/main/java/com/vaadin/tests/push/EnableDisablePush.java
+++ b/uitest/src/main/java/com/vaadin/tests/push/EnableDisablePush.java
@@ -35,8 +35,8 @@ public class EnableDisablePush extends AbstractTestUI {
log.log("Counter = " + c++);
if (c == 3) {
log.log("Disabling polling, enabling push");
- getPushConfiguration().setPushMode(
- PushMode.AUTOMATIC);
+ getPushConfiguration()
+ .setPushMode(PushMode.AUTOMATIC);
setPollInterval(-1);
log.log("Polling disabled, push enabled");
}
@@ -94,18 +94,19 @@ public class EnableDisablePush extends AbstractTestUI {
}
}));
- addComponent(new Button(
- "Disable push, re-enable from background thread",
- new Button.ClickListener() {
- @Override
- public void buttonClick(Button.ClickEvent event) {
- log.log("Disabling push, enabling polling");
- getPushConfiguration().setPushMode(PushMode.DISABLED);
- setPollInterval(1000);
- timer.schedule(new CounterTask(), new Date());
- log.log("Push disabled, polling enabled");
- }
- }));
+ addComponent(
+ new Button("Disable push, re-enable from background thread",
+ new Button.ClickListener() {
+ @Override
+ public void buttonClick(Button.ClickEvent event) {
+ log.log("Disabling push, enabling polling");
+ getPushConfiguration()
+ .setPushMode(PushMode.DISABLED);
+ setPollInterval(1000);
+ timer.schedule(new CounterTask(), new Date());
+ log.log("Push disabled, polling enabled");
+ }
+ }));
addComponent(log);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/push/ExtremelyLongPushTime.java b/uitest/src/main/java/com/vaadin/tests/push/ExtremelyLongPushTime.java
index 815b85ecc4..816f4d2e47 100644
--- a/uitest/src/main/java/com/vaadin/tests/push/ExtremelyLongPushTime.java
+++ b/uitest/src/main/java/com/vaadin/tests/push/ExtremelyLongPushTime.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ public abstract class ExtremelyLongPushTime extends PushLargeData {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/push/ExtremelyLongPushTimeLongPolling.java b/uitest/src/main/java/com/vaadin/tests/push/ExtremelyLongPushTimeLongPolling.java
index 3080b96ec4..a4864238b5 100644
--- a/uitest/src/main/java/com/vaadin/tests/push/ExtremelyLongPushTimeLongPolling.java
+++ b/uitest/src/main/java/com/vaadin/tests/push/ExtremelyLongPushTimeLongPolling.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/push/ExtremelyLongPushTimeStreaming.java b/uitest/src/main/java/com/vaadin/tests/push/ExtremelyLongPushTimeStreaming.java
index 04a9c68e32..ad23afd857 100644
--- a/uitest/src/main/java/com/vaadin/tests/push/ExtremelyLongPushTimeStreaming.java
+++ b/uitest/src/main/java/com/vaadin/tests/push/ExtremelyLongPushTimeStreaming.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/push/ExtremelyLongPushTimeWebsocket.java b/uitest/src/main/java/com/vaadin/tests/push/ExtremelyLongPushTimeWebsocket.java
index f73e7b728c..a276bd23bc 100644
--- a/uitest/src/main/java/com/vaadin/tests/push/ExtremelyLongPushTimeWebsocket.java
+++ b/uitest/src/main/java/com/vaadin/tests/push/ExtremelyLongPushTimeWebsocket.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/push/ManualLongPollingPushUI.java b/uitest/src/main/java/com/vaadin/tests/push/ManualLongPollingPushUI.java
index 190f6daa24..5917c9fec9 100644
--- a/uitest/src/main/java/com/vaadin/tests/push/ManualLongPollingPushUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/push/ManualLongPollingPushUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/push/PushConfiguration.java b/uitest/src/main/java/com/vaadin/tests/push/PushConfiguration.java
index 5e56a5f361..850282cfd1 100644
--- a/uitest/src/main/java/com/vaadin/tests/push/PushConfiguration.java
+++ b/uitest/src/main/java/com/vaadin/tests/push/PushConfiguration.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/push/PushConfigurator.java b/uitest/src/main/java/com/vaadin/tests/push/PushConfigurator.java
index 7da58af1da..bb57e1fbaf 100644
--- a/uitest/src/main/java/com/vaadin/tests/push/PushConfigurator.java
+++ b/uitest/src/main/java/com/vaadin/tests/push/PushConfigurator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -15,7 +15,7 @@
*/
/**
- *
+ *
*/
package com.vaadin.tests.push;
@@ -40,7 +40,7 @@ import com.vaadin.ui.UI;
import com.vaadin.ui.VerticalLayout;
/**
- *
+ *
* @since 7.1
* @author Vaadin Ltd
*/
@@ -113,8 +113,8 @@ public class PushConfigurator extends VerticalLayout {
pushMode.addValueChangeListener(new ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
- ui.getPushConfiguration().setPushMode(
- (PushMode) pushMode.getValue());
+ ui.getPushConfiguration()
+ .setPushMode((PushMode) pushMode.getValue());
refreshStatus();
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/push/PushErrorHandling.java b/uitest/src/main/java/com/vaadin/tests/push/PushErrorHandling.java
index a1182c0daf..e73f776b3b 100644
--- a/uitest/src/main/java/com/vaadin/tests/push/PushErrorHandling.java
+++ b/uitest/src/main/java/com/vaadin/tests/push/PushErrorHandling.java
@@ -28,10 +28,10 @@ public class PushErrorHandling extends AbstractTestUI {
@Override
public void error(com.vaadin.server.ErrorEvent event) {
- addComponent(new Label("An error! "
- + event.getThrowable().getMessage()));
- System.err.println("An error! "
- + event.getThrowable().getMessage());
+ addComponent(new Label(
+ "An error! " + event.getThrowable().getMessage()));
+ System.err.println(
+ "An error! " + event.getThrowable().getMessage());
}
});
@@ -60,8 +60,8 @@ public class PushErrorHandling extends AbstractTestUI {
AbstractInMemoryContainer.class) {
@Override
public Collection<String> getContainerPropertyIds() {
- List<String> cpropIds = new ArrayList<String>(super
- .getContainerPropertyIds());
+ List<String> cpropIds = new ArrayList<String>(
+ super.getContainerPropertyIds());
cpropIds.add("testid");
return cpropIds;
}
diff --git a/uitest/src/main/java/com/vaadin/tests/push/PushFromInit.java b/uitest/src/main/java/com/vaadin/tests/push/PushFromInit.java
index 63af3d9ec7..941ce3bed0 100644
--- a/uitest/src/main/java/com/vaadin/tests/push/PushFromInit.java
+++ b/uitest/src/main/java/com/vaadin/tests/push/PushFromInit.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/push/PushLargeData.java b/uitest/src/main/java/com/vaadin/tests/push/PushLargeData.java
index f9625b80be..bce96e8d25 100644
--- a/uitest/src/main/java/com/vaadin/tests/push/PushLargeData.java
+++ b/uitest/src/main/java/com/vaadin/tests/push/PushLargeData.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -15,7 +15,7 @@
*/
/**
- *
+ *
*/
package com.vaadin.tests.push;
@@ -88,7 +88,8 @@ public abstract class PushLargeData extends AbstractTestUIWithLog {
pushDuration);
executor.execute(r);
log.log("Starting push, size: " + pushSize + ", interval: "
- + pushInterval + "ms, duration: " + pushDuration + "ms");
+ + pushInterval + "ms, duration: " + pushDuration
+ + "ms");
}
});
addComponent(b);
diff --git a/uitest/src/main/java/com/vaadin/tests/push/PushLargeDataLongPolling.java b/uitest/src/main/java/com/vaadin/tests/push/PushLargeDataLongPolling.java
index c2fdb5ae95..f7165a1dfc 100644
--- a/uitest/src/main/java/com/vaadin/tests/push/PushLargeDataLongPolling.java
+++ b/uitest/src/main/java/com/vaadin/tests/push/PushLargeDataLongPolling.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/push/PushLargeDataStreaming.java b/uitest/src/main/java/com/vaadin/tests/push/PushLargeDataStreaming.java
index ef300ab222..3798fb221a 100644
--- a/uitest/src/main/java/com/vaadin/tests/push/PushLargeDataStreaming.java
+++ b/uitest/src/main/java/com/vaadin/tests/push/PushLargeDataStreaming.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/push/PushLargeDataWebsocket.java b/uitest/src/main/java/com/vaadin/tests/push/PushLargeDataWebsocket.java
index a893d7f1ef..92c032aae1 100644
--- a/uitest/src/main/java/com/vaadin/tests/push/PushLargeDataWebsocket.java
+++ b/uitest/src/main/java/com/vaadin/tests/push/PushLargeDataWebsocket.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/push/PushWithRequireJS.java b/uitest/src/main/java/com/vaadin/tests/push/PushWithRequireJS.java
index 93e9d392ee..182c388bdc 100644
--- a/uitest/src/main/java/com/vaadin/tests/push/PushWithRequireJS.java
+++ b/uitest/src/main/java/com/vaadin/tests/push/PushWithRequireJS.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/push/RefreshCloseConnection.java b/uitest/src/main/java/com/vaadin/tests/push/RefreshCloseConnection.java
index 4d02c4e62e..b992928d88 100644
--- a/uitest/src/main/java/com/vaadin/tests/push/RefreshCloseConnection.java
+++ b/uitest/src/main/java/com/vaadin/tests/push/RefreshCloseConnection.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/push/RoundTripTest.java b/uitest/src/main/java/com/vaadin/tests/push/RoundTripTest.java
index 4e192db7f8..2faaead8ea 100644
--- a/uitest/src/main/java/com/vaadin/tests/push/RoundTripTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/push/RoundTripTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/push/StreamingReconnectWhilePushing.java b/uitest/src/main/java/com/vaadin/tests/push/StreamingReconnectWhilePushing.java
index 74d089374c..3fc7f0c428 100644
--- a/uitest/src/main/java/com/vaadin/tests/push/StreamingReconnectWhilePushing.java
+++ b/uitest/src/main/java/com/vaadin/tests/push/StreamingReconnectWhilePushing.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/push/TablePushStreaming.java b/uitest/src/main/java/com/vaadin/tests/push/TablePushStreaming.java
index 04aad63813..4904c52a53 100644
--- a/uitest/src/main/java/com/vaadin/tests/push/TablePushStreaming.java
+++ b/uitest/src/main/java/com/vaadin/tests/push/TablePushStreaming.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -15,7 +15,7 @@
*/
/**
- *
+ *
*/
package com.vaadin.tests.push;
@@ -29,7 +29,7 @@ import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.ui.Table;
/**
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -40,7 +40,7 @@ public class TablePushStreaming extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -105,7 +105,7 @@ public class TablePushStreaming extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -115,7 +115,7 @@ public class TablePushStreaming extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/push/TogglePush.java b/uitest/src/main/java/com/vaadin/tests/push/TogglePush.java
index e662545134..5413ae471b 100644
--- a/uitest/src/main/java/com/vaadin/tests/push/TogglePush.java
+++ b/uitest/src/main/java/com/vaadin/tests/push/TogglePush.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -38,13 +38,12 @@ public class TogglePush extends AbstractTestUI {
addComponent(counterLabel);
getPushConfiguration()
- .setPushMode(
- "disabled".equals(request.getParameter("push")) ? PushMode.DISABLED
- : PushMode.AUTOMATIC);
+ .setPushMode("disabled".equals(request.getParameter("push"))
+ ? PushMode.DISABLED : PushMode.AUTOMATIC);
CheckBox pushSetting = new CheckBox("Push enabled");
- pushSetting.setValue(Boolean.valueOf(getPushConfiguration()
- .getPushMode().isEnabled()));
+ pushSetting.setValue(Boolean
+ .valueOf(getPushConfiguration().getPushMode().isEnabled()));
pushSetting.setImmediate(true);
pushSetting.addValueChangeListener(new ValueChangeListener() {
@Override
@@ -58,8 +57,8 @@ public class TogglePush extends AbstractTestUI {
});
addComponent(pushSetting);
- addComponent(new Button("Update counter now",
- new Button.ClickListener() {
+ addComponent(
+ new Button("Update counter now", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
updateCounter();
@@ -86,8 +85,8 @@ public class TogglePush extends AbstractTestUI {
}
public void updateCounter() {
- counterLabel.setValue("Counter has been updated " + counter++
- + " times");
+ counterLabel
+ .setValue("Counter has been updated " + counter++ + " times");
}
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/push/TrackMessageSizeUI.java b/uitest/src/main/java/com/vaadin/tests/push/TrackMessageSizeUI.java
index 182a2e67e4..c51987f9a9 100644
--- a/uitest/src/main/java/com/vaadin/tests/push/TrackMessageSizeUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/push/TrackMessageSizeUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -64,8 +64,8 @@ public class TrackMessageSizeUI extends AbstractTestUIWithLog {
}
});
- getPage().getJavaScript().execute(
- methodImplementation + testMethod + buildTestCase());
+ getPage().getJavaScript()
+ .execute(methodImplementation + testMethod + buildTestCase());
}
private String buildTestCase() {
diff --git a/uitest/src/main/java/com/vaadin/tests/requesthandlers/AppResource404.java b/uitest/src/main/java/com/vaadin/tests/requesthandlers/AppResource404.java
index a6a5a5a084..d3b9962d96 100644
--- a/uitest/src/main/java/com/vaadin/tests/requesthandlers/AppResource404.java
+++ b/uitest/src/main/java/com/vaadin/tests/requesthandlers/AppResource404.java
@@ -21,8 +21,8 @@ public class AppResource404 extends TestBase {
String baseUrl = request.getContextPath() + request.getServletPath();
addComponent(new Link("Existing resource", resource));
- addComponent(new Link("Non-existing resource", new ExternalResource(
- baseUrl + "/APP/connector/0/4/asdfasdf")));
+ addComponent(new Link("Non-existing resource",
+ new ExternalResource(baseUrl + "/APP/connector/0/4/asdfasdf")));
addComponent(new Link("/APP/ url that should give 404",
new ExternalResource(baseUrl + "/APP/")));
addComponent(new Link("/APPLE url that should go to UI providers",
diff --git a/uitest/src/main/java/com/vaadin/tests/requesthandlers/CommunicationError.java b/uitest/src/main/java/com/vaadin/tests/requesthandlers/CommunicationError.java
index 26f3dff1a2..3655e056f1 100644
--- a/uitest/src/main/java/com/vaadin/tests/requesthandlers/CommunicationError.java
+++ b/uitest/src/main/java/com/vaadin/tests/requesthandlers/CommunicationError.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -34,7 +34,7 @@ import com.vaadin.ui.UI;
/**
* Test UI provider to check communication error json object null values.
- *
+ *
* @author Vaadin Ltd
*/
public class CommunicationError extends UIProvider {
diff --git a/uitest/src/main/java/com/vaadin/tests/resources/CachingJavaScriptComponent.java b/uitest/src/main/java/com/vaadin/tests/resources/CachingJavaScriptComponent.java
index b6e409d4ba..08bcde60fb 100644
--- a/uitest/src/main/java/com/vaadin/tests/resources/CachingJavaScriptComponent.java
+++ b/uitest/src/main/java/com/vaadin/tests/resources/CachingJavaScriptComponent.java
@@ -1,12 +1,12 @@
/*
* 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
diff --git a/uitest/src/main/java/com/vaadin/tests/resources/DownloadLargeFileResource.java b/uitest/src/main/java/com/vaadin/tests/resources/DownloadLargeFileResource.java
index d799e1a8d4..5cc0856a5a 100644
--- a/uitest/src/main/java/com/vaadin/tests/resources/DownloadLargeFileResource.java
+++ b/uitest/src/main/java/com/vaadin/tests/resources/DownloadLargeFileResource.java
@@ -17,10 +17,9 @@ public class DownloadLargeFileResource extends TestBase {
@Override
protected void setup() {
- Button b = new Button(
- "Download a "
- + String.format("%.1f", fileSize / 1024.0 / 1024.0)
- + "MB file", new Button.ClickListener() {
+ Button b = new Button("Download a "
+ + String.format("%.1f", fileSize / 1024.0 / 1024.0) + "MB file",
+ new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/resources/DownloadWithPush.java b/uitest/src/main/java/com/vaadin/tests/resources/DownloadWithPush.java
index 9cbd8ed823..6f2e39d2ac 100644
--- a/uitest/src/main/java/com/vaadin/tests/resources/DownloadWithPush.java
+++ b/uitest/src/main/java/com/vaadin/tests/resources/DownloadWithPush.java
@@ -85,7 +85,6 @@ public class DownloadWithPush extends AbstractTestUIWithLog {
return hugeFileResource;
}
-
@Override
protected Integer getTicketNumber() {
return 19709;
diff --git a/uitest/src/main/java/com/vaadin/tests/resources/NonExistingFileResource.java b/uitest/src/main/java/com/vaadin/tests/resources/NonExistingFileResource.java
index f55c1f1f1d..88ca1cf5b6 100644
--- a/uitest/src/main/java/com/vaadin/tests/resources/NonExistingFileResource.java
+++ b/uitest/src/main/java/com/vaadin/tests/resources/NonExistingFileResource.java
@@ -25,8 +25,9 @@ public class NonExistingFileResource extends TestBase {
@Override
public void buttonClick(ClickEvent event) {
- FileResource res = new FileResource(new File(VaadinService
- .getCurrent().getBaseDirectory() + "/" + filename));
+ FileResource res = new FileResource(
+ new File(VaadinService.getCurrent().getBaseDirectory()
+ + "/" + filename));
getMainWindow().open(res);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/resources/PublishedFileHandlerCaching.java b/uitest/src/main/java/com/vaadin/tests/resources/PublishedFileHandlerCaching.java
index a2828032c7..768b556e8e 100644
--- a/uitest/src/main/java/com/vaadin/tests/resources/PublishedFileHandlerCaching.java
+++ b/uitest/src/main/java/com/vaadin/tests/resources/PublishedFileHandlerCaching.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -20,7 +20,7 @@ import com.vaadin.tests.components.AbstractTestUI;
/**
* This class tests the caching behavior of PublishedFileHandler.
- *
+ *
* Previously PublishedFileHandler did not include cache headers in it's
* responses. Unfortunately there isn't a good way to automate this test, so
* manual testing is required at this time. To test the caching behavior run
@@ -28,11 +28,11 @@ import com.vaadin.tests.components.AbstractTestUI;
* configuration, and access it through the url
* http://localhost:8888/run/com.vaadin
* .tests.resources.PublishedFileHandlerCaching?restartApplication
- *
+ *
* On loading the page you'll need to examine the network traffic (e.g. with
* FireBug), keeping an eye on the GET requests for cachingtest.js and it's
* cache headers.
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -45,7 +45,7 @@ public class PublishedFileHandlerCaching extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -56,7 +56,7 @@ public class PublishedFileHandlerCaching extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -66,7 +66,7 @@ public class PublishedFileHandlerCaching extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/resources/ResourceDownload.java b/uitest/src/main/java/com/vaadin/tests/resources/ResourceDownload.java
index e323f5285b..40e5192c87 100644
--- a/uitest/src/main/java/com/vaadin/tests/resources/ResourceDownload.java
+++ b/uitest/src/main/java/com/vaadin/tests/resources/ResourceDownload.java
@@ -51,8 +51,8 @@ public class ResourceDownload extends TestBase {
b = new Button("Test", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- ResourceDownload.this.getMainWindow().showNotification(
- "Still working");
+ ResourceDownload.this.getMainWindow()
+ .showNotification("Still working");
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/rpclogger/LoggingServerRpcHandler.java b/uitest/src/main/java/com/vaadin/tests/rpclogger/LoggingServerRpcHandler.java
index 1cb66972ef..2eabe13b5b 100644
--- a/uitest/src/main/java/com/vaadin/tests/rpclogger/LoggingServerRpcHandler.java
+++ b/uitest/src/main/java/com/vaadin/tests/rpclogger/LoggingServerRpcHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/rpclogger/LoggingUidlRequestHandler.java b/uitest/src/main/java/com/vaadin/tests/rpclogger/LoggingUidlRequestHandler.java
index 5eff9b56d9..4c2bbaf5fe 100644
--- a/uitest/src/main/java/com/vaadin/tests/rpclogger/LoggingUidlRequestHandler.java
+++ b/uitest/src/main/java/com/vaadin/tests/rpclogger/LoggingUidlRequestHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/rpclogger/RPCLoggerService.java b/uitest/src/main/java/com/vaadin/tests/rpclogger/RPCLoggerService.java
index a70a51b603..54bc97ea32 100644
--- a/uitest/src/main/java/com/vaadin/tests/rpclogger/RPCLoggerService.java
+++ b/uitest/src/main/java/com/vaadin/tests/rpclogger/RPCLoggerService.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/rpclogger/RPCLoggerServlet.java b/uitest/src/main/java/com/vaadin/tests/rpclogger/RPCLoggerServlet.java
index adb4302ba3..26f949591c 100644
--- a/uitest/src/main/java/com/vaadin/tests/rpclogger/RPCLoggerServlet.java
+++ b/uitest/src/main/java/com/vaadin/tests/rpclogger/RPCLoggerServlet.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/rpclogger/RPCLoggerUI.java b/uitest/src/main/java/com/vaadin/tests/rpclogger/RPCLoggerUI.java
index bac82f232d..2c971c1561 100644
--- a/uitest/src/main/java/com/vaadin/tests/rpclogger/RPCLoggerUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/rpclogger/RPCLoggerUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -151,18 +151,11 @@ public class RPCLoggerUI extends AbstractTestUIWithLog implements ErrorHandler {
for (int i = 0; i < lastActions.size(); i++) {
Action action = lastActions.get(i);
if (action.invocation instanceof ServerRpcMethodInvocation) {
- msg += "\n"
- + (i + 1)
- + " "
- + formatAction(action.target,
- (ServerRpcMethodInvocation) action.invocation);
+ msg += "\n" + (i + 1) + " " + formatAction(action.target,
+ (ServerRpcMethodInvocation) action.invocation);
} else {
- msg += "\n"
- + (i + 1)
- + " "
- + formatAction(
- action.target,
- (LegacyChangeVariablesInvocation) action.invocation);
+ msg += "\n" + (i + 1) + " " + formatAction(action.target,
+ (LegacyChangeVariablesInvocation) action.invocation);
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/serialization/ChangeStateWhenReattaching.java b/uitest/src/main/java/com/vaadin/tests/serialization/ChangeStateWhenReattaching.java
index 814d52048f..37b5c2bb89 100644
--- a/uitest/src/main/java/com/vaadin/tests/serialization/ChangeStateWhenReattaching.java
+++ b/uitest/src/main/java/com/vaadin/tests/serialization/ChangeStateWhenReattaching.java
@@ -1,12 +1,12 @@
/*
* Copyright 2012 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/serialization/DelegateToWidgetTest.java b/uitest/src/main/java/com/vaadin/tests/serialization/DelegateToWidgetTest.java
index 96f003d6c5..6e11e92887 100644
--- a/uitest/src/main/java/com/vaadin/tests/serialization/DelegateToWidgetTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/serialization/DelegateToWidgetTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/serialization/DelegateWithoutStateClassTest.java b/uitest/src/main/java/com/vaadin/tests/serialization/DelegateWithoutStateClassTest.java
index b01a6b243a..d85446d84e 100644
--- a/uitest/src/main/java/com/vaadin/tests/serialization/DelegateWithoutStateClassTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/serialization/DelegateWithoutStateClassTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/serialization/EncodeResultDisplay.java b/uitest/src/main/java/com/vaadin/tests/serialization/EncodeResultDisplay.java
index 01d1b14243..2620091269 100644
--- a/uitest/src/main/java/com/vaadin/tests/serialization/EncodeResultDisplay.java
+++ b/uitest/src/main/java/com/vaadin/tests/serialization/EncodeResultDisplay.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,8 @@ import com.vaadin.tests.widgetset.client.EncoderResultDisplayConnector.ReportRpc
@Widgetset(TestingWidgetSet.NAME)
public class EncodeResultDisplay extends AbstractTestUIWithLog {
- public static class EncoderResultDisplayExtension extends AbstractExtension {
+ public static class EncoderResultDisplayExtension
+ extends AbstractExtension {
public EncoderResultDisplayExtension(
EncoderResultDisplayConnector.ReportRpc rpc) {
registerRpc(rpc);
diff --git a/uitest/src/main/java/com/vaadin/tests/serialization/GenericWidgetHandling.java b/uitest/src/main/java/com/vaadin/tests/serialization/GenericWidgetHandling.java
index 7f599f2c0a..9b4a1df94e 100644
--- a/uitest/src/main/java/com/vaadin/tests/serialization/GenericWidgetHandling.java
+++ b/uitest/src/main/java/com/vaadin/tests/serialization/GenericWidgetHandling.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/serialization/LegacySerializerUI.java b/uitest/src/main/java/com/vaadin/tests/serialization/LegacySerializerUI.java
index 618462b203..675fd3d998 100644
--- a/uitest/src/main/java/com/vaadin/tests/serialization/LegacySerializerUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/serialization/LegacySerializerUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,11 +29,12 @@ import com.vaadin.ui.LegacyComponent;
@Widgetset("com.vaadin.tests.widgetset.TestingWidgetSet")
public class LegacySerializerUI extends AbstractTestUIWithLog {
- public class LegacySerializerComponent extends AbstractComponent implements
- LegacyComponent {
+ public class LegacySerializerComponent extends AbstractComponent
+ implements LegacyComponent {
@Override
- public void changeVariables(Object source, Map<String, Object> variables) {
+ public void changeVariables(Object source,
+ Map<String, Object> variables) {
log("doubleInfinity: " + variables.get("doubleInfinity"));
}
diff --git a/uitest/src/main/java/com/vaadin/tests/serialization/NoLayout.java b/uitest/src/main/java/com/vaadin/tests/serialization/NoLayout.java
index 8ce8c437a4..abf403b7d0 100644
--- a/uitest/src/main/java/com/vaadin/tests/serialization/NoLayout.java
+++ b/uitest/src/main/java/com/vaadin/tests/serialization/NoLayout.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -48,8 +48,8 @@ public class NoLayout extends AbstractTestUI {
});
addComponent(uiPolling);
- addComponent(new Button("Change regular state",
- new Button.ClickListener() {
+ addComponent(
+ new Button("Change regular state", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
event.getButton().setCaption(
diff --git a/uitest/src/main/java/com/vaadin/tests/serialization/SerializerNamespaceTest.java b/uitest/src/main/java/com/vaadin/tests/serialization/SerializerNamespaceTest.java
index fa3578c41d..f4a29d4d79 100644
--- a/uitest/src/main/java/com/vaadin/tests/serialization/SerializerNamespaceTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/serialization/SerializerNamespaceTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/serialization/SerializerTest.java b/uitest/src/main/java/com/vaadin/tests/serialization/SerializerTest.java
index d1af180d4e..da6915cf7c 100644
--- a/uitest/src/main/java/com/vaadin/tests/serialization/SerializerTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/serialization/SerializerTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -80,14 +80,15 @@ public class SerializerTest extends AbstractTestUI {
}
};
- rpc.sendBoolean(true, Boolean.FALSE, new boolean[] { true, true, false,
- true, false, false });
+ rpc.sendBoolean(true, Boolean.FALSE,
+ new boolean[] { true, true, false, true, false, false });
state.booleanValue = true;
state.booleanObjectValue = Boolean.FALSE;
state.booleanArray = new boolean[] { true, true, false, true, false,
false };
- rpc.sendByte((byte) 5, Byte.valueOf((byte) -12), new byte[] { 3, 1, 2 });
+ rpc.sendByte((byte) 5, Byte.valueOf((byte) -12),
+ new byte[] { 3, 1, 2 });
state.byteValue = (byte) 5;
state.byteObjectValue = Byte.valueOf((byte) -12);
state.byteArray = new byte[] { 3, 1, 2 };
@@ -102,20 +103,20 @@ public class SerializerTest extends AbstractTestUI {
state.intObjectValue = Integer.valueOf(42);
state.intArray = new int[] { 5, 7 };
- rpc.sendLong(577431841358l, Long.valueOf(0), new long[] {
- -57841235865l, 57 });
+ rpc.sendLong(577431841358l, Long.valueOf(0),
+ new long[] { -57841235865l, 57 });
state.longValue = 577431841359l;
state.longObjectValue = Long.valueOf(577431841360l);
state.longArray = new long[] { -57841235865l, 57 };
- rpc.sendFloat(3.14159f, Float.valueOf(Math.nextUp(1)), new float[] {
- 57, 0, -12 });
+ rpc.sendFloat(3.14159f, Float.valueOf(Math.nextUp(1)),
+ new float[] { 57, 0, -12 });
state.floatValue = 3.14159f;
state.floatObjectValue = Float.valueOf(Math.nextUp(1));
state.floatArray = new float[] { 57, 0, -12 };
- rpc.sendDouble(Math.PI, Double.valueOf(-Math.E), new double[] {
- Double.MAX_VALUE, Double.MIN_VALUE });
+ rpc.sendDouble(Math.PI, Double.valueOf(-Math.E),
+ new double[] { Double.MAX_VALUE, Double.MIN_VALUE });
state.doubleValue = Math.PI;
state.doubleObjectValue = Double.valueOf(-Math.E);
state.doubleArray = new double[] { Double.MAX_VALUE, Double.MIN_VALUE };
@@ -129,42 +130,43 @@ public class SerializerTest extends AbstractTestUI {
rpc.sendBean(
new ComplexTestBean(new SimpleTestBean(0),
- new SimpleTestBean(1), Arrays.asList(
- new SimpleTestBean(3), new SimpleTestBean(4)),
- 5), new SimpleTestBean(6),
+ new SimpleTestBean(1),
+ Arrays.asList(new SimpleTestBean(3),
+ new SimpleTestBean(4)),
+ 5),
+ new SimpleTestBean(6),
new SimpleTestBean[] { new SimpleTestBean(7) });
state.complexTestBean = new ComplexTestBean(new SimpleTestBean(0),
- new SimpleTestBean(1), Arrays.asList(new SimpleTestBean(3),
- new SimpleTestBean(4)), 5);
+ new SimpleTestBean(1),
+ Arrays.asList(new SimpleTestBean(3), new SimpleTestBean(4)), 5);
state.simpleTestBean = new SimpleTestBean(6);
- state.simpleTestBeanArray = new SimpleTestBean[] { new SimpleTestBean(7) };
+ state.simpleTestBeanArray = new SimpleTestBean[] {
+ new SimpleTestBean(7) };
rpc.sendNull("Not null", null);
state.nullString = null;
rpc.sendNestedArray(new int[][] { { 5 }, { 7 } },
- new SimpleTestBean[][] { { new SimpleTestBean(4),
- new SimpleTestBean(2) } });
+ new SimpleTestBean[][] {
+ { new SimpleTestBean(4), new SimpleTestBean(2) } });
state.nestedIntArray = new int[][] { { 5 }, { 7 } };
- state.nestedBeanArray = new SimpleTestBean[][] { {
- new SimpleTestBean(4), new SimpleTestBean(2) } };
+ state.nestedBeanArray = new SimpleTestBean[][] {
+ { new SimpleTestBean(4), new SimpleTestBean(2) } };
- rpc.sendList(Arrays.asList(5, 8, -234), Arrays.<Connector> asList(this,
- testExtension), Arrays.asList(new SimpleTestBean(234),
- new SimpleTestBean(-568)));
+ rpc.sendList(Arrays.asList(5, 8, -234),
+ Arrays.<Connector> asList(this, testExtension), Arrays.asList(
+ new SimpleTestBean(234), new SimpleTestBean(-568)));
state.intList = Arrays.asList(5, 8, -234);
state.connectorList = Arrays.<Connector> asList(this, testExtension);
state.simpleTestBeanList = Arrays.asList(new SimpleTestBean(234),
new SimpleTestBean(-568));
- rpc.sendArrayList(
- Arrays.asList(new int[] { 1, 2 }, new int[] { 3, 4 }),
+ rpc.sendArrayList(Arrays.asList(new int[] { 1, 2 }, new int[] { 3, 4 }),
Arrays.asList(new Integer[] { 5, 6 }, new Integer[] { 7, 8 }),
- Collections
- .singletonList(new SimpleTestBean[] { new SimpleTestBean(
- 7) }));
- state.primitiveArrayList = Arrays.asList(new int[] { 1, 2 }, new int[] {
- 3, 4 });
+ Collections.singletonList(
+ new SimpleTestBean[] { new SimpleTestBean(7) }));
+ state.primitiveArrayList = Arrays.asList(new int[] { 1, 2 },
+ new int[] { 3, 4 });
state.objectArrayList = Arrays.asList(new Integer[] { 5, 6 },
new Integer[] { 7, 8 });
state.beanArrayList = Collections
@@ -174,14 +176,15 @@ public class SerializerTest extends AbstractTestUI {
// rpc.sendListArray(
// new List[] { Arrays.asList(1, 2), Arrays.asList(3, 4) },
// new List[] { Collections.singletonList(new SimpleTestBean(-1)) });
- rpc.sendSet(new HashSet<Integer>(Arrays.asList(4, 7, 12)), Collections
- .singleton((Connector) this), new HashSet<SimpleTestBean>(
- Arrays.asList(new SimpleTestBean(1), new SimpleTestBean(2))));
+ rpc.sendSet(new HashSet<Integer>(Arrays.asList(4, 7, 12)),
+ Collections.singleton((Connector) this),
+ new HashSet<SimpleTestBean>(Arrays.asList(new SimpleTestBean(1),
+ new SimpleTestBean(2))));
state.intSet = new HashSet<Integer>(Arrays.asList(4, 7, 12));
state.connectorSet = Collections.singleton((Connector) this);
- state.beanSet = new HashSet<SimpleTestBean>(Arrays.asList(
- new SimpleTestBean(1), new SimpleTestBean(2)));
+ state.beanSet = new HashSet<SimpleTestBean>(
+ Arrays.asList(new SimpleTestBean(1), new SimpleTestBean(2)));
rpc.sendMap(new HashMap<String, SimpleTestBean>() {
{
@@ -229,17 +232,19 @@ public class SerializerTest extends AbstractTestUI {
}
};
- rpc.sendWrappedGenerics(new HashMap<Set<SimpleTestBean>, Map<Integer, List<SimpleTestBean>>>() {
- {
- put(Collections.singleton(new SimpleTestBean(42)),
- new HashMap<Integer, List<SimpleTestBean>>() {
- {
- put(1, Arrays.asList(new SimpleTestBean(1),
- new SimpleTestBean(3)));
- }
- });
- }
- });
+ rpc.sendWrappedGenerics(
+ new HashMap<Set<SimpleTestBean>, Map<Integer, List<SimpleTestBean>>>() {
+ {
+ put(Collections.singleton(new SimpleTestBean(42)),
+ new HashMap<Integer, List<SimpleTestBean>>() {
+ {
+ put(1, Arrays.asList(
+ new SimpleTestBean(1),
+ new SimpleTestBean(3)));
+ }
+ });
+ }
+ });
state.generics = new HashMap<Set<SimpleTestBean>, Map<Integer, List<SimpleTestBean>>>() {
{
put(Collections.singleton(new SimpleTestBean(42)),
@@ -252,8 +257,8 @@ public class SerializerTest extends AbstractTestUI {
}
};
- rpc.sendEnum(ContentMode.TEXT, new ContentMode[] {
- ContentMode.PREFORMATTED, ContentMode.XML },
+ rpc.sendEnum(ContentMode.TEXT,
+ new ContentMode[] { ContentMode.PREFORMATTED, ContentMode.XML },
Arrays.asList(ContentMode.HTML, ContentMode.RAW));
state.contentMode = ContentMode.TEXT;
@@ -290,7 +295,8 @@ public class SerializerTest extends AbstractTestUI {
}
@Override
- public void sendChar(char value, Character boxedValue, char[] array) {
+ public void sendChar(char value, Character boxedValue,
+ char[] array) {
log.log("sendChar: " + value + ", " + boxedValue + ", "
+ Arrays.toString(array));
}
@@ -308,7 +314,8 @@ public class SerializerTest extends AbstractTestUI {
}
@Override
- public void sendFloat(float value, Float boxedValue, float[] array) {
+ public void sendFloat(float value, Float boxedValue,
+ float[] array) {
log.log("sendFloat: " + value + ", " + boxedValue + ", "
+ Arrays.toString(array));
}
@@ -352,7 +359,8 @@ public class SerializerTest extends AbstractTestUI {
@Override
public void sendList(List<Integer> intList,
- List<Connector> connectorList, List<SimpleTestBean> beanList) {
+ List<Connector> connectorList,
+ List<SimpleTestBean> beanList) {
log.log("sendList: " + intList + ", "
+ connectorCollectionToString(connectorList) + ", "
+ beanList);
@@ -519,8 +527,8 @@ public class SerializerTest extends AbstractTestUI {
}
}
- private static class SimpleBeanComparator implements
- Comparator<SimpleTestBean> {
+ private static class SimpleBeanComparator
+ implements Comparator<SimpleTestBean> {
@Override
public int compare(SimpleTestBean o1, SimpleTestBean o2) {
return Integer.valueOf(o1.getValue()).compareTo(o2.getValue());
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/CSSInjectTest.java b/uitest/src/main/java/com/vaadin/tests/themes/CSSInjectTest.java
index 738d8fc681..0612d5f855 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/CSSInjectTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/CSSInjectTest.java
@@ -65,8 +65,8 @@ public class CSSInjectTest extends TestBase {
@Override
public InputStream getStream() {
- return new ByteArrayInputStream(css
- .getBytes());
+ return new ByteArrayInputStream(
+ css.getBytes());
}
}, UUID.randomUUID().toString() + ".css"));
@@ -75,8 +75,8 @@ public class CSSInjectTest extends TestBase {
});
addComponent(injectRandom);
- addComponent(new Button("Inject initial again!",
- new Button.ClickListener() {
+ addComponent(
+ new Button("Inject initial again!", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
stylesheet.add(initialResource);
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/LegacyComponentThemeChange.java b/uitest/src/main/java/com/vaadin/tests/themes/LegacyComponentThemeChange.java
index 0a57b77aa3..9579888e6d 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/LegacyComponentThemeChange.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/LegacyComponentThemeChange.java
@@ -85,7 +85,8 @@ public class LegacyComponentThemeChange extends AbstractTestUIWithLog {
Table t = new Table();
t.addActionHandler(new Handler() {
@Override
- public void handleAction(Action action, Object sender, Object target) {
+ public void handleAction(Action action, Object sender,
+ Object target) {
}
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/ThemeChangeFavicon.java b/uitest/src/main/java/com/vaadin/tests/themes/ThemeChangeFavicon.java
index 8995583975..798d40c294 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/ThemeChangeFavicon.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/ThemeChangeFavicon.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/ThemeChangeOnTheFly.java b/uitest/src/main/java/com/vaadin/tests/themes/ThemeChangeOnTheFly.java
index 0ea5c18bc9..ad1e0745d5 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/ThemeChangeOnTheFly.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/ThemeChangeOnTheFly.java
@@ -40,8 +40,8 @@ public class ThemeChangeOnTheFly extends AbstractTestUIWithLog {
@Override
public void buttonClick(ClickEvent event) {
- getPage().getStyles().add(
- ".v-app { background: blue !important;}");
+ getPage().getStyles()
+ .add(".v-app { background: blue !important;}");
}
});
@@ -78,11 +78,11 @@ public class ThemeChangeOnTheFly extends AbstractTestUIWithLog {
Label l = new Label("Chameleon theme image in caption");
l.setIcon(new ThemeResource("img/magnifier.png"));
images.addComponent(l);
- Image image = new Image("Runo theme image", new ThemeResource(
- "icons/64/ok.png"));
+ Image image = new Image("Runo theme image",
+ new ThemeResource("icons/64/ok.png"));
images.addComponent(image);
- image = new Image("Reindeer theme image", new ThemeResource(
- "button/img/left-focus.png"));
+ image = new Image("Reindeer theme image",
+ new ThemeResource("button/img/left-focus.png"));
images.addComponent(image);
addComponent(images);
addComponent(gl);
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/AlignTopIconInButton.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/AlignTopIconInButton.java
index eb4be8e0d8..674919eb89 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/AlignTopIconInButton.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/AlignTopIconInButton.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.ui.themes.ValoTheme;
/**
* Test UI for image icon in button with 'icon-align-top' style.
- *
+ *
* @author Vaadin Ltd
*/
@Theme("valo")
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/ButtonsAndLinks.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/ButtonsAndLinks.java
index ee88595ba7..52b97fab94 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/ButtonsAndLinks.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/ButtonsAndLinks.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,14 +28,14 @@ import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.themes.ValoTheme;
/**
- *
+ *
* @since
* @author Vaadin Ltd
*/
public class ButtonsAndLinks extends VerticalLayout implements View {
/**
- *
- */
+ *
+ */
public ButtonsAndLinks() {
setMargin(true);
@@ -157,12 +157,12 @@ public class ButtonsAndLinks extends VerticalLayout implements View {
row.setSpacing(true);
addComponent(row);
- Link link = new Link("vaadin.com", new ExternalResource(
- "https://vaadin.com"));
+ Link link = new Link("vaadin.com",
+ new ExternalResource("https://vaadin.com"));
row.addComponent(link);
- link = new Link("Link with icon", new ExternalResource(
- "https://vaadin.com"));
+ link = new Link("Link with icon",
+ new ExternalResource("https://vaadin.com"));
link.addStyleName("color3");
link.setIcon(testIcon.get());
row.addComponent(link);
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/CalendarTest.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/CalendarTest.java
index e18665f2fa..7bc1626537 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/CalendarTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/CalendarTest.java
@@ -247,7 +247,8 @@ public class CalendarTest extends GridLayout implements View {
event = getNewEvent("Appointment", start, end);
event.setWhere("Office");
event.setStyleName("color1");
- event.setDescription("A longer description, which should display correctly.");
+ event.setDescription(
+ "A longer description, which should display correctly.");
dataSource.addEvent(event);
calendar.add(GregorianCalendar.DATE, 1);
@@ -353,9 +354,9 @@ public class CalendarTest extends GridLayout implements View {
// simulate week click
WeekClickHandler handler = (WeekClickHandler) calendarComponent
.getHandler(WeekClick.EVENT_ID);
- handler.weekClick(new WeekClick(calendarComponent, calendar
- .get(GregorianCalendar.WEEK_OF_YEAR), calendar
- .get(GregorianCalendar.YEAR)));
+ handler.weekClick(new WeekClick(calendarComponent,
+ calendar.get(GregorianCalendar.WEEK_OF_YEAR),
+ calendar.get(GregorianCalendar.YEAR)));
}
});
@@ -409,8 +410,8 @@ public class CalendarTest extends GridLayout implements View {
private void setWeekendsHidden(boolean weekendsHidden) {
if (weekendsHidden) {
- int firstToShow = (GregorianCalendar.MONDAY - calendar
- .getFirstDayOfWeek()) % 7;
+ int firstToShow = (GregorianCalendar.MONDAY
+ - calendar.getFirstDayOfWeek()) % 7;
calendarComponent.setFirstVisibleDayOfWeek(firstToShow + 1);
calendarComponent.setLastVisibleDayOfWeek(firstToShow + 5);
} else {
@@ -430,7 +431,8 @@ public class CalendarTest extends GridLayout implements View {
@Override
public void valueChange(ValueChangeEvent event) {
- calendarComponent.setReadOnly(readOnlyButton.getValue());
+ calendarComponent
+ .setReadOnly(readOnlyButton.getValue());
}
});
}
@@ -445,7 +447,8 @@ public class CalendarTest extends GridLayout implements View {
@Override
public void valueChange(ValueChangeEvent event) {
- calendarComponent.setEnabled(!disabledButton.getValue());
+ calendarComponent
+ .setEnabled(!disabledButton.getValue());
}
});
}
@@ -695,8 +698,8 @@ public class CalendarTest extends GridLayout implements View {
s.setFilteringMode(FilteringMode.CONTAINS);
Item i = s.addItem(DEFAULT_ITEMID);
- i.getItemProperty("caption").setValue(
- "Default (" + TimeZone.getDefault().getID() + ")");
+ i.getItemProperty("caption")
+ .setValue("Default (" + TimeZone.getDefault().getID() + ")");
for (String id : TimeZone.getAvailableIDs()) {
if (!s.containsId(id)) {
i = s.addItem(id);
@@ -1115,12 +1118,14 @@ public class CalendarTest extends GridLayout implements View {
private void updateCaptionLabel() {
DateFormatSymbols s = new DateFormatSymbols(getLocale());
- String month = s.getShortMonths()[calendar.get(GregorianCalendar.MONTH)];
- captionLabel.setValue(month + " "
- + calendar.get(GregorianCalendar.YEAR));
+ String month = s.getShortMonths()[calendar
+ .get(GregorianCalendar.MONTH)];
+ captionLabel
+ .setValue(month + " " + calendar.get(GregorianCalendar.YEAR));
}
- private CalendarTestEvent getNewEvent(String caption, Date start, Date end) {
+ private CalendarTestEvent getNewEvent(String caption, Date start,
+ Date end) {
CalendarTestEvent event = new CalendarTestEvent();
event.setCaption(caption);
event.setStart(start);
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/CheckBoxes.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/CheckBoxes.java
index f77cf9a315..270966141d 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/CheckBoxes.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/CheckBoxes.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -102,8 +102,8 @@ public class CheckBoxes extends VerticalLayout implements View {
OptionGroup options = new OptionGroup("Choose one, explicit width");
options.setWidth("200px");
options.addItem("Option One");
- Item two = options
- .addItem("Option Two, with a longer caption that should wrap when the components width is explicitly set.");
+ Item two = options.addItem(
+ "Option Two, with a longer caption that should wrap when the components width is explicitly set.");
options.addItem("Option Three");
options.select("Option One");
options.setItemIcon("Option One", testIcon.get());
@@ -115,8 +115,8 @@ public class CheckBoxes extends VerticalLayout implements View {
options.setMultiSelect(true);
options.setWidth("200px");
options.addItem("Option One");
- two = options
- .addItem("Option Two, with a longer caption that should wrap when the components width is explicitly set.");
+ two = options.addItem(
+ "Option Two, with a longer caption that should wrap when the components width is explicitly set.");
options.addItem("Option Three");
options.select("Option One");
options.setItemIcon("Option One", testIcon.get());
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/CollapsibleTableColumn.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/CollapsibleTableColumn.java
index f18b1e578e..7b566ea29d 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/CollapsibleTableColumn.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/CollapsibleTableColumn.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.ui.Table;
/**
* Test UI for non-collapsible column distinction in the table.
- *
+ *
* @author Vaadin Ltd
*/
@Theme("valo")
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/ColorPickers.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/ColorPickers.java
index 8e32b07ebd..b3bba48cf4 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/ColorPickers.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/ColorPickers.java
@@ -1,12 +1,12 @@
/*
* 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
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/ComboBoxes.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/ComboBoxes.java
index 4a88d87cd2..8e803f8b6b 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/ComboBoxes.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/ComboBoxes.java
@@ -1,12 +1,12 @@
/*
* 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
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/CommonParts.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/CommonParts.java
index ea7c42ba2e..952a7215d8 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/CommonParts.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/CommonParts.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -185,8 +185,8 @@ public class CommonParts extends VerticalLayout implements View {
}
}
});
- description
- .setValue("A more informative message about what has happened. Nihil hic munitissimus habendi senatus locus, nihil horum? Inmensae subtilitatis, obscuris et malesuada fames. Hi omnes lingua, institutis, legibus inter se differunt.");
+ description.setValue(
+ "A more informative message about what has happened. Nihil hic munitissimus habendi senatus locus, nihil horum? Inmensae subtilitatis, obscuris et malesuada fames. Hi omnes lingua, institutis, legibus inter se differunt.");
description.setWidth("100%");
addComponent(description);
@@ -198,9 +198,9 @@ public class CommonParts extends VerticalLayout implements View {
notification.setStyleName(styleString.trim());
} else {
typeString = selectedItem.getText().toLowerCase();
- notification
- .setStyleName((typeString + " " + styleString
- .trim()).trim());
+ notification.setStyleName(
+ (typeString + " " + styleString.trim())
+ .trim());
}
for (MenuItem item : type.getItems()) {
item.setChecked(false);
@@ -231,9 +231,9 @@ public class CommonParts extends VerticalLayout implements View {
}
}
if (styleString.trim().length() > 0) {
- notification
- .setStyleName((typeString + " " + styleString
- .trim()).trim());
+ notification.setStyleName(
+ (typeString + " " + styleString.trim())
+ .trim());
} else if (typeString.length() > 0) {
notification.setStyleName(typeString.trim());
} else {
@@ -265,8 +265,8 @@ public class CommonParts extends VerticalLayout implements View {
@Override
public void valueChange(ValueChangeEvent event) {
try {
- notification.setDelayMsec(Integer.parseInt(delay
- .getValue()));
+ notification.setDelayMsec(
+ Integer.parseInt(delay.getValue()));
} catch (Exception e) {
notification.setDelayMsec(-1);
delay.setValue("");
@@ -410,19 +410,21 @@ public class CommonParts extends VerticalLayout implements View {
label = new Label("Long");
label.addStyleName(ValoTheme.LABEL_BOLD);
- label.setDescription("Long tooltip message. Inmensae subtilitatis, obscuris et malesuada fames. Salutantibus vitae elit libero, a pharetra augue.");
+ label.setDescription(
+ "Long tooltip message. Inmensae subtilitatis, obscuris et malesuada fames. Salutantibus vitae elit libero, a pharetra augue.");
addComponent(label);
label = new Label("HTML tooltip");
label.addStyleName(ValoTheme.LABEL_BOLD);
- label.setDescription("<div><h1>Ut enim ad minim veniam, quis nostrud exercitation</h1><p><span>Morbi fringilla convallis sapien, id pulvinar odio volutpat.</span> <span>Vivamus sagittis lacus vel augue laoreet rutrum faucibus.</span> <span>Donec sed odio operae, eu vulputate felis rhoncus.</span> <span>At nos hinc posthac, sitientis piros Afros.</span> <span>Tu quoque, Brute, fili mi, nihil timor populi, nihil!</span></p><p><span>Gallia est omnis divisa in partes tres, quarum.</span> <span>Praeterea iter est quasdam res quas ex communi.</span> <span>Cum ceteris in veneratione tui montes, nascetur mus.</span> <span>Quam temere in vitiis, legem sancimus haerentia.</span> <span>Idque Caesaris facere voluntate liceret: sese habere.</span></p></div>");
+ label.setDescription(
+ "<div><h1>Ut enim ad minim veniam, quis nostrud exercitation</h1><p><span>Morbi fringilla convallis sapien, id pulvinar odio volutpat.</span> <span>Vivamus sagittis lacus vel augue laoreet rutrum faucibus.</span> <span>Donec sed odio operae, eu vulputate felis rhoncus.</span> <span>At nos hinc posthac, sitientis piros Afros.</span> <span>Tu quoque, Brute, fili mi, nihil timor populi, nihil!</span></p><p><span>Gallia est omnis divisa in partes tres, quarum.</span> <span>Praeterea iter est quasdam res quas ex communi.</span> <span>Cum ceteris in veneratione tui montes, nascetur mus.</span> <span>Quam temere in vitiis, legem sancimus haerentia.</span> <span>Idque Caesaris facere voluntate liceret: sese habere.</span></p></div>");
addComponent(label);
label = new Label("With an error message");
label.addStyleName(ValoTheme.LABEL_BOLD);
label.setDescription("Simple tooltip message");
- label.setComponentError(new UserError(
- "Something terrible has happened"));
+ label.setComponentError(
+ new UserError("Something terrible has happened"));
addComponent(label);
label = new Label("With a long error message");
@@ -436,8 +438,8 @@ public class CommonParts extends VerticalLayout implements View {
label = new Label("Error message only");
label.addStyleName(ValoTheme.LABEL_BOLD);
- label.setComponentError(new UserError(
- "Something terrible has happened"));
+ label.setComponentError(
+ new UserError("Something terrible has happened"));
addComponent(label);
}
};
@@ -500,17 +502,18 @@ public class CommonParts extends VerticalLayout implements View {
tabs.addTab(new Label("&nbsp;", ContentMode.HTML),
"One more");
tabs.addStyleName(ValoTheme.TABSHEET_PADDED_TABBAR);
- tabs.addSelectedTabChangeListener(new SelectedTabChangeListener() {
- @Override
- public void selectedTabChange(
- SelectedTabChangeEvent event) {
- try {
- Thread.sleep(600);
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
- });
+ tabs.addSelectedTabChangeListener(
+ new SelectedTabChangeListener() {
+ @Override
+ public void selectedTabChange(
+ SelectedTabChangeEvent event) {
+ try {
+ Thread.sleep(600);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ });
content = tabs;
} else if (!autoHeight) {
Panel p = new Panel();
@@ -609,14 +612,15 @@ public class CommonParts extends VerticalLayout implements View {
footerToolbar = selectedItem.isChecked();
}
- if (selectedItem.getText().equals("Top Toolbar layout")) {
+ if (selectedItem.getText()
+ .equals("Top Toolbar layout")) {
toolbarLayout = selectedItem.isChecked();
}
if (selectedItem.getText()
.equals("Borderless Toolbars")) {
- toolbarStyle = selectedItem.isChecked() ? ValoTheme.MENUBAR_BORDERLESS
- : null;
+ toolbarStyle = selectedItem.isChecked()
+ ? ValoTheme.MENUBAR_BORDERLESS : null;
}
win.setContent(windowContent());
@@ -625,8 +629,8 @@ public class CommonParts extends VerticalLayout implements View {
MenuBar options = new MenuBar();
options.setCaption("Content");
- options.addItem("Auto Height", optionsCommand).setCheckable(
- true);
+ options.addItem("Auto Height", optionsCommand)
+ .setCheckable(true);
options.addItem("Tabs", optionsCommand).setCheckable(true);
MenuItem option = options.addItem("Footer", optionsCommand);
option.setCheckable(true);
@@ -636,10 +640,10 @@ public class CommonParts extends VerticalLayout implements View {
options = new MenuBar();
options.setCaption("Toolbars");
- options.addItem("Footer Toolbar", optionsCommand).setCheckable(
- true);
- options.addItem("Top Toolbar", optionsCommand).setCheckable(
- true);
+ options.addItem("Footer Toolbar", optionsCommand)
+ .setCheckable(true);
+ options.addItem("Top Toolbar", optionsCommand)
+ .setCheckable(true);
options.addItem("Top Toolbar layout", optionsCommand)
.setCheckable(true);
options.addItem("Borderless Toolbars", optionsCommand)
@@ -651,8 +655,8 @@ public class CommonParts extends VerticalLayout implements View {
@Override
public void menuSelected(MenuItem selectedItem) {
if (selectedItem.getText().equals("Caption")) {
- win.setCaption(selectedItem.isChecked() ? "Window Caption"
- : null);
+ win.setCaption(selectedItem.isChecked()
+ ? "Window Caption" : null);
} else if (selectedItem.getText().equals("Closable")) {
win.setClosable(selectedItem.isChecked());
} else if (selectedItem.getText().equals("Resizable")) {
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/ContrastFontColor.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/ContrastFontColor.java
index ad73302a31..5f2ab78593 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/ContrastFontColor.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/ContrastFontColor.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ import com.vaadin.ui.TextField;
/**
* Test UI for default contrast color value.
- *
+ *
* @author Vaadin Ltd
*/
@Theme("tests-valo-contrast")
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/DateFields.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/DateFields.java
index 9c95b7400c..07cf951e45 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/DateFields.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/DateFields.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -201,14 +201,15 @@ public class DateFields extends VerticalLayout implements View {
row.addComponent(date);
PropertysetItem item = new PropertysetItem();
- item.addItemProperty("date", new ObjectProperty<Date>(getDefaultDate()));
+ item.addItemProperty("date",
+ new ObjectProperty<Date>(getDefaultDate()));
FormLayout form = new FormLayout();
form.setMargin(false);
FieldGroup binder = new FieldGroup(item);
- form.addComponent(binder.buildAndBind(
- "Picker in read-only field group", "date"));
+ form.addComponent(
+ binder.buildAndBind("Picker in read-only field group", "date"));
binder.setReadOnly(true);
row.addComponent(form);
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/DisabledLabel.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/DisabledLabel.java
index ce199992f2..745508cb56 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/DisabledLabel.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/DisabledLabel.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ import com.vaadin.ui.Label;
/**
* Test UI for disbaled label.
- *
+ *
* @author Vaadin Ltd
*/
@Theme("valo")
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/Dragging.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/Dragging.java
index 8de518be23..4f7c6683d8 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/Dragging.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/Dragging.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -49,7 +49,7 @@ import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.themes.ValoTheme;
/**
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -75,9 +75,11 @@ public class Dragging extends VerticalLayout implements View {
@Override
public void menuSelected(MenuItem selectedItem) {
if (selectedItem.isChecked()) {
- sample.removeStyleName(ValoTheme.DRAG_AND_DROP_WRAPPER_NO_VERTICAL_DRAG_HINTS);
+ sample.removeStyleName(
+ ValoTheme.DRAG_AND_DROP_WRAPPER_NO_VERTICAL_DRAG_HINTS);
} else {
- sample.addStyleName(ValoTheme.DRAG_AND_DROP_WRAPPER_NO_VERTICAL_DRAG_HINTS);
+ sample.addStyleName(
+ ValoTheme.DRAG_AND_DROP_WRAPPER_NO_VERTICAL_DRAG_HINTS);
}
}
});
@@ -88,9 +90,11 @@ public class Dragging extends VerticalLayout implements View {
@Override
public void menuSelected(MenuItem selectedItem) {
if (selectedItem.isChecked()) {
- sample.removeStyleName(ValoTheme.DRAG_AND_DROP_WRAPPER_NO_HORIZONTAL_DRAG_HINTS);
+ sample.removeStyleName(
+ ValoTheme.DRAG_AND_DROP_WRAPPER_NO_HORIZONTAL_DRAG_HINTS);
} else {
- sample.addStyleName(ValoTheme.DRAG_AND_DROP_WRAPPER_NO_HORIZONTAL_DRAG_HINTS);
+ sample.addStyleName(
+ ValoTheme.DRAG_AND_DROP_WRAPPER_NO_HORIZONTAL_DRAG_HINTS);
}
}
});
@@ -101,9 +105,11 @@ public class Dragging extends VerticalLayout implements View {
@Override
public void menuSelected(MenuItem selectedItem) {
if (selectedItem.isChecked()) {
- sample.removeStyleName(ValoTheme.DRAG_AND_DROP_WRAPPER_NO_BOX_DRAG_HINTS);
+ sample.removeStyleName(
+ ValoTheme.DRAG_AND_DROP_WRAPPER_NO_BOX_DRAG_HINTS);
} else {
- sample.addStyleName(ValoTheme.DRAG_AND_DROP_WRAPPER_NO_BOX_DRAG_HINTS);
+ sample.addStyleName(
+ ValoTheme.DRAG_AND_DROP_WRAPPER_NO_BOX_DRAG_HINTS);
}
}
});
@@ -130,15 +136,15 @@ public class Dragging extends VerticalLayout implements View {
label.setWidth("120px");
components.add(label);
- final Embedded image = new Embedded("", new ThemeResource(
- "../runo/icons/64/document.png"));
+ final Embedded image = new Embedded("",
+ new ThemeResource("../runo/icons/64/document.png"));
components.add(image);
final CssLayout documentLayout = new CssLayout();
documentLayout.setWidth("19px");
for (int i = 0; i < 5; ++i) {
- final Embedded e = new Embedded(null, new ThemeResource(
- "../runo/icons/16/document.png"));
+ final Embedded e = new Embedded(null,
+ new ThemeResource("../runo/icons/16/document.png"));
e.setHeight("16px");
e.setWidth("16px");
documentLayout.addComponent(e);
@@ -202,16 +208,16 @@ public class Dragging extends VerticalLayout implements View {
}
// drop on top of target?
- if (dropTargetData.getData("horizontalLocation").equals(
- HorizontalDropLocation.CENTER.toString())) {
+ if (dropTargetData.getData("horizontalLocation")
+ .equals(HorizontalDropLocation.CENTER.toString())) {
if (sourceWasAfterTarget) {
index--;
}
}
// drop before the target?
- else if (dropTargetData.getData("horizontalLocation").equals(
- HorizontalDropLocation.LEFT.toString())) {
+ else if (dropTargetData.getData("horizontalLocation")
+ .equals(HorizontalDropLocation.LEFT.toString())) {
index--;
if (index < 0) {
index = 0;
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/FormLayoutInsideTable.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/FormLayoutInsideTable.java
index 1d7ba7eefb..b7a231763a 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/FormLayoutInsideTable.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/FormLayoutInsideTable.java
@@ -18,7 +18,8 @@ public class FormLayoutInsideTable extends AbstractTestUI {
private static final long serialVersionUID = 1L;
@Override
- public Object generateCell(Table source, Object itemId, Object columnId) {
+ public Object generateCell(Table source, Object itemId,
+ Object columnId) {
FormLayout layout = new FormLayout();
layout.addComponent(new Label("Line 1 " + itemId));
layout.addComponent(new Label("Line 2 " + itemId));
@@ -30,4 +31,5 @@ public class FormLayoutInsideTable extends AbstractTestUI {
table.setSizeFull();
table.addItem("abc0");
addComponent(table);
- }}
+ }
+}
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/Forms.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/Forms.java
index 32aef68520..b38f0861d1 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/Forms.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/Forms.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -39,7 +39,7 @@ import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.themes.ValoTheme;
/**
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -91,8 +91,8 @@ public class Forms extends VerticalLayout implements View {
form.addComponent(section);
TextField email = new TextField("Email");
- email.setValue(sg.nextString(false) + "@" + sg.nextString(false)
- + ".com");
+ email.setValue(
+ sg.nextString(false) + "@" + sg.nextString(false) + ".com");
email.setWidth("50%");
email.setRequired(true);
form.addComponent(email);
@@ -137,14 +137,16 @@ public class Forms extends VerticalLayout implements View {
form.addComponent(website);
TextArea shortbio = new TextArea("Short Bio");
- shortbio.setValue("Quis aute iure reprehenderit in voluptate velit esse. Cras mattis iudicium purus sit amet fermentum.");
+ shortbio.setValue(
+ "Quis aute iure reprehenderit in voluptate velit esse. Cras mattis iudicium purus sit amet fermentum.");
shortbio.setWidth("100%");
shortbio.setRows(2);
form.addComponent(shortbio);
final RichTextArea bio = new RichTextArea("Bio");
bio.setWidth("100%");
- bio.setValue("<div><p><span>Integer legentibus erat a ante historiarum dapibus.</span> <span>Vivamus sagittis lacus vel augue laoreet rutrum faucibus.</span> <span>A communi observantia non est recedendum.</span> <span>Morbi fringilla convallis sapien, id pulvinar odio volutpat.</span> <span>Ab illo tempore, ab est sed immemorabili.</span> <span>Quam temere in vitiis, legem sancimus haerentia.</span></p><p><span>Morbi odio eros, volutpat ut pharetra vitae, lobortis sed nibh.</span> <span>Quam diu etiam furor iste tuus nos eludet?</span> <span>Cum sociis natoque penatibus et magnis dis parturient.</span> <span>Quam diu etiam furor iste tuus nos eludet?</span> <span>Tityre, tu patulae recubans sub tegmine fagi dolor.</span></p><p><span>Curabitur blandit tempus ardua ridiculus sed magna.</span> <span>Phasellus laoreet lorem vel dolor tempus vehicula.</span> <span>Etiam habebis sem dicantur magna mollis euismod.</span> <span>Hi omnes lingua, institutis, legibus inter se differunt.</span></p></div>");
+ bio.setValue(
+ "<div><p><span>Integer legentibus erat a ante historiarum dapibus.</span> <span>Vivamus sagittis lacus vel augue laoreet rutrum faucibus.</span> <span>A communi observantia non est recedendum.</span> <span>Morbi fringilla convallis sapien, id pulvinar odio volutpat.</span> <span>Ab illo tempore, ab est sed immemorabili.</span> <span>Quam temere in vitiis, legem sancimus haerentia.</span></p><p><span>Morbi odio eros, volutpat ut pharetra vitae, lobortis sed nibh.</span> <span>Quam diu etiam furor iste tuus nos eludet?</span> <span>Cum sociis natoque penatibus et magnis dis parturient.</span> <span>Quam diu etiam furor iste tuus nos eludet?</span> <span>Tityre, tu patulae recubans sub tegmine fagi dolor.</span></p><p><span>Curabitur blandit tempus ardua ridiculus sed magna.</span> <span>Phasellus laoreet lorem vel dolor tempus vehicula.</span> <span>Etiam habebis sem dicantur magna mollis euismod.</span> <span>Hi omnes lingua, institutis, legibus inter se differunt.</span></p></div>");
form.addComponent(bio);
form.setReadOnly(true);
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/ImmediateUpload.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/ImmediateUpload.java
index 87f24d98d4..77031af552 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/ImmediateUpload.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/ImmediateUpload.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.ui.Upload;
/**
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -30,7 +30,7 @@ public class ImmediateUpload extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -50,7 +50,7 @@ public class ImmediateUpload extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -60,7 +60,7 @@ public class ImmediateUpload extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/Labels.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/Labels.java
index 9954979d50..ef394353af 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/Labels.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/Labels.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -26,7 +26,7 @@ import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.themes.ValoTheme;
/**
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/MenuBars.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/MenuBars.java
index fc74166b29..01af286e67 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/MenuBars.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/MenuBars.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -161,8 +161,8 @@ public class MenuBars extends VerticalLayout implements View {
Command check = new Command() {
@Override
public void menuSelected(MenuItem selectedItem) {
- Notification.show(selectedItem.isChecked() ? "Checked"
- : "Unchecked");
+ Notification.show(
+ selectedItem.isChecked() ? "Checked" : "Unchecked");
}
};
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/NativeSelects.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/NativeSelects.java
index e9c1c78049..5bb7720307 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/NativeSelects.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/NativeSelects.java
@@ -1,12 +1,12 @@
/*
* 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
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/NotificationStyle.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/NotificationStyle.java
index e918bb64d0..f5a0307e1c 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/NotificationStyle.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/NotificationStyle.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.ui.Notification;
/**
* Test UI for H1 and P elements styles.
- *
+ *
* @author Vaadin Ltd
*/
@Theme("valo")
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/Panels.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/Panels.java
index d98daf7b05..c8a75c17b1 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/Panels.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/Panels.java
@@ -1,12 +1,12 @@
/*
* 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
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/PopupViews.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/PopupViews.java
index 58988c06d6..242d1c5db4 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/PopupViews.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/PopupViews.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -74,11 +74,13 @@ public class PopupViews extends VerticalLayout implements View {
return new VerticalLayout() {
{
setMargin(true);
- addComponent(new Label(
- "<h3>Thanks for waiting!</h3><p>You've opened this popup <b>"
- + ++count + " time"
- + (count > 1 ? "s" : " only")
- + "</b>.</p>", ContentMode.HTML));
+ addComponent(
+ new Label(
+ "<h3>Thanks for waiting!</h3><p>You've opened this popup <b>"
+ + ++count + " time"
+ + (count > 1 ? "s" : " only")
+ + "</b>.</p>",
+ ContentMode.HTML));
}
};
}
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/ResponsiveStyles.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/ResponsiveStyles.java
index b1a4b2e30b..f8474ef9c2 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/ResponsiveStyles.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/ResponsiveStyles.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/ResponsiveStylesDesign.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/ResponsiveStylesDesign.java
index a975c76e1c..f7ee5068f0 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/ResponsiveStylesDesign.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/ResponsiveStylesDesign.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/Sliders.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/Sliders.java
index 9642cb5ccf..b369731642 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/Sliders.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/Sliders.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/SplitPanels.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/SplitPanels.java
index 4983bc5813..6f4e4ded3d 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/SplitPanels.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/SplitPanels.java
@@ -1,12 +1,12 @@
/*
* 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
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/StringGenerator.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/StringGenerator.java
index bffd94137c..16c0796ec4 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/StringGenerator.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/StringGenerator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/TableWithEmptyCaption.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/TableWithEmptyCaption.java
index a3a81b3798..96c9b3679b 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/TableWithEmptyCaption.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/TableWithEmptyCaption.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/Tabsheets.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/Tabsheets.java
index 421da5ffe7..c3b40ea241 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/Tabsheets.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/Tabsheets.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -148,8 +148,8 @@ public class Tabsheets extends VerticalLayout implements View {
icon.setValue(true);
}
- static TabSheet getTabSheet(boolean caption, String style,
- boolean closable, boolean scrolling, boolean icon, boolean disable) {
+ static TabSheet getTabSheet(boolean caption, String style, boolean closable,
+ boolean scrolling, boolean icon, boolean disable) {
TestIcon testIcon = new TestIcon(60);
TabSheet ts = new TabSheet();
@@ -157,8 +157,8 @@ public class Tabsheets extends VerticalLayout implements View {
StringGenerator sg = new StringGenerator();
for (int i = 1; i <= (scrolling ? 10 : 3); i++) {
- String tabcaption = caption ? sg.nextString(true) + " "
- + sg.nextString(false) : null;
+ String tabcaption = caption
+ ? sg.nextString(true) + " " + sg.nextString(false) : null;
VerticalLayout content = new VerticalLayout();
content.setMargin(true);
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/TestIcon.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/TestIcon.java
index 0d34bf2b63..db58dd1feb 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/TestIcon.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/TestIcon.java
@@ -50,7 +50,8 @@ public class TestIcon {
}
return ICONS.get(iconCount);
}
- return new ThemeResource("../runo/icons/" + imageSize + "/document.png");
+ return new ThemeResource(
+ "../runo/icons/" + imageSize + "/document.png");
}
static List<FontAwesome> ICONS = new ArrayList<FontAwesome>();
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/TextFieldBevel.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/TextFieldBevel.java
index 4e1debc5b6..0bc42154a6 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/TextFieldBevel.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/TextFieldBevel.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ import com.vaadin.ui.TextField;
/**
* Test UI for $v-textfield-bevel value in TextField component.
- *
+ *
* @author Vaadin Ltd
*/
@Theme("tests-valo-textfield-bevel")
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/TextFields.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/TextFields.java
index be6e430b23..886b4d3a77 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/TextFields.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/TextFields.java
@@ -1,12 +1,12 @@
/*
* 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
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/Trees.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/Trees.java
index 02846d8921..b26beccb53 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/Trees.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/Trees.java
@@ -1,12 +1,12 @@
/*
* 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
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/ValoDefaultCaptionWidth.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/ValoDefaultCaptionWidth.java
index 6ef585cc12..4616c3123f 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/ValoDefaultCaptionWidth.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/ValoDefaultCaptionWidth.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import com.vaadin.tests.components.colorpicker.DefaultCaptionWidth;
/**
* Test for color picker with default caption.
- *
+ *
* @author Vaadin Ltd
*/
@Theme("valo")
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/ValoMenuLayout.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/ValoMenuLayout.java
index 0e62f983a6..76ac2bd9a6 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/ValoMenuLayout.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/ValoMenuLayout.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.themes.ValoTheme;
/**
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/ValoThemeUI.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/ValoThemeUI.java
index 3bf6fd7ca3..091bff5698 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/ValoThemeUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/ValoThemeUI.java
@@ -92,8 +92,8 @@ public class ValoThemeUI extends UI {
testMode = true;
if (browserCantRenderFontsConsistently()) {
- getPage().getStyles().add(
- ".v-app.v-app.v-app {font-family: Sans-Serif;}");
+ getPage().getStyles()
+ .add(".v-app.v-app.v-app {font-family: Sans-Serif;}");
}
}
@@ -159,9 +159,8 @@ public class ValoThemeUI extends UI {
for (Iterator<Component> it = menuItemsLayout
.iterator(); it.hasNext();) {
Component c = it.next();
- if (c.getCaption() != null
- && c.getCaption().startsWith(
- item.getValue())) {
+ if (c.getCaption() != null && c.getCaption()
+ .startsWith(item.getValue())) {
c.addStyleName("selected");
break;
}
@@ -281,8 +280,9 @@ public class ValoThemeUI extends UI {
StringGenerator sg = new StringGenerator();
MenuItem settingsItem = settings.addItem(
sg.nextString(true) + " " + sg.nextString(true)
- + sg.nextString(false), new ThemeResource(
- "../tests-valo/img/profile-pic-300px.jpg"), null);
+ + sg.nextString(false),
+ new ThemeResource("../tests-valo/img/profile-pic-300px.jpg"),
+ null);
settingsItem.addItem("Edit Profile", null);
settingsItem.addItem("Preferences", null);
settingsItem.addSeparator();
@@ -303,9 +303,9 @@ public class ValoThemeUI extends UI {
menuItemsLayout.addComponent(label);
}
if (item.getKey().equals("panels")) {
- label.setValue(label.getValue()
- + " <span class=\"valo-menu-badge\">" + count
- + "</span>");
+ label.setValue(
+ label.getValue() + " <span class=\"valo-menu-badge\">"
+ + count + "</span>");
count = 0;
label = new Label("Containers", ContentMode.HTML);
label.setPrimaryStyleName(ValoTheme.MENU_SUBTITLE);
@@ -314,9 +314,9 @@ public class ValoThemeUI extends UI {
menuItemsLayout.addComponent(label);
}
if (item.getKey().equals("calendar")) {
- label.setValue(label.getValue()
- + " <span class=\"valo-menu-badge\">" + count
- + "</span>");
+ label.setValue(
+ label.getValue() + " <span class=\"valo-menu-badge\">"
+ + count + "</span>");
count = 0;
label = new Label("Other", ContentMode.HTML);
label.setPrimaryStyleName(ValoTheme.MENU_SUBTITLE);
@@ -404,16 +404,16 @@ public class ValoThemeUI extends UI {
container.addContainerProperty(CAPTION_PROPERTY, String.class, null);
container.addContainerProperty(ICON_PROPERTY, Resource.class, null);
container.addContainerProperty(INDEX_PROPERTY, Integer.class, null);
- container
- .addContainerProperty(DESCRIPTION_PROPERTY, String.class, null);
+ container.addContainerProperty(DESCRIPTION_PROPERTY, String.class,
+ null);
for (int i = 1; i < size + 1; i++) {
Item item = container.addItem(i);
- item.getItemProperty(CAPTION_PROPERTY).setValue(
- sg.nextString(true) + " " + sg.nextString(false));
+ item.getItemProperty(CAPTION_PROPERTY)
+ .setValue(sg.nextString(true) + " " + sg.nextString(false));
item.getItemProperty(INDEX_PROPERTY).setValue(i);
- item.getItemProperty(DESCRIPTION_PROPERTY).setValue(
- sg.nextString(true) + " " + sg.nextString(false) + " "
- + sg.nextString(false));
+ item.getItemProperty(DESCRIPTION_PROPERTY)
+ .setValue(sg.nextString(true) + " " + sg.nextString(false)
+ + " " + sg.nextString(false));
item.getItemProperty(ICON_PROPERTY).setValue(testIcon.get());
}
container.getItem(container.getIdByIndex(0))
@@ -426,28 +426,28 @@ public class ValoThemeUI extends UI {
Item child = container.addItem(id);
child.getItemProperty(CAPTION_PROPERTY).setValue(
sg.nextString(true) + " " + sg.nextString(false));
- child.getItemProperty(ICON_PROPERTY).setValue(
- testIcon.get());
+ child.getItemProperty(ICON_PROPERTY)
+ .setValue(testIcon.get());
((Hierarchical) container).setParent(id, i);
for (int k = 1; k < 6; k++) {
String id2 = id + " -> " + k;
child = container.addItem(id2);
- child.getItemProperty(CAPTION_PROPERTY).setValue(
- sg.nextString(true) + " "
+ child.getItemProperty(CAPTION_PROPERTY)
+ .setValue(sg.nextString(true) + " "
+ sg.nextString(false));
- child.getItemProperty(ICON_PROPERTY).setValue(
- testIcon.get());
+ child.getItemProperty(ICON_PROPERTY)
+ .setValue(testIcon.get());
((Hierarchical) container).setParent(id2, id);
for (int l = 1; l < 5; l++) {
String id3 = id2 + " -> " + l;
child = container.addItem(id3);
- child.getItemProperty(CAPTION_PROPERTY).setValue(
- sg.nextString(true) + " "
+ child.getItemProperty(CAPTION_PROPERTY)
+ .setValue(sg.nextString(true) + " "
+ sg.nextString(false));
- child.getItemProperty(ICON_PROPERTY).setValue(
- testIcon.get());
+ child.getItemProperty(ICON_PROPERTY)
+ .setValue(testIcon.get());
((Hierarchical) container).setParent(id3, id2);
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1230.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1230.java
index 3a707934b6..e2038b19b1 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1230.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1230.java
@@ -124,8 +124,8 @@ public class Ticket1230 extends LegacyApplication {
}
- w.addComponent(new Button("print select values",
- new Button.ClickListener() {
+ w.addComponent(
+ new Button("print select values", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
printState();
@@ -152,8 +152,8 @@ public class Ticket1230 extends LegacyApplication {
void printState() {
System.out.println(" Select without null item "
+ selectWithoutNullItem.getValue());
- System.out.println(" Select with null item "
- + selectWithNullItem.getValue());
+ System.out.println(
+ " Select with null item " + selectWithNullItem.getValue());
}
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1245.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1245.java
index 082363a1e5..79c87c810a 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1245.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1245.java
@@ -67,7 +67,7 @@ class TreeExample extends CustomComponent {
/**
* Helper to add an item with specified caption and (optional) parent.
- *
+ *
* @param caption
* The item caption
* @param parent
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1365.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1365.java
index 04c1645d98..a191b8bb28 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1365.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1365.java
@@ -7,8 +7,8 @@ import com.vaadin.ui.Label;
import com.vaadin.ui.LegacyWindow;
import com.vaadin.ui.TextField;
-public class Ticket1365 extends com.vaadin.server.LegacyApplication implements
- Handler {
+public class Ticket1365 extends com.vaadin.server.LegacyApplication
+ implements Handler {
TextField f = new TextField();
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1397.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1397.java
index 40ffd78740..0e59ecea68 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1397.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1397.java
@@ -143,9 +143,9 @@ public class Ticket1397 extends LegacyApplication {
TextField tf = new TextField("Editor for line " + lineNum,
- "Try to edit the contents for this textfield on line "
- + lineNum
- + " and see how the overview-version changes.");
+ "Try to edit the contents for this textfield on line "
+ + lineNum
+ + " and see how the overview-version changes.");
@Override
public String getMinimizedValueAsHTML() {
@@ -159,8 +159,8 @@ public class Ticket1397 extends LegacyApplication {
}
});
- table.addItem(new Object[] { "1 " + i, "2 " + i, "3 " + i,
- "4 " + i, "5 " + i, pp, pp2 }, new Integer(i));
+ table.addItem(new Object[] { "1 " + i, "2 " + i, "3 " + i, "4 " + i,
+ "5 " + i, pp, pp2 }, new Integer(i));
}
main.addComponent(table);
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1435.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1435.java
index 9c8f400e1d..e03a104a21 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1435.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1435.java
@@ -38,7 +38,7 @@ public class Ticket1435 extends LegacyApplication {
/**
* A ButtonPanel is a Panel, which has context specific Buttons in its
* header.
- *
+ *
* ButtonPanel also provides buttons for controlling its visibility
* (collapse/expand).
*/
@@ -139,8 +139,8 @@ public class Ticket1435 extends LegacyApplication {
} else {
root.setHeight(lastHeight, lastHeightUnit);
}
- event.getButton().setCaption(
- visible ? "Expand" : "Collapse");
+ event.getButton()
+ .setCaption(visible ? "Expand" : "Collapse");
}
}
});
@@ -225,8 +225,9 @@ public class Ticket1435 extends LegacyApplication {
for (int i = 0; i < 10; i++) {
String name = "Name " + i;
- table.addItem(new Object[] { new CheckBox(), name,
- "02-22-2007 13:37" }, new Integer(i));
+ table.addItem(
+ new Object[] { new CheckBox(), name, "02-22-2007 13:37" },
+ new Integer(i));
}
panel.setPanelComponent(table);
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1506_Panel.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1506_Panel.java
index b59b7f8e5e..31db37c279 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1506_Panel.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1506_Panel.java
@@ -25,8 +25,9 @@ public class Ticket1506_Panel extends Panel {
layout.addComponent(initSelect(new Ticket1506_TestContainer(),
"Test select", property1));
layout.addComponent(initButton(property1));
- layout.addComponent(initSelect(new Ticket1506_TestContainer2(),
- "Test select 2", new ObjectProperty<String>(null, String.class)));
+ layout.addComponent(
+ initSelect(new Ticket1506_TestContainer2(), "Test select 2",
+ new ObjectProperty<String>(null, String.class)));
}
private Component initButton(final ObjectProperty<?> property) {
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1506_TestContainer.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1506_TestContainer.java
index d6b53db7c7..d8d074404a 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1506_TestContainer.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1506_TestContainer.java
@@ -24,17 +24,17 @@ public class Ticket1506_TestContainer implements Container {
private void loadItems() {
final PropertysetItem item1 = new PropertysetItem();
- item1.addItemProperty(PROPERTY_1_ID, new ObjectProperty<String>(
- "value 1", String.class));
- item1.addItemProperty(PROPERTY_2_ID, new ObjectProperty<String>(
- "name 1", String.class));
+ item1.addItemProperty(PROPERTY_1_ID,
+ new ObjectProperty<String>("value 1", String.class));
+ item1.addItemProperty(PROPERTY_2_ID,
+ new ObjectProperty<String>("name 1", String.class));
items.put(ITEM_1_ID, item1);
final PropertysetItem item2 = new PropertysetItem();
- item2.addItemProperty(PROPERTY_1_ID, new ObjectProperty<String>(
- "value 2", String.class));
- item2.addItemProperty(PROPERTY_2_ID, new ObjectProperty<String>(
- "name 2", String.class));
+ item2.addItemProperty(PROPERTY_1_ID,
+ new ObjectProperty<String>("value 2", String.class));
+ item2.addItemProperty(PROPERTY_2_ID,
+ new ObjectProperty<String>("name 2", String.class));
items.put(ITEM_2_ID, item2);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1506_TestContainer2.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1506_TestContainer2.java
index 288a9ef7d2..2854125fe4 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1506_TestContainer2.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1506_TestContainer2.java
@@ -25,10 +25,10 @@ public class Ticket1506_TestContainer2 implements Container {
private void loadItems() {
for (int i = 1; i < 15; i++) {
final PropertysetItem item = new PropertysetItem();
- item.addItemProperty(PROPERTY_1_ID, new ObjectProperty<String>(
- "value " + i, String.class));
- item.addItemProperty(PROPERTY_2_ID, new ObjectProperty<String>(
- "name " + i, String.class));
+ item.addItemProperty(PROPERTY_1_ID,
+ new ObjectProperty<String>("value " + i, String.class));
+ item.addItemProperty(PROPERTY_2_ID,
+ new ObjectProperty<String>("name " + i, String.class));
items.put(String.valueOf(i), item);
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1589.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1589.java
index 45ff15e456..85bc24af26 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1589.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1589.java
@@ -47,7 +47,7 @@ class MyDynamicResource implements RequestHandler {
/**
* Provides the dynamic resource if the URI matches the resource URI. The
* matching URI is "/myresource" under the application URI context.
- *
+ *
* Returns null if the URI does not match. Otherwise returns a download
* stream that contains the response from the server.
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1598.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1598.java
index a890c08ddb..926551ad3b 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1598.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1598.java
@@ -47,8 +47,8 @@ public class Ticket1598 extends LegacyApplication {
@Override
public void menuSelected(MenuItem selected) {
- main.showNotification("Action "
- + selected.getText());
+ main.showNotification(
+ "Action " + selected.getText());
}
});
}
@@ -60,8 +60,8 @@ public class Ticket1598 extends LegacyApplication {
@Override
public void menuSelected(MenuItem selected) {
- main.showNotification("Action "
- + selected.getText());
+ main.showNotification(
+ "Action " + selected.getText());
}
});
}
@@ -74,8 +74,8 @@ public class Ticket1598 extends LegacyApplication {
@Override
public void menuSelected(MenuItem selected) {
- main.showNotification("Action "
- + selected.getText());
+ main.showNotification(
+ "Action " + selected.getText());
}
});
}
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1632.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1632.java
index c227bcc3d8..c2c38d029c 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1632.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1632.java
@@ -49,7 +49,8 @@ public class Ticket1632 extends LegacyApplication {
public void buttonClick(ClickEvent event) {
visible = !visible;
if (visible) {
- t.setVisibleColumns(new Object[] { "col1", "col2", "col3" });
+ t.setVisibleColumns(
+ new Object[] { "col1", "col2", "col3" });
} else {
t.setVisibleColumns(new Object[] { "col1", "col2" });
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1659.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1659.java
index 826a5539d8..5f017e95ad 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1659.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1659.java
@@ -12,14 +12,13 @@ public class Ticket1659 extends LegacyApplication {
public void init() {
final LegacyWindow mainWin = new LegacyWindow();
setMainWindow(mainWin);
- mainWin.addComponent(new Button(
- "Change URI using Application.getURL()",
+ mainWin.addComponent(new Button("Change URI using Application.getURL()",
new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- mainWin.open(new ExternalResource(getURL() + "#"
- + System.currentTimeMillis()));
+ mainWin.open(new ExternalResource(
+ getURL() + "#" + System.currentTimeMillis()));
}
}));
mainWin.addComponent(new Button("Change URI uring Window.getURL()",
@@ -27,8 +26,8 @@ public class Ticket1659 extends LegacyApplication {
@Override
public void buttonClick(ClickEvent event) {
- mainWin.open(new ExternalResource(mainWin.getURL()
- + "#" + System.currentTimeMillis()));
+ mainWin.open(new ExternalResource(mainWin.getURL() + "#"
+ + System.currentTimeMillis()));
}
}));
}
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1663.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1663.java
index 684e14ed2a..e23199e876 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1663.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1663.java
@@ -13,9 +13,10 @@ public class Ticket1663 extends com.vaadin.server.LegacyApplication {
setMainWindow(main);
TextField tf = new TextField("First name");
- tf.setDescription("The first name is used for the administration user interfaces only.");
- tf.setComponentError(new SystemError(
- "You must enter only one first name."));
+ tf.setDescription(
+ "The first name is used for the administration user interfaces only.");
+ tf.setComponentError(
+ new SystemError("You must enter only one first name."));
main.addComponent(tf);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1710.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1710.java
index 3dda830607..770549e3d6 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1710.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1710.java
@@ -60,8 +60,8 @@ public class Ticket1710 extends com.vaadin.server.LegacyApplication {
// GridLayout
GridLayout grid = new GridLayout(1, 1);
Panel g1tp = new LayoutTestingPanel("Gridlayout with 1 column", grid);
- cb = new CheckBox("GridLayout (1col)", new MethodProperty<Boolean>(
- g1tp, "visible"));
+ cb = new CheckBox("GridLayout (1col)",
+ new MethodProperty<Boolean>(g1tp, "visible"));
cb.setImmediate(true);
hidingControls.addComponent(cb);
g1tp.setVisible(false);
@@ -70,8 +70,8 @@ public class Ticket1710 extends com.vaadin.server.LegacyApplication {
addFields(grid);
GridLayout grid2 = new GridLayout(2, 1);
Panel g2tp = new LayoutTestingPanel("Gridlayout with 2 columns", grid2);
- cb = new CheckBox("GridLayout (2cols)", new MethodProperty<Boolean>(
- g2tp, "visible"));
+ cb = new CheckBox("GridLayout (2cols)",
+ new MethodProperty<Boolean>(g2tp, "visible"));
cb.setImmediate(true);
hidingControls.addComponent(cb);
g2tp.setVisible(false);
@@ -113,8 +113,8 @@ public class Ticket1710 extends com.vaadin.server.LegacyApplication {
// CustomLayout
VerticalLayout cl = new VerticalLayout();
Panel clp = new LayoutTestingPanel("CustomLayout", cl);
- cb = new CheckBox("CustomLayout", new MethodProperty<Boolean>(clp,
- "visible"));
+ cb = new CheckBox("CustomLayout",
+ new MethodProperty<Boolean>(clp, "visible"));
cb.setImmediate(true);
hidingControls.addComponent(cb);
clp.setVisible(false);
@@ -125,8 +125,8 @@ public class Ticket1710 extends com.vaadin.server.LegacyApplication {
VerticalLayout formPanelLayout = new VerticalLayout();
formPanelLayout.setMargin(true);
Panel formPanel = new Panel("Form", formPanelLayout);
- cb = new CheckBox("Form", new MethodProperty<Boolean>(formPanel,
- "visible"));
+ cb = new CheckBox("Form",
+ new MethodProperty<Boolean>(formPanel, "visible"));
cb.setImmediate(true);
hidingControls.addComponent(cb);
formPanel.setVisible(false);
@@ -185,7 +185,8 @@ public class Ticket1710 extends com.vaadin.server.LegacyApplication {
lo.addComponent(new TextField("Textfield with no error in it"));
- TextField tt1 = new TextField("100% wide Textfield with no error in it");
+ TextField tt1 = new TextField(
+ "100% wide Textfield with no error in it");
tt1.setWidth("100%");
lo.addComponent(tt1);
@@ -268,15 +269,15 @@ public class Ticket1710 extends com.vaadin.server.LegacyApplication {
controls.setSpacing(true);
controls.setMargin(false);
controls.addComponent(new Label("width"));
- controls.addComponent(new TextField(new MethodProperty<Float>(
- testedLayout, "width")));
+ controls.addComponent(new TextField(
+ new MethodProperty<Float>(testedLayout, "width")));
CheckBox widthPercentsCheckBox = new CheckBox("%",
new MethodProperty<Boolean>(this, "widthPercents"));
widthPercentsCheckBox.setImmediate(true);
controls.addComponent(widthPercentsCheckBox);
controls.addComponent(new Label("height"));
- controls.addComponent(new TextField(new MethodProperty<Float>(
- testedLayout, "height")));
+ controls.addComponent(new TextField(
+ new MethodProperty<Float>(testedLayout, "height")));
CheckBox heightPercentsCheckBox = new CheckBox("%",
new MethodProperty<Boolean>(this, "heightPercents"));
heightPercentsCheckBox.setImmediate(true);
@@ -341,8 +342,8 @@ public class Ticket1710 extends com.vaadin.server.LegacyApplication {
hAlign.addItem(new Integer(Bits.ALIGNMENT_LEFT));
hAlign.setItemCaption(new Integer(Bits.ALIGNMENT_LEFT), "left");
hAlign.addItem(new Integer(Bits.ALIGNMENT_HORIZONTAL_CENTER));
- hAlign.setItemCaption(
- new Integer(Bits.ALIGNMENT_HORIZONTAL_CENTER), "center");
+ hAlign.setItemCaption(new Integer(Bits.ALIGNMENT_HORIZONTAL_CENTER),
+ "center");
hAlign.addItem(new Integer(Bits.ALIGNMENT_RIGHT));
hAlign.setItemCaption(new Integer(Bits.ALIGNMENT_RIGHT), "right");
@@ -369,18 +370,18 @@ public class Ticket1710 extends com.vaadin.server.LegacyApplication {
lAlign.addItem(new Integer(Bits.ALIGNMENT_LEFT));
lAlign.setItemCaption(new Integer(Bits.ALIGNMENT_LEFT), "left");
lAlign.addItem(new Integer(Bits.ALIGNMENT_HORIZONTAL_CENTER));
- lAlign.setItemCaption(
- new Integer(Bits.ALIGNMENT_HORIZONTAL_CENTER), "center");
+ lAlign.setItemCaption(new Integer(Bits.ALIGNMENT_HORIZONTAL_CENTER),
+ "center");
lAlign.addItem(new Integer(Bits.ALIGNMENT_RIGHT));
lAlign.setItemCaption(new Integer(Bits.ALIGNMENT_RIGHT), "right");
lAlign.addListener(new Property.ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
- testPanelLayout.setComponentAlignment(
- testedLayout,
- new Alignment(((Integer) lAlign.getValue())
- .intValue() + Bits.ALIGNMENT_TOP));
+ testPanelLayout.setComponentAlignment(testedLayout,
+ new Alignment(
+ ((Integer) lAlign.getValue()).intValue()
+ + Bits.ALIGNMENT_TOP));
}
});
}
@@ -388,22 +389,22 @@ public class Ticket1710 extends com.vaadin.server.LegacyApplication {
private void updateAlignments(Alignment a) {
for (Iterator<Component> i = testedLayout.getComponentIterator(); i
.hasNext();) {
- ((Layout.AlignmentHandler) testedLayout).setComponentAlignment(
- i.next(), a);
+ ((Layout.AlignmentHandler) testedLayout)
+ .setComponentAlignment(i.next(), a);
}
}
private void updateMarginsAndSpacing() {
if (testedLayout instanceof Layout.MarginHandler) {
- ((Layout.MarginHandler) testedLayout).setMargin(new MarginInfo(
- marginTop.getValue().booleanValue(), marginRight
- .getValue().booleanValue(), marginBottom
- .getValue().booleanValue(), marginLeft
- .getValue().booleanValue()));
+ ((Layout.MarginHandler) testedLayout).setMargin(
+ new MarginInfo(marginTop.getValue().booleanValue(),
+ marginRight.getValue().booleanValue(),
+ marginBottom.getValue().booleanValue(),
+ marginLeft.getValue().booleanValue()));
}
if (testedLayout instanceof Layout.SpacingHandler) {
- ((Layout.SpacingHandler) testedLayout).setSpacing(spacing
- .getValue().booleanValue());
+ ((Layout.SpacingHandler) testedLayout)
+ .setSpacing(spacing.getValue().booleanValue());
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1737.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1737.java
index 33515bad87..9db5665cf7 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1737.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1737.java
@@ -12,7 +12,8 @@ import com.vaadin.ui.VerticalLayout;
public class Ticket1737 extends LegacyApplication {
- Resource slowRes = new ClassResource(Ticket1737.class, "m-bullet-blue.gif") {
+ Resource slowRes = new ClassResource(Ticket1737.class,
+ "m-bullet-blue.gif") {
@Override
public DownloadStream getStream() {
try {
@@ -39,8 +40,8 @@ public class Ticket1737 extends LegacyApplication {
Panel p = new Panel("Test panel", pl);
p.setSizeFull();
- pl.addComponent(new Label(
- "Second component is embedded with a slow resource "
+ pl.addComponent(
+ new Label("Second component is embedded with a slow resource "
+ "and thus should break layout if Embedded cannot"
+ " request re-layout after load."));
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1804.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1804.java
index bf648b0d92..17e12b1f83 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1804.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1804.java
@@ -39,37 +39,42 @@ public class Ticket1804 extends com.vaadin.server.LegacyApplication {
s = new Select("Testcase from the ticket #1804");
s.setNullSelectionAllowed(false);
- s.setPropertyDataSource(new MethodProperty<String>(new TestPojo(), "id"));
- s.addValidator(new EmptyStringValidator(
- "Selection required for test-field"));
+ s.setPropertyDataSource(
+ new MethodProperty<String>(new TestPojo(), "id"));
+ s.addValidator(
+ new EmptyStringValidator("Selection required for test-field"));
s.setRequired(true);
listOfAllFields.add(s);
s = new Select("Testcase from the ticket #1804, but without validator");
s.setNullSelectionAllowed(false);
- s.setPropertyDataSource(new MethodProperty<String>(new TestPojo(), "id"));
+ s.setPropertyDataSource(
+ new MethodProperty<String>(new TestPojo(), "id"));
s.setRequired(true);
listOfAllFields.add(s);
s = new Select(
"Testcase from the ticket #1804, but with required=false");
s.setNullSelectionAllowed(false);
- s.setPropertyDataSource(new MethodProperty<String>(new TestPojo(), "id"));
- s.addValidator(new EmptyStringValidator(
- "Selection required for test-field"));
+ s.setPropertyDataSource(
+ new MethodProperty<String>(new TestPojo(), "id"));
+ s.addValidator(
+ new EmptyStringValidator("Selection required for test-field"));
listOfAllFields.add(s);
s = new Select(
"Testcase from the ticket #1804, but without validator and with required=false");
s.setNullSelectionAllowed(false);
- s.setPropertyDataSource(new MethodProperty<String>(new TestPojo(), "id"));
+ s.setPropertyDataSource(
+ new MethodProperty<String>(new TestPojo(), "id"));
listOfAllFields.add(s);
s = new Select(
"Required=true, custom error message, null selection not allowed");
s.setRequired(true);
s.setNullSelectionAllowed(false);
- s.setPropertyDataSource(new MethodProperty<String>(new TestPojo(), "id"));
+ s.setPropertyDataSource(
+ new MethodProperty<String>(new TestPojo(), "id"));
s.setValue(null);
s.setComponentError(new SystemError("Test error message"));
listOfAllFields.add(s);
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1806.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1806.java
index 60ea9528d3..9317fa9b1a 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1806.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1806.java
@@ -29,15 +29,15 @@ public class Ticket1806 extends com.vaadin.server.LegacyApplication {
tf1.commit();
}
}));
- main.addComponent(new Button("Show property value",
- new Button.ClickListener() {
+ main.addComponent(
+ new Button("Show property value", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
main.showNotification("'" + prop.getValue() + "'");
}
}));
- main.addComponent(new Button("Show field value",
- new Button.ClickListener() {
+ main.addComponent(
+ new Button("Show field value", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
main.showNotification("'" + tf1.getValue() + "'");
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1834PanelScrolling.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1834PanelScrolling.java
index 60078daacd..1fd72efd78 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1834PanelScrolling.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1834PanelScrolling.java
@@ -9,8 +9,8 @@ import com.vaadin.ui.LegacyWindow;
import com.vaadin.ui.Panel;
import com.vaadin.ui.VerticalLayout;
-public class Ticket1834PanelScrolling extends
- com.vaadin.server.LegacyApplication {
+public class Ticket1834PanelScrolling
+ extends com.vaadin.server.LegacyApplication {
private static final int ROWS = 50;
@@ -79,10 +79,8 @@ public class Ticket1834PanelScrolling extends
p = new Panel("TestPanel", pl);
for (int i = 0; i < ROWS; i++) {
- pl.addComponent(new Label(
- "Label"
- + i
- + "................................................................................................................."));
+ pl.addComponent(new Label("Label" + i
+ + "................................................................................................................."));
}
p.setHeight("300px");
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1857.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1857.java
index 5c6f45de87..51fcbb2346 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1857.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1857.java
@@ -61,14 +61,15 @@ public class Ticket1857 extends LegacyApplication implements Handler {
@Override
public String getStyle(Table source, Object itemId,
Object propertyId) {
- Object cell = t.getContainerProperty(itemId,
- propertyId).getValue();
+ Object cell = t
+ .getContainerProperty(itemId, propertyId)
+ .getValue();
if (!(cell instanceof Integer)) {
return null;
}
int age = ((Integer) cell).intValue();
- return age > 65 ? "old" : (age < 18 ? "young"
- : null);
+ return age > 65 ? "old"
+ : (age < 18 ? "young" : null);
}
});
} else {
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1878.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1878.java
index 6078320b61..092f81636b 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1878.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1878.java
@@ -185,7 +185,8 @@ public class Ticket1878 extends LegacyApplication {
form = createForm(l1, "200px", "500px");
BeanItem<FormObject> item = new BeanItem<FormObject>(new FormObject());
form.setItemDataSource(item);
- for (Iterator<?> i = item.getItemPropertyIds().iterator(); i.hasNext();) {
+ for (Iterator<?> i = item.getItemPropertyIds().iterator(); i
+ .hasNext();) {
Object property = i.next();
Field<?> f = form.getField(property);
@@ -277,8 +278,9 @@ public class Ticket1878 extends LegacyApplication {
}
String alignText = align ? "-A" : "";
String cWidth = componentWidth == null ? "" : " - " + componentWidth;
- Panel p = new Panel(type + "/" + dirText + alignText + " " + w + "x"
- + h + cWidth, newLayout);
+ Panel p = new Panel(
+ type + "/" + dirText + alignText + " " + w + "x" + h + cWidth,
+ newLayout);
p.setWidth(w);
p.setHeight(h);
@@ -310,8 +312,8 @@ public class Ticket1878 extends LegacyApplication {
newLayout.addComponent(tf);
if (align) {
- ((AlignmentHandler) newLayout).setComponentAlignment(
- tf, Alignment.BOTTOM_RIGHT);
+ ((AlignmentHandler) newLayout).setComponentAlignment(tf,
+ Alignment.BOTTOM_RIGHT);
}
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1900.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1900.java
index 35b7adc7b3..2109b1729a 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1900.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1900.java
@@ -37,18 +37,22 @@ public class Ticket1900 extends LegacyApplication {
f[0].setDescription("Field is empty, requiredError(null): *");
- f[1].setDescription("Field is empty, requiredError(\"foo\"): * (popup shows the validation error)");
+ f[1].setDescription(
+ "Field is empty, requiredError(\"foo\"): * (popup shows the validation error)");
f[1].setRequiredError("The field must not be empty");
- f[2].setDescription("Field is non-empty, validators do not give validation error: *");
+ f[2].setDescription(
+ "Field is non-empty, validators do not give validation error: *");
f[2].setValue("valid 12");
- f[3].setDescription("Field is non-empty, requiredError(null), validators "
- + "give validation error: * ! (popup shows the validation error)");
+ f[3].setDescription(
+ "Field is non-empty, requiredError(null), validators "
+ + "give validation error: * ! (popup shows the validation error)");
f[3].setValue("invalid");
- f[4].setDescription("Field is non-empty, requiredError(\"foo\"), validators "
- + "give validation error: * ! (popup shows the validation error)");
+ f[4].setDescription(
+ "Field is non-empty, requiredError(\"foo\"), validators "
+ + "give validation error: * ! (popup shows the validation error)");
f[4].setValue("invalid");
f[4].setRequiredError("The field must not be empty");
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1921.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1921.java
index ab43b45576..07c9090485 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1921.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1921.java
@@ -109,8 +109,8 @@ public class Ticket1921 extends LegacyApplication implements RequestHandler {
int rr = Integer.parseInt(v[0]);
int rs = Integer.parseInt(v[1]);
if (rr < round || (rr == round && rs < state)) {
- getMainWindow().showNotification(
- "Already past requested " + s[0]);
+ getMainWindow()
+ .showNotification("Already past requested " + s[0]);
return false;
}
while (round < rr || state < rs) {
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1923.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1923.java
index 939fe05e58..69efc3d9a9 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1923.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1923.java
@@ -23,10 +23,8 @@ public class Ticket1923 extends com.vaadin.server.LegacyApplication {
// p.getLayout().setWidth("100%");
// p.setContent(new GridLayout(1, 100));
for (int i = 0; i < ROWS; i++) {
- pl.addComponent(new Label(
- "Label"
- + i
- + " 5067w09adsfasdjfahlsdfjhalfjhaldjfhalsjdfhlajdhflajhdfljahdslfjahldsjfhaljdfhaljfdhlajsdhflajshdflkajhsdlfkjahsldfkjahsldfhalskjfdhlksjfdh857idifhaljsdfhlajsdhflajhdflajhdfljahldfjhaljdfhalsjdfhalkjdhflkajhdfljahsdlfjahlsdjfhaldjfhaljfdhlajdhflajshdfljahsdlfjhalsjdfhalskjhfdlhusfglksuhdflgjshflgjhslfghslfjghsljfglsjhfglsjhfgljshfgljshflgjhslfghsljfgsljdfglsdjhfglsjhflgkjshfldjgh"));
+ pl.addComponent(new Label("Label" + i
+ + " 5067w09adsfasdjfahlsdfjhalfjhaldjfhalsjdfhlajdhflajhdfljahdslfjahldsjfhaljdfhaljfdhlajsdhflajshdflkajhsdlfkjahsldfkjahsldfhalskjfdhlksjfdh857idifhaljsdfhlajsdhflajhdflajhdfljahldfjhaljdfhalsjdfhalkjdhflkajhdfljahsdlfjahlsdjfhaldjfhaljfdhlajdhflajshdfljahsdlfjhalsjdfhalskjhfdlhusfglksuhdflgjshflgjhslfghslfjghsljfglsjhfglsjhfgljshfgljshflgjhslfghsljfgsljdfglsdjhfglsjhflgkjshfldjgh"));
}
// main.getLayout().setSizeFull();
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1939.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1939.java
index 9b360d1da7..277188fc7c 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1939.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1939.java
@@ -24,8 +24,8 @@ public class Ticket1939 extends LegacyApplication {
l.addComponent(t);
w.addComponent(l);
- w.addComponent(new Button("show me the bug",
- new Button.ClickListener() {
+ w.addComponent(
+ new Button("show me the bug", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
l.setWidth(null);
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1966.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1966.java
index 2023094458..dff2bd1769 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1966.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1966.java
@@ -103,9 +103,9 @@ public class Ticket1966 extends LegacyApplication {
}
private Button getButton(Layout l, Alignment align) {
- Button b = new Button("Narrow Button - "
- + align.getHorizontalAlignment() + " - "
- + align.getVerticalAlignment());
+ Button b = new Button(
+ "Narrow Button - " + align.getHorizontalAlignment() + " - "
+ + align.getVerticalAlignment());
b.setWidth("100px");
((AlignmentHandler) l).setComponentAlignment(b, align);
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1969.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1969.java
index 73746fb07d..a33aea1565 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1969.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1969.java
@@ -43,8 +43,7 @@ public class Ticket1969 extends com.vaadin.server.LegacyApplication {
Button b;
- b = new Button(
- "change introduction caption (should add * to tab name)",
+ b = new Button("change introduction caption (should add * to tab name)",
new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1970.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1970.java
index eb98153be0..98cd131197 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1970.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1970.java
@@ -35,14 +35,14 @@ public class Ticket1970 extends LegacyApplication {
addWindow(w);
w.addComponent(new Label(
"This window has been created on fly for name: " + name));
- w.addComponent(new Button("Show open windows",
- new Button.ClickListener() {
+ w.addComponent(
+ new Button("Show open windows", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
String openWindows = "";
- for (Iterator<LegacyWindow> i = getWindows().iterator(); i
- .hasNext();) {
+ for (Iterator<LegacyWindow> i = getWindows()
+ .iterator(); i.hasNext();) {
LegacyWindow t = i.next();
openWindows += (openWindows.length() > 0 ? "," : "")
+ t.getName();
@@ -60,12 +60,14 @@ public class Ticket1970 extends LegacyApplication {
new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- w.showNotification("Name of this window = "
- + w.getName());
+ w.showNotification(
+ "Name of this window = " + w.getName());
}
}));
- w.addComponent(new Label("<a href='" + getURL().toExternalForm() + "'>"
- + getURL().toExternalForm() + "</a>", ContentMode.HTML));
+ w.addComponent(new Label(
+ "<a href='" + getURL().toExternalForm() + "'>"
+ + getURL().toExternalForm() + "</a>",
+ ContentMode.HTML));
w.addComponent(new Label(
"<h2>How to reproduce</h2>Open the above link in another browser"
+ " window and then press the Show-button on this window.",
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1975.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1975.java
index 18caac808b..921b4573eb 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1975.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1975.java
@@ -34,8 +34,8 @@ public class Ticket1975 extends LegacyApplication {
cl1 = new CustomLayout(new ByteArrayInputStream(s.getBytes()));
layout.addComponent(cl1);
- layout.addComponent(new Button("Disable/Enable",
- new ClickListener() {
+ layout.addComponent(
+ new Button("Disable/Enable", new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1982.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1982.java
index d8ec0f63fb..de162c50c6 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1982.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1982.java
@@ -67,8 +67,8 @@ public class Ticket1982 extends LegacyApplication {
min.setVisible(true);
max.setVisible(false);
TitleBar.this.layout.removeAllComponents();
- TitleBar.this.layout
- .addComponent(TitleBar.this, 0, 0, 1, 1);
+ TitleBar.this.layout.addComponent(TitleBar.this, 0, 0, 1,
+ 1);
}
});
min.addListener(new ClickListener() {
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1983.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1983.java
index 789e8c3a45..e9bda8e259 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1983.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1983.java
@@ -52,25 +52,17 @@ public class Ticket1983 extends LegacyApplication {
dataSource.addContainerProperty(propId, String.class, null);
dataSource.addContainerProperty(propId2, String.class, null);
final Object itemId = dataSource.addItem();
- dataSource
- .getItem(itemId)
- .getItemProperty(propId)
- .setValue(
- "Very long value that makes a scrollbar appear for sure");
- dataSource
- .getItem(itemId)
- .getItemProperty(propId2)
- .setValue(
- "Very long value that makes a scrollbar appear for sure");
+ dataSource.getItem(itemId).getItemProperty(propId).setValue(
+ "Very long value that makes a scrollbar appear for sure");
+ dataSource.getItem(itemId).getItemProperty(propId2).setValue(
+ "Very long value that makes a scrollbar appear for sure");
for (int i = 0; i < 150; i++) {
Object id = dataSource.addItem();
- dataSource
- .getItem(id)
- .getItemProperty(propId)
- .setValue(
- (i == 100 ? "Very long value that makes a scrollbar appear for sure"
- : "Short"));
+ dataSource.getItem(id).getItemProperty(propId)
+ .setValue((i == 100
+ ? "Very long value that makes a scrollbar appear for sure"
+ : "Short"));
dataSource.getItem(id).getItemProperty(propId2)
.setValue("Short");
}
@@ -94,14 +86,10 @@ public class Ticket1983 extends LegacyApplication {
.setValue("Short value");
isLong = false;
} else {
- dataSource
- .getItem(itemId)
- .getItemProperty(propId)
+ dataSource.getItem(itemId).getItemProperty(propId)
.setValue(
"Very long value that makes a scrollbar appear for sure");
- dataSource
- .getItem(itemId)
- .getItemProperty(propId2)
+ dataSource.getItem(itemId).getItemProperty(propId2)
.setValue(
"Very long value that makes a scrollbar appear for sure");
isLong = true;
@@ -121,7 +109,8 @@ public class Ticket1983 extends LegacyApplication {
@Override
public void valueChange(ValueChangeEvent event) {
if ((Boolean) event.getProperty().getValue()) {
- table.setVisibleColumns(new Object[] { propId, propId2 });
+ table.setVisibleColumns(
+ new Object[] { propId, propId2 });
} else {
table.setVisibleColumns(new Object[] { propId });
}
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1995.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1995.java
index 402baa1d34..977d5413da 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1995.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1995.java
@@ -31,8 +31,8 @@ public class Ticket1995 extends LegacyApplication {
Filterable filterable = (Container.Filterable) table
.getContainerDataSource();
- filterable.addContainerFilter(new SimpleStringFilter(PROPERTY_1, "Row",
- true, false));
+ filterable.addContainerFilter(
+ new SimpleStringFilter(PROPERTY_1, "Row", true, false));
table.setColumnHeader(PROPERTY_1, "Test (filter: Row)");
@@ -61,8 +61,8 @@ public class Ticket1995 extends LegacyApplication {
getMainWindow().showNotification("Tried to add item 'abc', " + res);
- filterable.addContainerFilter(new SimpleStringFilter(PROPERTY_1, "Row",
- true, false));
+ filterable.addContainerFilter(
+ new SimpleStringFilter(PROPERTY_1, "Row", true, false));
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket20.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket20.java
index 5f6305bcb0..30d647ad63 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket20.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket20.java
@@ -41,19 +41,21 @@ public class Ticket20 extends LegacyApplication {
@Override
public void validate(Object value) throws InvalidValueException {
if (!isValid(value)) {
- throw new InvalidValueException(value
- + " is not a non-negative number");
+ throw new InvalidValueException(
+ value + " is not a non-negative number");
}
}
});
- CompositeValidator v2 = new CompositeValidator(CombinationMode.OR, null);
+ CompositeValidator v2 = new CompositeValidator(CombinationMode.OR,
+ null);
v2.addValidator(v);
v2.addValidator(new Validator() {
@Override
public void validate(Object value) throws InvalidValueException {
if (!"".equals("" + value)) {
- throw new InvalidValueException("Value is not empty string");
+ throw new InvalidValueException(
+ "Value is not empty string");
}
}
});
@@ -69,8 +71,8 @@ public class Ticket20 extends LegacyApplication {
mainWin.addComponent(b);
}
- mainWin.addComponent(new Button("Validate integer",
- new Button.ClickListener() {
+ mainWin.addComponent(
+ new Button("Validate integer", new Button.ClickListener() {
@Override
public void buttonClick(
com.vaadin.ui.Button.ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2009.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2009.java
index 64881c046a..cd91ee83c5 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2009.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2009.java
@@ -47,8 +47,8 @@ public class Ticket2009 extends com.vaadin.server.LegacyApplication {
events.addComponent(new Label(new Label("Click:"
+ (event.isDoubleClick() ? "double" : "single")
+ " button:" + event.getButtonName() + " propertyId:"
- + event.getPropertyId() + " itemID:"
- + event.getItemId() + " item:" + event.getItem())));
+ + event.getPropertyId() + " itemID:" + event.getItemId()
+ + " item:" + event.getItem())));
}
});
@@ -72,8 +72,8 @@ public class Ticket2009 extends com.vaadin.server.LegacyApplication {
events2.addComponent(new Label("Click:"
+ (event.isDoubleClick() ? "double" : "single")
+ " button:" + event.getButtonName() + " propertyId:"
- + event.getPropertyId() + " itemID:"
- + event.getItemId() + " item:" + event.getItem()));
+ + event.getPropertyId() + " itemID:" + event.getItemId()
+ + " item:" + event.getItem()));
if (event.isDoubleClick()) {
new PropertyEditor(event);
}
@@ -110,8 +110,8 @@ public class Ticket2009 extends com.vaadin.server.LegacyApplication {
setCaption("Editing " + itemid + " : " + propertyid);
- editor.setPropertyDataSource(c.getContainerProperty(itemid,
- propertyid));
+ editor.setPropertyDataSource(
+ c.getContainerProperty(itemid, propertyid));
layout.addComponent(editor);
layout.addComponent(done);
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2014.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2014.java
index 7fdd56df67..a8d50ab18f 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2014.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2014.java
@@ -31,8 +31,8 @@ public class Ticket2014 extends LegacyApplication {
private void createUI(GridLayout layout) {
createPanel(layout);
- layout.addComponent(new Button("Change class name",
- new ClickListener() {
+ layout.addComponent(
+ new Button("Change class name", new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2021.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2021.java
index c6cbdbfa94..8cca619082 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2021.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2021.java
@@ -47,7 +47,7 @@ public class Ticket2021 extends LegacyApplication {
layout.addComponent(tf1);
/*
- *
+ *
* OrderedLayout
*/
@@ -68,7 +68,7 @@ public class Ticket2021 extends LegacyApplication {
layout2.addComponent(tf2);
/*
- *
+ *
* GridLayout
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2023.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2023.java
index 7c79f86fb2..76237b94ca 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2023.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2023.java
@@ -6,8 +6,8 @@ import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.GridLayout;
import com.vaadin.ui.LegacyWindow;
-public class Ticket2023 extends com.vaadin.server.LegacyApplication implements
- Button.ClickListener {
+public class Ticket2023 extends com.vaadin.server.LegacyApplication
+ implements Button.ClickListener {
AbstractComponent c = new Button();
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2024.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2024.java
index 2861c9beca..1374a89b3c 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2024.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2024.java
@@ -21,9 +21,10 @@ public class Ticket2024 extends LegacyApplication {
w.getContent().setHeight("2000");
w.addComponent(layout);
- layout.addComponent(new Label(
- "This should NOT get stuck when scrolling down"));
- layout.addComponent(new TextField("This should not get stuck either..."));
+ layout.addComponent(
+ new Label("This should NOT get stuck when scrolling down"));
+ layout.addComponent(
+ new TextField("This should not get stuck either..."));
VerticalLayout ol = new VerticalLayout();
ol.setHeight("1000");
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2038.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2038.java
index 12866da570..abf56528f8 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2038.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2038.java
@@ -23,8 +23,9 @@ public class Ticket2038 extends LegacyApplication {
@Override
public void valueChange(ValueChangeEvent event) {
- w.showNotification("TextField is " + (tf.isValid() ? "" : "in")
- + "valid, with error: " + tf.getErrorMessage(),
+ w.showNotification(
+ "TextField is " + (tf.isValid() ? "" : "in")
+ + "valid, with error: " + tf.getErrorMessage(),
Notification.TYPE_WARNING_MESSAGE);
}
});
@@ -38,8 +39,8 @@ public class Ticket2038 extends LegacyApplication {
b.addListener(new Property.ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
- tf.setRequiredError(b.getValue() ? "Field must not be empty"
- : null);
+ tf.setRequiredError(
+ b.getValue() ? "Field must not be empty" : null);
}
});
}
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2048.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2048.java
index 8fa7c296d0..eca1fd84df 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2048.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2048.java
@@ -64,8 +64,8 @@ public class Ticket2048 extends LegacyApplication {
l.setHeight("400px");
ol.addComponent(l);
- embedded = new Embedded(null, new ThemeResource(
- "icons/64/folder-add.png"));
+ embedded = new Embedded(null,
+ new ThemeResource("icons/64/folder-add.png"));
layout.addComponent(embedded);
Button b = new Button(
"Replace image with new embedded component (flashes)",
@@ -92,7 +92,8 @@ public class Ticket2048 extends LegacyApplication {
.contains("folder-add")) {
img = "folder-delete";
}
- embedded.setSource(new ThemeResource("icons/64/" + img + ".png"));
+ embedded.setSource(
+ new ThemeResource("icons/64/" + img + ".png"));
}
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2053.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2053.java
index 14c8273c0d..59c940b8e1 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2053.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2053.java
@@ -21,9 +21,10 @@ public class Ticket2053 extends LegacyApplication {
setMainWindow(main);
Button nothing = new Button("Do nothing");
main.addComponent(nothing);
- nothing.setDescription("Even though no action is taked, this window is refreshed to "
- + "draw changes not originating from this window. Such changes include changes "
- + "made by other browser-windows.");
+ nothing.setDescription(
+ "Even though no action is taked, this window is refreshed to "
+ + "draw changes not originating from this window. Such changes include changes "
+ + "made by other browser-windows.");
Button add = new Button("Add a window", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
@@ -38,14 +39,14 @@ public class Ticket2053 extends LegacyApplication {
tf.addListener(new Property.ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
- main.addComponent(new Label(name + " send text:"
- + tf.getValue()));
+ main.addComponent(new Label(
+ name + " send text:" + tf.getValue()));
}
});
for (int i = 0; i < 3; i++) {
final String caption = "Slow button " + i;
- c.addComponent(new Button(caption,
- new Button.ClickListener() {
+ c.addComponent(
+ new Button(caption, new Button.ClickListener() {
@Override
public synchronized void buttonClick(
ClickEvent event) {
@@ -53,8 +54,8 @@ public class Ticket2053 extends LegacyApplication {
this.wait(2000);
} catch (InterruptedException e) {
}
- main.addComponent(new Label(caption
- + " pressed"));
+ main.addComponent(
+ new Label(caption + " pressed"));
}
}));
}
@@ -62,10 +63,11 @@ public class Ticket2053 extends LegacyApplication {
}
});
main.addComponent(add);
- add.setDescription("This button opens a new browser window. Closing the browser "
- + "window should do two things: 1) submit all unsubmitted state to server "
- + "(print any changes to textfield to main window) and 2) call window.close()"
- + " on the child window (print closed on the main window)");
+ add.setDescription(
+ "This button opens a new browser window. Closing the browser "
+ + "window should do two things: 1) submit all unsubmitted state to server "
+ + "(print any changes to textfield to main window) and 2) call window.close()"
+ + " on the child window (print closed on the main window)");
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2061.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2061.java
index 3838986bfa..05ce244f6a 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2061.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2061.java
@@ -33,8 +33,8 @@ public class Ticket2061 extends LegacyApplication {
MyTable table3 = new MyTable(24, "table3");
table3.loadTable(1000);
- MyAccordion accordion = new MyAccordion(new Component[] { table1,
- table2 }, "Test");
+ MyAccordion accordion = new MyAccordion(
+ new Component[] { table1, table2 }, "Test");
Tabs tab = new Tabs(new Component[] { accordion, table3 });
@@ -42,7 +42,8 @@ public class Ticket2061 extends LegacyApplication {
}
- public class MyTable extends CustomComponent implements ValueChangeListener {
+ public class MyTable extends CustomComponent
+ implements ValueChangeListener {
private Table table = new Table();
private String[] columns;
@@ -72,8 +73,8 @@ public class Ticket2061 extends LegacyApplication {
Item rowItem = table.addItem(j);
if (rowItem != null) {
for (int i = 0; i < columns.length; i++) {
- rowItem.getItemProperty(columns[i]).setValue(
- "Value" + j);
+ rowItem.getItemProperty(columns[i])
+ .setValue("Value" + j);
}
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2061b.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2061b.java
index 22c7471282..83fa259ff8 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2061b.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2061b.java
@@ -21,8 +21,8 @@ import com.vaadin.ui.TextField;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.VerticalSplitPanel;
-public class Ticket2061b extends LegacyApplication implements
- SelectedTabChangeListener {
+public class Ticket2061b extends LegacyApplication
+ implements SelectedTabChangeListener {
private LegacyWindow mainWindow;
private Panel p;
@@ -101,7 +101,8 @@ public class Ticket2061b extends LegacyApplication implements
tab.addTab(p, "Panel with panel", null);
}
- public class MyTable extends CustomComponent implements ValueChangeListener {
+ public class MyTable extends CustomComponent
+ implements ValueChangeListener {
private Table table = new Table();
private String[] columns;
@@ -131,8 +132,8 @@ public class Ticket2061b extends LegacyApplication implements
Item rowItem = table.addItem(j);
if (rowItem != null) {
for (int i = 0; i < columns.length; i++) {
- rowItem.getItemProperty(columns[i]).setValue(
- "Value" + j);
+ rowItem.getItemProperty(columns[i])
+ .setValue("Value" + j);
}
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2061c.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2061c.java
index e6255d71c7..9a3b129775 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2061c.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2061c.java
@@ -17,8 +17,8 @@ import com.vaadin.ui.TabSheet.SelectedTabChangeListener;
import com.vaadin.ui.Table;
import com.vaadin.ui.VerticalLayout;
-public class Ticket2061c extends LegacyApplication implements
- SelectedTabChangeListener {
+public class Ticket2061c extends LegacyApplication
+ implements SelectedTabChangeListener {
private LegacyWindow mainWindow;
private Panel p;
@@ -60,7 +60,8 @@ public class Ticket2061c extends LegacyApplication implements
}
- public class MyTable extends CustomComponent implements ValueChangeListener {
+ public class MyTable extends CustomComponent
+ implements ValueChangeListener {
private Table table = new Table();
private String[] columns;
@@ -90,8 +91,8 @@ public class Ticket2061c extends LegacyApplication implements
Item rowItem = table.addItem(j);
if (rowItem != null) {
for (int i = 0; i < columns.length; i++) {
- rowItem.getItemProperty(columns[i]).setValue(
- "Value" + j);
+ rowItem.getItemProperty(columns[i])
+ .setValue("Value" + j);
}
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2083.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2083.java
index a94dafafcb..9294911188 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2083.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2083.java
@@ -23,7 +23,8 @@ public class Ticket2083 extends LegacyApplication {
VerticalLayout pl = new VerticalLayout();
pl.setMargin(true);
Panel p = new Panel(
- "This is a panel with a longer caption than it should have", pl);
+ "This is a panel with a longer caption than it should have",
+ pl);
p.setWidth("100px");
pl.addComponent(new Label("Contents"));
layout.addComponent(p);
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2095.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2095.java
index 270da9dc3f..43d839732b 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2095.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2095.java
@@ -18,7 +18,8 @@ public class Ticket2095 extends LegacyApplication {
Embedded em = new Embedded();
em.setType(Embedded.TYPE_BROWSER);
- em.setSource(new ExternalResource("../statictestfiles/ticket2095.html"));
+ em.setSource(
+ new ExternalResource("../statictestfiles/ticket2095.html"));
em.setId("MYIFRAME");
em.setSizeFull();
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2103.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2103.java
index a21864a67d..40a2e48fb4 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2103.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2103.java
@@ -72,8 +72,8 @@ public class Ticket2103 extends LegacyApplication {
Item rowItem = table.addItem(j);
if (rowItem != null) {
for (int i = 0; i < columns.length; i++) {
- rowItem.getItemProperty(columns[i]).setValue(
- "Value" + j);
+ rowItem.getItemProperty(columns[i])
+ .setValue("Value" + j);
}
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2104.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2104.java
index da9f7fecc8..47ded4838e 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2104.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2104.java
@@ -33,20 +33,20 @@ public class Ticket2104 extends LegacyApplication {
HorizontalLayout ol = new HorizontalLayout();
main.addComponent(ol);
- CheckBox cb = new CheckBox("immediate", new MethodProperty<Boolean>(
- tree, "immediate"));
+ CheckBox cb = new CheckBox("immediate",
+ new MethodProperty<Boolean>(tree, "immediate"));
cb.setImmediate(true);
ol.addComponent(cb);
- cb = new CheckBox("selectable", new MethodProperty<Boolean>(tree,
- "selectable"));
+ cb = new CheckBox("selectable",
+ new MethodProperty<Boolean>(tree, "selectable"));
cb.setImmediate(true);
ol.addComponent(cb);
- cb = new CheckBox("nullsel", new MethodProperty<Boolean>(tree,
- "nullSelectionAllowed"));
+ cb = new CheckBox("nullsel",
+ new MethodProperty<Boolean>(tree, "nullSelectionAllowed"));
cb.setImmediate(true);
ol.addComponent(cb);
- cb = new CheckBox("multi", new MethodProperty<Boolean>(tree,
- "multiSelect"));
+ cb = new CheckBox("multi",
+ new MethodProperty<Boolean>(tree, "multiSelect"));
cb.setImmediate(true);
ol.addComponent(cb);
cb = new CheckBox("icon");
@@ -85,29 +85,28 @@ public class Ticket2104 extends LegacyApplication {
tree.addListener(new ItemClickListener() {
@Override
public void itemClick(ItemClickEvent event) {
- getMainWindow().addComponent(
- new Label(event.toString() + " // " + event.getItemId()
- + "//" + event.getSource()));
+ getMainWindow().addComponent(new Label(event.toString() + " // "
+ + event.getItemId() + "//" + event.getSource()));
}
});
ol = new HorizontalLayout();
main.addComponent(ol);
- cb = new CheckBox("immediate", new MethodProperty<Boolean>(table,
- "immediate"));
+ cb = new CheckBox("immediate",
+ new MethodProperty<Boolean>(table, "immediate"));
cb.setImmediate(true);
ol.addComponent(cb);
- cb = new CheckBox("selectable", new MethodProperty<Boolean>(table,
- "selectable"));
+ cb = new CheckBox("selectable",
+ new MethodProperty<Boolean>(table, "selectable"));
cb.setImmediate(true);
ol.addComponent(cb);
- cb = new CheckBox("nullsel", new MethodProperty<Boolean>(table,
- "nullSelectionAllowed"));
+ cb = new CheckBox("nullsel",
+ new MethodProperty<Boolean>(table, "nullSelectionAllowed"));
cb.setImmediate(true);
ol.addComponent(cb);
- cb = new CheckBox("multi", new MethodProperty<Boolean>(table,
- "multiSelect"));
+ cb = new CheckBox("multi",
+ new MethodProperty<Boolean>(table, "multiSelect"));
cb.setImmediate(true);
ol.addComponent(cb);
main.addComponent(table);
@@ -121,9 +120,8 @@ public class Ticket2104 extends LegacyApplication {
table.addListener(new ItemClickListener() {
@Override
public void itemClick(ItemClickEvent event) {
- getMainWindow().addComponent(
- new Label(event.toString() + " // " + event.getItemId()
- + "//" + event.getSource()));
+ getMainWindow().addComponent(new Label(event.toString() + " // "
+ + event.getItemId() + "//" + event.getSource()));
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2106.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2106.java
index 08b7a738a7..5c478a678e 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2106.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2106.java
@@ -31,9 +31,8 @@ public class Ticket2106 extends LegacyApplication {
new Button("Do nothing", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- getMainWindow().addComponent(
- new Label("Last time did nothing: "
- + new Date()));
+ getMainWindow().addComponent(new Label(
+ "Last time did nothing: " + new Date()));
}
}));
}
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2107.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2107.java
index 7de0e2da24..bd4e2a6bdf 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2107.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2107.java
@@ -18,15 +18,17 @@ public class Ticket2107 extends LegacyApplication {
final TextField tf = new TextField(
"Required field that validated the input");
- tf.setDescription("Enter someting and click outside the field to activate");
+ tf.setDescription(
+ "Enter someting and click outside the field to activate");
tf.setRequired(true);
tf.setImmediate(true);
tf.addListener(new Property.ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
- w.showNotification("TextField is " + (tf.isValid() ? "" : "in")
- + "valid, with error: " + tf.getErrorMessage(),
+ w.showNotification(
+ "TextField is " + (tf.isValid() ? "" : "in")
+ + "valid, with error: " + tf.getErrorMessage(),
Notification.TYPE_WARNING_MESSAGE);
}
});
@@ -50,8 +52,8 @@ public class Ticket2107 extends LegacyApplication {
b.addListener(new Property.ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
- tf.setRequiredError(b.getValue() ? "Field must not be empty"
- : null);
+ tf.setRequiredError(
+ b.getValue() ? "Field must not be empty" : null);
}
});
}
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2117.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2117.java
index 9cfa63b29e..59004ac88c 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2117.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2117.java
@@ -50,12 +50,9 @@ public class Ticket2117 extends LegacyApplication {
private LegacyWindow createWindow() {
final LegacyWindow w = new LegacyWindow();
- w.addComponent(new Label(
- "Click this link: <a target=\"_blank\" href='"
- + getURL().toExternalForm()
- + "'>"
- + getURL().toExternalForm()
- + "</a> which opens new windows to this uri. They should end up having a separate Window and URL.",
+ w.addComponent(new Label("Click this link: <a target=\"_blank\" href='"
+ + getURL().toExternalForm() + "'>" + getURL().toExternalForm()
+ + "</a> which opens new windows to this uri. They should end up having a separate Window and URL.",
ContentMode.HTML));
return w;
}
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2119.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2119.java
index c8002ff2cb..65d78c269f 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2119.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2119.java
@@ -50,13 +50,12 @@ public class Ticket2119 extends LegacyApplication {
private Layout testLayout() {
final Layout layout = new VerticalLayout();
- final Label label = new Label(
- "Instructions to reproduce:\n"
- + " - Open this application in two browser windows\n"
- + " - Click the Button in first Window\n"
- + " - Go to the second Window\n"
- + " - Click the arrow in the Select\n"
- + " --> The opened list correctly shows the new value but the old one is shown in the \"input\" part");
+ final Label label = new Label("Instructions to reproduce:\n"
+ + " - Open this application in two browser windows\n"
+ + " - Click the Button in first Window\n"
+ + " - Go to the second Window\n"
+ + " - Click the arrow in the Select\n"
+ + " --> The opened list correctly shows the new value but the old one is shown in the \"input\" part");
label.setContentMode(ContentMode.PREFORMATTED);
layout.addComponent(label);
@@ -77,8 +76,8 @@ public class Ticket2119 extends LegacyApplication {
@Override
public void valueChange(Property.ValueChangeEvent event) {
Object value = event.getProperty().getValue();
- valueProperty.setValue((null != value) ? value.toString()
- : null);
+ valueProperty
+ .setValue((null != value) ? value.toString() : null);
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2125.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2125.java
index ba94bd394d..21c3142679 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2125.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2125.java
@@ -55,8 +55,8 @@ public class Ticket2125 extends LegacyApplication {
}
});
- CheckBox b = new CheckBox("editmode", new MethodProperty<Boolean>(
- table, "editable"));
+ CheckBox b = new CheckBox("editmode",
+ new MethodProperty<Boolean>(table, "editable"));
b.setImmediate(true);
addComponent(b);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2126.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2126.java
index bc182181e4..2653a4e837 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2126.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2126.java
@@ -9,10 +9,10 @@ import com.vaadin.ui.LegacyWindow;
import com.vaadin.ui.Table;
/**
- *
+ *
* Toggling container with an empty one may result duplicate header cell in
* client.
- *
+ *
*/
public class Ticket2126 extends com.vaadin.server.LegacyApplication {
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2179.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2179.java
index 06fb162f59..aacada21ee 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2179.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2179.java
@@ -27,8 +27,8 @@ public class Ticket2179 extends LegacyApplication {
@Override
public void valueChange(ValueChangeEvent event) {
- main.showNotification("Test field is "
- + (f.isValid() ? "valid" : "invalid"));
+ main.showNotification(
+ "Test field is " + (f.isValid() ? "valid" : "invalid"));
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2181.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2181.java
index beefb9b719..f3fdf96acf 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2181.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2181.java
@@ -16,8 +16,8 @@ import com.vaadin.ui.OptionGroup;
import com.vaadin.ui.TextField;
import com.vaadin.ui.VerticalLayout;
-public class Ticket2181 extends LegacyApplication implements
- Button.ClickListener {
+public class Ticket2181 extends LegacyApplication
+ implements Button.ClickListener {
// private static final Object PROPERTY_VALUE = new Object();
// private static final Object PROPERTY_CAPTION = new Object();
@@ -93,8 +93,9 @@ public class Ticket2181 extends LegacyApplication implements
tf.setCaption(caption);
} else if (value.equals("Icon")) {
String timestamp = String.valueOf(new Date().getTime());
- tf.setIcon(new ThemeResource(icons.get(random.nextInt(icons
- .size())) + "?" + timestamp));
+ tf.setIcon(new ThemeResource(
+ icons.get(random.nextInt(icons.size())) + "?"
+ + timestamp));
} else if (value.equals("Required")) {
tf.setRequired(true);
} else if (value.equals("Error")) {
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2186.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2186.java
index 8a467d385e..fe508434bb 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2186.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2186.java
@@ -36,7 +36,7 @@ public class Ticket2186 extends LegacyApplication {
table.addItem(new Object[] { i + " Joku Ihminen", "Testiviesti" },
- new Object());
+ new Object());
}
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2232.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2232.java
index 16fec93c44..9dcc773891 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2232.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2232.java
@@ -16,10 +16,8 @@ public class Ticket2232 extends LegacyApplication {
setMainWindow(new LegacyWindow());
setTheme("tests-tickets");
- getMainWindow()
- .addComponent(
- new Label(
- "Defining spacing must be possible also with pure CSS"));
+ getMainWindow().addComponent(new Label(
+ "Defining spacing must be possible also with pure CSS"));
Layout gl;
gl = new VerticalLayout();
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2242.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2242.java
index d100f61e30..3a219ffd82 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2242.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2242.java
@@ -13,8 +13,8 @@ import com.vaadin.ui.Button.ClickListener;
import com.vaadin.ui.LegacyWindow;
import com.vaadin.ui.Table;
-public class Ticket2242 extends LegacyApplication implements
- ValueChangeListener {
+public class Ticket2242 extends LegacyApplication
+ implements ValueChangeListener {
private Object tableValue = null;
private Table t;
@@ -62,8 +62,8 @@ public class Ticket2242 extends LegacyApplication implements
IndexedContainer ic = new IndexedContainer();
ic.addContainerProperty("a", String.class, null);
- for (String s : new String[] { "Lorem", "ipsum", "dolor", "sit",
- "amet", "consectetuer" }) {
+ for (String s : new String[] { "Lorem", "ipsum", "dolor", "sit", "amet",
+ "consectetuer" }) {
Item item = ic.addItem(s);
item.getItemProperty("a").setValue(s);
@@ -74,8 +74,8 @@ public class Ticket2242 extends LegacyApplication implements
@Override
public void valueChange(ValueChangeEvent event) {
- System.out.println("Value change from " + tableValue + " to "
- + t.getValue());
+ System.out.println(
+ "Value change from " + tableValue + " to " + t.getValue());
tableValue = t.getValue();
}
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2244.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2244.java
index fcb1c55f33..ee9ab08bb5 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2244.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2244.java
@@ -40,19 +40,19 @@ public class Ticket2244 extends LegacyApplication {
}
}));
- w.addComponent(new Button("new bigger item",
- new Button.ClickListener() {
+ w.addComponent(
+ new Button("new bigger item", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- form.setItemDataSource(new BeanItem<MyBean>(
- new MyBiggerBean()));
+ form.setItemDataSource(
+ new BeanItem<MyBean>(new MyBiggerBean()));
}
}));
- w.addComponent(new Button("new grid layout",
- new Button.ClickListener() {
+ w.addComponent(
+ new Button("new grid layout", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
@@ -61,8 +61,8 @@ public class Ticket2244 extends LegacyApplication {
}
}));
- w.addComponent(new Button("new form layout",
- new Button.ClickListener() {
+ w.addComponent(
+ new Button("new form layout", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2292.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2292.java
index b50a1d073e..2f658e3fa4 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2292.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2292.java
@@ -21,8 +21,8 @@ import com.vaadin.ui.Label;
import com.vaadin.ui.LegacyWindow;
import com.vaadin.ui.Link;
-public class Ticket2292 extends com.vaadin.server.LegacyApplication implements
- RequestHandler {
+public class Ticket2292 extends com.vaadin.server.LegacyApplication
+ implements RequestHandler {
@Override
public void init() {
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2297.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2297.java
index b4a3d02efa..f1773a5561 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2297.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2297.java
@@ -20,18 +20,14 @@ public class Ticket2297 extends Ticket2292 {
"Icon is built by servlet with a slow method, so it will show the bug (components not firing requestLayout)."));
try {
- CustomLayout cl = new CustomLayout(
- new ByteArrayInputStream(
- ("This is an empty CustomLayout with as slow image. <img src=\""
- + url.toString() + "/icon.png\" />")
- .getBytes()));
+ CustomLayout cl = new CustomLayout(new ByteArrayInputStream(
+ ("This is an empty CustomLayout with as slow image. <img src=\""
+ + url.toString() + "/icon.png\" />").getBytes()));
main.addComponent(cl);
- cl = new CustomLayout(
- new ByteArrayInputStream(
- ("This is an empty CustomLayout with as slow image. <img src=\""
- + url.toString() + "/icon.png\" />")
- .getBytes()));
+ cl = new CustomLayout(new ByteArrayInputStream(
+ ("This is an empty CustomLayout with as slow image. <img src=\""
+ + url.toString() + "/icon.png\" />").getBytes()));
main.addComponent(cl);
} catch (IOException e) {
// TODO Auto-generated catch block
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2303.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2303.java
index be85f2d481..8a6aaabc6e 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2303.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2303.java
@@ -18,8 +18,8 @@ public class Ticket2303 extends LegacyApplication {
String customlayout = "<div location=\"test\"></div>";
CustomLayout cl = null;
try {
- cl = new CustomLayout(new ByteArrayInputStream(
- customlayout.getBytes()));
+ cl = new CustomLayout(
+ new ByteArrayInputStream(customlayout.getBytes()));
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2339.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2339.java
index 8683711bdc..358ae402b0 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2339.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2339.java
@@ -13,15 +13,14 @@ public class Ticket2339 extends LegacyApplication {
@Override
public void init() {
- final LegacyWindow mainWin = new LegacyWindow(getClass()
- .getSimpleName());
+ final LegacyWindow mainWin = new LegacyWindow(
+ getClass().getSimpleName());
setMainWindow(mainWin);
try {
- CustomLayout cl = new CustomLayout(
- new ByteArrayInputStream(
- "<div style=\"width:400px;overflow:hidden;background-color:red;\"><div style=\"border:1em solid blue; height:4em; padding:1em 1.5em;\" location=\"b\"></div></div>"
- .getBytes()));
+ CustomLayout cl = new CustomLayout(new ByteArrayInputStream(
+ "<div style=\"width:400px;overflow:hidden;background-color:red;\"><div style=\"border:1em solid blue; height:4em; padding:1em 1.5em;\" location=\"b\"></div></div>"
+ .getBytes()));
Button button = new Button("b");
button.setSizeFull();
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2344.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2344.java
index a24351c3aa..7380428025 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2344.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2344.java
@@ -43,7 +43,8 @@ public class Ticket2344 extends LegacyApplication {
vl.addComponent(b);
t.addItem(new Object[] { vl, "String 2", "String 3", "String 4",
- new Button("String 5") }, new Integer(new Random().nextInt()));
+ new Button("String 5") },
+ new Integer(new Random().nextInt()));
}
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2365.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2365.java
index b9e96c2f37..a69419da21 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2365.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2365.java
@@ -12,8 +12,8 @@ public class Ticket2365 extends LegacyApplication {
@Override
public void init() {
- final LegacyWindow mainWin = new LegacyWindow(getClass()
- .getSimpleName());
+ final LegacyWindow mainWin = new LegacyWindow(
+ getClass().getSimpleName());
setMainWindow(mainWin);
VerticalLayout lo = new VerticalLayout();
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2411.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2411.java
index 6437a1f514..99341b8f7e 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2411.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2411.java
@@ -19,8 +19,8 @@ public class Ticket2411 extends LegacyApplication {
l.setHeight("504px");
for (int i = 1; i <= 5; i++) {
- Button b = new Button("Button " + i
- + " should be 100px or 101px high");
+ Button b = new Button(
+ "Button " + i + " should be 100px or 101px high");
b.setHeight("100%");
l.addComponent(b);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2426.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2426.java
index a80a8464b6..33ce9fe509 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2426.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2426.java
@@ -14,14 +14,15 @@ public class Ticket2426 extends LegacyApplication {
final String content = "<select/>";
- w.addComponent(new Label("CONTENT_DEFAULT: " + content,
- ContentMode.TEXT));
+ w.addComponent(
+ new Label("CONTENT_DEFAULT: " + content, ContentMode.TEXT));
w.addComponent(new Label("CONTENT_PREFORMATTED: " + content,
ContentMode.PREFORMATTED));
w.addComponent(new Label("CONTENT_RAW: " + content, ContentMode.RAW));
w.addComponent(new Label("CONTENT_TEXT: " + content, ContentMode.TEXT));
w.addComponent(new Label("CONTENT_XML: " + content, ContentMode.XML));
- w.addComponent(new Label("CONTENT_XHTML: " + content, ContentMode.HTML));
+ w.addComponent(
+ new Label("CONTENT_XHTML: " + content, ContentMode.HTML));
}
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2431.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2431.java
index 3228dc87ed..66a0f31d13 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2431.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2431.java
@@ -36,7 +36,8 @@ public class Ticket2431 extends LegacyApplication {
}
@Override
- public void handleAction(Action action, Object sender, Object target) {
+ public void handleAction(Action action, Object sender,
+ Object target) {
if (action == a1) {
getMainWindow().addComponent(new Label("CTRL X hit"));
} else {
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2742.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2742.java
index de3659540e..a00c1eb5ee 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2742.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2742.java
@@ -1,5 +1,5 @@
/**
- *
+ *
*/
package com.vaadin.tests.tickets;
@@ -10,13 +10,13 @@ import com.vaadin.ui.NativeSelect;
/**
* @author Risto Yrjänä / Vaadin Ltd.
- *
+ *
*/
public class Ticket2742 extends LegacyApplication {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.Application#init()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2998.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2998.java
index 818a70318e..01d6199dce 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2998.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket2998.java
@@ -33,9 +33,9 @@ import com.vaadin.ui.themes.Reindeer;
/**
* Table layout is very slow in Firefox 3.0.10 when the table contains
* components.
- *
+ *
* This is adapted from the HbnContainer example application WorkoutLog.
- *
+ *
* Other browsers are much faster.
*/
public class Ticket2998 extends LegacyApplication {
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket34.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket34.java
index d095889d6d..11a5900957 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket34.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket34.java
@@ -50,8 +50,8 @@ public class Ticket34 extends LegacyApplication {
private void setView(String string) {
Component component = views.get(string);
if (component == null) {
- getMainWindow().showNotification(
- "View called " + string + " not found!");
+ getMainWindow()
+ .showNotification("View called " + string + " not found!");
} else if (component != currentView) {
if (currentView != null) {
mainLayout.replaceComponent(currentView, component);
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket5952.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket5952.java
index f09fb955a1..f85d1b465e 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket5952.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket5952.java
@@ -14,15 +14,9 @@ public class Ticket5952 extends LegacyApplication {
setMainWindow(mainWindow);
String mathml = "<math mode='display' xmlns='http://www.w3.org/1998/Math/MathML'>"
- + "<mrow>"
- + " <msup>"
- + " <mi>x</mi>"
- + " <mn>2</mn>"
- + " </msup>"
- + " <msup>"
- + " <mi>c</mi>"
- + " <mn>2</mn>"
- + " </msup>"
+ + "<mrow>" + " <msup>" + " <mi>x</mi>"
+ + " <mn>2</mn>" + " </msup>" + " <msup>"
+ + " <mi>c</mi>" + " <mn>2</mn>" + " </msup>"
+ " </mrow>" + "</math>";
Label mathLabel = new Label(mathml, ContentMode.XML);
mainWindow.addComponent(mathLabel);
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket6002.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket6002.java
index abb72e158c..1109cc402c 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket6002.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket6002.java
@@ -18,8 +18,8 @@ public class Ticket6002 extends TestBase {
final VerticalLayout mainLayout = new VerticalLayout();
main.setContent(mainLayout);
- mainLayout.addComponent(new Label(
- "Replace the floating-point values with an integer"));
+ mainLayout.addComponent(
+ new Label("Replace the floating-point values with an integer"));
// ///////////////////////////////////////////////////
// Better working case
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket677.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket677.java
index 44ec3d10da..d1d7f1bd0c 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket677.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket677.java
@@ -50,22 +50,22 @@ public class Ticket677 extends LegacyApplication {
HorizontalLayout l = new HorizontalLayout();
main.addComponent(l);
- l.addComponent(new Button("Toggle root panel",
- new Button.ClickListener() {
+ l.addComponent(
+ new Button("Toggle root panel", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
toggle(root);
}
}));
- l.addComponent(new Button("Toggle panel one",
- new Button.ClickListener() {
+ l.addComponent(
+ new Button("Toggle panel one", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
toggle(one);
}
}));
- l.addComponent(new Button("Toggle panel two",
- new Button.ClickListener() {
+ l.addComponent(
+ new Button("Toggle panel two", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
toggle(two);
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket695.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket695.java
index d5ae9bb09f..5d3fb05b3d 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket695.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket695.java
@@ -32,7 +32,8 @@ public class Ticket695 extends LegacyApplication {
+ (System.currentTimeMillis() - t) + "ms");
} catch (IOException e) {
e.printStackTrace();
- w.showNotification("ApplicationContext serialization failed - see console for stacktrace");
+ w.showNotification(
+ "ApplicationContext serialization failed - see console for stacktrace");
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket736.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket736.java
index 6acd43c312..f0fde192dc 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket736.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket736.java
@@ -64,11 +64,11 @@ public class Ticket736 extends LegacyApplication {
f.setFooter(ol);
// Add some validators for the form
- f.getField("zip").addValidator(
- new IntegerValidator("'{0}' is not a number"));
+ f.getField("zip")
+ .addValidator(new IntegerValidator("'{0}' is not a number"));
((AbstractComponent) f.getField("zip")).setDescription("Jepjep");
- ((AbstractComponent) f.getField("zip")).setIcon(new ThemeResource(
- "../runo/icons/16/folder.png"));
+ ((AbstractComponent) f.getField("zip"))
+ .setIcon(new ThemeResource("../runo/icons/16/folder.png"));
f.getField("state").addValidator(new IsValidState());
f.getField("name").setRequired(true);
f.getField("street").setRequired(true);
diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket846.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket846.java
index adc5663a8a..f3d69136d7 100644
--- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket846.java
+++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket846.java
@@ -33,8 +33,8 @@ public class Ticket846 extends LegacyApplication {
// tx.setIcon(new ThemeResource("icons/16/folder.png"));
- mainWin.addComponent(new Button("Validate integer",
- new Button.ClickListener() {
+ mainWin.addComponent(
+ new Button("Validate integer", new Button.ClickListener() {
@Override
public void buttonClick(
com.vaadin.ui.Button.ClickEvent event) {
diff --git a/uitest/src/main/java/com/vaadin/tests/tooltip/AdjacentElementsWithTooltips.java b/uitest/src/main/java/com/vaadin/tests/tooltip/AdjacentElementsWithTooltips.java
index 60167e43b4..11e26cb6f7 100644
--- a/uitest/src/main/java/com/vaadin/tests/tooltip/AdjacentElementsWithTooltips.java
+++ b/uitest/src/main/java/com/vaadin/tests/tooltip/AdjacentElementsWithTooltips.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.ui.TooltipConfiguration;
/**
* When moving between adjacent elements, the tooltip replace should obey
* quickOpenDelay
- *
+ *
* @author Vaadin Ltd
*/
public class AdjacentElementsWithTooltips extends AbstractTestUI {
@@ -34,7 +34,7 @@ public class AdjacentElementsWithTooltips extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -61,7 +61,7 @@ public class AdjacentElementsWithTooltips extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -71,7 +71,7 @@ public class AdjacentElementsWithTooltips extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/tooltip/DragAndDropWrapperTooltips.java b/uitest/src/main/java/com/vaadin/tests/tooltip/DragAndDropWrapperTooltips.java
index 606a773141..956d05518b 100644
--- a/uitest/src/main/java/com/vaadin/tests/tooltip/DragAndDropWrapperTooltips.java
+++ b/uitest/src/main/java/com/vaadin/tests/tooltip/DragAndDropWrapperTooltips.java
@@ -36,8 +36,8 @@ public class DragAndDropWrapperTooltips extends AbstractTestUI {
l.setWidth("400px");
l.setHeight("100px");
dragAndDropWrapper = new DragAndDropWrapper(cssLayout);
- dragAndDropWrapper
- .setDescription("Tooltip for the wrapper wrapping all the draggable layouts");
+ dragAndDropWrapper.setDescription(
+ "Tooltip for the wrapper wrapping all the draggable layouts");
dragAndDropWrapper.setSizeFull();
l.addComponent(dragAndDropWrapper);
@@ -104,8 +104,8 @@ public class DragAndDropWrapperTooltips extends AbstractTestUI {
}
next = componentIterator.next();
}
- if (dropTargetData.getData("horizontalLocation").equals(
- "LEFT")) {
+ if (dropTargetData.getData("horizontalLocation")
+ .equals("LEFT")) {
index--;
if (index < 0) {
index = 0;
@@ -115,8 +115,8 @@ public class DragAndDropWrapperTooltips extends AbstractTestUI {
cssLayout.removeComponent(sourceComponent);
cssLayout.addComponent(sourceComponent, index);
- dragAndDropWrapper
- .setDescription("Drag was performed and tooltip was changed");
+ dragAndDropWrapper.setDescription(
+ "Drag was performed and tooltip was changed");
}
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/tooltip/MenuBarTooltip.java b/uitest/src/main/java/com/vaadin/tests/tooltip/MenuBarTooltip.java
index ff470336f5..356d431efe 100644
--- a/uitest/src/main/java/com/vaadin/tests/tooltip/MenuBarTooltip.java
+++ b/uitest/src/main/java/com/vaadin/tests/tooltip/MenuBarTooltip.java
@@ -13,10 +13,12 @@ public class MenuBarTooltip extends AbstractTestUI {
MenuBar.MenuItem menuitem = menubar.addItem("Menu item", null, null);
menuitem.setDescription("Menu item description");
- MenuBar.MenuItem submenuitem1 = menuitem.addItem("Submenu item 1", null, null);
+ MenuBar.MenuItem submenuitem1 = menuitem.addItem("Submenu item 1", null,
+ null);
submenuitem1.setDescription("Submenu item 1 description");
- MenuBar.MenuItem submenuitem2 = menuitem.addItem("Submenu item 2", null, null);
+ MenuBar.MenuItem submenuitem2 = menuitem.addItem("Submenu item 2", null,
+ null);
submenuitem2.setDescription("Submenu item 2 description");
addComponent(menubar);
diff --git a/uitest/src/main/java/com/vaadin/tests/tooltip/SliderTooltip.java b/uitest/src/main/java/com/vaadin/tests/tooltip/SliderTooltip.java
index 8cf7232fab..3930bde757 100644
--- a/uitest/src/main/java/com/vaadin/tests/tooltip/SliderTooltip.java
+++ b/uitest/src/main/java/com/vaadin/tests/tooltip/SliderTooltip.java
@@ -8,7 +8,7 @@ public class SliderTooltip extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@@ -21,7 +21,7 @@ public class SliderTooltip extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
@@ -31,7 +31,7 @@ public class SliderTooltip extends AbstractTestUI {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/tooltip/TooltipConfiguration.java b/uitest/src/main/java/com/vaadin/tests/tooltip/TooltipConfiguration.java
index f67db4219f..3d45e4efdf 100644
--- a/uitest/src/main/java/com/vaadin/tests/tooltip/TooltipConfiguration.java
+++ b/uitest/src/main/java/com/vaadin/tests/tooltip/TooltipConfiguration.java
@@ -23,7 +23,8 @@ public class TooltipConfiguration extends AbstractTestUIWithLog {
componentWithShortTooltip.setDescription("This is a short tooltip");
componentWithShortTooltip.setId("shortTooltip");
- NativeButton componentWithLongTooltip = new NativeButton("Long tooltip");
+ NativeButton componentWithLongTooltip = new NativeButton(
+ "Long tooltip");
componentWithLongTooltip.setId("longTooltip");
componentWithLongTooltip.setDescription(LoremIpsum.get(5000));
@@ -68,8 +69,8 @@ public class TooltipConfiguration extends AbstractTestUIWithLog {
@Override
public void valueChange(ValueChangeEvent event) {
if (quickOpenDelay.getConvertedValue() != null) {
- getTooltipConfiguration().setQuickOpenDelay(
- (Integer) quickOpenDelay
+ getTooltipConfiguration()
+ .setQuickOpenDelay((Integer) quickOpenDelay
.getConvertedValue());
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/tooltip/TooltipWidthUpdating.java b/uitest/src/main/java/com/vaadin/tests/tooltip/TooltipWidthUpdating.java
index c5e49d1af3..3c189204ab 100644
--- a/uitest/src/main/java/com/vaadin/tests/tooltip/TooltipWidthUpdating.java
+++ b/uitest/src/main/java/com/vaadin/tests/tooltip/TooltipWidthUpdating.java
@@ -10,7 +10,7 @@ import com.vaadin.ui.VerticalLayout;
/**
* Test to see if the width of the tooltip element is updated if a narrower
* tooltip is opened to replace a tooltip with wider content.
- *
+ *
* @author Vaadin Ltd
*/
public class TooltipWidthUpdating extends AbstractTestUI {
@@ -30,7 +30,8 @@ public class TooltipWidthUpdating extends AbstractTestUI {
getTooltipConfiguration().setMaxWidth(MAX_WIDTH);
getTooltipConfiguration().setCloseTimeout(200);
- NativeButton componentWithLongTooltip = new NativeButton("Long tooltip");
+ NativeButton componentWithLongTooltip = new NativeButton(
+ "Long tooltip");
componentWithLongTooltip.setId("longTooltip");
componentWithLongTooltip.setDescription(LONG_TOOLTIP_TEXT);
diff --git a/uitest/src/main/java/com/vaadin/tests/urifragments/FragmentHandlingAndAsynchUIUpdate.java b/uitest/src/main/java/com/vaadin/tests/urifragments/FragmentHandlingAndAsynchUIUpdate.java
index 9cd2929ca6..b808a3d973 100644
--- a/uitest/src/main/java/com/vaadin/tests/urifragments/FragmentHandlingAndAsynchUIUpdate.java
+++ b/uitest/src/main/java/com/vaadin/tests/urifragments/FragmentHandlingAndAsynchUIUpdate.java
@@ -52,7 +52,8 @@ public class FragmentHandlingAndAsynchUIUpdate extends AbstractTestUIWithLog {
return new UriFragmentChangedListener() {
@Override
- public void uriFragmentChanged(final UriFragmentChangedEvent event) {
+ public void uriFragmentChanged(
+ final UriFragmentChangedEvent event) {
log(String.format("uriFragmentChanged %s",
event.getUriFragment()));
@@ -81,8 +82,8 @@ public class FragmentHandlingAndAsynchUIUpdate extends AbstractTestUIWithLog {
createThread(frag, fragLabel).start();
- fragLabel.setCaption(String.format("Thread running for %s!",
- frag));
+ fragLabel.setCaption(
+ String.format("Thread running for %s!", frag));
UI.getCurrent().setPollInterval(1000);
}
};
@@ -113,9 +114,9 @@ public class FragmentHandlingAndAsynchUIUpdate extends AbstractTestUIWithLog {
"setCaption in synch mode for fragment %s",
frag));
java.util.Random rand = new java.util.Random();
- fragLabel.setCaption(String.format(
- "Thread finished on %s (%s)", frag,
- rand.nextInt()));
+ fragLabel.setCaption(
+ String.format("Thread finished on %s (%s)",
+ frag, rand.nextInt()));
}
});
diff --git a/uitest/src/main/java/com/vaadin/tests/util/LargeContainer.java b/uitest/src/main/java/com/vaadin/tests/util/LargeContainer.java
index a6430ec0c2..8a925e9842 100644
--- a/uitest/src/main/java/com/vaadin/tests/util/LargeContainer.java
+++ b/uitest/src/main/java/com/vaadin/tests/util/LargeContainer.java
@@ -12,8 +12,8 @@ import com.vaadin.data.Property;
import com.vaadin.data.util.AbstractContainer;
import com.vaadin.data.util.ObjectProperty;
-public class LargeContainer extends AbstractContainer implements
- Container.Indexed {
+public class LargeContainer extends AbstractContainer
+ implements Container.Indexed {
public class TestItem implements Item {
diff --git a/uitest/src/main/java/com/vaadin/tests/util/LogPrintWriter.java b/uitest/src/main/java/com/vaadin/tests/util/LogPrintWriter.java
index 1ec6f02ac9..2d11a94598 100644
--- a/uitest/src/main/java/com/vaadin/tests/util/LogPrintWriter.java
+++ b/uitest/src/main/java/com/vaadin/tests/util/LogPrintWriter.java
@@ -5,7 +5,7 @@ import java.io.Writer;
/**
* Use for collecting HTTP response.
- *
+ *
*/
public class LogPrintWriter extends PrintWriter {
diff --git a/uitest/src/main/java/com/vaadin/tests/util/Person.java b/uitest/src/main/java/com/vaadin/tests/util/Person.java
index eca7b0bed8..0f57b3375e 100644
--- a/uitest/src/main/java/com/vaadin/tests/util/Person.java
+++ b/uitest/src/main/java/com/vaadin/tests/util/Person.java
@@ -86,7 +86,7 @@ public class Person implements Serializable {
/**
* Returns the address where the person lives.
- *
+ *
* @return address (not null)
*/
public Address getAddress() {
diff --git a/uitest/src/main/java/com/vaadin/tests/util/PersonContainer.java b/uitest/src/main/java/com/vaadin/tests/util/PersonContainer.java
index 709086be29..2f0e4f0d6f 100644
--- a/uitest/src/main/java/com/vaadin/tests/util/PersonContainer.java
+++ b/uitest/src/main/java/com/vaadin/tests/util/PersonContainer.java
@@ -6,15 +6,15 @@ import java.util.Random;
import com.vaadin.data.util.BeanItemContainer;
@SuppressWarnings("serial")
-public class PersonContainer extends BeanItemContainer<Person> implements
- Serializable {
+public class PersonContainer extends BeanItemContainer<Person>
+ implements Serializable {
/**
* Natural property order for Person bean. Used in tables and forms.
*/
- public static final Object[] NATURAL_COL_ORDER = new Object[] {
- "firstName", "lastName", "email", "phoneNumber",
- "address.streetAddress", "address.postalCode", "address.city" };
+ public static final Object[] NATURAL_COL_ORDER = new Object[] { "firstName",
+ "lastName", "email", "phoneNumber", "address.streetAddress",
+ "address.postalCode", "address.city" };
/**
* "Human readable" captions for properties in same order as in
@@ -49,8 +49,8 @@ public class PersonContainer extends BeanItemContainer<Person> implements
p.setPhoneNumber(TestDataGenerator.getPhoneNumber(r));
p.getAddress().setPostalCode(TestDataGenerator.getPostalCode(r));
- p.getAddress().setStreetAddress(
- TestDataGenerator.getStreetAddress(r));
+ p.getAddress()
+ .setStreetAddress(TestDataGenerator.getStreetAddress(r));
c.addItem(p);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/util/ResizeTerrorizer.java b/uitest/src/main/java/com/vaadin/tests/util/ResizeTerrorizer.java
index 679baa0d26..965390d93e 100644
--- a/uitest/src/main/java/com/vaadin/tests/util/ResizeTerrorizer.java
+++ b/uitest/src/main/java/com/vaadin/tests/util/ResizeTerrorizer.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,8 +23,8 @@ import com.vaadin.ui.VerticalLayout;
public class ResizeTerrorizer extends VerticalLayout {
private final ResizeTerrorizerControl control;
- public class ResizeTerrorizerControl extends AbstractComponent implements
- Component {
+ public class ResizeTerrorizerControl extends AbstractComponent
+ implements Component {
public ResizeTerrorizerControl(Component target) {
getState().target = target;
diff --git a/uitest/src/main/java/com/vaadin/tests/util/Role.java b/uitest/src/main/java/com/vaadin/tests/util/Role.java
index 83f63db4ab..5f7d7680fd 100644
--- a/uitest/src/main/java/com/vaadin/tests/util/Role.java
+++ b/uitest/src/main/java/com/vaadin/tests/util/Role.java
@@ -27,7 +27,7 @@ public class Role implements Serializable {
* In this direction, the users for a role can be queried and the returned
* collection modified, but the whole collection of users cannot be set
* directly.
- *
+ *
* @return set of users having the role (not null)
*/
public Set<User> getUsers() {
diff --git a/uitest/src/main/java/com/vaadin/tests/util/SampleDirectory.java b/uitest/src/main/java/com/vaadin/tests/util/SampleDirectory.java
index a4829334a5..0d482c35d1 100644
--- a/uitest/src/main/java/com/vaadin/tests/util/SampleDirectory.java
+++ b/uitest/src/main/java/com/vaadin/tests/util/SampleDirectory.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,19 +31,20 @@ import com.vaadin.ui.VerticalLayout;
* Provides sample directory based on application directory. If this fails then
* sampleDirectory property is read. If no sample directory is resolved, then a
* panel displaying error message is added to main window.
- *
+ *
* @author Vaadin Ltd.
- *
+ *
*/
public class SampleDirectory {
/**
* Get sample directory.
- *
+ *
* @param application
* @return file pointing to sample directory
*/
- public static File getDirectory(VaadinSession application, LegacyWindow uI) {
+ public static File getDirectory(VaadinSession application,
+ LegacyWindow uI) {
String errorMessage = "Access to application "
+ "context base directory failed, "
+ "possible security constraint with Application "
@@ -82,8 +83,8 @@ public class SampleDirectory {
final Panel errorPanel = new Panel("Demo application error",
errorLayout);
errorPanel.setStyleName("strong");
- errorPanel.setComponentError(new SystemError(
- "Cannot provide sample directory"));
+ errorPanel.setComponentError(
+ new SystemError("Cannot provide sample directory"));
errorLayout.addComponent(new Label(errorMessage, ContentMode.HTML));
// Remove all components from applications main window
uI.removeAllComponents();
diff --git a/uitest/src/main/java/com/vaadin/tests/util/TestDataGenerator.java b/uitest/src/main/java/com/vaadin/tests/util/TestDataGenerator.java
index 8becb709f0..81ba2e3be1 100644
--- a/uitest/src/main/java/com/vaadin/tests/util/TestDataGenerator.java
+++ b/uitest/src/main/java/com/vaadin/tests/util/TestDataGenerator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,8 +29,8 @@ public class TestDataGenerator {
"Olivia", "Nina", "Alex", "Rita", "Dan", "Umberto", "Henrik",
"Rene", "Lisa", "Marge" };
final static String[] lnames = { "Smith", "Gordon", "Simpson", "Brown",
- "Clavel", "Simons", "Verne", "Scott", "Allison", "Gates",
- "Rowling", "Barks", "Ross", "Schneider", "Tate" };
+ "Clavel", "Simons", "Verne", "Scott", "Allison", "Gates", "Rowling",
+ "Barks", "Ross", "Schneider", "Tate" };
final static String cities[] = { "Amsterdam", "Berlin", "Helsinki",
"Hong Kong", "London", "Luxemburg", "New York", "Oslo", "Paris",
"Rome", "Stockholm", "Tokyo", "Turku" };
diff --git a/uitest/src/main/java/com/vaadin/tests/util/TestUtils.java b/uitest/src/main/java/com/vaadin/tests/util/TestUtils.java
index 5c6315a23a..86a7c4d852 100644
--- a/uitest/src/main/java/com/vaadin/tests/util/TestUtils.java
+++ b/uitest/src/main/java/com/vaadin/tests/util/TestUtils.java
@@ -13,21 +13,21 @@ public class TestUtils {
private static final String[] iso3166 = new String[] { "AFGHANISTAN", "AF",
"ÅLAND ISLANDS", "AX", "ALBANIA", "AL", "ALGERIA", "DZ",
- "AMERICAN SAMOA", "AS", "ANDORRA", "AD", "ANGOLA", "AO",
- "ANGUILLA", "AI", "ANTARCTICA", "AQ", "ANTIGUA AND BARBUDA", "AG",
- "ARGENTINA", "AR", "ARMENIA", "AM", "ARUBA", "AW", "AUSTRALIA",
- "AU", "AUSTRIA", "AT", "AZERBAIJAN", "AZ", "BAHAMAS", "BS",
- "BAHRAIN", "BH", "BANGLADESH", "BD", "BARBADOS", "BB", "BELARUS",
- "BY", "BELGIUM", "BE", "BELIZE", "BZ", "BENIN", "BJ", "BERMUDA",
- "BM", "BHUTAN", "BT", "BOLIVIA", "BO", "BOSNIA AND HERZEGOVINA",
- "BA", "BOTSWANA", "BW", "BOUVET ISLAND", "BV", "BRAZIL", "BR",
+ "AMERICAN SAMOA", "AS", "ANDORRA", "AD", "ANGOLA", "AO", "ANGUILLA",
+ "AI", "ANTARCTICA", "AQ", "ANTIGUA AND BARBUDA", "AG", "ARGENTINA",
+ "AR", "ARMENIA", "AM", "ARUBA", "AW", "AUSTRALIA", "AU", "AUSTRIA",
+ "AT", "AZERBAIJAN", "AZ", "BAHAMAS", "BS", "BAHRAIN", "BH",
+ "BANGLADESH", "BD", "BARBADOS", "BB", "BELARUS", "BY", "BELGIUM",
+ "BE", "BELIZE", "BZ", "BENIN", "BJ", "BERMUDA", "BM", "BHUTAN",
+ "BT", "BOLIVIA", "BO", "BOSNIA AND HERZEGOVINA", "BA", "BOTSWANA",
+ "BW", "BOUVET ISLAND", "BV", "BRAZIL", "BR",
"BRITISH INDIAN OCEAN TERRITORY", "IO", "BRUNEI DARUSSALAM", "BN",
- "BULGARIA", "BG", "BURKINA FASO", "BF", "BURUNDI", "BI",
- "CAMBODIA", "KH", "CAMEROON", "CM", "CANADA", "CA", "CAPE VERDE",
- "CV", "CAYMAN ISLANDS", "KY", "CENTRAL AFRICAN REPUBLIC", "CF",
- "CHAD", "TD", "CHILE", "CL", "CHINA", "CN", "CHRISTMAS ISLAND",
- "CX", "COCOS (KEELING) ISLANDS", "CC", "COLOMBIA", "CO", "COMOROS",
- "KM", "CONGO", "CG", "CONGO, THE DEMOCRATIC REPUBLIC OF THE", "CD",
+ "BULGARIA", "BG", "BURKINA FASO", "BF", "BURUNDI", "BI", "CAMBODIA",
+ "KH", "CAMEROON", "CM", "CANADA", "CA", "CAPE VERDE", "CV",
+ "CAYMAN ISLANDS", "KY", "CENTRAL AFRICAN REPUBLIC", "CF", "CHAD",
+ "TD", "CHILE", "CL", "CHINA", "CN", "CHRISTMAS ISLAND", "CX",
+ "COCOS (KEELING) ISLANDS", "CC", "COLOMBIA", "CO", "COMOROS", "KM",
+ "CONGO", "CG", "CONGO, THE DEMOCRATIC REPUBLIC OF THE", "CD",
"COOK ISLANDS", "CK", "COSTA RICA", "CR", "CÔTE D'IVOIRE", "CI",
"CROATIA", "HR", "CUBA", "CU", "CYPRUS", "CY", "CZECH REPUBLIC",
"CZ", "DENMARK", "DK", "DJIBOUTI", "DJ", "DOMINICA", "DM",
@@ -45,28 +45,27 @@ public class TestUtils {
"HOLY SEE (VATICAN CITY STATE)", "VA", "HONDURAS", "HN",
"HONG KONG", "HK", "HUNGARY", "HU", "ICELAND", "IS", "INDIA", "IN",
"INDONESIA", "ID", "IRAN, ISLAMIC REPUBLIC OF", "IR", "IRAQ", "IQ",
- "IRELAND", "IE", "ISLE OF MAN", "IM", "ISRAEL", "IL", "ITALY",
- "IT", "JAMAICA", "JM", "JAPAN", "JP", "JERSEY", "JE", "JORDAN",
- "JO", "KAZAKHSTAN", "KZ", "KENYA", "KE", "KIRIBATI", "KI",
+ "IRELAND", "IE", "ISLE OF MAN", "IM", "ISRAEL", "IL", "ITALY", "IT",
+ "JAMAICA", "JM", "JAPAN", "JP", "JERSEY", "JE", "JORDAN", "JO",
+ "KAZAKHSTAN", "KZ", "KENYA", "KE", "KIRIBATI", "KI",
"KOREA, DEMOCRATIC PEOPLE'S REPUBLIC OF", "KP",
"KOREA, REPUBLIC OF", "KR", "KUWAIT", "KW", "KYRGYZSTAN", "KG",
- "LAO PEOPLE'S DEMOCRATIC REPUBLIC", "LA", "LATVIA", "LV",
- "LEBANON", "LB", "LESOTHO", "LS", "LIBERIA", "LR",
- "LIBYAN ARAB JAMAHIRIYA", "LY", "LIECHTENSTEIN", "LI", "LITHUANIA",
- "LT", "LUXEMBOURG", "LU", "MACAO", "MO",
- "MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF", "MK", "MADAGASCAR",
- "MG", "MALAWI", "MW", "MALAYSIA", "MY", "MALDIVES", "MV", "MALI",
- "ML", "MALTA", "MT", "MARSHALL ISLANDS", "MH", "MARTINIQUE", "MQ",
- "MAURITANIA", "MR", "MAURITIUS", "MU", "MAYOTTE", "YT", "MEXICO",
- "MX", "MICRONESIA, FEDERATED STATES OF", "FM",
- "MOLDOVA, REPUBLIC OF", "MD", "MONACO", "MC", "MONGOLIA", "MN",
- "MONTENEGRO", "ME", "MONTSERRAT", "MS", "MOROCCO", "MA",
- "MOZAMBIQUE", "MZ", "MYANMAR", "MM", "NAMIBIA", "NA", "NAURU",
- "NR", "NEPAL", "NP", "NETHERLANDS", "NL", "NETHERLANDS ANTILLES",
- "AN", "NEW CALEDONIA", "NC", "NEW ZEALAND", "NZ", "NICARAGUA",
- "NI", "NIGER", "NE", "NIGERIA", "NG", "NIUE", "NU",
- "NORFOLK ISLAND", "NF", "NORTHERN MARIANA ISLANDS", "MP", "NORWAY",
- "NO", "OMAN", "OM", "PAKISTAN", "PK", "PALAU", "PW",
+ "LAO PEOPLE'S DEMOCRATIC REPUBLIC", "LA", "LATVIA", "LV", "LEBANON",
+ "LB", "LESOTHO", "LS", "LIBERIA", "LR", "LIBYAN ARAB JAMAHIRIYA",
+ "LY", "LIECHTENSTEIN", "LI", "LITHUANIA", "LT", "LUXEMBOURG", "LU",
+ "MACAO", "MO", "MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF", "MK",
+ "MADAGASCAR", "MG", "MALAWI", "MW", "MALAYSIA", "MY", "MALDIVES",
+ "MV", "MALI", "ML", "MALTA", "MT", "MARSHALL ISLANDS", "MH",
+ "MARTINIQUE", "MQ", "MAURITANIA", "MR", "MAURITIUS", "MU",
+ "MAYOTTE", "YT", "MEXICO", "MX", "MICRONESIA, FEDERATED STATES OF",
+ "FM", "MOLDOVA, REPUBLIC OF", "MD", "MONACO", "MC", "MONGOLIA",
+ "MN", "MONTENEGRO", "ME", "MONTSERRAT", "MS", "MOROCCO", "MA",
+ "MOZAMBIQUE", "MZ", "MYANMAR", "MM", "NAMIBIA", "NA", "NAURU", "NR",
+ "NEPAL", "NP", "NETHERLANDS", "NL", "NETHERLANDS ANTILLES", "AN",
+ "NEW CALEDONIA", "NC", "NEW ZEALAND", "NZ", "NICARAGUA", "NI",
+ "NIGER", "NE", "NIGERIA", "NG", "NIUE", "NU", "NORFOLK ISLAND",
+ "NF", "NORTHERN MARIANA ISLANDS", "MP", "NORWAY", "NO", "OMAN",
+ "OM", "PAKISTAN", "PK", "PALAU", "PW",
"PALESTINIAN TERRITORY, OCCUPIED", "PS", "PANAMA", "PA",
"PAPUA NEW GUINEA", "PG", "PARAGUAY", "PY", "PERU", "PE",
"PHILIPPINES", "PH", "PITCAIRN", "PN", "POLAND", "PL", "PORTUGAL",
@@ -81,8 +80,8 @@ public class TestUtils {
"SIERRA LEONE", "SL", "SINGAPORE", "SG", "SLOVAKIA", "SK",
"SLOVENIA", "SI", "SOLOMON ISLANDS", "SB", "SOMALIA", "SO",
"SOUTH AFRICA", "ZA",
- "SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS", "GS", "SPAIN",
- "ES", "SRI LANKA", "LK", "SUDAN", "SD", "SURINAME", "SR",
+ "SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS", "GS", "SPAIN", "ES",
+ "SRI LANKA", "LK", "SUDAN", "SD", "SURINAME", "SR",
"SVALBARD AND JAN MAYEN", "SJ", "SWAZILAND", "SZ", "SWEDEN", "SE",
"SWITZERLAND", "CH", "SYRIAN ARAB REPUBLIC", "SY",
"TAIWAN, PROVINCE OF CHINA", "TW", "TAJIKISTAN", "TJ",
@@ -90,24 +89,23 @@ public class TestUtils {
"TIMOR-LESTE", "TL", "TOGO", "TG", "TOKELAU", "TK", "TONGA", "TO",
"TRINIDAD AND TOBAGO", "TT", "TUNISIA", "TN", "TURKEY", "TR",
"TURKMENISTAN", "TM", "TURKS AND CAICOS ISLANDS", "TC", "TUVALU",
- "TV", "UGANDA", "UG", "UKRAINE", "UA", "UNITED ARAB EMIRATES",
- "AE", "UNITED KINGDOM", "GB", "UNITED STATES", "US",
+ "TV", "UGANDA", "UG", "UKRAINE", "UA", "UNITED ARAB EMIRATES", "AE",
+ "UNITED KINGDOM", "GB", "UNITED STATES", "US",
"UNITED STATES MINOR OUTLYING ISLANDS", "UM", "URUGUAY", "UY",
"UZBEKISTAN", "UZ", "VANUATU", "VU", "VENEZUELA", "VE", "VIET NAM",
- "VN", "VIRGIN ISLANDS, BRITISH", "VG", "VIRGIN ISLANDS, U.S.",
- "VI", "WALLIS AND FUTUNA", "WF", "WESTERN SAHARA", "EH", "YEMEN",
- "YE", "ZAMBIA", "ZM", "ZIMBABWE", "ZW" };
+ "VN", "VIRGIN ISLANDS, BRITISH", "VG", "VIRGIN ISLANDS, U.S.", "VI",
+ "WALLIS AND FUTUNA", "WF", "WESTERN SAHARA", "EH", "YEMEN", "YE",
+ "ZAMBIA", "ZM", "ZIMBABWE", "ZW" };
/**
* Crossbrowser hack to dynamically add css current window. Can be used to
* keep tests css in source files.
- *
+ *
* @param cssString
*/
public static void injectCSS(UI w, String cssString) {
String script = "if ('\\v'=='v') /* ie only */ {\n"
- + " document.createStyleSheet().cssText = '"
- + cssString
+ + " document.createStyleSheet().cssText = '" + cssString
+ "';\n"
+ " } else {var tag = document.createElement('style'); tag.type = 'text/css';"
+ " document.getElementsByTagName('head')[0].appendChild(tag);tag[ (typeof "
@@ -133,10 +131,9 @@ public class TestUtils {
public static void reportPerformance(String topic, int serverLimit,
int clientLimit, boolean bootstrapTime) {
- JavaScript
- .eval("window.reportVaadinPerformance(\"" + topic + "\", "
- + serverLimit + ", " + clientLimit + ","
- + bootstrapTime + ");");
+ JavaScript.eval("window.reportVaadinPerformance(\"" + topic + "\", "
+ + serverLimit + ", " + clientLimit + "," + bootstrapTime
+ + ");");
}
public static IndexedContainer getISO3166Container() {
diff --git a/uitest/src/main/java/com/vaadin/tests/util/User.java b/uitest/src/main/java/com/vaadin/tests/util/User.java
index 003f485017..c5de9a3e46 100644
--- a/uitest/src/main/java/com/vaadin/tests/util/User.java
+++ b/uitest/src/main/java/com/vaadin/tests/util/User.java
@@ -27,7 +27,7 @@ public class User implements Serializable {
/**
* Returns an unmodifiable set of roles. To modify the roles a user has,
* replace the whole set using {@link #setRoles(Set)}.
- *
+ *
* @return set of roles (unmodifiable, not null)
*/
public Set<Role> getRoles() {
@@ -37,7 +37,7 @@ public class User implements Serializable {
/**
* Replaces the set of roles with another collection. User references in
* roles are automatically updated when setting the roles of a user.
- *
+ *
* @param roles
* non-null set of roles
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/vaadincontext/BootstrapModifyUI.java b/uitest/src/main/java/com/vaadin/tests/vaadincontext/BootstrapModifyUI.java
index 3849268bf7..0e5d1c7d40 100644
--- a/uitest/src/main/java/com/vaadin/tests/vaadincontext/BootstrapModifyUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/vaadincontext/BootstrapModifyUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -47,7 +47,8 @@ public class BootstrapModifyUI extends AbstractTestUI {
}
});
addComponent(c);
- c.setEnabled(getSession().getAttribute(INSTALLED_ATRIBUTE_NAME) == null);
+ c.setEnabled(
+ getSession().getAttribute(INSTALLED_ATRIBUTE_NAME) == null);
}
private static BootstrapListener createBootstrapListener() {
diff --git a/uitest/src/main/java/com/vaadin/tests/validation/EmptyFieldErrorIndicators.java b/uitest/src/main/java/com/vaadin/tests/validation/EmptyFieldErrorIndicators.java
index 11f98eb888..9aaf534833 100644
--- a/uitest/src/main/java/com/vaadin/tests/validation/EmptyFieldErrorIndicators.java
+++ b/uitest/src/main/java/com/vaadin/tests/validation/EmptyFieldErrorIndicators.java
@@ -35,8 +35,8 @@ public class EmptyFieldErrorIndicators extends TestBase {
part1.setId("emptyFieldPart");
hl.addComponent(part1);
- Panel part2 = createPart(
- "Empty required fields with failing validator", true, true);
+ Panel part2 = createPart("Empty required fields with failing validator",
+ true, true);
part1.setId("validatedFieldPart");
hl.addComponent(part2);
@@ -75,7 +75,8 @@ public class EmptyFieldErrorIndicators extends TestBase {
return panel;
}
- private Form createForm(final boolean required, final boolean failValidator) {
+ private Form createForm(final boolean required,
+ final boolean failValidator) {
// hand-crafted form, not using form field factory
final Form form = new Form() {
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/validation/FieldErrorIndication.java b/uitest/src/main/java/com/vaadin/tests/validation/FieldErrorIndication.java
index 3135ce0592..99a95c407f 100644
--- a/uitest/src/main/java/com/vaadin/tests/validation/FieldErrorIndication.java
+++ b/uitest/src/main/java/com/vaadin/tests/validation/FieldErrorIndication.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/validation/TestValidators.java b/uitest/src/main/java/com/vaadin/tests/validation/TestValidators.java
index 746a460da8..65a6ed20df 100644
--- a/uitest/src/main/java/com/vaadin/tests/validation/TestValidators.java
+++ b/uitest/src/main/java/com/vaadin/tests/validation/TestValidators.java
@@ -37,7 +37,8 @@ public class TestValidators extends TestBase {
// simple validators
TextField tf = new TextField("A field, must contain 1-2 chars");
- tf.addValidator(new StringLengthValidator("Invalid length", 1, 2, false));
+ tf.addValidator(
+ new StringLengthValidator("Invalid length", 1, 2, false));
tf.setRequired(true);
tf.setValue("ab");
form.addField("a", tf);
@@ -67,7 +68,8 @@ public class TestValidators extends TestBase {
// regular expressions
- tf = new TextField("A field, must match the regular expression a.*b.*c");
+ tf = new TextField(
+ "A field, must match the regular expression a.*b.*c");
tf.addValidator(new RegexpValidator("a.*b.*c",
"{0} does not match the regular expression"));
tf.setValue("aagsabeqgc");
@@ -100,9 +102,10 @@ public class TestValidators extends TestBase {
CompositeValidator cv = new CompositeValidator(CombinationMode.AND,
"The field must contain a floating point number with 4-5 characters");
cv.addValidator(new StringLengthValidator(
- "String length of '{0}' should be 4-5 characters", 4, 5, false));
- cv.addValidator(new DoubleValidator(
- "{0} must be a floating point number"));
+ "String length of '{0}' should be 4-5 characters", 4, 5,
+ false));
+ cv.addValidator(
+ new DoubleValidator("{0} must be a floating point number"));
tf.addValidator(cv);
tf.setValue("12.34");
form.addField("j", tf);
@@ -112,9 +115,10 @@ public class TestValidators extends TestBase {
cv = new CompositeValidator(CombinationMode.OR,
"The field must contain a floating point or with 4-5 characters");
cv.addValidator(new StringLengthValidator(
- "String length of '{0}' should be 4-5 characters", 4, 5, false));
- cv.addValidator(new DoubleValidator(
- "{0} must be a floating point number"));
+ "String length of '{0}' should be 4-5 characters", 4, 5,
+ false));
+ cv.addValidator(
+ new DoubleValidator("{0} must be a floating point number"));
tf.addValidator(cv);
tf.setValue("12.34g");
form.addField("jb", tf);
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/TestingWidgetSet.java b/uitest/src/main/java/com/vaadin/tests/widgetset/TestingWidgetSet.java
index 1c04c57526..2019d66f02 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/TestingWidgetSet.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/TestingWidgetSet.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/AbstractSuperclassForBean.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/AbstractSuperclassForBean.java
index 0ea19bd965..bfffeab3c8 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/AbstractSuperclassForBean.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/AbstractSuperclassForBean.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/BasicExtensionTestConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/BasicExtensionTestConnector.java
index 86c918536f..26d8310dae 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/BasicExtensionTestConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/BasicExtensionTestConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/BeanWithAbstractSuperclass.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/BeanWithAbstractSuperclass.java
index a3530f19e9..82448bcb1c 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/BeanWithAbstractSuperclass.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/BeanWithAbstractSuperclass.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/ClientRpcClassConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/ClientRpcClassConnector.java
index f4d226bb03..d8d6fd0126 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/ClientRpcClassConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/ClientRpcClassConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/ClientRpcClassWidget.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/ClientRpcClassWidget.java
index c922259fae..1d2c394c99 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/ClientRpcClassWidget.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/ClientRpcClassWidget.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/ComplexTestBean.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/ComplexTestBean.java
index 0d6a1292e2..9895cc1e7d 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/ComplexTestBean.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/ComplexTestBean.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,8 +31,7 @@ public class ComplexTestBean extends SharedState {
// Default
}
- public ComplexTestBean(SimpleTestBean innerBean1,
- SimpleTestBean innerBean2,
+ public ComplexTestBean(SimpleTestBean innerBean1, SimpleTestBean innerBean2,
List<SimpleTestBean> innerBeanCollection, int privimite) {
this.innerBean1 = innerBean1;
this.innerBean2 = innerBean2;
@@ -60,7 +59,8 @@ public class ComplexTestBean extends SharedState {
return innerBeanCollection;
}
- public void setInnerBeanCollection(List<SimpleTestBean> innerBeanCollection) {
+ public void setInnerBeanCollection(
+ List<SimpleTestBean> innerBeanCollection) {
this.innerBeanCollection = innerBeanCollection;
}
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/CustomUIConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/CustomUIConnector.java
index 7a93f5e360..63ff05ef4e 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/CustomUIConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/CustomUIConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/CustomUIConnectorRpc.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/CustomUIConnectorRpc.java
index d905daeea6..907e58de27 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/CustomUIConnectorRpc.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/CustomUIConnectorRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/DelegateConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/DelegateConnector.java
index f25a33225c..aca8c5acef 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/DelegateConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/DelegateConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/DelegateState.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/DelegateState.java
index c188e655ba..2116f95cc6 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/DelegateState.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/DelegateState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/DelegateWidget.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/DelegateWidget.java
index 498180cb96..02a23a90b0 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/DelegateWidget.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/DelegateWidget.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/DelegateWithoutStateClassConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/DelegateWithoutStateClassConnector.java
index 0808abf09a..f893f57541 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/DelegateWithoutStateClassConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/DelegateWithoutStateClassConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/DummyLabelConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/DummyLabelConnector.java
index 43400ada60..f6ff113b91 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/DummyLabelConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/DummyLabelConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.tests.widgetset.server.DummyLabel;
/**
* Dummy connector just to cause {@link LabelState} to be used to test #8683
- *
+ *
* @author Vaadin Ltd
* @version @VERSION@
* @since 7.0.0
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/EncoderResultDisplayConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/EncoderResultDisplayConnector.java
index f2e9710404..d7e7a6c605 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/EncoderResultDisplayConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/EncoderResultDisplayConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -51,11 +51,9 @@ public class EncoderResultDisplayConnector extends AbstractExtensionConnector {
reportEncode(Double.valueOf("2.2"));
reportEncode(new String[] { "One", "Two" });
- reportEncode(
- "List",
- Arrays.asList("Three", "Four"),
- new Type(List.class.getName(), new Type[] { TypeData
- .getType(String.class) }));
+ reportEncode("List", Arrays.asList("Three", "Four"),
+ new Type(List.class.getName(),
+ new Type[] { TypeData.getType(String.class) }));
reportEncode(new SimpleTestBean(5));
reportEncode(Void.class.getSimpleName(), null,
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/GenericWidget.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/GenericWidget.java
index 142fdd2e52..c038864a2a 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/GenericWidget.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/GenericWidget.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/GenericWidgetConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/GenericWidgetConnector.java
index 35d071a6df..34948dbdf2 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/GenericWidgetConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/GenericWidgetConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/GenericWidgetState.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/GenericWidgetState.java
index 4b1f6c4c7a..914e374cdd 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/GenericWidgetState.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/GenericWidgetState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/IdTestLabelConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/IdTestLabelConnector.java
index 5683ef03c6..7a165d2dfa 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/IdTestLabelConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/IdTestLabelConnector.java
@@ -6,7 +6,7 @@ import com.vaadin.shared.ui.Connect;
/**
* Connects server-side <code>IdTestLabel</code> component to client-side
* {@link VIdTestLabel} component (#10179).
- *
+ *
*/
@Connect(com.vaadin.tests.widgetset.server.IdTestLabel.class)
public class IdTestLabelConnector extends LabelConnector {
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/IntermediateReplaceConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/IntermediateReplaceConnector.java
index 7f2b5a9a93..bd02595ee5 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/IntermediateReplaceConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/IntermediateReplaceConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2012 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,8 +24,7 @@ public class IntermediateReplaceConnector extends ReplacedConnector {
@Override
protected void init() {
super.init();
- getWidget().setHTML(
- IntermediateReplaceConnector.class.getName()
- + ", should not be used");
+ getWidget().setHTML(IntermediateReplaceConnector.class.getName()
+ + ", should not be used");
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/LabelState.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/LabelState.java
index 7f8468b215..e961968d40 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/LabelState.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/LabelState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ import com.vaadin.shared.AbstractComponentState;
/**
* State class with the same simple name as
* {@link com.vaadin.shared.ui.label.LabelState} to test #8683
- *
+ *
* @author Vaadin Ltd
* @version @VERSION@
* @since 7.0.0
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/LayoutDetectorConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/LayoutDetectorConnector.java
index e999c83b75..23c6588803 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/LayoutDetectorConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/LayoutDetectorConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -53,9 +53,8 @@ public class LayoutDetectorConnector extends AbstractComponentConnector
}
private void updateText() {
- getWidget().setHTML(
- "Layout count: <span id='layoutCount'>" + layoutCount
- + "</span><br />RPC count: <span id='rpcCount'>"
- + rpcCount + "</span>");
+ getWidget().setHTML("Layout count: <span id='layoutCount'>"
+ + layoutCount + "</span><br />RPC count: <span id='rpcCount'>"
+ + rpcCount + "</span>");
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/LayoutDuringStateUpdateConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/LayoutDuringStateUpdateConnector.java
index 799fe9ebee..601339d6db 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/LayoutDuringStateUpdateConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/LayoutDuringStateUpdateConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,8 +23,8 @@ import com.vaadin.shared.ui.Connect;
import com.vaadin.tests.widgetset.server.LayoutDuringStateUpdateComponent;
@Connect(LayoutDuringStateUpdateComponent.class)
-public class LayoutDuringStateUpdateConnector extends
- AbstractComponentConnector implements PostLayoutListener {
+public class LayoutDuringStateUpdateConnector extends AbstractComponentConnector
+ implements PostLayoutListener {
private int layoutCount = 0;
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/LayoutMemoryUsageIE8ExtensionConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/LayoutMemoryUsageIE8ExtensionConnector.java
index 718706da97..408c14b9cc 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/LayoutMemoryUsageIE8ExtensionConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/LayoutMemoryUsageIE8ExtensionConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,8 +24,8 @@ import com.vaadin.shared.ui.Connect;
import com.vaadin.tests.extensions.LayoutMemoryUsageIE8Extension;
@Connect(LayoutMemoryUsageIE8Extension.class)
-public class LayoutMemoryUsageIE8ExtensionConnector extends
- AbstractExtensionConnector {
+public class LayoutMemoryUsageIE8ExtensionConnector
+ extends AbstractExtensionConnector {
@Override
protected void extend(ServerConnector target) {
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/LegacySerializerConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/LegacySerializerConnector.java
index 9c261b9505..64c9bc9dd2 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/LegacySerializerConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/LegacySerializerConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/MissingFromDefaultWidgetsetConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/MissingFromDefaultWidgetsetConnector.java
index 5fdec05970..a13c91f93d 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/MissingFromDefaultWidgetsetConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/MissingFromDefaultWidgetsetConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,8 +21,8 @@ import com.vaadin.shared.ui.Connect;
import com.vaadin.tests.widgetset.server.MissingFromDefaultWidgetsetComponent;
@Connect(MissingFromDefaultWidgetsetComponent.class)
-public class MissingFromDefaultWidgetsetConnector extends
- AbstractComponentConnector {
+public class MissingFromDefaultWidgetsetConnector
+ extends AbstractComponentConnector {
@Override
public VLabel getWidget() {
return (VLabel) super.getWidget();
@@ -30,9 +30,8 @@ public class MissingFromDefaultWidgetsetConnector extends
@Override
protected void init() {
- getWidget()
- .setText(
- "This component is available in TestingWidgetset, but not in DefaultWidgetset");
+ getWidget().setText(
+ "This component is available in TestingWidgetset, but not in DefaultWidgetset");
super.init();
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/MockApplicationConnection.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/MockApplicationConnection.java
index 8237d75c6c..ad9ae61e8c 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/MockApplicationConnection.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/MockApplicationConnection.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,7 +20,7 @@ import com.vaadin.tests.widgetset.server.csrf.ui.CsrfTokenDisabled;
/**
* Mock ApplicationConnection for several issues where we need to hack it.
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -41,14 +41,13 @@ public class MockApplicationConnection extends ApplicationConnection {
@Override
public MockServerCommunicationHandler getMessageSender() {
- return (MockServerCommunicationHandler) super
- .getMessageSender();
+ return (MockServerCommunicationHandler) super.getMessageSender();
}
/**
* Provide the last token received from the server. <br/>
* We added this to test the change done on CSRF token.
- *
+ *
* @see CsrfTokenDisabled
*/
public String getLastCsrfTokenReceiver() {
@@ -58,7 +57,7 @@ public class MockApplicationConnection extends ApplicationConnection {
/**
* Provide the last token sent to the server. <br/>
* We added this to test the change done on CSRF token.
- *
+ *
* @see CsrfTokenDisabled
*/
public String getLastCsrfTokenSent() {
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/MockServerCommunicationHandler.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/MockServerCommunicationHandler.java
index 14b5671181..b0b7f712af 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/MockServerCommunicationHandler.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/MockServerCommunicationHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/MockServerMessageHandler.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/MockServerMessageHandler.java
index 39b89b55ca..9a0f86e444 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/MockServerMessageHandler.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/MockServerMessageHandler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/NoLayoutRpc.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/NoLayoutRpc.java
index 7c2693db1d..328d59e019 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/NoLayoutRpc.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/NoLayoutRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/ProfilerCompilationCanary.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/ProfilerCompilationCanary.java
index d5ab1da2f9..fc78ae5438 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/ProfilerCompilationCanary.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/ProfilerCompilationCanary.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/ReplacedConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/ReplacedConnector.java
index 7f116e4803..852358fcb0 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/ReplacedConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/ReplacedConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2012 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/ReplacingConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/ReplacingConnector.java
index 03e50aab16..0efdfcdfa4 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/ReplacingConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/ReplacingConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2012 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/ResizeTerrorizerControlConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/ResizeTerrorizerControlConnector.java
index d3a0c78948..a50a7a09b2 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/ResizeTerrorizerControlConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/ResizeTerrorizerControlConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -42,8 +42,8 @@ import com.vaadin.shared.ui.Connect;
import com.vaadin.tests.util.ResizeTerrorizer;
@Connect(ResizeTerrorizer.ResizeTerrorizerControl.class)
-public class ResizeTerrorizerControlConnector extends
- AbstractComponentConnector implements PostLayoutListener {
+public class ResizeTerrorizerControlConnector extends AbstractComponentConnector
+ implements PostLayoutListener {
public static class ResizeTerorrizerState extends AbstractComponentState {
public Connector target;
@@ -131,8 +131,8 @@ public class ResizeTerrorizerControlConnector extends
updateFromHistoryToken(History.getToken());
// Then add history change listener
- historyHandlerRegistration = History
- .addValueChangeHandler(new ValueChangeHandler<String>() {
+ historyHandlerRegistration = History.addValueChangeHandler(
+ new ValueChangeHandler<String>() {
@Override
public void onValueChange(
ValueChangeEvent<String> event) {
@@ -202,11 +202,11 @@ public class ResizeTerrorizerControlConnector extends
double progress = time / duration;
- double widthToSet = startWidth + (endWidth - startWidth)
- * progress;
+ double widthToSet = startWidth
+ + (endWidth - startWidth) * progress;
- double heightToSet = startHeight + (endHeight - startHeight)
- * progress;
+ double heightToSet = startHeight
+ + (endHeight - startHeight) * progress;
if (widthToSet != startWidth) {
target.getWidget().setWidth(widthToSet + "px");
@@ -264,8 +264,8 @@ public class ResizeTerrorizerControlConnector extends
if (getWidget().startHeight.getValue() == null) {
int height = getTarget().getWidget().getElement().getOffsetHeight();
getWidget().startHeight.setValue(height);
- getWidget().endHeight.setValue(height
- + getState().defaultHeightOffset);
+ getWidget().endHeight
+ .setValue(height + getState().defaultHeightOffset);
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/RoundTripTesterConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/RoundTripTesterConnector.java
index b22b3fc4b8..29a2357759 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/RoundTripTesterConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/RoundTripTesterConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/RoundTripTesterRpc.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/RoundTripTesterRpc.java
index e71f9f1230..d657760bbe 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/RoundTripTesterRpc.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/RoundTripTesterRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/RunOverflowFixConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/RunOverflowFixConnector.java
index a6789ebaf6..4255e2fb6d 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/RunOverflowFixConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/RunOverflowFixConnector.java
@@ -21,8 +21,8 @@ import com.vaadin.tests.components.customlayout.OverflowAutoFix;
@SuppressWarnings("deprecation")
@Connect(OverflowAutoFix.RunOverflowFix.class)
-public class RunOverflowFixConnector extends
- AbstractComponentContainerConnector {
+public class RunOverflowFixConnector
+ extends AbstractComponentContainerConnector {
private static final String CONTENT1 = "Overflow:<br>Fix1 (scroll): Both scrollbars should be shown<br>Fix2 (visible): no scrollbars should be shown";
private static final String CONTENT2 = "OverflowX:<br>Fix1 (hidden): Horizontal scrollbar should be hidden, vertical shown<br>Fix2 (scroll): Both scrollbars should be shown";
@@ -46,18 +46,18 @@ public class RunOverflowFixConnector extends
public void onClick(ClickEvent event) {
overflow.getElement().getStyle()
.setOverflow(Style.Overflow.SCROLL);
- WidgetUtil.runWebkitOverflowAutoFix(overflow
- .getElement());
+ WidgetUtil.runWebkitOverflowAutoFix(
+ overflow.getElement());
overflowX.getElement().getStyle()
.setOverflowX(Style.Overflow.HIDDEN);
- WidgetUtil.runWebkitOverflowAutoFix(overflowX
- .getElement());
+ WidgetUtil.runWebkitOverflowAutoFix(
+ overflowX.getElement());
overflowY.getElement().getStyle()
.setOverflowY(Style.Overflow.HIDDEN);
- WidgetUtil.runWebkitOverflowAutoFix(overflowY
- .getElement());
+ WidgetUtil.runWebkitOverflowAutoFix(
+ overflowY.getElement());
}
});
runFix.addStyleName("run-button-one");
@@ -69,18 +69,18 @@ public class RunOverflowFixConnector extends
public void onClick(ClickEvent event) {
overflow.getElement().getStyle()
.setOverflow(Style.Overflow.VISIBLE);
- WidgetUtil.runWebkitOverflowAutoFix(overflow
- .getElement());
+ WidgetUtil.runWebkitOverflowAutoFix(
+ overflow.getElement());
overflowX.getElement().getStyle()
.setOverflowX(Style.Overflow.SCROLL);
- WidgetUtil.runWebkitOverflowAutoFix(overflowX
- .getElement());
+ WidgetUtil.runWebkitOverflowAutoFix(
+ overflowX.getElement());
overflowY.getElement().getStyle()
.setOverflowY(Style.Overflow.AUTO);
- WidgetUtil.runWebkitOverflowAutoFix(overflowY
- .getElement());
+ WidgetUtil.runWebkitOverflowAutoFix(
+ overflowY.getElement());
}
});
runFix2.addStyleName("run-button-two");
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/ScrollableGridLayoutConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/ScrollableGridLayoutConnector.java
index d6431ac9f9..4b317b4874 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/ScrollableGridLayoutConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/ScrollableGridLayoutConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,8 @@ import com.vaadin.tests.widgetset.server.ScrollableGridLayout;
public class ScrollableGridLayoutConnector extends GridLayoutConnector
implements MayScrollChildren {
@Override
- public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent event) {
+ public void onConnectorHierarchyChange(
+ ConnectorHierarchyChangeEvent event) {
super.onConnectorHierarchyChange(event);
for (VGridLayout.Cell cell : getWidget().widgetToCell.values()) {
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/SerializerTestConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/SerializerTestConnector.java
index 124b1b5600..15428a32d7 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/SerializerTestConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/SerializerTestConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -56,14 +56,14 @@ public class SerializerTestConnector extends AbstractExtensionConnector {
SimpleTestBean firstValue = generics.values().iterator().next()
.get(Integer.valueOf(1)).get(0);
- Set<SimpleTestBean> key = new HashSet<SimpleTestBean>(Arrays
- .asList(firstValue));
+ Set<SimpleTestBean> key = new HashSet<SimpleTestBean>(
+ Arrays.asList(firstValue));
Map<Integer, List<SimpleTestBean>> value = new HashMap<Integer, List<SimpleTestBean>>();
- Set<SimpleTestBean> firstKeyValue = generics.keySet()
- .iterator().next();
- value.put(Integer.valueOf(1), new ArrayList<SimpleTestBean>(
- firstKeyValue));
+ Set<SimpleTestBean> firstKeyValue = generics.keySet().iterator()
+ .next();
+ value.put(Integer.valueOf(1),
+ new ArrayList<SimpleTestBean>(firstKeyValue));
updated.put(key, value);
@@ -74,8 +74,8 @@ public class SerializerTestConnector extends AbstractExtensionConnector {
public void sendString(String value, String[] array) {
char[] chars = value.toCharArray();
Arrays.sort(chars);
- rpc.sendString(new String(chars), new String[] { array[1],
- array[0] });
+ rpc.sendString(new String(chars),
+ new String[] { array[1], array[0] });
}
@Override
@@ -95,9 +95,11 @@ public class SerializerTestConnector extends AbstractExtensionConnector {
@Override
public void sendNestedArray(int[][] nestedIntArray,
SimpleTestBean[][] nestedBeanArray) {
- rpc.sendNestedArray(new int[][] { { nestedIntArray[1][0],
- nestedIntArray[0][0] } }, new SimpleTestBean[][] {
- { nestedBeanArray[0][1] }, { nestedBeanArray[0][0] } });
+ rpc.sendNestedArray(
+ new int[][] { { nestedIntArray[1][0],
+ nestedIntArray[0][0] } },
+ new SimpleTestBean[][] { { nestedBeanArray[0][1] },
+ { nestedBeanArray[0][0] } });
}
@Override
@@ -116,18 +118,20 @@ public class SerializerTestConnector extends AbstractExtensionConnector {
connectorMap.get(getUIConnector())),
Collections.singletonMap(
Integer.valueOf(stringMap.size()),
- getThisConnector()), updatedBeanMap);
+ getThisConnector()),
+ updatedBeanMap);
}
@Override
public void sendLong(long value, Long boxedValue, long[] array) {
- rpc.sendLong(array[0], Long.valueOf(value), new long[] {
- array[1], boxedValue.longValue() });
+ rpc.sendLong(array[0], Long.valueOf(value),
+ new long[] { array[1], boxedValue.longValue() });
}
@Override
public void sendList(List<Integer> intList,
- List<Connector> connectorList, List<SimpleTestBean> beanList) {
+ List<Connector> connectorList,
+ List<SimpleTestBean> beanList) {
Collections.sort(intList);
Collections.reverse(beanList);
rpc.sendList(intList,
@@ -137,12 +141,13 @@ public class SerializerTestConnector extends AbstractExtensionConnector {
@Override
public void sendInt(int value, Integer boxedValue, int[] array) {
- rpc.sendInt(array.length, Integer.valueOf(array[0]), new int[] {
- value, boxedValue.intValue() });
+ rpc.sendInt(array.length, Integer.valueOf(array[0]),
+ new int[] { value, boxedValue.intValue() });
}
@Override
- public void sendFloat(float value, Float boxedValue, float[] array) {
+ public void sendFloat(float value, Float boxedValue,
+ float[] array) {
Arrays.sort(array);
rpc.sendFloat(boxedValue.floatValue(), Float.valueOf(value),
array);
@@ -162,10 +167,11 @@ public class SerializerTestConnector extends AbstractExtensionConnector {
}
@Override
- public void sendChar(char value, Character boxedValue, char[] array) {
+ public void sendChar(char value, Character boxedValue,
+ char[] array) {
rpc.sendChar(Character.toUpperCase(boxedValue.charValue()),
- Character.valueOf(value), new String(array)
- .toLowerCase().toCharArray());
+ Character.valueOf(value),
+ new String(array).toLowerCase().toCharArray());
}
@Override
@@ -191,15 +197,15 @@ public class SerializerTestConnector extends AbstractExtensionConnector {
public void sendBean(ComplexTestBean complexBean,
SimpleTestBean simpleBean, SimpleTestBean[] array) {
SimpleTestBean updatedSimpleBean = new SimpleTestBean();
- updatedSimpleBean.setValue(complexBean.getInnerBean1()
- .getValue());
+ updatedSimpleBean
+ .setValue(complexBean.getInnerBean1().getValue());
ComplexTestBean updatedComplexBean = new ComplexTestBean();
updatedComplexBean.setInnerBean1(complexBean.getInnerBean2());
- updatedComplexBean.setInnerBean2(complexBean
- .getInnerBeanCollection().get(0));
- updatedComplexBean.setInnerBeanCollection(Arrays.asList(
- simpleBean, updatedSimpleBean));
+ updatedComplexBean.setInnerBean2(
+ complexBean.getInnerBeanCollection().get(0));
+ updatedComplexBean.setInnerBeanCollection(
+ Arrays.asList(simpleBean, updatedSimpleBean));
updatedComplexBean.setPrivimite(complexBean.getPrivimite() + 1);
ArrayList<SimpleTestBean> arrayList = new ArrayList<SimpleTestBean>(
@@ -217,14 +223,14 @@ public class SerializerTestConnector extends AbstractExtensionConnector {
Collections.reverse(beanArrayList);
List<Integer[]> updatedObjectArrayList = new ArrayList<Integer[]>();
for (int[] array : primitiveArrayList) {
- updatedObjectArrayList.add(new Integer[] {
- Integer.valueOf(array.length),
- Integer.valueOf(array[0]) });
+ updatedObjectArrayList
+ .add(new Integer[] { Integer.valueOf(array.length),
+ Integer.valueOf(array[0]) });
}
- rpc.sendArrayList(Arrays.asList(
- new int[] { primitiveArrayList.size() },
- new int[] { objectArrayList.get(0).length }),
+ rpc.sendArrayList(
+ Arrays.asList(new int[] { primitiveArrayList.size() },
+ new int[] { objectArrayList.get(0).length }),
updatedObjectArrayList, beanArrayList);
}
@@ -236,16 +242,17 @@ public class SerializerTestConnector extends AbstractExtensionConnector {
@Override
public void sendListArray(List<Integer>[] objectListArray,
List<SimpleTestBean>[] beanListArray) {
- rpc.sendListArray(new List[] { objectListArray[1],
- objectListArray[0] }, new List[] { Collections
- .singletonList(beanListArray[0].get(0)) });
+ rpc.sendListArray(
+ new List[] { objectListArray[1], objectListArray[0] },
+ new List[] { Collections
+ .singletonList(beanListArray[0].get(0)) });
}
@Override
public void sendEnum(ContentMode contentMode, ContentMode[] array,
List<ContentMode> list) {
- ContentMode nextContentMode = ContentMode.values()[contentMode
- .ordinal() + 1];
+ ContentMode nextContentMode = ContentMode
+ .values()[contentMode.ordinal() + 1];
rpc.sendEnum(nextContentMode,
list.toArray(new ContentMode[list.size()]),
Arrays.asList(array));
@@ -275,13 +282,13 @@ public class SerializerTestConnector extends AbstractExtensionConnector {
public void sendJson(JsonValue value1, JsonValue value2,
JsonString string) {
if (value1.getType() != JsonType.BOOLEAN) {
- throw new RuntimeException("Expected boolean, got "
- + value1.toJson());
+ throw new RuntimeException(
+ "Expected boolean, got " + value1.toJson());
}
if (value2.getType() != JsonType.NULL) {
- throw new RuntimeException("Expected null, got "
- + value2.toJson());
+ throw new RuntimeException(
+ "Expected null, got " + value2.toJson());
}
JsonObject returnObject = Json.createObject();
@@ -343,10 +350,12 @@ public class SerializerTestConnector extends AbstractExtensionConnector {
rpc.log("state.doubleValue: " + getState().doubleValue);
rpc.log("state.doubleObjectValue: " + getState().doubleObjectValue);
- rpc.log("state.doubleArray: " + Arrays.toString(getState().doubleArray));
+ rpc.log("state.doubleArray: "
+ + Arrays.toString(getState().doubleArray));
rpc.log("state.string: " + getState().string);
- rpc.log("state.stringArray: " + Arrays.toString(getState().stringArray));
+ rpc.log("state.stringArray: "
+ + Arrays.toString(getState().stringArray));
rpc.log("state.jsonNull: " + getState().jsonNull.getType().name());
rpc.log("state.jsonString: "
@@ -364,41 +373,41 @@ public class SerializerTestConnector extends AbstractExtensionConnector {
/*
* TODO public double doubleValue; public Double DoubleValue; public
* double[] doubleArray; ;
- *
+ *
* public String string;
- *
+ *
* public String nullString;
- *
+ *
* public Connector connector;
- *
+ *
* public ComplexTestBean complexTestBean; public SimpleTestBean
* simpleTestBean; public SimpleTestBean[] simpleTestBeanArray; public
* int[][] nestedIntArray; public SimpleTestBean[][] nestedBeanArray;
- *
+ *
* public List<Integer> intList; public List<Connector> connectorList;
* public List<SimpleTestBean> simpleTestBeanList;
- *
+ *
* public List<int[]> primitiveArrayList; public List<Integer[]>
* objectArrayList; public List<SimpleTestBean[]> beanArrayList;
- *
+ *
* public List<Integer>[] objectListArray; public List<SimpleTestBean>[]
* beanListArray;
- *
+ *
* public Set<Integer> intSet; public Set<Connector> connectorSet;
* public Set<SimpleTestBean> beanSet;
- *
+ *
* public Map<String, SimpleTestBean> stringMap; public Map<Connector,
* SimpleTestBean> connectorMap; public Map<Integer, Connector> intMap;
* public Map<SimpleTestBean, SimpleTestBean> beanMap;
- *
+ *
* public Map<Set<SimpleTestBean>, Map<Integer, List<SimpleTestBean>>>
* generics;
- *
+ *
* public ContentMode contentMode; public ContentMode[] array; public
* List<ContentMode> list;
- *
+ *
* public SimpleTestBean bean;
- *
+ *
* public Date date1; public Date date2;
*/
}
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/SerializerTestRpc.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/SerializerTestRpc.java
index 95c04ebcfe..5fae2392fc 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/SerializerTestRpc.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/SerializerTestRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -49,8 +49,8 @@ public interface SerializerTestRpc extends ServerRpc, ClientRpc {
public void sendConnector(Connector connector);
- public void sendBean(ComplexTestBean complexBean,
- SimpleTestBean simpleBean, SimpleTestBean[] array);
+ public void sendBean(ComplexTestBean complexBean, SimpleTestBean simpleBean,
+ SimpleTestBean[] array);
public void sendNull(String value1, String value2);
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/SerializerTestState.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/SerializerTestState.java
index 5610ad7bfb..0590746ade 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/SerializerTestState.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/SerializerTestState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/SimpleTestBean.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/SimpleTestBean.java
index 51d172ee21..eb9524189a 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/SimpleTestBean.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/SimpleTestBean.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/TestWidgetConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/TestWidgetConnector.java
index 33a8956810..90f6a55cfd 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/TestWidgetConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/TestWidgetConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -33,8 +33,8 @@ import com.vaadin.tests.widgetset.server.TestWidgetComponent;
@Connect(TestWidgetComponent.class)
public class TestWidgetConnector extends AbstractComponentConnector {
- public static class SubPartAwareSimplePanel extends SimplePanel implements
- SubPartAware {
+ public static class SubPartAwareSimplePanel extends SimplePanel
+ implements SubPartAware {
@Override
public Element getSubPartElement(String subPart) {
Widget target = getWidget();
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/TestingWidgetsetEntryPoint.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/TestingWidgetsetEntryPoint.java
index 7268d02993..77fb4a182f 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/TestingWidgetsetEntryPoint.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/TestingWidgetsetEntryPoint.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/UseStateFromHierachyChangeConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/UseStateFromHierachyChangeConnector.java
index 948c1ece3d..bd82b9986b 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/UseStateFromHierachyChangeConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/UseStateFromHierachyChangeConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2012 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,8 +25,8 @@ import com.vaadin.shared.ui.Connect;
import com.vaadin.tests.widgetset.server.UseStateFromHierachyComponent;
@Connect(UseStateFromHierachyComponent.class)
-public class UseStateFromHierachyChangeConnector extends
- AbstractSingleComponentContainerConnector {
+public class UseStateFromHierachyChangeConnector
+ extends AbstractSingleComponentContainerConnector {
@Override
public SimplePanel getWidget() {
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/UseStateFromHierachyChangeConnectorState.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/UseStateFromHierachyChangeConnectorState.java
index 9dbededb50..59cf0a02de 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/UseStateFromHierachyChangeConnectorState.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/UseStateFromHierachyChangeConnectorState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2012 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ package com.vaadin.tests.widgetset.client;
import com.vaadin.shared.AbstractComponentState;
import com.vaadin.shared.Connector;
-public class UseStateFromHierachyChangeConnectorState extends
- AbstractComponentState {
+public class UseStateFromHierachyChangeConnectorState
+ extends AbstractComponentState {
public Connector child;
}
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/VExtendedTextArea.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/VExtendedTextArea.java
index dce7fc04cf..285caadea2 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/VExtendedTextArea.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/VExtendedTextArea.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/VIdTestLabel.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/VIdTestLabel.java
index 52610e2a47..9271f562b7 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/VIdTestLabel.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/VIdTestLabel.java
@@ -4,7 +4,7 @@ import com.vaadin.client.ui.VLabel;
/**
* Client-side implementation for IdTestLabel (#10179).
- *
+ *
*/
public class VIdTestLabel extends VLabel {
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/WidgetUtilTestConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/WidgetUtilTestConnector.java
index 2776f698fe..5e853a7abd 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/WidgetUtilTestConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/WidgetUtilTestConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/WidgetUtilTestWidget.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/WidgetUtilTestWidget.java
index 6ff0f2433e..abe253536e 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/WidgetUtilTestWidget.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/WidgetUtilTestWidget.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/csrf/CsrfButtonConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/csrf/CsrfButtonConnector.java
index 39dca8d799..3d689165d5 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/csrf/CsrfButtonConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/csrf/CsrfButtonConnector.java
@@ -70,8 +70,8 @@ public class CsrfButtonConnector extends AbstractComponentConnector {
}
private String csrfTokenInfo() {
- return getMockConnection().getMessageHandler().getCsrfToken()
- + ", " + getMockConnection().getLastCsrfTokenReceiver() + ", "
+ return getMockConnection().getMessageHandler().getCsrfToken() + ", "
+ + getMockConnection().getLastCsrfTokenReceiver() + ", "
+ getMockConnection().getLastCsrfTokenSent();
}
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/dd/SpacebarPannerConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/dd/SpacebarPannerConnector.java
index e13dd5030b..d2939e5b4e 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/dd/SpacebarPannerConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/dd/SpacebarPannerConnector.java
@@ -20,8 +20,8 @@ import com.vaadin.shared.ui.Connect;
@Connect(com.vaadin.tests.dd.SpacebarPanner.class)
public class SpacebarPannerConnector extends AbstractExtensionConnector {
- Logger logger = Logger.getLogger(SpacebarPannerConnector.class
- .getSimpleName());
+ Logger logger = Logger
+ .getLogger(SpacebarPannerConnector.class.getSimpleName());
private boolean trigger = false;
private VUI vui;
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/extension/BrowserContextMenuExtensionConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/extension/BrowserContextMenuExtensionConnector.java
index 9b05ff35d8..8fb78b1c7e 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/extension/BrowserContextMenuExtensionConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/extension/BrowserContextMenuExtensionConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,8 +27,8 @@ import com.vaadin.tests.contextclick.BrowserContextMenuInSubComponent.BrowserCon
* Client-side connector of the {@link BrowserContextMenuExtension}.
*/
@Connect(BrowserContextMenuExtension.class)
-public class BrowserContextMenuExtensionConnector extends
- AbstractExtensionConnector {
+public class BrowserContextMenuExtensionConnector
+ extends AbstractExtensionConnector {
@Override
protected void extend(ServerConnector target) {
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/EscalatorBasicClientFeaturesWidget.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/EscalatorBasicClientFeaturesWidget.java
index c735797731..f39c8119be 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/EscalatorBasicClientFeaturesWidget.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/EscalatorBasicClientFeaturesWidget.java
@@ -19,8 +19,8 @@ import com.vaadin.client.widget.escalator.SpacerUpdater;
import com.vaadin.client.widgets.Escalator;
import com.vaadin.shared.ui.grid.ScrollDestination;
-public class EscalatorBasicClientFeaturesWidget extends
- PureGWTTestApplication<Escalator> {
+public class EscalatorBasicClientFeaturesWidget
+ extends PureGWTTestApplication<Escalator> {
public static class LogWidget extends Composite {
@@ -66,12 +66,13 @@ public class EscalatorBasicClientFeaturesWidget extends
}
}
- public static class UpdaterLifetimeWidget extends
- EscalatorBasicClientFeaturesWidget {
+ public static class UpdaterLifetimeWidget
+ extends EscalatorBasicClientFeaturesWidget {
private final EscalatorUpdater debugUpdater = new EscalatorUpdater() {
@Override
- public void preAttach(Row row, Iterable<FlyweightCell> cellsToAttach) {
+ public void preAttach(Row row,
+ Iterable<FlyweightCell> cellsToAttach) {
log("preAttach", cellsToAttach);
}
@@ -87,7 +88,8 @@ public class EscalatorBasicClientFeaturesWidget extends
}
@Override
- public void preDetach(Row row, Iterable<FlyweightCell> cellsToDetach) {
+ public void preDetach(Row row,
+ Iterable<FlyweightCell> cellsToDetach) {
log("preDetach", cellsToDetach);
}
@@ -105,9 +107,10 @@ public class EscalatorBasicClientFeaturesWidget extends
TableCellElement cellElement = cells.iterator().next()
.getElement();
boolean isAttached = cellElement.getParentElement() != null
- && cellElement.getParentElement().getParentElement() != null;
- logWidget.log(methodName + ": elementIsAttached == "
- + isAttached);
+ && cellElement.getParentElement()
+ .getParentElement() != null;
+ logWidget.log(
+ methodName + ": elementIsAttached == " + isAttached);
}
};
@@ -123,8 +126,8 @@ public class EscalatorBasicClientFeaturesWidget extends
private static final String GENERAL_MENU = "General";
private static final String FEATURES_MENU = "Features";
- private static abstract class TestEscalatorUpdater implements
- EscalatorUpdater {
+ private static abstract class TestEscalatorUpdater
+ implements EscalatorUpdater {
@Override
public void preAttach(Row row, Iterable<FlyweightCell> cellsToAttach) {
@@ -466,8 +469,8 @@ public class EscalatorBasicClientFeaturesWidget extends
addMenuCommand("Add one column to end", new ScheduledCommand() {
@Override
public void execute() {
- insertColumns(escalator.getColumnConfiguration()
- .getColumnCount(), 1);
+ insertColumns(
+ escalator.getColumnConfiguration().getColumnCount(), 1);
}
}, menupath);
addMenuCommand("Add ten columns", new ScheduledCommand() {
@@ -486,8 +489,9 @@ public class EscalatorBasicClientFeaturesWidget extends
addMenuCommand("Remove one column from end", new ScheduledCommand() {
@Override
public void execute() {
- removeColumns(escalator.getColumnConfiguration()
- .getColumnCount() - 1, 1);
+ removeColumns(
+ escalator.getColumnConfiguration().getColumnCount() - 1,
+ 1);
}
}, menupath);
@@ -502,8 +506,8 @@ public class EscalatorBasicClientFeaturesWidget extends
new ScheduledCommand() {
@Override
public void execute() {
- escalator.getColumnConfiguration()
- .setColumnWidth(0, -1);
+ escalator.getColumnConfiguration().setColumnWidth(0,
+ -1);
}
}, menupath);
@@ -544,31 +548,31 @@ public class EscalatorBasicClientFeaturesWidget extends
addMenuCommand("Remove 5 rows from bottom", new ScheduledCommand() {
@Override
public void execute() {
- removeRows(escalator.getBody(), escalator.getBody()
- .getRowCount() - 5, 5);
+ removeRows(escalator.getBody(),
+ escalator.getBody().getRowCount() - 5, 5);
}
}, menupath);
addMenuCommand("Remove 50 rows from bottom", new ScheduledCommand() {
@Override
public void execute() {
- removeRows(escalator.getBody(), escalator.getBody()
- .getRowCount() - 50, 50);
+ removeRows(escalator.getBody(),
+ escalator.getBody().getRowCount() - 50, 50);
}
}, menupath);
addMenuCommand("Remove 50 rows from almost bottom",
new ScheduledCommand() {
@Override
public void execute() {
- removeRows(escalator.getBody(), escalator.getBody()
- .getRowCount() - 60, 50);
+ removeRows(escalator.getBody(),
+ escalator.getBody().getRowCount() - 60, 50);
}
}, menupath);
addMenuCommand("Remove all, insert 30 and scroll 40px",
new ScheduledCommand() {
@Override
public void execute() {
- removeRows(escalator.getBody(), 0, escalator.getBody()
- .getRowCount());
+ removeRows(escalator.getBody(), 0,
+ escalator.getBody().getRowCount());
insertRows(escalator.getBody(), 0, 30);
escalator.setScrollTop(40);
}
@@ -595,7 +599,8 @@ public class EscalatorBasicClientFeaturesWidget extends
}, menupath);
}
- private void createRowsMenu(final RowContainer container, String[] menupath) {
+ private void createRowsMenu(final RowContainer container,
+ String[] menupath) {
addMenuCommand("Add one row to beginning", new ScheduledCommand() {
@Override
public void execute() {
@@ -650,8 +655,8 @@ public class EscalatorBasicClientFeaturesWidget extends
@Override
public void init(Spacer spacer) {
- spacer.getElement().setInnerText(
- "Spacer for row " + spacer.getRow());
+ spacer.getElement()
+ .setInnerText("Spacer for row " + spacer.getRow());
}
};
@@ -690,7 +695,8 @@ public class EscalatorBasicClientFeaturesWidget extends
createSpacersMenuForRow(99, menupath);
}
- private void createSpacersMenuForRow(final int rowIndex, String[] menupath) {
+ private void createSpacersMenuForRow(final int rowIndex,
+ String[] menupath) {
menupath = new String[] { menupath[0], menupath[1], "Row " + rowIndex };
addMenuCommand("Set 100px", new ScheduledCommand() {
@Override
@@ -726,7 +732,8 @@ public class EscalatorBasicClientFeaturesWidget extends
}, menupath);
}
- private void insertRows(final RowContainer container, int offset, int number) {
+ private void insertRows(final RowContainer container, int offset,
+ int number) {
if (container == escalator.getBody()) {
data.insertRows(offset, number);
escalator.getBody().insertRows(offset, number);
@@ -735,7 +742,8 @@ public class EscalatorBasicClientFeaturesWidget extends
}
}
- private void removeRows(final RowContainer container, int offset, int number) {
+ private void removeRows(final RowContainer container, int offset,
+ int number) {
if (container == escalator.getBody()) {
data.removeRows(offset, number);
escalator.getBody().removeRows(offset, number);
@@ -756,44 +764,44 @@ public class EscalatorBasicClientFeaturesWidget extends
private void resetColRow() {
if (escalator.getColumnConfiguration().getColumnCount() > 0) {
- removeColumns(0, escalator.getColumnConfiguration()
- .getColumnCount());
+ removeColumns(0,
+ escalator.getColumnConfiguration().getColumnCount());
}
if (escalator.getFooter().getRowCount() > 0) {
- removeRows(escalator.getFooter(), 0, escalator.getFooter()
- .getRowCount());
+ removeRows(escalator.getFooter(), 0,
+ escalator.getFooter().getRowCount());
}
if (escalator.getBody().getRowCount() > 0) {
- removeRows(escalator.getBody(), 0, escalator.getBody()
- .getRowCount());
+ removeRows(escalator.getBody(), 0,
+ escalator.getBody().getRowCount());
}
if (escalator.getHeader().getRowCount() > 0) {
- removeRows(escalator.getHeader(), 0, escalator.getHeader()
- .getRowCount());
+ removeRows(escalator.getHeader(), 0,
+ escalator.getHeader().getRowCount());
}
}
private void resetRowCol() {
if (escalator.getFooter().getRowCount() > 0) {
- removeRows(escalator.getFooter(), 0, escalator.getFooter()
- .getRowCount());
+ removeRows(escalator.getFooter(), 0,
+ escalator.getFooter().getRowCount());
}
if (escalator.getBody().getRowCount() > 0) {
- removeRows(escalator.getBody(), 0, escalator.getBody()
- .getRowCount());
+ removeRows(escalator.getBody(), 0,
+ escalator.getBody().getRowCount());
}
if (escalator.getHeader().getRowCount() > 0) {
- removeRows(escalator.getHeader(), 0, escalator.getHeader()
- .getRowCount());
+ removeRows(escalator.getHeader(), 0,
+ escalator.getHeader().getRowCount());
}
if (escalator.getColumnConfiguration().getColumnCount() > 0) {
- removeColumns(0, escalator.getColumnConfiguration()
- .getColumnCount());
+ removeColumns(0,
+ escalator.getColumnConfiguration().getColumnCount());
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/EscalatorProxy.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/EscalatorProxy.java
index e7ebcfeb51..c4421dff5b 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/EscalatorProxy.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/EscalatorProxy.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -33,7 +33,8 @@ public class EscalatorProxy extends Escalator {
private class ColumnConfigurationProxy implements ColumnConfiguration {
private ColumnConfiguration columnConfiguration;
- public ColumnConfigurationProxy(ColumnConfiguration columnConfiguration) {
+ public ColumnConfigurationProxy(
+ ColumnConfiguration columnConfiguration) {
this.columnConfiguration = columnConfiguration;
}
@@ -76,7 +77,8 @@ public class EscalatorProxy extends Escalator {
}
@Override
- public double getColumnWidth(int index) throws IllegalArgumentException {
+ public double getColumnWidth(int index)
+ throws IllegalArgumentException {
return columnConfiguration.getColumnWidth(index);
}
@@ -99,8 +101,8 @@ public class EscalatorProxy extends Escalator {
}
}
- private class BodyRowContainerProxy extends RowContainerProxy implements
- BodyRowContainer {
+ private class BodyRowContainerProxy extends RowContainerProxy
+ implements BodyRowContainer {
private BodyRowContainer rowContainer;
public BodyRowContainerProxy(BodyRowContainer rowContainer) {
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridBasicClientFeaturesWidget.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridBasicClientFeaturesWidget.java
index b6386afe44..f0c503a4d5 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridBasicClientFeaturesWidget.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridBasicClientFeaturesWidget.java
@@ -92,12 +92,12 @@ import com.vaadin.tests.widgetset.client.grid.GridBasicClientFeaturesWidget.Data
/**
* Grid basic client features test application.
- *
+ *
* @since
* @author Vaadin Ltd
*/
-public class GridBasicClientFeaturesWidget extends
- PureGWTTestApplication<Grid<List<Data>>> {
+public class GridBasicClientFeaturesWidget
+ extends PureGWTTestApplication<Grid<List<Data>>> {
public static final String ROW_STYLE_GENERATOR_NONE = "None";
public static final String ROW_STYLE_GENERATOR_ROW_INDEX = "Row numbers";
public static final String ROW_STYLE_GENERATOR_EVERY_THIRD = "Every third";
@@ -125,7 +125,8 @@ public class GridBasicClientFeaturesWidget extends
public void bind(EditorRequest<List<Data>> request) {
List<Data> rowData = ds.getRow(request.getRowIndex());
- boolean hasSelectionColumn = !(grid.getSelectionModel() instanceof None);
+ boolean hasSelectionColumn = !(grid
+ .getSelectionModel() instanceof None);
for (int i = 0; i < rowData.size(); i++) {
int columnIndex = hasSelectionColumn ? i + 1 : i;
getWidget(columnIndex).setText(rowData.get(i).value.toString());
@@ -144,8 +145,8 @@ public class GridBasicClientFeaturesWidget extends
request.failure(
"Syntethic fail of editor in column 2. "
+ "This message is so long that it doesn't fit into its box",
- Collections.<Column<?, List<Data>>> singleton(grid
- .getColumn(2)));
+ Collections.<Column<?, List<Data>>> singleton(
+ grid.getColumn(2)));
return;
}
try {
@@ -259,7 +260,7 @@ public class GridBasicClientFeaturesWidget extends
/**
* Convenience method for creating a list of Data objects to be used as a
* Row in the data source
- *
+ *
* @param cols
* number of columns (items) to include in the row
* @return
@@ -472,8 +473,8 @@ public class GridBasicClientFeaturesWidget extends
final Label columnOrderLabel = new Label();
columnOrderLabel.getElement().setId("columnreorder");
addLineEnd(columnOrderLabel, 300);
- columnReorderHandler = grid
- .addColumnReorderHandler(new ColumnReorderHandler<List<Data>>() {
+ columnReorderHandler = grid.addColumnReorderHandler(
+ new ColumnReorderHandler<List<Data>>() {
private int eventIndex = 0;
@@ -508,17 +509,14 @@ public class GridBasicClientFeaturesWidget extends
columnOrderLabel.getElement().setAttribute(
"counter", "" + (++eventIndex));
columnOrderLabel.getElement().setAttribute(
- "useroriginated",
- (Boolean.toString(event
- .isUserOriginated())));
+ "useroriginated", (Boolean.toString(
+ event.isUserOriginated())));
columnOrderLabel.getElement().setAttribute(
"ishidden",
(Boolean.toString(event.isHidden())));
columnOrderLabel.getElement().setAttribute(
- "columnindex",
- ""
- + grid.getColumns().indexOf(
- event.getColumn()));
+ "columnindex", "" + grid.getColumns()
+ .indexOf(event.getColumn()));
}
};
@@ -546,9 +544,8 @@ public class GridBasicClientFeaturesWidget extends
location = "somewhere";
}
- getLogger().info(
- "Prevented opening a context menu in grid "
- + location);
+ getLogger().info("Prevented opening a context menu in grid "
+ + location);
}
};
@@ -644,8 +641,8 @@ public class GridBasicClientFeaturesWidget extends
@Override
public void execute() {
DataSource<List<Data>> ds = grid.getDataSource();
- final RowHandle<List<Data>> rowHandle = ds.getHandle(ds
- .getRow(0));
+ final RowHandle<List<Data>> rowHandle = ds
+ .getHandle(ds.getRow(0));
new Timer() {
@Override
@@ -671,13 +668,14 @@ public class GridBasicClientFeaturesWidget extends
grid.setRowStyleGenerator(new RowStyleGenerator<List<Data>>() {
@Override
- public String getStyle(RowReference<List<Data>> rowReference) {
+ public String getStyle(
+ RowReference<List<Data>> rowReference) {
if (rowReference.getRowIndex() % 3 == 0) {
return "third";
} else {
// First manual col is integer
- Integer value = (Integer) rowReference.getRow()
- .get(COLUMNS - MANUALLY_FORMATTED_COLUMNS).value;
+ Integer value = (Integer) rowReference.getRow().get(
+ COLUMNS - MANUALLY_FORMATTED_COLUMNS).value;
return value.toString();
}
}
@@ -692,7 +690,8 @@ public class GridBasicClientFeaturesWidget extends
grid.setRowStyleGenerator(new RowStyleGenerator<List<Data>>() {
@Override
- public String getStyle(RowReference<List<Data>> rowReference) {
+ public String getStyle(
+ RowReference<List<Data>> rowReference) {
return Integer.toString(rowReference.getRowIndex());
}
});
@@ -710,43 +709,44 @@ public class GridBasicClientFeaturesWidget extends
addMenuCommand(CELL_STYLE_GENERATOR_SIMPLE, new ScheduledCommand() {
@Override
public void execute() {
- grid.setCellStyleGenerator(new CellStyleGenerator<List<Data>>() {
-
- @Override
- public String getStyle(
- CellReference<List<Data>> cellReference) {
- Grid.Column<?, List<Data>> column = cellReference
- .getColumn();
- if (column == grid.getColumn(2)) {
- return "two";
- } else if (column == grid.getColumn(COLUMNS
- - MANUALLY_FORMATTED_COLUMNS)) {
- // First manual col is integer
- Integer value = (Integer) column
- .getValue(cellReference.getRow());
- return value.toString();
+ grid.setCellStyleGenerator(
+ new CellStyleGenerator<List<Data>>() {
- } else {
- return null;
- }
- }
- });
+ @Override
+ public String getStyle(
+ CellReference<List<Data>> cellReference) {
+ Grid.Column<?, List<Data>> column = cellReference
+ .getColumn();
+ if (column == grid.getColumn(2)) {
+ return "two";
+ } else if (column == grid.getColumn(
+ COLUMNS - MANUALLY_FORMATTED_COLUMNS)) {
+ // First manual col is integer
+ Integer value = (Integer) column
+ .getValue(cellReference.getRow());
+ return value.toString();
+
+ } else {
+ return null;
+ }
+ }
+ });
}
}, cellStyleGeneratorNamePath);
addMenuCommand(CELL_STYLE_GENERATOR_COL_INDEX, new ScheduledCommand() {
@Override
public void execute() {
- grid.setCellStyleGenerator(new CellStyleGenerator<List<Data>>() {
+ grid.setCellStyleGenerator(
+ new CellStyleGenerator<List<Data>>() {
- @Override
- public String getStyle(
- CellReference<List<Data>> cellReference) {
- return cellReference.getRowIndex()
- + "_"
- + grid.getColumns().indexOf(
- cellReference.getColumn());
- }
- });
+ @Override
+ public String getStyle(
+ CellReference<List<Data>> cellReference) {
+ return cellReference.getRowIndex() + "_"
+ + grid.getColumns().indexOf(
+ cellReference.getColumn());
+ }
+ });
}
}, cellStyleGeneratorNamePath);
@@ -776,15 +776,16 @@ public class GridBasicClientFeaturesWidget extends
public void execute() {
List<Column> columns = new ArrayList<Column>(grid.getColumns());
Collections.reverse(columns);
- grid.setColumnOrder(columns.toArray(new Column[columns.size()]));
+ grid.setColumnOrder(
+ columns.toArray(new Column[columns.size()]));
}
}, "Component", "State");
addMenuCommand("Column Reordering", new ScheduledCommand() {
@Override
public void execute() {
- grid.setColumnReorderingAllowed(!grid
- .isColumnReorderingAllowed());
+ grid.setColumnReorderingAllowed(
+ !grid.isColumnReorderingAllowed());
}
}, "Component", "State");
addMenuCommand("250px", new ScheduledCommand() {
@@ -820,8 +821,8 @@ public class GridBasicClientFeaturesWidget extends
}
private void createScrollToRowMenu() {
- String[] menupath = new String[] { "Component", "State",
- "Scroll to...", null };
+ String[] menupath = new String[] { "Component", "State", "Scroll to...",
+ null };
for (int i = 0; i < ROWS; i += 100) {
menupath[3] = "Row " + i + "...";
@@ -988,8 +989,8 @@ public class GridBasicClientFeaturesWidget extends
Column<?, List<Data>> col = reordered.remove(index);
reordered.add(index - 1, col);
}
- grid.setColumnOrder(reordered.toArray(new Column[reordered
- .size()]));
+ grid.setColumnOrder(
+ reordered.toArray(new Column[reordered.size()]));
}
}, "Component", "Columns", "Column " + i);
}
@@ -1051,8 +1052,8 @@ public class GridBasicClientFeaturesWidget extends
addMenuCommand("Bottom", new ScheduledCommand() {
@Override
public void execute() {
- grid.setDefaultHeaderRow(grid.getHeaderRow(grid
- .getHeaderRowCount() - 1));
+ grid.setDefaultHeaderRow(
+ grid.getHeaderRow(grid.getHeaderRowCount() - 1));
}
}, "Component", "Header", "Default row");
addMenuCommand("Unset", new ScheduledCommand() {
@@ -1099,8 +1100,8 @@ public class GridBasicClientFeaturesWidget extends
@Override
public void execute() {
row.join(row.getCell(grid.getColumn(0)),
- row.getCell(grid.getColumn(1))).setText(
- "Join column cells 0, 1");
+ row.getCell(grid.getColumn(1)))
+ .setText("Join column cells 0, 1");
}
}, menuPath);
@@ -1109,8 +1110,8 @@ public class GridBasicClientFeaturesWidget extends
@Override
public void execute() {
- row.join(grid.getColumn(1), grid.getColumn(2)).setText(
- "Join columns 1, 2");
+ row.join(grid.getColumn(1), grid.getColumn(2))
+ .setText("Join columns 1, 2");
;
}
@@ -1130,9 +1131,8 @@ public class GridBasicClientFeaturesWidget extends
@Override
public void execute() {
- row.join(
- grid.getColumns().toArray(
- new Grid.Column[grid.getColumnCount()]))
+ row.join(grid.getColumns()
+ .toArray(new Grid.Column[grid.getColumnCount()]))
.setText("Join all columns");
;
@@ -1245,8 +1245,8 @@ public class GridBasicClientFeaturesWidget extends
@Override
public void execute() {
row.join(row.getCell(grid.getColumn(0)),
- row.getCell(grid.getColumn(1))).setText(
- "Join column cells 0, 1");
+ row.getCell(grid.getColumn(1)))
+ .setText("Join column cells 0, 1");
}
}, menuPath);
@@ -1255,8 +1255,8 @@ public class GridBasicClientFeaturesWidget extends
@Override
public void execute() {
- row.join(grid.getColumn(1), grid.getColumn(2)).setText(
- "Join columns 1, 2");
+ row.join(grid.getColumn(1), grid.getColumn(2))
+ .setText("Join columns 1, 2");
;
}
@@ -1266,9 +1266,8 @@ public class GridBasicClientFeaturesWidget extends
@Override
public void execute() {
- row.join(
- grid.getColumns().toArray(
- new Grid.Column[grid.getColumnCount()]))
+ row.join(grid.getColumns()
+ .toArray(new Grid.Column[grid.getColumnCount()]))
.setText("Join all columns");
;
@@ -1312,7 +1311,8 @@ public class GridBasicClientFeaturesWidget extends
return new HtmlRenderer() {
@Override
- public void render(RendererCellReference cell, String htmlString) {
+ public void render(RendererCellReference cell,
+ String htmlString) {
super.render(cell, "<b>" + htmlString + "</b>");
}
};
@@ -1346,8 +1346,8 @@ public class GridBasicClientFeaturesWidget extends
@Override
public void onKeyDown(GridKeyDownEvent event) {
CellReference<?> focused = event.getFocusedCell();
- updateLabel(label, event.toDebugString(),
- focused.getRowIndex(), focused.getColumnIndex());
+ updateLabel(label, event.toDebugString(), focused.getRowIndex(),
+ focused.getColumnIndex());
}
});
@@ -1357,8 +1357,8 @@ public class GridBasicClientFeaturesWidget extends
@Override
public void onKeyDown(GridKeyDownEvent event) {
CellReference<?> focused = event.getFocusedCell();
- updateLabel(label, event.toDebugString(),
- focused.getRowIndex(), focused.getColumnIndex());
+ updateLabel(label, event.toDebugString(), focused.getRowIndex(),
+ focused.getColumnIndex());
}
});
@@ -1368,8 +1368,8 @@ public class GridBasicClientFeaturesWidget extends
@Override
public void onKeyDown(GridKeyDownEvent event) {
CellReference<?> focused = event.getFocusedCell();
- updateLabel(label, event.toDebugString(),
- focused.getRowIndex(), focused.getColumnIndex());
+ updateLabel(label, event.toDebugString(), focused.getRowIndex(),
+ focused.getColumnIndex());
}
});
@@ -1380,8 +1380,8 @@ public class GridBasicClientFeaturesWidget extends
@Override
public void onKeyUp(GridKeyUpEvent event) {
CellReference<?> focused = event.getFocusedCell();
- updateLabel(label, event.toDebugString(),
- focused.getRowIndex(), focused.getColumnIndex());
+ updateLabel(label, event.toDebugString(), focused.getRowIndex(),
+ focused.getColumnIndex());
}
});
@@ -1391,8 +1391,8 @@ public class GridBasicClientFeaturesWidget extends
@Override
public void onKeyUp(GridKeyUpEvent event) {
CellReference<?> focused = event.getFocusedCell();
- updateLabel(label, event.toDebugString(),
- focused.getRowIndex(), focused.getColumnIndex());
+ updateLabel(label, event.toDebugString(), focused.getRowIndex(),
+ focused.getColumnIndex());
}
});
@@ -1402,8 +1402,8 @@ public class GridBasicClientFeaturesWidget extends
@Override
public void onKeyUp(GridKeyUpEvent event) {
CellReference<?> focused = event.getFocusedCell();
- updateLabel(label, event.toDebugString(),
- focused.getRowIndex(), focused.getColumnIndex());
+ updateLabel(label, event.toDebugString(), focused.getRowIndex(),
+ focused.getColumnIndex());
}
});
@@ -1414,8 +1414,8 @@ public class GridBasicClientFeaturesWidget extends
@Override
public void onKeyPress(GridKeyPressEvent event) {
CellReference<?> focused = event.getFocusedCell();
- updateLabel(label, event.toDebugString(),
- focused.getRowIndex(), focused.getColumnIndex());
+ updateLabel(label, event.toDebugString(), focused.getRowIndex(),
+ focused.getColumnIndex());
}
});
@@ -1425,8 +1425,8 @@ public class GridBasicClientFeaturesWidget extends
@Override
public void onKeyPress(GridKeyPressEvent event) {
CellReference<?> focused = event.getFocusedCell();
- updateLabel(label, event.toDebugString(),
- focused.getRowIndex(), focused.getColumnIndex());
+ updateLabel(label, event.toDebugString(), focused.getRowIndex(),
+ focused.getColumnIndex());
}
});
@@ -1436,14 +1436,15 @@ public class GridBasicClientFeaturesWidget extends
@Override
public void onKeyPress(GridKeyPressEvent event) {
CellReference<?> focused = event.getFocusedCell();
- updateLabel(label, event.toDebugString(),
- focused.getRowIndex(), focused.getColumnIndex());
+ updateLabel(label, event.toDebugString(), focused.getRowIndex(),
+ focused.getColumnIndex());
}
});
}
- private void updateLabel(VLabel label, String output, int object, int column) {
+ private void updateLabel(VLabel label, String output, int object,
+ int column) {
String coords = "(" + object + ", " + column + ")";
label.setText(coords + " " + output);
}
@@ -1600,18 +1601,19 @@ public class GridBasicClientFeaturesWidget extends
public void execute() {
grid.setSidebarOpen(true);
- Scheduler.get().scheduleFixedDelay(new Scheduler.RepeatingCommand() {
- @Override
- public boolean execute() {
- if(grid.isSidebarOpen()) {
- grid.setEnabled(false);
+ Scheduler.get()
+ .scheduleFixedDelay(new Scheduler.RepeatingCommand() {
+ @Override
+ public boolean execute() {
+ if (grid.isSidebarOpen()) {
+ grid.setEnabled(false);
- return false;
- }
+ return false;
+ }
- return true;
- }
- }, 250);
+ return true;
+ }
+ }, 250);
}
}, menupath);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridCellFocusOnResetSizeWidget.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridCellFocusOnResetSizeWidget.java
index b2893463a7..1d71de65fe 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridCellFocusOnResetSizeWidget.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridCellFocusOnResetSizeWidget.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,8 +27,8 @@ import com.vaadin.client.renderers.HtmlRenderer;
import com.vaadin.client.widgets.Grid;
import com.vaadin.client.widgets.Grid.SelectionMode;
-public class GridCellFocusOnResetSizeWidget extends
- PureGWTTestApplication<Grid<String[]>> {
+public class GridCellFocusOnResetSizeWidget
+ extends PureGWTTestApplication<Grid<String[]>> {
private Grid<String[]> grid;
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridClickExtensionConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridClickExtensionConnector.java
index 64020683f6..ac139438a9 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridClickExtensionConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridClickExtensionConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -47,8 +47,8 @@ public class GridClickExtensionConnector extends AbstractExtensionConnector {
CellReference<?> cellRef = event.getTargetCell();
// Gather needed information.
- String rowKey = getParent().getRowKey(
- (JsonObject) cellRef.getRow());
+ String rowKey = getParent()
+ .getRowKey((JsonObject) cellRef.getRow());
String columnId = getParent().getColumnId(cellRef.getColumn());
MouseEventDetails clickDetails = MouseEventDetailsBuilder
.buildMouseEventDetails(event.getNativeEvent());
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridClientColumnRendererConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridClientColumnRendererConnector.java
index 2b8f454ed1..c5b08204ae 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridClientColumnRendererConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridClientColumnRendererConnector.java
@@ -51,8 +51,8 @@ import com.vaadin.shared.ui.Connect;
import com.vaadin.tests.widgetset.server.grid.GridClientColumnRenderers;
@Connect(GridClientColumnRenderers.GridController.class)
-public class GridClientColumnRendererConnector extends
- AbstractComponentConnector {
+public class GridClientColumnRendererConnector
+ extends AbstractComponentConnector {
public static enum Renderers {
TEXT_RENDERER, WIDGET_RENDERER, HTML_RENDERER, NUMBER_RENDERER, DATE_RENDERER, CPLX_RENDERER;
@@ -84,8 +84,8 @@ public class GridClientColumnRendererConnector extends
DelayedDataSource.this.firstRowIndex = firstRowIndex;
DelayedDataSource.this.numberOfRows = numberOfRows;
dataChangeHandler.dataUpdated(firstRowIndex, numberOfRows);
- dataChangeHandler
- .dataAvailable(firstRowIndex, numberOfRows);
+ dataChangeHandler.dataAvailable(firstRowIndex,
+ numberOfRows);
}
}.schedule(latency);
}
@@ -130,14 +130,15 @@ public class GridClientColumnRendererConnector extends
// Provide data as data source
if (Location.getParameter("latency") != null) {
grid.setDataSource(new DelayedDataSource(
- new ListDataSource<String>(columnData), Integer
- .parseInt(Location.getParameter("latency"))));
+ new ListDataSource<String>(columnData),
+ Integer.parseInt(Location.getParameter("latency"))));
} else {
grid.setDataSource(new ListDataSource<String>(columnData));
}
// Add a column to display the data in
- Grid.Column<String, String> c = createColumnWithRenderer(Renderers.TEXT_RENDERER);
+ Grid.Column<String, String> c = createColumnWithRenderer(
+ Renderers.TEXT_RENDERER);
grid.addColumn(c);
grid.getDefaultHeaderRow().getCell(c).setText("Column 1");
@@ -150,8 +151,8 @@ public class GridClientColumnRendererConnector extends
grid.addSortHandler(new SortHandler<String>() {
@Override
public void sort(SortEvent<String> event) {
- Element console = Document.get().getElementById(
- "testDebugConsole");
+ Element console = Document.get()
+ .getElementById("testDebugConsole");
String text = "Client-side sort event received<br>"
+ "Columns: " + event.getOrder().size() + ", order: ";
for (SortOrder order : event.getOrder()) {
@@ -181,13 +182,9 @@ public class GridClientColumnRendererConnector extends
}
getWidget().addColumn(column);
- getWidget()
- .getDefaultHeaderRow()
- .getCell(column)
- .setText(
- "Column "
- + String.valueOf(getWidget()
- .getColumnCount() + 1));
+ getWidget().getDefaultHeaderRow().getCell(column)
+ .setText("Column " + String.valueOf(
+ getWidget().getColumnCount() + 1));
}
@Override
@@ -211,7 +208,8 @@ public class GridClientColumnRendererConnector extends
@SuppressWarnings("unchecked")
public void triggerClientSortingTest() {
Grid<String> grid = getWidget();
- ListSorter<String> sorter = new ListSorter<String>(grid);
+ ListSorter<String> sorter = new ListSorter<String>(
+ grid);
// Make sorter sort the numbers in natural order
sorter.setComparator(
@@ -294,7 +292,8 @@ public class GridClientColumnRendererConnector extends
return new HtmlRenderer() {
@Override
- public void render(RendererCellReference cell, String htmlString) {
+ public void render(RendererCellReference cell,
+ String htmlString) {
super.render(cell, "<b>" + htmlString + "</b>");
}
};
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridClientDataSourcesWidget.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridClientDataSourcesWidget.java
index e352b10064..2eded12d20 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridClientDataSourcesWidget.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridClientDataSourcesWidget.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,8 +25,8 @@ import com.vaadin.client.renderers.TextRenderer;
import com.vaadin.client.widgets.Grid;
import com.vaadin.client.widgets.Grid.SelectionMode;
-public class GridClientDataSourcesWidget extends
- PureGWTTestApplication<Grid<String[]>> {
+public class GridClientDataSourcesWidget
+ extends PureGWTTestApplication<Grid<String[]>> {
private interface RestCallback {
void onResponse(RestishDataSource.Backend.Result result);
@@ -37,13 +37,13 @@ public class GridClientDataSourcesWidget extends
* constantly. The back-end is unable to actively push data to Grid.
* Instead, with each row request, in addition to its row payload it tells
* how many rows it contains in total.
- *
+ *
* A plausible response from this REST-like api would be:
- *
+ *
* <pre>
* <code>
* GET /foos/4..8
- *
+ *
* {
* "resultsize": 4,
* "data": [
@@ -56,10 +56,10 @@ public class GridClientDataSourcesWidget extends
* }
* </code>
* </pre>
- *
+ *
* In this case, the size of Grid needs to be updated to be able to show 100
* rows in total (no more, no less).
- *
+ *
* This class
* <ol>
* <li>gets initialized
@@ -75,7 +75,7 @@ public class GridClientDataSourcesWidget extends
* somewhere.
* <p>
* It's scoped inside the RDS class only because it's tied to that.
- * */
+ */
private class Backend {
public class Result {
public int size;
@@ -100,11 +100,13 @@ public class GridClientDataSourcesWidget extends
}
- private List<String[]> fetchRows(int firstRowIndex, int numberOfRows) {
+ private List<String[]> fetchRows(int firstRowIndex,
+ int numberOfRows) {
List<String[]> rows = new ArrayList<String[]>();
for (int i = 0; i < numberOfRows; i++) {
String id = String.valueOf(firstRowIndex + i);
- rows.add(new String[] { id, "cell " + id + " #" + modCount });
+ rows.add(new String[] { id,
+ "cell " + id + " #" + modCount });
}
return rows;
}
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridColumnAutoWidthClientWidget.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridColumnAutoWidthClientWidget.java
index d73bc84227..cfcf722cfb 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridColumnAutoWidthClientWidget.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridColumnAutoWidthClientWidget.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,8 +24,8 @@ import com.vaadin.client.widget.grid.datasources.ListDataSource;
import com.vaadin.client.widgets.Grid;
import com.vaadin.client.widgets.Grid.SelectionMode;
-public class GridColumnAutoWidthClientWidget extends
- PureGWTTestApplication<Grid<List<String>>> {
+public class GridColumnAutoWidthClientWidget
+ extends PureGWTTestApplication<Grid<List<String>>> {
private Grid<List<String>> grid;
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridDataChangeHandlerWidget.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridDataChangeHandlerWidget.java
index a865d90b43..a3b54f2548 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridDataChangeHandlerWidget.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridDataChangeHandlerWidget.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -57,8 +57,8 @@ public class GridDataChangeHandlerWidget extends Composite {
}
}
- public static class RemoteDelayedDataSource extends
- AbstractRemoteDataSource<String> {
+ public static class RemoteDelayedDataSource
+ extends AbstractRemoteDataSource<String> {
private List<String> rows;
@@ -93,8 +93,8 @@ public class GridDataChangeHandlerWidget extends Composite {
initWidget(panel);
panel.setWidget(grid);
- grid.setDataSource(new RemoteDelayedDataSource(Arrays.asList("A", "B",
- "C", "D", "E")));
+ grid.setDataSource(new RemoteDelayedDataSource(
+ Arrays.asList("A", "B", "C", "D", "E")));
grid.addColumn(new Column<String, String>("letter") {
@Override
public String getValue(String row) {
@@ -107,8 +107,8 @@ public class GridDataChangeHandlerWidget extends Composite {
@Override
public boolean execute() {
- grid.setDataSource(new DelayedDataSource(Arrays.asList("X",
- "Y", "Z")));
+ grid.setDataSource(
+ new DelayedDataSource(Arrays.asList("X", "Y", "Z")));
if (run) {
return false;
}
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridDefaultTextRendererWidget.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridDefaultTextRendererWidget.java
index 4f1ea48be5..f589dc51f2 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridDefaultTextRendererWidget.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridDefaultTextRendererWidget.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,8 +21,8 @@ import com.vaadin.client.widgets.Grid.Column;
import com.vaadin.client.widgets.Grid.SelectionMode;
import com.vaadin.shared.ui.grid.HeightMode;
-public class GridDefaultTextRendererWidget extends
- PureGWTTestApplication<Grid<String>> {
+public class GridDefaultTextRendererWidget
+ extends PureGWTTestApplication<Grid<String>> {
/*
* This can't be null, because grid thinks that a row object of null means
* "data is still being fetched".
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridHeightByRowOnInitWidget.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridHeightByRowOnInitWidget.java
index 8202c2ccc0..d961f08389 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridHeightByRowOnInitWidget.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridHeightByRowOnInitWidget.java
@@ -17,8 +17,8 @@ public class GridHeightByRowOnInitWidget extends Composite {
initWidget(panel);
panel.setWidget(grid);
- grid.setDataSource(new ListDataSource<String>(Arrays.asList("A", "B",
- "C", "D", "E")));
+ grid.setDataSource(new ListDataSource<String>(
+ Arrays.asList("A", "B", "C", "D", "E")));
grid.addColumn(new Column<String, String>("letter") {
@Override
public String getValue(String row) {
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridRendererChangeWidget.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridRendererChangeWidget.java
index d35580b3c6..f52629fbbc 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridRendererChangeWidget.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/GridRendererChangeWidget.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,8 +24,8 @@ import com.vaadin.client.widget.grid.datasources.ListDataSource;
import com.vaadin.client.widgets.Grid;
import com.vaadin.client.widgets.Grid.Column;
-public class GridRendererChangeWidget extends
- PureGWTTestApplication<Grid<String[]>> {
+public class GridRendererChangeWidget
+ extends PureGWTTestApplication<Grid<String[]>> {
public class MyButtonRenderer extends ButtonRenderer {
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/IntArrayRendererConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/IntArrayRendererConnector.java
index e89057a148..e546f14e7d 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/IntArrayRendererConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/IntArrayRendererConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,8 @@ import com.vaadin.client.widget.grid.RendererCellReference;
import com.vaadin.shared.ui.Connect;
@Connect(com.vaadin.tests.components.grid.IntArrayRenderer.class)
-public class IntArrayRendererConnector extends AbstractRendererConnector<int[]> {
+public class IntArrayRendererConnector
+ extends AbstractRendererConnector<int[]> {
public static class IntArrayRenderer implements Renderer<int[]> {
private static final String JOINER = " :: ";
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/MySelectionModelConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/MySelectionModelConnector.java
index 81a9ab5bf1..97c5023151 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/MySelectionModelConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/MySelectionModelConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/PojoRendererConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/PojoRendererConnector.java
index 04dd08d274..a7f88de0a0 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/PojoRendererConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/PojoRendererConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,8 +22,8 @@ import com.vaadin.shared.ui.Connect;
import com.vaadin.tests.widgetset.client.SimpleTestBean;
@Connect(com.vaadin.tests.components.grid.BeanRenderer.class)
-public class PojoRendererConnector extends
- AbstractRendererConnector<SimpleTestBean> {
+public class PojoRendererConnector
+ extends AbstractRendererConnector<SimpleTestBean> {
public static class BeanRenderer implements Renderer<SimpleTestBean> {
@Override
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/PureGWTTestApplication.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/PureGWTTestApplication.java
index bda1a0c33e..dcd0fac845 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/PureGWTTestApplication.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/PureGWTTestApplication.java
@@ -30,7 +30,7 @@ import com.vaadin.client.ui.SubPartAware;
/**
* Pure GWT Test Application base for testing features of a single widget;
* provides a menu system and convenience method for adding items to it.
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -47,7 +47,7 @@ public abstract class PureGWTTestApplication<T> extends DockLayoutPanel
/**
* Creates a Command object, which is used as an action entry in the
* Menu
- *
+ *
* @param t
* a title string
* @param cmd
@@ -61,7 +61,7 @@ public abstract class PureGWTTestApplication<T> extends DockLayoutPanel
/**
* Returns the title of this command item
- *
+ *
* @return a title string
*/
public final String getTitle() {
@@ -70,7 +70,7 @@ public abstract class PureGWTTestApplication<T> extends DockLayoutPanel
/**
* Returns the actual scheduled command of this command item
- *
+ *
* @return a scheduled command
*/
public final ScheduledCommand getCommand() {
@@ -105,7 +105,7 @@ public abstract class PureGWTTestApplication<T> extends DockLayoutPanel
/**
* Create a sub-menu, with a title.
- *
+ *
* @param title
*/
public Menu(String title) {
@@ -118,7 +118,7 @@ public abstract class PureGWTTestApplication<T> extends DockLayoutPanel
/**
* Return the GWT {@link MenuBar} object that provides the widget for
* this Menu
- *
+ *
* @return a menubar object
*/
public MenuBar getMenuBar() {
@@ -127,7 +127,7 @@ public abstract class PureGWTTestApplication<T> extends DockLayoutPanel
/**
* Returns the title of this menu entry
- *
+ *
* @return a title string
*/
public String getTitle() {
@@ -137,7 +137,7 @@ public abstract class PureGWTTestApplication<T> extends DockLayoutPanel
/**
* Adds a child menu entry to this menu. The title for this entry is
* taken from the Menu object argument.
- *
+ *
* @param m
* another Menu object
*/
@@ -149,7 +149,7 @@ public abstract class PureGWTTestApplication<T> extends DockLayoutPanel
/**
* Tests for the existence of a child menu by title at this level of the
* menu hierarchy
- *
+ *
* @param title
* a title string
* @return true, if this menu has a direct child menu with the specified
@@ -162,7 +162,7 @@ public abstract class PureGWTTestApplication<T> extends DockLayoutPanel
/**
* Gets a reference to a child menu with a certain title, that is a
* direct child of this menu level.
- *
+ *
* @param title
* a title string
* @return a Menu object with the specified title string, or null, if
@@ -181,7 +181,7 @@ public abstract class PureGWTTestApplication<T> extends DockLayoutPanel
/**
* Adds a command item to the menu. When the entry is clicked, the
* command is executed.
- *
+ *
* @param cmd
* a command object.
*/
@@ -193,7 +193,7 @@ public abstract class PureGWTTestApplication<T> extends DockLayoutPanel
/**
* Tests for the existence of a {@link Command} that is the direct child
* of this level of menu.
- *
+ *
* @param title
* the command's title
* @return true, if this menu level includes a command item with the
@@ -206,7 +206,7 @@ public abstract class PureGWTTestApplication<T> extends DockLayoutPanel
/**
* Gets a reference to a {@link Command} item that is the direct child
* of this level of menu.
- *
+ *
* @param title
* the command's title
* @return a command, if found in this menu level, otherwise null.
@@ -242,7 +242,7 @@ public abstract class PureGWTTestApplication<T> extends DockLayoutPanel
/**
* Connect an item to the menu structure
- *
+ *
* @param cmd
* a scheduled command; see google's docs
* @param menupath
@@ -258,7 +258,7 @@ public abstract class PureGWTTestApplication<T> extends DockLayoutPanel
/**
* Create a menu path, if one doesn't already exist, and return the last
* menu in the series.
- *
+ *
* @param path
* a varargs list or array of strings describing a menu path,
* e.g. "File", "Recent", "User Files", which would result in the
@@ -300,7 +300,7 @@ public abstract class PureGWTTestApplication<T> extends DockLayoutPanel
/**
* Gets the tested widget.
- *
+ *
* @return tested widget
*/
public T getTestedWidget() {
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/RowAwareRendererConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/RowAwareRendererConnector.java
index 63faf1d651..ae9aeba95f 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/RowAwareRendererConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/RowAwareRendererConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -60,7 +60,8 @@ public class RowAwareRendererConnector extends AbstractRendererConnector<Void> {
}
@Override
- public boolean onBrowserEvent(CellReference<?> cell, NativeEvent event) {
+ public boolean onBrowserEvent(CellReference<?> cell,
+ NativeEvent event) {
String key = getRowKey((JsonObject) cell.getRow());
getRpcProxy(RowAwareRendererRpc.class).clicky(key);
cell.getElement().setInnerText(
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/gwtrpc/GwtRpcButtonConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/gwtrpc/GwtRpcButtonConnector.java
index 43d96afd2b..c6d7a7ff74 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/gwtrpc/GwtRpcButtonConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/gwtrpc/GwtRpcButtonConnector.java
@@ -39,8 +39,8 @@ import com.vaadin.tests.widgetset.server.gwtrpc.GwtRpcButton;
@Connect(GwtRpcButton.class)
public class GwtRpcButtonConnector extends AbstractComponentConnector {
- static Logger logger = Logger.getLogger(GwtRpcButtonConnector.class
- .getName());
+ static Logger logger = Logger
+ .getLogger(GwtRpcButtonConnector.class.getName());
static {
logger.setLevel(Level.ALL);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/gwtrpc/GwtRpcServiceTestAsync.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/gwtrpc/GwtRpcServiceTestAsync.java
index 93eda8ca34..efe7607f51 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/gwtrpc/GwtRpcServiceTestAsync.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/gwtrpc/GwtRpcServiceTestAsync.java
@@ -27,6 +27,7 @@ public interface GwtRpcServiceTestAsync {
/*
* Dummy async method to verify if RPC works.
*/
- void giveMeThat(String that, String haveThis, AsyncCallback<String> callback);
+ void giveMeThat(String that, String haveThis,
+ AsyncCallback<String> callback);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/helloworldfeature/GreetAgainRpc.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/helloworldfeature/GreetAgainRpc.java
index 95e286e4de..8d00ad7626 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/helloworldfeature/GreetAgainRpc.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/helloworldfeature/GreetAgainRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/helloworldfeature/HelloWorldExtensionConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/helloworldfeature/HelloWorldExtensionConnector.java
index f825115ec8..8627979d3e 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/helloworldfeature/HelloWorldExtensionConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/helloworldfeature/HelloWorldExtensionConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/helloworldfeature/HelloWorldRpc.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/helloworldfeature/HelloWorldRpc.java
index eb869dedbc..5feea8da6f 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/helloworldfeature/HelloWorldRpc.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/helloworldfeature/HelloWorldRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/helloworldfeature/HelloWorldState.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/helloworldfeature/HelloWorldState.java
index dca007c2ee..61080685d8 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/helloworldfeature/HelloWorldState.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/helloworldfeature/HelloWorldState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7a2/ComponentInStateState.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7a2/ComponentInStateState.java
index c1b6aef830..63a7fdfb31 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7a2/ComponentInStateState.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7a2/ComponentInStateState.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7a2/ComponentInStateStateConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7a2/ComponentInStateStateConnector.java
index 6b12e7d3c6..f20a8191d3 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7a2/ComponentInStateStateConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7a2/ComponentInStateStateConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,9 +29,8 @@ public class ComponentInStateStateConnector extends AbstractComponentConnector {
public void onStateChanged(StateChangeEvent stateChangeEvent) {
super.onStateChanged(stateChangeEvent);
- getWidget().setText(
- "Client-side type of other component: "
- + getOtherComponent().getClass().getName());
+ getWidget().setText("Client-side type of other component: "
+ + getOtherComponent().getClass().getName());
}
public ComponentConnector getOtherComponent() {
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7a2/MyComponentConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7a2/MyComponentConnector.java
index 36c54c8ee6..aee16c334d 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7a2/MyComponentConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7a2/MyComponentConnector.java
@@ -14,8 +14,8 @@ import com.vaadin.tests.minitutorials.v7a2.MyComponent;
@Connect(MyComponent.class)
public class MyComponentConnector extends AbstractComponentConnector {
- MyComponentServerRpc rpc = RpcProxy
- .create(MyComponentServerRpc.class, this);
+ MyComponentServerRpc rpc = RpcProxy.create(MyComponentServerRpc.class,
+ this);
public MyComponentConnector() {
getWidget().addClickHandler(new ClickHandler() {
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7a2/MyComponentWidget.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7a2/MyComponentWidget.java
index ba27fee6a3..67b1032018 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7a2/MyComponentWidget.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7a2/MyComponentWidget.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7a2/ResourceInStateConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7a2/ResourceInStateConnector.java
index df3dd5b753..2e44c4ed79 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7a2/ResourceInStateConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7a2/ResourceInStateConnector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7a2/WidgetContainerConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7a2/WidgetContainerConnector.java
index 88911e245d..823bdecf81 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7a2/WidgetContainerConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7a2/WidgetContainerConnector.java
@@ -9,11 +9,12 @@ import com.vaadin.shared.ui.Connect;
import com.vaadin.tests.minitutorials.v7a2.WidgetContainer;
@Connect(WidgetContainer.class)
-public class WidgetContainerConnector extends
- AbstractComponentContainerConnector {
+public class WidgetContainerConnector
+ extends AbstractComponentContainerConnector {
@Override
- public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent event) {
+ public void onConnectorHierarchyChange(
+ ConnectorHierarchyChangeEvent event) {
List<ComponentConnector> children = getChildComponents();
VWidgetContainer widget = getWidget();
widget.clear();
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7a3/ClientSideModule.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7a3/ClientSideModule.java
index 48bd8a76fb..cbe12b57a2 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7a3/ClientSideModule.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7a3/ClientSideModule.java
@@ -1,12 +1,12 @@
/*
* Copyright 2012 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7b1/CapsLockWarningRpc.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7b1/CapsLockWarningRpc.java
index cf73f2a00d..2fd0ffc3e5 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7b1/CapsLockWarningRpc.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7b1/CapsLockWarningRpc.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7b1/CapsLockWarningWithRpcConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7b1/CapsLockWarningWithRpcConnector.java
index 2f1d31a9d7..d8d1f43c32 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7b1/CapsLockWarningWithRpcConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/minitutorials/v7b1/CapsLockWarningWithRpcConnector.java
@@ -12,7 +12,8 @@ import com.vaadin.shared.ui.Connect;
import com.vaadin.tests.minitutorials.v7b1.CapsLockWarningWithRpc;
@Connect(CapsLockWarningWithRpc.class)
-public class CapsLockWarningWithRpcConnector extends AbstractExtensionConnector {
+public class CapsLockWarningWithRpcConnector
+ extends AbstractExtensionConnector {
private CapsLockWarningRpc rpc = getRpcProxy(CapsLockWarningRpc.class);
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/rebind/TestWidgetRegistryGenerator.java b/uitest/src/main/java/com/vaadin/tests/widgetset/rebind/TestWidgetRegistryGenerator.java
index c7b29e271b..6dd98a47b1 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/rebind/TestWidgetRegistryGenerator.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/rebind/TestWidgetRegistryGenerator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -89,7 +89,8 @@ public class TestWidgetRegistryGenerator extends Generator {
Invoker.class.getCanonicalName());
w.indent();
- w.println("public Object invoke(Object target, Object... params) {");
+ w.println(
+ "public Object invoke(Object target, Object... params) {");
w.indent();
w.println("return new %s();",
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/server/ClientRpcClass.java b/uitest/src/main/java/com/vaadin/tests/widgetset/server/ClientRpcClass.java
index b5136b926e..36405f256d 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/server/ClientRpcClass.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/server/ClientRpcClass.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/server/ClientRpcClassComponent.java b/uitest/src/main/java/com/vaadin/tests/widgetset/server/ClientRpcClassComponent.java
index 5b03634755..af9058cf97 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/server/ClientRpcClassComponent.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/server/ClientRpcClassComponent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/server/DelegateToWidgetComponent.java b/uitest/src/main/java/com/vaadin/tests/widgetset/server/DelegateToWidgetComponent.java
index 808b3bb9b7..224462b60a 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/server/DelegateToWidgetComponent.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/server/DelegateToWidgetComponent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/server/DelegateWithoutStateClassComponent.java b/uitest/src/main/java/com/vaadin/tests/widgetset/server/DelegateWithoutStateClassComponent.java
index 2af7efa8a4..3190aff42e 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/server/DelegateWithoutStateClassComponent.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/server/DelegateWithoutStateClassComponent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/server/DummyLabel.java b/uitest/src/main/java/com/vaadin/tests/widgetset/server/DummyLabel.java
index 881cbcc7c5..638c7d4630 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/server/DummyLabel.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/server/DummyLabel.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,7 +21,7 @@ import com.vaadin.ui.AbstractComponent;
/**
* Dummy component to cause {@link LabelState} to be used to test #8683
- *
+ *
* @author Vaadin Ltd
* @version @VERSION@
* @since 7.0.0
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/server/GenericWidgetComponent.java b/uitest/src/main/java/com/vaadin/tests/widgetset/server/GenericWidgetComponent.java
index 32320f0158..335121bf2a 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/server/GenericWidgetComponent.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/server/GenericWidgetComponent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/server/IdTestLabel.java b/uitest/src/main/java/com/vaadin/tests/widgetset/server/IdTestLabel.java
index c505151341..2c1afd3cd3 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/server/IdTestLabel.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/server/IdTestLabel.java
@@ -5,7 +5,7 @@ import com.vaadin.ui.Label;
/**
* Label that has a default id <code>default10179</code> for the use of
* IdOverrideTest (#10179).
- *
+ *
*/
public class IdTestLabel extends Label {
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/server/LayoutDetector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/server/LayoutDetector.java
index 4b1aea67ea..a49b0d260b 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/server/LayoutDetector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/server/LayoutDetector.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/server/MissingFromDefaultWidgetsetComponent.java b/uitest/src/main/java/com/vaadin/tests/widgetset/server/MissingFromDefaultWidgetsetComponent.java
index 37a33cc693..ee4bb64858 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/server/MissingFromDefaultWidgetsetComponent.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/server/MissingFromDefaultWidgetsetComponent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/server/ReplaceComponent.java b/uitest/src/main/java/com/vaadin/tests/widgetset/server/ReplaceComponent.java
index 81c8af95a6..6a9529fc1c 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/server/ReplaceComponent.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/server/ReplaceComponent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2012 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/server/ReplaceComponentUI.java b/uitest/src/main/java/com/vaadin/tests/widgetset/server/ReplaceComponentUI.java
index 1f83cb0d48..8b501fa48f 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/server/ReplaceComponentUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/server/ReplaceComponentUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2012 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/server/RoundTripTester.java b/uitest/src/main/java/com/vaadin/tests/widgetset/server/RoundTripTester.java
index ab123be70d..1b9003315c 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/server/RoundTripTester.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/server/RoundTripTester.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/server/ScrollableGridLayout.java b/uitest/src/main/java/com/vaadin/tests/widgetset/server/ScrollableGridLayout.java
index 6958172aa8..a155216d02 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/server/ScrollableGridLayout.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/server/ScrollableGridLayout.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/server/SerializerTestExtension.java b/uitest/src/main/java/com/vaadin/tests/widgetset/server/SerializerTestExtension.java
index 5fc5c19497..c8a1420008 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/server/SerializerTestExtension.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/server/SerializerTestExtension.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/server/TestWidgetComponent.java b/uitest/src/main/java/com/vaadin/tests/widgetset/server/TestWidgetComponent.java
index 1750e99727..322becaab5 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/server/TestWidgetComponent.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/server/TestWidgetComponent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -52,10 +52,10 @@ public class TestWidgetComponent extends AbstractComponent {
Widgetset widgetset = uiClass.getAnnotation(Widgetset.class);
if (widgetset == null
|| !widgetset.value().equals(TestingWidgetSet.NAME)) {
- throw new IllegalStateException("You must add @"
- + Widgetset.class.getSimpleName() + "("
- + TestingWidgetSet.class.getSimpleName() + ".NAME) to "
- + uiClass.getSimpleName());
+ throw new IllegalStateException(
+ "You must add @" + Widgetset.class.getSimpleName() + "("
+ + TestingWidgetSet.class.getSimpleName()
+ + ".NAME) to " + uiClass.getSimpleName());
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/server/UseStateFromHierachyComponent.java b/uitest/src/main/java/com/vaadin/tests/widgetset/server/UseStateFromHierachyComponent.java
index 3349024340..7403732643 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/server/UseStateFromHierachyComponent.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/server/UseStateFromHierachyComponent.java
@@ -1,12 +1,12 @@
/*
* Copyright 2012 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -20,8 +20,8 @@ import com.vaadin.tests.widgetset.client.UseStateFromHierachyChangeConnectorStat
import com.vaadin.ui.AbstractSingleComponentContainer;
import com.vaadin.ui.Component;
-public class UseStateFromHierachyComponent extends
- AbstractSingleComponentContainer {
+public class UseStateFromHierachyComponent
+ extends AbstractSingleComponentContainer {
@Override
protected UseStateFromHierachyChangeConnectorState getState() {
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/server/WidgetUtilUI.java b/uitest/src/main/java/com/vaadin/tests/widgetset/server/WidgetUtilUI.java
index 0489a8676f..ece5bca937 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/server/WidgetUtilUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/server/WidgetUtilUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/server/csrf/ui/AbstractCsrfTokenUI.java b/uitest/src/main/java/com/vaadin/tests/widgetset/server/csrf/ui/AbstractCsrfTokenUI.java
index f8f1754385..de2cf313d8 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/server/csrf/ui/AbstractCsrfTokenUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/server/csrf/ui/AbstractCsrfTokenUI.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.ui.Label;
/**
* Abstract UI to test the CSRF token issue as reported in (#14111)
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/server/csrf/ui/CsrfTokenDisabled.java b/uitest/src/main/java/com/vaadin/tests/widgetset/server/csrf/ui/CsrfTokenDisabled.java
index 6283285b40..1a70dd0718 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/server/csrf/ui/CsrfTokenDisabled.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/server/csrf/ui/CsrfTokenDisabled.java
@@ -29,7 +29,8 @@ import com.vaadin.launcher.CustomDeploymentConfiguration.Conf;
* @author Vaadin Ltd
*/
@SuppressWarnings("serial")
-@CustomDeploymentConfiguration({ @Conf(name = "disable-xsrf-protection", value = "true") })
+@CustomDeploymentConfiguration({
+ @Conf(name = "disable-xsrf-protection", value = "true") })
public class CsrfTokenDisabled extends AbstractCsrfTokenUI {
}
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/server/csrf/ui/CsrfTokenEnabled.java b/uitest/src/main/java/com/vaadin/tests/widgetset/server/csrf/ui/CsrfTokenEnabled.java
index cd02c6da77..ef244372b9 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/server/csrf/ui/CsrfTokenEnabled.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/server/csrf/ui/CsrfTokenEnabled.java
@@ -19,7 +19,8 @@ import com.vaadin.launcher.CustomDeploymentConfiguration;
import com.vaadin.launcher.CustomDeploymentConfiguration.Conf;
@SuppressWarnings("serial")
-@CustomDeploymentConfiguration({ @Conf(name = "disable-xsrf-protection", value = "false") })
+@CustomDeploymentConfiguration({
+ @Conf(name = "disable-xsrf-protection", value = "false") })
public class CsrfTokenEnabled extends AbstractCsrfTokenUI {
}
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/server/grid/GridClientColumnRenderers.java b/uitest/src/main/java/com/vaadin/tests/widgetset/server/grid/GridClientColumnRenderers.java
index ce260f108d..3f028450b1 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/server/grid/GridClientColumnRenderers.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/server/grid/GridClientColumnRenderers.java
@@ -92,8 +92,8 @@ public class GridClientColumnRenderers extends UI {
content.addComponent(controls);
setContent(content);
- final NativeSelect select = new NativeSelect(
- "Add Column with Renderer", Arrays.asList(Renderers.values()));
+ final NativeSelect select = new NativeSelect("Add Column with Renderer",
+ Arrays.asList(Renderers.values()));
select.setItemCaptionMode(ItemCaptionMode.EXPLICIT);
for (Renderers renderer : Renderers.values()) {
select.setItemCaption(renderer, renderer.toString());
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/server/gwtrpc/GwtRpcServletTest.java b/uitest/src/main/java/com/vaadin/tests/widgetset/server/gwtrpc/GwtRpcServletTest.java
index df01b4dc81..d484e2cf30 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/server/gwtrpc/GwtRpcServletTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/server/gwtrpc/GwtRpcServletTest.java
@@ -24,8 +24,8 @@ import com.vaadin.tests.widgetset.client.gwtrpc.GwtRpcServiceTest;
* @author Vaadin Ltd
*/
@SuppressWarnings("serial")
-public class GwtRpcServletTest extends RemoteServiceServlet implements
- GwtRpcServiceTest {
+public class GwtRpcServletTest extends RemoteServiceServlet
+ implements GwtRpcServiceTest {
@Override
public String giveMeThat(String that, String haveThis) {
diff --git a/uitest/src/test/java/com/vaadin/tests/CurrentTimeMillisTest.java b/uitest/src/test/java/com/vaadin/tests/CurrentTimeMillisTest.java
index 656b269c06..7eb8087041 100644
--- a/uitest/src/test/java/com/vaadin/tests/CurrentTimeMillisTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/CurrentTimeMillisTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,7 +30,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test to check high resolution time availability in browser (depending on
* browser).
- *
+ *
* @author Vaadin Ltd
*/
public class CurrentTimeMillisTest extends MultiBrowserTest {
@@ -56,12 +56,14 @@ public class CurrentTimeMillisTest extends MultiBrowserTest {
if (BrowserUtil.isChrome(getDesiredCapabilities())) {
// Chrome (version 33 at least) sometimes doesn't use high res
// time if number of ms is less then 1
- Assert.assertTrue("High resolution time is not used in "
- + "JSON parsing mesurement. Time=" + time,
+ Assert.assertTrue(
+ "High resolution time is not used in "
+ + "JSON parsing mesurement. Time=" + time,
time.equals("0") || time.indexOf('.') > 0);
} else {
- Assert.assertTrue("High resolution time is not used in "
- + "JSON parsing mesurement. Time=" + time,
+ Assert.assertTrue(
+ "High resolution time is not used in "
+ + "JSON parsing mesurement. Time=" + time,
time.indexOf('.') > 0);
}
} else {
@@ -78,8 +80,8 @@ public class CurrentTimeMillisTest extends MultiBrowserTest {
actions.sendKeys(Keys.SPACE).perform();
findElement(By.className("v-debugwindow-tab")).click();
- List<WebElement> messages = findElements(By
- .className("v-debugwindow-message"));
+ List<WebElement> messages = findElements(
+ By.className("v-debugwindow-message"));
for (WebElement message : messages) {
if (message.getAttribute("innerHTML").startsWith("JSON parsing")) {
String text = message.getAttribute("innerHTML");
diff --git a/uitest/src/test/java/com/vaadin/tests/VerifyBrowserVersionTest.java b/uitest/src/test/java/com/vaadin/tests/VerifyBrowserVersionTest.java
index 70accdd0d0..e6fd33149d 100644
--- a/uitest/src/test/java/com/vaadin/tests/VerifyBrowserVersionTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/VerifyBrowserVersionTest.java
@@ -39,8 +39,8 @@ public class VerifyBrowserVersionTest extends MultiBrowserTest {
if (BrowserUtil.isChrome(getDesiredCapabilities())) {
// Chrome version does not necessarily match the desired version
// because of auto updates...
- browserIdentifier = getExpectedUserAgentString(getDesiredCapabilities())
- + "52";
+ browserIdentifier = getExpectedUserAgentString(
+ getDesiredCapabilities()) + "52";
} else {
browserIdentifier = getExpectedUserAgentString(desiredCapabilities)
+ desiredCapabilities.getVersion();
diff --git a/uitest/src/test/java/com/vaadin/tests/VerifyJreVersionTest.java b/uitest/src/test/java/com/vaadin/tests/VerifyJreVersionTest.java
index b78a4ad314..6e20747e8c 100644
--- a/uitest/src/test/java/com/vaadin/tests/VerifyJreVersionTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/VerifyJreVersionTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/accessibility/WindowWaiAriaRolesTest.java b/uitest/src/test/java/com/vaadin/tests/accessibility/WindowWaiAriaRolesTest.java
index e1d0452708..d5056b2334 100644
--- a/uitest/src/test/java/com/vaadin/tests/accessibility/WindowWaiAriaRolesTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/accessibility/WindowWaiAriaRolesTest.java
@@ -35,8 +35,9 @@ public class WindowWaiAriaRolesTest extends MultiBrowserTest {
$(ButtonElement.class).caption("Regular").first().click();
String role = getWindowRole();
- Assert.assertTrue("Dialog has incorrect role '" + role
- + "', expected 'dialog'", "dialog".equals(role));
+ Assert.assertTrue(
+ "Dialog has incorrect role '" + role + "', expected 'dialog'",
+ "dialog".equals(role));
}
@Test
@@ -44,8 +45,10 @@ public class WindowWaiAriaRolesTest extends MultiBrowserTest {
openTestURL();
$(ButtonElement.class).caption("Alert").first().click();
String role = getWindowRole();
- Assert.assertTrue("Dialog has incorrect role '" + role
- + "', expected 'alertdialog'", "alertdialog".equals(role));
+ Assert.assertTrue(
+ "Dialog has incorrect role '" + role
+ + "', expected 'alertdialog'",
+ "alertdialog".equals(role));
}
public String getWindowRole() {
diff --git a/uitest/src/test/java/com/vaadin/tests/application/CriticalNotificationsTest.java b/uitest/src/test/java/com/vaadin/tests/application/CriticalNotificationsTest.java
index 51fe3dfd06..f8efe5beb7 100644
--- a/uitest/src/test/java/com/vaadin/tests/application/CriticalNotificationsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/application/CriticalNotificationsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/application/DeploymentConfigurationTest.java b/uitest/src/test/java/com/vaadin/tests/application/DeploymentConfigurationTest.java
index 9a51980c9e..1cc028e153 100644
--- a/uitest/src/test/java/com/vaadin/tests/application/DeploymentConfigurationTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/application/DeploymentConfigurationTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/application/DetachOldUIOnReloadTest.java b/uitest/src/test/java/com/vaadin/tests/application/DetachOldUIOnReloadTest.java
index 1e156c3e46..868b38b9ad 100644
--- a/uitest/src/test/java/com/vaadin/tests/application/DetachOldUIOnReloadTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/application/DetachOldUIOnReloadTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -38,8 +38,8 @@ public class DetachOldUIOnReloadTest extends MultiBrowserTest {
assertEquals("initial label incorrect", "This is UI 0",
lastLabelText(labels));
- assertFalse("reloading button not found", $(ButtonElement.class)
- .caption(RELOAD).all().isEmpty());
+ assertFalse("reloading button not found",
+ $(ButtonElement.class).caption(RELOAD).all().isEmpty());
openTestURL();
click(READ_LOG);
@@ -68,9 +68,12 @@ public class DetachOldUIOnReloadTest extends MultiBrowserTest {
String.format("label incorrect after %s reload", descriptor),
String.format("This is UI %s", index), lastLabelText(labels));
if (!"final".equals(descriptor)) {
- assertEquals(String.format("log message incorrect after %s reload",
- descriptor), String.format("%s. UI %s has been detached",
- index, index - 1), labels.get(0).getText());
+ assertEquals(
+ String.format("log message incorrect after %s reload",
+ descriptor),
+ String.format("%s. UI %s has been detached", index,
+ index - 1),
+ labels.get(0).getText());
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/application/ErrorInUnloadEventTest.java b/uitest/src/test/java/com/vaadin/tests/application/ErrorInUnloadEventTest.java
index fa316c6749..12a5b1c67c 100644
--- a/uitest/src/test/java/com/vaadin/tests/application/ErrorInUnloadEventTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/application/ErrorInUnloadEventTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/application/MissingHierarchyDetectionTest.java b/uitest/src/test/java/com/vaadin/tests/application/MissingHierarchyDetectionTest.java
index 3d43b8f885..ad44fe6f89 100644
--- a/uitest/src/test/java/com/vaadin/tests/application/MissingHierarchyDetectionTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/application/MissingHierarchyDetectionTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,8 +30,8 @@ public class MissingHierarchyDetectionTest extends SingleBrowserTest {
Assert.assertTrue(isElementPresent(By.id("label")));
- ButtonElement toggleProperly = $(ButtonElement.class).caption(
- "Toggle properly").first();
+ ButtonElement toggleProperly = $(ButtonElement.class)
+ .caption("Toggle properly").first();
toggleProperly.click();
assertNoSystemNotifications();
@@ -41,8 +41,8 @@ public class MissingHierarchyDetectionTest extends SingleBrowserTest {
assertNoSystemNotifications();
Assert.assertTrue(isElementPresent(LabelElement.class));
- ButtonElement toggleInproperly = $(ButtonElement.class).caption(
- "Toggle improperly").first();
+ ButtonElement toggleInproperly = $(ButtonElement.class)
+ .caption("Toggle improperly").first();
toggleInproperly.click();
assertSystemNotification();
diff --git a/uitest/src/test/java/com/vaadin/tests/application/PreserveWithExpiredHeartbeatTest.java b/uitest/src/test/java/com/vaadin/tests/application/PreserveWithExpiredHeartbeatTest.java
index 04dbdca31e..19c8d96593 100644
--- a/uitest/src/test/java/com/vaadin/tests/application/PreserveWithExpiredHeartbeatTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/application/PreserveWithExpiredHeartbeatTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,7 +32,8 @@ public class PreserveWithExpiredHeartbeatTest extends SingleBrowserTest {
long startTime = System.currentTimeMillis();
- while (System.currentTimeMillis() - startTime < heartbeatInterval * 3.1) {
+ while (System.currentTimeMillis() - startTime < heartbeatInterval
+ * 3.1) {
// "Close" the tab
driver.get("about:blank");
diff --git a/uitest/src/test/java/com/vaadin/tests/application/ReconnectDialogThemeTest.java b/uitest/src/test/java/com/vaadin/tests/application/ReconnectDialogThemeTest.java
index eb55a7fb5e..7fe3dd7c6b 100644
--- a/uitest/src/test/java/com/vaadin/tests/application/ReconnectDialogThemeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/application/ReconnectDialogThemeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -70,8 +70,8 @@ public class ReconnectDialogThemeTest extends MultiBrowserThemeTestWithProxy {
// Show spinner and make sure it is shown by comparing to the screenshot
// without a spinner
executeScript("arguments[0].style.visibility='visible';", spinner);
- BufferedImage fullScreen = ImageIO.read(new ByteArrayInputStream(
- ((TakesScreenshot) getDriver())
+ BufferedImage fullScreen = ImageIO
+ .read(new ByteArrayInputStream(((TakesScreenshot) getDriver())
.getScreenshotAs(OutputType.BYTES)));
BufferedImage spinnerImage = CustomTestBenchCommandExecutor
.cropToElement(spinner, fullScreen,
@@ -109,7 +109,8 @@ public class ReconnectDialogThemeTest extends MultiBrowserThemeTestWithProxy {
@Override
public Boolean apply(WebDriver input) {
try {
- final WebElement reconnectDialog = findElement(ReconnectDialogThemeTest.reconnectDialogBy);
+ final WebElement reconnectDialog = findElement(
+ ReconnectDialogThemeTest.reconnectDialogBy);
return reconnectDialog.findElement(By.className("text"))
.getText().equals(text);
} catch (Exception e) {
@@ -120,11 +121,13 @@ public class ReconnectDialogThemeTest extends MultiBrowserThemeTestWithProxy {
}
- private void assertHasManyColors(String message, BufferedImage spinnerImage) {
+ private void assertHasManyColors(String message,
+ BufferedImage spinnerImage) {
int backgroundColor = spinnerImage.getRGB(0, 0);
for (int x = 0; x < spinnerImage.getWidth(); x++) {
for (int y = 0; y < spinnerImage.getHeight(); y++) {
- if (Math.abs(spinnerImage.getRGB(x, y) - backgroundColor) > 50) {
+ if (Math.abs(
+ spinnerImage.getRGB(x, y) - backgroundColor) > 50) {
return;
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/application/ReconnectDialogUITest.java b/uitest/src/test/java/com/vaadin/tests/application/ReconnectDialogUITest.java
index b07124c216..26440fe18f 100644
--- a/uitest/src/test/java/com/vaadin/tests/application/ReconnectDialogUITest.java
+++ b/uitest/src/test/java/com/vaadin/tests/application/ReconnectDialogUITest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -54,7 +54,8 @@ public class ReconnectDialogUITest extends MultiBrowserTestWithProxy {
Assert.assertEquals("1. Hello from the server", getLogRow(0));
disconnectProxy();
getButton().click();
- waitForReconnectDialogWithText("Server connection lost, trying to reconnect...");
+ waitForReconnectDialogWithText(
+ "Server connection lost, trying to reconnect...");
connectProxy();
waitForReconnectDialogToDisappear();
Assert.assertEquals("2. Hello from the server", getLogRow(0));
@@ -62,7 +63,8 @@ public class ReconnectDialogUITest extends MultiBrowserTestWithProxy {
private void waitForReconnectDialogWithText(final String text) {
waitForReconnectDialogPresent();
- final WebElement reconnectDialog = findElement(ReconnectDialogThemeTest.reconnectDialogBy);
+ final WebElement reconnectDialog = findElement(
+ ReconnectDialogThemeTest.reconnectDialogBy);
waitUntil(new ExpectedCondition<Boolean>() {
@Override
public Boolean apply(WebDriver input) {
diff --git a/uitest/src/test/java/com/vaadin/tests/application/RefreshStatePreserveTest.java b/uitest/src/test/java/com/vaadin/tests/application/RefreshStatePreserveTest.java
index a54d8b4ce9..3257e3429f 100644
--- a/uitest/src/test/java/com/vaadin/tests/application/RefreshStatePreserveTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/application/RefreshStatePreserveTest.java
@@ -24,6 +24,7 @@ public class RefreshStatePreserveTest extends MultiBrowserTest {
private void assertCorrectState() {
waitForElementPresent(By.className("v-label"));
LabelElement uiIdLabel = $(LabelElement.class).get(7);
- Assert.assertEquals("Incorrect UI id,", UI_ID_TEXT, uiIdLabel.getText());
+ Assert.assertEquals("Incorrect UI id,", UI_ID_TEXT,
+ uiIdLabel.getText());
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/application/ResynchronizeAfterAsyncRemovalTest.java b/uitest/src/test/java/com/vaadin/tests/application/ResynchronizeAfterAsyncRemovalTest.java
index 7f2dabe9f1..b1be11d933 100644
--- a/uitest/src/test/java/com/vaadin/tests/application/ResynchronizeAfterAsyncRemovalTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/application/ResynchronizeAfterAsyncRemovalTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/application/ResynchronizeUITest.java b/uitest/src/test/java/com/vaadin/tests/application/ResynchronizeUITest.java
index 726616d7b8..eabb0b2ee1 100644
--- a/uitest/src/test/java/com/vaadin/tests/application/ResynchronizeUITest.java
+++ b/uitest/src/test/java/com/vaadin/tests/application/ResynchronizeUITest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -36,8 +36,8 @@ public class ResynchronizeUITest extends SingleBrowserTest {
@Override
public List<DesiredCapabilities> getBrowsersToTest() {
// PhantomJS does not send onload events for styles
- return Collections.singletonList(Browser.FIREFOX
- .getDesiredCapabilities());
+ return Collections
+ .singletonList(Browser.FIREFOX.getDesiredCapabilities());
}
@Test
@@ -51,7 +51,8 @@ public class ResynchronizeUITest extends SingleBrowserTest {
waitForThemeToChange("runo");
try {
button.click();
- Assert.fail("The old button element should have been removed by the click and replaced by a new one.");
+ Assert.fail(
+ "The old button element should have been removed by the click and replaced by a new one.");
} catch (StaleElementReferenceException e) {
// This is what should happen
}
diff --git a/uitest/src/test/java/com/vaadin/tests/application/TimingInfoReportedTest.java b/uitest/src/test/java/com/vaadin/tests/application/TimingInfoReportedTest.java
index 0b9ab77d81..35b38a8bd0 100644
--- a/uitest/src/test/java/com/vaadin/tests/application/TimingInfoReportedTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/application/TimingInfoReportedTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/application/VaadinSessionAttributeTest.java b/uitest/src/test/java/com/vaadin/tests/application/VaadinSessionAttributeTest.java
index 47e86d9039..11dc4ff0ab 100644
--- a/uitest/src/test/java/com/vaadin/tests/application/VaadinSessionAttributeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/application/VaadinSessionAttributeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/applicationcontext/CleanupBrokenUITest.java b/uitest/src/test/java/com/vaadin/tests/applicationcontext/CleanupBrokenUITest.java
index 404e05eefc..d20c407af6 100644
--- a/uitest/src/test/java/com/vaadin/tests/applicationcontext/CleanupBrokenUITest.java
+++ b/uitest/src/test/java/com/vaadin/tests/applicationcontext/CleanupBrokenUITest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,8 +28,8 @@ public class CleanupBrokenUITest extends SingleBrowserTest {
// UI 1 has not yet been added in UI.init where logging takes place
Assert.assertEquals("1. UIs in session: 0", getLogRow(0));
- String url = getTestURL(getUIClass())
- .replace("restartApplication", "1");
+ String url = getTestURL(getUIClass()).replace("restartApplication",
+ "1");
driver.get(url);
// UI 1 remains in session during UI2 init where logging takes place
Assert.assertEquals("1. UIs in session: 1", getLogRow(0));
diff --git a/uitest/src/test/java/com/vaadin/tests/applicationcontext/CloseSessionTest.java b/uitest/src/test/java/com/vaadin/tests/applicationcontext/CloseSessionTest.java
index 1d6bf3f9bf..5d0ef4e1a8 100644
--- a/uitest/src/test/java/com/vaadin/tests/applicationcontext/CloseSessionTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/applicationcontext/CloseSessionTest.java
@@ -45,8 +45,8 @@ public class CloseSessionTest extends MultiBrowserTest {
public void testCloseVaadinServiceAndRedirect() {
clickButton("Close VaadinServiceSession and redirect elsewhere");
Assert.assertEquals("Unexpected page contents,",
- "This is a static file", findElement(By.xpath("//h1"))
- .getText());
+ "This is a static file",
+ findElement(By.xpath("//h1")).getText());
}
/**
diff --git a/uitest/src/test/java/com/vaadin/tests/applicationcontext/RpcForClosedUITest.java b/uitest/src/test/java/com/vaadin/tests/applicationcontext/RpcForClosedUITest.java
index bb9d2a9294..d2818205df 100644
--- a/uitest/src/test/java/com/vaadin/tests/applicationcontext/RpcForClosedUITest.java
+++ b/uitest/src/test/java/com/vaadin/tests/applicationcontext/RpcForClosedUITest.java
@@ -21,8 +21,8 @@ public class RpcForClosedUITest extends MultiBrowserTest {
clickButton("Log 'hello'");
/* Ensure 'hello' was not logged */
checkLogMatches("2. Current WrappedSession id: .*");
- Assert.assertFalse("Page contains word 'Hello'", driver.getPageSource()
- .contains("Hello"));
+ Assert.assertFalse("Page contains word 'Hello'",
+ driver.getPageSource().contains("Hello"));
}
private void clickButton(String caption) {
diff --git a/uitest/src/test/java/com/vaadin/tests/applicationservlet/CustomDeploymentConfTest.java b/uitest/src/test/java/com/vaadin/tests/applicationservlet/CustomDeploymentConfTest.java
index e74eea6c55..ece07b9512 100644
--- a/uitest/src/test/java/com/vaadin/tests/applicationservlet/CustomDeploymentConfTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/applicationservlet/CustomDeploymentConfTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/applicationservlet/DisableSendUrlAsParametersTest.java b/uitest/src/test/java/com/vaadin/tests/applicationservlet/DisableSendUrlAsParametersTest.java
index f10f281646..d59db5a6ab 100644
--- a/uitest/src/test/java/com/vaadin/tests/applicationservlet/DisableSendUrlAsParametersTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/applicationservlet/DisableSendUrlAsParametersTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/applicationservlet/MultipleServletConfigurationTest.java b/uitest/src/test/java/com/vaadin/tests/applicationservlet/MultipleServletConfigurationTest.java
index 39e8d04ffc..9ee118bae2 100644
--- a/uitest/src/test/java/com/vaadin/tests/applicationservlet/MultipleServletConfigurationTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/applicationservlet/MultipleServletConfigurationTest.java
@@ -15,11 +15,14 @@ public class MultipleServletConfigurationTest extends MultiBrowserTest {
@Test
public void testMultipleServletConfiguration() throws Exception {
getDriver().get(getBaseURL() + "/embed1");
- assertLabelText("A generic test for Buttons in different configurations");
+ assertLabelText(
+ "A generic test for Buttons in different configurations");
getDriver().get(getBaseURL() + "/embed2");
- assertLabelText("Margins inside labels should not be allowed to collapse out of the label as it causes problems with layotus measuring the label.");
+ assertLabelText(
+ "Margins inside labels should not be allowed to collapse out of the label as it causes problems with layotus measuring the label.");
getDriver().get(getBaseURL() + "/embed1");
- assertLabelText("A generic test for Buttons in different configurations");
+ assertLabelText(
+ "A generic test for Buttons in different configurations");
}
private void assertLabelText(String expected) {
diff --git a/uitest/src/test/java/com/vaadin/tests/applicationservlet/NoApplicationClassTest.java b/uitest/src/test/java/com/vaadin/tests/applicationservlet/NoApplicationClassTest.java
index 3faf5bde72..f8e897db3c 100644
--- a/uitest/src/test/java/com/vaadin/tests/applicationservlet/NoApplicationClassTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/applicationservlet/NoApplicationClassTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,8 +32,8 @@ public class NoApplicationClassTest extends SingleBrowserTest {
Assert.assertTrue(
String.format(
"Unexpected error message.\n expected to contain: '%s'\n was: %s",
- expected, exceptionMessage), exceptionMessage
- .contains(expected));
+ expected, exceptionMessage),
+ exceptionMessage.contains(expected));
}
@Override
diff --git a/uitest/src/test/java/com/vaadin/tests/applicationservlet/SystemMessagesTest.java b/uitest/src/test/java/com/vaadin/tests/applicationservlet/SystemMessagesTest.java
index bbbb49b39c..dd5248ce76 100644
--- a/uitest/src/test/java/com/vaadin/tests/applicationservlet/SystemMessagesTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/applicationservlet/SystemMessagesTest.java
@@ -29,6 +29,7 @@ public class SystemMessagesTest extends MultiBrowserTest {
Assert.assertEquals("Incorrect notification caption,",
notification.getCaption(), "Internal error");
Assert.assertEquals("Incorrect notification description,",
- notification.getDescription(), "MessagesInfo locale: " + locale);
+ notification.getDescription(),
+ "MessagesInfo locale: " + locale);
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/applicationservlet/UIProviderInitParameterTest.java b/uitest/src/test/java/com/vaadin/tests/applicationservlet/UIProviderInitParameterTest.java
index 7f9a375440..e80e609ffa 100644
--- a/uitest/src/test/java/com/vaadin/tests/applicationservlet/UIProviderInitParameterTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/applicationservlet/UIProviderInitParameterTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/AbstractOrderedLayoutWithCaptionsTest.java b/uitest/src/test/java/com/vaadin/tests/components/AbstractOrderedLayoutWithCaptionsTest.java
index 69e4aaa06c..ca9c21d226 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/AbstractOrderedLayoutWithCaptionsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/AbstractOrderedLayoutWithCaptionsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,7 +31,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test to see if AbstractOrderedLayout displays captions correctly with
* expanding ratios.
- *
+ *
* @author Vaadin Ltd
*/
public class AbstractOrderedLayoutWithCaptionsTest extends MultiBrowserTest {
@@ -40,13 +40,13 @@ public class AbstractOrderedLayoutWithCaptionsTest extends MultiBrowserTest {
public void CaptionHeightMeasuredCorrectly() {
openTestURL();
- WebElement div = getDriver().findElement(
- By.cssSelector(".v-panel-content > div > div"));
+ WebElement div = getDriver()
+ .findElement(By.cssSelector(".v-panel-content > div > div"));
String paddingTop = div.getCssValue("padding-top");
- Integer paddingHeight = Integer.parseInt(paddingTop.substring(0,
- paddingTop.length() - 2));
- List<WebElement> children = getDriver().findElements(
- By.cssSelector(".v-panel-content .v-slot"));
+ Integer paddingHeight = Integer
+ .parseInt(paddingTop.substring(0, paddingTop.length() - 2));
+ List<WebElement> children = getDriver()
+ .findElements(By.cssSelector(".v-panel-content .v-slot"));
assertThat(children.size(), is(3));
Integer neededHeight = children.get(0).getSize().getHeight()
diff --git a/uitest/src/test/java/com/vaadin/tests/components/FileDownloaderUITest.java b/uitest/src/test/java/com/vaadin/tests/components/FileDownloaderUITest.java
index 73d1ba6f52..d5ec33e6ba 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/FileDownloaderUITest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/FileDownloaderUITest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/NoLayoutUpdateWhichNeedsLayoutTest.java b/uitest/src/test/java/com/vaadin/tests/components/NoLayoutUpdateWhichNeedsLayoutTest.java
index bc12919ccd..a465284eee 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/NoLayoutUpdateWhichNeedsLayoutTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/NoLayoutUpdateWhichNeedsLayoutTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/OutOfSyncTest.java b/uitest/src/test/java/com/vaadin/tests/components/OutOfSyncTest.java
index c6bab3c9b9..e2b49aefc7 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/OutOfSyncTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/OutOfSyncTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/SaneErrorsTest.java b/uitest/src/test/java/com/vaadin/tests/components/SaneErrorsTest.java
index a43db58fd0..4b8e231a28 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/SaneErrorsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/SaneErrorsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,7 +30,7 @@ public class SaneErrorsTest extends MultiBrowserTest {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.tb3.MultiBrowserTest#getBrowsersToTest()
*/
@Override
@@ -41,8 +41,8 @@ public class SaneErrorsTest extends MultiBrowserTest {
@Test
public void test() {
openTestURL();
- List<WebElement> elements = getDriver().findElements(
- By.xpath("//*[text() = 'Show me my NPE!']"));
+ List<WebElement> elements = getDriver()
+ .findElements(By.xpath("//*[text() = 'Show me my NPE!']"));
for (WebElement webElement : elements) {
webElement.click();
}
@@ -50,8 +50,8 @@ public class SaneErrorsTest extends MultiBrowserTest {
getDriver().findElement(By.xpath("//*[text() = 'Collect exceptions']"))
.click();
- List<WebElement> errorMessages = getDriver().findElements(
- By.className("v-label"));
+ List<WebElement> errorMessages = getDriver()
+ .findElements(By.className("v-label"));
for (WebElement webElement : errorMessages) {
String text = webElement.getText();
Assert.assertEquals("java.lang.NullPointerException", text);
diff --git a/uitest/src/test/java/com/vaadin/tests/components/TooltipPositionTest.java b/uitest/src/test/java/com/vaadin/tests/components/TooltipPositionTest.java
index 8e1df42f50..b8276974ea 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/TooltipPositionTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/TooltipPositionTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -34,7 +34,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests that the tooltip is positioned so that it fits in the displayed area.
- *
+ *
* @author Vaadin Ltd
*/
public class TooltipPositionTest extends MultiBrowserTest {
@@ -164,10 +164,10 @@ public class TooltipPositionTest extends MultiBrowserTest {
int yTop = topLeft.getY();
int xRight = xLeft + tooltipSize.getWidth() - 1;
int yBottom = yTop + tooltipSize.getHeight() - 1;
- boolean overlapHorizontally = !(xRight < 0 || xLeft >= windowSize
- .getWidth());
- boolean overlapVertically = !(yBottom < 0 || yTop >= windowSize
- .getHeight());
+ boolean overlapHorizontally = !(xRight < 0
+ || xLeft >= windowSize.getWidth());
+ boolean overlapVertically = !(yBottom < 0
+ || yTop >= windowSize.getHeight());
return !(overlapHorizontally && overlapVertically);
}
} \ No newline at end of file
diff --git a/uitest/src/test/java/com/vaadin/tests/components/UnknownComponentConnectorTest.java b/uitest/src/test/java/com/vaadin/tests/components/UnknownComponentConnectorTest.java
index 49539fcae1..c734463180 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/UnknownComponentConnectorTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/UnknownComponentConnectorTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,11 +31,9 @@ public class UnknownComponentConnectorTest extends MultiBrowserTest {
public void testConnectorNotFoundInWidgetset() throws Exception {
openTestURL();
WebElement component = vaadinElementById("no-connector-component");
- assertTrue(component
- .getText()
- .startsWith(
- "Widgetset 'com.vaadin.DefaultWidgetSet' does not contain "
- + "implementation for com.vaadin.tests.components.UnknownComponentConnector."
- + "ComponentWithoutConnector."));
+ assertTrue(component.getText().startsWith(
+ "Widgetset 'com.vaadin.DefaultWidgetSet' does not contain "
+ + "implementation for com.vaadin.tests.components.UnknownComponentConnector."
+ + "ComponentWithoutConnector."));
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutRelativeSizeContentTest.java b/uitest/src/test/java/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutRelativeSizeContentTest.java
index 6cb8c476c9..c225c87405 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutRelativeSizeContentTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutRelativeSizeContentTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests how AbsoluteLayout handles relative sized contents.
- *
+ *
* @author Vaadin Ltd
*/
public class AbsoluteLayoutRelativeSizeContentTest extends MultiBrowserTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/abstractcomponent/ChangeHierarchyBeforeResponseTest.java b/uitest/src/test/java/com/vaadin/tests/components/abstractcomponent/ChangeHierarchyBeforeResponseTest.java
index 485e218a68..6190d65e11 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/abstractcomponent/ChangeHierarchyBeforeResponseTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/abstractcomponent/ChangeHierarchyBeforeResponseTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/abstractcomponent/ContextClickUITest.java b/uitest/src/test/java/com/vaadin/tests/components/abstractcomponent/ContextClickUITest.java
index 4b975dbecc..7dbb8af52e 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/abstractcomponent/ContextClickUITest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/abstractcomponent/ContextClickUITest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -61,7 +61,7 @@ public class ContextClickUITest extends MultiBrowserTest {
.moveToElement($(UIElement.class).first(), 10, 10).click()
.perform();
- assertTrue("Context click should not be handled.", getLogRow(0).trim()
- .isEmpty());
+ assertTrue("Context click should not be handled.",
+ getLogRow(0).trim().isEmpty());
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/abstractcomponent/PrimaryStyleTest.java b/uitest/src/test/java/com/vaadin/tests/components/abstractcomponent/PrimaryStyleTest.java
index 8500fbe18d..3a1e105e14 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/abstractcomponent/PrimaryStyleTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/abstractcomponent/PrimaryStyleTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -35,16 +35,16 @@ public class PrimaryStyleTest extends MultiBrowserTest {
openTestURL();
// Verify the initial class names for all three components.
- List<WebElement> initialElements = driver.findElements(By
- .className("initial-state"));
+ List<WebElement> initialElements = driver
+ .findElements(By.className("initial-state"));
assertThat(initialElements, hasSize(3));
// Click on a button that updates the styles.
$(ButtonElement.class).id("update-button").click();
// Verify that the class names where updated as expected.
- List<WebElement> updatedElements = driver.findElements(By
- .className("updated-correctly"));
+ List<WebElement> updatedElements = driver
+ .findElements(By.className("updated-correctly"));
assertThat(updatedElements, hasSize(initialElements.size()));
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/abstractcomponent/ResponseWritingErrorHandlingTest.java b/uitest/src/test/java/com/vaadin/tests/components/abstractcomponent/ResponseWritingErrorHandlingTest.java
index 7b939a5627..79d08ec896 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/abstractcomponent/ResponseWritingErrorHandlingTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/abstractcomponent/ResponseWritingErrorHandlingTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/abstractembedded/EmbeddedWithNullSourceTest.java b/uitest/src/test/java/com/vaadin/tests/components/abstractembedded/EmbeddedWithNullSourceTest.java
index 649ee42986..c97c997231 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/abstractembedded/EmbeddedWithNullSourceTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/abstractembedded/EmbeddedWithNullSourceTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/abstractfield/AbstractComponentStyleNameTest.java b/uitest/src/test/java/com/vaadin/tests/components/abstractfield/AbstractComponentStyleNameTest.java
index 41ba5571ad..6c6c2e2775 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/abstractfield/AbstractComponentStyleNameTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/abstractfield/AbstractComponentStyleNameTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/abstractfield/ShortcutAddAndRemoveTest.java b/uitest/src/test/java/com/vaadin/tests/components/abstractfield/ShortcutAddAndRemoveTest.java
index edae0a24c2..716ff60a2d 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/abstractfield/ShortcutAddAndRemoveTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/abstractfield/ShortcutAddAndRemoveTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/abstractfield/ShortcutWhenBodyFocusedTest.java b/uitest/src/test/java/com/vaadin/tests/components/abstractfield/ShortcutWhenBodyFocusedTest.java
index 2d9c9a494b..9df68e5c80 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/abstractfield/ShortcutWhenBodyFocusedTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/abstractfield/ShortcutWhenBodyFocusedTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/accordion/AccordionAddTabTest.java b/uitest/src/test/java/com/vaadin/tests/components/accordion/AccordionAddTabTest.java
index 95b7a9c416..6df76978bb 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/accordion/AccordionAddTabTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/accordion/AccordionAddTabTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test for Accordion : replace widget in tab should remove old widget.
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
@@ -41,8 +41,10 @@ public class AccordionAddTabTest extends MultiBrowserTest {
List<WebElement> panels = driver.findElements(By.className("v-panel"));
- Assert.assertEquals("Found two widgets inside one tab after "
- + "subsequent tab removal and addition", 1, panels.size());
+ Assert.assertEquals(
+ "Found two widgets inside one tab after "
+ + "subsequent tab removal and addition",
+ 1, panels.size());
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/accordion/AccordionRemoveComponentTest.java b/uitest/src/test/java/com/vaadin/tests/components/accordion/AccordionRemoveComponentTest.java
index 785acddcb7..fa82a1f2ab 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/accordion/AccordionRemoveComponentTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/accordion/AccordionRemoveComponentTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test for removing component from Accordion
- *
+ *
* @author Vaadin Ltd
*/
public class AccordionRemoveComponentTest extends MultiBrowserTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/accordion/AccordionRemoveTabTest.java b/uitest/src/test/java/com/vaadin/tests/components/accordion/AccordionRemoveTabTest.java
index 1047c070c8..836b9ddc57 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/accordion/AccordionRemoveTabTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/accordion/AccordionRemoveTabTest.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -24,7 +24,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test for Accordion: tabs should stay selectable after remove tab.
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
@@ -48,18 +48,18 @@ public class AccordionRemoveTabTest extends MultiBrowserTest {
public void testConsoleErrorOnSwitch() {
setDebug(true);
openTestURL();
- WebElement firstItem = driver.findElement(By
- .className("v-accordion-item-first"));
- WebElement caption = firstItem.findElement(By
- .className("v-accordion-item-caption"));
+ WebElement firstItem = driver
+ .findElement(By.className("v-accordion-item-first"));
+ WebElement caption = firstItem
+ .findElement(By.className("v-accordion-item-caption"));
caption.click();
Assert.assertEquals("Errors present in console", 0,
findElements(By.className("SEVERE")).size());
}
private void checkFirstItemHeight(String text) {
- WebElement firstItem = driver.findElement(By
- .className("v-accordion-item-first"));
+ WebElement firstItem = driver
+ .findElement(By.className("v-accordion-item-first"));
WebElement label = firstItem.findElement(By.className("v-label"));
Assert.assertEquals("Unexpected text in first item", text,
label.getText());
diff --git a/uitest/src/test/java/com/vaadin/tests/components/accordion/AccordionTabIdsTest.java b/uitest/src/test/java/com/vaadin/tests/components/accordion/AccordionTabIdsTest.java
index 17c7fe6804..35a04c220f 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/accordion/AccordionTabIdsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/accordion/AccordionTabIdsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,7 +27,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test for Accordion: Tab.setId should be propagated to client side tabs.
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/uitest/src/test/java/com/vaadin/tests/components/button/ButtonClickTest.java b/uitest/src/test/java/com/vaadin/tests/components/button/ButtonClickTest.java
index 4ea02b20d0..a9e750141f 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/button/ButtonClickTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/button/ButtonClickTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,8 +29,10 @@ public class ButtonClickTest extends MultiBrowserTest {
public void buttonMouseDownOutOverUp() {
openTestURL();
- WebElement clickedButton = vaadinElement("/VVerticalLayout[0]/VButton[0]");
- WebElement visitedButton = vaadinElement("/VVerticalLayout[0]/VButton[1]");
+ WebElement clickedButton = vaadinElement(
+ "/VVerticalLayout[0]/VButton[0]");
+ WebElement visitedButton = vaadinElement(
+ "/VVerticalLayout[0]/VButton[1]");
new Actions(driver).moveToElement(clickedButton).clickAndHold()
.moveToElement(visitedButton).moveToElement(clickedButton)
diff --git a/uitest/src/test/java/com/vaadin/tests/components/button/ButtonKeyboardClickTest.java b/uitest/src/test/java/com/vaadin/tests/components/button/ButtonKeyboardClickTest.java
index 110d729a36..717b69ce0e 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/button/ButtonKeyboardClickTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/button/ButtonKeyboardClickTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test for availability (x,y) coordinates for button activated via keyboard.
- *
+ *
* @author Vaadin Ltd
*/
public class ButtonKeyboardClickTest extends MultiBrowserTest {
@@ -72,37 +72,45 @@ public class ButtonKeyboardClickTest extends MultiBrowserTest {
getValue("x") > button.getLocation().getX());
Assert.assertTrue(
"Client X click cooridnate is greater than right button "
- + "border coordinate", getValue("x") < button
- .getLocation().getX() + button.getSize().getWidth());
+ + "border coordinate",
+ getValue("x") < button.getLocation().getX()
+ + button.getSize().getWidth());
Assert.assertTrue(
"Client Y click cooridnate is lower than Y button coordinate",
getValue("y") > button.getLocation().getY());
Assert.assertTrue(
"Client Y click cooridnate is greater than bottom button "
- + "border coordinate", getValue("y") < button
- .getLocation().getY() + button.getSize().getHeight());
+ + "border coordinate",
+ getValue("y") < button.getLocation().getY()
+ + button.getSize().getHeight());
Assert.assertTrue(
"Client X click cooridnate is greater than X middle button "
- + "coordinate", button.getLocation().getX()
+ + "coordinate",
+ button.getLocation().getX()
+ button.getSize().getWidth() / 2 >= getValue("x") - 1);
Assert.assertTrue(
"Client Y click cooridnate is greater than Y middle button coordinate",
- button.getLocation().getY() + button.getSize().getHeight() / 2 >= getValue("y") - 1);
+ button.getLocation().getY()
+ + button.getSize().getHeight() / 2 >= getValue("y")
+ - 1);
Assert.assertTrue(
"Client X click cooridnate is lower than X middle button "
- + "coordinate", button.getLocation().getX()
+ + "coordinate",
+ button.getLocation().getX()
+ button.getSize().getWidth() / 2 <= getValue("x") + 1);
Assert.assertTrue(
"Client Y click cooridnate is lower than Y middle button coordinate",
- button.getLocation().getY() + button.getSize().getHeight() / 2 <= getValue("y") + 1);
+ button.getLocation().getY()
+ + button.getSize().getHeight() / 2 <= getValue("y")
+ + 1);
}
private int getValue(String style) {
- return Integer.parseInt(getDriver().findElement(
- By.className("v-label-" + style)).getText());
+ return Integer.parseInt(getDriver()
+ .findElement(By.className("v-label-" + style)).getText());
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/button/ButtonUndefinedWidthTest.java b/uitest/src/test/java/com/vaadin/tests/components/button/ButtonUndefinedWidthTest.java
index 850dd1229c..08fddc4b8d 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/button/ButtonUndefinedWidthTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/button/ButtonUndefinedWidthTest.java
@@ -30,7 +30,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Validates button Widths for Buttons or Native Buttons, inside or outside
* tables.
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
@@ -55,8 +55,8 @@ public class ButtonUndefinedWidthTest extends MultiBrowserTest {
getDriver().findElement(By.className("v-app")).click();
// check button widths in VerticalLayout
- VerticalLayoutElement vLayout = $(VerticalLayoutElement.class).$(
- VerticalLayoutElement.class).first();
+ VerticalLayoutElement vLayout = $(VerticalLayoutElement.class)
+ .$(VerticalLayoutElement.class).first();
int containerWidth = vLayout.getSize().getWidth();
NativeButtonElement nativeButton = vLayout.$(NativeButtonElement.class)
@@ -71,12 +71,12 @@ public class ButtonUndefinedWidthTest extends MultiBrowserTest {
// check button widths in table, also make sure that there is some
// spacing between the table edges and buttons
- List<WebElement> rows = findElements(By
- .className("v-table-cell-content"));
+ List<WebElement> rows = findElements(
+ By.className("v-table-cell-content"));
int rowWidth = rows.get(0).getSize().getWidth();
- List<WebElement> rowWrappers = findElements(By
- .className("v-table-cell-wrapper"));
+ List<WebElement> rowWrappers = findElements(
+ By.className("v-table-cell-wrapper"));
WebElement row = rowWrappers.get(0);
containerWidth = row.getSize().getWidth();
diff --git a/uitest/src/test/java/com/vaadin/tests/components/calendar/BeanItemContainerLongEventTest.java b/uitest/src/test/java/com/vaadin/tests/components/calendar/BeanItemContainerLongEventTest.java
index 740d451b0f..3e692d8cb3 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/calendar/BeanItemContainerLongEventTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/calendar/BeanItemContainerLongEventTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -40,8 +40,8 @@ public class BeanItemContainerLongEventTest extends MultiBrowserTest {
@Test
public void testEventDisplayedInWeekView() {
openTestURL();
- WebElement target = driver.findElements(
- By.className("v-calendar-week-number")).get(1);
+ WebElement target = driver
+ .findElements(By.className("v-calendar-week-number")).get(1);
target.click();
target = driver.findElement(By.className("v-calendar-event"));
Assert.assertEquals("Wrong event name", "Long event", target.getText());
@@ -50,8 +50,8 @@ public class BeanItemContainerLongEventTest extends MultiBrowserTest {
@Test
public void testEventDisplayedInDayView() {
openTestURL();
- WebElement target = driver.findElements(
- By.className("v-calendar-day-number")).get(5);
+ WebElement target = driver
+ .findElements(By.className("v-calendar-day-number")).get(5);
target.click();
target = driver.findElement(By.className("v-calendar-event"));
Assert.assertEquals("Wrong event name", "Long event", target.getText());
diff --git a/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarActionEventSourceTest.java b/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarActionEventSourceTest.java
index 161f927681..d7c0789989 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarActionEventSourceTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarActionEventSourceTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,10 +26,10 @@ import com.vaadin.tests.tb3.PrivateTB3Configuration;
/**
* Test that calendar action event source is the calendar, not a private nested
* class in it.
- *
+ *
* The related code is not browser dependent so only running on a single
* browser.
- *
+ *
* @author Vaadin Ltd
*/
public class CalendarActionEventSourceTest extends PrivateTB3Configuration {
@@ -38,8 +38,8 @@ public class CalendarActionEventSourceTest extends PrivateTB3Configuration {
openTestURL();
// perform action on empty cell
- WebElement element = getDriver().findElement(
- By.className("v-calendar-spacer"));
+ WebElement element = getDriver()
+ .findElement(By.className("v-calendar-spacer"));
performAction(element);
checkEventSourceIsCalendar();
@@ -50,8 +50,8 @@ public class CalendarActionEventSourceTest extends PrivateTB3Configuration {
openTestURL();
// perform action on calendar event
- WebElement element = getDriver().findElement(
- By.className("v-calendar-event"));
+ WebElement element = getDriver()
+ .findElement(By.className("v-calendar-event"));
performAction(element);
checkEventSourceIsCalendar();
@@ -60,16 +60,16 @@ public class CalendarActionEventSourceTest extends PrivateTB3Configuration {
private void performAction(WebElement element) {
// right click
new Actions(getDriver()).contextClick(element).perform();
- WebElement menuItem = getDriver().findElement(
- By.className("gwt-MenuItem"));
+ WebElement menuItem = getDriver()
+ .findElement(By.className("gwt-MenuItem"));
menuItem.click();
}
private void checkEventSourceIsCalendar() {
String calendarObject = getDriver().findElement(By.id("calendarlabel"))
.getText();
- String actionSourceObject = getDriver().findElement(
- By.id("senderlabel")).getText();
+ String actionSourceObject = getDriver()
+ .findElement(By.id("senderlabel")).getText();
Assert.assertEquals(
"Calendar action event source must be the calendar itself",
calendarObject, actionSourceObject);
diff --git a/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarBackwardForwardTest.java b/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarBackwardForwardTest.java
index 98773f475b..c7091759bb 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarBackwardForwardTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarBackwardForwardTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests: Vaadin Calendar: Navigation to invisible days of week (#12243)
- *
+ *
* @author Vaadin Ltd
*/
public class CalendarBackwardForwardTest extends MultiBrowserTest {
@@ -41,26 +41,26 @@ public class CalendarBackwardForwardTest extends MultiBrowserTest {
openDayView();
clickCalendarNext();
- WebElement headerDayElement = getDriver().findElement(
- By.className("v-calendar-header-day"));
+ WebElement headerDayElement = getDriver()
+ .findElement(By.className("v-calendar-header-day"));
- assertThat("This day should be Monday 9/9/13", headerDayElement
- .getText().equals("Monday 9/9/13"));
+ assertThat("This day should be Monday 9/9/13",
+ headerDayElement.getText().equals("Monday 9/9/13"));
for (int i = 0; i < 6; i++) {
clickCalendarBack();
}
- headerDayElement = getDriver().findElement(
- By.className("v-calendar-header-day"));
+ headerDayElement = getDriver()
+ .findElement(By.className("v-calendar-header-day"));
- assertThat("This day should be Friday 8/30/13", headerDayElement
- .getText().equals("Friday 8/30/13"));
+ assertThat("This day should be Friday 8/30/13",
+ headerDayElement.getText().equals("Friday 8/30/13"));
}
private void openWeekView() {
- List<WebElement> elements = getDriver().findElements(
- By.className("v-calendar-week-number"));
+ List<WebElement> elements = getDriver()
+ .findElements(By.className("v-calendar-week-number"));
for (WebElement webElement : elements) {
if (webElement.getText().equals("36")) {
@@ -71,8 +71,8 @@ public class CalendarBackwardForwardTest extends MultiBrowserTest {
}
private void openDayView() {
- List<WebElement> elements = getDriver().findElements(
- By.className("v-calendar-header-day"));
+ List<WebElement> elements = getDriver()
+ .findElements(By.className("v-calendar-header-day"));
for (WebElement webElement : elements) {
if (webElement.getText().contains("Friday 9/6/13")) {
@@ -83,15 +83,15 @@ public class CalendarBackwardForwardTest extends MultiBrowserTest {
}
private void clickCalendarNext() {
- List<WebElement> elements = getDriver().findElements(
- By.className("v-calendar-next"));
+ List<WebElement> elements = getDriver()
+ .findElements(By.className("v-calendar-next"));
elements.get(0).click();
}
private void clickCalendarBack() {
- List<WebElement> elements = getDriver().findElements(
- By.className("v-calendar-back"));
+ List<WebElement> elements = getDriver()
+ .findElements(By.className("v-calendar-back"));
elements.get(0).click();
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarDisabledTest.java b/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarDisabledTest.java
index 8b8122dcf9..fb8d03d613 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarDisabledTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarDisabledTest.java
@@ -46,7 +46,7 @@ public class CalendarDisabledTest extends MultiBrowserTest {
}
private void assertCalendarInMonthView() {
- assertTrue("Calendar wasn't in month view.", getCalendar()
- .hasMonthView());
+ assertTrue("Calendar wasn't in month view.",
+ getCalendar().hasMonthView());
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarHtmlInEventsTest.java b/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarHtmlInEventsTest.java
index 077ab7f7ec..2a73052e0b 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarHtmlInEventsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarHtmlInEventsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -49,7 +49,8 @@ public class CalendarHtmlInEventsTest extends SingleBrowserTest {
click(htmlAllowed);
Assert.assertEquals("1. HTML in event caption: true", getLogRow(0));
- Assert.assertEquals(getMonthEvent(0).getText(), "12:00 AM Hello world!");
+ Assert.assertEquals(getMonthEvent(0).getText(),
+ "12:00 AM Hello world!");
}
@Test
@@ -78,22 +79,22 @@ public class CalendarHtmlInEventsTest extends SingleBrowserTest {
}
private WebElement getMonthEvent(int dayInCalendar) {
- return getMonthDay(dayInCalendar).findElement(
- By.className("v-calendar-event"));
+ return getMonthDay(dayInCalendar)
+ .findElement(By.className("v-calendar-event"));
}
private WebElement getWeekEvent(int dayInCalendar) {
- return getWeekDay(dayInCalendar).findElement(
- By.className("v-calendar-event"));
+ return getWeekDay(dayInCalendar)
+ .findElement(By.className("v-calendar-event"));
}
private WebElement getMonthDay(int i) {
- return calendar.findElements(By.className("v-calendar-month-day")).get(
- i);
+ return calendar.findElements(By.className("v-calendar-month-day"))
+ .get(i);
}
private WebElement getWeekDay(int i) {
- return calendar.findElements(By.className("v-calendar-day-times")).get(
- i);
+ return calendar.findElements(By.className("v-calendar-day-times"))
+ .get(i);
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarMonthViewDndEventTest.java b/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarMonthViewDndEventTest.java
index 3248804eed..ee8d62671b 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarMonthViewDndEventTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarMonthViewDndEventTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.tests.tb3.DndActionsTest;
/**
* Test to check how DnD works for regular (not all day event) in calendar month
* view.
- *
+ *
* @author Vaadin Ltd
*/
public class CalendarMonthViewDndEventTest extends DndActionsTest {
@@ -44,8 +44,8 @@ public class CalendarMonthViewDndEventTest extends DndActionsTest {
// does calendar have space on the right for one more event (i.e. day
// cell on the right).
- boolean moveRight = event.getLocation().getX() + 2
- * event.getSize().getWidth() <= calendarRight;
+ boolean moveRight = event.getLocation().getX()
+ + 2 * event.getSize().getWidth() <= calendarRight;
WebElement cell = getParentCell(event, "v-calendar-month-day");
@@ -67,9 +67,9 @@ public class CalendarMonthViewDndEventTest extends DndActionsTest {
Assert.assertTrue(
"Moved event has wrong Y position (not the same row), new Y position="
- + newY + ", cell Y position=" + cellY
- + ", cell height=" + cellHeight, newY >= cellY
- && newY < cellY + cellHeight);
+ + newY + ", cell Y position=" + cellY + ", cell height="
+ + cellHeight,
+ newY >= cellY && newY < cellY + cellHeight);
if (moveRight) {
Assert.assertTrue(
"Moved event has wrong X position (not after original event)",
diff --git a/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarNotificationsTest.java b/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarNotificationsTest.java
index 2431b2f4d0..1dbeb8e1f0 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarNotificationsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarNotificationsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests opening and closing of calendar notifications.
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarNotificationsTestIE.java b/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarNotificationsTestIE.java
index 62223ccc25..517ebefb0a 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarNotificationsTestIE.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarNotificationsTestIE.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests opening and closing of calendar notifications.
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -62,15 +62,15 @@ public class CalendarNotificationsTestIE extends MultiBrowserTest {
WebElement day = findElements(By.className("v-calendar-day-number"))
.get(2);
// IE8 requires you to click on the text part to fire the event
- new Actions(getDriver())
- .moveToElement(day, day.getSize().getWidth() - 3,
- day.getSize().getHeight() / 2).click().perform();
+ new Actions(getDriver()).moveToElement(day,
+ day.getSize().getWidth() - 3, day.getSize().getHeight() / 2)
+ .click().perform();
// check that a notification was opened, this is done with a log instead
// of a screenshot or element presence check due to problems with IE
// webdriver
- String text = findElement(By.id("Log")).findElement(
- By.className("v-label")).getText();
+ String text = findElement(By.id("Log"))
+ .findElement(By.className("v-label")).getText();
Assert.assertTrue("Notification should've opened",
"1. Opening a notification".equals(text));
diff --git a/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarReadOnlyTest.java b/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarReadOnlyTest.java
index 142353f314..eef3ca5439 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarReadOnlyTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarReadOnlyTest.java
@@ -27,7 +27,8 @@ public class CalendarReadOnlyTest extends MultiBrowserTest {
public void weekViewCanBeOpenedFromMonthView() {
openWeekView();
- assertTrue("Calendar wasn't in week view.", getCalendar().hasWeekView());
+ assertTrue("Calendar wasn't in week view.",
+ getCalendar().hasWeekView());
}
@Test
@@ -100,16 +101,16 @@ public class CalendarReadOnlyTest extends MultiBrowserTest {
public void hiddenEventsCanBeExpanded() {
WebElement dayWithEvents = getFirstDayWithEvents();
- assertThat("Incorrect event count.", getVisibleEvents(dayWithEvents)
- .size(), is(2));
+ assertThat("Incorrect event count.",
+ getVisibleEvents(dayWithEvents).size(), is(2));
toggleExpandEvents(dayWithEvents).click();
- assertThat("Incorrect event count.", getVisibleEvents(dayWithEvents)
- .size(), is(4));
+ assertThat("Incorrect event count.",
+ getVisibleEvents(dayWithEvents).size(), is(4));
toggleExpandEvents(dayWithEvents).click();
- assertThat("Incorrect event count.", getVisibleEvents(dayWithEvents)
- .size(), is(2));
+ assertThat("Incorrect event count.",
+ getVisibleEvents(dayWithEvents).size(), is(2));
}
private CalendarElement getCalendar() {
@@ -139,8 +140,8 @@ public class CalendarReadOnlyTest extends MultiBrowserTest {
}
private WebElement toggleExpandEvents(WebElement dayWithEvents) {
- return dayWithEvents.findElement(By
- .className("v-calendar-bottom-spacer"));
+ return dayWithEvents
+ .findElement(By.className("v-calendar-bottom-spacer"));
}
private List<WebElement> getVisibleEvents(WebElement dayWithEvents) {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarRescheduleEventTest.java b/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarRescheduleEventTest.java
index fb8cce7d53..900c0b53a4 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarRescheduleEventTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarRescheduleEventTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.tests.tb3.DndActionsTest;
/**
* Test to check ability to reschedule events unlimited times.
- *
+ *
* @author Vaadin Ltd
*/
public class CalendarRescheduleEventTest extends DndActionsTest {
@@ -69,13 +69,13 @@ public class CalendarRescheduleEventTest extends DndActionsTest {
* DnD event by Y axis
*/
private int rescheduleEvent(int yOffset) {
- WebElement eventCaption = getDriver().findElement(
- By.className("v-calendar-event-caption"));
+ WebElement eventCaption = getDriver()
+ .findElement(By.className("v-calendar-event-caption"));
dragAndDrop(eventCaption, 0, yOffset);
- eventCaption = getDriver().findElement(
- By.className("v-calendar-event-caption"));
+ eventCaption = getDriver()
+ .findElement(By.className("v-calendar-event-caption"));
return eventCaption.getLocation().getY();
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarResizeOverlappingEventsTest.java b/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarResizeOverlappingEventsTest.java
index e3e5606089..2fd5550485 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarResizeOverlappingEventsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarResizeOverlappingEventsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import org.openqa.selenium.WebElement;
import com.vaadin.tests.tb3.DndActionsTest;
/**
- *
+ *
* @author Vaadin Ltd
*/
public class CalendarResizeOverlappingEventsTest extends DndActionsTest {
@@ -76,20 +76,23 @@ public class CalendarResizeOverlappingEventsTest extends DndActionsTest {
int actualWidth = firstEvent.getSize().getWidth();
int expectedWidth = firstEventExpectedWidth;
- Assert.assertTrue(String.format(errorMessage, expectedWidth,
- widthTolerance, actualWidth),
+ Assert.assertTrue(
+ String.format(errorMessage, expectedWidth, widthTolerance,
+ actualWidth),
isAproximateWidth(actualWidth, expectedWidth, widthTolerance));
actualWidth = secondEvent.getSize().getWidth();
expectedWidth = secondEventExpectedWidth;
- Assert.assertTrue(String.format(errorMessage, expectedWidth,
- widthTolerance, actualWidth),
+ Assert.assertTrue(
+ String.format(errorMessage, expectedWidth, widthTolerance,
+ actualWidth),
isAproximateWidth(actualWidth, expectedWidth, widthTolerance));
actualWidth = thirdEvent.getSize().getWidth();
expectedWidth = thirdEventExpectedWidth;
- Assert.assertTrue(String.format(errorMessage, expectedWidth,
- widthTolerance, actualWidth),
+ Assert.assertTrue(
+ String.format(errorMessage, expectedWidth, widthTolerance,
+ actualWidth),
isAproximateWidth(actualWidth, expectedWidth, widthTolerance));
}
@@ -103,8 +106,8 @@ public class CalendarResizeOverlappingEventsTest extends DndActionsTest {
}
private void initParams() {
- WebElement dateSlot = getDriver().findElement(
- By.className("v-datecellslot"));
+ WebElement dateSlot = getDriver()
+ .findElement(By.className("v-datecellslot"));
int dateSlotWidth = dateSlot.getSize().getWidth();
noOverlapWidth = dateSlotWidth;
oneOverlapWidth = dateSlotWidth / 2;
@@ -119,15 +122,15 @@ public class CalendarResizeOverlappingEventsTest extends DndActionsTest {
}
};
- List<WebElement> eventElements = getDriver().findElements(
- By.className("v-calendar-event-content"));
+ List<WebElement> eventElements = getDriver()
+ .findElements(By.className("v-calendar-event-content"));
Collections.sort(eventElements, startTimeComparator);
firstEvent = eventElements.get(0);
secondEvent = eventElements.get(1);
thirdEvent = eventElements.get(2);
- List<WebElement> resizeBottomElements = getDriver().findElements(
- By.className("v-calendar-event-resizebottom"));
+ List<WebElement> resizeBottomElements = getDriver()
+ .findElements(By.className("v-calendar-event-resizebottom"));
Collections.sort(resizeBottomElements, startTimeComparator);
firstEventBottomResize = resizeBottomElements.get(0);
secondEventBottomResize = resizeBottomElements.get(1);
diff --git a/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarShownNotCorrectlyWhenPartiallyOutOfViewTest.java b/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarShownNotCorrectlyWhenPartiallyOutOfViewTest.java
index 9db65c89c6..c8afd3c00a 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarShownNotCorrectlyWhenPartiallyOutOfViewTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarShownNotCorrectlyWhenPartiallyOutOfViewTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,8 +28,8 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
* Tests calendar via prepared screenshots 'Calendar event not shown correctly
* when partially out of view' (#7261)
*/
-public class CalendarShownNotCorrectlyWhenPartiallyOutOfViewTest extends
- MultiBrowserTest {
+public class CalendarShownNotCorrectlyWhenPartiallyOutOfViewTest
+ extends MultiBrowserTest {
@Test
public void testCalendar() throws InterruptedException, IOException {
@@ -43,8 +43,8 @@ public class CalendarShownNotCorrectlyWhenPartiallyOutOfViewTest extends
}
private void openWeekView() {
- List<WebElement> elements = getDriver().findElements(
- By.className("v-calendar-week-number"));
+ List<WebElement> elements = getDriver()
+ .findElements(By.className("v-calendar-week-number"));
for (WebElement webElement : elements) {
if (webElement.getText().equals("36")) {
@@ -55,8 +55,8 @@ public class CalendarShownNotCorrectlyWhenPartiallyOutOfViewTest extends
}
private void openDayView() {
- List<WebElement> elements = getDriver().findElements(
- By.className("v-calendar-header-day"));
+ List<WebElement> elements = getDriver()
+ .findElements(By.className("v-calendar-header-day"));
for (WebElement webElement : elements) {
if (webElement.getText().contains("Thursday 9/5/13")) {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarVisibleHoursTest.java b/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarVisibleHoursTest.java
index 5306ee3909..9877f9545f 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarVisibleHoursTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarVisibleHoursTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -43,8 +43,8 @@ public class CalendarVisibleHoursTest extends MultiBrowserTest {
}
private void openWeekView() {
- List<WebElement> elements = getDriver().findElements(
- By.className("v-calendar-week-number"));
+ List<WebElement> elements = getDriver()
+ .findElements(By.className("v-calendar-week-number"));
for (WebElement webElement : elements) {
if (webElement.getText().equals("36")) {
@@ -55,8 +55,8 @@ public class CalendarVisibleHoursTest extends MultiBrowserTest {
}
private void openDayView() {
- List<WebElement> elements = getDriver().findElements(
- By.className("v-calendar-header-day"));
+ List<WebElement> elements = getDriver()
+ .findElements(By.className("v-calendar-header-day"));
for (WebElement webElement : elements) {
if (webElement.getText().contains("Thursday 9/5/13")) {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarWeekSelectionTest.java b/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarWeekSelectionTest.java
index 83f41994ae..facf44775b 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarWeekSelectionTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/calendar/CalendarWeekSelectionTest.java
@@ -31,7 +31,8 @@ public class CalendarWeekSelectionTest extends MultiBrowserTest {
}
private void clickOnWeek(String week) {
- for (WebElement e : findElements(By.className("v-calendar-week-number"))) {
+ for (WebElement e : findElements(
+ By.className("v-calendar-week-number"))) {
if (e.getText().equals(week)) {
e.click();
break;
diff --git a/uitest/src/test/java/com/vaadin/tests/components/calendar/DndCalendarTargetDetailsTest.java b/uitest/src/test/java/com/vaadin/tests/components/calendar/DndCalendarTargetDetailsTest.java
index c90d541226..3ac6a2b0c3 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/calendar/DndCalendarTargetDetailsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/calendar/DndCalendarTargetDetailsTest.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -23,7 +23,7 @@ import com.vaadin.tests.components.table.DndTableTargetDetailsTest;
/**
* Test for mouse details in CalendarTargetDetails class when DnD target is a
* calendar.
- *
+ *
* @author Vaadin Ltd
*/
public class DndCalendarTargetDetailsTest extends DndTableTargetDetailsTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/calendar/SetFirstVisibleHourOfDayTest.java b/uitest/src/test/java/com/vaadin/tests/components/calendar/SetFirstVisibleHourOfDayTest.java
index a41fb8360a..c1f186f628 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/calendar/SetFirstVisibleHourOfDayTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/calendar/SetFirstVisibleHourOfDayTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -48,15 +48,15 @@ public class SetFirstVisibleHourOfDayTest extends MultiBrowserTest {
// first of all check if event is present in calendar view
waitForElementPresent(By.className("v-calendar-event-content"));
- WebElement event = getDriver().findElement(
- By.className("v-calendar-event-content"));
- WebElement dateSlot = getDriver().findElement(
- By.className("v-datecellslot"));
+ WebElement event = getDriver()
+ .findElement(By.className("v-calendar-event-content"));
+ WebElement dateSlot = getDriver()
+ .findElement(By.className("v-datecellslot"));
Assert.assertEquals(
"The height of shown part of calendar event should be equal to 12 datecell slots",
- dateSlot.getSize().getHeight() * 12, event.getSize()
- .getHeight());
+ dateSlot.getSize().getHeight() * 12,
+ event.getSize().getHeight());
}
@Test
@@ -70,15 +70,15 @@ public class SetFirstVisibleHourOfDayTest extends MultiBrowserTest {
// first of all check if event is present in calendar view
waitForElementPresent(By.className("v-calendar-event-content"));
- WebElement event = getDriver().findElement(
- By.className("v-calendar-event-content"));
- WebElement dateSlot = getDriver().findElement(
- By.className("v-datecellslot"));
+ WebElement event = getDriver()
+ .findElement(By.className("v-calendar-event-content"));
+ WebElement dateSlot = getDriver()
+ .findElement(By.className("v-datecellslot"));
Assert.assertEquals(
"The height of shown part of calendar event should be equal to 12 datecell slots",
- dateSlot.getSize().getHeight() * 12, event.getSize()
- .getHeight());
+ dateSlot.getSize().getHeight() * 12,
+ event.getSize().getHeight());
}
private void clickElement(String className, String text) {
@@ -93,8 +93,8 @@ public class SetFirstVisibleHourOfDayTest extends MultiBrowserTest {
// sometimes the element only gets focus from click and
// we need to click the text, which is in the right edge
// of the element
- testBenchElement(webElement).click(
- webElement.getSize().getWidth() - 5, 9);
+ testBenchElement(webElement)
+ .click(webElement.getSize().getWidth() - 5, 9);
} catch (StaleElementReferenceException e) {
// the first click succeeded after all
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/checkbox/CheckBoxImmediateTest.java b/uitest/src/test/java/com/vaadin/tests/components/checkbox/CheckBoxImmediateTest.java
index 826b43b9cc..8f77c86e9e 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/checkbox/CheckBoxImmediateTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/checkbox/CheckBoxImmediateTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/checkbox/CheckBoxNullValueTest.java b/uitest/src/test/java/com/vaadin/tests/components/checkbox/CheckBoxNullValueTest.java
index 12ed650c19..f9b46db0ea 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/checkbox/CheckBoxNullValueTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/checkbox/CheckBoxNullValueTest.java
@@ -16,8 +16,8 @@ public class CheckBoxNullValueTest extends MultiBrowserTest {
public void testValidation() throws Exception {
openTestURL();
CheckBoxElement checkbox = $(CheckBoxElement.class).first();
- CheckBoxElement requiredCheckbox = $(CheckBoxElement.class).caption(
- "A required checkbox").first();
+ CheckBoxElement requiredCheckbox = $(CheckBoxElement.class)
+ .caption("A required checkbox").first();
assertValid(checkbox, true);
assertValid(requiredCheckbox, true);
@@ -45,14 +45,15 @@ public class CheckBoxNullValueTest extends MultiBrowserTest {
private void assertValid(CheckBoxElement checkbox, boolean valid) {
boolean hasIndicator = false;
- List<WebElement> e = checkbox.findElements(By
- .className("v-errorindicator"));
+ List<WebElement> e = checkbox
+ .findElements(By.className("v-errorindicator"));
if (e.size() != 0) {
hasIndicator = e.get(0).isDisplayed();
}
- Assert.assertEquals("Checkbox state should be "
- + (valid ? "valid" : "invalid"), valid, !hasIndicator);
+ Assert.assertEquals(
+ "Checkbox state should be " + (valid ? "valid" : "invalid"),
+ valid, !hasIndicator);
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/checkbox/CheckBoxRpcCountTest.java b/uitest/src/test/java/com/vaadin/tests/components/checkbox/CheckBoxRpcCountTest.java
index 69a919497b..c11f797463 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/checkbox/CheckBoxRpcCountTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/checkbox/CheckBoxRpcCountTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/checkbox/CheckboxContextClickTest.java b/uitest/src/test/java/com/vaadin/tests/components/checkbox/CheckboxContextClickTest.java
index 1903687527..7b5973e93c 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/checkbox/CheckboxContextClickTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/checkbox/CheckboxContextClickTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/colorpicker/ColorPickerInputFormatsTest.java b/uitest/src/test/java/com/vaadin/tests/components/colorpicker/ColorPickerInputFormatsTest.java
index 096b07546a..cc3c9ccd19 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/colorpicker/ColorPickerInputFormatsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/colorpicker/ColorPickerInputFormatsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -77,8 +77,8 @@ public class ColorPickerInputFormatsTest extends MultiBrowserTest {
getDriver().findElement(By.id("colorpicker1")).click();
// Add RGB value
- WebElement field = getDriver().findElement(
- By.className("v-colorpicker-preview-textfield"));
+ WebElement field = getDriver()
+ .findElement(By.className("v-colorpicker-preview-textfield"));
// Select all text
field.sendKeys(Keys.chord(Keys.CONTROL, "a"));
@@ -91,8 +91,8 @@ public class ColorPickerInputFormatsTest extends MultiBrowserTest {
}
private String getColorpickerValue() {
- WebElement field = getDriver().findElement(
- By.className("v-colorpicker-preview-textfield"));
+ WebElement field = getDriver()
+ .findElement(By.className("v-colorpicker-preview-textfield"));
return field.getAttribute("value");
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/colorpicker/DefaultCaptionWidthTest.java b/uitest/src/test/java/com/vaadin/tests/components/colorpicker/DefaultCaptionWidthTest.java
index 78b7120b4e..e0b1974ff6 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/colorpicker/DefaultCaptionWidthTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/colorpicker/DefaultCaptionWidthTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test for default caption behavior in color picker.
- *
+ *
* @author Vaadin Ltd
*/
public class DefaultCaptionWidthTest extends MultiBrowserTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxBorderTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxBorderTest.java
index 4d40e455a6..64b0549e12 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxBorderTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxBorderTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxClickIconTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxClickIconTest.java
index 949fcdb882..29b58705e5 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxClickIconTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxClickIconTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test to check whether combobox is expanded when icon is clicked.
- *
+ *
* @author Vaadin Ltd
*/
public class ComboBoxClickIconTest extends MultiBrowserTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxCombinedWithEnterShortcutTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxCombinedWithEnterShortcutTest.java
index 921c1b40e4..ace99cb926 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxCombinedWithEnterShortcutTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxCombinedWithEnterShortcutTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxEmptyItemsKeyboardNavigationTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxEmptyItemsKeyboardNavigationTest.java
index ebf6ba4773..187d6d40f4 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxEmptyItemsKeyboardNavigationTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxEmptyItemsKeyboardNavigationTest.java
@@ -13,8 +13,8 @@ import com.vaadin.testbench.By;
import com.vaadin.tests.tb3.SingleBrowserTestPhantomJS2;
import com.vaadin.tests.tb3.newelements.ComboBoxElement;
-public class ComboBoxEmptyItemsKeyboardNavigationTest extends
- SingleBrowserTestPhantomJS2 {
+public class ComboBoxEmptyItemsKeyboardNavigationTest
+ extends SingleBrowserTestPhantomJS2 {
@Test
public void navigatingUpOnAnEmptyMenuDoesntThrowErrors() {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxIdenticalItemsTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxIdenticalItemsTest.java
index 709d3d9a60..08152d1b4b 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxIdenticalItemsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxIdenticalItemsTest.java
@@ -27,7 +27,7 @@ import com.vaadin.tests.tb3.newelements.ComboBoxElement;
/**
* Test for identical item captions in ComboBox.
- *
+ *
* @author Vaadin Ltd
*/
public class ComboBoxIdenticalItemsTest extends MultiBrowserTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxInputPromptTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxInputPromptTest.java
index 1e6f7e4170..3216811caf 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxInputPromptTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxInputPromptTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxItemAddingWithFocusListenerTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxItemAddingWithFocusListenerTest.java
index 66173db554..76758eecdd 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxItemAddingWithFocusListenerTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxItemAddingWithFocusListenerTest.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -35,13 +35,13 @@ public class ComboBoxItemAddingWithFocusListenerTest extends MultiBrowserTest {
cBox.openPopup();
int i = 0;
while (i < 3) {
- assertTrue("No item added on focus", cBox.getPopupSuggestions()
- .contains("Focus" + i++));
+ assertTrue("No item added on focus",
+ cBox.getPopupSuggestions().contains("Focus" + i++));
focusTarget.focus();
((TestBenchElement) cBox.findElement(By.vaadin("#textbox")))
.focus();
}
- assertTrue("No item added on focus", cBox.getPopupSuggestions()
- .contains("Focus" + i));
+ assertTrue("No item added on focus",
+ cBox.getPopupSuggestions().contains("Focus" + i));
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxItemStyleGeneratorTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxItemStyleGeneratorTest.java
index 20c460e342..8faedffedd 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxItemStyleGeneratorTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxItemStyleGeneratorTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -37,8 +37,8 @@ public class ComboBoxItemStyleGeneratorTest extends SingleBrowserTest {
comboBox.openPopup();
- List<WebElement> boldItems = findElements(By
- .className("v-filterselect-item-bold"));
+ List<WebElement> boldItems = findElements(
+ By.className("v-filterselect-item-bold"));
Assert.assertEquals(1, boldItems.size());
Assert.assertEquals("Item 5", boldItems.get(0).getText());
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxLargeIconsTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxLargeIconsTest.java
index 407ab7aa04..f2dcdee4ef 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxLargeIconsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxLargeIconsTest.java
@@ -21,8 +21,8 @@ public class ComboBoxLargeIconsTest extends MultiBrowserTest {
NativeSelectElement iconSelect = $(NativeSelectElement.class).first();
iconSelect.selectByText("16x16");
- ComboBoxElement cb = $(ComboBoxElement.class).caption(
- "Undefined wide select with 50 items").first();
+ ComboBoxElement cb = $(ComboBoxElement.class)
+ .caption("Undefined wide select with 50 items").first();
cb.openPopup();
compareScreen("icons-16x16-page1");
cb.openNextPage();
@@ -39,18 +39,18 @@ public class ComboBoxLargeIconsTest extends MultiBrowserTest {
iconSelect.selectByText("64x64");
- ComboBoxElement pageLength0cb = $(ComboBoxElement.class).caption(
- "Pagelength 0").first();
+ ComboBoxElement pageLength0cb = $(ComboBoxElement.class)
+ .caption("Pagelength 0").first();
pageLength0cb.openPopup();
pageLength0cb.findElement(By.vaadin("#popup/item1")).click();
- ComboBoxElement cb200px = $(ComboBoxElement.class).caption(
- "200px wide select with 50 items").first();
+ ComboBoxElement cb200px = $(ComboBoxElement.class)
+ .caption("200px wide select with 50 items").first();
cb200px.openPopup();
cb200px.findElement(By.vaadin("#popup/item1")).click();
- ComboBoxElement cb150px = $(ComboBoxElement.class).caption(
- "150px wide select with 5 items").first();
+ ComboBoxElement cb150px = $(ComboBoxElement.class)
+ .caption("150px wide select with 5 items").first();
new Actions(driver).sendKeys(cb150px, Keys.DOWN).perform();
compareScreen("icons-64x64-page1-highlight-first");
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxMouseSelectEnterTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxMouseSelectEnterTest.java
index d3ba37682d..8d1e517f2f 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxMouseSelectEnterTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxMouseSelectEnterTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxNoTextInputTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxNoTextInputTest.java
index cb4cd54559..a6677181d1 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxNoTextInputTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxNoTextInputTest.java
@@ -42,7 +42,8 @@ public class ComboBoxNoTextInputTest extends MultiBrowserTest {
}
@Test
- public void testComboBoxWithTextInputNoPopupOpensOnClick() throws Exception {
+ public void testComboBoxWithTextInputNoPopupOpensOnClick()
+ throws Exception {
openTestURL();
// click and check that no popup appears
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxOnSmallScreenTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxOnSmallScreenTest.java
index f48f2bbdeb..ce7dbd5a48 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxOnSmallScreenTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxOnSmallScreenTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,7 +30,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* ComboBox suggestion popup should not obscure the text input box.
- *
+ *
* @author Vaadin Ltd
*/
public class ComboBoxOnSmallScreenTest extends MultiBrowserTest {
@@ -73,8 +73,8 @@ public class ComboBoxOnSmallScreenTest extends MultiBrowserTest {
final int popupBottom = popupTop + popup.getSize().getHeight();
final int rootHeight = findElement(By.tagName("body")).getSize().height;
- assertThat("Popup overlay out of the screen", popupTop < 0
- || popupBottom > rootHeight, is(false));
+ assertThat("Popup overlay out of the screen",
+ popupTop < 0 || popupBottom > rootHeight, is(false));
}
private Window getWindow() {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxPopupWhenBodyScrollsTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxPopupWhenBodyScrollsTest.java
index 0b1568b9b1..c680d2790d 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxPopupWhenBodyScrollsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxPopupWhenBodyScrollsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxResetValueTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxResetValueTest.java
index 0295f4ba41..f54244ee12 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxResetValueTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxResetValueTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -37,14 +37,14 @@ public class ComboBoxResetValueTest extends MultiBrowserTest {
openTestURL();
- comboBoxWithNullSelectionItemId = $(ComboBoxElement.class).id(
- ComboBoxResetValue.WITH_SET_NULL_SELECTION_ITEM_ID);
+ comboBoxWithNullSelectionItemId = $(ComboBoxElement.class)
+ .id(ComboBoxResetValue.WITH_SET_NULL_SELECTION_ITEM_ID);
- comboBoxWithoutNullSelectionItemId = $(ComboBoxElement.class).id(
- ComboBoxResetValue.WITHOUT_NULL_SELECTION_ITEM_ID);
+ comboBoxWithoutNullSelectionItemId = $(ComboBoxElement.class)
+ .id(ComboBoxResetValue.WITHOUT_NULL_SELECTION_ITEM_ID);
- comboBoxWithNullNotAllowed = $(ComboBoxElement.class).id(
- ComboBoxResetValue.NULL_SELECTION_NOT_ALLOWED);
+ comboBoxWithNullNotAllowed = $(ComboBoxElement.class)
+ .id(ComboBoxResetValue.NULL_SELECTION_NOT_ALLOWED);
clickResetButton();
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxScrollingWithArrowsTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxScrollingWithArrowsTest.java
index a95301acc7..12e0e4640a 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxScrollingWithArrowsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxScrollingWithArrowsTest.java
@@ -72,8 +72,8 @@ public class ComboBoxScrollingWithArrowsTest extends MultiBrowserTest {
}
private String getSelectedItemText() {
- List<WebElement> items = driver.findElements(By
- .className("gwt-MenuItem-selected"));
+ List<WebElement> items = driver
+ .findElements(By.className("gwt-MenuItem-selected"));
return items.get(0).getText();
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSelectingWithNewItemsAllowedTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSelectingWithNewItemsAllowedTest.java
index c0a67514bb..9d5d307e10 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSelectingWithNewItemsAllowedTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSelectingWithNewItemsAllowedTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSetNullWhenNewItemsAllowedTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSetNullWhenNewItemsAllowedTest.java
index ce8e614e10..489a60e9cc 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSetNullWhenNewItemsAllowedTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSetNullWhenNewItemsAllowedTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -39,8 +39,8 @@ public class ComboBoxSetNullWhenNewItemsAllowedTest extends MultiBrowserTest {
setDebug(true);
openTestURL();
- WebElement element = $(ComboBoxElement.class).first().findElement(
- By.vaadin("#textbox"));
+ WebElement element = $(ComboBoxElement.class).first()
+ .findElement(By.vaadin("#textbox"));
((TestBenchElementCommands) element).click(8, 7);
element.clear();
element.sendKeys("New value");
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSlowTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSlowTest.java
index e547e68fc1..f80cb1d63b 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSlowTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSlowTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -35,7 +35,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
* Verifies SlowComboBox filtering works when user inputs text. Also verifies
* pagination works when the matching results number more than those that can be
* displayed.
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -60,15 +60,15 @@ public class ComboBoxSlowTest extends MultiBrowserTest {
sleep(250);
typeString("Item 12");
- final WebElement popup = driver.findElement(By
- .className("v-filterselect-suggestpopup"));
+ final WebElement popup = driver
+ .findElement(By.className("v-filterselect-suggestpopup"));
List<WebElement> filteredItems = getFilteredItems(popup);
- assertEquals("unexpected amount of suggestions found on first page",
- 10, filteredItems.size());
- assertEquals("wrong filtering result", "Item 12", filteredItems.get(0)
- .getText());
- assertEquals("wrong filtering result", "Item 128", filteredItems.get(9)
- .getText());
+ assertEquals("unexpected amount of suggestions found on first page", 10,
+ filteredItems.size());
+ assertEquals("wrong filtering result", "Item 12",
+ filteredItems.get(0).getText());
+ assertEquals("wrong filtering result", "Item 128",
+ filteredItems.get(9).getText());
assertTrue(isPagingActive());
goToNextPage();
@@ -89,20 +89,20 @@ public class ComboBoxSlowTest extends MultiBrowserTest {
typeString("Item 100");
assertFalse(isPagingActive());
- WebElement popup = driver.findElement(By
- .className("v-filterselect-suggestpopup"));
+ WebElement popup = driver
+ .findElement(By.className("v-filterselect-suggestpopup"));
List<WebElement> filteredItems = getFilteredItems(popup);
assertEquals("unexpected amount of suggestions found", 2,
filteredItems.size());
- assertEquals("wrong filtering result", "Item 100", filteredItems.get(0)
- .getText());
- assertEquals("wrong filtering result", "Item 1000", filteredItems
- .get(1).getText());
+ assertEquals("wrong filtering result", "Item 100",
+ filteredItems.get(0).getText());
+ assertEquals("wrong filtering result", "Item 1000",
+ filteredItems.get(1).getText());
}
private void clickComboBoxTextArea() {
- WebElement cb = getDriver().findElement(
- By.className("v-filterselect-input"));
+ WebElement cb = getDriver()
+ .findElement(By.className("v-filterselect-input"));
cb.click();
}
@@ -114,20 +114,20 @@ public class ComboBoxSlowTest extends MultiBrowserTest {
private int getNumberOfSuggestions() {
- List<WebElement> elements = getDriver().findElements(
- By.className("gwt-MenuItem"));
+ List<WebElement> elements = getDriver()
+ .findElements(By.className("gwt-MenuItem"));
return elements.size();
}
private boolean isPagingActive() {
- List<WebElement> elements = getDriver().findElements(
- By.className("v-filterselect-nextpage"));
+ List<WebElement> elements = getDriver()
+ .findElements(By.className("v-filterselect-nextpage"));
return elements.size() == 1;
}
private void goToNextPage() {
- WebElement nextPage = getDriver().findElement(
- By.className("v-filterselect-nextpage"));
+ WebElement nextPage = getDriver()
+ .findElement(By.className("v-filterselect-nextpage"));
nextPage.click();
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPageLengthTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPageLengthTest.java
index 7ed3268dd4..e6d42a6513 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPageLengthTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPageLengthTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -56,8 +56,8 @@ public class ComboBoxSuggestionPageLengthTest extends MultiBrowserTest {
private List<String> getSuggestionsOnScreen() {
List<WebElement> suggestionElements = getDriver()
- .findElements(
- By.cssSelector(".v-filterselect-suggestpopup .gwt-MenuItem span"));
+ .findElements(By.cssSelector(
+ ".v-filterselect-suggestpopup .gwt-MenuItem span"));
List<String> suggestions = new ArrayList<String>();
for (WebElement suggestion : suggestionElements) {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupCloseTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupCloseTest.java
index 5e9e076cac..2a99945c98 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupCloseTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupCloseTest.java
@@ -40,8 +40,8 @@ public class ComboBoxSuggestionPopupCloseTest extends MultiBrowserTest {
waitForElementVisible(By.className("v-filterselect"));
- selectTextbox = $(ComboBoxElement.class).first().findElement(
- By.vaadin("#textbox"));
+ selectTextbox = $(ComboBoxElement.class).first()
+ .findElement(By.vaadin("#textbox"));
selectTextbox.click();
// open popup and select first element
@@ -50,7 +50,8 @@ public class ComboBoxSuggestionPopupCloseTest extends MultiBrowserTest {
// open popup and hit enter to close it
sendKeys(new Keys[] { ARROW_DOWN, ENTER });
- assertFalse(isElementPresent(By.className("v-filterselect-suggestmenu")));
+ assertFalse(
+ isElementPresent(By.className("v-filterselect-suggestmenu")));
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthPercentageTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthPercentageTest.java
index 2e5dcb380e..edc4ad489a 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthPercentageTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthPercentageTest.java
@@ -27,8 +27,8 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* @author Vaadin Ltd
*/
-public class ComboBoxSuggestionPopupWidthPercentageTest extends
- MultiBrowserTest {
+public class ComboBoxSuggestionPopupWidthPercentageTest
+ extends MultiBrowserTest {
@Test
public void suggestionPopupPersentageWidthTest() throws Exception {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthTest.java
index 11e7629b2d..b2502a720c 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthTest.java
@@ -33,8 +33,7 @@ public class ComboBoxSuggestionPopupWidthTest extends MultiBrowserTest {
public void suggestionPopupWidthTest() throws Exception {
openTestURL();
- waitForElementVisible(By
- .className("width-as-percentage"));
+ waitForElementVisible(By.className("width-as-percentage"));
WebElement selectTextbox = $(ComboBoxElement.class).first()
.findElement(By.vaadin("#textbox"));
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxValueInputTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxValueInputTest.java
index 318ffbe549..8fd2e06765 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxValueInputTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxValueInputTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,7 +30,7 @@ import static org.hamcrest.MatcherAssert.assertThat;
/**
* Tests ComboBox inputs and selections.
- *
+ *
* @author Vaadin Ltd
*/
public class ComboBoxValueInputTest extends MultiBrowserTest {
@@ -42,7 +42,8 @@ public class ComboBoxValueInputTest extends MultiBrowserTest {
openTestURL();
};
- private void sendKeysToComboBox(ComboBoxElement comboBox, CharSequence keys) {
+ private void sendKeysToComboBox(ComboBoxElement comboBox,
+ CharSequence keys) {
getComboBoxInput(comboBox).sendKeys(keys);
}
@@ -77,7 +78,8 @@ public class ComboBoxValueInputTest extends MultiBrowserTest {
assertThatComboBoxSuggestionsAreHidden(comboBox);
}
- private void assertThatComboBoxSuggestionsAreHidden(ComboBoxElement comboBox) {
+ private void assertThatComboBoxSuggestionsAreHidden(
+ ComboBoxElement comboBox) {
assertThat(comboBox.isElementPresent(By.vaadin("#popup")), is(false));
}
@@ -133,8 +135,8 @@ public class ComboBoxValueInputTest extends MultiBrowserTest {
// selectByText doesn't work when filtering is off.
comboBox.openPopup();
- List<WebElement> filteredItems = findElements(By
- .className("gwt-MenuItem"));
+ List<WebElement> filteredItems = findElements(
+ By.className("gwt-MenuItem"));
filteredItems.get(1).click();
sendKeysToComboBox(comboBox, "mnop");
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboSelectedValueBeyondTheFirstDropdownPageTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboSelectedValueBeyondTheFirstDropdownPageTest.java
index 280328694c..9f7631ce77 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboSelectedValueBeyondTheFirstDropdownPageTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboSelectedValueBeyondTheFirstDropdownPageTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,8 +24,8 @@ import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;
@SuppressWarnings("serial")
-public class ComboSelectedValueBeyondTheFirstDropdownPageTest extends
- MultiBrowserTest {
+public class ComboSelectedValueBeyondTheFirstDropdownPageTest
+ extends MultiBrowserTest {
@Test
public void valueOnSecondPageIsSelected() {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboboxMenuBarAutoopenTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboboxMenuBarAutoopenTest.java
index 5c8c971194..2b82acf505 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboboxMenuBarAutoopenTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboboxMenuBarAutoopenTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test that checks whether Combobox popup is closed on click to autoopen
* menubar and its item.
- *
+ *
* @author Vaadin Ltd
*/
public class ComboboxMenuBarAutoopenTest extends MultiBrowserTest {
@@ -46,8 +46,8 @@ public class ComboboxMenuBarAutoopenTest extends MultiBrowserTest {
openPopup();
menuBar = selectMenuBar();
- WebElement menuBarItem = findElement(By
- .className("v-menubar-menuitem-caption"));
+ WebElement menuBarItem = findElement(
+ By.className("v-menubar-menuitem-caption"));
Actions actions = new Actions(getDriver());
actions.moveToElement(menuBarItem).build().perform();
menuBar.click();
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboboxPageLengthZeroScrollTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboboxPageLengthZeroScrollTest.java
index e88dd2eb85..ef3bcdf17a 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboboxPageLengthZeroScrollTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboboxPageLengthZeroScrollTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,7 +31,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test class for testing issue #13488 - changing pages with pagelength=0 breaks
* the style.
- *
+ *
* @author Vaadin Ltd
*/
@@ -40,7 +40,8 @@ public class ComboboxPageLengthZeroScrollTest extends MultiBrowserTest {
public void testComboboxPageLength() {
openTestURL();
- WebElement comboBox = vaadinElement("/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VFilterSelect[0]#textbox");
+ WebElement comboBox = vaadinElement(
+ "/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VFilterSelect[0]#textbox");
// navigate to the next page. keyboard navigation is the preferred
// method here since it's much easier to implement.
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboboxPopupScrollingTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboboxPopupScrollingTest.java
index ec5bc088da..28fd9f4206 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboboxPopupScrollingTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboboxPopupScrollingTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -50,8 +50,8 @@ public class ComboboxPopupScrollingTest extends MultiBrowserTest {
String caption = cb.getCaption();
cb.openPopup();
WebElement popup = cb.getSuggestionPopup();
- WebElement scrollable = popup.findElement(By
- .className("v-filterselect-suggestmenu"));
+ WebElement scrollable = popup
+ .findElement(By.className("v-filterselect-suggestmenu"));
assertNoHorizontalScrollbar(scrollable, caption);
assertNoVerticalScrollbar(scrollable, caption);
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboboxStyleChangeWidthTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboboxStyleChangeWidthTest.java
index 034319ac70..91da7a52d2 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboboxStyleChangeWidthTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboboxStyleChangeWidthTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests that changing a stylename will not cause the width parameter to be
* removed from a combobox.
- *
+ *
* @author Vaadin Ltd
*/
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/CustomComboBoxElement.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/CustomComboBoxElement.java
index 697d5eb932..bdcf92fd56 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/CustomComboBoxElement.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/CustomComboBoxElement.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/FilteringTurkishLocaleTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/FilteringTurkishLocaleTest.java
index d7f8e233ec..95c5a3c951 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/FilteringTurkishLocaleTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/FilteringTurkishLocaleTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/customfield/CustomFieldSizeTest.java b/uitest/src/test/java/com/vaadin/tests/components/customfield/CustomFieldSizeTest.java
index a3f8f06976..27f3c86f3f 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/customfield/CustomFieldSizeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/customfield/CustomFieldSizeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ import org.junit.Test;
import com.vaadin.tests.tb3.MultiBrowserTest;
/**
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/uitest/src/test/java/com/vaadin/tests/components/customlayout/CustomLayoutWithMissingSlotTest.java b/uitest/src/test/java/com/vaadin/tests/components/customlayout/CustomLayoutWithMissingSlotTest.java
index d47a100a93..e51dbad938 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/customlayout/CustomLayoutWithMissingSlotTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/customlayout/CustomLayoutWithMissingSlotTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/customlayout/CustomLayoutWithNullTemplateTest.java b/uitest/src/test/java/com/vaadin/tests/components/customlayout/CustomLayoutWithNullTemplateTest.java
index 668d43f18f..90dc0dea92 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/customlayout/CustomLayoutWithNullTemplateTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/customlayout/CustomLayoutWithNullTemplateTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,13 +31,14 @@ public class CustomLayoutWithNullTemplateTest extends SingleBrowserTest {
public void testChildComponents() {
openTestURL();
- ElementQuery<CustomLayoutElement> customLayout = $(CustomLayoutElement.class);
+ ElementQuery<CustomLayoutElement> customLayout = $(
+ CustomLayoutElement.class);
// Verify the Button and Label are rendered inside the CustomLayout.
assertTrue("Button was not rendered.",
customLayout.$(ButtonElement.class).exists());
- assertTrue("Label was not rendered.", customLayout
- .$(LabelElement.class).exists());
+ assertTrue("Label was not rendered.",
+ customLayout.$(LabelElement.class).exists());
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/customlayout/CustomLayoutWithoutTemplateTest.java b/uitest/src/test/java/com/vaadin/tests/components/customlayout/CustomLayoutWithoutTemplateTest.java
index 695d9cceff..981ae15efb 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/customlayout/CustomLayoutWithoutTemplateTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/customlayout/CustomLayoutWithoutTemplateTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,13 +31,14 @@ public class CustomLayoutWithoutTemplateTest extends SingleBrowserTest {
public void testChildComponents() {
openTestURL();
- ElementQuery<CustomLayoutElement> customLayout = $(CustomLayoutElement.class);
+ ElementQuery<CustomLayoutElement> customLayout = $(
+ CustomLayoutElement.class);
// Verify the Button and Label are rendered inside the CustomLayout.
assertTrue("Button was not rendered.",
customLayout.$(ButtonElement.class).exists());
- assertTrue("Label was not rendered.", customLayout
- .$(LabelElement.class).exists());
+ assertTrue("Label was not rendered.",
+ customLayout.$(LabelElement.class).exists());
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/customlayout/OverflowAutoFixTest.java b/uitest/src/test/java/com/vaadin/tests/components/customlayout/OverflowAutoFixTest.java
index d56e07f60b..20fdb5dfe3 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/customlayout/OverflowAutoFixTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/customlayout/OverflowAutoFixTest.java
@@ -35,9 +35,11 @@ public class OverflowAutoFixTest extends MultiBrowserTest {
private void assertElementCssValueEquals(String className,
String propertyName, String expected) {
- Assert.assertEquals(String.format(
- "Unexpected value for property '%s' on element '%s',",
- propertyName, className), expected,
+ Assert.assertEquals(
+ String.format(
+ "Unexpected value for property '%s' on element '%s',",
+ propertyName, className),
+ expected,
findElement(By.className(className)).getCssValue(propertyName));
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/AriaDisabledTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/AriaDisabledTest.java
index f37042396b..58a28747a7 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/datefield/AriaDisabledTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/AriaDisabledTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,8 +29,9 @@ public class AriaDisabledTest extends MultiBrowserTest {
openTestURL();
// Expect aria-disabled="false" on the enabled DateField.
- String ariaDisabled = driver.findElement(
- By.vaadin("/VVerticalLayout[0]/VPopupCalendar[1]#popupButton"))
+ String ariaDisabled = driver
+ .findElement(By
+ .vaadin("/VVerticalLayout[0]/VPopupCalendar[1]#popupButton"))
.getAttribute("aria-disabled");
assertEquals("false", ariaDisabled);
diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/CustomDateFormatEEETest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/CustomDateFormatEEETest.java
index 98094515e8..d1d2cc868f 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/datefield/CustomDateFormatEEETest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/CustomDateFormatEEETest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,8 +28,9 @@ public class CustomDateFormatEEETest extends MultiBrowserTest {
public void verifyDatePattern() {
openTestURL();
- String dateValue = driver.findElement(
- By.className("v-datefield-textfield")).getAttribute("value");
+ String dateValue = driver
+ .findElement(By.className("v-datefield-textfield"))
+ .getAttribute("value");
assertEquals("14/03/2014 Fri", dateValue);
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldChangeResolutionTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldChangeResolutionTest.java
index e3c85224c0..9bcabdcf72 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldChangeResolutionTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldChangeResolutionTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -86,8 +86,8 @@ public class DateFieldChangeResolutionTest extends MultiBrowserTest {
private void initialize() {
openTestURL();
WebElement dateField = driver.findElement(By.id(DATEFIELD_ID));
- dateFieldButton = dateField.findElement(By
- .className("v-datefield-button"));
+ dateFieldButton = dateField
+ .findElement(By.className("v-datefield-button"));
textField = dateField
.findElement(By.className("v-datefield-textfield"));
resolutionSecond = driver.findElement(By.id(BUTTON_BASE_ID + "second"));
@@ -111,7 +111,8 @@ public class DateFieldChangeResolutionTest extends MultiBrowserTest {
} else {
checkYearHeader();
}
- if (resolution.getCalendarField() >= Resolution.DAY.getCalendarField()) {
+ if (resolution.getCalendarField() >= Resolution.DAY
+ .getCalendarField()) {
assertTrue(
"A calendar with the chosen resolution should have a body",
calendarHasBody());
@@ -150,37 +151,36 @@ public class DateFieldChangeResolutionTest extends MultiBrowserTest {
if (buttonsExpected) {
assertTrue(
"The calendar should have a button for switching to the previous month",
- isElementPresent(By
- .cssSelector(".v-datefield-calendarpanel-header .v-datefield-calendarpanel-prevmonth .v-button-prevmonth")));
+ isElementPresent(By.cssSelector(
+ ".v-datefield-calendarpanel-header .v-datefield-calendarpanel-prevmonth .v-button-prevmonth")));
assertTrue(
"The calendar should have a button for switching to the next month",
- isElementPresent(By
- .cssSelector(".v-datefield-calendarpanel-header .v-datefield-calendarpanel-nextmonth .v-button-nextmonth")));
+ isElementPresent(By.cssSelector(
+ ".v-datefield-calendarpanel-header .v-datefield-calendarpanel-nextmonth .v-button-nextmonth")));
} else {
assertFalse(
"The calendar should not have a button for switching to the previous month",
- isElementPresent(By
- .cssSelector(".v-datefield-calendarpanel-header .v-datefield-calendarpanel-prevmonth .v-button-prevmonth")));
+ isElementPresent(By.cssSelector(
+ ".v-datefield-calendarpanel-header .v-datefield-calendarpanel-prevmonth .v-button-prevmonth")));
assertFalse(
"The calendar should not have a button for switching to the next month",
- isElementPresent(By
- .cssSelector(".v-datefield-calendarpanel-header .v-datefield-calendarpanel-nextmonth .v-button-nextmonth")));
+ isElementPresent(By.cssSelector(
+ ".v-datefield-calendarpanel-header .v-datefield-calendarpanel-nextmonth .v-button-nextmonth")));
}
}
private void checkHeaderForYear() {
assertTrue(
"The calendar should have a button for switching to the previous year",
- isElementPresent(By
- .cssSelector(".v-datefield-calendarpanel-header .v-datefield-calendarpanel-prevyear .v-button-prevyear")));
- assertTrue(
- "The calendar header should show the selected year",
- isElementPresent(By
- .cssSelector(".v-datefield-calendarpanel-header .v-datefield-calendarpanel-month")));
+ isElementPresent(By.cssSelector(
+ ".v-datefield-calendarpanel-header .v-datefield-calendarpanel-prevyear .v-button-prevyear")));
+ assertTrue("The calendar header should show the selected year",
+ isElementPresent(By.cssSelector(
+ ".v-datefield-calendarpanel-header .v-datefield-calendarpanel-month")));
assertTrue(
"The calendar should have a button for switching to the next year",
- isElementPresent(By
- .cssSelector(".v-datefield-calendarpanel-header .v-datefield-calendarpanel-nextyear .v-button-nextyear")));
+ isElementPresent(By.cssSelector(
+ ".v-datefield-calendarpanel-header .v-datefield-calendarpanel-nextyear .v-button-nextyear")));
}
@@ -193,8 +193,8 @@ public class DateFieldChangeResolutionTest extends MultiBrowserTest {
}
private void closePopupDateField() {
- WebElement element = driver.findElement(By
- .cssSelector(".v-datefield-calendarpanel"));
+ WebElement element = driver
+ .findElement(By.cssSelector(".v-datefield-calendarpanel"));
element.sendKeys(Keys.ESCAPE);
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldCloseTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldCloseTest.java
index e6f7520813..8cee8fa0cf 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldCloseTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldCloseTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -40,8 +40,8 @@ public class DateFieldCloseTest extends MultiBrowserTest {
}
private void checkForCalendarHeader(boolean headerShouldExist) {
- boolean headerExists = isElementPresent(By
- .className("v-datefield-calendarpanel-header"));
+ boolean headerExists = isElementPresent(
+ By.className("v-datefield-calendarpanel-header"));
if (headerShouldExist) {
assertTrue("The calendar should be visible", headerExists);
} else {
@@ -50,14 +50,14 @@ public class DateFieldCloseTest extends MultiBrowserTest {
}
private void clickButton() {
- WebElement dateFieldButton = dateField.findElement(By
- .className("v-datefield-button"));
+ WebElement dateFieldButton = dateField
+ .findElement(By.className("v-datefield-button"));
testBenchElement(dateFieldButton).click(5, 5);
}
private void closePopup() {
- WebElement dateFieldButton = dateField.findElement(By
- .className("v-datefield-button"));
+ WebElement dateFieldButton = dateField
+ .findElement(By.className("v-datefield-button"));
// To work reliably with IE, need to click and hold instead of just
// clicking the button.
Actions actions = new Actions(driver);
diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldDayResolutionOffsetTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldDayResolutionOffsetTest.java
index 4ee9597f68..81b07e10a4 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldDayResolutionOffsetTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldDayResolutionOffsetTest.java
@@ -25,8 +25,8 @@ public class DateFieldDayResolutionOffsetTest extends MultiBrowserTest {
}
private void select2ndOfSeptember() {
- for (WebElement e : findElements(By
- .className("v-datefield-calendarpanel-day"))) {
+ for (WebElement e : findElements(
+ By.className("v-datefield-calendarpanel-day"))) {
if (e.getText().equals("2")) {
e.click();
break;
diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldDiscardValueTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldDiscardValueTest.java
index 142730a9a3..a5bc66102f 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldDiscardValueTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldDiscardValueTest.java
@@ -21,59 +21,63 @@ public class DateFieldDiscardValueTest extends SingleBrowserTest {
@Test
public void discardWhenDatasourceContentNonNullValidValue() {
- discardWorks(DateFieldDiscardValue.PROP_NONULL, "1", "24/07/16", "25/07/16");
+ discardWorks(DateFieldDiscardValue.PROP_NONULL, "1", "24/07/16",
+ "25/07/16");
}
@Test
public void discardWhenDatasourceContentNullInvalidValue() {
discardWorks(DateFieldDiscardValue.PROP_NULL_VALUE, "2", "123", "");
}
-
+
@Test
public void discardWhenDatasourceContentNullValidValue() {
- discardWorks(DateFieldDiscardValue.PROP_NULL_VALUE, "2", "24/07/16", "");
+ discardWorks(DateFieldDiscardValue.PROP_NULL_VALUE, "2", "24/07/16",
+ "");
}
@Test
public void discardWhenDatasourceNull() {
- //If the data source is null, discard should do nothing.
+ // If the data source is null, discard should do nothing.
discardDoesntWork(DateFieldDiscardValue.PROP_NULL, "3", "123");
}
- private void discardWorks(String caption, String id, String dateValue, String resultValue) {
+ private void discardWorks(String caption, String id, String dateValue,
+ String resultValue) {
openTestURL();
- ButtonElement discardButton = $(ButtonElement.class).caption(
- "Discard " + id).first();
- DateFieldElement dateField = $(DateFieldElement.class).caption(
- caption).first();
+ ButtonElement discardButton = $(ButtonElement.class)
+ .caption("Discard " + id).first();
+ DateFieldElement dateField = $(DateFieldElement.class).caption(caption)
+ .first();
dateField.setValue(dateValue);
discardButton.click();
assertEquals(resultValue, dateField.getValue());
- List<WebElement> elements = driver.findElements(By
- .className("v-errorindicator"));
+ List<WebElement> elements = driver
+ .findElements(By.className("v-errorindicator"));
assertEquals(0, elements.size());
}
-
- private void discardDoesntWork(String caption, String id, String dateValue) {
+
+ private void discardDoesntWork(String caption, String id,
+ String dateValue) {
openTestURL();
- ButtonElement discardButton = $(ButtonElement.class).caption(
- "Discard " + id).first();
- DateFieldElement dateField = $(DateFieldElement.class).caption(
- caption).first();
+ ButtonElement discardButton = $(ButtonElement.class)
+ .caption("Discard " + id).first();
+ DateFieldElement dateField = $(DateFieldElement.class).caption(caption)
+ .first();
dateField.setValue(dateValue);
discardButton.click();
assertEquals(dateValue, dateField.getValue());
- List<WebElement> elements = driver.findElements(By
- .className("v-errorindicator"));
+ List<WebElement> elements = driver
+ .findElements(By.className("v-errorindicator"));
assertEquals(1, elements.size());
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldFastForwardTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldFastForwardTest.java
index 63d96e9bf9..9321b70ec4 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldFastForwardTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldFastForwardTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,8 +32,8 @@ public class DateFieldFastForwardTest extends MultiBrowserTest {
public void testFastForwardOnRightMouseClick() throws Exception {
openTestURL();
String firstMonth = getSelectedMonth();
- WebElement nextMonthButton = driver.findElement(By
- .className("v-button-nextmonth"));
+ WebElement nextMonthButton = driver
+ .findElement(By.className("v-button-nextmonth"));
// Click and hold left mouse button to start fast forwarding.
new Actions(driver).clickAndHold(nextMonthButton).perform();
@@ -63,8 +63,9 @@ public class DateFieldFastForwardTest extends MultiBrowserTest {
}
private String getSelectedMonth() {
- return driver.findElement(
- By.className("v-inline-datefield-calendarpanel-month"))
+ return driver
+ .findElement(
+ By.className("v-inline-datefield-calendarpanel-month"))
.getText();
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldIsValidTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldIsValidTest.java
index 3ba63d0f12..988a8d1af6 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldIsValidTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldIsValidTest.java
@@ -36,8 +36,8 @@ public class DateFieldIsValidTest extends MultiBrowserTest {
waitForElementVisible(By.id("Log"));
waitForElementVisible(By.className("v-datefield"));
- WebElement dateTextbox = $(DateFieldElement.class).first().findElement(
- By.className("v-textfield"));
+ WebElement dateTextbox = $(DateFieldElement.class).first()
+ .findElement(By.className("v-textfield"));
ButtonElement button = $(ButtonElement.class).first();
dateTextbox.sendKeys("01/01/01", Keys.TAB);
diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldKeyboardInputTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldKeyboardInputTest.java
index 15f196a26b..7cc6ab9f80 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldKeyboardInputTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldKeyboardInputTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldPopupClosingOnDetachTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldPopupClosingOnDetachTest.java
index ca3d3a8748..6178bd78b6 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldPopupClosingOnDetachTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldPopupClosingOnDetachTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldPopupClosingTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldPopupClosingTest.java
index 9fd6fe82e2..c0b01992d7 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldPopupClosingTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldPopupClosingTest.java
@@ -30,8 +30,8 @@ public class DateFieldPopupClosingTest extends MultiBrowserTest {
}
private void assertThatPopupIsVisible() {
- waitUntil(ExpectedConditions.visibilityOfElementLocated(By
- .className("v-datefield-popup")));
+ waitUntil(ExpectedConditions
+ .visibilityOfElementLocated(By.className("v-datefield-popup")));
}
private void assertThatPopupIsInvisible() {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldPopupPositionTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldPopupPositionTest.java
index f896519aae..e91661e5b1 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldPopupPositionTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldPopupPositionTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test for date field popup calendar position.
- *
+ *
* @author Vaadin Ltd
*/
public abstract class DateFieldPopupPositionTest extends MultiBrowserTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldReadOnlyTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldReadOnlyTest.java
index cfab13e205..07cd41bb46 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldReadOnlyTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldReadOnlyTest.java
@@ -13,8 +13,8 @@ import java.io.IOException;
public class DateFieldReadOnlyTest extends MultiBrowserTest {
@Test
- public void readOnlyDateFieldPopupShouldNotOpen() throws IOException,
- InterruptedException {
+ public void readOnlyDateFieldPopupShouldNotOpen()
+ throws IOException, InterruptedException {
openTestURL();
compareScreen("initial");
@@ -29,8 +29,8 @@ public class DateFieldReadOnlyTest extends MultiBrowserTest {
}
private void closePopup() {
- findElement(By.className("v-datefield-calendarpanel")).sendKeys(
- Keys.RETURN);
+ findElement(By.className("v-datefield-calendarpanel"))
+ .sendKeys(Keys.RETURN);
}
private void openPopup() {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldTestTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldTestTest.java
index 5f659d389b..e42f85df30 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldTestTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldTestTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldWhenChangingValueAndEnablingParentTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldWhenChangingValueAndEnablingParentTest.java
index 23f6d6f5a6..225338ce09 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldWhenChangingValueAndEnablingParentTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldWhenChangingValueAndEnablingParentTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,8 +24,8 @@ import com.vaadin.testbench.elements.DateFieldElement;
import com.vaadin.testbench.elements.PopupDateFieldElement;
import com.vaadin.tests.tb3.SingleBrowserTest;
-public class DateFieldWhenChangingValueAndEnablingParentTest extends
- SingleBrowserTest {
+public class DateFieldWhenChangingValueAndEnablingParentTest
+ extends SingleBrowserTest {
@Test
public void ensureCorrectStateAfterEnabling() {
@@ -48,9 +48,8 @@ public class DateFieldWhenChangingValueAndEnablingParentTest extends
assertState(
$(PopupDateFieldElement.class).id("DATEFIELD_DISABLED_ENABLED"),
false, false);
- assertState(
- $(PopupDateFieldElement.class)
- .id("DATEFIELD_DISABLED_DISABLED"), false, false);
+ assertState($(PopupDateFieldElement.class)
+ .id("DATEFIELD_DISABLED_DISABLED"), false, false);
}
@@ -72,26 +71,32 @@ public class DateFieldWhenChangingValueAndEnablingParentTest extends
boolean hasClass = hasCssClass(id, "v-disabled");
boolean fieldEnabled = !hasClass;
if (assertEnabled) {
- Assert.assertTrue("Field " + id.getAttribute("id")
- + " should be enabled", fieldEnabled);
+ Assert.assertTrue(
+ "Field " + id.getAttribute("id") + " should be enabled",
+ fieldEnabled);
} else {
- Assert.assertFalse("Field " + id.getAttribute("id")
- + " should be disabled", fieldEnabled);
+ Assert.assertFalse(
+ "Field " + id.getAttribute("id") + " should be disabled",
+ fieldEnabled);
}
}
private void assertTextInputEnabled(DateFieldElement id, boolean enabled) {
- String disabledAttr = id.findElement(By.xpath("./input")).getAttribute(
- "disabled");
+ String disabledAttr = id.findElement(By.xpath("./input"))
+ .getAttribute("disabled");
boolean textinputEnabled = (disabledAttr == null);
if (enabled) {
- Assert.assertTrue("Field " + id.getAttribute("id")
- + " text field should be enabled", textinputEnabled);
+ Assert.assertTrue(
+ "Field " + id.getAttribute("id")
+ + " text field should be enabled",
+ textinputEnabled);
} else {
- Assert.assertFalse("Field " + id.getAttribute("id")
- + " text field should be disabled", textinputEnabled);
+ Assert.assertFalse(
+ "Field " + id.getAttribute("id")
+ + " text field should be disabled",
+ textinputEnabled);
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateRangeWithSqlDateTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateRangeWithSqlDateTest.java
index 2352011585..dd603057a8 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateRangeWithSqlDateTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateRangeWithSqlDateTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,8 +32,8 @@ public class DateRangeWithSqlDateTest extends MultiBrowserTest {
openTestURL();
// Get all cells of the inline datefield.
- List<WebElement> cells = driver.findElements(By
- .className("v-inline-datefield-calendarpanel-day"));
+ List<WebElement> cells = driver.findElements(
+ By.className("v-inline-datefield-calendarpanel-day"));
// Verify the range is rendered correctly.
assertCell(cells.get(0), "30", true);
@@ -42,7 +42,8 @@ public class DateRangeWithSqlDateTest extends MultiBrowserTest {
assertCell(cells.get(3), "3", true);
}
- private void assertCell(WebElement cell, String text, boolean outsideRange) {
+ private void assertCell(WebElement cell, String text,
+ boolean outsideRange) {
assertEquals(text, cell.getText());
assertEquals(outsideRange,
cell.getAttribute("class").contains("outside-range"));
diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/DefaultDateFieldPopupPositionTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/DefaultDateFieldPopupPositionTest.java
index 61cc876a3f..669819e393 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/datefield/DefaultDateFieldPopupPositionTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/DefaultDateFieldPopupPositionTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,13 +22,13 @@ import com.vaadin.testbench.elements.DateFieldElement;
/**
* Test for date field popup calendar position in default theme.
- *
+ *
* Test method is defined in super class.
- *
+ *
* @author Vaadin Ltd
*/
-public class DefaultDateFieldPopupPositionTest extends
- DateFieldPopupPositionTest {
+public class DefaultDateFieldPopupPositionTest
+ extends DateFieldPopupPositionTest {
@Override
protected void checkPopupPosition() {
@@ -36,8 +36,10 @@ public class DefaultDateFieldPopupPositionTest extends
int right = field.getLocation().getX() + field.getSize().getWidth();
WebElement popup = getPopup();
- Assert.assertTrue("Calendar popup has wrong X coordinate="
- + popup.getLocation().getX() + " , right side of the field is "
- + right, popup.getLocation().getX() >= right);
+ Assert.assertTrue(
+ "Calendar popup has wrong X coordinate="
+ + popup.getLocation().getX()
+ + " , right side of the field is " + right,
+ popup.getLocation().getX() >= right);
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/DisabledDateFieldPopupTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/DisabledDateFieldPopupTest.java
index 4775441af2..5cd6cbb6e3 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/datefield/DisabledDateFieldPopupTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/DisabledDateFieldPopupTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -39,8 +39,8 @@ public class DisabledDateFieldPopupTest extends MultiBrowserTest {
public void testPopup() throws IOException {
openTestURL();
- WebElement button = driver.findElement(By
- .className("v-datefield-button"));
+ WebElement button = driver
+ .findElement(By.className("v-datefield-button"));
new Actions(driver).moveToElement(button).click()
.sendKeys(Keys.ARROW_DOWN).perform();
diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/DisabledInlineDateFieldTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/DisabledInlineDateFieldTest.java
index 2c50030461..dab7235306 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/datefield/DisabledInlineDateFieldTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/DisabledInlineDateFieldTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -56,8 +56,8 @@ public class DisabledInlineDateFieldTest extends MultiBrowserTest {
private void testDaySelection(String cssClass) {
// We know that the first day element is not selected, because of the
// fixed date in the test.
- WebElement nonSelectedDay = driver.findElement(By.cssSelector(cssClass
- + " .v-inline-datefield-calendarpanel-day"));
+ WebElement nonSelectedDay = driver.findElement(By.cssSelector(
+ cssClass + " .v-inline-datefield-calendarpanel-day"));
// Assert it is not selected before click.
assertFalse(nonSelectedDay.getAttribute("class").contains("selected"));
@@ -70,8 +70,8 @@ public class DisabledInlineDateFieldTest extends MultiBrowserTest {
}
private String getSelectedMonth(String selectorPrefix) {
- return driver.findElement(
- By.cssSelector(selectorPrefix
+ return driver
+ .findElement(By.cssSelector(selectorPrefix
+ " .v-inline-datefield-calendarpanel-month"))
.getText();
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/DisabledParentLayoutTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/DisabledParentLayoutTest.java
index 76486bf340..dc7bee2903 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/datefield/DisabledParentLayoutTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/DisabledParentLayoutTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.testbench.By;
import com.vaadin.tests.tb3.MultiBrowserTest;
/**
- *
+ *
* @author Vaadin Ltd
*/
public class DisabledParentLayoutTest extends MultiBrowserTest {
@@ -35,16 +35,16 @@ public class DisabledParentLayoutTest extends MultiBrowserTest {
WebElement button = driver.findElement(By.className("v-button"));
button.click();
- WebElement textField = driver.findElement(By
- .className("v-datefield-textfield"));
+ WebElement textField = driver
+ .findElement(By.className("v-datefield-textfield"));
textField.click();
Assert.assertFalse(
"Date input text field shoud be disabled for disabled DateField",
textField.isEnabled());
- WebElement dataFieldButton = driver.findElement(By
- .className("v-datefield-button"));
+ WebElement dataFieldButton = driver
+ .findElement(By.className("v-datefield-button"));
dataFieldButton.click();
Assert.assertFalse(
diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/LocaleChangeTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/LocaleChangeTest.java
index 38e4b7e0b8..5a10a049f9 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/datefield/LocaleChangeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/LocaleChangeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -64,8 +64,9 @@ public class LocaleChangeTest extends MultiBrowserTest {
if (!BrowserUtil.isIE(getDesiredCapabilities())) {
driver.findElement(By.className("v-datefield-button")).click();
} else {
- boolean popupOpen = driver.findElements(
- By.className("v-datefield-popup")).size() == 1;
+ boolean popupOpen = driver
+ .findElements(By.className("v-datefield-popup"))
+ .size() == 1;
if (popupOpen) {
driver.findElement(
By.className("v-datefield-calendarpanel-day-selected"))
diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/PopupClosingWithEscTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/PopupClosingWithEscTest.java
index 1366d38705..d0c898a8c2 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/datefield/PopupClosingWithEscTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/PopupClosingWithEscTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -36,8 +36,8 @@ public class PopupClosingWithEscTest extends MultiBrowserTest {
// Send ESC to the select element to simulate user being
// focused on the select while hitting the ESC key.
- WebElement select = driver.findElement(By
- .cssSelector(".v-datefield-popup select:first-child"));
+ WebElement select = driver.findElement(
+ By.cssSelector(".v-datefield-popup select:first-child"));
select.sendKeys(Keys.ESCAPE);
assertFalse(isPopupVisible());
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/PopupDateFieldExtendedRangeTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/PopupDateFieldExtendedRangeTest.java
index 410b0edac6..73de10ee0d 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/datefield/PopupDateFieldExtendedRangeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/PopupDateFieldExtendedRangeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -36,7 +36,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests contents and functionality of PopupDateField's popup.
- *
+ *
* @author Vaadin Ltd
*/
public class PopupDateFieldExtendedRangeTest extends MultiBrowserTest {
@@ -63,14 +63,11 @@ public class PopupDateFieldExtendedRangeTest extends MultiBrowserTest {
// verify contents
WebElement popup = findElement(By.className("v-datefield-popup"));
- assertEquals(
- "unexpected month",
- "tammikuu 2011",
- popup.findElements(
- By.className("v-datefield-calendarpanel-month")).get(1)
- .getText());
- List<WebElement> headerElements = popup.findElement(
- By.className("v-datefield-calendarpanel-weekdays"))
+ assertEquals("unexpected month", "tammikuu 2011", popup
+ .findElements(By.className("v-datefield-calendarpanel-month"))
+ .get(1).getText());
+ List<WebElement> headerElements = popup
+ .findElement(By.className("v-datefield-calendarpanel-weekdays"))
.findElements(By.tagName("td"));
List<WebElement> weekdays = new ArrayList<WebElement>();
for (WebElement headerElement : headerElements) {
@@ -79,28 +76,22 @@ public class PopupDateFieldExtendedRangeTest extends MultiBrowserTest {
}
}
assertEquals("unexpected weekday count", 7, weekdays.size());
- assertEquals("unexpected first day of week", "MA", weekdays.get(0)
- .getText());
- assertEquals(
- "unexpected weeknumber count",
- 0,
+ assertEquals("unexpected first day of week", "MA",
+ weekdays.get(0).getText());
+ assertEquals("unexpected weeknumber count", 0,
popup.findElements(
By.className("v-datefield-calendarpanel-weeknumber"))
.size());
- assertEquals(
- "unexpected selection",
- "1",
+ assertEquals("unexpected selection", "1",
popup.findElement(
By.className("v-datefield-calendarpanel-day-selected"))
.getText());
- assertEquals(
- "unexpected focus",
- "1",
+ assertEquals("unexpected focus", "1",
popup.findElement(
By.className("v-datefield-calendarpanel-day-focused"))
.getText());
- List<WebElement> days = popup.findElements(By
- .className("v-datefield-calendarpanel-day"));
+ List<WebElement> days = popup
+ .findElements(By.className("v-datefield-calendarpanel-day"));
assertEquals("unexpected day count", 42, days.size());
assertEquals("unexpected day content", "27", days.get(0).getText());
assertEquals("unexpected day content", "4", days.get(8).getText());
@@ -112,21 +103,14 @@ public class PopupDateFieldExtendedRangeTest extends MultiBrowserTest {
.findElement(By.tagName("button")).click();
// verify contents
- assertEquals(
- "unexpected month",
- "joulukuu 2010",
- popup.findElements(
- By.className("v-datefield-calendarpanel-month")).get(1)
- .getText());
- assertEquals(
- "unexpected selection",
- "1",
+ assertEquals("unexpected month", "joulukuu 2010", popup
+ .findElements(By.className("v-datefield-calendarpanel-month"))
+ .get(1).getText());
+ assertEquals("unexpected selection", "1",
popup.findElement(
By.className("v-datefield-calendarpanel-day-selected"))
.getText());
- assertEquals(
- "unexpected focus",
- 0,
+ assertEquals("unexpected focus", 0,
popup.findElements(
By.className("v-datefield-calendarpanel-day-focused"))
.size());
@@ -143,21 +127,14 @@ public class PopupDateFieldExtendedRangeTest extends MultiBrowserTest {
.findElement(By.tagName("button")).click();
// verify contents
- assertEquals(
- "unexpected month",
- "joulukuu 2009",
- popup.findElements(
- By.className("v-datefield-calendarpanel-month")).get(1)
- .getText());
- assertEquals(
- "unexpected selection",
- 0,
+ assertEquals("unexpected month", "joulukuu 2009", popup
+ .findElements(By.className("v-datefield-calendarpanel-month"))
+ .get(1).getText());
+ assertEquals("unexpected selection", 0,
popup.findElements(
By.className("v-datefield-calendarpanel-day-selected"))
.size());
- assertEquals(
- "unexpected focus",
- 0,
+ assertEquals("unexpected focus", 0,
popup.findElements(
By.className("v-datefield-calendarpanel-day-focused"))
.size());
@@ -193,14 +170,11 @@ public class PopupDateFieldExtendedRangeTest extends MultiBrowserTest {
// verify contents
WebElement popup = findElement(By.className("v-datefield-popup"));
- assertEquals(
- "unexpected month",
- "February 2010",
- popup.findElements(
- By.className("v-datefield-calendarpanel-month")).get(1)
- .getText());
- List<WebElement> headerElements = popup.findElement(
- By.className("v-datefield-calendarpanel-weekdays"))
+ assertEquals("unexpected month", "February 2010", popup
+ .findElements(By.className("v-datefield-calendarpanel-month"))
+ .get(1).getText());
+ List<WebElement> headerElements = popup
+ .findElement(By.className("v-datefield-calendarpanel-weekdays"))
.findElements(By.tagName("td"));
List<WebElement> weekdays = new ArrayList<WebElement>();
for (WebElement headerElement : headerElements) {
@@ -209,28 +183,22 @@ public class PopupDateFieldExtendedRangeTest extends MultiBrowserTest {
}
}
assertEquals("unexpected weekday count", 7, weekdays.size());
- assertEquals("unexpected first day of week", "SUN", weekdays.get(0)
- .getText());
- assertEquals(
- "unexpected weeknumber count",
- 0,
+ assertEquals("unexpected first day of week", "SUN",
+ weekdays.get(0).getText());
+ assertEquals("unexpected weeknumber count", 0,
popup.findElements(
By.className("v-datefield-calendarpanel-weeknumber"))
.size());
- assertEquals(
- "unexpected selection",
- "16",
+ assertEquals("unexpected selection", "16",
popup.findElement(
By.className("v-datefield-calendarpanel-day-selected"))
.getText());
- assertEquals(
- "unexpected focus",
- "16",
+ assertEquals("unexpected focus", "16",
popup.findElement(
By.className("v-datefield-calendarpanel-day-focused"))
.getText());
- List<WebElement> days = popup.findElements(By
- .className("v-datefield-calendarpanel-day"));
+ List<WebElement> days = popup
+ .findElements(By.className("v-datefield-calendarpanel-day"));
assertEquals("unexpected day count", 42, days.size());
assertEquals("unexpected day content", "31", days.get(0).getText());
assertEquals("unexpected day content", "8", days.get(8).getText());
@@ -238,14 +206,12 @@ public class PopupDateFieldExtendedRangeTest extends MultiBrowserTest {
assertEquals("unexpected day content", "13", days.get(41).getText());
// navigate down
- WebElement popupBody = popup.findElement(By
- .className("v-datefield-calendarpanel"));
+ WebElement popupBody = popup
+ .findElement(By.className("v-datefield-calendarpanel"));
popupBody.sendKeys(Keys.ARROW_DOWN);
// ensure the focus changed
- assertEquals(
- "unexpected focus",
- "23",
+ assertEquals("unexpected focus", "23",
popup.findElement(
By.className("v-datefield-calendarpanel-day-focused"))
.getText());
@@ -254,21 +220,14 @@ public class PopupDateFieldExtendedRangeTest extends MultiBrowserTest {
popupBody.sendKeys(Keys.ARROW_DOWN);
// verify contents
- assertEquals(
- "unexpected month",
- "March 2010",
- popup.findElements(
- By.className("v-datefield-calendarpanel-month")).get(1)
- .getText());
- assertEquals(
- "unexpected selection",
- 0,
+ assertEquals("unexpected month", "March 2010", popup
+ .findElements(By.className("v-datefield-calendarpanel-month"))
+ .get(1).getText());
+ assertEquals("unexpected selection", 0,
popup.findElements(
By.className("v-datefield-calendarpanel-day-selected"))
.size());
- assertEquals(
- "unexpected focus",
- "2",
+ assertEquals("unexpected focus", "2",
popup.findElement(
By.className("v-datefield-calendarpanel-day-focused"))
.getText());
@@ -286,9 +245,7 @@ public class PopupDateFieldExtendedRangeTest extends MultiBrowserTest {
popupBody.sendKeys(Keys.ARROW_LEFT);
// ensure the focus changed
- assertEquals(
- "unexpected focus",
- "1",
+ assertEquals("unexpected focus", "1",
popup.findElement(
By.className("v-datefield-calendarpanel-day-focused"))
.getText());
@@ -297,21 +254,14 @@ public class PopupDateFieldExtendedRangeTest extends MultiBrowserTest {
popupBody.sendKeys(Keys.ARROW_LEFT);
// verify contents
- assertEquals(
- "unexpected month",
- "February 2010",
- popup.findElements(
- By.className("v-datefield-calendarpanel-month")).get(1)
- .getText());
- assertEquals(
- "unexpected selection",
- "16",
+ assertEquals("unexpected month", "February 2010", popup
+ .findElements(By.className("v-datefield-calendarpanel-month"))
+ .get(1).getText());
+ assertEquals("unexpected selection", "16",
popup.findElement(
By.className("v-datefield-calendarpanel-day-selected"))
.getText());
- assertEquals(
- "unexpected focus",
- "28",
+ assertEquals("unexpected focus", "28",
popup.findElement(
By.className("v-datefield-calendarpanel-day-focused"))
.getText());
@@ -347,14 +297,11 @@ public class PopupDateFieldExtendedRangeTest extends MultiBrowserTest {
// verify contents
WebElement popup = findElement(By.className("v-datefield-popup"));
- assertEquals(
- "unexpected month",
- "helmikuu 2010",
- popup.findElements(
- By.className("v-datefield-calendarpanel-month")).get(1)
- .getText());
- List<WebElement> headerElements = popup.findElement(
- By.className("v-datefield-calendarpanel-weekdays"))
+ assertEquals("unexpected month", "helmikuu 2010", popup
+ .findElements(By.className("v-datefield-calendarpanel-month"))
+ .get(1).getText());
+ List<WebElement> headerElements = popup
+ .findElement(By.className("v-datefield-calendarpanel-weekdays"))
.findElements(By.tagName("td"));
List<WebElement> weekdays = new ArrayList<WebElement>();
for (WebElement headerElement : headerElements) {
@@ -363,29 +310,25 @@ public class PopupDateFieldExtendedRangeTest extends MultiBrowserTest {
}
}
assertEquals("unexpected weekday count", 7, weekdays.size());
- assertEquals("unexpected first day of week", "MA", weekdays.get(0)
- .getText());
- List<WebElement> weeknumbers = popup.findElements(By
- .className("v-datefield-calendarpanel-weeknumber"));
+ assertEquals("unexpected first day of week", "MA",
+ weekdays.get(0).getText());
+ List<WebElement> weeknumbers = popup.findElements(
+ By.className("v-datefield-calendarpanel-weeknumber"));
assertEquals("unexpected weeknumber count", 6, weeknumbers.size());
- assertEquals("unexpected weeknumber content", "5", weeknumbers.get(0)
- .getText());
- assertEquals("unexpected weeknumber content", "10", weeknumbers.get(5)
- .getText());
- assertEquals(
- "unexpected selection",
- "16",
+ assertEquals("unexpected weeknumber content", "5",
+ weeknumbers.get(0).getText());
+ assertEquals("unexpected weeknumber content", "10",
+ weeknumbers.get(5).getText());
+ assertEquals("unexpected selection", "16",
popup.findElement(
By.className("v-datefield-calendarpanel-day-selected"))
.getText());
- assertEquals(
- "unexpected focus",
- "16",
+ assertEquals("unexpected focus", "16",
popup.findElement(
By.className("v-datefield-calendarpanel-day-focused"))
.getText());
- List<WebElement> days = popup.findElements(By
- .className("v-datefield-calendarpanel-day"));
+ List<WebElement> days = popup
+ .findElements(By.className("v-datefield-calendarpanel-day"));
assertEquals("unexpected day count", 42, days.size());
assertEquals("unexpected day content", "1", days.get(0).getText());
assertEquals("unexpected day content", "9", days.get(8).getText());
@@ -393,8 +336,8 @@ public class PopupDateFieldExtendedRangeTest extends MultiBrowserTest {
assertEquals("unexpected day content", "14", days.get(41).getText());
// navigate to previous month
- WebElement popupBody = popup.findElement(By
- .className("v-datefield-calendarpanel"));
+ WebElement popupBody = popup
+ .findElement(By.className("v-datefield-calendarpanel"));
new Actions(driver).keyDown(Keys.SHIFT).perform();
popupBody.sendKeys(Keys.ARROW_LEFT);
new Actions(driver).keyUp(Keys.SHIFT).perform();
@@ -408,22 +351,17 @@ public class PopupDateFieldExtendedRangeTest extends MultiBrowserTest {
}
// verify contents
- assertEquals(
- "unexpected month",
- "tammikuu 2010",
- popup.findElements(
- By.className("v-datefield-calendarpanel-month")).get(1)
- .getText());
- weeknumbers = popup.findElements(By
- .className("v-datefield-calendarpanel-weeknumber"));
+ assertEquals("unexpected month", "tammikuu 2010", popup
+ .findElements(By.className("v-datefield-calendarpanel-month"))
+ .get(1).getText());
+ weeknumbers = popup.findElements(
+ By.className("v-datefield-calendarpanel-weeknumber"));
assertEquals("unexpected weeknumber count", 6, weeknumbers.size());
- assertEquals("unexpected weeknumber content", "53", weeknumbers.get(0)
- .getText());
- assertEquals("unexpected weeknumber content", "5", weeknumbers.get(5)
- .getText());
- assertEquals(
- "unexpected selection",
- 0,
+ assertEquals("unexpected weeknumber content", "53",
+ weeknumbers.get(0).getText());
+ assertEquals("unexpected weeknumber content", "5",
+ weeknumbers.get(5).getText());
+ assertEquals("unexpected selection", 0,
popup.findElements(
By.className("v-datefield-calendarpanel-day-selected"))
.size());
@@ -431,11 +369,9 @@ public class PopupDateFieldExtendedRangeTest extends MultiBrowserTest {
// button instead of navigating with arrow keys steals the focus
if (!BrowserUtil.isIE(getDesiredCapabilities())
|| BrowserUtil.isIE8(getDesiredCapabilities())) {
- assertEquals(
- "unexpected focus",
- "16",
- popup.findElement(
- By.className("v-datefield-calendarpanel-day-focused"))
+ assertEquals("unexpected focus", "16",
+ popup.findElement(By
+ .className("v-datefield-calendarpanel-day-focused"))
.getText());
}
days = popup
@@ -456,33 +392,26 @@ public class PopupDateFieldExtendedRangeTest extends MultiBrowserTest {
.findElement(By.tagName("button")).click();
// verify contents
- assertEquals(
- "unexpected month",
- "tammikuu 2009",
- popup.findElements(
- By.className("v-datefield-calendarpanel-month")).get(1)
- .getText());
- weeknumbers = popup.findElements(By
- .className("v-datefield-calendarpanel-weeknumber"));
+ assertEquals("unexpected month", "tammikuu 2009", popup
+ .findElements(By.className("v-datefield-calendarpanel-month"))
+ .get(1).getText());
+ weeknumbers = popup.findElements(
+ By.className("v-datefield-calendarpanel-weeknumber"));
assertEquals("unexpected weeknumber count", 6, weeknumbers.size());
- assertEquals("unexpected weeknumber content", "1", weeknumbers.get(0)
- .getText());
- assertEquals("unexpected weeknumber content", "6", weeknumbers.get(5)
- .getText());
- assertEquals(
- "unexpected selection",
- 0,
+ assertEquals("unexpected weeknumber content", "1",
+ weeknumbers.get(0).getText());
+ assertEquals("unexpected weeknumber content", "6",
+ weeknumbers.get(5).getText());
+ assertEquals("unexpected selection", 0,
popup.findElements(
By.className("v-datefield-calendarpanel-day-selected"))
.size());
// TODO: remove this check once #14406 has been fixed -- clicking the
// button instead of navigating with arrow keys steals the focus
if (false) {
- assertEquals(
- "unexpected focus",
- "16",
- popup.findElement(
- By.className("v-datefield-calendarpanel-day-focused"))
+ assertEquals("unexpected focus", "16",
+ popup.findElement(By
+ .className("v-datefield-calendarpanel-day-focused"))
.getText());
}
days = popup
diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/PopupDateFieldInputPromptTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/PopupDateFieldInputPromptTest.java
index 4e5fa744c7..9f311f4a50 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/datefield/PopupDateFieldInputPromptTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/PopupDateFieldInputPromptTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,7 +32,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests that state change doesn't set input prompt back to PopupDateField if
* focus is still in the input field.
- *
+ *
* @author Vaadin Ltd
*/
public class PopupDateFieldInputPromptTest extends MultiBrowserTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/PopupDateFieldStatesTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/PopupDateFieldStatesTest.java
index 8c5ba20ecc..5f82bab831 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/datefield/PopupDateFieldStatesTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/PopupDateFieldStatesTest.java
@@ -9,8 +9,8 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
public class PopupDateFieldStatesTest extends MultiBrowserTest {
@Test
- public void readOnlyDateFieldPopupShouldNotOpen() throws IOException,
- InterruptedException {
+ public void readOnlyDateFieldPopupShouldNotOpen()
+ throws IOException, InterruptedException {
openTestURL();
compareScreen("dateFieldStates");
diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/PopupDateFieldValueChangeEventsTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/PopupDateFieldValueChangeEventsTest.java
index 95b8437b17..4a49339520 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/datefield/PopupDateFieldValueChangeEventsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/PopupDateFieldValueChangeEventsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -64,18 +64,18 @@ public class PopupDateFieldValueChangeEventsTest extends MultiBrowserTest {
}
public WebElement getHoursSelect() {
- return findElement(By
- .xpath("//table[@id='PID_VAADIN_POPUPCAL']/tbody/tr[3]/td/div/select"));
+ return findElement(By.xpath(
+ "//table[@id='PID_VAADIN_POPUPCAL']/tbody/tr[3]/td/div/select"));
}
public WebElement getMinutesSelect() {
- return findElement(By
- .xpath("//table[@id='PID_VAADIN_POPUPCAL']/tbody/tr[3]/td/div/select[2]"));
+ return findElement(By.xpath(
+ "//table[@id='PID_VAADIN_POPUPCAL']/tbody/tr[3]/td/div/select[2]"));
}
public WebElement getSecondsSelect() {
- return findElement(By
- .xpath("//table[@id='PID_VAADIN_POPUPCAL']/tbody/tr[3]/td/div/select[3]"));
+ return findElement(By.xpath(
+ "//table[@id='PID_VAADIN_POPUPCAL']/tbody/tr[3]/td/div/select[3]"));
}
public NativeSelectElement getResolutionSelect() {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/ValoDateFieldPopupPositionTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/ValoDateFieldPopupPositionTest.java
index 4009b9d991..76b87db4d2 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/datefield/ValoDateFieldPopupPositionTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/ValoDateFieldPopupPositionTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,9 +22,9 @@ import com.vaadin.testbench.elements.DateFieldElement;
/**
* Test for date field popup calendar position in Valo theme.
- *
+ *
* Test method is defined in super class.
- *
+ *
* @author Vaadin Ltd
*/
public class ValoDateFieldPopupPositionTest extends DateFieldPopupPositionTest {
@@ -37,7 +37,9 @@ public class ValoDateFieldPopupPositionTest extends DateFieldPopupPositionTest {
int popupRight = popup.getLocation().getX()
+ popup.getSize().getWidth();
- Assert.assertTrue("Calendar popup has wrong X coordinate=" + popupRight
- + " , left side of the field is " + left, popupRight <= left);
+ Assert.assertTrue(
+ "Calendar popup has wrong X coordinate=" + popupRight
+ + " , left side of the field is " + left,
+ popupRight <= left);
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropFocusObtainTest.java b/uitest/src/test/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropFocusObtainTest.java
index 7a2abe5efc..d0aa567e20 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropFocusObtainTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropFocusObtainTest.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -25,7 +25,7 @@ import com.vaadin.ui.DragAndDropWrapper;
/**
* Test for text area inside {@link DragAndDropWrapper}: text area should obtain
* focus on click.
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/uitest/src/test/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropRelativeWidthTest.java b/uitest/src/test/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropRelativeWidthTest.java
index 9cb7a63046..4b0833137b 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropRelativeWidthTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropRelativeWidthTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test to check size of drag image element.
- *
+ *
* @author Vaadin Ltd
*/
public class DragAndDropRelativeWidthTest extends MultiBrowserTest {
@@ -45,8 +45,8 @@ public class DragAndDropRelativeWidthTest extends MultiBrowserTest {
actions.moveByOffset(100, 100);
actions.build().perform();
- WebElement dragImage = getDriver().findElement(
- By.className("v-drag-element"));
+ WebElement dragImage = getDriver()
+ .findElement(By.className("v-drag-element"));
Assert.assertEquals("Drag image element height is unexpected", height,
dragImage.getSize().getHeight());
diff --git a/uitest/src/test/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropTextAreaTest.java b/uitest/src/test/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropTextAreaTest.java
index c60eead918..349413f043 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropTextAreaTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/draganddropwrapper/DragAndDropTextAreaTest.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -27,7 +27,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test for drag image of text area which should contain text-area text.
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
@@ -37,15 +37,15 @@ public class DragAndDropTextAreaTest extends MultiBrowserTest {
public void testTextAreaDndImage() {
openTestURL();
- WebElement wrapper = driver.findElement(By
- .className("v-verticallayout"));
+ WebElement wrapper = driver
+ .findElement(By.className("v-verticallayout"));
Actions actions = new Actions(driver);
actions.clickAndHold(wrapper);
actions.moveByOffset(50, 50);
actions.perform();
- WebElement dragElement = driver.findElement(By
- .className("v-drag-element"));
+ WebElement dragElement = driver
+ .findElement(By.className("v-drag-element"));
List<WebElement> children = dragElement.findElements(By.xpath(".//*"));
boolean found = false;
for (WebElement child : children) {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/draganddropwrapper/DragStartModesTest.java b/uitest/src/test/java/com/vaadin/tests/components/draganddropwrapper/DragStartModesTest.java
index 4e60b43ea2..d88172b9d9 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/draganddropwrapper/DragStartModesTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/draganddropwrapper/DragStartModesTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,8 @@ public class DragStartModesTest extends MultiBrowserTest {
@Test
public void testDragStartModes() throws IOException {
openTestURL();
- WebElement dropTarget = vaadinElement("/VVerticalLayout[0]/VVerticalLayout[0]/VLabel[0]");
+ WebElement dropTarget = vaadinElement(
+ "/VVerticalLayout[0]/VVerticalLayout[0]/VLabel[0]");
dragToTarget("COMPONENT", dropTarget);
dragToTarget("WRAPPER", dropTarget);
dragToTarget("COMPONENT_OTHER", dropTarget);
diff --git a/uitest/src/test/java/com/vaadin/tests/components/embedded/EmbeddedAltTextTest.java b/uitest/src/test/java/com/vaadin/tests/components/embedded/EmbeddedAltTextTest.java
index 23dcddd8d0..005551f9d2 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/embedded/EmbeddedAltTextTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/embedded/EmbeddedAltTextTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -54,7 +54,7 @@ public class EmbeddedAltTextTest extends MultiBrowserTest {
}
private String getAltText(EmbeddedElement embedded) {
- return embedded.findElement(By.vaadin("/domChild[0]")).getAttribute(
- "alt");
+ return embedded.findElement(By.vaadin("/domChild[0]"))
+ .getAttribute("alt");
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/embedded/EmbeddedClickListenerRelativeCoordinatesTest.java b/uitest/src/test/java/com/vaadin/tests/components/embedded/EmbeddedClickListenerRelativeCoordinatesTest.java
index 6bed0117f8..dcfadb0911 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/embedded/EmbeddedClickListenerRelativeCoordinatesTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/embedded/EmbeddedClickListenerRelativeCoordinatesTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,8 +25,8 @@ import com.vaadin.testbench.elements.LabelElement;
import com.vaadin.testbench.parallel.BrowserUtil;
import com.vaadin.tests.tb3.MultiBrowserTest;
-public class EmbeddedClickListenerRelativeCoordinatesTest extends
- MultiBrowserTest {
+public class EmbeddedClickListenerRelativeCoordinatesTest
+ extends MultiBrowserTest {
@Before
@Override
diff --git a/uitest/src/test/java/com/vaadin/tests/components/embedded/EmbeddedThemeResourceTest.java b/uitest/src/test/java/com/vaadin/tests/components/embedded/EmbeddedThemeResourceTest.java
index f892775ea3..9240dca56e 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/embedded/EmbeddedThemeResourceTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/embedded/EmbeddedThemeResourceTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -42,7 +42,7 @@ import com.vaadin.ui.Image;
* Tests that {@link Embedded} uses correct theme when the theme is set with
* {@link #setTheme(String)}, and also updates correctly if theme is changed
* later. {@link Image} is used as the baseline for correct behaviour.
- *
+ *
* @author Vaadin Ltd
*/
public class EmbeddedThemeResourceTest extends SingleBrowserTest {
@@ -51,8 +51,8 @@ public class EmbeddedThemeResourceTest extends SingleBrowserTest {
public List<DesiredCapabilities> getBrowsersToTest() {
// Seems like stylesheet onload is not fired on PhantomJS
// https://github.com/ariya/phantomjs/issues/12332
- return Collections.singletonList(Browser.FIREFOX
- .getDesiredCapabilities());
+ return Collections
+ .singletonList(Browser.FIREFOX.getDesiredCapabilities());
}
@Before
@@ -104,8 +104,8 @@ public class EmbeddedThemeResourceTest extends SingleBrowserTest {
}
});
- assertTrue("ThemeResource image source didn't update correctly.", image
- .getAttribute("src").contains("/reindeer/"));
+ assertTrue("ThemeResource image source didn't update correctly.",
+ image.getAttribute("src").contains("/reindeer/"));
assertThat(
"Embedded and Image aren't using the same source for the image despite sharing the ThemeResource.",
embedded.findElement(By.tagName("img")).getAttribute("src"),
diff --git a/uitest/src/test/java/com/vaadin/tests/components/embedded/FlashIsVisibleTest.java b/uitest/src/test/java/com/vaadin/tests/components/embedded/FlashIsVisibleTest.java
index 64d70df88f..2a2a697832 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/embedded/FlashIsVisibleTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/embedded/FlashIsVisibleTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,8 +19,8 @@ import static org.junit.Assert.assertTrue;
import org.junit.Test;
-public class FlashIsVisibleTest extends
- com.vaadin.tests.components.flash.FlashIsVisibleTest {
+public class FlashIsVisibleTest
+ extends com.vaadin.tests.components.flash.FlashIsVisibleTest {
@Override
@Test
diff --git a/uitest/src/test/java/com/vaadin/tests/components/form/FormTooltipsTest.java b/uitest/src/test/java/com/vaadin/tests/components/form/FormTooltipsTest.java
index cb71fef3ef..4c17edb805 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/form/FormTooltipsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/form/FormTooltipsTest.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -37,9 +37,8 @@ public class FormTooltipsTest extends TooltipTest {
checkTooltipNotPresent();
// first name caption tooltip
- checkTooltip(
- $(FormElement.class).first().findElement(
- By.className("v-caption")), "Fields own tooltip");
+ checkTooltip($(FormElement.class).first()
+ .findElement(By.className("v-caption")), "Fields own tooltip");
clearTooltip();
checkTooltipNotPresent();
@@ -54,9 +53,8 @@ public class FormTooltipsTest extends TooltipTest {
checkTooltip($(TextFieldElement.class).get(1), null);
// last name caption should have no tooltip
- checkTooltip(
- $(FormElement.class).first()
- .findElements(By.className("v-caption")).get(1), null);
+ checkTooltip($(FormElement.class).first()
+ .findElements(By.className("v-caption")).get(1), null);
}
} \ No newline at end of file
diff --git a/uitest/src/test/java/com/vaadin/tests/components/formlayout/FormLayoutClickListenerTest.java b/uitest/src/test/java/com/vaadin/tests/components/formlayout/FormLayoutClickListenerTest.java
index d2e64c3f22..e057a6b471 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/formlayout/FormLayoutClickListenerTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/formlayout/FormLayoutClickListenerTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test for form layout click listener.
- *
+ *
* @author Vaadin Ltd
*/
public class FormLayoutClickListenerTest extends MultiBrowserTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/formlayout/FormLayoutInVerticalLayoutTest.java b/uitest/src/test/java/com/vaadin/tests/components/formlayout/FormLayoutInVerticalLayoutTest.java
index 89e7c9a06e..2c277f3efc 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/formlayout/FormLayoutInVerticalLayoutTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/formlayout/FormLayoutInVerticalLayoutTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test for H2 label inside FormLayout as first child of VerticalLayout.
- *
+ *
* @author Vaadin Ltd
*/
public class FormLayoutInVerticalLayoutTest extends MultiBrowserTest {
@@ -37,8 +37,8 @@ public class FormLayoutInVerticalLayoutTest extends MultiBrowserTest {
List<WebElement> labels = findElements(By.className("v-label-h2"));
String formLabelMargin = labels.get(0).getCssValue("margin-top");
- String verticalLayoutLabelMargin = labels.get(1).getCssValue(
- "margin-top");
+ String verticalLayoutLabelMargin = labels.get(1)
+ .getCssValue("margin-top");
Assert.assertNotEquals(
"'margin-top' values for header label in vertical layout "
+ "and form layout are the same",
diff --git a/uitest/src/test/java/com/vaadin/tests/components/formlayout/FormLayoutResizingTest.java b/uitest/src/test/java/com/vaadin/tests/components/formlayout/FormLayoutResizingTest.java
index 3285503aeb..8af4b3930a 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/formlayout/FormLayoutResizingTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/formlayout/FormLayoutResizingTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -58,8 +58,8 @@ public class FormLayoutResizingTest extends MultiBrowserThemeTest {
int[] expandedWidths = getWidths(tables);
- Assert.assertEquals("Table should have grown ",
- originalWidths[0] + 200, expandedWidths[0]);
+ Assert.assertEquals("Table should have grown ", originalWidths[0] + 200,
+ expandedWidths[0]);
Assert.assertEquals("Wrapped table should have grown ",
originalWidths[1] + 200, expandedWidths[1]);
@@ -79,8 +79,8 @@ public class FormLayoutResizingTest extends MultiBrowserThemeTest {
expandedWidths = getWidths(tables);
- Assert.assertEquals("Table should have grown ",
- originalWidths[0] + 200, expandedWidths[0]);
+ Assert.assertEquals("Table should have grown ", originalWidths[0] + 200,
+ expandedWidths[0]);
Assert.assertEquals("Wrapped table should have grown ",
originalWidths[1] + 200, expandedWidths[1]);
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/formlayout/HtmlCaptionInFormLayoutTest.java b/uitest/src/test/java/com/vaadin/tests/components/formlayout/HtmlCaptionInFormLayoutTest.java
index 95130e8a0c..922235f3fd 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/formlayout/HtmlCaptionInFormLayoutTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/formlayout/HtmlCaptionInFormLayoutTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,8 +30,8 @@ public class HtmlCaptionInFormLayoutTest extends SingleBrowserTest {
public void testHtmlCaptions() {
openTestURL();
- List<WebElement> captions = getDriver().findElements(
- By.cssSelector(".v-formlayout-captioncell span"));
+ List<WebElement> captions = getDriver()
+ .findElements(By.cssSelector(".v-formlayout-captioncell span"));
Assert.assertEquals("Should be two formlayout captions", 2,
captions.size());
@@ -46,8 +46,8 @@ public class HtmlCaptionInFormLayoutTest extends SingleBrowserTest {
$(ButtonElement.class).caption("Toggle").first().click();
- List<WebElement> captions = getDriver().findElements(
- By.cssSelector(".v-formlayout-captioncell span"));
+ List<WebElement> captions = getDriver()
+ .findElements(By.cssSelector(".v-formlayout-captioncell span"));
Assert.assertEquals("Should be two formlayout captions", 2,
captions.size());
diff --git a/uitest/src/test/java/com/vaadin/tests/components/formlayout/StylePrefixTest.java b/uitest/src/test/java/com/vaadin/tests/components/formlayout/StylePrefixTest.java
index c43dc0042e..f8cc95a5a4 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/formlayout/StylePrefixTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/formlayout/StylePrefixTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test for FormLayout style prefix: custom additional styles should be prefixed
* with "v-formlayout-", not "v-layout-".
- *
+ *
* @author Vaadin Ltd
*/
public class StylePrefixTest extends MultiBrowserTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/AbstractGridColumnAutoWidthTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/AbstractGridColumnAutoWidthTest.java
index cf3ff0c3ef..754059aa18 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/AbstractGridColumnAutoWidthTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/AbstractGridColumnAutoWidthTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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,10 +100,10 @@ public abstract class AbstractGridColumnAutoWidthTest extends MultiBrowserTest {
WebElement[] col = new WebElement[3];
col[0] = getDriver().findElement(
By.xpath("//thead//th[" + (i + 1) + "]/div[1]/span"));
- col[1] = getDriver().findElement(
- By.xpath("//tbody//td[" + (i + 1) + "]//span"));
- col[2] = getDriver().findElement(
- By.xpath("//tbody//td[" + (i + 1) + "]"));
+ col[1] = getDriver()
+ .findElement(By.xpath("//tbody//td[" + (i + 1) + "]//span"));
+ col[2] = getDriver()
+ .findElement(By.xpath("//tbody//td[" + (i + 1) + "]"));
return col;
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/CustomRendererTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/CustomRendererTest.java
index d5e01a9de8..6ea03e802c 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/CustomRendererTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/CustomRendererTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -33,8 +33,8 @@ public class CustomRendererTest extends MultiBrowserTest {
openTestURL();
GridElement grid = findGrid();
- assertEquals("1 :: 1 :: 2 :: 3 :: 5 :: 8 :: 13", grid.getCell(0, 0)
- .getText());
+ assertEquals("1 :: 1 :: 2 :: 3 :: 5 :: 8 :: 13",
+ grid.getCell(0, 0).getText());
}
@Test
@@ -43,8 +43,8 @@ public class CustomRendererTest extends MultiBrowserTest {
GridElement grid = findGrid();
assertEquals("Click me!", grid.getCell(0, 1).getText());
- assertEquals(CustomRenderer.INIT_DEBUG_LABEL_CAPTION, findDebugLabel()
- .getText());
+ assertEquals(CustomRenderer.INIT_DEBUG_LABEL_CAPTION,
+ findDebugLabel().getText());
grid.getCell(0, 1).click();
assertEquals("row: 0, key: 1", grid.getCell(0, 1).getText());
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridAddAndRemoveDataOnInitTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridAddAndRemoveDataOnInitTest.java
index 42327ebd80..d14f0e7a80 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridAddAndRemoveDataOnInitTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridAddAndRemoveDataOnInitTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridAddRowTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridAddRowTest.java
index 8c601db9aa..94244c1d41 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridAddRowTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridAddRowTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridCellFocusOnResetSizeTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridCellFocusOnResetSizeTest.java
index cccb306369..b9e782122a 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridCellFocusOnResetSizeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridCellFocusOnResetSizeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -41,19 +41,19 @@ public class GridCellFocusOnResetSizeTest extends MultiBrowserTest {
GridElement grid = $(MyGridElement.class).first();
int rowIndex = 9;
grid.getCell(rowIndex, 0).click();
- assertTrue("Row was not focused after click.", grid.getRow(rowIndex)
- .isFocused());
+ assertTrue("Row was not focused after click.",
+ grid.getRow(rowIndex).isFocused());
// Clicking the button decreases size until it is down to 5 rows.
while (rowIndex > 4) {
findElement(By.tagName("button")).click();
- assertTrue("Row focus was not moved when size decreased", grid
- .getRow(--rowIndex).isFocused());
+ assertTrue("Row focus was not moved when size decreased",
+ grid.getRow(--rowIndex).isFocused());
}
// Next click increases size back to 10, this should not move focus.
findElement(By.tagName("button")).click();
- assertTrue("Row focus should not have moved when size increased", grid
- .getRow(4).isFocused());
+ assertTrue("Row focus should not have moved when size increased",
+ grid.getRow(4).isFocused());
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridCheckBoxDisplayTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridCheckBoxDisplayTest.java
index c430821534..7ac941ed1e 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridCheckBoxDisplayTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridCheckBoxDisplayTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -34,8 +34,8 @@ public class GridCheckBoxDisplayTest extends SingleBrowserTest {
Assert.assertEquals("First item had wrong value", "true",
grid.getCell(0, 0).getText());
- Assert.assertEquals("Second item had wrong value", "false", grid
- .getCell(1, 0).getText());
+ Assert.assertEquals("Second item had wrong value", "false",
+ grid.getCell(1, 0).getText());
// First edit false item and see that the CheckBox is unchecked
grid.getCell(1, 0).doubleClick();
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridClientDataChangeHandlerTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridClientDataChangeHandlerTest.java
index 02ca206b5e..2af9e7049f 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridClientDataChangeHandlerTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridClientDataChangeHandlerTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridClientRenderers.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridClientRenderers.java
index 4139bb0c5f..a2077bb0e9 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridClientRenderers.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridClientRenderers.java
@@ -42,7 +42,7 @@ import com.vaadin.tests.widgetset.server.grid.GridClientColumnRenderers;
/**
* Tests Grid client side renderers
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -81,8 +81,8 @@ public class GridClientRenderers extends MultiBrowserTest {
openTestURL();
// Add widget renderer column
- $(NativeSelectElement.class).first().selectByText(
- Renderers.WIDGET_RENDERER.toString());
+ $(NativeSelectElement.class).first()
+ .selectByText(Renderers.WIDGET_RENDERER.toString());
$(NativeButtonElement.class).caption("Add").first().click();
// Click the button in cell 1,1
@@ -100,8 +100,8 @@ public class GridClientRenderers extends MultiBrowserTest {
openTestURL();
// Add widget renderer column
- $(NativeSelectElement.class).first().selectByText(
- Renderers.WIDGET_RENDERER.toString());
+ $(NativeSelectElement.class).first()
+ .selectByText(Renderers.WIDGET_RENDERER.toString());
$(NativeButtonElement.class).caption("Add").first().click();
// Detach and re-attach the Grid
@@ -131,8 +131,7 @@ public class GridClientRenderers extends MultiBrowserTest {
TestBenchElement row = getGrid().getRow(51);
String className = row.getAttribute("class");
- assertFalse(
- "Row should not yet contain style name v-grid-row-has-data",
+ assertFalse("Row should not yet contain style name v-grid-row-has-data",
className.contains("v-grid-row-has-data"));
// Wait for data to arrive
@@ -171,7 +170,8 @@ public class GridClientRenderers extends MultiBrowserTest {
// Test initial renderering with contentVisible = False
TestBenchElement cell = getGrid().getCell(51, 1);
String backgroundColor = cell.getCssValue("backgroundColor");
- assertEquals("Background color was not red.", colorRed, backgroundColor);
+ assertEquals("Background color was not red.", colorRed,
+ backgroundColor);
// data arrives...
sleep((int) (latency * SLEEP_MULTIPLIER));
@@ -187,15 +187,15 @@ public class GridClientRenderers extends MultiBrowserTest {
// Cell should be red (setContentVisible set cell red)
cell = getGrid().getCell(55, 1);
backgroundColor = cell.getCssValue("backgroundColor");
- assertEquals("Background color was not red.", colorRed, backgroundColor);
+ assertEquals("Background color was not red.", colorRed,
+ backgroundColor);
// data arrives...
sleep((int) (latency * SLEEP_MULTIPLIER));
// Cell should no longer be red
backgroundColor = cell.getCssValue("backgroundColor");
- assertTrue(
- "Background color was not reset",
+ assertTrue("Background color was not reset",
backgroundColor.equals(colorWhite)
|| backgroundColor.equals(colorDark));
}
@@ -272,8 +272,8 @@ public class GridClientRenderers extends MultiBrowserTest {
cell = getGrid().getCell(4, 1);
cell.click();
new Actions(getDriver()).moveToElement(cell).doubleClick().perform();
- assertEquals("onActivate was not called on double click.",
- "Activated!", cell.getText());
+ assertEquals("onActivate was not called on double click.", "Activated!",
+ cell.getText());
}
private GridElement getGrid() {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridColspansTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridColspansTest.java
index d99272d506..9867cbd801 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridColspansTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridColspansTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -61,15 +61,15 @@ public class GridColspansTest extends MultiBrowserTest {
openTestURL();
GridElement grid = $(GridElement.class).first();
- assertEquals("Failed initial condition.", "all the stuff", grid
- .getHeaderCell(0, 1).getText().toLowerCase());
- assertEquals("Failed initial condition.", "first name", grid
- .getHeaderCell(2, 1).getText().toLowerCase());
+ assertEquals("Failed initial condition.", "all the stuff",
+ grid.getHeaderCell(0, 1).getText().toLowerCase());
+ assertEquals("Failed initial condition.", "first name",
+ grid.getHeaderCell(2, 1).getText().toLowerCase());
$(ButtonElement.class).caption("Show/Hide firstName").first().click();
assertEquals("Header text changed on column hide.", "all the stuff",
grid.getHeaderCell(0, 1).getText().toLowerCase());
- assertEquals("Failed initial condition.", "last name", grid
- .getHeaderCell(2, 1).getText().toLowerCase());
+ assertEquals("Failed initial condition.", "last name",
+ grid.getHeaderCell(2, 1).getText().toLowerCase());
}
@Test
@@ -78,10 +78,10 @@ public class GridColspansTest extends MultiBrowserTest {
GridElement grid = $(GridElement.class).first();
GridCellElement headerCell = grid.getHeaderCell(1, 1);
- assertEquals("Failed initial condition.", "full name", headerCell
- .getText().toLowerCase());
- assertEquals("Failed initial condition.", "first name", grid
- .getHeaderCell(2, 1).getText().toLowerCase());
+ assertEquals("Failed initial condition.", "full name",
+ headerCell.getText().toLowerCase());
+ assertEquals("Failed initial condition.", "first name",
+ grid.getHeaderCell(2, 1).getText().toLowerCase());
$(ButtonElement.class).get(1).click();
headerCell = grid.getHeaderCell(1, 1);
assertEquals("Header text not changed on column reorder.", "address",
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridColumnAutoExpandTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridColumnAutoExpandTest.java
index 64c56e174e..c5a8f7a0ea 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridColumnAutoExpandTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridColumnAutoExpandTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,8 +32,8 @@ public class GridColumnAutoExpandTest extends MultiBrowserTest {
GridCellElement headerCell = $(GridElement.class).first()
.getHeaderCell(0, 1);
- assertTrue("Column did not expand as expected", headerCell.getSize()
- .getWidth() > 400);
+ assertTrue("Column did not expand as expected",
+ headerCell.getSize().getWidth() > 400);
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridColumnAutoWidthClientTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridColumnAutoWidthClientTest.java
index 999f72682e..a019cdb798 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridColumnAutoWidthClientTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridColumnAutoWidthClientTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -18,8 +18,8 @@ package com.vaadin.tests.components.grid;
import com.vaadin.testbench.parallel.TestCategory;
@TestCategory("grid")
-public class GridColumnAutoWidthClientTest extends
- AbstractGridColumnAutoWidthTest {
+public class GridColumnAutoWidthClientTest
+ extends AbstractGridColumnAutoWidthTest {
@Override
protected Class<?> getUIClass() {
return GridColumnAutoWidthClient.class;
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridColumnAutoWidthServerTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridColumnAutoWidthServerTest.java
index 3a4e2bfc72..e9cd18cabf 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridColumnAutoWidthServerTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridColumnAutoWidthServerTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -18,8 +18,8 @@ package com.vaadin.tests.components.grid;
import com.vaadin.testbench.parallel.TestCategory;
@TestCategory("grid")
-public class GridColumnAutoWidthServerTest extends
- AbstractGridColumnAutoWidthTest {
+public class GridColumnAutoWidthServerTest
+ extends AbstractGridColumnAutoWidthTest {
@Override
protected Class<?> getUIClass() {
return GridColumnAutoWidth.class;
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridColumnWidthRecalculationTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridColumnWidthRecalculationTest.java
index 17bfcfc6c1..9a7f2dc962 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridColumnWidthRecalculationTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridColumnWidthRecalculationTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -41,8 +41,7 @@ public class GridColumnWidthRecalculationTest extends SingleBrowserTest {
public void columnWidthAfterSwap() {
int column0Width = getColumnWidth(0);
int column1Width = getColumnWidth(1);
- Assert.assertTrue(
- "Column 0 should be narrower than column 1 initially",
+ Assert.assertTrue("Column 0 should be narrower than column 1 initially",
column0Width < column1Width);
$(ButtonElement.class).caption("Swap content").first().click();
@@ -59,8 +58,7 @@ public class GridColumnWidthRecalculationTest extends SingleBrowserTest {
public void columnWidthAfterSwapAndRecalculate() {
int column0Width = getColumnWidth(0);
int column1Width = getColumnWidth(1);
- Assert.assertTrue(
- "Column 0 should be narrower than column 1 initially",
+ Assert.assertTrue("Column 0 should be narrower than column 1 initially",
column0Width < column1Width);
$(ButtonElement.class).caption("Swap content and recalculate columns")
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridColumnWidthsWithoutDataTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridColumnWidthsWithoutDataTest.java
index 3d88427ada..a3a665b91d 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridColumnWidthsWithoutDataTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridColumnWidthsWithoutDataTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridCustomSelectionModelTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridCustomSelectionModelTest.java
index 976e1e78fe..c866af84e4 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridCustomSelectionModelTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridCustomSelectionModelTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -40,8 +40,8 @@ public class GridCustomSelectionModelTest extends MultiBrowserTest {
assertTrue("First column of Grid should not have an input element",
cell.findElements(By.className("input")).isEmpty());
- assertFalse("Row should not be selected initially", grid.getRow(0)
- .isSelected());
+ assertFalse("Row should not be selected initially",
+ grid.getRow(0).isSelected());
cell.click(5, 5);
assertTrue("Click should select row", grid.getRow(0).isSelected());
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridDataSourceResetTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridDataSourceResetTest.java
index f7ea63e371..d7630301a4 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridDataSourceResetTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridDataSourceResetTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -34,17 +34,17 @@ public class GridDataSourceResetTest extends SingleBrowserTest {
assertTrue("First row was not selected", grid.getRow(0).isSelected());
for (int i = 1; i < 10; ++i) {
- assertFalse("Only first row should be selected", grid.getRow(i)
- .isSelected());
+ assertFalse("Only first row should be selected",
+ grid.getRow(i).isSelected());
}
$(ButtonElement.class).first().click();
- assertTrue("First row was not selected after remove", grid.getRow(0)
- .isSelected());
+ assertTrue("First row was not selected after remove",
+ grid.getRow(0).isSelected());
for (int i = 1; i < 9; ++i) {
- assertFalse("Only first row should be selected after remove", grid
- .getRow(i).isSelected());
+ assertFalse("Only first row should be selected after remove",
+ grid.getRow(i).isSelected());
}
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridDefaultSelectionModeTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridDefaultSelectionModeTest.java
index df306ee1e6..d9aff44dbd 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridDefaultSelectionModeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridDefaultSelectionModeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -34,13 +34,13 @@ public class GridDefaultSelectionModeTest extends MultiBrowserTest {
$(ButtonElement.class).caption("Select on server").first().click();
- assertTrue("Row should be selected.", $(GridElement.class).first()
- .getRow(0).isSelected());
+ assertTrue("Row should be selected.",
+ $(GridElement.class).first().getRow(0).isSelected());
$(ButtonElement.class).caption("Deselect on server").first().click();
- assertFalse("Row should not be selected.", $(GridElement.class).first()
- .getRow(0).isSelected());
+ assertFalse("Row should not be selected.",
+ $(GridElement.class).first().getRow(0).isSelected());
assertNoErrorNotifications();
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridDetailsDetachTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridDetailsDetachTest.java
index 7406daeacd..feb9db7a93 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridDetailsDetachTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridDetailsDetachTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridDetailsLayoutExpandTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridDetailsLayoutExpandTest.java
index 6ea72540b5..04b4ab96f0 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridDetailsLayoutExpandTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridDetailsLayoutExpandTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -33,7 +33,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests the layouting of Grid's details row when it contains a HorizontalLayout
* with expand ratios.
- *
+ *
* @author Vaadin Ltd
*/
@TestCategory("grid")
@@ -70,7 +70,8 @@ public class GridDetailsLayoutExpandTest extends MultiBrowserTest {
private void assertLabelWidth(String id, double expectedWidth) {
// 1px leeway for calculations
- assertThat("Unexpected label width.", (double) $(LabelElement.class)
- .id(id).getSize().width, closeTo(expectedWidth, 1d));
+ assertThat("Unexpected label width.",
+ (double) $(LabelElement.class).id(id).getSize().width,
+ closeTo(expectedWidth, 1d));
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridDetailsLocationTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridDetailsLocationTest.java
index a395d7e721..bf8d0cf592 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridDetailsLocationTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridDetailsLocationTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -163,14 +163,15 @@ public class GridDetailsLocationTest extends MultiBrowserTest {
int visibleIndexOfSpacer) {
waitForDetailsVisible();
WebElement details = getDetailsElement(visibleIndexOfSpacer);
- Assert.assertEquals("Wrong details row height", expectedHeight, details
- .getSize().getHeight());
+ Assert.assertEquals("Wrong details row height", expectedHeight,
+ details.getSize().getHeight());
}
private void verifyDetailsDecoratorLocation(int row,
int visibleIndexOfSpacer, int visibleIndexOfDeco) {
WebElement detailsElement = getDetailsElement(visibleIndexOfSpacer);
- WebElement detailsDecoElement = getDetailsDecoElement(visibleIndexOfDeco);
+ WebElement detailsDecoElement = getDetailsDecoElement(
+ visibleIndexOfDeco);
GridRowElement rowElement = getGrid().getRow(row);
int diff = 0;
@@ -180,8 +181,8 @@ public class GridDetailsLocationTest extends MultiBrowserTest {
Assert.assertEquals(
"Details deco top position does not match row top pos",
- rowElement.getLocation().getY(), detailsDecoElement
- .getLocation().getY());
+ rowElement.getLocation().getY(),
+ detailsDecoElement.getLocation().getY());
Assert.assertEquals(
"Details deco bottom position does not match details bottom pos",
detailsElement.getLocation().getY()
@@ -216,9 +217,8 @@ public class GridDetailsLocationTest extends MultiBrowserTest {
+ bottomBoundary + " decoratorBotton:" + detailsBottom,
detailsBottom, bottomBoundary);
- verifyDetailsRowHeight(param.getRowIndex(),
- param.useGenerator() ? getDefinedHeight()
- : detailsDefaultHeight, 0);
+ verifyDetailsRowHeight(param.getRowIndex(), param.useGenerator()
+ ? getDefinedHeight() : detailsDefaultHeight, 0);
verifyDetailsDecoratorLocation(param.getRowIndex(), 0, 0);
Assert.assertFalse("Notification was present",
@@ -247,8 +247,8 @@ public class GridDetailsLocationTest extends MultiBrowserTest {
try {
WebElement detailsElement = getDetailsElement();
return detailsElement.isDisplayed()
- && detailsElement.getSize().getHeight() > 3 ? detailsElement
- : null;
+ && detailsElement.getSize().getHeight() > 3
+ ? detailsElement : null;
} catch (StaleElementReferenceException e) {
return null;
}
@@ -322,14 +322,14 @@ public class GridDetailsLocationTest extends MultiBrowserTest {
}
private WebElement getVerticalScrollbar() {
- WebElement scrollBar = getGrid().findElement(
- By.className("v-grid-scroller-vertical"));
+ WebElement scrollBar = getGrid()
+ .findElement(By.className("v-grid-scroller-vertical"));
return scrollBar;
}
private WebElement getHorizontalScrollbar() {
- WebElement scrollBar = getGrid().findElement(
- By.className("v-grid-scroller-horizontal"));
+ WebElement scrollBar = getGrid()
+ .findElement(By.className("v-grid-scroller-horizontal"));
return scrollBar;
}
} \ No newline at end of file
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridDetailsWidthTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridDetailsWidthTest.java
index 2def2d0279..272af6e569 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridDetailsWidthTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridDetailsWidthTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -83,9 +83,9 @@ public class GridDetailsWidthTest extends SingleBrowserTest {
WebElement spacer = findElement(By.className("v-grid-spacer"));
Assert.assertEquals("Grid was not sorted correctly", "Hello 0",
cell.getText());
- Assert.assertEquals("Details row was not in correct location", cell
- .getLocation().getY() + cell.getSize().getHeight(), spacer
- .getLocation().getY());
+ Assert.assertEquals("Details row was not in correct location",
+ cell.getLocation().getY() + cell.getSize().getHeight(),
+ spacer.getLocation().getY());
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridDisabledMultiselectTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridDisabledMultiselectTest.java
index 390b855c55..d3383cbf44 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridDisabledMultiselectTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridDisabledMultiselectTest.java
@@ -70,11 +70,10 @@ public class GridDisabledMultiselectTest extends MultiBrowserTest {
setMultiselect();
disable();
- WebElement firstCheckBoxSpan
- = findElements(By.cssSelector("span")).get(1);
- new Actions(driver).moveToElement(firstCheckBoxSpan, 1, 1)
- .click()
- .perform();
+ WebElement firstCheckBoxSpan = findElements(By.cssSelector("span"))
+ .get(1);
+ new Actions(driver).moveToElement(firstCheckBoxSpan, 1, 1).click()
+ .perform();
assertThat(getFirstSelectCheckBox().isSelected(), is(false));
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridDisabledSideBarTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridDisabledSideBarTest.java
index 0f207b68f2..5ecd1d4d88 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridDisabledSideBarTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridDisabledSideBarTest.java
@@ -29,10 +29,12 @@ public class GridDisabledSideBarTest extends GridBasicClientFeaturesTest {
@Override
public Boolean apply(WebDriver input) {
- return !findElement(By.className("v-grid-sidebar-button")).isEnabled();
+ return !findElement(By.className("v-grid-sidebar-button"))
+ .isEnabled();
}
});
}
+
private void clickSideBarButton() {
findElement(By.cssSelector(".v-grid-sidebar-button")).click();
}
@@ -42,7 +44,8 @@ public class GridDisabledSideBarTest extends GridBasicClientFeaturesTest {
}
private void assertSideBarContainsClass(String cssClass) {
- assertThat(findElement(By.cssSelector(".v-grid-sidebar")).getAttribute("class"), containsString(cssClass));
+ assertThat(findElement(By.cssSelector(".v-grid-sidebar"))
+ .getAttribute("class"), containsString(cssClass));
}
@Test
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridDragSelectionWhileScrolledTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridDragSelectionWhileScrolledTest.java
index f2e3a8e77e..5bfe1c1063 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridDragSelectionWhileScrolledTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridDragSelectionWhileScrolledTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -42,8 +42,8 @@ public class GridDragSelectionWhileScrolledTest extends MultiBrowserTest {
// Scroll grid to view
GridElement grid = $(GridElement.class).first();
- ((JavascriptExecutor) getDriver()).executeScript(
- "arguments[0].scrollIntoView(true);", grid);
+ ((JavascriptExecutor) getDriver())
+ .executeScript("arguments[0].scrollIntoView(true);", grid);
// Drag select 2 rows
new Actions(getDriver()).moveToElement(grid.getCell(3, 0), 5, 5)
@@ -53,7 +53,9 @@ public class GridDragSelectionWhileScrolledTest extends MultiBrowserTest {
// Assert only those are selected.
assertTrue("Row 3 should be selected", grid.getRow(3).isSelected());
assertTrue("Row 2 should be selected", grid.getRow(2).isSelected());
- assertFalse("Row 4 should not be selected", grid.getRow(4).isSelected());
- assertFalse("Row 1 should not be selected", grid.getRow(1).isSelected());
+ assertFalse("Row 4 should not be selected",
+ grid.getRow(4).isSelected());
+ assertFalse("Row 1 should not be selected",
+ grid.getRow(1).isSelected());
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridEditingWithNoScrollBarsTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridEditingWithNoScrollBarsTest.java
index 8a67d180c6..39068304de 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridEditingWithNoScrollBarsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridEditingWithNoScrollBarsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,7 +32,7 @@ public class GridEditingWithNoScrollBarsTest extends MultiBrowserTest {
GridElement grid = $(GridElement.class).first();
grid.getCell(1, 1).doubleClick();
- assertEquals(grid.getEditor().getSize().width, grid.getTableWrapper()
- .getSize().width);
+ assertEquals(grid.getEditor().getSize().width,
+ grid.getTableWrapper().getSize().width);
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridEditorConverterNotFoundTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridEditorConverterNotFoundTest.java
index 468ea8da3a..7eeb0554c8 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridEditorConverterNotFoundTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridEditorConverterNotFoundTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridEditorCustomFieldTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridEditorCustomFieldTest.java
index ae81eb9303..2acc554154 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridEditorCustomFieldTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridEditorCustomFieldTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridEditorFrozenColumnsUITest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridEditorFrozenColumnsUITest.java
index 75d71a3c40..48516706bc 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridEditorFrozenColumnsUITest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridEditorFrozenColumnsUITest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -71,8 +71,7 @@ public class GridEditorFrozenColumnsUITest extends MultiBrowserTest {
}
private WebElement getGridHorizontalScrollbar() {
- return getDriver()
- .findElement(
- By.xpath("//div[contains(@class, \"v-grid-scroller-horizontal\")]"));
+ return getDriver().findElement(By.xpath(
+ "//div[contains(@class, \"v-grid-scroller-horizontal\")]"));
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridEditorMultiselectTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridEditorMultiselectTest.java
index 9b53766d96..a2175ca37f 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridEditorMultiselectTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridEditorMultiselectTest.java
@@ -40,18 +40,19 @@ public class GridEditorMultiselectTest extends MultiBrowserTest {
private GridElement openEditor() {
GridElement grid = $(GridElement.class).first();
grid.getRow(0).doubleClick();
- Assert.assertTrue("Grid editor should be displayed.", grid.getEditor()
- .isDisplayed());
+ Assert.assertTrue("Grid editor should be displayed.",
+ grid.getEditor().isDisplayed());
return grid;
}
private void assertCheckboxesEnabled(GridElement grid, boolean isEnabled) {
- List<WebElement> checkboxes = grid.findElements(By
- .xpath("//input[@type='checkbox']"));
+ List<WebElement> checkboxes = grid
+ .findElements(By.xpath("//input[@type='checkbox']"));
for (WebElement checkbox : checkboxes) {
- Assert.assertEquals("Select checkboxes should be "
- + (isEnabled ? "enabled" : "disabled"), isEnabled,
- checkbox.isEnabled());
+ Assert.assertEquals(
+ "Select checkboxes should be "
+ + (isEnabled ? "enabled" : "disabled"),
+ isEnabled, checkbox.isEnabled());
}
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridEditorUITest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridEditorUITest.java
index 3f17d9a80c..8a07012f92 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridEditorUITest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridEditorUITest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridExtensionCommunicationTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridExtensionCommunicationTest.java
index a6a1231fa0..54a014dda1 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridExtensionCommunicationTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridExtensionCommunicationTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridGeneratedPropertiesTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridGeneratedPropertiesTest.java
index d50879e65e..b84e04bea3 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridGeneratedPropertiesTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridGeneratedPropertiesTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -34,8 +34,8 @@ public class GridGeneratedPropertiesTest extends MultiBrowserTest {
public void testMilesColumnExists() {
openTestURL();
GridElement grid = $(GridElement.class).first();
- assertEquals("Miles header wasn't present.", "miles", grid
- .getHeaderCell(0, 2).getText().toLowerCase());
+ assertEquals("Miles header wasn't present.", "miles",
+ grid.getHeaderCell(0, 2).getText().toLowerCase());
}
@Test
@@ -46,14 +46,14 @@ public class GridGeneratedPropertiesTest extends MultiBrowserTest {
// Overwritten foo property should not be sortable
GridCellElement fooHeader = grid.getHeaderCell(0, 0);
fooHeader.click();
- assertFalse("Column foo was unexpectedly sorted.", fooHeader
- .getAttribute("class").contains("sort"));
+ assertFalse("Column foo was unexpectedly sorted.",
+ fooHeader.getAttribute("class").contains("sort"));
// Generated property miles is not sortable
GridCellElement milesHeader = grid.getHeaderCell(0, 2);
milesHeader.click();
- assertFalse("Column miles was unexpectedly sorted.", milesHeader
- .getAttribute("class").contains("sort"));
+ assertFalse("Column miles was unexpectedly sorted.",
+ milesHeader.getAttribute("class").contains("sort"));
}
@Test
@@ -64,11 +64,11 @@ public class GridGeneratedPropertiesTest extends MultiBrowserTest {
// Generated property baz is sortable
GridCellElement bazHeader = grid.getHeaderCell(0, 3);
bazHeader.click();
- assertTrue("Column baz was not sorted ascending", bazHeader
- .getAttribute("class").contains("sort-asc"));
+ assertTrue("Column baz was not sorted ascending",
+ bazHeader.getAttribute("class").contains("sort-asc"));
bazHeader.click();
- assertTrue("Column baz was not sorted descending", bazHeader
- .getAttribute("class").contains("sort-desc"));
+ assertTrue("Column baz was not sorted descending",
+ bazHeader.getAttribute("class").contains("sort-desc"));
}
@Test
@@ -82,8 +82,8 @@ public class GridGeneratedPropertiesTest extends MultiBrowserTest {
GridCellElement kmHeader = grid.getHeaderCell(0, 1);
assertFalse("Column km was unexpectedly sorted",
- kmHeader.getAttribute("class").contains("sort-asc")
- || kmHeader.getAttribute("class").contains("sort-desc"));
+ kmHeader.getAttribute("class").contains("sort-asc") || kmHeader
+ .getAttribute("class").contains("sort-desc"));
assertFalse("Unexpected client-side exception was visible",
isElementPresent(NotificationElement.class));
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridHeaderFooterComponentsTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridHeaderFooterComponentsTest.java
index e8d3abf42d..8200984465 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridHeaderFooterComponentsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridHeaderFooterComponentsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -62,7 +62,8 @@ public class GridHeaderFooterComponentsTest extends SingleBrowserTest {
assertNoErrorNotifications();
}
- private TextFieldElement getHeaderElement(GridElement grid, int row, int col) {
+ private TextFieldElement getHeaderElement(GridElement grid, int row,
+ int col) {
GridCellElement cell = grid.getHeaderCell(row, col);
List<TextFieldElement> all = cell.$(TextFieldElement.class).all();
if (all.size() == 0) {
@@ -71,8 +72,8 @@ public class GridHeaderFooterComponentsTest extends SingleBrowserTest {
return all.get(0);
} else {
throw new RuntimeException(
- "Multiple elements found in the header cell at " + row
- + "," + col);
+ "Multiple elements found in the header cell at " + row + ","
+ + col);
}
}
@@ -99,7 +100,8 @@ public class GridHeaderFooterComponentsTest extends SingleBrowserTest {
assertNoErrorNotifications();
}
- private TextFieldElement getFooterElement(GridElement grid, int row, int col) {
+ private TextFieldElement getFooterElement(GridElement grid, int row,
+ int col) {
GridCellElement cell = grid.getFooterCell(row, col);
List<TextFieldElement> all = cell.$(TextFieldElement.class).all();
if (all.size() == 0) {
@@ -108,8 +110,8 @@ public class GridHeaderFooterComponentsTest extends SingleBrowserTest {
return all.get(0);
} else {
throw new RuntimeException(
- "Multiple elements found in the footer cell at " + row
- + "," + col);
+ "Multiple elements found in the footer cell at " + row + ","
+ + col);
}
}
@@ -121,18 +123,16 @@ public class GridHeaderFooterComponentsTest extends SingleBrowserTest {
// Remove Header
$(GridElement.class).first().getHeaderCell(i, 0)
.$(ButtonElement.class).first().click();
- assertFalse(
- "Header " + i + " should not be present.",
- $(GridElement.class).first().isElementPresent(
- By.vaadin("#header[" + i + "]")));
+ assertFalse("Header " + i + " should not be present.",
+ $(GridElement.class).first()
+ .isElementPresent(By.vaadin("#header[" + i + "]")));
// Remove Footer
$(GridElement.class).first().getFooterCell(i, 0)
.$(ButtonElement.class).first().click();
- assertFalse(
- "Footer " + i + " should not be present.",
- $(GridElement.class).first().isElementPresent(
- By.vaadin("#footer[" + i + "]")));
+ assertFalse("Footer " + i + " should not be present.",
+ $(GridElement.class).first()
+ .isElementPresent(By.vaadin("#footer[" + i + "]")));
}
assertNoErrorNotifications();
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridHeaderFormatChangeTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridHeaderFormatChangeTest.java
index 0e2a3d6ac6..aa7fe10dc0 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridHeaderFormatChangeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridHeaderFormatChangeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -34,16 +34,15 @@ public class GridHeaderFormatChangeTest extends MultiBrowserTest {
// Assert that we do not have the select all checkbox
Assert.assertTrue(
- "Found input in header even though none should exist.", grid
- .getHeader().findElements(By.tagName("input"))
- .isEmpty());
+ "Found input in header even though none should exist.",
+ grid.getHeader().findElements(By.tagName("input")).isEmpty());
// Set grid into multiselection mode
toggleSelectionMode();
// Assert that we now have a select all checkbox in the header
- Assert.assertFalse("Expected one input field in header", grid
- .getHeader().findElements(By.tagName("input")).isEmpty());
+ Assert.assertFalse("Expected one input field in header",
+ grid.getHeader().findElements(By.tagName("input")).isEmpty());
// Hide the firstName column from the grid.
toggleFirstName();
@@ -57,9 +56,8 @@ public class GridHeaderFormatChangeTest extends MultiBrowserTest {
// Assert that we still have the select all checkbox in the header.
Assert.assertFalse(
- "Header was missing checkbox after bringing back column", grid
- .getHeader().findElements(By.tagName("input"))
- .isEmpty());
+ "Header was missing checkbox after bringing back column",
+ grid.getHeader().findElements(By.tagName("input")).isEmpty());
}
@Test
@@ -69,16 +67,15 @@ public class GridHeaderFormatChangeTest extends MultiBrowserTest {
// Assert that we do not have the select all checkbox
Assert.assertTrue(
- "Found input in header even though none should exist.", grid
- .getHeader().findElements(By.tagName("input"))
- .isEmpty());
+ "Found input in header even though none should exist.",
+ grid.getHeader().findElements(By.tagName("input")).isEmpty());
// Set grid into multiselection mode
toggleSelectionMode();
// Assert that we now have a select all checkbox in the header
- Assert.assertFalse("Expected one input field in header", grid
- .getHeader().findElements(By.tagName("input")).isEmpty());
+ Assert.assertFalse("Expected one input field in header",
+ grid.getHeader().findElements(By.tagName("input")).isEmpty());
// Add Join columns header
toggleJoin();
@@ -92,9 +89,8 @@ public class GridHeaderFormatChangeTest extends MultiBrowserTest {
// Assert that we still have the select all checkbox in the header.
Assert.assertFalse(
- "Header was missing checkbox after bringing back column", grid
- .getHeader().findElements(By.tagName("input"))
- .isEmpty());
+ "Header was missing checkbox after bringing back column",
+ grid.getHeader().findElements(By.tagName("input")).isEmpty());
}
@Test
@@ -104,16 +100,15 @@ public class GridHeaderFormatChangeTest extends MultiBrowserTest {
// Assert that we do not have the select all checkbox
Assert.assertTrue(
- "Found input in header even though none should exist.", grid
- .getHeader().findElements(By.tagName("input"))
- .isEmpty());
+ "Found input in header even though none should exist.",
+ grid.getHeader().findElements(By.tagName("input")).isEmpty());
// Set grid into multiselection mode
toggleSelectionMode();
// Assert that we now have a select all checkbox in the header
- Assert.assertFalse("Should not be selected after adding", grid
- .getHeader().findElement(By.tagName("input")).isSelected());
+ Assert.assertFalse("Should not be selected after adding",
+ grid.getHeader().findElement(By.tagName("input")).isSelected());
grid.getHeader().findElement(By.tagName("input")).click();
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridHeaderStyleNamesTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridHeaderStyleNamesTest.java
index 6dffe16a40..14f3016509 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridHeaderStyleNamesTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridHeaderStyleNamesTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -58,8 +58,8 @@ public class GridHeaderStyleNamesTest extends SingleBrowserTest {
@Test
public void cellStyleNamesCanBeAddedAndRemoved() {
- ButtonElement toggleStyles = $(ButtonElement.class).caption(
- "Toggle styles").first();
+ ButtonElement toggleStyles = $(ButtonElement.class)
+ .caption("Toggle styles").first();
assertStylesSet(true);
toggleStyles.click();
@@ -70,8 +70,8 @@ public class GridHeaderStyleNamesTest extends SingleBrowserTest {
@Test
public void rowStyleNamesCanBeAddedAndRemoved() {
- ButtonElement toggleStyles = $(ButtonElement.class).caption(
- "Toggle styles").first();
+ ButtonElement toggleStyles = $(ButtonElement.class)
+ .caption("Toggle styles").first();
assertRowStylesSet(true);
toggleStyles.click();
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridHeightTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridHeightTest.java
index 14ad0224d6..b332d2dbfc 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridHeightTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridHeightTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2016 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -37,7 +37,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests that Grid gets correct height based on height mode, and resizes
* properly with details row if height is undefined.
- *
+ *
* @author Vaadin Ltd
*/
@TestCategory("grid")
@@ -83,11 +83,11 @@ public class GridHeightTest extends MultiBrowserTest {
} else {
caption = (String) gridHeight;
}
- $(OptionGroupElement.class).id("gridHeightSelector").selectByText(
- caption);
+ $(OptionGroupElement.class).id("gridHeightSelector")
+ .selectByText(caption);
for (String gridWidth : GridHeight.gridWidths) {
- $(OptionGroupElement.class).id("gridWidthSelector").selectByText(
- gridWidth);
+ $(OptionGroupElement.class).id("gridWidthSelector")
+ .selectByText(gridWidth);
for (String detailsRowHeight : GridHeight.detailsRowHeights) {
$(OptionGroupElement.class).id("detailsHeightSelector")
.selectByText(detailsRowHeight);
@@ -110,9 +110,8 @@ public class GridHeightTest extends MultiBrowserTest {
int openHeight = grid.getSize().getHeight();
try {
// check height with details row opened
- assertGridHeight(
- getExpectedOpenedHeight(gridHeight,
- detailsRowHeight), openHeight);
+ assertGridHeight(getExpectedOpenedHeight(gridHeight,
+ detailsRowHeight), openHeight);
} catch (AssertionError e) {
errors.put(e, new Object[] { gridHeight, gridWidth,
detailsRowHeight, "opened" });
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridInTabSheetTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridInTabSheetTest.java
index f9f8d1309b..1cc04d4fc3 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridInTabSheetTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridInTabSheetTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -41,8 +41,8 @@ public class GridInTabSheetTest extends MultiBrowserTest {
for (int i = 0; i < 3; ++i) {
addGridRow();
- assertEquals("" + (100 + i), getGridElement().getCell(i, 1)
- .getText());
+ assertEquals("" + (100 + i),
+ getGridElement().getCell(i, 1).getText());
}
assertNoNotification();
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridInWindowResizeTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridInWindowResizeTest.java
index ae4914bf1c..3c30bdc2b0 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridInWindowResizeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridInWindowResizeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,8 +31,8 @@ public class GridInWindowResizeTest extends MultiBrowserTest {
@Override
public List<DesiredCapabilities> getBrowsersToTest() {
// Must test on a browser with animations
- return Collections.singletonList(Browser.CHROME
- .getDesiredCapabilities());
+ return Collections
+ .singletonList(Browser.CHROME.getDesiredCapabilities());
}
@Test
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridInitiallyHiddenColumnsTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridInitiallyHiddenColumnsTest.java
index 732cd4aa41..cd93e2c5ec 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridInitiallyHiddenColumnsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridInitiallyHiddenColumnsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -53,8 +53,8 @@ public class GridInitiallyHiddenColumnsTest extends SingleBrowserTest {
// TODO: as to the getX methods reuse ones from GridBasicFeaturesTest?
protected WebElement getSidebarOpenButton(GridElement grid) {
- List<WebElement> elements = grid.findElements(By
- .className("v-grid-sidebar-button"));
+ List<WebElement> elements = grid
+ .findElements(By.className("v-grid-sidebar-button"));
return elements.isEmpty() ? null : elements.get(0);
}
@@ -62,10 +62,11 @@ public class GridInitiallyHiddenColumnsTest extends SingleBrowserTest {
* Returns the toggle inside the sidebar for hiding the column at the given
* index, or null if not found.
*/
- protected WebElement getColumnHidingToggle(GridElement grid, String caption) {
+ protected WebElement getColumnHidingToggle(GridElement grid,
+ String caption) {
WebElement sidebar = getSidebar(grid);
- List<WebElement> elements = sidebar.findElements(By
- .className("column-hiding-toggle"));
+ List<WebElement> elements = sidebar
+ .findElements(By.className("column-hiding-toggle"));
for (WebElement e : elements) {
if (caption.equalsIgnoreCase(e.getText())) {
return e;
@@ -75,8 +76,8 @@ public class GridInitiallyHiddenColumnsTest extends SingleBrowserTest {
}
protected WebElement getSidebar(GridElement grid) {
- List<WebElement> elements = findElements(By
- .className("v-grid-sidebar-popup"));
+ List<WebElement> elements = findElements(
+ By.className("v-grid-sidebar-popup"));
return elements.isEmpty() ? null : elements.get(0);
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridItemSetChangeTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridItemSetChangeTest.java
index dca1d71cb5..b50367bd72 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridItemSetChangeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridItemSetChangeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,12 +30,12 @@ public class GridItemSetChangeTest extends SingleBrowserTest {
openTestURL();
GridElement grid = $(GridElement.class).first();
- assertEquals("Last name initially wrong", "Bar", grid.getCell(0, 1)
- .getText());
+ assertEquals("Last name initially wrong", "Bar",
+ grid.getCell(0, 1).getText());
$(ButtonElement.class).caption("Modify").first().click();
- assertEquals("Last name was not updated", "Spam", grid.getCell(0, 1)
- .getText());
+ assertEquals("Last name was not updated", "Spam",
+ grid.getCell(0, 1).getText());
$(ButtonElement.class).caption("Reset").first().click();
assertEquals("Last name was not updated on reset", "Baz",
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridLayoutDetailsRowTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridLayoutDetailsRowTest.java
index 5fe2ff0cc3..833de4d8f0 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridLayoutDetailsRowTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridLayoutDetailsRowTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests that details row displays GridLayout contents properly.
- *
+ *
* @author Vaadin Ltd
*/
@TestCategory("grid")
@@ -58,7 +58,8 @@ public class GridLayoutDetailsRowTest extends MultiBrowserTest {
private void assertLabelHeight(String id, double expectedHeight) {
// 1px leeway for calculations
- assertThat("Unexpected label height.", (double) $(LabelElement.class)
- .id(id).getSize().height, closeTo(expectedHeight, 1d));
+ assertThat("Unexpected label height.",
+ (double) $(LabelElement.class).id(id).getSize().height,
+ closeTo(expectedHeight, 1d));
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridMultiSelectionOnInitTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridMultiSelectionOnInitTest.java
index 1818baa4c9..3c9d70e35f 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridMultiSelectionOnInitTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridMultiSelectionOnInitTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridMultiSelectionScrollBarTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridMultiSelectionScrollBarTest.java
index cf85f4eecd..937adc5fbf 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridMultiSelectionScrollBarTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridMultiSelectionScrollBarTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,8 +31,7 @@ public class GridMultiSelectionScrollBarTest extends MultiBrowserTest {
setDebug(true);
openTestURL();
- assertTrue(
- "Horizontal scrollbar should not be visible.",
+ assertTrue("Horizontal scrollbar should not be visible.",
$(GridElement.class).first().getHorizontalScroller()
.getAttribute("style").toLowerCase()
.contains("display: none;"));
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridRendererChangeTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridRendererChangeTest.java
index a8d7fb06be..5ddd0ce167 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridRendererChangeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridRendererChangeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridReplaceContainerTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridReplaceContainerTest.java
index cf20ac87b5..eebf15f34d 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridReplaceContainerTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridReplaceContainerTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridResizeAndScrollTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridResizeAndScrollTest.java
index 52079c782c..650c85d894 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridResizeAndScrollTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridResizeAndScrollTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridResizeHiddenColumnTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridResizeHiddenColumnTest.java
index ab9b90856c..efb8944fd8 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridResizeHiddenColumnTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridResizeHiddenColumnTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridRowHeightChangeTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridRowHeightChangeTest.java
index 1e1cab5577..faba380fab 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridRowHeightChangeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridRowHeightChangeTest.java
@@ -13,8 +13,8 @@ import static org.junit.Assert.assertEquals;
public class GridRowHeightChangeTest extends MultiBrowserTest {
- private final List<String> themes = Arrays
- .asList("valo", "reindeer", "runo", "chameleon", "base");
+ private final List<String> themes = Arrays.asList("valo", "reindeer",
+ "runo", "chameleon", "base");
@Override
public void setup() throws Exception {
@@ -32,8 +32,8 @@ public class GridRowHeightChangeTest extends MultiBrowserTest {
int gridHeight = grid.getSize().getHeight();
int tabsheetHeight = findElements(
- By.className("v-tabsheet-content"))
- .get(0).getSize().getHeight();
+ By.className("v-tabsheet-content")).get(0).getSize()
+ .getHeight();
assertEquals("Grid's visible height should be equal to Grid height",
gridHeight, tabsheetHeight, 1);
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridScrollToLineWhileResizingTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridScrollToLineWhileResizingTest.java
index aee1db7a85..4481231c99 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridScrollToLineWhileResizingTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridScrollToLineWhileResizingTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridSelectAllCellTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridSelectAllCellTest.java
index 423a9f419b..7b0e33cc6c 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridSelectAllCellTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridSelectAllCellTest.java
@@ -24,11 +24,14 @@ public class GridSelectAllCellTest extends MultiBrowserTest {
@Test
public void selectAllCellCanBeClicked() throws IOException {
- GridElement.GridCellElement selectAllCell = $(GridElement.class).first().getHeaderCell(0, 0);
+ GridElement.GridCellElement selectAllCell = $(GridElement.class).first()
+ .getHeaderCell(0, 0);
- new Actions(getDriver()).moveToElement(selectAllCell, 2, 2).click().perform();
+ new Actions(getDriver()).moveToElement(selectAllCell, 2, 2).click()
+ .perform();
- WebElement selectAllCheckbox = selectAllCell.findElement(By.cssSelector("input"));
+ WebElement selectAllCheckbox = selectAllCell
+ .findElement(By.cssSelector("input"));
assertThat(selectAllCheckbox.isSelected(), is(true));
}
} \ No newline at end of file
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridSidebarPositionTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridSidebarPositionTest.java
index 88771b50ca..619cf4daeb 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridSidebarPositionTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridSidebarPositionTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -33,21 +33,21 @@ public class GridSidebarPositionTest extends MultiBrowserTest {
@Test
public void heightRestrictedToBrowserWindow() {
openTestURL();
- GridElement gridWithVeryManyColumns = $(GridElement.class).id(
- GridSidebarPosition.POPUP_WINDOW_HEIGHT);
+ GridElement gridWithVeryManyColumns = $(GridElement.class)
+ .id(GridSidebarPosition.POPUP_WINDOW_HEIGHT);
getSidebarOpenButton(gridWithVeryManyColumns).click();
Dimension popupSize = getSidebarPopup().getSize();
Dimension browserWindowSize = getDriver().manage().window().getSize();
- Assert.assertTrue(popupSize.getHeight() <= browserWindowSize
- .getHeight());
+ Assert.assertTrue(
+ popupSize.getHeight() <= browserWindowSize.getHeight());
}
@Test
public void popupNotBelowBrowserWindow() {
openTestURL();
- GridElement gridAtBottom = $(GridElement.class).id(
- GridSidebarPosition.POPUP_WINDOW_MOVED_UP);
+ GridElement gridAtBottom = $(GridElement.class)
+ .id(GridSidebarPosition.POPUP_WINDOW_MOVED_UP);
getSidebarOpenButton(gridAtBottom).click();
WebElement sidebarPopup = getSidebarPopup();
Dimension popupSize = sidebarPopup.getSize();
@@ -61,8 +61,8 @@ public class GridSidebarPositionTest extends MultiBrowserTest {
@Test
public void popupAbove() {
openTestURL();
- GridElement gridPopupAbove = $(GridElement.class).id(
- GridSidebarPosition.POPUP_ABOVE);
+ GridElement gridPopupAbove = $(GridElement.class)
+ .id(GridSidebarPosition.POPUP_ABOVE);
WebElement sidebarOpenButton = getSidebarOpenButton(gridPopupAbove);
sidebarOpenButton.click();
WebElement sidebarPopup = getSidebarPopup();
@@ -81,14 +81,14 @@ public class GridSidebarPositionTest extends MultiBrowserTest {
}
protected WebElement getSidebarOpenButton(GridElement grid) {
- List<WebElement> elements = grid.findElements(By
- .className("v-grid-sidebar-button"));
+ List<WebElement> elements = grid
+ .findElements(By.className("v-grid-sidebar-button"));
return elements.isEmpty() ? null : elements.get(0);
}
protected WebElement getSidebarPopup() {
- List<WebElement> elements = findElements(By
- .className("v-grid-sidebar-popup"));
+ List<WebElement> elements = findElements(
+ By.className("v-grid-sidebar-popup"));
return elements.isEmpty() ? null : elements.get(0);
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridSingleColumnTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridSingleColumnTest.java
index a3fbb00cf2..4fbc3a5d64 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridSingleColumnTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridSingleColumnTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,8 +32,8 @@ public class GridSingleColumnTest extends MultiBrowserTest {
openTestURL();
GridCellElement cell = $(GridElement.class).first().getHeaderCell(0, 0);
- Assert.assertTrue("No header available", cell.getText()
- .equalsIgnoreCase("header"));
+ Assert.assertTrue("No header available",
+ cell.getText().equalsIgnoreCase("header"));
}
@Test
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridSortIndicatorTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridSortIndicatorTest.java
index 2874ec32a6..ae6a1d042d 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridSortIndicatorTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridSortIndicatorTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridSpacerDecoClipTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridSpacerDecoClipTest.java
index f08ab7a8a4..7fff31f8f6 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridSpacerDecoClipTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridSpacerDecoClipTest.java
@@ -1,6 +1,6 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -92,7 +92,7 @@ public class GridSpacerDecoClipTest extends MultiBrowserTest {
private TestBenchElement getSpacerDeco(int index) {
SearchContext context = getContext();
- return (TestBenchElement) context.findElements(
- By.className(SPACER_CSS_CLASS_DECO)).get(index);
+ return (TestBenchElement) context
+ .findElements(By.className(SPACER_CSS_CLASS_DECO)).get(index);
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridSubPixelProblemWrappingTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridSubPixelProblemWrappingTest.java
index 4368fda158..6e27fddde0 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridSubPixelProblemWrappingTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridSubPixelProblemWrappingTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridSwitchRenderersTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridSwitchRenderersTest.java
index 5989ba607f..c72f885381 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridSwitchRenderersTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridSwitchRenderersTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridThemeChangeTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridThemeChangeTest.java
index 1e2b8f4335..fb6afa4ad4 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridThemeChangeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridThemeChangeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridThemeUITest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridThemeUITest.java
index 140e8a90d8..2d5ea0eaa2 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridThemeUITest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridThemeUITest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridWidgetRendererChangeTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridWidgetRendererChangeTest.java
index 5098a0e7d8..1d1cdefc1c 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridWidgetRendererChangeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridWidgetRendererChangeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -56,8 +56,8 @@ public class GridWidgetRendererChangeTest extends SingleBrowserTest {
@Override
protected WebElement getMenuElement(String menuCaption) {
- return getDriver().findElement(
- By.xpath("//td[text() = '" + menuCaption + "']"));
+ return getDriver()
+ .findElement(By.xpath("//td[text() = '" + menuCaption + "']"));
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridWidthIncreaseTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridWidthIncreaseTest.java
index 6f39253fb0..4e124b8ed0 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridWidthIncreaseTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridWidthIncreaseTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -63,8 +63,8 @@ public class GridWidthIncreaseTest extends MultiBrowserTest {
* Selenium doesn't support subpixels correctly, we use a rough
* estimation.
*/
- assertEquals(grid.getRow(0).getSize().getWidth(), grid
- .getTableWrapper().getSize().getWidth(), accuracy);
+ assertEquals(grid.getRow(0).getSize().getWidth(),
+ grid.getTableWrapper().getSize().getWidth(), accuracy);
}
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridWithBrokenRendererTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridWithBrokenRendererTest.java
index 011c8c92ce..b4463c9a15 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridWithBrokenRendererTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridWithBrokenRendererTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridWithLabelEditorTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridWithLabelEditorTest.java
index 7917d0e279..11f6c88b4f 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridWithLabelEditorTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridWithLabelEditorTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridWithoutRendererTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridWithoutRendererTest.java
index fc93e99188..cdf0c61a45 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridWithoutRendererTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridWithoutRendererTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -34,8 +34,8 @@ public class GridWithoutRendererTest extends SingleBrowserTest {
// WebElement errorIndicator = findElement(By
// .cssSelector("v-error-indicator"));
// System.out.println(errorIndicator);
- List<WebElement> errorIndicator = findElements(By
- .xpath("//span[@class='v-errorindicator']"));
+ List<WebElement> errorIndicator = findElements(
+ By.xpath("//span[@class='v-errorindicator']"));
Assert.assertTrue("There should not be an error indicator",
errorIndicator.isEmpty());
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/InitialFrozenColumnsTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/InitialFrozenColumnsTest.java
index b4414a3f38..4c75231a87 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/InitialFrozenColumnsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/InitialFrozenColumnsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/JavaScriptRenderersTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/JavaScriptRenderersTest.java
index 917245188a..803c3cedf1 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/JavaScriptRenderersTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/JavaScriptRenderersTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -46,7 +46,7 @@ public class JavaScriptRenderersTest extends MultiBrowserTest {
// Verify onbrowserevent
cell_1_1.click();
- Assert.assertTrue(cell_1_1.getText().startsWith(
- "Clicked 1 with key 2 at"));
+ Assert.assertTrue(
+ cell_1_1.getText().startsWith("Clicked 1 with key 2 at"));
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/NullHeadersTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/NullHeadersTest.java
index 55f1238326..2d69dbb9dd 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/NullHeadersTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/NullHeadersTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -41,7 +41,8 @@ public class NullHeadersTest extends SingleBrowserTest {
private void assertRow(GridElement grid, int row, String... contents) {
for (int col = 0; col < contents.length; col++) {
- Assert.assertEquals(contents[col], grid.getCell(row, col).getText());
+ Assert.assertEquals(contents[col],
+ grid.getCell(row, col).getText());
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/NullRenderersTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/NullRenderersTest.java
index f100c03d4f..e6cddbd08e 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/NullRenderersTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/NullRenderersTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/ProgrammaticEditorControlTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/ProgrammaticEditorControlTest.java
index efbc164e15..8643507137 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/ProgrammaticEditorControlTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/ProgrammaticEditorControlTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -47,8 +47,8 @@ public class ProgrammaticEditorControlTest extends SingleBrowserTest {
}
private void assertEditorFieldContents(GridElement grid, String text) {
- TextFieldElement editorField = wrap(TextFieldElement.class, grid
- .getEditor().getField(0));
+ TextFieldElement editorField = wrap(TextFieldElement.class,
+ grid.getEditor().getField(0));
Assert.assertEquals(text, editorField.getValue());
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/SelectDuringInitTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/SelectDuringInitTest.java
index 1ba223d71c..17070a7348 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/SelectDuringInitTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/SelectDuringInitTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/SortableHeaderStylesTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/SortableHeaderStylesTest.java
index 32a896603b..c555a07ad0 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/SortableHeaderStylesTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/SortableHeaderStylesTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/WidgetRenderersTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/WidgetRenderersTest.java
index 063d05b735..cf4e4b2b01 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/WidgetRenderersTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/WidgetRenderersTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -35,7 +35,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* TB tests for the various builtin widget-based renderers.
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -51,14 +51,14 @@ public class WidgetRenderersTest extends MultiBrowserTest {
@Test
public void testProgressBarRenderer() {
- assertTrue(getGridCell(0, 0).isElementPresent(
- By.className("v-progressbar")));
+ assertTrue(getGridCell(0, 0)
+ .isElementPresent(By.className("v-progressbar")));
}
@Test
public void testButtonRenderer() {
- WebElement button = getGridCell(0, 1).findElement(
- By.className("v-nativebutton"));
+ WebElement button = getGridCell(0, 1)
+ .findElement(By.className("v-nativebutton"));
button.click();
@@ -76,10 +76,10 @@ public class WidgetRenderersTest extends MultiBrowserTest {
assertTrue("cell should be focused after focusing",
buttonCell.isFocused());
- WebElement button = buttonCell.findElement(By
- .className("v-nativebutton"));
- assertNotEquals("Button should not be clicked before click",
- "Clicked!", button.getText());
+ WebElement button = buttonCell
+ .findElement(By.className("v-nativebutton"));
+ assertNotEquals("Button should not be clicked before click", "Clicked!",
+ button.getText());
new Actions(getDriver()).moveToElement(button).click().perform();
@@ -88,8 +88,8 @@ public class WidgetRenderersTest extends MultiBrowserTest {
@Test
public void testImageRenderer() {
- final WebElement image = getGridCell(0, 2).findElement(
- By.className("gwt-Image"));
+ final WebElement image = getGridCell(0, 2)
+ .findElement(By.className("gwt-Image"));
waitUntilmageSrcEndsWith(image, "window/img/close.png");
@@ -110,9 +110,9 @@ public class WidgetRenderersTest extends MultiBrowserTest {
@Override
public String toString() {
// Timed out after 10 seconds waiting for ...
- return String
- .format("image source to update. Supposed to end with '%s' (was: '%s').",
- expectedText, image.getAttribute("src"));
+ return String.format(
+ "image source to update. Supposed to end with '%s' (was: '%s').",
+ expectedText, image.getAttribute("src"));
}
});
}
@@ -124,18 +124,18 @@ public class WidgetRenderersTest extends MultiBrowserTest {
assertFalse("Notification was present",
isElementPresent(NotificationElement.class));
- assertTrue(getGridCell(0, 0)
- .isElementPresent(By.className("gwt-Image")));
- assertTrue(getGridCell(0, 1).isElementPresent(
- By.className("v-progressbar")));
- assertTrue(getGridCell(0, 2).isElementPresent(
- By.className("v-nativebutton")));
+ assertTrue(
+ getGridCell(0, 0).isElementPresent(By.className("gwt-Image")));
+ assertTrue(getGridCell(0, 1)
+ .isElementPresent(By.className("v-progressbar")));
+ assertTrue(getGridCell(0, 2)
+ .isElementPresent(By.className("v-nativebutton")));
}
@Test
public void testPropertyIdInEvent() {
- WebElement button = getGridCell(0, 3).findElement(
- By.className("v-nativebutton"));
+ WebElement button = getGridCell(0, 3)
+ .findElement(By.className("v-nativebutton"));
button.click();
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/EscalatorBasicClientFeaturesTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/EscalatorBasicClientFeaturesTest.java
index 5367d32328..0bfb13a24c 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/EscalatorBasicClientFeaturesTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/EscalatorBasicClientFeaturesTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,7 +30,8 @@ import com.vaadin.testbench.parallel.TestCategory;
import com.vaadin.tests.tb3.MultiBrowserTest;
@TestCategory("grid")
-public abstract class EscalatorBasicClientFeaturesTest extends MultiBrowserTest {
+public abstract class EscalatorBasicClientFeaturesTest
+ extends MultiBrowserTest {
private static final String LOGICAL_ROW_ATTRIBUTE_NAME = "vLogicalRow";
private static final String SPACER_CSS_CLASS = "v-escalator-spacer";
@@ -217,8 +218,8 @@ public abstract class EscalatorBasicClientFeaturesTest extends MultiBrowserTest
@Override
protected WebElement getMenuElement(String menuCaption) {
- return getDriver().findElement(
- By.xpath("//td[text() = '" + menuCaption + "']"));
+ return getDriver()
+ .findElement(By.xpath("//td[text() = '" + menuCaption + "']"));
}
protected void assertLogContains(String substring) {
@@ -261,8 +262,8 @@ public abstract class EscalatorBasicClientFeaturesTest extends MultiBrowserTest
}
private TestBenchElement getVerticalScrollbar() {
- return (TestBenchElement) getEscalator().findElement(
- By.className("v-escalator-scroller-vertical"));
+ return (TestBenchElement) getEscalator()
+ .findElement(By.className("v-escalator-scroller-vertical"));
}
protected void scrollHorizontallyTo(int px) {
@@ -275,8 +276,8 @@ public abstract class EscalatorBasicClientFeaturesTest extends MultiBrowserTest
}
protected TestBenchElement getHorizontalScrollbar() {
- return (TestBenchElement) getEscalator().findElement(
- By.className("v-escalator-scroller-horizontal"));
+ return (TestBenchElement) getEscalator()
+ .findElement(By.className("v-escalator-scroller-horizontal"));
}
@Override
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridBasicClientFeaturesTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridBasicClientFeaturesTest.java
index 0a1b1735fa..912d0a77be 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridBasicClientFeaturesTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridBasicClientFeaturesTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,11 +25,12 @@ import com.vaadin.tests.components.grid.basicfeatures.element.CustomGridElement;
/**
* GridBasicClientFeatures.
- *
+ *
* @since
* @author Vaadin Ltd
*/
-public abstract class GridBasicClientFeaturesTest extends GridBasicFeaturesTest {
+public abstract class GridBasicClientFeaturesTest
+ extends GridBasicFeaturesTest {
private boolean composite = false;
@@ -59,17 +60,17 @@ public abstract class GridBasicClientFeaturesTest extends GridBasicFeaturesTest
@Override
protected WebElement getMenuElement(String menuCaption) {
- return getDriver().findElement(
- By.xpath("//td[text() = '" + menuCaption + "']"));
+ return getDriver()
+ .findElement(By.xpath("//td[text() = '" + menuCaption + "']"));
}
@Override
protected CustomGridElement getGridElement() {
if (composite) {
// Composite requires the basic client features widget for subparts
- return ((TestBenchElement) findElement(By
- .vaadin("//TestWidgetComponent")))
- .wrap(CustomGridElement.class);
+ return ((TestBenchElement) findElement(
+ By.vaadin("//TestWidgetComponent")))
+ .wrap(CustomGridElement.class);
} else {
return super.getGridElement();
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridBasicFeaturesTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridBasicFeaturesTest.java
index 640c4a448b..0c95e24700 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridBasicFeaturesTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridBasicFeaturesTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -87,8 +87,8 @@ public abstract class GridBasicFeaturesTest extends MultiBrowserTest {
}
protected WebElement getEditor() {
- List<WebElement> elems = getGridElement().findElements(
- By.className("v-grid-editor"));
+ List<WebElement> elems = getGridElement()
+ .findElements(By.className("v-grid-editor"));
assertLessThanOrEqual("number of editors", elems.size(), 1);
@@ -108,15 +108,13 @@ public abstract class GridBasicFeaturesTest extends MultiBrowserTest {
}
protected WebElement getGridVerticalScrollbar() {
- return getDriver()
- .findElement(
- By.xpath("//div[contains(@class, \"v-grid-scroller-vertical\")]"));
+ return getDriver().findElement(By.xpath(
+ "//div[contains(@class, \"v-grid-scroller-vertical\")]"));
}
protected WebElement getGridHorizontalScrollbar() {
- return getDriver()
- .findElement(
- By.xpath("//div[contains(@class, \"v-grid-scroller-horizontal\")]"));
+ return getDriver().findElement(By.xpath(
+ "//div[contains(@class, \"v-grid-scroller-horizontal\")]"));
}
/**
@@ -148,25 +146,25 @@ public abstract class GridBasicFeaturesTest extends MultiBrowserTest {
protected void assertColumnHeader(String expectedHeaderCaption,
TestBenchElement testBenchElement) {
- assertEquals(expectedHeaderCaption.toLowerCase(), testBenchElement
- .getText().toLowerCase());
+ assertEquals(expectedHeaderCaption.toLowerCase(),
+ testBenchElement.getText().toLowerCase());
}
protected GridCellElement getDefaultColumnHeader(int index) {
- List<GridCellElement> headerRowCells = getGridElement().getHeaderCells(
- 0);
+ List<GridCellElement> headerRowCells = getGridElement()
+ .getHeaderCells(0);
return headerRowCells.get(index);
}
protected void dragAndDropDefaultColumnHeader(int draggedColumnHeaderIndex,
int onTopOfColumnHeaderIndex, CellSide cellSide) {
- GridCellElement columnHeader = getDefaultColumnHeader(onTopOfColumnHeaderIndex);
+ GridCellElement columnHeader = getDefaultColumnHeader(
+ onTopOfColumnHeaderIndex);
new Actions(getDriver())
.clickAndHold(getDefaultColumnHeader(draggedColumnHeaderIndex))
- .moveToElement(
- columnHeader,
- getHorizontalOffsetForDragAndDrop(columnHeader,
- cellSide), 0).release().perform();
+ .moveToElement(columnHeader, getHorizontalOffsetForDragAndDrop(
+ columnHeader, cellSide), 0)
+ .release().perform();
}
private int getHorizontalOffsetForDragAndDrop(GridCellElement columnHeader,
@@ -185,13 +183,12 @@ public abstract class GridBasicFeaturesTest extends MultiBrowserTest {
GridCellElement headerCell = getGridElement().getHeaderCell(headerRow,
onTopOfColumnHeaderIndex);
new Actions(getDriver())
- .clickAndHold(
- getGridElement().getHeaderCell(headerRow,
- draggedColumnHeaderIndex))
- .moveToElement(
- headerCell,
+ .clickAndHold(getGridElement().getHeaderCell(headerRow,
+ draggedColumnHeaderIndex))
+ .moveToElement(headerCell,
getHorizontalOffsetForDragAndDrop(headerCell, cellSide),
- 0).release().perform();
+ 0)
+ .release().perform();
}
protected void dragAndDropColumnHeader(int headerRow,
@@ -200,9 +197,8 @@ public abstract class GridBasicFeaturesTest extends MultiBrowserTest {
GridCellElement headerCell = getGridElement().getHeaderCell(headerRow,
onTopOfColumnHeaderIndex);
new Actions(getDriver())
- .clickAndHold(
- getGridElement().getHeaderCell(headerRow,
- draggedColumnHeaderIndex))
+ .clickAndHold(getGridElement().getHeaderCell(headerRow,
+ draggedColumnHeaderIndex))
.moveToElement(headerCell, horizontalOffset, 0).release()
.perform();
}
@@ -218,8 +214,8 @@ public abstract class GridBasicFeaturesTest extends MultiBrowserTest {
}
protected WebElement getSidebarPopup() {
- List<WebElement> elements = findElements(By
- .className("v-grid-sidebar-popup"));
+ List<WebElement> elements = findElements(
+ By.className("v-grid-sidebar-popup"));
if (elements.isEmpty()) {
getSidebarOpenButton().click();
elements = findElements(By.className("v-grid-sidebar-popup"));
@@ -228,14 +224,14 @@ public abstract class GridBasicFeaturesTest extends MultiBrowserTest {
}
protected WebElement getSidebarPopupIfPresent() {
- List<WebElement> elements = findElements(By
- .className("v-grid-sidebar-popup"));
+ List<WebElement> elements = findElements(
+ By.className("v-grid-sidebar-popup"));
return elements.isEmpty() ? null : elements.get(0);
}
protected WebElement getSidebarOpenButton() {
- List<WebElement> elements = findElements(By
- .className("v-grid-sidebar-button"));
+ List<WebElement> elements = findElements(
+ By.className("v-grid-sidebar-button"));
return elements.isEmpty() ? null : elements.get(0);
}
@@ -245,10 +241,11 @@ public abstract class GridBasicFeaturesTest extends MultiBrowserTest {
*/
protected WebElement getColumnHidingToggle(int columnIndex) {
WebElement sidebar = getSidebarPopup();
- List<WebElement> elements = sidebar.findElements(By
- .className("column-hiding-toggle"));
+ List<WebElement> elements = sidebar
+ .findElements(By.className("column-hiding-toggle"));
for (WebElement e : elements) {
- if ((e.getText().toLowerCase()).startsWith("column " + columnIndex)) {
+ if ((e.getText().toLowerCase())
+ .startsWith("column " + columnIndex)) {
return e;
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridClientDataSourcesTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridClientDataSourcesTest.java
index c406f85c0c..577ce31cdf 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridClientDataSourcesTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridClientDataSourcesTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -101,15 +101,16 @@ public class GridClientDataSourcesTest extends MultiBrowserTest {
}
private void assertCellPresent(String content) {
- assertNotNull("A cell with content \"" + content
- + "\" should've been found", findByXPath("//td[text()='"
- + content + "']"));
+ assertNotNull(
+ "A cell with content \"" + content + "\" should've been found",
+ findByXPath("//td[text()='" + content + "']"));
}
private void assertCellNotPresent(String content) {
- assertNull("A cell with content \"" + content
- + "\" should've not been found", findByXPath("//td[text()='"
- + content + "']"));
+ assertNull(
+ "A cell with content \"" + content
+ + "\" should've not been found",
+ findByXPath("//td[text()='" + content + "']"));
}
private void scrollToTop() {
@@ -129,7 +130,8 @@ public class GridClientDataSourcesTest extends MultiBrowserTest {
}
private void scrollVerticallyTo(int px) {
- executeScript("arguments[0].scrollTop = " + px, findVerticalScrollbar());
+ executeScript("arguments[0].scrollTop = " + px,
+ findVerticalScrollbar());
}
private Object executeScript(String script, Object args) {
@@ -145,9 +147,8 @@ public class GridClientDataSourcesTest extends MultiBrowserTest {
}
private WebElement findVerticalScrollbar() {
- return getDriver().findElement(
- By.xpath("//div[contains(@class, "
- + "\"v-grid-scroller-vertical\")]"));
+ return getDriver().findElement(By.xpath(
+ "//div[contains(@class, " + "\"v-grid-scroller-vertical\")]"));
}
@Override
@@ -158,8 +159,8 @@ public class GridClientDataSourcesTest extends MultiBrowserTest {
@Override
protected WebElement getMenuElement(String menuCaption) {
- return getDriver().findElement(
- By.xpath("//td[text() = '" + menuCaption + "']"));
+ return getDriver()
+ .findElement(By.xpath("//td[text() = '" + menuCaption + "']"));
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridClientHeightByRowOnInitTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridClientHeightByRowOnInitTest.java
index 86686225d0..7aec919080 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridClientHeightByRowOnInitTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridClientHeightByRowOnInitTest.java
@@ -13,7 +13,8 @@ public class GridClientHeightByRowOnInitTest extends MultiBrowserTest {
public void gridHeightIsMoreThanACoupleOfRows() {
openTestURL();
int height = findElement(By.className("v-grid")).getSize().getHeight();
- assertGreater("Grid should be much taller than 150px (was " + height
- + "px)", height, 150);
+ assertGreater(
+ "Grid should be much taller than 150px (was " + height + "px)",
+ height, 150);
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridColumnHidingTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridColumnHidingTest.java
index 02e94ec6c4..5dbf269d6e 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridColumnHidingTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridColumnHidingTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -113,12 +113,12 @@ public class GridColumnHidingTest extends GridBasicClientFeaturesTest {
WebElement webElement = findElement(By.id("columnvisibility"));
int counter = Integer.parseInt(webElement.getAttribute("counter"));
- int columnIndex = Integer.parseInt(webElement
- .getAttribute("columnindex"));
- boolean userOriginated = Boolean.parseBoolean(webElement
- .getAttribute("useroriginated"));
- boolean hidden = Boolean.parseBoolean(webElement
- .getAttribute("ishidden"));
+ int columnIndex = Integer
+ .parseInt(webElement.getAttribute("columnindex"));
+ boolean userOriginated = Boolean
+ .parseBoolean(webElement.getAttribute("useroriginated"));
+ boolean hidden = Boolean
+ .parseBoolean(webElement.getAttribute("ishidden"));
assertNotNull("no event fired", webElement);
assertEquals(1, counter);
@@ -132,8 +132,8 @@ public class GridColumnHidingTest extends GridBasicClientFeaturesTest {
webElement = findElement(By.id("columnvisibility"));
counter = Integer.parseInt(webElement.getAttribute("counter"));
columnIndex = Integer.parseInt(webElement.getAttribute("columnIndex"));
- userOriginated = Boolean.parseBoolean(webElement
- .getAttribute("userOriginated"));
+ userOriginated = Boolean
+ .parseBoolean(webElement.getAttribute("userOriginated"));
hidden = Boolean.parseBoolean(webElement.getAttribute("ishidden"));
assertNotNull("no event fired", webElement);
@@ -156,12 +156,12 @@ public class GridColumnHidingTest extends GridBasicClientFeaturesTest {
WebElement webElement = findElement(By.id("columnvisibility"));
int counter = Integer.parseInt(webElement.getAttribute("counter"));
- int columnIndex = Integer.parseInt(webElement
- .getAttribute("columnindex"));
- boolean userOriginated = Boolean.parseBoolean(webElement
- .getAttribute("useroriginated"));
- boolean hidden = Boolean.parseBoolean(webElement
- .getAttribute("ishidden"));
+ int columnIndex = Integer
+ .parseInt(webElement.getAttribute("columnindex"));
+ boolean userOriginated = Boolean
+ .parseBoolean(webElement.getAttribute("useroriginated"));
+ boolean hidden = Boolean
+ .parseBoolean(webElement.getAttribute("ishidden"));
assertNotNull("no event fired", webElement);
assertEquals(1, counter);
@@ -175,8 +175,8 @@ public class GridColumnHidingTest extends GridBasicClientFeaturesTest {
webElement = findElement(By.id("columnvisibility"));
counter = Integer.parseInt(webElement.getAttribute("counter"));
columnIndex = Integer.parseInt(webElement.getAttribute("columnIndex"));
- userOriginated = Boolean.parseBoolean(webElement
- .getAttribute("userOriginated"));
+ userOriginated = Boolean
+ .parseBoolean(webElement.getAttribute("userOriginated"));
hidden = Boolean.parseBoolean(webElement.getAttribute("ishidden"));
assertNotNull("no event fired", webElement);
@@ -827,20 +827,20 @@ public class GridColumnHidingTest extends GridBasicClientFeaturesTest {
selectMenuPath("Component", "Row details", "Toggle details for...",
"Row 1");
assertColumnHeaderOrder(0, 1, 2, 3, 4);
- Assert.assertNotNull("Details not found", getGridElement()
- .getDetails(1));
+ Assert.assertNotNull("Details not found",
+ getGridElement().getDetails(1));
toggleHideColumnAPI(0);
assertColumnHeaderOrder(1, 2, 3, 4);
- Assert.assertNotNull("Details not found", getGridElement()
- .getDetails(1));
+ Assert.assertNotNull("Details not found",
+ getGridElement().getDetails(1));
toggleHideColumnAPI(0);
assertColumnHeaderOrder(0, 1, 2, 3, 4);
- Assert.assertNotNull("Details not found", getGridElement()
- .getDetails(1));
+ Assert.assertNotNull("Details not found",
+ getGridElement().getDetails(1));
}
@Test
@@ -884,17 +884,17 @@ public class GridColumnHidingTest extends GridBasicClientFeaturesTest {
toggleHideColumnAPI(1);
getGridElement().scrollToRow(500);
- Assert.assertEquals("(500, 0)", getGridElement().getCell(500, 0)
- .getText());
- Assert.assertEquals("(500, 2)", getGridElement().getCell(500, 1)
- .getText());
+ Assert.assertEquals("(500, 0)",
+ getGridElement().getCell(500, 0).getText());
+ Assert.assertEquals("(500, 2)",
+ getGridElement().getCell(500, 1).getText());
toggleHideColumnAPI(1);
- Assert.assertEquals("(500, 0)", getGridElement().getCell(500, 0)
- .getText());
- Assert.assertEquals("(500, 1)", getGridElement().getCell(500, 1)
- .getText());
+ Assert.assertEquals("(500, 0)",
+ getGridElement().getCell(500, 0).getText());
+ Assert.assertEquals("(500, 1)",
+ getGridElement().getCell(500, 1).getText());
}
@Test
@@ -902,26 +902,26 @@ public class GridColumnHidingTest extends GridBasicClientFeaturesTest {
toggleHidableColumnAPI(0);
toggleHidableColumnAPI(1);
- Assert.assertEquals("(500, 0)", getGridElement().getCell(500, 0)
- .getText());
- Assert.assertEquals("(500, 1)", getGridElement().getCell(500, 1)
- .getText());
+ Assert.assertEquals("(500, 0)",
+ getGridElement().getCell(500, 0).getText());
+ Assert.assertEquals("(500, 1)",
+ getGridElement().getCell(500, 1).getText());
toggleHideColumnAPI(0);
toggleHideColumnAPI(1);
- Assert.assertEquals("(500, 2)", getGridElement().getCell(500, 0)
- .getText());
- Assert.assertEquals("(500, 3)", getGridElement().getCell(500, 1)
- .getText());
+ Assert.assertEquals("(500, 2)",
+ getGridElement().getCell(500, 0).getText());
+ Assert.assertEquals("(500, 3)",
+ getGridElement().getCell(500, 1).getText());
toggleHideColumnAPI(0);
toggleHideColumnAPI(1);
- Assert.assertEquals("(500, 0)", getGridElement().getCell(500, 0)
- .getText());
- Assert.assertEquals("(500, 1)", getGridElement().getCell(500, 1)
- .getText());
+ Assert.assertEquals("(500, 0)",
+ getGridElement().getCell(500, 0).getText());
+ Assert.assertEquals("(500, 1)",
+ getGridElement().getCell(500, 1).getText());
}
private void loadSpannedCellsFixture() {
@@ -955,20 +955,22 @@ public class GridColumnHidingTest extends GridBasicClientFeaturesTest {
}
private void toggleFrozenColumns(int count) {
- selectMenuPath("Component", "State", "Frozen column count", count
- + " columns");
+ selectMenuPath("Component", "State", "Frozen column count",
+ count + " columns");
}
private void verifyHeaderCellColspan(int row, int column, int colspan) {
try {
- assertEquals(Integer.valueOf(colspan), Integer.valueOf(Integer
- .parseInt(getGridElement().getHeaderCell(row, column)
- .getAttribute("colspan"))));
+ assertEquals(Integer.valueOf(colspan),
+ Integer.valueOf(Integer.parseInt(
+ getGridElement().getHeaderCell(row, column)
+ .getAttribute("colspan"))));
} catch (NumberFormatException nfe) {
// IE8 has colSpan
- assertEquals(Integer.valueOf(colspan), Integer.valueOf(Integer
- .parseInt(getGridElement().getHeaderCell(row, column)
- .getAttribute("colSpan"))));
+ assertEquals(Integer.valueOf(colspan),
+ Integer.valueOf(Integer.parseInt(
+ getGridElement().getHeaderCell(row, column)
+ .getAttribute("colSpan"))));
}
}
@@ -983,8 +985,8 @@ public class GridColumnHidingTest extends GridBasicClientFeaturesTest {
}
private void verifyHeaderCellContent(int row, int column, String content) {
- GridCellElement headerCell = getGridElement()
- .getHeaderCell(row, column);
+ GridCellElement headerCell = getGridElement().getHeaderCell(row,
+ column);
assertEquals(content.toLowerCase(), headerCell.getText().toLowerCase());
assertTrue(headerCell.isDisplayed());
}
@@ -999,12 +1001,12 @@ public class GridColumnHidingTest extends GridBasicClientFeaturesTest {
private void verifyColumnHidingTogglesOrder(int... indices) {
WebElement sidebar = getSidebarPopup();
- List<WebElement> elements = sidebar.findElements(By
- .className("column-hiding-toggle"));
+ List<WebElement> elements = sidebar
+ .findElements(By.className("column-hiding-toggle"));
for (int i = 0; i < indices.length; i++) {
WebElement e = elements.get(i);
- assertTrue(("Header (0," + indices[i] + ")").equalsIgnoreCase(e
- .getText()));
+ assertTrue(("Header (0," + indices[i] + ")")
+ .equalsIgnoreCase(e.getText()));
}
}
@@ -1041,8 +1043,8 @@ public class GridColumnHidingTest extends GridBasicClientFeaturesTest {
@Override
protected WebElement getColumnHidingToggle(int columnIndex) {
WebElement sidebar = getSidebarPopup();
- List<WebElement> elements = sidebar.findElements(By
- .className("column-hiding-toggle"));
+ List<WebElement> elements = sidebar
+ .findElements(By.className("column-hiding-toggle"));
for (WebElement e : elements) {
if (("Header (0," + columnIndex + ")")
.equalsIgnoreCase(e.getText())) {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridColumnReorderTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridColumnReorderTest.java
index d779a5c81a..967fd34273 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridColumnReorderTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridColumnReorderTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import com.vaadin.testbench.elements.GridElement.GridCellElement;
import com.vaadin.testbench.parallel.TestCategory;
/**
- *
+ *
* @author Vaadin Ltd
*/
@TestCategory("grid")
@@ -43,10 +43,10 @@ public class GridColumnReorderTest extends GridBasicClientFeaturesTest {
public void columnReorderEventTriggered() {
final int firstIndex = 3;
final int secondIndex = 4;
- final String firstHeaderText = getGridElement().getHeaderCell(0,
- firstIndex).getText();
- final String secondHeaderText = getGridElement().getHeaderCell(0,
- secondIndex).getText();
+ final String firstHeaderText = getGridElement()
+ .getHeaderCell(0, firstIndex).getText();
+ final String secondHeaderText = getGridElement()
+ .getHeaderCell(0, secondIndex).getText();
selectMenuPath("Component", "Internals", "Listeners",
"Add ColumnReorder listener");
selectMenuPath("Component", "Columns", "Column " + secondIndex,
@@ -60,16 +60,16 @@ public class GridColumnReorderTest extends GridBasicClientFeaturesTest {
// the reorder event should have typed the order to this label
WebElement columnReorderElement = findElement(By.id("columnreorder"));
- int eventIndex = Integer.parseInt(columnReorderElement
- .getAttribute("columns"));
+ int eventIndex = Integer
+ .parseInt(columnReorderElement.getAttribute("columns"));
assertEquals(1, eventIndex);
// trigger another event
selectMenuPath("Component", "Columns", "Column " + secondIndex,
"Move column left");
columnReorderElement = findElement(By.id("columnreorder"));
- eventIndex = Integer.parseInt(columnReorderElement
- .getAttribute("columns"));
+ eventIndex = Integer
+ .parseInt(columnReorderElement.getAttribute("columns"));
assertEquals(2, eventIndex);
}
@@ -77,10 +77,10 @@ public class GridColumnReorderTest extends GridBasicClientFeaturesTest {
public void testColumnReorder_onReorder_columnReorderEventTriggered() {
final int firstIndex = 3;
final int secondIndex = 4;
- final String firstHeaderText = getGridElement().getHeaderCell(0,
- firstIndex).getText();
- final String secondHeaderText = getGridElement().getHeaderCell(0,
- secondIndex).getText();
+ final String firstHeaderText = getGridElement()
+ .getHeaderCell(0, firstIndex).getText();
+ final String secondHeaderText = getGridElement()
+ .getHeaderCell(0, secondIndex).getText();
selectMenuPath("Component", "Internals", "Listeners",
"Add ColumnReorder listener");
selectMenuPath("Component", "Columns", "Column " + secondIndex,
@@ -94,16 +94,16 @@ public class GridColumnReorderTest extends GridBasicClientFeaturesTest {
// the reorder event should have typed the order to this label
WebElement columnReorderElement = findElement(By.id("columnreorder"));
- int eventIndex = Integer.parseInt(columnReorderElement
- .getAttribute("columns"));
+ int eventIndex = Integer
+ .parseInt(columnReorderElement.getAttribute("columns"));
assertEquals(1, eventIndex);
// trigger another event
selectMenuPath("Component", "Columns", "Column " + secondIndex,
"Move column left");
columnReorderElement = findElement(By.id("columnreorder"));
- eventIndex = Integer.parseInt(columnReorderElement
- .getAttribute("columns"));
+ eventIndex = Integer
+ .parseInt(columnReorderElement.getAttribute("columns"));
assertEquals(2, eventIndex);
}
@@ -280,7 +280,8 @@ public class GridColumnReorderTest extends GridBasicClientFeaturesTest {
toggleColumnReorder();
selectMenuPath("Component", "Header", "Append row");
selectMenuPath("Component", "Header", "Append row");
- selectMenuPath("Component", "Header", "Row 2", "Join column cells 0, 1");
+ selectMenuPath("Component", "Header", "Row 2",
+ "Join column cells 0, 1");
selectMenuPath("Component", "Header", "Row 3", "Join columns 1, 2");
dragAndDropColumnHeader(0, 3, 0, CellSide.LEFT);
assertColumnHeaderOrder(3, 0, 1, 2, 4);
@@ -298,7 +299,8 @@ public class GridColumnReorderTest extends GridBasicClientFeaturesTest {
toggleColumnReorder();
selectMenuPath("Component", "Header", "Append row");
selectMenuPath("Component", "Header", "Append row");
- selectMenuPath("Component", "Header", "Row 2", "Join column cells 0, 1");
+ selectMenuPath("Component", "Header", "Row 2",
+ "Join column cells 0, 1");
selectMenuPath("Component", "Header", "Row 3", "Join columns 1, 2");
dragAndDropColumnHeader(0, 3, 0, CellSide.LEFT);
assertColumnHeaderOrder(3, 0, 1, 2, 4);
@@ -415,7 +417,8 @@ public class GridColumnReorderTest extends GridBasicClientFeaturesTest {
toggleColumnReorder();
selectMenuPath("Component", "Footer", "Append row");
selectMenuPath("Component", "Footer", "Append row");
- selectMenuPath("Component", "Footer", "Row 1", "Join column cells 0, 1");
+ selectMenuPath("Component", "Footer", "Row 1",
+ "Join column cells 0, 1");
selectMenuPath("Component", "Footer", "Row 2", "Join columns 1, 2");
dragAndDropColumnHeader(0, 3, 0, CellSide.LEFT);
assertColumnHeaderOrder(3, 0, 1, 2, 4);
@@ -500,7 +503,8 @@ public class GridColumnReorderTest extends GridBasicClientFeaturesTest {
selectMenuPath("Component", "Header", "Append row");
selectMenuPath("Component", "Header", "Row 2", "Join columns 1, 2");
selectMenuPath("Component", "Header", "Append row");
- selectMenuPath("Component", "Header", "Row 3", "Join column cells 0, 1");
+ selectMenuPath("Component", "Header", "Row 3",
+ "Join column cells 0, 1");
assertColumnHeaderOrder(0, 1, 2, 3, 4);
// when
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridDefaultTextRendererTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridDefaultTextRendererTest.java
index ae9a8fe381..6baacc0f81 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridDefaultTextRendererTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridDefaultTextRendererTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -50,19 +50,19 @@ public class GridDefaultTextRendererTest extends MultiBrowserTest {
@Test
public void testNullIsRenderedAsEmptyStringByDefaultTextRenderer() {
- assertTrue("First cell should've been empty", grid.getCell(0, 0)
- .getText().isEmpty());
+ assertTrue("First cell should've been empty",
+ grid.getCell(0, 0).getText().isEmpty());
}
@Test
public void testStringIsRenderedAsStringByDefaultTextRenderer() {
- assertEquals("Second cell should've been populated ", "string", grid
- .getCell(1, 0).getText());
+ assertEquals("Second cell should've been populated ", "string",
+ grid.getCell(1, 0).getText());
}
@Test
public void testWarningShouldNotBeInDebugLog() {
- assertFalse("Warning visible with string content.",
- isElementPresent(By.xpath("//span[contains(.,'attached:#1')]")));
+ assertFalse("Warning visible with string content.", isElementPresent(
+ By.xpath("//span[contains(.,'attached:#1')]")));
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridDescriptionGeneratorTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridDescriptionGeneratorTest.java
index ac494efc2c..068e6e7f60 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridDescriptionGeneratorTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridDescriptionGeneratorTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -39,7 +39,8 @@ public class GridDescriptionGeneratorTest extends GridBasicFeaturesTest {
getGridElement().getCell(1, 1).showTooltip();
assertTrue("Tooltip should not be present in cell (1, 1) ",
- findElement(By.className("v-tooltip-text")).getText().isEmpty());
+ findElement(By.className("v-tooltip-text")).getText()
+ .isEmpty());
}
@Test
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridHeightByRowOnInitTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridHeightByRowOnInitTest.java
index 651cd3a763..94e16f537c 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridHeightByRowOnInitTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridHeightByRowOnInitTest.java
@@ -14,7 +14,8 @@ public class GridHeightByRowOnInitTest extends MultiBrowserTest {
public void gridHeightIsMoreThanACoupleOfRows() {
openTestURL();
int height = $(GridElement.class).first().getSize().getHeight();
- assertGreater("Grid should be much taller than 150px (was " + height
- + "px)", height, 150);
+ assertGreater(
+ "Grid should be much taller than 150px (was " + height + "px)",
+ height, 150);
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridSortingIndicatorsTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridSortingIndicatorsTest.java
index 5eb05c61ca..31c0c8f904 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridSortingIndicatorsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridSortingIndicatorsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/DisabledGridClientTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/DisabledGridClientTest.java
index 8465906801..95335d144a 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/DisabledGridClientTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/DisabledGridClientTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridCellStyleGeneratorTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridCellStyleGeneratorTest.java
index 8188553e61..1cf03f10a8 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridCellStyleGeneratorTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridCellStyleGeneratorTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,8 +29,10 @@ public class GridCellStyleGeneratorTest extends GridBasicClientFeaturesTest {
public void testStyleNameGeneratorScrolling() throws Exception {
openTestURL();
- selectCellStyleNameGenerator(GridBasicClientFeaturesWidget.CELL_STYLE_GENERATOR_COL_INDEX);
- selectRowStyleNameGenerator(GridBasicClientFeaturesWidget.ROW_STYLE_GENERATOR_ROW_INDEX);
+ selectCellStyleNameGenerator(
+ GridBasicClientFeaturesWidget.CELL_STYLE_GENERATOR_COL_INDEX);
+ selectRowStyleNameGenerator(
+ GridBasicClientFeaturesWidget.ROW_STYLE_GENERATOR_ROW_INDEX);
GridRowElement row2 = getGridElement().getRow(2);
GridCellElement cell4_2 = getGridElement().getCell(4, 2);
@@ -51,8 +53,10 @@ public class GridCellStyleGeneratorTest extends GridBasicClientFeaturesTest {
public void testDisableStyleNameGenerator() throws Exception {
openTestURL();
- selectCellStyleNameGenerator(GridBasicClientFeaturesWidget.CELL_STYLE_GENERATOR_COL_INDEX);
- selectRowStyleNameGenerator(GridBasicClientFeaturesWidget.ROW_STYLE_GENERATOR_ROW_INDEX);
+ selectCellStyleNameGenerator(
+ GridBasicClientFeaturesWidget.CELL_STYLE_GENERATOR_COL_INDEX);
+ selectRowStyleNameGenerator(
+ GridBasicClientFeaturesWidget.ROW_STYLE_GENERATOR_ROW_INDEX);
// Just verify that change was effective
GridRowElement row2 = getGridElement().getRow(2);
@@ -62,8 +66,10 @@ public class GridCellStyleGeneratorTest extends GridBasicClientFeaturesTest {
Assert.assertTrue(hasCssClass(cell4_2, "4_2"));
// Disable the generator and check again
- selectCellStyleNameGenerator(GridBasicClientFeaturesWidget.CELL_STYLE_GENERATOR_NONE);
- selectRowStyleNameGenerator(GridBasicClientFeaturesWidget.ROW_STYLE_GENERATOR_NONE);
+ selectCellStyleNameGenerator(
+ GridBasicClientFeaturesWidget.CELL_STYLE_GENERATOR_NONE);
+ selectRowStyleNameGenerator(
+ GridBasicClientFeaturesWidget.ROW_STYLE_GENERATOR_NONE);
Assert.assertFalse(hasCssClass(row2, "2"));
Assert.assertFalse(hasCssClass(cell4_2, "4_2"));
@@ -73,8 +79,10 @@ public class GridCellStyleGeneratorTest extends GridBasicClientFeaturesTest {
public void testChangeStyleNameGenerator() throws Exception {
openTestURL();
- selectCellStyleNameGenerator(GridBasicClientFeaturesWidget.CELL_STYLE_GENERATOR_COL_INDEX);
- selectRowStyleNameGenerator(GridBasicClientFeaturesWidget.ROW_STYLE_GENERATOR_ROW_INDEX);
+ selectCellStyleNameGenerator(
+ GridBasicClientFeaturesWidget.CELL_STYLE_GENERATOR_COL_INDEX);
+ selectRowStyleNameGenerator(
+ GridBasicClientFeaturesWidget.ROW_STYLE_GENERATOR_ROW_INDEX);
// Just verify that change was effective
GridRowElement row2 = getGridElement().getRow(2);
@@ -84,8 +92,10 @@ public class GridCellStyleGeneratorTest extends GridBasicClientFeaturesTest {
Assert.assertTrue(hasCssClass(cell4_2, "4_2"));
// Change the generator and check again
- selectRowStyleNameGenerator(GridBasicClientFeaturesWidget.ROW_STYLE_GENERATOR_NONE);
- selectCellStyleNameGenerator(GridBasicClientFeaturesWidget.CELL_STYLE_GENERATOR_SIMPLE);
+ selectRowStyleNameGenerator(
+ GridBasicClientFeaturesWidget.ROW_STYLE_GENERATOR_NONE);
+ selectCellStyleNameGenerator(
+ GridBasicClientFeaturesWidget.CELL_STYLE_GENERATOR_SIMPLE);
// Old styles removed?
Assert.assertFalse(hasCssClass(row2, "2"));
@@ -99,8 +109,10 @@ public class GridCellStyleGeneratorTest extends GridBasicClientFeaturesTest {
public void testStyleNameGeneratorChangePrimary() throws Exception {
openTestURL();
- selectCellStyleNameGenerator(GridBasicClientFeaturesWidget.CELL_STYLE_GENERATOR_COL_INDEX);
- selectRowStyleNameGenerator(GridBasicClientFeaturesWidget.ROW_STYLE_GENERATOR_ROW_INDEX);
+ selectCellStyleNameGenerator(
+ GridBasicClientFeaturesWidget.CELL_STYLE_GENERATOR_COL_INDEX);
+ selectRowStyleNameGenerator(
+ GridBasicClientFeaturesWidget.ROW_STYLE_GENERATOR_ROW_INDEX);
// Just verify that change was effective
GridRowElement row2 = getGridElement().getRow(2);
@@ -110,7 +122,8 @@ public class GridCellStyleGeneratorTest extends GridBasicClientFeaturesTest {
Assert.assertTrue(hasCssClass(cell4_2, "4_2"));
// Change primary stylename
- selectMenuPath("Component", "State", "Primary Stylename", "v-escalator");
+ selectMenuPath("Component", "State", "Primary Stylename",
+ "v-escalator");
// Styles still present
Assert.assertTrue(hasCssClass(row2, "2"));
@@ -118,7 +131,8 @@ public class GridCellStyleGeneratorTest extends GridBasicClientFeaturesTest {
// New styles present?
Assert.assertFalse(hasCssClass(row2, "v-escalator-row-2"));
- Assert.assertFalse(hasCssClass(cell4_2, "v-escalator-cell-content-4_2"));
+ Assert.assertFalse(
+ hasCssClass(cell4_2, "v-escalator-cell-content-4_2"));
}
private void selectCellStyleNameGenerator(String name) {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridClientColumnPropertiesTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridClientColumnPropertiesTest.java
index 2f5d0e7291..af27172c90 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridClientColumnPropertiesTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridClientColumnPropertiesTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,7 +30,8 @@ import com.vaadin.testbench.elements.NotificationElement;
import com.vaadin.tests.components.grid.basicfeatures.GridBasicClientFeaturesTest;
import com.vaadin.tests.widgetset.client.grid.GridBasicClientFeaturesWidget;
-public class GridClientColumnPropertiesTest extends GridBasicClientFeaturesTest {
+public class GridClientColumnPropertiesTest
+ extends GridBasicClientFeaturesTest {
@Test
public void initialColumnWidths() {
@@ -72,7 +73,8 @@ public class GridClientColumnPropertiesTest extends GridBasicClientFeaturesTest
assertFalse(cellIsFrozen(0, 0));
assertFalse(cellIsFrozen(0, 1));
- selectMenuPath("Component", "State", "Frozen column count", "1 columns");
+ selectMenuPath("Component", "State", "Frozen column count",
+ "1 columns");
assertTrue(cellIsFrozen(1, 0));
assertFalse(cellIsFrozen(1, 1));
@@ -82,7 +84,8 @@ public class GridClientColumnPropertiesTest extends GridBasicClientFeaturesTest
assertTrue(cellIsFrozen(1, 1));
assertFalse(cellIsFrozen(1, 2));
- selectMenuPath("Component", "State", "Frozen column count", "0 columns");
+ selectMenuPath("Component", "State", "Frozen column count",
+ "0 columns");
assertTrue(cellIsFrozen(1, 0));
assertFalse(cellIsFrozen(1, 1));
@@ -97,7 +100,8 @@ public class GridClientColumnPropertiesTest extends GridBasicClientFeaturesTest
public void testFrozenColumns_columnsReordered_frozenColumnsKept() {
openTestURL();
- selectMenuPath("Component", "State", "Frozen column count", "2 columns");
+ selectMenuPath("Component", "State", "Frozen column count",
+ "2 columns");
assertTrue(cellIsFrozen(1, 0));
assertTrue(cellIsFrozen(1, 1));
@@ -136,11 +140,11 @@ public class GridClientColumnPropertiesTest extends GridBasicClientFeaturesTest
assertFalse("Text in broken cell should have old value",
"(0, 0)".equals(gridElement.getCell(0, 0).getText()));
- assertEquals("Neighbour cell should be updated", "(0, 1)", gridElement
- .getCell(0, 1).getText());
+ assertEquals("Neighbour cell should be updated", "(0, 1)",
+ gridElement.getCell(0, 1).getText());
- assertEquals("Neighbour cell should be updated", "(1, 0)", gridElement
- .getCell(1, 0).getText());
+ assertEquals("Neighbour cell should be updated", "(1, 0)",
+ gridElement.getCell(1, 0).getText());
}
@Test
@@ -166,7 +170,8 @@ public class GridClientColumnPropertiesTest extends GridBasicClientFeaturesTest
// Avoid issues with inaccuracies regarding subpixels.
assertEquals(
"Column widths don't match after reset, index after flip "
- + i, columnWidths.get(i),
+ + i,
+ columnWidths.get(i),
headerCells.get(size - 1 - i).getSize().getWidth(), 1.0d);
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridClientContextMenuEventTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridClientContextMenuEventTest.java
index b7242c87be..ae01a10e28 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridClientContextMenuEventTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridClientContextMenuEventTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,8 @@ import org.openqa.selenium.remote.DesiredCapabilities;
import com.vaadin.tests.components.grid.basicfeatures.GridBasicClientFeaturesTest;
-public class GridClientContextMenuEventTest extends GridBasicClientFeaturesTest {
+public class GridClientContextMenuEventTest
+ extends GridBasicClientFeaturesTest {
@Override
public List<DesiredCapabilities> getBrowsersToTest() {
@@ -49,19 +50,15 @@ public class GridClientContextMenuEventTest extends GridBasicClientFeaturesTest
.moveToElement(getGridElement().getCell(0, 0), 5, 5)
.contextClick().perform();
- assertTrue(
- "Debug log was not visible",
- isElementPresent(By
- .xpath("//span[text() = 'Prevented opening a context menu in grid body']")));
+ assertTrue("Debug log was not visible", isElementPresent(By.xpath(
+ "//span[text() = 'Prevented opening a context menu in grid body']")));
new Actions(getDriver())
.moveToElement(getGridElement().getHeaderCell(0, 0), 5, 5)
.contextClick().perform();
- assertTrue(
- "Debug log was not visible",
- isElementPresent(By
- .xpath("//span[text() = 'Prevented opening a context menu in grid header']")));
+ assertTrue("Debug log was not visible", isElementPresent(By.xpath(
+ "//span[text() = 'Prevented opening a context menu in grid header']")));
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridClientKeyEventsTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridClientKeyEventsTest.java
index 740eaf3f09..541895d530 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridClientKeyEventsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridClientKeyEventsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -94,7 +94,8 @@ public class GridClientKeyEventsTest extends GridBasicClientFeaturesTest {
selectMenuPath("Component", "State", "Selection mode", "multi");
// IE8 does not handle 1k rows well with assertions enabled. Less rows!
- selectMenuPath("Component", "DataSource", "Reset with 100 rows of Data");
+ selectMenuPath("Component", "DataSource",
+ "Reset with 100 rows of Data");
// Focus cell above select all checkbox
getGridElement().getHeaderCell(0, 0).click();
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridClientSelectionTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridClientSelectionTest.java
index d1d7b21e11..a760a4c330 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridClientSelectionTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridClientSelectionTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -33,11 +33,11 @@ public class GridClientSelectionTest extends GridBasicClientFeaturesTest {
openTestURL();
setSelectionModelNone();
- assertTrue("First column was selection column", getGridElement()
- .getCell(0, 0).getText().equals("(0, 0)"));
+ assertTrue("First column was selection column",
+ getGridElement().getCell(0, 0).getText().equals("(0, 0)"));
setSelectionModelMulti();
- assertTrue("First column was not selection column", getGridElement()
- .getCell(0, 1).getText().equals("(0, 0)"));
+ assertTrue("First column was not selection column",
+ getGridElement().getCell(0, 1).getText().equals("(0, 0)"));
}
@Test
@@ -45,20 +45,21 @@ public class GridClientSelectionTest extends GridBasicClientFeaturesTest {
openTestURL();
setSelectionModelMulti();
- selectMenuPath("Component", "DataSource", "Reset with 100 rows of Data");
+ selectMenuPath("Component", "DataSource",
+ "Reset with 100 rows of Data");
GridCellElement header = getGridElement().getHeaderCell(0, 0);
assertTrue("No checkbox", header.isElementPresent(By.tagName("input")));
header.findElement(By.tagName("input")).click();
for (int i = 0; i < 100; i += 10) {
- assertTrue("Row " + i + " was not selected.", getGridElement()
- .getRow(i).isSelected());
+ assertTrue("Row " + i + " was not selected.",
+ getGridElement().getRow(i).isSelected());
}
header.findElement(By.tagName("input")).click();
- assertFalse("Row 52 was still selected", getGridElement().getRow(52)
- .isSelected());
+ assertFalse("Row 52 was still selected",
+ getGridElement().getRow(52).isSelected());
}
@Test
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridClientStructureTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridClientStructureTest.java
index 74cf368da9..35ef03c0b1 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridClientStructureTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridClientStructureTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,8 +28,8 @@ public class GridClientStructureTest extends GridBasicClientFeaturesTest {
// it's easier to notice with valo
openTestURL("theme=valo");
- WebElement topDeco = getGridElement().findElement(
- By.className("v-grid-header-deco"));
+ WebElement topDeco = getGridElement()
+ .findElement(By.className("v-grid-header-deco"));
assertGreater(
"The header deco in Valo hasn't been recalculated after initial rendering",
topDeco.getSize().getHeight(), 20);
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridDetailsClientTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridDetailsClientTest.java
index 01e7e52923..58b44e43dc 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridDetailsClientTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridDetailsClientTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -111,7 +111,8 @@ public class GridDetailsClientTest extends GridBasicClientFeaturesTest {
selectMenuPath(SET_FAULTY_GENERATOR);
toggleDetailsFor(1);
- ElementQuery<FixedNotificationElement> notification = $(FixedNotificationElement.class);
+ ElementQuery<FixedNotificationElement> notification = $(
+ FixedNotificationElement.class);
assertTrue("Was expecting an error notification here",
notification.exists());
notification.first().close();
@@ -140,9 +141,8 @@ public class GridDetailsClientTest extends GridBasicClientFeaturesTest {
selectMenuPath(SET_GENERATOR);
toggleDetailsFor(1);
- assertNotEquals(
- "New details should've been generated even after error", "",
- getGridElement().getDetails(1).getText());
+ assertNotEquals("New details should've been generated even after error",
+ "", getGridElement().getDetails(1).getText());
}
@Test
@@ -161,8 +161,8 @@ public class GridDetailsClientTest extends GridBasicClientFeaturesTest {
toggleDetailsFor(1);
TestBenchElement detailsElement = getGridElement().getDetails(1);
- WebElement button = detailsElement.findElement(By
- .className("gwt-Button"));
+ WebElement button = detailsElement
+ .findElement(By.className("gwt-Button"));
button.click();
WebElement label = detailsElement
@@ -175,8 +175,8 @@ public class GridDetailsClientTest extends GridBasicClientFeaturesTest {
selectMenuPath(SET_EMPTY_GENERATOR);
toggleDetailsFor(1);
- assertEquals("empty generator did not produce an empty details row",
- "", getGridElement().getDetails(1).getText());
+ assertEquals("empty generator did not produce an empty details row", "",
+ getGridElement().getDetails(1).getText());
}
@Test(expected = NoSuchElementException.class)
@@ -194,8 +194,8 @@ public class GridDetailsClientTest extends GridBasicClientFeaturesTest {
toggleDetailsFor(0);
toggleDetailsFor(1);
- List<WebElement> elements = getGridElement().findElements(
- By.className("v-grid-spacer"));
+ List<WebElement> elements = getGridElement()
+ .findElements(By.className("v-grid-spacer"));
assertEquals("v-grid-spacer", elements.get(0).getAttribute("class"));
assertEquals("v-grid-spacer stripe",
elements.get(1).getAttribute("class"));
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridEditorClientTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridEditorClientTest.java
index 0dd137db48..810f20cc7b 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridEditorClientTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridEditorClientTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -128,8 +128,8 @@ public class GridEditorClientTest extends GridBasicClientFeaturesTest {
selectMenuPath(EDIT_ROW_100);
WebElement editor = getEditor();
- List<WebElement> widgets = editor.findElements(By
- .className("gwt-TextBox"));
+ List<WebElement> widgets = editor
+ .findElements(By.className("gwt-TextBox"));
assertEquals(GridBasicFeatures.EDITABLE_COLUMNS, widgets.size());
@@ -150,27 +150,27 @@ public class GridEditorClientTest extends GridBasicClientFeaturesTest {
WebElement editorCells = findElements(
By.className("v-grid-editor-cells")).get(1);
- List<WebElement> selectorDivs = editorCells.findElements(By
- .cssSelector("div"));
+ List<WebElement> selectorDivs = editorCells
+ .findElements(By.cssSelector("div"));
- assertFalse("selector column cell should've had contents", selectorDivs
- .get(0).getAttribute("innerHTML").isEmpty());
- assertFalse("normal column cell shoul've had contents", selectorDivs
- .get(1).getAttribute("innerHTML").isEmpty());
+ assertFalse("selector column cell should've had contents",
+ selectorDivs.get(0).getAttribute("innerHTML").isEmpty());
+ assertFalse("normal column cell shoul've had contents",
+ selectorDivs.get(1).getAttribute("innerHTML").isEmpty());
}
@Test
public void testSave() {
selectMenuPath(EDIT_ROW_100);
- WebElement textField = getEditor().findElements(
- By.className("gwt-TextBox")).get(0);
+ WebElement textField = getEditor()
+ .findElements(By.className("gwt-TextBox")).get(0);
textField.clear();
textField.sendKeys("Changed");
- WebElement saveButton = getEditor().findElement(
- By.className("v-grid-editor-save"));
+ WebElement saveButton = getEditor()
+ .findElement(By.className("v-grid-editor-save"));
saveButton.click();
@@ -181,8 +181,8 @@ public class GridEditorClientTest extends GridBasicClientFeaturesTest {
public void testProgrammaticSave() {
selectMenuPath(EDIT_ROW_100);
- WebElement textField = getEditor().findElements(
- By.className("gwt-TextBox")).get(0);
+ WebElement textField = getEditor()
+ .findElements(By.className("gwt-TextBox")).get(0);
textField.clear();
textField.sendKeys("Changed");
@@ -200,8 +200,8 @@ public class GridEditorClientTest extends GridBasicClientFeaturesTest {
GridConstants.DEFAULT_SAVE_CAPTION, getSaveButton().getText());
assertEquals("Cancel button caption should've been \""
+ GridConstants.DEFAULT_CANCEL_CAPTION + "\" to begin with",
- GridConstants.DEFAULT_CANCEL_CAPTION, getCancelButton()
- .getText());
+ GridConstants.DEFAULT_CANCEL_CAPTION,
+ getCancelButton().getText());
selectMenuPath("Component", "Editor", "Change Save Caption");
assertNotEquals(
@@ -214,8 +214,8 @@ public class GridEditorClientTest extends GridBasicClientFeaturesTest {
selectMenuPath(EDIT_ROW_5);
assertNotEquals(
"Cancel button caption should've changed while editor is closed",
- GridConstants.DEFAULT_CANCEL_CAPTION, getCancelButton()
- .getText());
+ GridConstants.DEFAULT_CANCEL_CAPTION,
+ getCancelButton().getText());
}
@Test
@@ -240,10 +240,9 @@ public class GridEditorClientTest extends GridBasicClientFeaturesTest {
selectMenuPath("Component", "Editor", "Toggle second editor error");
getSaveButton().click();
- assertEquals("Unexpected amount of error fields", 1, editor
- .findElements(By.className("error")).size());
- assertEquals(
- "Unexpedted error message",
+ assertEquals("Unexpected amount of error fields", 1,
+ editor.findElements(By.className("error")).size());
+ assertEquals("Unexpedted error message",
"Syntethic fail of editor in column 2. "
+ "This message is so long that it doesn't fit into its box",
editor.getErrorMessage());
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridFooterTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridFooterTest.java
index 8b65ba315b..e519d18771 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridFooterTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridFooterTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -99,15 +99,16 @@ public class GridFooterTest extends GridStaticSectionTest {
selectMenuPath("Component", "Footer", "Append row");
- selectMenuPath("Component", "Footer", "Row 1", "Join column cells 0, 1");
+ selectMenuPath("Component", "Footer", "Row 1",
+ "Join column cells 0, 1");
GridCellElement spannedCell = getGridElement().getFooterCell(0, 0);
assertTrue(spannedCell.isDisplayed());
assertEquals("2", spannedCell.getAttribute("colspan"));
// TestBench returns the spanned cell for all columns
- assertEquals(spannedCell.getText(), getGridElement()
- .getFooterCell(0, 1).getText());
+ assertEquals(spannedCell.getText(),
+ getGridElement().getFooterCell(0, 1).getText());
}
@Test
@@ -123,8 +124,8 @@ public class GridFooterTest extends GridStaticSectionTest {
assertEquals("2", spannedCell.getAttribute("colspan"));
// TestBench returns the spanned cell for all columns
- assertEquals(spannedCell.getText(), getGridElement()
- .getFooterCell(0, 2).getText());
+ assertEquals(spannedCell.getText(),
+ getGridElement().getFooterCell(0, 2).getText());
}
@Test
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridHeaderTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridHeaderTest.java
index 8cf7f7374f..f7d3252559 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridHeaderTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridHeaderTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -144,7 +144,8 @@ public class GridHeaderTest extends GridStaticSectionTest {
selectMenuPath("Component", "Header", "Append row");
- selectMenuPath("Component", "Header", "Row 2", "Join column cells 0, 1");
+ selectMenuPath("Component", "Header", "Row 2",
+ "Join column cells 0, 1");
GridCellElement spannedCell = getGridElement().getHeaderCell(1, 0);
assertTrue(spannedCell.isDisplayed());
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridRowHandleRefreshTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridRowHandleRefreshTest.java
index c7a509da45..3a1ca9ae77 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridRowHandleRefreshTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridRowHandleRefreshTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,8 +27,8 @@ public class GridRowHandleRefreshTest extends GridBasicClientFeaturesTest {
public void testRefreshingThroughRowHandle() {
openTestURL();
- assertEquals("Unexpected initial state", "(0, 0)", getGridElement()
- .getCell(0, 0).getText());
+ assertEquals("Unexpected initial state", "(0, 0)",
+ getGridElement().getCell(0, 0).getText());
selectMenuPath("Component", "State", "Edit and refresh Row 0");
assertEquals("Cell contents did not update correctly", "Foo",
getGridElement().getCell(0, 0).getText());
@@ -39,8 +39,8 @@ public class GridRowHandleRefreshTest extends GridBasicClientFeaturesTest {
throws InterruptedException {
openTestURL();
- assertEquals("Unexpected initial state", "(0, 0)", getGridElement()
- .getCell(0, 0).getText());
+ assertEquals("Unexpected initial state", "(0, 0)",
+ getGridElement().getCell(0, 0).getText());
selectMenuPath("Component", "State", "Delayed edit of Row 0");
// Still the same data
assertEquals("Cell contents did not update correctly", "(0, 0)",
@@ -55,8 +55,8 @@ public class GridRowHandleRefreshTest extends GridBasicClientFeaturesTest {
public void testRefreshingWhenNotInViewThroughRowHandle() {
openTestURL();
- assertEquals("Unexpected initial state", "(0, 0)", getGridElement()
- .getCell(0, 0).getText());
+ assertEquals("Unexpected initial state", "(0, 0)",
+ getGridElement().getCell(0, 0).getText());
getGridElement().scrollToRow(100);
selectMenuPath("Component", "State", "Edit and refresh Row 0");
assertEquals("Cell contents did not update correctly", "Foo",
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridSidebarContentTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridSidebarContentTest.java
index 1b9d1a0728..08725c79a1 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridSidebarContentTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridSidebarContentTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -38,8 +38,8 @@ public class GridSidebarContentTest extends GridBasicClientFeaturesTest {
getSidebarOpenButton().click();
- WebElement toggle = getSidebarPopup().findElement(
- By.className("column-hiding-toggle"));
+ WebElement toggle = getSidebarPopup()
+ .findElement(By.className("column-hiding-toggle"));
Assert.assertEquals("Column 0 should be togglable", "Header (0,0)",
toggle.getText());
@@ -64,8 +64,8 @@ public class GridSidebarContentTest extends GridBasicClientFeaturesTest {
sidebarItem.click();
- Assert.assertEquals("Sidebar should be closed after clicking item 0",
- 0, countBySelector(".v-grid-sidebar-content"));
+ Assert.assertEquals("Sidebar should be closed after clicking item 0", 0,
+ countBySelector(".v-grid-sidebar-content"));
}
@Test
@@ -122,8 +122,8 @@ public class GridSidebarContentTest extends GridBasicClientFeaturesTest {
}
private void assertSidebarMenuItems(String... items) {
- List<WebElement> menuItems = getSidebarPopup().findElements(
- By.cssSelector(".v-grid-sidebar-content td"));
+ List<WebElement> menuItems = getSidebarPopup()
+ .findElements(By.cssSelector(".v-grid-sidebar-content td"));
Assert.assertEquals("Expected " + items.length + " menu items",
items.length, menuItems.size());
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridStaticSectionTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridStaticSectionTest.java
index ef7d15ff3d..412783cad1 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridStaticSectionTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridStaticSectionTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,15 +26,17 @@ import com.vaadin.tests.components.grid.basicfeatures.GridBasicFeatures;
/**
* Abstract base class for header and footer tests.
- *
+ *
* @since
* @author Vaadin Ltd
*/
-public abstract class GridStaticSectionTest extends GridBasicClientFeaturesTest {
+public abstract class GridStaticSectionTest
+ extends GridBasicClientFeaturesTest {
protected void assertHeaderTexts(int headerId, int rowIndex) {
int i = 0;
- for (TestBenchElement cell : getGridElement().getHeaderCells(rowIndex)) {
+ for (TestBenchElement cell : getGridElement()
+ .getHeaderCells(rowIndex)) {
WebElement content = cell.findElement(By.tagName("div"));
if (i % 3 == 0) {
@@ -56,7 +58,8 @@ public abstract class GridStaticSectionTest extends GridBasicClientFeaturesTest
protected void assertFooterTexts(int footerId, int rowIndex) {
int i = 0;
- for (TestBenchElement cell : getGridElement().getFooterCells(rowIndex)) {
+ for (TestBenchElement cell : getGridElement()
+ .getFooterCells(rowIndex)) {
WebElement content = cell.findElement(By.tagName("div"));
if (i % 3 == 0) {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridStylingTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridStylingTest.java
index cbf27a69d9..50a1987f52 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridStylingTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/client/GridStylingTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -47,13 +47,13 @@ public class GridStylingTest extends GridStaticSectionTest {
String classNames = getGridElement().getAttribute("class");
assertEquals(stylename, classNames);
- classNames = getGridElement().getVerticalScroller().getAttribute(
- "class");
+ classNames = getGridElement().getVerticalScroller()
+ .getAttribute("class");
assertTrue(classNames.contains(stylename + "-scroller"));
assertTrue(classNames.contains(stylename + "-scroller-vertical"));
- classNames = getGridElement().getHorizontalScroller().getAttribute(
- "class");
+ classNames = getGridElement().getHorizontalScroller()
+ .getAttribute("class");
assertTrue(classNames.contains(stylename + "-scroller"));
assertTrue(classNames.contains(stylename + "-scroller-horizontal"));
@@ -64,8 +64,8 @@ public class GridStylingTest extends GridStaticSectionTest {
assertEquals(stylename + "-header", classNames);
for (int row = 0; row < getGridElement().getHeaderCount(); row++) {
- classNames = getGridElement().getHeaderRow(row).getAttribute(
- "class");
+ classNames = getGridElement().getHeaderRow(row)
+ .getAttribute("class");
assertEquals(stylename + "-row", classNames);
for (int col = 0; col < GridBasicFeatures.COLUMNS; col++) {
@@ -86,12 +86,13 @@ public class GridStylingTest extends GridStaticSectionTest {
assertTrue(classNames.contains(stylename + "-row-has-data"));
for (int col = 0; col < GridBasicFeatures.COLUMNS; col++) {
- classNames = getGridElement().getCell(row, col).getAttribute(
- "class");
+ classNames = getGridElement().getCell(row, col)
+ .getAttribute("class");
assertTrue(classNames.contains(stylename + "-cell"));
if (row == 0 && col == 0) {
- assertTrue(classNames.contains(stylename + "-cell-focused"));
+ assertTrue(
+ classNames.contains(stylename + "-cell-focused"));
}
}
}
@@ -100,8 +101,8 @@ public class GridStylingTest extends GridStaticSectionTest {
assertEquals(stylename + "-footer", classNames);
for (int row = 0; row < getGridElement().getFooterCount(); row++) {
- classNames = getGridElement().getFooterRow(row).getAttribute(
- "class");
+ classNames = getGridElement().getFooterRow(row)
+ .getAttribute("class");
assertEquals(stylename + "-row", classNames);
for (int col = 0; col < GridBasicFeatures.COLUMNS; col++) {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/element/CustomGridElement.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/element/CustomGridElement.java
index e1934d4f2b..08e7ce233d 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/element/CustomGridElement.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/element/CustomGridElement.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ import com.vaadin.testbench.elementsbase.ServerClass;
public class CustomGridElement extends GridElement {
/**
* Gets the element that contains the details of a row.
- *
+ *
* @since
* @param rowIndex
* the index of the row for the details
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorBasicsTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorBasicsTest.java
index 1d26477d34..703466a3f1 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorBasicsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorBasicsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorColspanTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorColspanTest.java
index d9b3debbe1..0881990c05 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorColspanTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorColspanTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorColumnFreezingTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorColumnFreezingTest.java
index e808001cf7..3702258f46 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorColumnFreezingTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorColumnFreezingTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,8 +27,8 @@ import org.openqa.selenium.WebElement;
import com.vaadin.tests.components.grid.basicfeatures.EscalatorBasicClientFeaturesTest;
-public class EscalatorColumnFreezingTest extends
- EscalatorBasicClientFeaturesTest {
+public class EscalatorColumnFreezingTest
+ extends EscalatorBasicClientFeaturesTest {
private final static Pattern TRANSFORM_PATTERN = Pattern.compile(// @formatter:off
// any start of the string
@@ -48,8 +48,8 @@ public class EscalatorColumnFreezingTest extends
// @formatter:on
- private final static Pattern LEFT_PATTERN = Pattern.compile(
- ".*left: (\\d+)px.*", Pattern.CASE_INSENSITIVE);
+ private final static Pattern LEFT_PATTERN = Pattern
+ .compile(".*left: (\\d+)px.*", Pattern.CASE_INSENSITIVE);
private static final int NO_FREEZE = -1;
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorRemoveAndAddRowsTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorRemoveAndAddRowsTest.java
index 19ba72b49d..e5951f3f7c 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorRemoveAndAddRowsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorRemoveAndAddRowsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,8 +27,8 @@ import com.vaadin.tests.components.grid.basicfeatures.EscalatorBasicClientFeatur
/**
* Test class to test the escalator level issue for ticket #16832
*/
-public class EscalatorRemoveAndAddRowsTest extends
- EscalatorBasicClientFeaturesTest {
+public class EscalatorRemoveAndAddRowsTest
+ extends EscalatorBasicClientFeaturesTest {
@Test
public void testRemoveAllRowsAndAddThirtyThenScroll() throws IOException {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorRowColumnTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorRowColumnTest.java
index e72e8fae70..17578f9bed 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorRowColumnTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorRowColumnTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorScrollTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorScrollTest.java
index 41ad370b98..8e868b3612 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorScrollTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorScrollTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -37,7 +37,7 @@ public class EscalatorScrollTest extends EscalatorBasicClientFeaturesTest {
* Before the fix, removing and adding rows and also scrolling would put the
* scroll state in an internally inconsistent state. The scrollbar would've
* been scrolled correctly, but the body wasn't.
- *
+ *
* This was due to optimizations that didn't keep up with the promises, so
* to say. So the optimizations were removed.
*/
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorSpacerTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorSpacerTest.java
index 66c131255f..34b69027a4 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorSpacerTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorSpacerTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -44,7 +44,7 @@ public class EscalatorSpacerTest extends EscalatorBasicClientFeaturesTest {
//@formatter:off
// separate strings made so that eclipse can show the concatenated string by hovering the mouse over the constant
-
+
// translate3d(0px, 40px, 123px);
// translate3d(24px, 15.251px, 0);
// translate(0, 40px);
@@ -71,7 +71,7 @@ public class EscalatorSpacerTest extends EscalatorBasicClientFeaturesTest {
+ "(?:, .*?)?" // the possible z argument, uninteresting (translate doesn't have one, translate3d does)
+ "\\)" // literal ")"
+ ";?"; // optional ending semicolon
-
+
// 40px;
// 12.34px
private final static String PIXEL_VALUE_REGEX =
@@ -96,8 +96,8 @@ public class EscalatorSpacerTest extends EscalatorBasicClientFeaturesTest {
private final static Pattern TRANSLATE_VALUE_PATTERN = Pattern
.compile(TRANSLATE_VALUE_REGEX);
- private final static Pattern PIXEL_VALUE_PATTERN = Pattern.compile(
- PIXEL_VALUE_REGEX, Pattern.CASE_INSENSITIVE);
+ private final static Pattern PIXEL_VALUE_PATTERN = Pattern
+ .compile(PIXEL_VALUE_REGEX, Pattern.CASE_INSENSITIVE);
@Before
public void before() {
@@ -191,8 +191,10 @@ public class EscalatorSpacerTest extends EscalatorBasicClientFeaturesTest {
long oldBottomScrollTop = getScrollTop();
selectMenuPath(FEATURES, SPACERS, ROW_99, SET_100PX);
- assertEquals("Adding a spacer underneath the current viewport should "
- + "not scroll anywhere", oldBottomScrollTop, getScrollTop());
+ assertEquals(
+ "Adding a spacer underneath the current viewport should "
+ + "not scroll anywhere",
+ oldBottomScrollTop, getScrollTop());
assertFalse("Got an unexpected notification",
$(NotificationElement.class).exists());
@@ -238,15 +240,17 @@ public class EscalatorSpacerTest extends EscalatorBasicClientFeaturesTest {
public void spacersAreFixedInViewport_firstFreezeThenScroll() {
selectMenuPath(FEATURES, FROZEN_COLUMNS, FREEZE_1_COLUMN);
selectMenuPath(FEATURES, SPACERS, ROW_1, SET_100PX);
- assertEquals("Spacer's left position should've been 0 at the "
- + "beginning", 0d, getElementLeft(getSpacer(1)),
- WidgetUtil.PIXEL_EPSILON);
+ assertEquals(
+ "Spacer's left position should've been 0 at the " + "beginning",
+ 0d, getElementLeft(getSpacer(1)), WidgetUtil.PIXEL_EPSILON);
int scrollTo = 10;
scrollHorizontallyTo(scrollTo);
- assertEquals("Spacer's left position should've been " + scrollTo
- + " after scrolling " + scrollTo + "px", scrollTo,
- getElementLeft(getSpacer(1)), WidgetUtil.PIXEL_EPSILON);
+ assertEquals(
+ "Spacer's left position should've been " + scrollTo
+ + " after scrolling " + scrollTo + "px",
+ scrollTo, getElementLeft(getSpacer(1)),
+ WidgetUtil.PIXEL_EPSILON);
}
@Test
@@ -255,9 +259,11 @@ public class EscalatorSpacerTest extends EscalatorBasicClientFeaturesTest {
int scrollTo = 10;
scrollHorizontallyTo(scrollTo);
selectMenuPath(FEATURES, SPACERS, ROW_1, SET_100PX);
- assertEquals("Spacer's left position should've been " + scrollTo
- + " after scrolling " + scrollTo + "px", scrollTo,
- getElementLeft(getSpacer(1)), WidgetUtil.PIXEL_EPSILON);
+ assertEquals(
+ "Spacer's left position should've been " + scrollTo
+ + " after scrolling " + scrollTo + "px",
+ scrollTo, getElementLeft(getSpacer(1)),
+ WidgetUtil.PIXEL_EPSILON);
}
@Test
@@ -389,8 +395,8 @@ public class EscalatorSpacerTest extends EscalatorBasicClientFeaturesTest {
selectMenuPath(FEATURES, SPACERS, FOCUSABLE_UPDATER);
selectMenuPath(FEATURES, SPACERS, ROW_1, SET_100PX);
- WebElement inputElement = getEscalator().findElement(
- By.tagName("input"));
+ WebElement inputElement = getEscalator()
+ .findElement(By.tagName("input"));
inputElement.click();
scrollVerticallyTo(30);
@@ -398,8 +404,8 @@ public class EscalatorSpacerTest extends EscalatorBasicClientFeaturesTest {
// the DOM reordering to take place.
Thread.sleep(500);
- assertFalse("Error message detected", $(NotificationElement.class)
- .exists());
+ assertFalse("Error message detected",
+ $(NotificationElement.class).exists());
}
@Test
@@ -409,8 +415,9 @@ public class EscalatorSpacerTest extends EscalatorBasicClientFeaturesTest {
WebElement tbody = getEscalator().findElement(By.tagName("tbody"));
WebElement spacer = getChild(tbody, 2);
String cssClass = spacer.getAttribute("class");
- assertTrue("element index 2 was not a spacer (class=\"" + cssClass
- + "\")", cssClass.contains("-spacer"));
+ assertTrue(
+ "element index 2 was not a spacer (class=\"" + cssClass + "\")",
+ cssClass.contains("-spacer"));
}
@Test
@@ -422,8 +429,9 @@ public class EscalatorSpacerTest extends EscalatorBasicClientFeaturesTest {
WebElement tbody = getEscalator().findElement(By.tagName("tbody"));
WebElement spacer = getChild(tbody, 1);
String cssClass = spacer.getAttribute("class");
- assertTrue("element index 1 was not a spacer (class=\"" + cssClass
- + "\")", cssClass.contains("-spacer"));
+ assertTrue(
+ "element index 1 was not a spacer (class=\"" + cssClass + "\")",
+ cssClass.contains("-spacer"));
}
@Test
@@ -493,8 +501,8 @@ public class EscalatorSpacerTest extends EscalatorBasicClientFeaturesTest {
}
private WebElement getChild(WebElement parent, int childIndex) {
- return (WebElement) executeScript("return arguments[0].children["
- + childIndex + "];", parent);
+ return (WebElement) executeScript(
+ "return arguments[0].children[" + childIndex + "];", parent);
}
private static double[] getElementDimensions(WebElement element) {
@@ -574,8 +582,9 @@ public class EscalatorSpacerTest extends EscalatorBasicClientFeaturesTest {
private static double getPixelValue(String top) {
Matcher matcher = PIXEL_VALUE_PATTERN.matcher(top);
- assertTrue("no matches for \"" + top + "\" against "
- + PIXEL_VALUE_PATTERN, matcher.find());
+ assertTrue(
+ "no matches for \"" + top + "\" against " + PIXEL_VALUE_PATTERN,
+ matcher.find());
assertEquals("wrong amount of groups matched in " + top, 1,
matcher.groupCount());
return Double.parseDouble(matcher.group(1));
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorUpdaterUiTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorUpdaterUiTest.java
index 85d3fc0bac..5d4d2dcfe9 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorUpdaterUiTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorUpdaterUiTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/DisabledGridTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/DisabledGridTest.java
index cd6a7a7b69..65a2ee7113 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/DisabledGridTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/DisabledGridTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridCellFocusAdjustmentTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridCellFocusAdjustmentTest.java
index 0c26ceb5c9..6cf9841069 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridCellFocusAdjustmentTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridCellFocusAdjustmentTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -38,13 +38,13 @@ public class GridCellFocusAdjustmentTest extends GridBasicFeaturesTest {
grid.getCell(1, 0).isFocused());
selectMenuPath("Component", "Body rows", "Add 18 rows");
- assertTrue("Cell focus was not moved when adding multiple rows", grid
- .getCell(19, 0).isFocused());
+ assertTrue("Cell focus was not moved when adding multiple rows",
+ grid.getCell(19, 0).isFocused());
for (int i = 18; i <= 0; --i) {
selectMenuPath("Component", "Body rows", "Remove first row");
- assertTrue("Cell focus was not moved when removing a row", grid
- .getCell(i, 0).isFocused());
+ assertTrue("Cell focus was not moved when removing a row",
+ grid.getCell(i, 0).isFocused());
}
}
@@ -53,12 +53,12 @@ public class GridCellFocusAdjustmentTest extends GridBasicFeaturesTest {
openTestURL();
getGridElement().getCell(0, 0).click();
new Actions(getDriver()).sendKeys(Keys.UP).perform();
- assertTrue("Header 0,0 should've become focused", getGridElement()
- .getHeaderCell(0, 0).isFocused());
+ assertTrue("Header 0,0 should've become focused",
+ getGridElement().getHeaderCell(0, 0).isFocused());
selectMenuPath("Component", "Body rows", "Add first row");
- assertTrue("Header 0,0 should've remained focused", getGridElement()
- .getHeaderCell(0, 0).isFocused());
+ assertTrue("Header 0,0 should've remained focused",
+ getGridElement().getHeaderCell(0, 0).isFocused());
}
@Test
@@ -79,8 +79,8 @@ public class GridCellFocusAdjustmentTest extends GridBasicFeaturesTest {
getGridElement().getCell(0, 0).isFocused());
selectMenuPath("Component", "Body rows", "Add third row");
- assertTrue("Body 0,0 should've remained focused", getGridElement()
- .getCell(0, 0).isFocused());
+ assertTrue("Body 0,0 should've remained focused",
+ getGridElement().getCell(0, 0).isFocused());
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridCellStyleGeneratorTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridCellStyleGeneratorTest.java
index f013b76075..f3a3494865 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridCellStyleGeneratorTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridCellStyleGeneratorTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,8 +31,10 @@ public class GridCellStyleGeneratorTest extends GridBasicFeaturesTest {
public void testStyleNameGeneratorScrolling() throws Exception {
openTestURL();
- selectRowStyleNameGenerator(GridBasicFeatures.ROW_STYLE_GENERATOR_ROW_NUMBERS_FOR_3_OF_4);
- selectCellStyleNameGenerator(GridBasicFeatures.CELL_STYLE_GENERATOR_SPECIAL);
+ selectRowStyleNameGenerator(
+ GridBasicFeatures.ROW_STYLE_GENERATOR_ROW_NUMBERS_FOR_3_OF_4);
+ selectCellStyleNameGenerator(
+ GridBasicFeatures.CELL_STYLE_GENERATOR_SPECIAL);
GridRowElement row = getGridElement().getRow(2);
GridCellElement cell = getGridElement().getCell(3, 2);
@@ -55,8 +57,10 @@ public class GridCellStyleGeneratorTest extends GridBasicFeaturesTest {
public void testDisableStyleNameGenerator() throws Exception {
openTestURL();
- selectRowStyleNameGenerator(GridBasicFeatures.ROW_STYLE_GENERATOR_ROW_NUMBERS_FOR_3_OF_4);
- selectCellStyleNameGenerator(GridBasicFeatures.CELL_STYLE_GENERATOR_SPECIAL);
+ selectRowStyleNameGenerator(
+ GridBasicFeatures.ROW_STYLE_GENERATOR_ROW_NUMBERS_FOR_3_OF_4);
+ selectCellStyleNameGenerator(
+ GridBasicFeatures.CELL_STYLE_GENERATOR_SPECIAL);
// Just verify that change was effective
GridRowElement row2 = getGridElement().getRow(2);
@@ -67,7 +71,8 @@ public class GridCellStyleGeneratorTest extends GridBasicFeaturesTest {
// Disable the generator and check again
selectRowStyleNameGenerator(GridBasicFeatures.ROW_STYLE_GENERATOR_NONE);
- selectCellStyleNameGenerator(GridBasicFeatures.CELL_STYLE_GENERATOR_NONE);
+ selectCellStyleNameGenerator(
+ GridBasicFeatures.CELL_STYLE_GENERATOR_NONE);
Assert.assertFalse(hasCssClass(row2, "row2"));
Assert.assertFalse(hasCssClass(cell3_2, "Column_2"));
@@ -77,8 +82,10 @@ public class GridCellStyleGeneratorTest extends GridBasicFeaturesTest {
public void testChangeStyleNameGenerator() throws Exception {
openTestURL();
- selectRowStyleNameGenerator(GridBasicFeatures.ROW_STYLE_GENERATOR_ROW_NUMBERS_FOR_3_OF_4);
- selectCellStyleNameGenerator(GridBasicFeatures.CELL_STYLE_GENERATOR_SPECIAL);
+ selectRowStyleNameGenerator(
+ GridBasicFeatures.ROW_STYLE_GENERATOR_ROW_NUMBERS_FOR_3_OF_4);
+ selectCellStyleNameGenerator(
+ GridBasicFeatures.CELL_STYLE_GENERATOR_SPECIAL);
// Just verify that change was effective
GridRowElement row2 = getGridElement().getRow(2);
@@ -89,7 +96,8 @@ public class GridCellStyleGeneratorTest extends GridBasicFeaturesTest {
// Change the generator and check again
selectRowStyleNameGenerator(GridBasicFeatures.ROW_STYLE_GENERATOR_NONE);
- selectCellStyleNameGenerator(GridBasicFeatures.CELL_STYLE_GENERATOR_PROPERTY_TO_STRING);
+ selectCellStyleNameGenerator(
+ GridBasicFeatures.CELL_STYLE_GENERATOR_PROPERTY_TO_STRING);
// Old styles removed?
Assert.assertFalse(hasCssClass(row2, "row2"));
@@ -105,7 +113,8 @@ public class GridCellStyleGeneratorTest extends GridBasicFeaturesTest {
openTestURL();
selectMenuPath("Component", "State", "Selection mode", "multi");
- selectCellStyleNameGenerator(GridBasicFeatures.CELL_STYLE_GENERATOR_SPECIAL);
+ selectCellStyleNameGenerator(
+ GridBasicFeatures.CELL_STYLE_GENERATOR_SPECIAL);
assertFalse("Error notification was present",
isElementPresent(NotificationElement.class));
@@ -123,8 +132,10 @@ public class GridCellStyleGeneratorTest extends GridBasicFeaturesTest {
public void testEmptyStringStyleGenerator() {
setDebug(true);
openTestURL();
- selectCellStyleNameGenerator(GridBasicFeatures.CELL_STYLE_GENERATOR_EMPTY);
- selectRowStyleNameGenerator(GridBasicFeatures.ROW_STYLE_GENERATOR_EMPTY);
+ selectCellStyleNameGenerator(
+ GridBasicFeatures.CELL_STYLE_GENERATOR_EMPTY);
+ selectRowStyleNameGenerator(
+ GridBasicFeatures.ROW_STYLE_GENERATOR_EMPTY);
assertFalse("Error notification was present",
isElementPresent(NotificationElement.class));
@@ -134,7 +145,8 @@ public class GridCellStyleGeneratorTest extends GridBasicFeaturesTest {
public void testNullStringStyleGenerator() {
setDebug(true);
openTestURL();
- selectCellStyleNameGenerator(GridBasicFeatures.CELL_STYLE_GENERATOR_NULL);
+ selectCellStyleNameGenerator(
+ GridBasicFeatures.CELL_STYLE_GENERATOR_NULL);
selectRowStyleNameGenerator(GridBasicFeatures.ROW_STYLE_GENERATOR_NULL);
assertFalse("Error notification was present",
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridClearContainerTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridClearContainerTest.java
index 91b5d04ab6..1e8dc49dc1 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridClearContainerTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridClearContainerTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests that removing and adding rows doesn't cause an infinite loop in the
* browser.
- *
+ *
* @author Vaadin Ltd
*/
@TestCategory("grid")
@@ -37,15 +37,15 @@ public class GridClearContainerTest extends MultiBrowserTest {
@Test
public void clearAndReadd() {
openTestURL();
- ButtonElement button = $(ButtonElement.class).caption(
- "Clear and re-add").first();
+ ButtonElement button = $(ButtonElement.class)
+ .caption("Clear and re-add").first();
GridElement grid = $(GridElement.class).first();
Assert.assertEquals(ERRORNOTE, "default", grid.getCell(0, 0).getText());
Assert.assertEquals(ERRORNOTE, "default", grid.getCell(1, 0).getText());
button.click();
- Assert.assertEquals(ERRORNOTE, "Updated value 1", grid.getCell(0, 0)
- .getText());
- Assert.assertEquals(ERRORNOTE, "Updated value 2", grid.getCell(1, 0)
- .getText());
+ Assert.assertEquals(ERRORNOTE, "Updated value 1",
+ grid.getCell(0, 0).getText());
+ Assert.assertEquals(ERRORNOTE, "Updated value 2",
+ grid.getCell(1, 0).getText());
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridColumnMaxWidthTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridColumnMaxWidthTest.java
index 7f19559aec..a467a452d4 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridColumnMaxWidthTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridColumnMaxWidthTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridColumnReorderTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridColumnReorderTest.java
index 62be202277..c6d6f44a00 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridColumnReorderTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridColumnReorderTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,7 +32,7 @@ import com.vaadin.tests.components.grid.basicfeatures.GridBasicFeaturesTest;
/**
* Tests that Grid columns can be reordered by user with drag and drop #16643.
- *
+ *
* @author Vaadin Ltd
*/
public class GridColumnReorderTest extends GridBasicFeaturesTest {
@@ -331,21 +331,23 @@ public class GridColumnReorderTest extends GridBasicFeaturesTest {
selectMenuPath("Component", "Size", "Width", "900px");
assertColumnHeaderOrder(0, 1, 2, 3);
- GridCellElement draggedHeaderCell = getGridElement()
- .getHeaderCell(0, 1);
+ GridCellElement draggedHeaderCell = getGridElement().getHeaderCell(0,
+ 1);
final int xOffset = 500;
new Actions(getDriver()).moveToElement(draggedHeaderCell, 20, 10)
.clickAndHold().moveByOffset(xOffset, 0).build().perform();
- WebElement floatingDragElement = findElement(By
- .className("dragged-column-header"));
+ WebElement floatingDragElement = findElement(
+ By.className("dragged-column-header"));
- int expectedLeft = draggedHeaderCell.getLocation().getX() + xOffset
- + 20 - (floatingDragElement.getSize().getWidth() / 2);
+ int expectedLeft = draggedHeaderCell.getLocation().getX() + xOffset + 20
+ - (floatingDragElement.getSize().getWidth() / 2);
int realLeft = floatingDragElement.getLocation().getX();
- assertTrue("Dragged element location wrong, expected " + expectedLeft
- + " was " + realLeft, Math.abs(expectedLeft - realLeft) < 10);
+ assertTrue(
+ "Dragged element location wrong, expected " + expectedLeft
+ + " was " + realLeft,
+ Math.abs(expectedLeft - realLeft) < 10);
}
@Test
@@ -362,14 +364,15 @@ public class GridColumnReorderTest extends GridBasicFeaturesTest {
new Actions(getDriver()).clickAndHold(getDefaultColumnHeader(10))
.moveByOffset(800, 0).build().perform();
- WebElement dragDropMarker = findElement(By
- .className("v-grid-drop-marker"));
+ WebElement dragDropMarker = findElement(
+ By.className("v-grid-drop-marker"));
WebElement sidebar = findElement(By.className("v-grid-sidebar"));
int dragDropMarkerX = dragDropMarker.getLocation().getX();
int sidebarX = sidebar.getLocation().getX();
- assertTrue("Drop marker misplaced " + dragDropMarkerX
- + " compared to sidebar open button " + sidebarX,
+ assertTrue(
+ "Drop marker misplaced " + dragDropMarkerX
+ + " compared to sidebar open button " + sidebarX,
dragDropMarkerX <= sidebarX);
}
@@ -382,14 +385,14 @@ public class GridColumnReorderTest extends GridBasicFeaturesTest {
}
private void moveColumnManuallyLeftByOne(int index) {
- selectMenuPath(new String[] { "Component", "Columns",
- "Column " + index, "Move left" });
+ selectMenuPath(new String[] { "Component", "Columns", "Column " + index,
+ "Move left" });
}
private void assertColumnReorderEvent(boolean userOriginated) {
final String logRow = getLogRow(0);
- assertTrue(logRow.contains("Columns reordered, userOriginated: "
- + userOriginated));
+ assertTrue(logRow.contains(
+ "Columns reordered, userOriginated: " + userOriginated));
}
private void assertNoColumnReorderEvent() {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridColumnResizeTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridColumnResizeTest.java
index a452a60280..0ed3de39d4 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridColumnResizeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridColumnResizeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -122,8 +122,8 @@ public class GridColumnResizeTest extends GridBasicFeaturesTest {
Dimension size = headerCell.getSize();
new Actions(getDriver())
.moveToElement(headerCell, size.getWidth() + posX,
- size.getHeight() / 2).clickAndHold()
- .moveByOffset(offset, 0).release().perform();
+ size.getHeight() / 2)
+ .clickAndHold().moveByOffset(offset, 0).release().perform();
}
private void assertResizable(int columnIndex, boolean resizable) {
@@ -133,8 +133,8 @@ public class GridColumnResizeTest extends GridBasicFeaturesTest {
private void assertResizable(GridCellElement cell, boolean resizable) {
assertEquals("Header resize handle present", resizable,
- cell.isElementPresent(By
- .cssSelector("div.v-grid-column-resize-handle")));
+ cell.isElementPresent(
+ By.cssSelector("div.v-grid-column-resize-handle")));
}
@Test
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridColumnVisibilityTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridColumnVisibilityTest.java
index 11a6dcf4b3..9563ae11d4 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridColumnVisibilityTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridColumnVisibilityTest.java
@@ -51,20 +51,20 @@ public class GridColumnVisibilityTest extends GridBasicFeaturesTest {
@Test
public void columnIsNotShownWhenHidden() {
- assertEquals("column 0", getGridElement().getHeaderCell(0, 0).getText()
- .toLowerCase());
+ assertEquals("column 0",
+ getGridElement().getHeaderCell(0, 0).getText().toLowerCase());
selectMenuPath(TOGGLE_HIDE_COLUMN_0);
- assertEquals("column 1", getGridElement().getHeaderCell(0, 0).getText()
- .toLowerCase());
+ assertEquals("column 1",
+ getGridElement().getHeaderCell(0, 0).getText().toLowerCase());
}
@Test
public void columnIsShownWhenUnhidden() {
selectMenuPath(TOGGLE_HIDE_COLUMN_0);
selectMenuPath(TOGGLE_HIDE_COLUMN_0);
- assertEquals("column 0", getGridElement().getHeaderCell(0, 0).getText()
- .toLowerCase());
+ assertEquals("column 0",
+ getGridElement().getHeaderCell(0, 0).getText().toLowerCase());
}
@Test
@@ -170,15 +170,15 @@ public class GridColumnVisibilityTest extends GridBasicFeaturesTest {
public void testColumnHidingToggleCaption_settingToggleCaption_updatesToggle() {
toggleColumnHidable(1);
getSidebarOpenButton().click();
- assertEquals("column 1", getGridElement().getHeaderCell(0, 1).getText()
- .toLowerCase());
+ assertEquals("column 1",
+ getGridElement().getHeaderCell(0, 1).getText().toLowerCase());
assertEquals("Column 1", getColumnHidingToggle(1).getText());
toggleColumnHidingToggleCaptionChange(1);
getSidebarOpenButton().click();
- assertEquals("column 1", getGridElement().getHeaderCell(0, 1).getText()
- .toLowerCase());
+ assertEquals("column 1",
+ getGridElement().getHeaderCell(0, 1).getText().toLowerCase());
assertEquals("Column 1 caption 0", getColumnHidingToggle(1).getText());
toggleColumnHidingToggleCaptionChange(1);
@@ -190,8 +190,8 @@ public class GridColumnVisibilityTest extends GridBasicFeaturesTest {
public void testColumnHidingToggleCaption_settingWidgetToHeader_toggleCaptionStays() {
toggleColumnHidable(1);
getSidebarOpenButton().click();
- assertEquals("column 1", getGridElement().getHeaderCell(0, 1).getText()
- .toLowerCase());
+ assertEquals("column 1",
+ getGridElement().getHeaderCell(0, 1).getText().toLowerCase());
assertEquals("Column 1", getColumnHidingToggle(1).getText());
selectMenuPath("Component", "Columns", "Column 1", "Header Type",
@@ -209,8 +209,8 @@ public class GridColumnVisibilityTest extends GridBasicFeaturesTest {
"Change header caption");
getSidebarOpenButton().click();
- assertEquals("column 1 header 0", getGridElement().getHeaderCell(0, 1)
- .getText().toLowerCase());
+ assertEquals("column 1 header 0",
+ getGridElement().getHeaderCell(0, 1).getText().toLowerCase());
assertEquals("Column 1 header 0", getColumnHidingToggle(1).getText());
}
@@ -224,8 +224,8 @@ public class GridColumnVisibilityTest extends GridBasicFeaturesTest {
"Change header caption");
getSidebarOpenButton().click();
- assertEquals("column 1 header 0", getGridElement().getHeaderCell(0, 1)
- .getText().toLowerCase());
+ assertEquals("column 1 header 0",
+ getGridElement().getHeaderCell(0, 1).getText().toLowerCase());
assertEquals("Column 1 caption 0", getColumnHidingToggle(1).getText());
}
@@ -298,7 +298,8 @@ public class GridColumnVisibilityTest extends GridBasicFeaturesTest {
}
@Test
- public void showColumnAndScrollbarWhenScrolledDownAndVisibleRowsChange() throws Exception {
+ public void showColumnAndScrollbarWhenScrolledDownAndVisibleRowsChange()
+ throws Exception {
// Set a (un)suitable height
selectMenuPath("Component", "Size", "HeightMode Row");
selectMenuPath("Component", "Size", "Height by Rows", "4.33 rows");
@@ -307,7 +308,7 @@ public class GridColumnVisibilityTest extends GridBasicFeaturesTest {
// Hide all but the first 3
getSidebarOpenButton().click();
- for (int i=3; i < 12; i++) {
+ for (int i = 3; i < 12; i++) {
getColumnHidingToggle(i).click();
}
@@ -321,7 +322,8 @@ public class GridColumnVisibilityTest extends GridBasicFeaturesTest {
getColumnHidingToggle(3).click();
// Make sure that the new column contains the data it should
- Assert.assertEquals("(999, 3)", getGridElement().getCell(999, 3).getText());
+ Assert.assertEquals("(999, 3)",
+ getGridElement().getCell(999, 3).getText());
}
private void verifyColumnFrozen(int index) {
@@ -335,6 +337,7 @@ public class GridColumnVisibilityTest extends GridBasicFeaturesTest {
private void toggleColumnHidable(int index) {
selectMenuPath("Component", "Columns", "Column " + index, "Hidable");
}
+
private void toggleAllColumnsHidable() {
selectMenuPath("Component", "Columns", "All columns hidable");
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridDetailsServerTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridDetailsServerTest.java
index dda9c03f94..f4778eab4c 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridDetailsServerTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridDetailsServerTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -50,8 +50,8 @@ public class GridDetailsServerTest extends GridBasicFeaturesTest {
"Component", "Details", "Generators", "\"Watching\"" };
private static final String[] DETAILS_GENERATOR_PERSISTING = new String[] {
"Component", "Details", "Generators", "Persisting" };
- private static final String[] CHANGE_HIERARCHY = new String[] {
- "Component", "Details", "Generators", "- Change Component" };
+ private static final String[] CHANGE_HIERARCHY = new String[] { "Component",
+ "Details", "Generators", "- Change Component" };
@Before
public void setUp() {
@@ -93,8 +93,8 @@ public class GridDetailsServerTest extends GridBasicFeaturesTest {
selectMenuPath(OPEN_FIRST_ITEM_DETAILS);
getGridElement().scroll(0);
Thread.sleep(50);
- assertNotNull("details should've been opened", getGridElement()
- .getDetails(0));
+ assertNotNull("details should've been opened",
+ getGridElement().getDetails(0));
}
@Test(expected = NoSuchElementException.class)
@@ -149,8 +149,8 @@ public class GridDetailsServerTest extends GridBasicFeaturesTest {
getGridElement().scrollToRow(0);
// if this fails, it'll fail before the assertNotNull
- assertNotNull("unexpected null details row", getGridElement()
- .getDetails(0));
+ assertNotNull("unexpected null details row",
+ getGridElement().getDetails(0));
}
@Test
@@ -171,8 +171,8 @@ public class GridDetailsServerTest extends GridBasicFeaturesTest {
selectMenuPath(OPEN_ALMOST_LAST_ITEM_DETAILS);
scrollGridVerticallyTo(100000);
- TestBenchElement details = getGridElement().getDetails(
- ALMOST_LAST_INDEX);
+ TestBenchElement details = getGridElement()
+ .getDetails(ALMOST_LAST_INDEX);
assertNotNull(details);
assertTrue("Unexpected details content",
details.getText().endsWith(ALMOST_LAST_INDEX + " (0)"));
@@ -205,8 +205,8 @@ public class GridDetailsServerTest extends GridBasicFeaturesTest {
assertEquals("One", getGridElement().getDetails(0).getText());
selectMenuPath(OPEN_FIRST_ITEM_DETAILS);
- assertFalse("Details should be detached", getGridElement()
- .isElementPresent(By.vaadin("#details[0]")));
+ assertFalse("Details should be detached",
+ getGridElement().isElementPresent(By.vaadin("#details[0]")));
selectMenuPath(CHANGE_HIERARCHY);
selectMenuPath(OPEN_FIRST_ITEM_DETAILS);
@@ -225,8 +225,8 @@ public class GridDetailsServerTest extends GridBasicFeaturesTest {
public void swappingDetailsGenerators_shownDetails() {
selectMenuPath(DETAILS_GENERATOR_PERSISTING);
selectMenuPath(OPEN_FIRST_ITEM_DETAILS);
- assertTrue("Details should contain 'One' at first", getGridElement()
- .getDetails(0).getText().contains("One"));
+ assertTrue("Details should contain 'One' at first",
+ getGridElement().getDetails(0).getText().contains("One"));
selectMenuPath(DETAILS_GENERATOR_WATCHING);
assertFalse(
@@ -251,8 +251,8 @@ public class GridDetailsServerTest extends GridBasicFeaturesTest {
scrollGridVerticallyTo(0);
assertFalse("Got some errors", $(NotificationElement.class).exists());
- assertNotNull("Could not find a details", getGridElement()
- .getDetails(0));
+ assertNotNull("Could not find a details",
+ getGridElement().getDetails(0));
}
@Test
@@ -263,8 +263,8 @@ public class GridDetailsServerTest extends GridBasicFeaturesTest {
scrollGridVerticallyTo(1000);
assertFalse("Got some errors", $(NotificationElement.class).exists());
- assertNotNull("Could not find a details", getGridElement()
- .getDetails(0));
+ assertNotNull("Could not find a details",
+ getGridElement().getDetails(0));
}
@Test
@@ -276,8 +276,8 @@ public class GridDetailsServerTest extends GridBasicFeaturesTest {
scrollGridVerticallyTo(0);
assertFalse("Got some errors", $(NotificationElement.class).exists());
- assertNotNull("Could not find a details", getGridElement()
- .getDetails(0));
+ assertNotNull("Could not find a details",
+ getGridElement().getDetails(0));
}
@Test
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridEditorBufferedTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridEditorBufferedTest.java
index 8340c40b4b..34d46eae78 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridEditorBufferedTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridEditorBufferedTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -59,8 +59,8 @@ public class GridEditorBufferedTest extends GridEditorTest {
new Actions(getDriver()).sendKeys(Keys.ENTER).perform();
assertEditorClosed();
- assertEquals("(100, 0) changed", getGridElement().getCell(100, 0)
- .getText());
+ assertEquals("(100, 0) changed",
+ getGridElement().getCell(100, 0).getText());
}
@Test
@@ -101,13 +101,13 @@ public class GridEditorBufferedTest extends GridEditorTest {
textField.sendKeys(" changed");
- WebElement saveButton = getEditor().findElement(
- By.className("v-grid-editor-save"));
+ WebElement saveButton = getEditor()
+ .findElement(By.className("v-grid-editor-save"));
saveButton.click();
- assertEquals("(100, 0) changed", getGridElement().getCell(100, 0)
- .getText());
+ assertEquals("(100, 0) changed",
+ getGridElement().getCell(100, 0).getText());
}
@Test
@@ -125,8 +125,8 @@ public class GridEditorBufferedTest extends GridEditorTest {
selectMenuPath("Component", "Editor", "Save");
- assertEquals("(100, 0) changed", getGridElement().getCell(100, 0)
- .getText());
+ assertEquals("(100, 0) changed",
+ getGridElement().getCell(100, 0).getText());
}
@Test
@@ -151,7 +151,8 @@ public class GridEditorBufferedTest extends GridEditorTest {
private void makeInvalidEdition() {
selectMenuPath(EDIT_ITEM_5);
- assertFalse(logContainsText("Exception occured, java.lang.IllegalStateException"));
+ assertFalse(logContainsText(
+ "Exception occured, java.lang.IllegalStateException"));
GridEditorElement editor = getGridElement().getEditor();
@@ -197,8 +198,8 @@ public class GridEditorBufferedTest extends GridEditorTest {
GridConstants.DEFAULT_SAVE_CAPTION, getSaveButton().getText());
assertEquals("Cancel button caption should've been \""
+ GridConstants.DEFAULT_CANCEL_CAPTION + "\" to begin with",
- GridConstants.DEFAULT_CANCEL_CAPTION, getCancelButton()
- .getText());
+ GridConstants.DEFAULT_CANCEL_CAPTION,
+ getCancelButton().getText());
selectMenuPath("Component", "Editor", "Change save caption");
assertNotEquals(
@@ -211,8 +212,8 @@ public class GridEditorBufferedTest extends GridEditorTest {
selectMenuPath(EDIT_ITEM_5);
assertNotEquals(
"Cancel button caption should've changed while editor is closed",
- GridConstants.DEFAULT_CANCEL_CAPTION, getCancelButton()
- .getText());
+ GridConstants.DEFAULT_CANCEL_CAPTION,
+ getCancelButton().getText());
}
@Test(expected = NoSuchElementException.class)
@@ -288,11 +289,12 @@ public class GridEditorBufferedTest extends GridEditorTest {
public void testProgrammaticOpeningDisabledWhenOpen() {
selectMenuPath(EDIT_ITEM_5);
assertEditorOpen();
- assertEquals("Editor should edit row 5", "(5, 0)", getEditorWidgets()
- .get(0).getAttribute("value"));
+ assertEquals("Editor should edit row 5", "(5, 0)",
+ getEditorWidgets().get(0).getAttribute("value"));
selectMenuPath(EDIT_ITEM_100);
- boolean thrown = logContainsText("Exception occured, java.lang.IllegalStateException");
+ boolean thrown = logContainsText(
+ "Exception occured, java.lang.IllegalStateException");
assertTrue("IllegalStateException thrown", thrown);
assertEditorOpen();
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridEditorTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridEditorTest.java
index 0cba2ce34b..f7fc4460d3 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridEditorTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridEditorTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -70,7 +70,8 @@ public abstract class GridEditorTest extends GridBasicFeaturesTest {
selectMenuPath(TOGGLE_EDIT_ENABLED);
selectMenuPath(EDIT_ITEM_5);
assertEditorClosed();
- boolean thrown = logContainsText("Exception occured, java.lang.IllegalStateException");
+ boolean thrown = logContainsText(
+ "Exception occured, java.lang.IllegalStateException");
assertTrue("IllegalStateException thrown", thrown);
}
@@ -79,7 +80,8 @@ public abstract class GridEditorTest extends GridBasicFeaturesTest {
selectMenuPath(EDIT_ITEM_5);
selectMenuPath(TOGGLE_EDIT_ENABLED);
assertEditorOpen();
- boolean thrown = logContainsText("Exception occured, java.lang.IllegalStateException");
+ boolean thrown = logContainsText(
+ "Exception occured, java.lang.IllegalStateException");
assertTrue("IllegalStateException thrown", thrown);
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridEditorUnbufferedTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridEditorUnbufferedTest.java
index c4d1893875..c623d9abc5 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridEditorUnbufferedTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridEditorUnbufferedTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -62,7 +62,8 @@ public class GridEditorUnbufferedTest extends GridEditorTest {
selectMenuPath(EDIT_ITEM_5);
assertEditorOpen();
selectMenuPath(TOGGLE_EDITOR_BUFFERED);
- boolean thrown = logContainsText("Exception occured, java.lang.IllegalStateException");
+ boolean thrown = logContainsText(
+ "Exception occured, java.lang.IllegalStateException");
assertTrue("IllegalStateException thrown", thrown);
}
@@ -110,8 +111,8 @@ public class GridEditorUnbufferedTest extends GridEditorTest {
firstFieldValue = getEditorWidgets().get(0).getAttribute("value");
int row = 100 - i;
- assertEquals("Editor should move to row " + row,
- "(" + row + ", 0)", firstFieldValue);
+ assertEquals("Editor should move to row " + row, "(" + row + ", 0)",
+ firstFieldValue);
}
}
@@ -156,8 +157,8 @@ public class GridEditorUnbufferedTest extends GridEditorTest {
assertEditorOpen();
- WebElement editorFooter = getEditor().findElement(
- By.className("v-grid-editor-footer"));
+ WebElement editorFooter = getEditor()
+ .findElement(By.className("v-grid-editor-footer"));
assertTrue("Editor footer should not be visible when there's no error",
editorFooter.getCssValue("display").equalsIgnoreCase("none"));
@@ -236,8 +237,8 @@ public class GridEditorUnbufferedTest extends GridEditorTest {
public void testProgrammaticOpeningWhenOpen() {
selectMenuPath(EDIT_ITEM_5);
assertEditorOpen();
- assertEquals("Editor should edit row 5", "(5, 0)", getEditorWidgets()
- .get(0).getAttribute("value"));
+ assertEquals("Editor should edit row 5", "(5, 0)",
+ getEditorWidgets().get(0).getAttribute("value"));
selectMenuPath(EDIT_ITEM_100);
assertEditorOpen();
@@ -282,13 +283,12 @@ public class GridEditorUnbufferedTest extends GridEditorTest {
editor.click(5, 5);
editor.sendKeys("Foo", Keys.ENTER);
- assertEquals("Editor did not move.", "(6, 0)", getGridElement()
- .getEditor().getField(0).getAttribute("value"));
- assertEquals("Editor field value did not update from server.",
- "(6, 2)", getGridElement().getEditor().getField(2)
- .getAttribute("value"));
+ assertEquals("Editor did not move.", "(6, 0)",
+ getGridElement().getEditor().getField(0).getAttribute("value"));
+ assertEquals("Editor field value did not update from server.", "(6, 2)",
+ getGridElement().getEditor().getField(2).getAttribute("value"));
- assertEquals("Edited value was not saved.", "Foo", getGridElement()
- .getCell(5, 2).getText());
+ assertEquals("Edited value was not saved.", "Foo",
+ getGridElement().getCell(5, 2).getText());
}
} \ No newline at end of file
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridFocusTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridFocusTest.java
index ca9d78409c..408c837e76 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridFocusTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridFocusTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ import com.vaadin.tests.components.grid.basicfeatures.GridBasicFeaturesTest;
/**
* Test for server-side Grid focus features.
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -62,8 +62,8 @@ public class GridFocusTest extends GridBasicFeaturesTest {
public void testProgrammaticFocus() {
selectMenuPath("Component", "State", "Set focus");
- assertTrue("Grid cell (0, 0) should be focused", getGridElement()
- .getCell(0, 0).isFocused());
+ assertTrue("Grid cell (0, 0) should be focused",
+ getGridElement().getCell(0, 0).isFocused());
}
@Test
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridItemClickTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridItemClickTest.java
index 57fc56c995..f7eeff44ae 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridItemClickTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridItemClickTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -34,7 +34,8 @@ public class GridItemClickTest extends GridBasicFeaturesTest {
GridCellElement cell = getGridElement().getCell(3, 2);
new Actions(getDriver()).moveToElement(cell).click().perform();
- assertTrue("No click in log", logContainsText(itemClickOn(3, 2, false)));
+ assertTrue("No click in log",
+ logContainsText(itemClickOn(3, 2, false)));
}
@Test
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridKeyboardNavigationTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridKeyboardNavigationTest.java
index 6724a7bb49..aacb32c982 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridKeyboardNavigationTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridKeyboardNavigationTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -35,13 +35,13 @@ public class GridKeyboardNavigationTest extends GridBasicFeaturesTest {
openTestURL();
GridElement grid = getGridElement();
- assertTrue("Body cell 0, 0 is not focused on init.", grid.getCell(0, 0)
- .isFocused());
+ assertTrue("Body cell 0, 0 is not focused on init.",
+ grid.getCell(0, 0).isFocused());
grid.getCell(5, 2).click();
- assertFalse("Body cell 0, 0 was still focused after clicking", grid
- .getCell(0, 0).isFocused());
- assertTrue("Body cell 5, 2 is not focused after clicking", grid
- .getCell(5, 2).isFocused());
+ assertFalse("Body cell 0, 0 was still focused after clicking",
+ grid.getCell(0, 0).isFocused());
+ assertTrue("Body cell 5, 2 is not focused after clicking",
+ grid.getCell(5, 2).isFocused());
}
@Test
@@ -49,11 +49,11 @@ public class GridKeyboardNavigationTest extends GridBasicFeaturesTest {
openTestURL();
GridElement grid = getGridElement();
- assertTrue("Body cell 0, 0 is not focused on init.", grid.getCell(0, 0)
- .isFocused());
+ assertTrue("Body cell 0, 0 is not focused on init.",
+ grid.getCell(0, 0).isFocused());
grid.getHeaderCell(0, 3).click();
- assertFalse("Body cell 0, 0 is focused after click on header.", grid
- .getCell(0, 0).isFocused());
+ assertFalse("Body cell 0, 0 is focused after click on header.",
+ grid.getCell(0, 0).isFocused());
assertTrue("Header cell 0, 3 is not focused after click on header.",
grid.getHeaderCell(0, 3).isFocused());
}
@@ -82,8 +82,8 @@ public class GridKeyboardNavigationTest extends GridBasicFeaturesTest {
isElementPresent(By.xpath("//td[text() = '(0, 0)']")));
assertTrue("Cell focus is not visible",
isElementPresent(By.xpath("//td[text() = '(" + i + ", 0)']")));
- assertTrue("Body cell " + i + ", 1 is not focused", grid.getCell(i, 1)
- .isFocused());
+ assertTrue("Body cell " + i + ", 1 is not focused",
+ grid.getCell(i, 1).isFocused());
}
@Test
@@ -96,11 +96,11 @@ public class GridKeyboardNavigationTest extends GridBasicFeaturesTest {
.perform();
grid.scrollToRow(280);
- assertTrue("Header cell is not focused.", grid.getHeaderCell(0, 7)
- .isFocused());
+ assertTrue("Header cell is not focused.",
+ grid.getHeaderCell(0, 7).isFocused());
new Actions(getDriver()).sendKeys(Keys.ARROW_DOWN).perform();
- assertTrue("Body cell 280, 7 is not focused", grid.getCell(280, 7)
- .isFocused());
+ assertTrue("Body cell 280, 7 is not focused",
+ grid.getCell(280, 7).isFocused());
}
@Test
@@ -113,11 +113,11 @@ public class GridKeyboardNavigationTest extends GridBasicFeaturesTest {
grid.scrollToRow(300);
grid.getFooterCell(0, 2).click();
- assertTrue("Footer cell does not have focus.", grid.getFooterCell(0, 2)
- .isFocused());
+ assertTrue("Footer cell does not have focus.",
+ grid.getFooterCell(0, 2).isFocused());
new Actions(getDriver()).sendKeys(Keys.ARROW_UP).perform();
- assertTrue("Body cell 300, 2 does not have focus.", grid
- .getCell(300, 2).isFocused());
+ assertTrue("Body cell 300, 2 does not have focus.",
+ grid.getCell(300, 2).isFocused());
}
@Test
@@ -127,15 +127,15 @@ public class GridKeyboardNavigationTest extends GridBasicFeaturesTest {
GridElement grid = getGridElement();
grid.getCell(10, 2).click();
- assertTrue("Body cell 10, 2 does not have focus", grid.getCell(10, 2)
- .isFocused());
+ assertTrue("Body cell 10, 2 does not have focus",
+ grid.getCell(10, 2).isFocused());
new Actions(getDriver()).keyDown(Keys.SHIFT).sendKeys(Keys.TAB)
.keyUp(Keys.SHIFT).perform();
assertTrue("Header cell 0, 2 does not have focus",
grid.getHeaderCell(0, 2).isFocused());
new Actions(getDriver()).sendKeys(Keys.TAB).perform();
- assertTrue("Body cell 10, 2 does not have focus", grid.getCell(10, 2)
- .isFocused());
+ assertTrue("Body cell 10, 2 does not have focus",
+ grid.getCell(10, 2).isFocused());
// Navigate out of the Grid and try to navigate with arrow keys.
new Actions(getDriver()).keyDown(Keys.SHIFT).sendKeys(Keys.TAB)
@@ -154,15 +154,15 @@ public class GridKeyboardNavigationTest extends GridBasicFeaturesTest {
GridElement grid = getGridElement();
grid.getCell(10, 2).click();
- assertTrue("Body cell 10, 2 does not have focus", grid.getCell(10, 2)
- .isFocused());
+ assertTrue("Body cell 10, 2 does not have focus",
+ grid.getCell(10, 2).isFocused());
new Actions(getDriver()).sendKeys(Keys.TAB).perform();
assertTrue("Footer cell 0, 2 does not have focus",
grid.getFooterCell(0, 2).isFocused());
new Actions(getDriver()).keyDown(Keys.SHIFT).sendKeys(Keys.TAB)
.keyUp(Keys.SHIFT).perform();
- assertTrue("Body cell 10, 2 does not have focus", grid.getCell(10, 2)
- .isFocused());
+ assertTrue("Body cell 10, 2 does not have focus",
+ grid.getCell(10, 2).isFocused());
// Navigate out of the Grid and try to navigate with arrow keys.
new Actions(getDriver()).sendKeys(Keys.TAB).sendKeys(Keys.TAB)
@@ -178,13 +178,12 @@ public class GridKeyboardNavigationTest extends GridBasicFeaturesTest {
getGridElement().getCell(100, 2).click();
new Actions(getDriver()).sendKeys(Keys.HOME).perform();
- assertTrue("First row is not visible", getGridElement().getCell(0, 2)
- .isDisplayed());
+ assertTrue("First row is not visible",
+ getGridElement().getCell(0, 2).isDisplayed());
new Actions(getDriver()).sendKeys(Keys.END).perform();
- assertTrue("Last row cell not visible",
- getGridElement().getCell(GridBasicFeatures.ROWS - 1, 2)
- .isDisplayed());
+ assertTrue("Last row cell not visible", getGridElement()
+ .getCell(GridBasicFeatures.ROWS - 1, 2).isDisplayed());
}
@Test
@@ -215,8 +214,8 @@ public class GridKeyboardNavigationTest extends GridBasicFeaturesTest {
}
private void checkFocusedCell(int row, int column, int rowTolerance) {
- WebElement focusedCell = getGridElement().findElement(
- By.className("v-grid-cell-focused"));
+ WebElement focusedCell = getGridElement()
+ .findElement(By.className("v-grid-cell-focused"));
String cellContents = focusedCell.getText();
String[] rowAndCol = cellContents.replaceAll("[()\\s]", "").split(",");
int focusedRow = Integer.parseInt(rowAndCol[0].trim());
@@ -224,8 +223,9 @@ public class GridKeyboardNavigationTest extends GridBasicFeaturesTest {
// rowTolerance is the maximal allowed difference from the expected
// focused row. It is required because scrolling using page up/down
// may not move the position by exactly the visible height of the grid.
- assertTrue("The wrong cell is focused. Expected (" + row + "," + column
- + "), was " + cellContents,
+ assertTrue(
+ "The wrong cell is focused. Expected (" + row + "," + column
+ + "), was " + cellContents,
column == focusedColumn
&& Math.abs(row - focusedRow) <= rowTolerance);
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridMultiSortingTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridMultiSortingTest.java
index a3cf5872f0..344c97a4f6 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridMultiSortingTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridMultiSortingTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -58,9 +58,8 @@ public class GridMultiSortingTest extends GridBasicFeaturesTest {
prev = getGridElement().getCell(0, 0).getText();
for (int i = 1; i <= 6; ++i) {
- assertTrue(
- "Grid is not sorted by column 0.",
- prev.compareTo(getGridElement().getCell(i, 0).getText()) < 0);
+ assertTrue("Grid is not sorted by column 0.", prev
+ .compareTo(getGridElement().getCell(i, 0).getText()) < 0);
}
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridRowAddRemoveTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridRowAddRemoveTest.java
index f91f93c5d5..899edd2e4a 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridRowAddRemoveTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridRowAddRemoveTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridScrollTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridScrollTest.java
index 9313b40770..e394be36de 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridScrollTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridScrollTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -33,8 +33,8 @@ public class GridScrollTest extends GridBasicFeaturesTest {
getLogRow(1).equals("0. Requested items 0 - 40"));
// Client response varies a bit between browsers as different amount of
// rows is cached.
- assertTrue("First row request from client not found", getLogRow(0)
- .startsWith("1. Requested items 0 - "));
+ assertTrue("First row request from client not found",
+ getLogRow(0).startsWith("1. Requested items 0 - "));
selectMenuPath("Component", "Size", "HeightMode Row");
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridSelectionTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridSelectionTest.java
index 44a632bc49..bd2380ee45 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridSelectionTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridSelectionTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -40,8 +40,8 @@ public class GridSelectionTest extends GridBasicFeaturesTest {
setSelectionModelMulti();
- assertFalse("row shouldn't start out as selected", getRow(0)
- .isSelected());
+ assertFalse("row shouldn't start out as selected",
+ getRow(0).isSelected());
toggleFirstRowSelection();
assertTrue("row should become selected", getRow(0).isSelected());
toggleFirstRowSelection();
@@ -54,8 +54,8 @@ public class GridSelectionTest extends GridBasicFeaturesTest {
setSelectionModelMulti();
- assertFalse("row shouldn't start out as selected", getRow(0)
- .isSelected());
+ assertFalse("row shouldn't start out as selected",
+ getRow(0).isSelected());
toggleFirstRowSelection();
assertTrue("row should become selected", getRow(0).isSelected());
@@ -72,8 +72,8 @@ public class GridSelectionTest extends GridBasicFeaturesTest {
setSelectionModelMulti();
- assertFalse("row shouldn't start out as selected", getRow(0)
- .isSelected());
+ assertFalse("row shouldn't start out as selected",
+ getRow(0).isSelected());
scrollGridVerticallyTo(10000); // make sure the row is out of cache
toggleFirstRowSelection();
@@ -92,16 +92,17 @@ public class GridSelectionTest extends GridBasicFeaturesTest {
setSelectionModelMulti();
- assertFalse("row shouldn't start out as selected", getRow(0)
- .isSelected());
+ assertFalse("row shouldn't start out as selected",
+ getRow(0).isSelected());
scrollGridVerticallyTo(10000); // make sure the row is out of cache
toggleFirstRowSelection();
toggleFirstRowSelection();
scrollGridVerticallyTo(0); // make sure the row is out of cache
- assertFalse("row shouldn't be selected when scrolling "
- + "back into view", getRow(0).isSelected());
+ assertFalse(
+ "row shouldn't be selected when scrolling " + "back into view",
+ getRow(0).isSelected());
}
@Test
@@ -110,8 +111,8 @@ public class GridSelectionTest extends GridBasicFeaturesTest {
setSelectionModelSingle();
GridElement grid = getGridElement();
- assertFalse("First row was selected from start", grid.getRow(0)
- .isSelected());
+ assertFalse("First row was selected from start",
+ grid.getRow(0).isSelected());
toggleFirstRowSelection();
assertTrue("First row was not selected.", getRow(0).isSelected());
assertTrue("Selection event was not correct",
@@ -151,20 +152,20 @@ public class GridSelectionTest extends GridBasicFeaturesTest {
grid.getCell(3, 1).click();
new Actions(getDriver()).sendKeys(Keys.SPACE).perform();
- assertTrue("Grid row 3 was not selected with space key.", grid
- .getRow(3).isSelected());
+ assertTrue("Grid row 3 was not selected with space key.",
+ grid.getRow(3).isSelected());
new Actions(getDriver()).sendKeys(Keys.SPACE).perform();
- assertTrue("Grid row 3 was not deselected with space key.", !grid
- .getRow(3).isSelected());
+ assertTrue("Grid row 3 was not deselected with space key.",
+ !grid.getRow(3).isSelected());
grid.scrollToRow(500);
new Actions(getDriver()).sendKeys(Keys.SPACE).perform();
- assertTrue("Grid row 3 was not selected with space key.", grid
- .getRow(3).isSelected());
+ assertTrue("Grid row 3 was not selected with space key.",
+ grid.getRow(3).isSelected());
}
@Test
@@ -175,25 +176,25 @@ public class GridSelectionTest extends GridBasicFeaturesTest {
GridElement grid = getGridElement();
grid.getCell(3, 1).click();
- assertTrue("Grid row 3 was not selected with clicking.", grid.getRow(3)
- .isSelected());
+ assertTrue("Grid row 3 was not selected with clicking.",
+ grid.getRow(3).isSelected());
new Actions(getDriver()).sendKeys(Keys.SPACE).perform();
- assertTrue("Grid row 3 was not deselected with space key.", !grid
- .getRow(3).isSelected());
+ assertTrue("Grid row 3 was not deselected with space key.",
+ !grid.getRow(3).isSelected());
new Actions(getDriver()).sendKeys(Keys.SPACE).perform();
- assertTrue("Grid row 3 was not selected with space key.", grid
- .getRow(3).isSelected());
+ assertTrue("Grid row 3 was not selected with space key.",
+ grid.getRow(3).isSelected());
grid.scrollToRow(500);
new Actions(getDriver()).sendKeys(Keys.SPACE).perform();
- assertTrue("Grid row 3 was not deselected with space key.", !grid
- .getRow(3).isSelected());
+ assertTrue("Grid row 3 was not deselected with space key.",
+ !grid.getRow(3).isSelected());
}
@Test
@@ -207,13 +208,13 @@ public class GridSelectionTest extends GridBasicFeaturesTest {
header.findElement(By.tagName("input")).click();
for (int i = 0; i < GridBasicFeatures.ROWS; i += 100) {
- assertTrue("Row " + i + " was not selected.", getGridElement()
- .getRow(i).isSelected());
+ assertTrue("Row " + i + " was not selected.",
+ getGridElement().getRow(i).isSelected());
}
header.findElement(By.tagName("input")).click();
- assertFalse("Row 100 was still selected", getGridElement().getRow(100)
- .isSelected());
+ assertFalse("Row 100 was still selected",
+ getGridElement().getRow(100).isSelected());
}
@Test
@@ -227,14 +228,13 @@ public class GridSelectionTest extends GridBasicFeaturesTest {
getGridElement().getHeaderCell(0, 1).click();
- WebElement selectionBox = getGridElement().getCell(4, 0).findElement(
- By.tagName("input"));
+ WebElement selectionBox = getGridElement().getCell(4, 0)
+ .findElement(By.tagName("input"));
selectionBox.click();
selectionBox.click();
- assertFalse(
- "Exception occured on row reselection.",
- logContainsText("Exception occured, java.lang.IllegalStateException: No item id for key 101 found."));
+ assertFalse("Exception occured on row reselection.", logContainsText(
+ "Exception occured, java.lang.IllegalStateException: No item id for key 101 found."));
}
@Test
@@ -261,8 +261,8 @@ public class GridSelectionTest extends GridBasicFeaturesTest {
// Single selection model shouldn't have selection column to begin with
assertFalse(
"Selection columnn shouldn't have been in grid for Single Selection Model",
- getGridElement().getCell(0, 1).isElementPresent(
- By.tagName("input")));
+ getGridElement().getCell(0, 1)
+ .isElementPresent(By.tagName("input")));
setSelectionModelNone();
header = getGridElement().getHeaderCell(0, 0);
@@ -295,19 +295,19 @@ public class GridSelectionTest extends GridBasicFeaturesTest {
getGridElement().getCell(5, 1).click();
getGridElement().getCell(5, 1).click();
- assertFalse("Row should be not selected after two clicks", getRow(5)
- .isSelected());
+ assertFalse("Row should be not selected after two clicks",
+ getRow(5).isSelected());
selectMenuPath("Component", "State", "Single select allow deselect");
getGridElement().getCell(5, 1).click();
getGridElement().getCell(5, 1).click();
- assertTrue("Row should be selected after two clicks", getRow(5)
- .isSelected());
+ assertTrue("Row should be selected after two clicks",
+ getRow(5).isSelected());
selectMenuPath("Component", "State", "Single select allow deselect");
getGridElement().getCell(5, 1).click();
- assertFalse("Row should be not selected after another click", getRow(5)
- .isSelected());
+ assertFalse("Row should be not selected after another click",
+ getRow(5).isSelected());
// Also verify that state is updated together with the model
setSelectionModelNone();
@@ -317,8 +317,8 @@ public class GridSelectionTest extends GridBasicFeaturesTest {
getGridElement().getCell(5, 1).click();
getGridElement().getCell(5, 1).click();
- assertTrue("Row should stay selected after two clicks", getRow(5)
- .isSelected());
+ assertTrue("Row should stay selected after two clicks",
+ getRow(5).isSelected());
}
@Test
@@ -328,12 +328,11 @@ public class GridSelectionTest extends GridBasicFeaturesTest {
setSelectionModelSingle();
getGridElement().getCell(5, 1).click();
- assertTrue("Row should be selected after clicking", getRow(5)
- .isSelected());
+ assertTrue("Row should be selected after clicking",
+ getRow(5).isSelected());
setSelectionModelNone();
- assertFalse(
- "Row should not be selected after changing selection model",
+ assertFalse("Row should not be selected after changing selection model",
getRow(5).isSelected());
}
@@ -393,7 +392,8 @@ public class GridSelectionTest extends GridBasicFeaturesTest {
assertFalse(
"Unexpected NullPointerException when removing selected rows",
- logContainsText("Exception occured, java.lang.NullPointerException: null"));
+ logContainsText(
+ "Exception occured, java.lang.NullPointerException: null"));
}
private void waitUntilCheckBoxValue(final WebElement checkBoxElememnt,
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridSidebarThemeTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridSidebarThemeTest.java
index 238b470feb..bca00690af 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridSidebarThemeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridSidebarThemeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridSortingTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridSortingTest.java
index c23e5d1f11..cc56958626 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridSortingTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridSortingTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -86,8 +86,10 @@ public class GridSortingTest extends GridBasicFeaturesTest {
row += "9";
String expected = "(" + row + ", 0)";
String cellValue = getGridElement().getCell(i, 0).getText();
- assertEquals("Grid is not sorted by Column 9 "
- + "using descending direction.", expected, cellValue);
+ assertEquals(
+ "Grid is not sorted by Column 9 "
+ + "using descending direction.",
+ expected, cellValue);
}
// Column 10 is random numbers from Random with seed 13334
@@ -100,10 +102,10 @@ public class GridSortingTest extends GridBasicFeaturesTest {
assertColumnsAreSortedAs(_(10, 1, SortDirection.ASCENDING));
for (int i = 0; i < 5; ++i) {
- Integer firstRow = Integer.valueOf(getGridElement().getCell(i + 1,
- 10).getText());
- Integer secondRow = Integer.valueOf(getGridElement().getCell(i, 10)
- .getText());
+ Integer firstRow = Integer
+ .valueOf(getGridElement().getCell(i + 1, 10).getText());
+ Integer secondRow = Integer
+ .valueOf(getGridElement().getCell(i, 10).getText());
assertGreater("Grid is not sorted by Column 10 using"
+ " ascending direction", firstRow, secondRow);
@@ -114,8 +116,8 @@ public class GridSortingTest extends GridBasicFeaturesTest {
sortBy("Column 7, DESC");
for (int i = 0; i < 3; ++i) {
String expected = "(" + i + ", 0)";
- String cellContent = getGridElement().getCell(
- GridBasicFeatures.ROWS - (i + 1), 0).getText();
+ String cellContent = getGridElement()
+ .getCell(GridBasicFeatures.ROWS - (i + 1), 0).getText();
assertEquals("Grid is not sorted by Column 7 using "
+ "descending direction", expected, cellContent);
}
@@ -167,8 +169,8 @@ public class GridSortingTest extends GridBasicFeaturesTest {
assertColumnsAreSortedAs(_(10, 1, SortDirection.ASCENDING));
for (int i = 0; i < 5; ++i) {
- Integer firstRow = Integer.valueOf(grid.getCell(i + 1, 10)
- .getText());
+ Integer firstRow = Integer
+ .valueOf(grid.getCell(i + 1, 10).getText());
Integer secondRow = Integer.valueOf(grid.getCell(i, 10).getText());
assertGreater(
"Grid is not sorted by Column 10 using ascending direction",
@@ -190,7 +192,8 @@ public class GridSortingTest extends GridBasicFeaturesTest {
assertEquals(
"Grid is not sorted by Column 7 using descending direction",
"(" + i + ", 0)",
- grid.getCell(GridBasicFeatures.ROWS - (i + 1), 0).getText());
+ grid.getCell(GridBasicFeatures.ROWS - (i + 1), 0)
+ .getText());
}
}
@@ -377,9 +380,8 @@ public class GridSortingTest extends GridBasicFeaturesTest {
private void assertLastSortIsUserOriginated(boolean isUserOriginated) {
// Find a message in the log
- List<WebElement> userOriginatedMessages = getDriver()
- .findElements(
- By.xpath("//div[@id='Log']//*[contains(text(),'SortEvent: isUserOriginated')]"));
+ List<WebElement> userOriginatedMessages = getDriver().findElements(By
+ .xpath("//div[@id='Log']//*[contains(text(),'SortEvent: isUserOriginated')]"));
Collections.sort(userOriginatedMessages, new Comparator<WebElement>() {
@Override
@@ -388,8 +390,8 @@ public class GridSortingTest extends GridBasicFeaturesTest {
}
});
- String newestEntry = userOriginatedMessages.get(
- userOriginatedMessages.size() - 1).getText();
+ String newestEntry = userOriginatedMessages
+ .get(userOriginatedMessages.size() - 1).getText();
String[] parts = newestEntry.split(" ");
boolean wasUserOriginated = Boolean
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridStaticSectionComponentTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridStaticSectionComponentTest.java
index 2fbaa58cab..4fda9d2086 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridStaticSectionComponentTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridStaticSectionComponentTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -64,8 +64,8 @@ public class GridStaticSectionComponentTest extends GridBasicFeaturesTest {
assertTrue("No notifications should've been shown",
!$(NotificationElement.class).exists());
assertEquals("Header should've been reverted back to text header",
- "text header", getGridElement().getHeaderCell(0, 1).getText()
- .toLowerCase());
+ "text header",
+ getGridElement().getHeaderCell(0, 1).getText().toLowerCase());
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridStructureTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridStructureTest.java
index 7c50ae5d6e..f8a4bd3e95 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridStructureTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridStructureTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -49,8 +49,8 @@ public class GridStructureTest extends GridBasicFeaturesTest {
assertFalse(isElementPresent(NotificationElement.class));
}
- assertEquals("Headers still visible.", 0, getGridHeaderRowCells()
- .size());
+ assertEquals("Headers still visible.", 0,
+ getGridHeaderRowCells().size());
}
@Test
@@ -58,16 +58,16 @@ public class GridStructureTest extends GridBasicFeaturesTest {
setDebug(true);
openTestURL();
- assertEquals("column 0", getGridElement().getHeaderCell(0, 0).getText()
- .toLowerCase());
+ assertEquals("column 0",
+ getGridElement().getHeaderCell(0, 0).getText().toLowerCase());
selectMenuPath("Component", "Columns", "Column 0", "Add / Remove");
- assertEquals("column 1", getGridElement().getHeaderCell(0, 0).getText()
- .toLowerCase());
+ assertEquals("column 1",
+ getGridElement().getHeaderCell(0, 0).getText().toLowerCase());
selectMenuPath("Component", "Columns", "Column 0", "Add / Remove");
// Column 0 is now the last column in Grid.
- assertEquals("Unexpected column content", "(0, 0)", getGridElement()
- .getCell(0, 11).getText());
+ assertEquals("Unexpected column content", "(0, 0)",
+ getGridElement().getCell(0, 11).getText());
}
@Test
@@ -316,9 +316,10 @@ public class GridStructureTest extends GridBasicFeaturesTest {
try {
GridCellElement cell = getGridElement().getCell(row, 1);
foundElements = true;
- assertTrue("Unexpected cell contents. "
- + "Did the ItemSetChange work after all?", cell
- .getText().startsWith("(23"));
+ assertTrue(
+ "Unexpected cell contents. "
+ + "Did the ItemSetChange work after all?",
+ cell.getText().startsWith("(23"));
} catch (NoSuchElementException e) {
assertTrue("No rows were found", foundElements);
return;
@@ -357,10 +358,11 @@ public class GridStructureTest extends GridBasicFeaturesTest {
// Compare with reversed order
for (int i = 0; i < gridData.length; ++i) {
final int column = gridData.length - 1 - i;
- final String newText = grid.getCell(0, column).getAttribute(
- "innerHTML");
- assertEquals("Grid contained unexpected values. (0, " + column
- + ")", gridData[i], newText);
+ final String newText = grid.getCell(0, column)
+ .getAttribute("innerHTML");
+ assertEquals(
+ "Grid contained unexpected values. (0, " + column + ")",
+ gridData[i], newText);
}
}
@@ -369,10 +371,11 @@ public class GridStructureTest extends GridBasicFeaturesTest {
setDebug(true);
openTestURL();
- assertNotEquals("property value", getGridElement().getCell(0, 0)
- .getText());
+ assertNotEquals("property value",
+ getGridElement().getCell(0, 0).getText());
selectMenuPath("Component", "Properties", "Prepend property");
- assertEquals("property value", getGridElement().getCell(0, 0).getText());
+ assertEquals("property value",
+ getGridElement().getCell(0, 0).getText());
}
@Test
@@ -380,20 +383,20 @@ public class GridStructureTest extends GridBasicFeaturesTest {
openTestURL();
assertEquals("(0, 0)", getGridElement().getCell(0, 0).getText());
- assertNotEquals("property value", getGridElement().getCell(0, 0)
- .getText());
+ assertNotEquals("property value",
+ getGridElement().getCell(0, 0).getText());
selectMenuPath("Component", "Properties", "Prepend property");
selectMenuPath("Component", "Properties", "Prepend property");
- assertNotEquals("property value", getGridElement().getCell(0, 0)
- .getText());
+ assertNotEquals("property value",
+ getGridElement().getCell(0, 0).getText());
assertEquals("(0, 0)", getGridElement().getCell(0, 0).getText());
}
private boolean verticalScrollbarIsPresent() {
- return "scroll".equals(getGridVerticalScrollbar().getCssValue(
- "overflow-y"));
+ return "scroll"
+ .equals(getGridVerticalScrollbar().getCssValue("overflow-y"));
}
@Test
@@ -444,7 +447,8 @@ public class GridStructureTest extends GridBasicFeaturesTest {
assertFalse("Error notification was present after removing all rows",
isElementPresent(NotificationElement.class));
- assertFalse(getGridElement().isElementPresent(By.vaadin("#cell[0][0]")));
+ assertFalse(
+ getGridElement().isElementPresent(By.vaadin("#cell[0][0]")));
}
private void assertPrimaryStylename(String stylename) {
@@ -457,8 +461,8 @@ public class GridStructureTest extends GridBasicFeaturesTest {
String hscrollStyleName = getGridElement().getHorizontalScroller()
.getAttribute("class");
assertTrue(hscrollStyleName.contains(stylename + "-scroller"));
- assertTrue(hscrollStyleName
- .contains(stylename + "-scroller-horizontal"));
+ assertTrue(
+ hscrollStyleName.contains(stylename + "-scroller-horizontal"));
String vscrollStyleName = getGridElement().getVerticalScroller()
.getAttribute("class");
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/LoadingIndicatorTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/LoadingIndicatorTest.java
index f4771b9067..c72a65a20c 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/LoadingIndicatorTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/LoadingIndicatorTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -45,11 +45,11 @@ public class LoadingIndicatorTest extends GridBasicFeaturesTest {
gridElement.getCell(200, 1);
// Wait for loading indicator delay
- waitUntil(ExpectedConditions.visibilityOfElementLocated(By
- .className("v-loading-indicator")));
+ waitUntil(ExpectedConditions.visibilityOfElementLocated(
+ By.className("v-loading-indicator")));
- waitUntilNot(ExpectedConditions.visibilityOfElementLocated(By
- .className("v-loading-indicator")));
+ waitUntilNot(ExpectedConditions.visibilityOfElementLocated(
+ By.className("v-loading-indicator")));
// Scroll so much that more data gets fetched, but not so much that
// missing rows are shown
diff --git a/uitest/src/test/java/com/vaadin/tests/components/gridlayout/ComponentAlignmentsTest.java b/uitest/src/test/java/com/vaadin/tests/components/gridlayout/ComponentAlignmentsTest.java
index cdc8dc77f1..daf0c2e6d8 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/gridlayout/ComponentAlignmentsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/gridlayout/ComponentAlignmentsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test for TOP_CENTER and TOP_RIGHT alignments in VerticalLayout.
- *
+ *
* @author Vaadin Ltd
*/
public class ComponentAlignmentsTest extends MultiBrowserTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutAlignmentsTest.java b/uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutAlignmentsTest.java
index 0f8f717c60..74449ff163 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutAlignmentsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutAlignmentsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutBaseTest.java b/uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutBaseTest.java
index 8bbb5cfe1a..b240ad2031 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutBaseTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutBaseTest.java
@@ -50,7 +50,8 @@ public abstract class GridLayoutBaseTest extends MultiBrowserTest {
}
}
- private void waitUntilColumnAndRowAreHidden(final List<WebElement> slots4x4) {
+ private void waitUntilColumnAndRowAreHidden(
+ final List<WebElement> slots4x4) {
waitUntil(new ExpectedCondition<Boolean>() {
@Override
public Boolean apply(WebDriver input) {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutCaptionAlignmentTest.java b/uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutCaptionAlignmentTest.java
index 240ea4ce6f..a661dcdbc4 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutCaptionAlignmentTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutCaptionAlignmentTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutCellSizesUITest.java b/uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutCellSizesUITest.java
index 8c753b1f5c..35678c1960 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutCellSizesUITest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutCellSizesUITest.java
@@ -90,9 +90,9 @@ public class GridLayoutCellSizesUITest extends MultiBrowserTest {
private void assertNotMatchesSmallHeight(int firstSlotHeight, int i,
String id) {
- Assert.assertNotEquals("Big slot '" + id
- + "' matched small slots in height", firstSlotHeight,
- getSlotHeight(i));
+ Assert.assertNotEquals(
+ "Big slot '" + id + "' matched small slots in height",
+ firstSlotHeight, getSlotHeight(i));
}
private int getSlotHeight(int slot) {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutExpandWithManyRowsTest.java b/uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutExpandWithManyRowsTest.java
index 693fdc73db..39648a5083 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutExpandWithManyRowsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutExpandWithManyRowsTest.java
@@ -21,8 +21,8 @@ public class GridLayoutExpandWithManyRowsTest extends SingleBrowserTest {
// to the first N rows.
// The tests uses rowspan=2 so one row in the DOM should be max 2 pixels
// lower than the first row
- List<WebElement> slots = gridlayout.findElements(By
- .className("v-gridlayout-slot"));
+ List<WebElement> slots = gridlayout
+ .findElements(By.className("v-gridlayout-slot"));
Assert.assertEquals(GridLayoutExpandWithManyRows.POPULATED_ROWS,
slots.size());
diff --git a/uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutExtraSpacingTest.java b/uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutExtraSpacingTest.java
index 22c9c0d4e3..e70b39386e 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutExtraSpacingTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutExtraSpacingTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -40,8 +40,8 @@ public class GridLayoutExtraSpacingTest extends MultiBrowserTest {
// There should be 3 * 6px spacing (red) above the csslayout
verifySpacingAbove(3 * 6, gridLayout, component);
- CheckBoxElement spacingCheckbox = $(CheckBoxElement.class).caption(
- "spacing").first();
+ CheckBoxElement spacingCheckbox = $(CheckBoxElement.class)
+ .caption("spacing").first();
check(spacingCheckbox);
// Spacing off, not hiding empty rows/columns
@@ -100,6 +100,7 @@ public class GridLayoutExtraSpacingTest extends MultiBrowserTest {
}
private void assertHeight(WebElement component, int height, int tolerance) {
- Assert.assertTrue(Math.abs(height - component.getSize().getHeight()) <= tolerance);
+ Assert.assertTrue(Math
+ .abs(height - component.getSize().getHeight()) <= tolerance);
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutFocusOrderAfterShowChildTest.java b/uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutFocusOrderAfterShowChildTest.java
index 1913fbfdf9..e8127d07be 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutFocusOrderAfterShowChildTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutFocusOrderAfterShowChildTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutFractionalSizeAndAlignmentTest.java b/uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutFractionalSizeAndAlignmentTest.java
index b60aea49f0..c8abb580a3 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutFractionalSizeAndAlignmentTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutFractionalSizeAndAlignmentTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutScrollPositionTest.java b/uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutScrollPositionTest.java
index 961b08002b..224a497d19 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutScrollPositionTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/gridlayout/GridLayoutScrollPositionTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/gridlayout/MoveComponentsFromGridLayoutToInnerLayoutTest.java b/uitest/src/test/java/com/vaadin/tests/components/gridlayout/MoveComponentsFromGridLayoutToInnerLayoutTest.java
index 95152e1416..2c512b0552 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/gridlayout/MoveComponentsFromGridLayoutToInnerLayoutTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/gridlayout/MoveComponentsFromGridLayoutToInnerLayoutTest.java
@@ -9,8 +9,8 @@ import java.io.IOException;
import static org.junit.Assert.*;
-public class MoveComponentsFromGridLayoutToInnerLayoutTest extends
- MultiBrowserTest {
+public class MoveComponentsFromGridLayoutToInnerLayoutTest
+ extends MultiBrowserTest {
@Test
public void buttonIsMovedInsideInnerLayout() throws IOException {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/gridlayout/UniformGridLayoutUITest.java b/uitest/src/test/java/com/vaadin/tests/components/gridlayout/UniformGridLayoutUITest.java
index 80f85b3b21..39301da8f6 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/gridlayout/UniformGridLayoutUITest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/gridlayout/UniformGridLayoutUITest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/javascriptcomponent/BasicJavaScriptComponentTest.java b/uitest/src/test/java/com/vaadin/tests/components/javascriptcomponent/BasicJavaScriptComponentTest.java
index ea610dccda..9626e9d537 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/javascriptcomponent/BasicJavaScriptComponentTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/javascriptcomponent/BasicJavaScriptComponentTest.java
@@ -29,7 +29,8 @@ public class BasicJavaScriptComponentTest extends MultiBrowserTest {
}
Assert.assertEquals(
"9. Argument[4][aDate] type: elemental.json.impl.JreJsonString, value: "
- + expected, getLogRow(idx++));
+ + expected,
+ getLogRow(idx++));
Assert.assertEquals(
"8. Argument[4][aBoolean] type: elemental.json.impl.JreJsonBoolean, value: false",
getLogRow(idx++));
@@ -59,7 +60,8 @@ public class BasicJavaScriptComponentTest extends MultiBrowserTest {
Assert.assertEquals(
"1. Argument[0] type: elemental.json.impl.JreJsonString, value: "
- + expected, getLogRow(idx++));
+ + expected,
+ getLogRow(idx++));
// Component attributes
AbstractJavaScriptComponentElement jsComponent = $(
@@ -67,8 +69,8 @@ public class BasicJavaScriptComponentTest extends MultiBrowserTest {
Assert.assertEquals("Component caption", getCaption(jsComponent));
// app://APP/connector/[uiid]/[cid]/[key]/[filename]
- Assert.assertTrue(getChildText(jsComponent, 0).matches(
- "4. Url: .*/run/APP/connector/0/\\d+/test"));
+ Assert.assertTrue(getChildText(jsComponent, 0)
+ .matches("4. Url: .*/run/APP/connector/0/\\d+/test"));
Assert.assertEquals("3. State message: Second state message",
getChildText(jsComponent, 1));
Assert.assertEquals("2. State message: First state message",
diff --git a/uitest/src/test/java/com/vaadin/tests/components/javascriptcomponent/JavaScriptNoLayoutHandlingUITest.java b/uitest/src/test/java/com/vaadin/tests/components/javascriptcomponent/JavaScriptNoLayoutHandlingUITest.java
index 3530eb1e16..df43346cf2 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/javascriptcomponent/JavaScriptNoLayoutHandlingUITest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/javascriptcomponent/JavaScriptNoLayoutHandlingUITest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/javascriptcomponent/JavaScriptPreloadingTest.java b/uitest/src/test/java/com/vaadin/tests/components/javascriptcomponent/JavaScriptPreloadingTest.java
index 4009365814..b88c688ce5 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/javascriptcomponent/JavaScriptPreloadingTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/javascriptcomponent/JavaScriptPreloadingTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -42,14 +42,14 @@ public class JavaScriptPreloadingTest extends MultiBrowserTest {
openTestURL();
try {
- new WebDriverWait(driver, 10).until(ExpectedConditions
- .alertIsPresent());
+ new WebDriverWait(driver, 10)
+ .until(ExpectedConditions.alertIsPresent());
Alert alert = driver.switchTo().alert();
assertEquals("First", alert.getText());
alert.accept();
- new WebDriverWait(driver, 10).until(ExpectedConditions
- .alertIsPresent());
+ new WebDriverWait(driver, 10)
+ .until(ExpectedConditions.alertIsPresent());
alert = driver.switchTo().alert();
assertEquals("Second", alert.getText());
alert.accept();
diff --git a/uitest/src/test/java/com/vaadin/tests/components/javascriptcomponent/JavaScriptResizeListenerTest.java b/uitest/src/test/java/com/vaadin/tests/components/javascriptcomponent/JavaScriptResizeListenerTest.java
index 92ebc3a335..2094560cea 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/javascriptcomponent/JavaScriptResizeListenerTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/javascriptcomponent/JavaScriptResizeListenerTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/label/LabelModesTest.java b/uitest/src/test/java/com/vaadin/tests/components/label/LabelModesTest.java
index 7314ce4093..21f283ee31 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/label/LabelModesTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/label/LabelModesTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/label/LabelTooltipTest.java b/uitest/src/test/java/com/vaadin/tests/components/label/LabelTooltipTest.java
index 36606b9972..79ddefd3d3 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/label/LabelTooltipTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/label/LabelTooltipTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -53,10 +53,12 @@ public class LabelTooltipTest extends MultiBrowserTest {
private void assertTooltips() throws IOException {
$(LabelElement.class).get(2).showTooltip();
- Assert.assertEquals("Default tooltip content", getTooltipElement()
- .getText());
+ Assert.assertEquals("Default tooltip content",
+ getTooltipElement().getText());
- /* Some cases tooltip doesn't disappear without some extra mouse events */
+ /*
+ * Some cases tooltip doesn't disappear without some extra mouse events
+ */
new Actions(getDriver()).moveByOffset(100, -40).perform();
new Actions(getDriver()).moveToElement($(LabelElement.class).get(1))
.click().perform();
@@ -65,8 +67,8 @@ public class LabelTooltipTest extends MultiBrowserTest {
Assert.assertEquals(
"Error inside tooltip together with the regular tooltip message.",
getTooltipErrorElement().getText());
- Assert.assertEquals("Default tooltip content", getTooltipElement()
- .getText());
+ Assert.assertEquals("Default tooltip content",
+ getTooltipElement().getText());
/* Visual comparison */
compareScreen("tooltipVisible");
diff --git a/uitest/src/test/java/com/vaadin/tests/components/layout/EmptySpaceOnPageAfterExpandedComponentTest.java b/uitest/src/test/java/com/vaadin/tests/components/layout/EmptySpaceOnPageAfterExpandedComponentTest.java
index 09d19034e6..e2d09f1773 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/layout/EmptySpaceOnPageAfterExpandedComponentTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/layout/EmptySpaceOnPageAfterExpandedComponentTest.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -25,19 +25,19 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test to make sure that there is no any empty space (in Google Chrome) on page
* after expanded component (#12672)
- *
+ *
* Layout:
- *
+ *
* [ Panel (auto x auto) [ Grid (auto x auto) ]
- *
+ *
* AnyComponent (100% x 100%)
- *
+ *
* <HERE SHOULD NOT BE ANY EMPTY SPACE> ]
- *
+ *
* @author Vaadin Ltd
*/
-public class EmptySpaceOnPageAfterExpandedComponentTest extends
- MultiBrowserTest {
+public class EmptySpaceOnPageAfterExpandedComponentTest
+ extends MultiBrowserTest {
@Test
public void testNoEmptySpaceOnPageAfterExpandedComponent() {
@@ -49,8 +49,8 @@ public class EmptySpaceOnPageAfterExpandedComponentTest extends
waitUntil(new ExpectedCondition<Boolean>() {
@Override
public Boolean apply(WebDriver input) {
- int expandedElementBottom = expandedElement.getLocation()
- .getY() + expandedElement.getSize().getHeight();
+ int expandedElementBottom = expandedElement.getLocation().getY()
+ + expandedElement.getSize().getHeight();
int containerElementBottom = containerElement.getLocation()
.getY() + containerElement.getSize().getHeight();
diff --git a/uitest/src/test/java/com/vaadin/tests/components/listselect/ListSelectAddRemoveItemsTest.java b/uitest/src/test/java/com/vaadin/tests/components/listselect/ListSelectAddRemoveItemsTest.java
index dd694995f1..bef940b060 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/listselect/ListSelectAddRemoveItemsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/listselect/ListSelectAddRemoveItemsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -53,8 +53,8 @@ public class ListSelectAddRemoveItemsTest extends SingleBrowserTest {
}
private void assertOptions(String... options) {
- Assert.assertEquals(Arrays.asList(options), $(ListSelectElement.class)
- .first().getOptions());
+ Assert.assertEquals(Arrays.asList(options),
+ $(ListSelectElement.class).first().getOptions());
}
private void click(String caption) {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/listselect/ListSelectNoDomRebuildTest.java b/uitest/src/test/java/com/vaadin/tests/components/listselect/ListSelectNoDomRebuildTest.java
index 97b475e092..7d3d6fc17e 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/listselect/ListSelectNoDomRebuildTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/listselect/ListSelectNoDomRebuildTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/listselect/ListSelectPushSelectionChangesTest.java b/uitest/src/test/java/com/vaadin/tests/components/listselect/ListSelectPushSelectionChangesTest.java
index a13482d175..8b8c1fa6ca 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/listselect/ListSelectPushSelectionChangesTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/listselect/ListSelectPushSelectionChangesTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,15 +28,15 @@ import com.vaadin.testbench.elements.ListSelectElement;
import com.vaadin.testbench.elements.OptionGroupElement;
import com.vaadin.tests.tb3.SingleBrowserTestPhantomJS2;
-public class ListSelectPushSelectionChangesTest extends
- SingleBrowserTestPhantomJS2 {
+public class ListSelectPushSelectionChangesTest
+ extends SingleBrowserTestPhantomJS2 {
@Test
public void testMultiSelectBehavior() {
openTestURL();
Assert.assertEquals(
- "Should have null item + 3 options in single selection mode",
- 4, getListSelect().getOptions().size());
+ "Should have null item + 3 options in single selection mode", 4,
+ getListSelect().getOptions().size());
$(OptionGroupElement.class).caption("Mode").first()
.selectByText("Multi");
@@ -124,7 +124,8 @@ public class ListSelectPushSelectionChangesTest extends
private List<WebElement> getSelectedOptions() {
ListSelectElement listSelect = getListSelect();
- Select select = new Select(listSelect.findElement(By.tagName("select")));
+ Select select = new Select(
+ listSelect.findElement(By.tagName("select")));
return select.getAllSelectedOptions();
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/menubar/MenuBarClickOpenedMenuTest.java b/uitest/src/test/java/com/vaadin/tests/components/menubar/MenuBarClickOpenedMenuTest.java
index 5f5e6c8abc..5c1aa847a5 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/menubar/MenuBarClickOpenedMenuTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/menubar/MenuBarClickOpenedMenuTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,7 +27,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
* Test for top level menu item which should close its sub-menus each time when
* it's clicked. Also it checks sub-menu item which should not close its
* sub-menus if they are opened on click.
- *
+ *
* @author Vaadin Ltd
*/
public class MenuBarClickOpenedMenuTest extends MultiBrowserTest {
@@ -75,7 +75,8 @@ public class MenuBarClickOpenedMenuTest extends MultiBrowserTest {
waitUntil(new ExpectedCondition<Boolean>() {
@Override
public Boolean apply(WebDriver input) {
- return isElementPresent(By.className(menuItemClassName)) == present;
+ return isElementPresent(
+ By.className(menuItemClassName)) == present;
}
@Override
diff --git a/uitest/src/test/java/com/vaadin/tests/components/menubar/MenuBarNavigationMouseTest.java b/uitest/src/test/java/com/vaadin/tests/components/menubar/MenuBarNavigationMouseTest.java
index a4f8023ea2..e105006a6c 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/menubar/MenuBarNavigationMouseTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/menubar/MenuBarNavigationMouseTest.java
@@ -10,8 +10,8 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
public class MenuBarNavigationMouseTest extends MultiBrowserTest {
@ServerClass("com.vaadin.ui.MenuBar")
- public static class MenuBarElement extends
- com.vaadin.testbench.elements.MenuBarElement {
+ public static class MenuBarElement
+ extends com.vaadin.testbench.elements.MenuBarElement {
public void openMenuPath(String... captions) {
for (String c : captions) {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/menubar/MenuBarSubmenusClosingValoTest.java b/uitest/src/test/java/com/vaadin/tests/components/menubar/MenuBarSubmenusClosingValoTest.java
index b7ed88c9ca..ea8c2c2e7e 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/menubar/MenuBarSubmenusClosingValoTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/menubar/MenuBarSubmenusClosingValoTest.java
@@ -55,8 +55,8 @@ public class MenuBarSubmenusClosingValoTest extends MultiBrowserTest {
Mouse mouse = ((HasInputDevices) getDriver()).getMouse();
- List<WebElement> menuItemList = driver.findElements(By
- .className("v-menubar-menuitem"));
+ List<WebElement> menuItemList = driver
+ .findElements(By.className("v-menubar-menuitem"));
mouse.click(((Locatable) menuItemList.get(0)).getCoordinates());
waitForElementPresent(By.className("v-menubar-popup"));
diff --git a/uitest/src/test/java/com/vaadin/tests/components/menubar/MenuBarTooltipsNearEdgeTest.java b/uitest/src/test/java/com/vaadin/tests/components/menubar/MenuBarTooltipsNearEdgeTest.java
index a460290ee0..56689a6284 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/menubar/MenuBarTooltipsNearEdgeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/menubar/MenuBarTooltipsNearEdgeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -34,7 +34,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test to see if tooltips will render in the correct locations near the edges.
- *
+ *
* @author Vaadin Ltd
*/
public class MenuBarTooltipsNearEdgeTest extends MultiBrowserTest {
@@ -54,7 +54,7 @@ public class MenuBarTooltipsNearEdgeTest extends MultiBrowserTest {
mouse.click(menuLocation);
mouse.mouseMove(menuLocation, 5, -40);
WebElement tooltip = getTooltipElement();
- assertThat(tooltip.getLocation().x, is(lessThan(menuLocation.onPage().x
- - tooltip.getSize().getWidth())));
+ assertThat(tooltip.getLocation().x, is(lessThan(
+ menuLocation.onPage().x - tooltip.getSize().getWidth())));
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/menubar/MenuBarsWithNestingTest.java b/uitest/src/test/java/com/vaadin/tests/components/menubar/MenuBarsWithNestingTest.java
index 4c3383c5d6..b9d2ff22e7 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/menubar/MenuBarsWithNestingTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/menubar/MenuBarsWithNestingTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,7 +31,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* This class tests the method VMenuBar.getSubPartElement(String) by using
* Vaadin locators for finding the items of a MenuBar.
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -53,8 +53,8 @@ public class MenuBarsWithNestingTest extends MultiBrowserTest {
fileMenu.click();
WebElement exportMenu = fileMenu.findElement(By.vaadin("#Export.."));
exportMenu.click();
- waitUntil(ExpectedConditions.visibilityOfElementLocated(By
- .xpath(".//*[text() = 'As PDF...']")));
+ waitUntil(ExpectedConditions.visibilityOfElementLocated(
+ By.xpath(".//*[text() = 'As PDF...']")));
}
@Test
@@ -72,8 +72,8 @@ public class MenuBarsWithNestingTest extends MultiBrowserTest {
public void testNestedMenuWithIcons() throws InterruptedException {
String selection = itemNames[itemNames.length - 1];
for (String itemName : nestedItemnames) {
- WebElement lastMenuItem = secondMenuBar.findElement(By.vaadin("#"
- + selection));
+ WebElement lastMenuItem = secondMenuBar
+ .findElement(By.vaadin("#" + selection));
lastMenuItem.click();
lastMenuItem.findElement(By.vaadin("#" + itemName)).click();
waitUntil(ExpectedConditions.textToBePresentInElement(
diff --git a/uitest/src/test/java/com/vaadin/tests/components/menubar/MenuItemStyleRemovedTest.java b/uitest/src/test/java/com/vaadin/tests/components/menubar/MenuItemStyleRemovedTest.java
index e25aa664cd..24a7fb21bb 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/menubar/MenuItemStyleRemovedTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/menubar/MenuItemStyleRemovedTest.java
@@ -19,8 +19,8 @@ public class MenuItemStyleRemovedTest extends MultiBrowserTest {
$(ButtonElement.class).caption("Add styles").first().click();
MenuBarElement menu = $(MenuBarElement.class).first();
- List<WebElement> elements = menu.findElements(By
- .className("custom-menu-item"));
+ List<WebElement> elements = menu
+ .findElements(By.className("custom-menu-item"));
Assert.assertEquals(2, elements.size());
menu.clickItem("first");
diff --git a/uitest/src/test/java/com/vaadin/tests/components/menubar/MenuTooltipTest.java b/uitest/src/test/java/com/vaadin/tests/components/menubar/MenuTooltipTest.java
index 091f7be954..6bdf98eca9 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/menubar/MenuTooltipTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/menubar/MenuTooltipTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -33,7 +33,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test to see if tooltips on menu items obscure other items on the menu.
- *
+ *
* @author Vaadin Ltd
*/
public class MenuTooltipTest extends MultiBrowserTest {
@@ -47,8 +47,8 @@ public class MenuTooltipTest extends MultiBrowserTest {
public void testToolTipDelay() throws InterruptedException {
openTestURL();
- Coordinates elementCoordinates = getCoordinates($(MenuBarElement.class)
- .first());
+ Coordinates elementCoordinates = getCoordinates(
+ $(MenuBarElement.class).first());
sleep(1000);
Mouse mouse = ((HasInputDevices) getDriver()).getMouse();
diff --git a/uitest/src/test/java/com/vaadin/tests/components/menubar/SpaceMenuBarNavigationTest.java b/uitest/src/test/java/com/vaadin/tests/components/menubar/SpaceMenuBarNavigationTest.java
index a32a611d9a..8756c715c0 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/menubar/SpaceMenuBarNavigationTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/menubar/SpaceMenuBarNavigationTest.java
@@ -42,8 +42,8 @@ public class SpaceMenuBarNavigationTest extends MultiBrowserTest {
menu.sendKeys(Keys.ARROW_RIGHT);
menu.sendKeys(Keys.ENTER);
- List<WebElement> captions = driver.findElements(By
- .className("v-menubar-menuitem-caption"));
+ List<WebElement> captions = driver
+ .findElements(By.className("v-menubar-menuitem-caption"));
boolean found = false;
for (WebElement caption : captions) {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/nativebutton/NativeButtonClickTest.java b/uitest/src/test/java/com/vaadin/tests/components/nativebutton/NativeButtonClickTest.java
index cab2acefff..267717f784 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/nativebutton/NativeButtonClickTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/nativebutton/NativeButtonClickTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,14 +25,14 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test to see if coordinates returned by click event on NativeButtons look
* good. (see #14022)
- *
+ *
* @author Vaadin Ltd
*/
public class NativeButtonClickTest extends MultiBrowserTest {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.tb3.MultiBrowserTest#getBrowsersToTest()
*/
diff --git a/uitest/src/test/java/com/vaadin/tests/components/nativebutton/NativeButtonIconAndTextTest.java b/uitest/src/test/java/com/vaadin/tests/components/nativebutton/NativeButtonIconAndTextTest.java
index 37987171d2..68741dd3c1 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/nativebutton/NativeButtonIconAndTextTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/nativebutton/NativeButtonIconAndTextTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -70,7 +70,7 @@ public class NativeButtonIconAndTextTest extends MultiBrowserTest {
* If the button identified by 'buttonId' has an icon, asserts that the
* alternate text of the icon matches 'expected'. "" and null are considered
* equivalent.
- *
+ *
* @param buttonId
* the id of the button who possibly contains an icon
* @param expected
diff --git a/uitest/src/test/java/com/vaadin/tests/components/nativeselect/NativeSelectsAndChromeKeyboardNavigationTest.java b/uitest/src/test/java/com/vaadin/tests/components/nativeselect/NativeSelectsAndChromeKeyboardNavigationTest.java
index 4e23db8eb7..cd860fcea9 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/nativeselect/NativeSelectsAndChromeKeyboardNavigationTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/nativeselect/NativeSelectsAndChromeKeyboardNavigationTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,8 +28,8 @@ import org.openqa.selenium.remote.DesiredCapabilities;
import com.vaadin.testbench.parallel.Browser;
import com.vaadin.tests.tb3.MultiBrowserTest;
-public class NativeSelectsAndChromeKeyboardNavigationTest extends
- MultiBrowserTest {
+public class NativeSelectsAndChromeKeyboardNavigationTest
+ extends MultiBrowserTest {
@Override
public List<DesiredCapabilities> getBrowsersToTest() {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/nativeselect/NativeSelectsFocusAndBlurListenerTests.java b/uitest/src/test/java/com/vaadin/tests/components/nativeselect/NativeSelectsFocusAndBlurListenerTests.java
index 194b1bb64b..9f0ab83cf8 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/nativeselect/NativeSelectsFocusAndBlurListenerTests.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/nativeselect/NativeSelectsFocusAndBlurListenerTests.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/notification/MiddleNotificationPositionTest.java b/uitest/src/test/java/com/vaadin/tests/components/notification/MiddleNotificationPositionTest.java
index dc43b9d19a..d20baaf764 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/notification/MiddleNotificationPositionTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/notification/MiddleNotificationPositionTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Unit test class for Notification with middle left and middle right positions.
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
@@ -35,12 +35,12 @@ public class MiddleNotificationPositionTest extends MultiBrowserTest {
public void testMiddleLeft() {
openTestURL();
- WebElement webElement = driver.findElement(By
- .className("show-middle-left"));
+ WebElement webElement = driver
+ .findElement(By.className("show-middle-left"));
webElement.click();
- WebElement notification = driver.findElement(By
- .className("v-Notification"));
+ WebElement notification = driver
+ .findElement(By.className("v-Notification"));
Assert.assertNotNull(notification);
String left = notification.getCssValue("left");
@@ -65,12 +65,12 @@ public class MiddleNotificationPositionTest extends MultiBrowserTest {
public void testMiddleRight() {
openTestURL();
- WebElement webElement = driver.findElement(By
- .className("show-middle-right"));
+ WebElement webElement = driver
+ .findElement(By.className("show-middle-right"));
webElement.click();
- WebElement notification = driver.findElement(By
- .className("v-Notification"));
+ WebElement notification = driver
+ .findElement(By.className("v-Notification"));
Assert.assertNotNull(notification);
String right = notification.getCssValue("right");
diff --git a/uitest/src/test/java/com/vaadin/tests/components/notification/NotificationDelayTest.java b/uitest/src/test/java/com/vaadin/tests/components/notification/NotificationDelayTest.java
index 903c3440cc..3dcfdc87ff 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/notification/NotificationDelayTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/notification/NotificationDelayTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import org.openqa.selenium.support.ui.ExpectedCondition;
/**
* Test to check notification delay.
- *
+ *
* @author Vaadin Ltd
*/
public class NotificationDelayTest extends MultiBrowserTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/notification/NotificationsWaiAriaTest.java b/uitest/src/test/java/com/vaadin/tests/components/notification/NotificationsWaiAriaTest.java
index 33ba8d1df0..a6434c2a3c 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/notification/NotificationsWaiAriaTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/notification/NotificationsWaiAriaTest.java
@@ -31,7 +31,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Unit test class for Notification ARIA (Accessible Rich Internet Applications)
* roles.
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
@@ -39,7 +39,7 @@ public class NotificationsWaiAriaTest extends MultiBrowserTest {
/**
* Checks if the ARIA roles are correctly applied to Notification.
- *
+ *
* @since 7.2
* @throws Exception
*/
@@ -58,8 +58,8 @@ public class NotificationsWaiAriaTest extends MultiBrowserTest {
postfix.clear();
postfix.sendKeys("- press ESC to close");
- type.selectByText(StringToEnumConverter.enumToString(
- NotificationRole.ALERT, null));
+ type.selectByText(StringToEnumConverter
+ .enumToString(NotificationRole.ALERT, null));
show.click();
waitForElementPresent(By.className("v-Notification"));
@@ -67,23 +67,24 @@ public class NotificationsWaiAriaTest extends MultiBrowserTest {
NotificationElement notification = $(NotificationElement.class).first();
String text = notification.getAttribute("role");
- Assert.assertTrue("Expected attribute 'role' to equal 'alert', found "
- + text, text.equals("alert"));
+ Assert.assertTrue(
+ "Expected attribute 'role' to equal 'alert', found " + text,
+ text.equals("alert"));
- text = getHiddenText(notification.findElements(
- By.className("v-assistive-device-only")).get(0));
+ text = getHiddenText(notification
+ .findElements(By.className("v-assistive-device-only")).get(0));
Assert.assertTrue("Expected 'Prefix:', found " + text,
text.equals("Prefix:"));
- text = getHiddenText(notification.findElements(
- By.className("v-assistive-device-only")).get(1));
+ text = getHiddenText(notification
+ .findElements(By.className("v-assistive-device-only")).get(1));
Assert.assertTrue("Expected '- press ESC to close', found " + text,
text.equals("- press ESC to close"));
notification.close();
- type.selectByText(StringToEnumConverter.enumToString(
- NotificationRole.STATUS, null));
+ type.selectByText(StringToEnumConverter
+ .enumToString(NotificationRole.STATUS, null));
show.click();
waitForElementPresent(By.className("v-Notification"));
@@ -91,8 +92,9 @@ public class NotificationsWaiAriaTest extends MultiBrowserTest {
notification = $(NotificationElement.class).first();
text = notification.getAttribute("role");
- Assert.assertTrue("Expected attribute 'role' to equal 'status', found "
- + text, text.equals("status"));
+ Assert.assertTrue(
+ "Expected attribute 'role' to equal 'status', found " + text,
+ text.equals("status"));
notification.close();
@@ -104,9 +106,8 @@ public class NotificationsWaiAriaTest extends MultiBrowserTest {
WebElement element;
try {
- element = getDriver()
- .findElement(
- By.vaadin("Root/VNotification[0]/domChild[0]/domChild[0]/domChild[1]"));
+ element = getDriver().findElement(By.vaadin(
+ "Root/VNotification[0]/domChild[0]/domChild[0]/domChild[1]"));
} catch (Exception e) {
element = null;
}
@@ -117,7 +118,7 @@ public class NotificationsWaiAriaTest extends MultiBrowserTest {
}
private String getHiddenText(WebElement element) {
- return (String) getTestBenchCommandExecutor().executeScript(
- "return arguments[0].innerHTML", element);
+ return (String) getTestBenchCommandExecutor()
+ .executeScript("return arguments[0].innerHTML", element);
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/optiongroup/ReadOnlyOptionGroupTest.java b/uitest/src/test/java/com/vaadin/tests/components/optiongroup/ReadOnlyOptionGroupTest.java
index 090286b1ad..98bdc0dff8 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/optiongroup/ReadOnlyOptionGroupTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/optiongroup/ReadOnlyOptionGroupTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test for Option group (with new items allowed): unset read only state.
- *
+ *
* @author Vaadin Ltd
*/
public class ReadOnlyOptionGroupTest extends MultiBrowserTest {
@@ -40,8 +40,9 @@ public class ReadOnlyOptionGroupTest extends MultiBrowserTest {
assertNoErrorNotifications();
- Assert.assertFalse("Radio button in option group is still disabled "
- + "after unset reaonly",
+ Assert.assertFalse(
+ "Radio button in option group is still disabled "
+ + "after unset reaonly",
isElementPresent(By.className("v-radiobutton-disabled")));
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/orderedlayout/CaptionLeakTest.java b/uitest/src/test/java/com/vaadin/tests/components/orderedlayout/CaptionLeakTest.java
index 9bb53d8742..35e6111ca0 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/orderedlayout/CaptionLeakTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/orderedlayout/CaptionLeakTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -75,8 +75,7 @@ public class CaptionLeakTest extends MultiBrowserTest {
}
private void checkConnectorCount() {
- getDriver()
- .findElement(
- By.xpath("//span[text() = 'Measured 3 non connector elements']"));
+ getDriver().findElement(By
+ .xpath("//span[text() = 'Measured 3 non connector elements']"));
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/orderedlayout/ErrorIndicatorTest.java b/uitest/src/test/java/com/vaadin/tests/components/orderedlayout/ErrorIndicatorTest.java
index e784eb3b64..1e483fa919 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/orderedlayout/ErrorIndicatorTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/orderedlayout/ErrorIndicatorTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/orderedlayout/HorizontalLayoutFullsizeContentWithErrorMsgTest.java b/uitest/src/test/java/com/vaadin/tests/components/orderedlayout/HorizontalLayoutFullsizeContentWithErrorMsgTest.java
index ea78d9f30c..12794b6058 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/orderedlayout/HorizontalLayoutFullsizeContentWithErrorMsgTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/orderedlayout/HorizontalLayoutFullsizeContentWithErrorMsgTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,8 +23,8 @@ import org.openqa.selenium.WebElement;
import com.vaadin.tests.tb3.MultiBrowserTest;
-public class HorizontalLayoutFullsizeContentWithErrorMsgTest extends
- MultiBrowserTest {
+public class HorizontalLayoutFullsizeContentWithErrorMsgTest
+ extends MultiBrowserTest {
@Test
public void test() {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/orderedlayout/NestedLayoutCaptionHoverTest.java b/uitest/src/test/java/com/vaadin/tests/components/orderedlayout/NestedLayoutCaptionHoverTest.java
index 1cddbc28c3..1ee48bf1ca 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/orderedlayout/NestedLayoutCaptionHoverTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/orderedlayout/NestedLayoutCaptionHoverTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -38,8 +38,8 @@ public class NestedLayoutCaptionHoverTest extends MultiBrowserTest {
public void testTooltipInNestedLayout() throws Exception {
openTestURL();
- WebElement caption = getDriver().findElement(
- By.className("v-captiontext"));
+ WebElement caption = getDriver()
+ .findElement(By.className("v-captiontext"));
assertEquals("inner layout", caption.getText());
diff --git a/uitest/src/test/java/com/vaadin/tests/components/orderedlayout/OrderedLayoutInfiniteLayoutPassesTest.java b/uitest/src/test/java/com/vaadin/tests/components/orderedlayout/OrderedLayoutInfiniteLayoutPassesTest.java
index 1a2a9cbedf..81c386d28a 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/orderedlayout/OrderedLayoutInfiniteLayoutPassesTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/orderedlayout/OrderedLayoutInfiniteLayoutPassesTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/orderedlayout/SpacingLeakTest.java b/uitest/src/test/java/com/vaadin/tests/components/orderedlayout/SpacingLeakTest.java
index 565c11c1f0..d3e4e6ea95 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/orderedlayout/SpacingLeakTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/orderedlayout/SpacingLeakTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -33,8 +33,7 @@ public class SpacingLeakTest extends MultiBrowserTest {
getDriver().findElement(By.id("removebutton")).click();
// this should be present
- getDriver()
- .findElement(
- By.xpath("//span[text() = 'Measured 0 non connector elements']"));
+ getDriver().findElement(By
+ .xpath("//span[text() = 'Measured 0 non connector elements']"));
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/orderedlayout/TooltipOnRequiredIndicatorTest.java b/uitest/src/test/java/com/vaadin/tests/components/orderedlayout/TooltipOnRequiredIndicatorTest.java
index 815c00bfac..e826385adb 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/orderedlayout/TooltipOnRequiredIndicatorTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/orderedlayout/TooltipOnRequiredIndicatorTest.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -32,8 +32,8 @@ public class TooltipOnRequiredIndicatorTest extends TooltipTest {
// caption
checkTooltip(
- $(VerticalLayoutElement.class).get(1).findElement(
- By.className("v-captiontext")),
+ $(VerticalLayoutElement.class).get(1)
+ .findElement(By.className("v-captiontext")),
"Vertical layout tooltip");
// required indicator
checkTooltip(By.className("v-required-field-indicator"),
@@ -41,8 +41,8 @@ public class TooltipOnRequiredIndicatorTest extends TooltipTest {
// caption
checkTooltip(
- $(HorizontalLayoutElement.class).first().findElement(
- By.className("v-captiontext")),
+ $(HorizontalLayoutElement.class).first()
+ .findElement(By.className("v-captiontext")),
"Horizontal layout tooltip");
// required indicator
checkTooltip(
diff --git a/uitest/src/test/java/com/vaadin/tests/components/orderedlayout/VerticalLayoutFocusWithDOMChangesTest.java b/uitest/src/test/java/com/vaadin/tests/components/orderedlayout/VerticalLayoutFocusWithDOMChangesTest.java
index 0890414fea..81bc49ec72 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/orderedlayout/VerticalLayoutFocusWithDOMChangesTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/orderedlayout/VerticalLayoutFocusWithDOMChangesTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -35,8 +35,8 @@ public class VerticalLayoutFocusWithDOMChangesTest extends MultiBrowserTest {
@Test
public void inputTextAndChangeFocus() throws InterruptedException {
openTestURL();
- List<WebElement> textFields = getDriver().findElements(
- By.tagName("input"));
+ List<WebElement> textFields = getDriver()
+ .findElements(By.tagName("input"));
WebElement tf1 = textFields.get(0);
WebElement tf2 = textFields.get(1);
tf1.sendKeys(initialText);
@@ -69,8 +69,8 @@ public class VerticalLayoutFocusWithDOMChangesTest extends MultiBrowserTest {
@Test
public void moveFocusAndChangeFieldWithValue() {
openTestURL();
- List<WebElement> textFields = getDriver().findElements(
- By.tagName("input"));
+ List<WebElement> textFields = getDriver()
+ .findElements(By.tagName("input"));
WebElement tf1 = textFields.get(0);
WebElement tf2 = textFields.get(1);
diff --git a/uitest/src/test/java/com/vaadin/tests/components/page/PageTitleTest.java b/uitest/src/test/java/com/vaadin/tests/components/page/PageTitleTest.java
index bc2e6f7ca1..7abb38ea48 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/page/PageTitleTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/page/PageTitleTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/panel/PanelChangeContentsTest.java b/uitest/src/test/java/com/vaadin/tests/components/panel/PanelChangeContentsTest.java
index 039b054040..beb9e73e6d 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/panel/PanelChangeContentsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/panel/PanelChangeContentsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,27 +27,24 @@ public class PanelChangeContentsTest extends MultiBrowserTest {
setPush(true);
openTestURL();
- Assert.assertEquals(
- "stats",
+ Assert.assertEquals("stats",
vaadinElement(
"/VVerticalLayout[0]/Slot[1]/VPanel[0]/VVerticalLayout[0]/Slot[0]/VLabel[0]")
- .getText());
+ .getText());
vaadinElement(
"/VVerticalLayout[0]/Slot[0]/VHorizontalLayout[0]/Slot[1]/VButton[0]/domChild[0]/domChild[0]")
- .click();
- Assert.assertEquals(
- "companies",
+ .click();
+ Assert.assertEquals("companies",
vaadinElement(
"/VVerticalLayout[0]/Slot[1]/VPanel[0]/VVerticalLayout[0]/Slot[0]/VLabel[0]")
- .getText());
+ .getText());
vaadinElement(
"/VVerticalLayout[0]/Slot[0]/VHorizontalLayout[0]/Slot[0]/VButton[0]/domChild[0]/domChild[0]")
- .click();
- Assert.assertEquals(
- "stats",
+ .click();
+ Assert.assertEquals("stats",
vaadinElement(
"/VVerticalLayout[0]/Slot[1]/VPanel[0]/VVerticalLayout[0]/Slot[0]/VLabel[0]")
- .getText());
+ .getText());
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/panel/PanelRemoveShortcutListenerTest.java b/uitest/src/test/java/com/vaadin/tests/components/panel/PanelRemoveShortcutListenerTest.java
index 872abe9191..bfcf620310 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/panel/PanelRemoveShortcutListenerTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/panel/PanelRemoveShortcutListenerTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -35,7 +35,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test for removing a shortcut listener from Panel.
- *
+ *
* @author Vaadin Ltd
*/
public class PanelRemoveShortcutListenerTest extends MultiBrowserTest {
@@ -63,8 +63,9 @@ public class PanelRemoveShortcutListenerTest extends MultiBrowserTest {
@Test
public void testToggleWithShortcut() {
- assertThat(panel.findElement(By.className("v-panel-caption"))
- .findElement(By.tagName("span")).getText(),
+ assertThat(
+ panel.findElement(By.className("v-panel-caption"))
+ .findElement(By.tagName("span")).getText(),
is("No shortcut effects (press 'A')"));
attemptShortcut("A on");
diff --git a/uitest/src/test/java/com/vaadin/tests/components/panel/UndefinedSizeScrollbarsTest.java b/uitest/src/test/java/com/vaadin/tests/components/panel/UndefinedSizeScrollbarsTest.java
index c055356624..65a4942a0f 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/panel/UndefinedSizeScrollbarsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/panel/UndefinedSizeScrollbarsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/popupview/PopupViewAndFragmentTest.java b/uitest/src/test/java/com/vaadin/tests/components/popupview/PopupViewAndFragmentTest.java
index 510cc7c883..51524a6c9b 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/popupview/PopupViewAndFragmentTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/popupview/PopupViewAndFragmentTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/popupview/PopupViewCaptionTest.java b/uitest/src/test/java/com/vaadin/tests/components/popupview/PopupViewCaptionTest.java
index f9b1692b85..120fb8bfa7 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/popupview/PopupViewCaptionTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/popupview/PopupViewCaptionTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.testbench.By;
import com.vaadin.tests.tb3.MultiBrowserTest;
/**
- *
+ *
* @author Vaadin Ltd
*/
public class PopupViewCaptionTest extends MultiBrowserTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/popupview/PopupViewResizeWhileOpenTest.java b/uitest/src/test/java/com/vaadin/tests/components/popupview/PopupViewResizeWhileOpenTest.java
index aafd310b70..4d0dece121 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/popupview/PopupViewResizeWhileOpenTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/popupview/PopupViewResizeWhileOpenTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -37,7 +37,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Resizing PopupView's popup component while it is visible should also resize
* the drop shadow of the overlay.
- *
+ *
* @author Vaadin Ltd
*/
public class PopupViewResizeWhileOpenTest extends MultiBrowserTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/popupview/PopupViewShortcutActionHandlerTest.java b/uitest/src/test/java/com/vaadin/tests/components/popupview/PopupViewShortcutActionHandlerTest.java
index 6155820990..e1786efd44 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/popupview/PopupViewShortcutActionHandlerTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/popupview/PopupViewShortcutActionHandlerTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Check availability of shortcut action listener in the popup view.
- *
+ *
* @author Vaadin Ltd
*/
public class PopupViewShortcutActionHandlerTest extends MultiBrowserTest {
@@ -44,8 +44,8 @@ public class PopupViewShortcutActionHandlerTest extends MultiBrowserTest {
openTestURL();
getDriver().findElement(By.className("v-popupview")).click();
- WebElement textField = getDriver().findElement(
- By.className("v-textfield"));
+ WebElement textField = getDriver()
+ .findElement(By.className("v-textfield"));
textField.sendKeys("a", Keys.ENTER);
Assert.assertTrue(
diff --git a/uitest/src/test/java/com/vaadin/tests/components/popupview/PopupViewWithExtensionTest.java b/uitest/src/test/java/com/vaadin/tests/components/popupview/PopupViewWithExtensionTest.java
index 073fd321e5..40880f7eb8 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/popupview/PopupViewWithExtensionTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/popupview/PopupViewWithExtensionTest.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -23,7 +23,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Popup view with extension should not throw an exception.
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
diff --git a/uitest/src/test/java/com/vaadin/tests/components/progressindicator/ProgressBarStaticReindeerTest.java b/uitest/src/test/java/com/vaadin/tests/components/progressindicator/ProgressBarStaticReindeerTest.java
index f1056a640d..310f2bbcb8 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/progressindicator/ProgressBarStaticReindeerTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/progressindicator/ProgressBarStaticReindeerTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/progressindicator/ProgressBarStaticRunoTest.java b/uitest/src/test/java/com/vaadin/tests/components/progressindicator/ProgressBarStaticRunoTest.java
index 751e048694..aebf75ac16 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/progressindicator/ProgressBarStaticRunoTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/progressindicator/ProgressBarStaticRunoTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/richtextarea/RichTextAreaRelativeHeightResizeTest.java b/uitest/src/test/java/com/vaadin/tests/components/richtextarea/RichTextAreaRelativeHeightResizeTest.java
index 5c31ce4dc7..afdbe7904d 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/richtextarea/RichTextAreaRelativeHeightResizeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/richtextarea/RichTextAreaRelativeHeightResizeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,8 +31,8 @@ public class RichTextAreaRelativeHeightResizeTest extends MultiBrowserTest {
.findElement(By.cssSelector(".v-richtextarea")).getSize()
.getHeight();
int originalEditorHeight = driver
- .findElement(By.cssSelector(".v-richtextarea iframe"))
- .getSize().getHeight();
+ .findElement(By.cssSelector(".v-richtextarea iframe")).getSize()
+ .getHeight();
// Increase the component height
driver.findElement(By.cssSelector(".v-button")).click();
@@ -40,8 +40,8 @@ public class RichTextAreaRelativeHeightResizeTest extends MultiBrowserTest {
int newHeight = driver.findElement(By.cssSelector(".v-richtextarea"))
.getSize().getHeight();
int newEditorHeight = driver
- .findElement(By.cssSelector(".v-richtextarea iframe"))
- .getSize().getHeight();
+ .findElement(By.cssSelector(".v-richtextarea iframe")).getSize()
+ .getHeight();
// Check that the component height changed and that the editor height
// changed equally as much
@@ -49,7 +49,7 @@ public class RichTextAreaRelativeHeightResizeTest extends MultiBrowserTest {
newHeight != originalHeight);
Assert.assertEquals(
"Editor height change didn't match the Component height change",
- newHeight - originalHeight, newEditorHeight
- - originalEditorHeight);
+ newHeight - originalHeight,
+ newEditorHeight - originalEditorHeight);
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/select/EnumSelectTest.java b/uitest/src/test/java/com/vaadin/tests/components/select/EnumSelectTest.java
index c0429baa31..9669f82ae2 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/select/EnumSelectTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/select/EnumSelectTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -55,7 +55,7 @@ public class EnumSelectTest extends SingleBrowserTest {
List<String> options = cb.getPopupSuggestions();
Assert.assertEquals("Only one item should match filter", 1,
options.size());
- Assert.assertEquals("Invalid option matched filter",
- "Some other value", options.get(0));
+ Assert.assertEquals("Invalid option matched filter", "Some other value",
+ options.get(0));
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/select/SelectWithIntegersTest.java b/uitest/src/test/java/com/vaadin/tests/components/select/SelectWithIntegersTest.java
index bbef30bf1d..6f688961b3 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/select/SelectWithIntegersTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/select/SelectWithIntegersTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,10 +26,10 @@ public class SelectWithIntegersTest extends SingleBrowserTest {
public void testSelectWithIntegers() {
openTestURL();
- ListSelectElement defaultSelect = $(ListSelectElement.class).caption(
- "Default").first();
- ListSelectElement toStringSelect = $(ListSelectElement.class).caption(
- "ID_TOSTRING").first();
+ ListSelectElement defaultSelect = $(ListSelectElement.class)
+ .caption("Default").first();
+ ListSelectElement toStringSelect = $(ListSelectElement.class)
+ .caption("ID_TOSTRING").first();
Assert.assertEquals("2,014", defaultSelect.getOptions().get(0));
Assert.assertEquals("2014", toStringSelect.getOptions().get(0));
diff --git a/uitest/src/test/java/com/vaadin/tests/components/slider/HiddenSliderHandleTest.java b/uitest/src/test/java/com/vaadin/tests/components/slider/HiddenSliderHandleTest.java
index 3717f7f754..43c7b1574d 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/slider/HiddenSliderHandleTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/slider/HiddenSliderHandleTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/slider/SliderDisableTest.java b/uitest/src/test/java/com/vaadin/tests/components/slider/SliderDisableTest.java
index 12d26b8f8f..5a8bb02b34 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/slider/SliderDisableTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/slider/SliderDisableTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -52,7 +52,8 @@ public class SliderDisableTest extends MultiBrowserTest {
}
private void moveSlider(int offset) {
- WebElement element = vaadinElement("/VVerticalLayout[0]/Slot[0]/VSlider[0]/domChild[2]/domChild[0]");
+ WebElement element = vaadinElement(
+ "/VVerticalLayout[0]/Slot[0]/VSlider[0]/domChild[2]/domChild[0]");
new Actions(driver).dragAndDropBy(element, offset, 0).perform();
testBench().waitForVaadin();
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/slider/SliderFeedbackTest.java b/uitest/src/test/java/com/vaadin/tests/components/slider/SliderFeedbackTest.java
index 86bc351480..1b1de1535f 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/slider/SliderFeedbackTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/slider/SliderFeedbackTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,8 +32,8 @@ public class SliderFeedbackTest extends MultiBrowserTest {
new Actions(driver).dragAndDropBy(handle, 400, 0).perform();
testBench().waitForVaadin();
- double value = Double.valueOf(findElement(
- By.className("v-slider-feedback")).getText());
+ double value = Double.valueOf(
+ findElement(By.className("v-slider-feedback")).getText());
// Allow for some tolerance due to, you guessed it, IE8
assertLessThan("Unexpected feedback value {1} < {0}", 505000000000.0,
diff --git a/uitest/src/test/java/com/vaadin/tests/components/slider/SliderResizeTest.java b/uitest/src/test/java/com/vaadin/tests/components/slider/SliderResizeTest.java
index 22df3e4211..b57661e983 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/slider/SliderResizeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/slider/SliderResizeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/splitpanel/GridLayoutWithCheckboxTest.java b/uitest/src/test/java/com/vaadin/tests/components/splitpanel/GridLayoutWithCheckboxTest.java
index fee46c155a..9e638cbea1 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/splitpanel/GridLayoutWithCheckboxTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/splitpanel/GridLayoutWithCheckboxTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/splitpanel/HorizontalSplitPanelHeightTest.java b/uitest/src/test/java/com/vaadin/tests/components/splitpanel/HorizontalSplitPanelHeightTest.java
index 0ceca66dd3..cfde16003c 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/splitpanel/HorizontalSplitPanelHeightTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/splitpanel/HorizontalSplitPanelHeightTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test for horizontal split panel height in case when only second component is
* set.
- *
+ *
* @author Vaadin Ltd
*/
public class HorizontalSplitPanelHeightTest extends MultiBrowserTest {
@@ -60,11 +60,12 @@ public class HorizontalSplitPanelHeightTest extends MultiBrowserTest {
private void testSplitPanel(String id) {
WebElement splitPanel = findElement(By.id(id));
WebElement label = splitPanel.findElement(By.className("target"));
- Assert.assertTrue(id + ": split panel height ("
- + splitPanel.getSize().getHeight() + ") is less than "
- + "height of second component (" + label.getSize().getHeight()
- + ")", splitPanel.getSize().getHeight() >= label.getSize()
- .getHeight());
+ Assert.assertTrue(
+ id + ": split panel height (" + splitPanel.getSize().getHeight()
+ + ") is less than " + "height of second component ("
+ + label.getSize().getHeight() + ")",
+ splitPanel.getSize().getHeight() >= label.getSize()
+ .getHeight());
Assert.assertEquals("Label text in the second panel is not visible",
"Label", label.getText());
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/splitpanel/SplitPanelDuplicateStyleNameTest.java b/uitest/src/test/java/com/vaadin/tests/components/splitpanel/SplitPanelDuplicateStyleNameTest.java
index 8a142ac2e1..3934115155 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/splitpanel/SplitPanelDuplicateStyleNameTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/splitpanel/SplitPanelDuplicateStyleNameTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,7 +27,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test for duplicate primary style name in SplitPanel.
- *
+ *
* @author Vaadin Ltd
*/
public class SplitPanelDuplicateStyleNameTest extends MultiBrowserTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/splitpanel/SplitPanelMoveComponentTest.java b/uitest/src/test/java/com/vaadin/tests/components/splitpanel/SplitPanelMoveComponentTest.java
index 1bf5212185..8fe71c4623 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/splitpanel/SplitPanelMoveComponentTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/splitpanel/SplitPanelMoveComponentTest.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -37,19 +37,17 @@ public class SplitPanelMoveComponentTest extends MultiBrowserTest {
}
private WebElement getFirstChild() {
- WebElement container = getDriver()
- .findElement(
- By.xpath("//div[contains(@class,'v-splitpanel-first-container')]"));
- return container.findElement(By
- .xpath("//div[contains(@class, 'v-button')]"));
+ WebElement container = getDriver().findElement(By.xpath(
+ "//div[contains(@class,'v-splitpanel-first-container')]"));
+ return container
+ .findElement(By.xpath("//div[contains(@class, 'v-button')]"));
}
private WebElement getSecondChild() {
- WebElement container = getDriver()
- .findElement(
- By.xpath("//div[contains(@class,'v-splitpanel-second-container')]"));
- return container.findElement(By
- .xpath("//div[contains(@class, 'v-button')]"));
+ WebElement container = getDriver().findElement(By.xpath(
+ "//div[contains(@class,'v-splitpanel-second-container')]"));
+ return container
+ .findElement(By.xpath("//div[contains(@class, 'v-button')]"));
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/splitpanel/SplitPanelStyleLeakTest.java b/uitest/src/test/java/com/vaadin/tests/components/splitpanel/SplitPanelStyleLeakTest.java
index 1ad9cdb461..8fd1bf6342 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/splitpanel/SplitPanelStyleLeakTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/splitpanel/SplitPanelStyleLeakTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/splitpanel/SplitPanelWithMinimumAndMaximumTest.java b/uitest/src/test/java/com/vaadin/tests/components/splitpanel/SplitPanelWithMinimumAndMaximumTest.java
index b8592e1bd8..8080f2f78c 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/splitpanel/SplitPanelWithMinimumAndMaximumTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/splitpanel/SplitPanelWithMinimumAndMaximumTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,7 +31,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test for {@link SplitPositionChangeListeners}.
- *
+ *
* @author Vaadin Ltd
*/
public class SplitPanelWithMinimumAndMaximumTest extends MultiBrowserTest {
@@ -65,9 +65,11 @@ public class SplitPanelWithMinimumAndMaximumTest extends MultiBrowserTest {
// Due to minor browser differences and sub-pixels we must allow 1px
// of play between the expected and measured value
- assertTrue("When moving left, the splitter at index " + i
- + " was at position " + newX + " (expected " + expectedX
- + ").", Math.abs(newX - expectedX) <= 1);
+ assertTrue(
+ "When moving left, the splitter at index " + i
+ + " was at position " + newX + " (expected "
+ + expectedX + ").",
+ Math.abs(newX - expectedX) <= 1);
}
// Amount of pixels to move each splitter (to right)
@@ -84,9 +86,11 @@ public class SplitPanelWithMinimumAndMaximumTest extends MultiBrowserTest {
double newX = parseHorizontalPosition(splitter, i < 4);
int expectedX = finalPositions[i];
- assertTrue("When moving right, the splitter at index " + i
- + " was at position " + newX + " (expected " + expectedX
- + ").", Math.abs(newX - expectedX) <= 1);
+ assertTrue(
+ "When moving right, the splitter at index " + i
+ + " was at position " + newX + " (expected "
+ + expectedX + ").",
+ Math.abs(newX - expectedX) <= 1);
}
}
@@ -113,9 +117,11 @@ public class SplitPanelWithMinimumAndMaximumTest extends MultiBrowserTest {
double newY = parseVerticalPosition(splitter, i < 4);
int expectedY = finalPositions[i];
- assertTrue("When moving up, the splitter at index " + i
- + " was at position " + newY + " (expected " + expectedY
- + ").", Math.abs(newY - expectedY) <= 1);
+ assertTrue(
+ "When moving up, the splitter at index " + i
+ + " was at position " + newY + " (expected "
+ + expectedY + ").",
+ Math.abs(newY - expectedY) <= 1);
}
// Amount of pixels to move each splitter (down)
@@ -132,9 +138,11 @@ public class SplitPanelWithMinimumAndMaximumTest extends MultiBrowserTest {
double newY = parseVerticalPosition(splitter, i < 4);
int expectedY = finalPositions[i];
- assertTrue("When moving down, the splitter at index " + i
- + " was at position " + newY + " (expected " + expectedY
- + ").", Math.abs(newY - expectedY) <= 1);
+ assertTrue(
+ "When moving down, the splitter at index " + i
+ + " was at position " + newY + " (expected "
+ + expectedY + ").",
+ Math.abs(newY - expectedY) <= 1);
}
}
@@ -161,8 +169,9 @@ public class SplitPanelWithMinimumAndMaximumTest extends MultiBrowserTest {
double newX = parseHorizontalPosition(splitter, true);
int expectedX = finalPositions[0];
- assertTrue("When moving to left limit, the splitter was at position "
- + newX + " (expected " + expectedX + ").",
+ assertTrue(
+ "When moving to left limit, the splitter was at position "
+ + newX + " (expected " + expectedX + ").",
Math.abs(newX - expectedX) <= 1);
// Disable left limit
@@ -196,8 +205,9 @@ public class SplitPanelWithMinimumAndMaximumTest extends MultiBrowserTest {
newX = parseHorizontalPosition(splitter, true);
expectedX = finalPositions[2];
- assertTrue("When moving to right limit, the splitter was at position "
- + newX + " (expected " + expectedX + ").",
+ assertTrue(
+ "When moving to right limit, the splitter was at position "
+ + newX + " (expected " + expectedX + ").",
Math.abs(newX - expectedX) <= 1);
// Disable right limit
@@ -229,21 +239,22 @@ public class SplitPanelWithMinimumAndMaximumTest extends MultiBrowserTest {
private double parseHorizontalPosition(TestBenchElement splitter,
boolean left) {
if (left) {
- return Double.parseDouble(splitter.getCssValue("left").replace(
- "px", ""));
+ return Double.parseDouble(
+ splitter.getCssValue("left").replace("px", ""));
} else {
- return Double.parseDouble(splitter.getCssValue("right").replace(
- "px", ""));
+ return Double.parseDouble(
+ splitter.getCssValue("right").replace("px", ""));
}
}
- private double parseVerticalPosition(TestBenchElement splitter, boolean top) {
+ private double parseVerticalPosition(TestBenchElement splitter,
+ boolean top) {
if (top) {
- return Double.parseDouble(splitter.getCssValue("top").replace("px",
- ""));
+ return Double
+ .parseDouble(splitter.getCssValue("top").replace("px", ""));
} else {
- return Double.parseDouble(splitter.getCssValue("bottom").replace(
- "px", ""));
+ return Double.parseDouble(
+ splitter.getCssValue("bottom").replace("px", ""));
}
}
} \ No newline at end of file
diff --git a/uitest/src/test/java/com/vaadin/tests/components/splitpanel/SplitPositionChangeTest.java b/uitest/src/test/java/com/vaadin/tests/components/splitpanel/SplitPositionChangeTest.java
index 43edb56f3a..9a6d59b64f 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/splitpanel/SplitPositionChangeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/splitpanel/SplitPositionChangeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,7 +27,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test for {@link SplitPositionChangeListeners}.
- *
+ *
* @author Vaadin Ltd
*/
public class SplitPositionChangeTest extends MultiBrowserTest {
@@ -43,8 +43,8 @@ public class SplitPositionChangeTest extends MultiBrowserTest {
public void testHorizontalSplit() {
HorizontalSplitPanelElement split = $(HorizontalSplitPanelElement.class)
.first();
- WebElement splitter = split.findElement(By
- .className("v-splitpanel-hsplitter"));
+ WebElement splitter = split
+ .findElement(By.className("v-splitpanel-hsplitter"));
int position = splitter.getLocation().getX();
Actions actions = new Actions(driver);
actions.clickAndHold(splitter).moveByOffset(50, 0).release().perform();
@@ -56,8 +56,8 @@ public class SplitPositionChangeTest extends MultiBrowserTest {
public void testVerticalSplit() {
VerticalSplitPanelElement split = $(VerticalSplitPanelElement.class)
.first();
- WebElement splitter = split.findElement(By
- .className("v-splitpanel-vsplitter"));
+ WebElement splitter = split
+ .findElement(By.className("v-splitpanel-vsplitter"));
int position = splitter.getLocation().getY();
Actions actions = new Actions(driver);
actions.clickAndHold(splitter).moveByOffset(0, 50).release().perform();
@@ -74,9 +74,8 @@ public class SplitPositionChangeTest extends MultiBrowserTest {
"1. Split position changed: %s, position: .*",
horizontal ? "horizontal" : "vertical");
String actual = getLogRow(0);
- Assert.assertTrue(
- String.format(
- "Log content didn't match the expected format.\nexpected: '%s'\nwas: '%s'",
- expected, actual), actual.matches(expected));
+ Assert.assertTrue(String.format(
+ "Log content didn't match the expected format.\nexpected: '%s'\nwas: '%s'",
+ expected, actual), actual.matches(expected));
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/AddSelectionToRemovedRangeTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/AddSelectionToRemovedRangeTest.java
index 68b3748472..b699a10403 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/AddSelectionToRemovedRangeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/AddSelectionToRemovedRangeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -45,8 +45,8 @@ public class AddSelectionToRemovedRangeTest extends MultiBrowserTest {
@Test
public void addAndRemoveItemToRemovedRange() throws IOException {
openTestURL();
- List<WebElement> rows = driver.findElements(By
- .className("v-table-cell-wrapper"));
+ List<WebElement> rows = driver
+ .findElements(By.className("v-table-cell-wrapper"));
WebElement rangeStart = rows.get(0);
WebElement rangeEnd = rows.get(1);
rangeStart.click();
@@ -54,8 +54,8 @@ public class AddSelectionToRemovedRangeTest extends MultiBrowserTest {
rangeEnd.click();
new Actions(driver).keyUp(Keys.SHIFT).perform();
driver.findElement(By.className("v-button")).click();
- WebElement extraRow = driver.findElements(
- By.className("v-table-cell-wrapper")).get(1);
+ WebElement extraRow = driver
+ .findElements(By.className("v-table-cell-wrapper")).get(1);
new Actions(driver).keyDown(Keys.CONTROL).click(extraRow)
.click(extraRow).keyUp(Keys.CONTROL).perform();
driver.findElement(By.className("v-button")).click();
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/AsyncPushUpdatesTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/AsyncPushUpdatesTest.java
index b33204cc44..f098e50bbf 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/AsyncPushUpdatesTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/AsyncPushUpdatesTest.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -26,7 +26,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test to see if VScrollTable handles Push updates correctly.
- *
+ *
* @author Vaadin Ltd
*/
public class AsyncPushUpdatesTest extends MultiBrowserTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/ColumnCollapsingAndColumnExpansionTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/ColumnCollapsingAndColumnExpansionTest.java
index 739851de2f..bcd9433e0c 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/ColumnCollapsingAndColumnExpansionTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/ColumnCollapsingAndColumnExpansionTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/ColumnReorderingWithManyColumnsTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/ColumnReorderingWithManyColumnsTest.java
index 4a5947c145..418ff76a01 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/ColumnReorderingWithManyColumnsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/ColumnReorderingWithManyColumnsTest.java
@@ -21,8 +21,8 @@ public class ColumnReorderingWithManyColumnsTest extends MultiBrowserTest {
TableHeaderElement sourceCell = table.getHeaderCell(0);
TableHeaderElement targetCell = table.getHeaderCell(10);
drag(sourceCell, targetCell);
- WebElement markedElement = table.findElement(By
- .className("v-table-focus-slot-right"));
+ WebElement markedElement = table
+ .findElement(By.className("v-table-focus-slot-right"));
String markedColumnName = markedElement.findElement(By.xpath(".."))
.getText();
assertEquals("col-9", markedColumnName.toLowerCase());
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/ColumnWidthsAfterChangeTableColumnsCountOrOrderTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/ColumnWidthsAfterChangeTableColumnsCountOrOrderTest.java
index 970b832e0c..ae16f72934 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/ColumnWidthsAfterChangeTableColumnsCountOrOrderTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/ColumnWidthsAfterChangeTableColumnsCountOrOrderTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,8 +26,8 @@ import org.openqa.selenium.WebElement;
import com.vaadin.tests.tb3.MultiBrowserTest;
-public class ColumnWidthsAfterChangeTableColumnsCountOrOrderTest extends
- MultiBrowserTest {
+public class ColumnWidthsAfterChangeTableColumnsCountOrOrderTest
+ extends MultiBrowserTest {
@Test
public void testColumnWidthAfterChangeTableColumnsOrder() {
@@ -62,11 +62,8 @@ public class ColumnWidthsAfterChangeTableColumnsCountOrOrderTest extends
}
private int getDescriptionColumnWidth() {
- return driver
- .findElement(
- By.xpath("//div[@class='v-table-cell-wrapper'"
- + " and text() = 'descr1']")).getSize()
- .getWidth();
+ return driver.findElement(By.xpath("//div[@class='v-table-cell-wrapper'"
+ + " and text() = 'descr1']")).getSize().getWidth();
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/ContainerSizeChangeTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/ContainerSizeChangeTest.java
index e13238e10d..d248d22720 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/ContainerSizeChangeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/ContainerSizeChangeTest.java
@@ -21,12 +21,12 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
public class ContainerSizeChangeTest extends MultiBrowserTest {
@Test
- public void tableShouldLoadCorrectItems() throws IOException,
- InterruptedException {
+ public void tableShouldLoadCorrectItems()
+ throws IOException, InterruptedException {
openTestURL();
- ButtonElement decreaseSize = $(ButtonElement.class).caption(
- "Decrease size").first();
+ ButtonElement decreaseSize = $(ButtonElement.class)
+ .caption("Decrease size").first();
decreaseSize.click(); // decreasing container size from 50 to 40
decreaseSize.click(); // decreasing container size from 40 to 30
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/ContextMenuSizeTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/ContextMenuSizeTest.java
index e5e5163442..440f4d36dd 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/ContextMenuSizeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/ContextMenuSizeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,7 +31,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test for context menu position and size.
- *
+ *
* @author Vaadin Ltd
*/
public class ContextMenuSizeTest extends MultiBrowserTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/CtrlShiftMultiselectTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/CtrlShiftMultiselectTest.java
index add7db93f2..5b2bd2706c 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/CtrlShiftMultiselectTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/CtrlShiftMultiselectTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -65,7 +65,8 @@ public class CtrlShiftMultiselectTest extends MultiBrowserTest {
}
private List<WebElement> getAllRows() {
- WebElement table = vaadinElement("/VVerticalLayout[0]/VVerticalLayout[0]/VScrollTable[0]");
+ WebElement table = vaadinElement(
+ "/VVerticalLayout[0]/VVerticalLayout[0]/VScrollTable[0]");
return table.findElements(By.cssSelector(".v-table-table tr"));
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/CustomTableElement.java b/uitest/src/test/java/com/vaadin/tests/components/table/CustomTableElement.java
index f1df98fb38..763dbed304 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/CustomTableElement.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/CustomTableElement.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,8 +27,8 @@ public class CustomTableElement extends TableElement {
public CollapseMenu openCollapseMenu() {
getCollapseMenuToggle().click();
- WebElement cm = getDriver().findElement(
- By.xpath("//*[@id='PID_VAADIN_CM']"));
+ WebElement cm = getDriver()
+ .findElement(By.xpath("//*[@id='PID_VAADIN_CM']"));
return wrapElement(cm, getCommandExecutor()).wrap(CollapseMenu.class);
}
@@ -42,16 +42,16 @@ public class CustomTableElement extends TableElement {
public static class ContextMenuElement extends AbstractElement {
public WebElement getItem(int index) {
- return findElement(By.xpath(".//table//tr[" + (index + 1)
- + "]//td/*"));
+ return findElement(
+ By.xpath(".//table//tr[" + (index + 1) + "]//td/*"));
}
}
public ContextMenuElement getContextMenu() {
WebElement cm = getDriver().findElement(By.className("v-contextmenu"));
- return wrapElement(cm, getCommandExecutor()).wrap(
- ContextMenuElement.class);
+ return wrapElement(cm, getCommandExecutor())
+ .wrap(ContextMenuElement.class);
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/DisabledSortingTableTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/DisabledSortingTableTest.java
index 73a5e68da9..c5838096bc 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/DisabledSortingTableTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/DisabledSortingTableTest.java
@@ -91,8 +91,8 @@ public class DisabledSortingTableTest extends MultiBrowserTest {
@Override
public String toString() {
// Timed out after 10 seconds waiting for ...
- return String
- .format("header to get class name '%s'", className);
+ return String.format("header to get class name '%s'",
+ className);
}
});
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/DndEmptyTableTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/DndEmptyTableTest.java
index 6fb0d446d3..70dd4c98b3 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/DndEmptyTableTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/DndEmptyTableTest.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -25,7 +25,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test for empty table as a DnD target: it should not throws client side
* exception.
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/DndTableTargetDetailsTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/DndTableTargetDetailsTest.java
index 5ad99d3084..741d5d7b5b 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/DndTableTargetDetailsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/DndTableTargetDetailsTest.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -27,7 +27,7 @@ import com.vaadin.tests.tb3.DndActionsTest;
/**
* Test for mouse details in AbstractSelectTargetDetails class when DnD target
* is a table.
- *
+ *
* @author Vaadin Ltd
*/
public class DndTableTargetDetailsTest extends DndActionsTest {
@@ -45,8 +45,8 @@ public class DndTableTargetDetailsTest extends DndActionsTest {
}
protected WebElement getTarget() {
- return findElement(By.className("target")).findElement(
- By.className("v-table-cell-wrapper"));
+ return findElement(By.className("target"))
+ .findElement(By.className("v-table-cell-wrapper"));
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/EditableModeChangeTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/EditableModeChangeTest.java
index 56b30dcb7c..5e5bcb82fb 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/EditableModeChangeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/EditableModeChangeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,7 +31,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests that editing and selecting work correctly.
- *
+ *
* @author Vaadin Ltd
*/
public class EditableModeChangeTest extends MultiBrowserTest {
@@ -54,8 +54,8 @@ public class EditableModeChangeTest extends MultiBrowserTest {
sleep(100);
// fetch the updated cell
- WebElement textField = table.getCell(1, 0).findElement(
- By.className("v-textfield"));
+ WebElement textField = table.getCell(1, 0)
+ .findElement(By.className("v-textfield"));
assertEquals(
"original value not found, wrong cell or contents (1st column of the 2nd row expected)",
"Teppo", textField.getAttribute("value"));
@@ -73,13 +73,13 @@ public class EditableModeChangeTest extends MultiBrowserTest {
"baa", table.getCell(1, 0).getText());
// check that selection got updated correctly
- List<WebElement> selected = table.findElement(
- By.className("v-table-body")).findElements(
- By.className("v-selected"));
+ List<WebElement> selected = table
+ .findElement(By.className("v-table-body"))
+ .findElements(By.className("v-selected"));
assertEquals(1, selected.size());
- WebElement content = selected.get(0).findElement(
- By.className("v-table-cell-wrapper"));
+ WebElement content = selected.get(0)
+ .findElement(By.className("v-table-cell-wrapper"));
assertEquals(
"expected value not found, wrong cell or contents (1st column of the 1st row expected)",
"Teemu", content.getText());
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/EmptyTableTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/EmptyTableTest.java
index 2332815ed6..41cab317e7 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/EmptyTableTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/EmptyTableTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/ExpandingContainerVisibleRowRaceConditionTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/ExpandingContainerVisibleRowRaceConditionTest.java
index 1602f1bae5..1b1478ef45 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/ExpandingContainerVisibleRowRaceConditionTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/ExpandingContainerVisibleRowRaceConditionTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,8 +28,8 @@ import org.openqa.selenium.WebElement;
import com.vaadin.tests.tb3.MultiBrowserTest;
-public class ExpandingContainerVisibleRowRaceConditionTest extends
- MultiBrowserTest {
+public class ExpandingContainerVisibleRowRaceConditionTest
+ extends MultiBrowserTest {
private static final int ROW_HEIGHT = 20;
@@ -76,15 +76,15 @@ public class ExpandingContainerVisibleRowRaceConditionTest extends
private void assertScrollPositionIsNotVisible() {
WebElement table = vaadinElementById(TABLE);
- WebElement scrollPosition = table.findElement(By
- .className("v-table-scrollposition"));
+ WebElement scrollPosition = table
+ .findElement(By.className("v-table-scrollposition"));
assertFalse(scrollPosition.isDisplayed());
}
private List<WebElement> getCellsOfFirstColumn() {
WebElement table = vaadinElementById(TABLE);
- List<WebElement> firstCellOfRows = table.findElements(By
- .cssSelector(".v-table-table tr > td"));
+ List<WebElement> firstCellOfRows = table
+ .findElements(By.cssSelector(".v-table-table tr > td"));
return firstCellOfRows;
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/FocusOnSelectedItemTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/FocusOnSelectedItemTest.java
index 14a0718325..3e5ab930ad 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/FocusOnSelectedItemTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/FocusOnSelectedItemTest.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -27,7 +27,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test to see if the correct row gets the focus when the row is selected from
* the serverside and forces the table to scroll down
- *
+ *
* @author Vaadin Ltd
*/
public class FocusOnSelectedItemTest extends MultiBrowserTest {
@@ -50,9 +50,9 @@ public class FocusOnSelectedItemTest extends MultiBrowserTest {
supposedlyFocusedRow = $(TableElement.class).first().getCell(198, 0);
- Assert.assertTrue("Incorrect row was selected", selectedRow
- .getLocation().getY() == supposedlyFocusedRow.getLocation()
- .getY());
+ Assert.assertTrue("Incorrect row was selected",
+ selectedRow.getLocation().getY() == supposedlyFocusedRow
+ .getLocation().getY());
Assert.assertTrue("No row had the focused style.",
isElementPresent(By.className("v-table-focus")));
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/FooterClickTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/FooterClickTest.java
index 2e4df1c116..b591b369e5 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/FooterClickTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/FooterClickTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,7 +31,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests Table Footer ClickListener
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/FooterTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/FooterTest.java
index 11a6838234..75f630e203 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/FooterTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/FooterTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -34,7 +34,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests Table Footer
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -204,8 +204,8 @@ public class FooterTest extends MultiBrowserTest {
@Override
public String toString() {
// Timed out after 10 seconds waiting for ...
- return String.format("footer cell %s's text was'%s'",
- "" + cell, footerCell.getText());
+ return String.format("footer cell %s's text was'%s'", "" + cell,
+ footerCell.getText());
}
});
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/HeaderClickTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/HeaderClickTest.java
index 2ad069540d..c9baf91713 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/HeaderClickTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/HeaderClickTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests Table Footer ClickListener
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/HeaderFooterClickLeftRightMiddleTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/HeaderFooterClickLeftRightMiddleTest.java
index 01fc173c9a..a06fce9869 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/HeaderFooterClickLeftRightMiddleTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/HeaderFooterClickLeftRightMiddleTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests Table Footer ClickListener
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/HeaderPositionWhenSortingTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/HeaderPositionWhenSortingTest.java
index 26847a692d..df1e8603c3 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/HeaderPositionWhenSortingTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/HeaderPositionWhenSortingTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests Table Footer ClickListener
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/HeaderRightClickAfterDragTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/HeaderRightClickAfterDragTest.java
index f5f8bcce2a..4868279722 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/HeaderRightClickAfterDragTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/HeaderRightClickAfterDragTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests whether right-click on a column header works after the column is
* dragged.
- *
+ *
* @author Vaadin Ltd
*/
public class HeaderRightClickAfterDragTest extends MultiBrowserTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/HeaderSyncOnScrollTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/HeaderSyncOnScrollTest.java
index c9307f0849..0777e5d091 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/HeaderSyncOnScrollTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/HeaderSyncOnScrollTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests Table Footer ClickListener
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/HeaderUpdateWhenNoRowsTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/HeaderUpdateWhenNoRowsTest.java
index 7a3813599d..ea7aef4bd5 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/HeaderUpdateWhenNoRowsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/HeaderUpdateWhenNoRowsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests Table Footer ClickListener
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/ItemClickEventsTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/ItemClickEventsTest.java
index 4938ec4b81..8f95797df0 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/ItemClickEventsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/ItemClickEventsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/ItemClickEventsTestWithShiftOrCtrl.java b/uitest/src/test/java/com/vaadin/tests/components/table/ItemClickEventsTestWithShiftOrCtrl.java
index edeb358c08..b33ef8a355 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/ItemClickEventsTestWithShiftOrCtrl.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/ItemClickEventsTestWithShiftOrCtrl.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/LabelEmbeddedClickThroughForTableTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/LabelEmbeddedClickThroughForTableTest.java
index 25a3139489..d36c647c0c 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/LabelEmbeddedClickThroughForTableTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/LabelEmbeddedClickThroughForTableTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests clicks on different types of Table contents.
- *
+ *
* @author Vaadin Ltd
*/
public class LabelEmbeddedClickThroughForTableTest extends MultiBrowserTest {
@@ -89,9 +89,9 @@ public class LabelEmbeddedClickThroughForTableTest extends MultiBrowserTest {
}
private void checkRowSelected(TableElement table, int rowIndex) {
- List<WebElement> selectedRows = table.findElement(
- By.className("v-table-body")).findElements(
- By.className("v-selected"));
+ List<WebElement> selectedRows = table
+ .findElement(By.className("v-table-body"))
+ .findElements(By.className("v-selected"));
assertEquals("unexpected table selection size", 1, selectedRows.size());
assertEquals(
"contents of the selected row don't match contents of the row #"
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/LeftColumnAlignmentTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/LeftColumnAlignmentTest.java
index 3d613fd726..6ef7223172 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/LeftColumnAlignmentTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/LeftColumnAlignmentTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test class for issue #13399 : Left alignment should not be set explicitly
* instead of relying on default behavior
- *
+ *
* @author Vaadin Ltd
*/
public class LeftColumnAlignmentTest extends MultiBrowserTest {
@@ -39,17 +39,17 @@ public class LeftColumnAlignmentTest extends MultiBrowserTest {
webElement.click();
Assert.assertTrue("Table caption is not aligned to the left",
- isElementPresent(By
- .className("v-table-caption-container-align-left")));
+ isElementPresent(
+ By.className("v-table-caption-container-align-left")));
- WebElement footer = driver.findElement(By
- .className("v-table-footer-container"));
+ WebElement footer = driver
+ .findElement(By.className("v-table-footer-container"));
Assert.assertEquals("Table footer is not aligned to the left", "left",
footer.getCssValue("text-align"));
- WebElement cell = driver.findElement(By
- .className("v-table-cell-wrapper"));
+ WebElement cell = driver
+ .findElement(By.className("v-table-cell-wrapper"));
Assert.assertEquals("Table cell is not aligned to the left", "left",
cell.getCssValue("text-align"));
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/LongMultiselectTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/LongMultiselectTest.java
index e9f3bbb355..52cdd2d8ec 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/LongMultiselectTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/LongMultiselectTest.java
@@ -49,8 +49,8 @@ public class LongMultiselectTest extends MultiBrowserTest {
scrollToBottom();
new Actions(getDriver()).keyDown(Keys.SHIFT)
- .click(getTable().getCell(LASTSELECTEDROW, 0))
- .keyUp(Keys.SHIFT).build().perform();
+ .click(getTable().getCell(LASTSELECTEDROW, 0)).keyUp(Keys.SHIFT)
+ .build().perform();
}
private TableElement getTable() {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/MemoryLeakTableTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/MemoryLeakTableTest.java
index b254d27b58..114a052c19 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/MemoryLeakTableTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/MemoryLeakTableTest.java
@@ -31,10 +31,10 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test case creating and deleting table component in a loop, testing memory
* lead in Table component. This test should not be used in auto testing.
- *
+ *
* To test memory consuption. Run test in debug mode. Take memory snapshot in
* Profiler in browser before and after the loop. Compare memory consuption.
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -84,8 +84,8 @@ public class MemoryLeakTableTest extends MultiBrowserTest {
// Method scroll in TalbeElement class has a bug
//
private void scrollTable(TableElement tbl, int value) {
- WebElement actualElement = tbl.findElement(By
- .className("v-table-body-wrapper"));
+ WebElement actualElement = tbl
+ .findElement(By.className("v-table-body-wrapper"));
JavascriptExecutor js = tbl.getCommandExecutor();
js.executeScript("arguments[0].scrollTop = " + value, actualElement);
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/OnlyCollapsibleInMenu.java b/uitest/src/test/java/com/vaadin/tests/components/table/OnlyCollapsibleInMenu.java
index 2b053a6d1c..3685eb322c 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/OnlyCollapsibleInMenu.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/OnlyCollapsibleInMenu.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/ReloadWidgetsTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/ReloadWidgetsTest.java
index c92e00ab29..e201b2ad96 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/ReloadWidgetsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/ReloadWidgetsTest.java
@@ -64,8 +64,8 @@ public class ReloadWidgetsTest extends MultiBrowserTest {
waitUntil(new ExpectedCondition<Boolean>() {
@Override
public Boolean apply(WebDriver input) {
- List<WebElement> elements = findElements(By
- .className("v-table-scrollposition"));
+ List<WebElement> elements = findElements(
+ By.className("v-table-scrollposition"));
return elements.isEmpty() || !elements.get(0).isDisplayed();
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/SelectAllConstantViewportTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/SelectAllConstantViewportTest.java
index 504957e773..26578de160 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/SelectAllConstantViewportTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/SelectAllConstantViewportTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -39,8 +39,8 @@ public class SelectAllConstantViewportTest extends MultiBrowserTest {
CheckBoxElement checkbox = $(CheckBoxElement.class).first();
WebElement row = $(TableElement.class).first().getCell(190, 0);
- final WebElement scrollPositionDisplay = getDriver().findElement(
- By.className("v-table-scrollposition"));
+ final WebElement scrollPositionDisplay = getDriver()
+ .findElement(By.className("v-table-scrollposition"));
waitUntilNot(new ExpectedCondition<Boolean>() {
@Override
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/SelectAllRowsShiftFirstTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/SelectAllRowsShiftFirstTest.java
index 28cf9b0718..3e003e1f0f 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/SelectAllRowsShiftFirstTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/SelectAllRowsShiftFirstTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,7 +22,7 @@ import org.openqa.selenium.WebElement;
/**
* Test to see if all items of the table can be selected by pressing shift and
* selecting the first row, and then press shift then select last row (#13483)
- *
+ *
* @author Vaadin Ltd
*/
public class SelectAllRowsShiftFirstTest extends SelectAllRowsTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/SelectAllRowsTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/SelectAllRowsTest.java
index 175cbac9d5..f85df2badf 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/SelectAllRowsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/SelectAllRowsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -38,7 +38,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test to see if all items of the table can be selected by selecting first row,
* press shift then select last (#13008)
- *
+ *
* @author Vaadin Ltd
*/
public class SelectAllRowsTest extends MultiBrowserTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/SetCurrentPageFirstItemIndexTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/SetCurrentPageFirstItemIndexTest.java
index 8102f82834..767d8311bf 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/SetCurrentPageFirstItemIndexTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/SetCurrentPageFirstItemIndexTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ import com.vaadin.testbench.elements.TableElement;
import com.vaadin.tests.tb3.MultiBrowserTest;
/**
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/SetPageFirstItemLoadsNeededRowsOnlyTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/SetPageFirstItemLoadsNeededRowsOnlyTest.java
index ebf53e9a6d..086fe07035 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/SetPageFirstItemLoadsNeededRowsOnlyTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/SetPageFirstItemLoadsNeededRowsOnlyTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.testbench.elements.LabelElement;
import com.vaadin.tests.tb3.MultiBrowserTest;
/**
- *
+ *
* @author Vaadin Ltd
*/
public class SetPageFirstItemLoadsNeededRowsOnlyTest extends MultiBrowserTest {
@@ -31,11 +31,11 @@ public class SetPageFirstItemLoadsNeededRowsOnlyTest extends MultiBrowserTest {
/*
* expectedRowsRequested is related to VScrollTable's cache_rate and
* pageLength. See for instance VScrollTable.ensureCacheFilled().
- *
+ *
* This also takes into account if the visible rows are at the very start or
* end of the table, if the user scrolled or the
* Table.setCurrentPageFirstItemIndex(int) method was used.
- *
+ *
* This value should not change if cache_rate and pageLength are not changed
* as well, and if this test remains constant: the table is scrolled to the
* very end (done in the actual UI: SetPageFirstItemLoadsNeededRowsOnly).
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/SortLabelsInTableTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/SortLabelsInTableTest.java
index 54b5cad9b2..e3c14f67f2 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/SortLabelsInTableTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/SortLabelsInTableTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests sorting labels in table.
- *
+ *
* @author Vaadin Ltd
*/
public class SortLabelsInTableTest extends MultiBrowserTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/SortableHeaderStylesTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/SortableHeaderStylesTest.java
index 060b3a661a..ab70343d36 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/SortableHeaderStylesTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/SortableHeaderStylesTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/TableAfterRemovingExpandRatiosTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/TableAfterRemovingExpandRatiosTest.java
index 58628a9d56..c2c1db7f6b 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/TableAfterRemovingExpandRatiosTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/TableAfterRemovingExpandRatiosTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests checks that column width is restored after removing expand ratios.
- *
+ *
* @author Vaadin Ltd
*/
public class TableAfterRemovingExpandRatiosTest extends MultiBrowserTest {
@@ -47,10 +47,10 @@ public class TableAfterRemovingExpandRatiosTest extends MultiBrowserTest {
List<WebElement> tables = driver.findElements(By.className("v-table"));
- initialHeader = tables.get(0).findElement(
- By.className("v-table-header-cell"));
- expandedHeader = tables.get(1).findElement(
- By.className("v-table-header-cell"));
+ initialHeader = tables.get(0)
+ .findElement(By.className("v-table-header-cell"));
+ expandedHeader = tables.get(1)
+ .findElement(By.className("v-table-header-cell"));
expandButton = getDriver().findElement(By.id("expand-button"));
unExpandButton = getDriver().findElement(By.id("unexpand-button"));
@@ -61,13 +61,13 @@ public class TableAfterRemovingExpandRatiosTest extends MultiBrowserTest {
clickAndWait(expandButton);
assertThat("Column widths should not be equal after expanding",
- initialHeader.getSize().getWidth(), not(expandedHeader
- .getSize().getWidth()));
+ initialHeader.getSize().getWidth(),
+ not(expandedHeader.getSize().getWidth()));
clickAndWait(unExpandButton);
assertThat("Column widths should be equal after unexpanding",
- initialHeader.getSize().getWidth(), is(expandedHeader.getSize()
- .getWidth()));
+ initialHeader.getSize().getWidth(),
+ is(expandedHeader.getSize().getWidth()));
}
@Test
@@ -80,8 +80,8 @@ public class TableAfterRemovingExpandRatiosTest extends MultiBrowserTest {
clickAndWait(unExpandButton);
assertThat(
"Column widths should be equal after adding item and unexpanding",
- initialHeader.getSize().getWidth(), is(expandedHeader.getSize()
- .getWidth()));
+ initialHeader.getSize().getWidth(),
+ is(expandedHeader.getSize().getWidth()));
}
private void clickAndWait(WebElement elem) {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/TableBlurFocusTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/TableBlurFocusTest.java
index e5d07abc22..776ffc79a2 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/TableBlurFocusTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/TableBlurFocusTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/TableCacheMinimizingOnFetchRowsTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/TableCacheMinimizingOnFetchRowsTest.java
index edb0f3851a..aaf1c77154 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/TableCacheMinimizingOnFetchRowsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/TableCacheMinimizingOnFetchRowsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/TableChildMeasurementHintTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/TableChildMeasurementHintTest.java
index 8202b06362..1f4f4970a1 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/TableChildMeasurementHintTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/TableChildMeasurementHintTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/TableClickAndDragOnIconAndComponentsTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/TableClickAndDragOnIconAndComponentsTest.java
index 4a9d17c02d..95d28c798c 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/TableClickAndDragOnIconAndComponentsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/TableClickAndDragOnIconAndComponentsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -35,7 +35,7 @@ import org.openqa.selenium.interactions.Actions;
/**
* Tests that clicking on active fields doesn't change Table selection, nor does
* dragging rows.
- *
+ *
* @author Vaadin Ltd
*/
public class TableClickAndDragOnIconAndComponentsTest extends MultiBrowserTest {
@@ -105,8 +105,8 @@ public class TableClickAndDragOnIconAndComponentsTest extends MultiBrowserTest {
}
private void assertThatFocusTextFieldHasText(String text) {
- List<WebElement> focused = getTable().findElements(
- By.className("v-textfield-focus"));
+ List<WebElement> focused = getTable()
+ .findElements(By.className("v-textfield-focus"));
assertThat(focused.get(0).getAttribute("value"), is(text));
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/TableColumnAddAndResizeTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/TableColumnAddAndResizeTest.java
index e42f86a975..6f83240301 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/TableColumnAddAndResizeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/TableColumnAddAndResizeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -33,8 +33,8 @@ public class TableColumnAddAndResizeTest extends MultiBrowserTest {
openTestURL();
$(ButtonElement.class).caption("Add and Resize").first().click();
- assertFalse("Error notification present.", $(NotificationElement.class)
- .exists());
+ assertFalse("Error notification present.",
+ $(NotificationElement.class).exists());
assertEquals("Unexpected column width. ", 200, $(TableElement.class)
.first().getCell(0, 1).getSize().getWidth());
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/TableColumnResizeContentsWidthTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/TableColumnResizeContentsWidthTest.java
index 9072d13263..8c6815affe 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/TableColumnResizeContentsWidthTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/TableColumnResizeContentsWidthTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -34,7 +34,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests that components within table cells get resized when their column gets
* resized.
- *
+ *
* @author Vaadin Ltd
*/
public class TableColumnResizeContentsWidthTest extends MultiBrowserTest {
@@ -50,8 +50,8 @@ public class TableColumnResizeContentsWidthTest extends MultiBrowserTest {
List<ButtonElement> buttons = $(ButtonElement.class).all();
- WebElement resizer = getTable().findElement(
- By.className("v-table-resizer"));
+ WebElement resizer = getTable()
+ .findElement(By.className("v-table-resizer"));
assertEquals(100, getTextFieldWidth());
@@ -81,8 +81,8 @@ public class TableColumnResizeContentsWidthTest extends MultiBrowserTest {
private int getTextFieldWidth() {
TableElement table = getTable();
- final WebElement textField = table.findElement(By
- .className("v-textfield"));
+ final WebElement textField = table
+ .findElement(By.className("v-textfield"));
return textField.getSize().width;
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/TableColumnWidthsAndSortingTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/TableColumnWidthsAndSortingTest.java
index 9c49b3d0b6..d0560be5cd 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/TableColumnWidthsAndSortingTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/TableColumnWidthsAndSortingTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/TableDragColumnTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/TableDragColumnTest.java
index bd2d2ad28b..978e2b8405 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/TableDragColumnTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/TableDragColumnTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -36,12 +36,13 @@ public class TableDragColumnTest extends MultiBrowserTest {
public void testDragColumn() {
openTestURL();
- selectMenuPath("Component", "Columns", "Property 1", "Icon", "ok 16x16");
+ selectMenuPath("Component", "Columns", "Property 1", "Icon",
+ "ok 16x16");
TableElement table = $(TableElement.class).first();
TableHeaderElement dragged = table.getHeaderCell(0);
- String imgSrc = dragged.findElement(By.tagName("img")).getAttribute(
- "src");
+ String imgSrc = dragged.findElement(By.tagName("img"))
+ .getAttribute("src");
new Actions(getDriver()).moveToElement(dragged).clickAndHold()
.moveByOffset(-6, 0).perform();
@@ -50,22 +51,21 @@ public class TableDragColumnTest extends MultiBrowserTest {
WebElement dragImage = findElement(By.className("v-table-header-drag"));
String cellContent = dragged.getText();
- Assert.assertEquals(
- "Drag image had different content than header cell",
+ Assert.assertEquals("Drag image had different content than header cell",
cellContent, dragImage.getText());
- Assert.assertEquals("Drag image had different icon", imgSrc, dragImage
- .findElement(By.tagName("img")).getAttribute("src"));
+ Assert.assertEquals("Drag image had different icon", imgSrc,
+ dragImage.findElement(By.tagName("img")).getAttribute("src"));
TableHeaderElement target = table.getHeaderCell(3);
new Actions(getDriver())
- .moveToElement(target, target.getSize().width - 5, 10)
- .release().perform();
+ .moveToElement(target, target.getSize().width - 5, 10).release()
+ .perform();
dragged = table.getHeaderCell(3);
Assert.assertEquals("Column was not dropped where expected.",
cellContent, dragged.getText());
- Assert.assertEquals("Drag image had different icon", imgSrc, dragged
- .findElement(By.tagName("img")).getAttribute("src"));
+ Assert.assertEquals("Drag image had different icon", imgSrc,
+ dragged.findElement(By.tagName("img")).getAttribute("src"));
}
@Test
@@ -94,8 +94,7 @@ public class TableDragColumnTest extends MultiBrowserTest {
WebElement dragImage = findElement(By.className("v-table-header-drag"));
String cellContent = dragged.getText();
- Assert.assertEquals(
- "Drag image had different content than header cell",
+ Assert.assertEquals("Drag image had different content than header cell",
cellContent, dragImage.getText());
Assert.assertTrue("Missing CSS class " + styleName,
hasCssClass(dragImage, styleName));
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/TableDropIndicatorValoTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/TableDropIndicatorValoTest.java
index 82a66eba07..1cef1e2724 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/TableDropIndicatorValoTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/TableDropIndicatorValoTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests that clicking on active fields doesn't change Table selection, nor does
* dragging rows.
- *
+ *
* @author Vaadin Ltd
*/
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/TableInIframeRowClickScrollJumpTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/TableInIframeRowClickScrollJumpTest.java
index 074958d671..2593f10258 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/TableInIframeRowClickScrollJumpTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/TableInIframeRowClickScrollJumpTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,7 +31,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* For testing that UI scroll does not jump back to up when: 1. UI is in iframe
* 2. the window scrolled down 3. and table is clicked
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -76,8 +76,9 @@ public class TableInIframeRowClickScrollJumpTest extends MultiBrowserTest {
Long scrollPosition2 = getWindowsScrollPosition();
- assertThat("Scroll position should stay about the same. Old was "
- + scrollPosition + " and new one " + scrollPosition2,
+ assertThat(
+ "Scroll position should stay about the same. Old was "
+ + scrollPosition + " and new one " + scrollPosition2,
Math.abs(scrollPosition - scrollPosition2) < 10);
}
@@ -104,8 +105,8 @@ public class TableInIframeRowClickScrollJumpTest extends MultiBrowserTest {
driver.switchTo().defaultContent();
JavascriptExecutor executor = (JavascriptExecutor) driver;
- Long value = (Long) executor
- .executeScript("if (window.pageYOffset) return window.pageYOffset;else if (window.document.documentElement.scrollTop) return window.document.documentElement.scrollTop;else return window.document.body.scrollTop;");
+ Long value = (Long) executor.executeScript(
+ "if (window.pageYOffset) return window.pageYOffset;else if (window.document.documentElement.scrollTop) return window.document.documentElement.scrollTop;else return window.document.body.scrollTop;");
// back to the iframe
switchIntoIframe();
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/TableItemDescriptionGeneratorUITest.java b/uitest/src/test/java/com/vaadin/tests/components/table/TableItemDescriptionGeneratorUITest.java
index 555a38a91e..e7b420364c 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/TableItemDescriptionGeneratorUITest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/TableItemDescriptionGeneratorUITest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,7 +30,7 @@ import com.vaadin.tests.tb3.TooltipTest;
/**
* Tests Table tooltips with various settings.
- *
+ *
* @author Vaadin Ltd
*/
public class TableItemDescriptionGeneratorUITest extends TooltipTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/TableMatchesMouseDownMouseUpElementTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/TableMatchesMouseDownMouseUpElementTest.java
index ea730ea30e..83ea518d8d 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/TableMatchesMouseDownMouseUpElementTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/TableMatchesMouseDownMouseUpElementTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,7 +31,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Regular click cases already covered by @LabelEmbeddedClickThroughForTableTest
* Testing cases when mouse down and mouse up positions are different
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -140,8 +140,8 @@ public class TableMatchesMouseDownMouseUpElementTest extends MultiBrowserTest {
}
private List<WebElement> getSelectedRows() {
- return table.findElement(By.className("v-table-body")).findElements(
- By.className("v-selected"));
+ return table.findElement(By.className("v-table-body"))
+ .findElements(By.className("v-selected"));
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/TableMoveFocusWithSelectionTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/TableMoveFocusWithSelectionTest.java
index 30bddc2666..b2808afbbf 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/TableMoveFocusWithSelectionTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/TableMoveFocusWithSelectionTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests if table focus is moved correctly to the selected item
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -40,8 +40,8 @@ public class TableMoveFocusWithSelectionTest extends MultiBrowserTest {
getDriver().findElement(By.id("row-5")).click();
// Ensure row 5 gets focused
- WebElement row5TableRow = getDriver().findElement(
- By.xpath("//div[@id='row-5']/../../.."));
+ WebElement row5TableRow = getDriver()
+ .findElement(By.xpath("//div[@id='row-5']/../../.."));
String row5StyleName = row5TableRow.getAttribute("class");
assertTrue(row5StyleName.contains("v-table-focus"));
}
@@ -58,8 +58,8 @@ public class TableMoveFocusWithSelectionTest extends MultiBrowserTest {
getDriver().findElement(By.id("row-7")).click();
// Clicking a row should get the row focus
- WebElement row7TableRow = getDriver().findElement(
- By.xpath("//div[@id='row-7']/../../.."));
+ WebElement row7TableRow = getDriver()
+ .findElement(By.xpath("//div[@id='row-7']/../../.."));
String row7StyleName = row7TableRow.getAttribute("class");
assertTrue(row7StyleName.contains("v-table-focus"));
@@ -73,8 +73,8 @@ public class TableMoveFocusWithSelectionTest extends MultiBrowserTest {
getDriver().findElement(By.id("test-table")).click();
// Ensure row 7 is still focused
- row7TableRow = getDriver().findElement(
- By.xpath("//div[@id='row-7']/../../.."));
+ row7TableRow = getDriver()
+ .findElement(By.xpath("//div[@id='row-7']/../../.."));
row7StyleName = row7TableRow.getAttribute("class");
assertTrue(row7StyleName.contains("v-table-focus"));
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/TableNavigationPageDownTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/TableNavigationPageDownTest.java
index 4ab42a5f94..5c56dded86 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/TableNavigationPageDownTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/TableNavigationPageDownTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -35,7 +35,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests that navigation with PageDown/PageUp/Home/End in Table works
- *
+ *
* @author Vaadin Ltd
*/
public class TableNavigationPageDownTest extends MultiBrowserTest {
@@ -116,8 +116,8 @@ public class TableNavigationPageDownTest extends MultiBrowserTest {
// page downs.
// Can't use v-table-body height because lower rows haven't been
// fetched yet.
- testBenchElement(wrapper).scroll(
- ROW_NUMBER * rowHeight - (int) (2.8 * pageHeight));
+ testBenchElement(wrapper)
+ .scroll(ROW_NUMBER * rowHeight - (int) (2.8 * pageHeight));
waitForScrollToFinish();
getLastVisibleRow().click();
@@ -166,8 +166,8 @@ public class TableNavigationPageDownTest extends MultiBrowserTest {
waitUntil(new ExpectedCondition<Boolean>() {
@Override
public Boolean apply(WebDriver input) {
- List<WebElement> elements = findElements(By
- .className("v-table-scrollposition"));
+ List<WebElement> elements = findElements(
+ By.className("v-table-scrollposition"));
return elements.isEmpty() || !elements.get(0).isDisplayed();
}
@@ -183,8 +183,8 @@ public class TableNavigationPageDownTest extends MultiBrowserTest {
* Returns row number from its first cell
*/
private int getRowNumber(WebElement row) {
- return Integer.valueOf(row.findElement(
- By.className("v-table-cell-wrapper")).getText());
+ return Integer.valueOf(row
+ .findElement(By.className("v-table-cell-wrapper")).getText());
}
/**
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/TableParentEnabledStateChangeTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/TableParentEnabledStateChangeTest.java
index 5fde9c385e..81f4518e0a 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/TableParentEnabledStateChangeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/TableParentEnabledStateChangeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/TableRemovedQuicklySendsInvalidRpcCallsTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/TableRemovedQuicklySendsInvalidRpcCallsTest.java
index 968b742aa9..c2eec10888 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/TableRemovedQuicklySendsInvalidRpcCallsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/TableRemovedQuicklySendsInvalidRpcCallsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,8 +23,8 @@ import org.openqa.selenium.WebElement;
import com.vaadin.tests.tb3.MultiBrowserTest;
-public class TableRemovedQuicklySendsInvalidRpcCallsTest extends
- MultiBrowserTest {
+public class TableRemovedQuicklySendsInvalidRpcCallsTest
+ extends MultiBrowserTest {
private static final String BUTTON_ID = TableRemovedQuicklySendsInvalidRpcCalls.BUTTON_ID;
private static final String FAILURE_CAPTION = TableRemovedQuicklySendsInvalidRpcCalls.FAILURE_CAPTION;
@@ -35,18 +35,18 @@ public class TableRemovedQuicklySendsInvalidRpcCallsTest extends
setDebug(true);
openTestURL();
- assertFalse("Test started with the error present.", button().getText()
- .equals(FAILURE_CAPTION));
+ assertFalse("Test started with the error present.",
+ button().getText().equals(FAILURE_CAPTION));
assertFalse("Test jumped the gun.",
button().getText().equals(SUCCESS_CAPTION));
button().click();
Thread.sleep(5000);
- assertFalse("Test failed after trying to trigger the error.", button()
- .getText().equals(FAILURE_CAPTION));
- assertTrue("Test didn't end up in correct success state.", button()
- .getText().equals(SUCCESS_CAPTION));
+ assertFalse("Test failed after trying to trigger the error.",
+ button().getText().equals(FAILURE_CAPTION));
+ assertTrue("Test didn't end up in correct success state.",
+ button().getText().equals(SUCCESS_CAPTION));
}
private WebElement button() {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/TableRepairsScrollPositionOnReAddingAllRowsTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/TableRepairsScrollPositionOnReAddingAllRowsTest.java
index 4ca3ed406b..a7ca154d7a 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/TableRepairsScrollPositionOnReAddingAllRowsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/TableRepairsScrollPositionOnReAddingAllRowsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,11 +27,11 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Scroll position should be restored when removing and re-adding all rows in
* Table.
- *
+ *
* @author Vaadin Ltd
*/
-public class TableRepairsScrollPositionOnReAddingAllRowsTest extends
- MultiBrowserTest {
+public class TableRepairsScrollPositionOnReAddingAllRowsTest
+ extends MultiBrowserTest {
private int rowLocation0;
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/TableRequiredIndicatorTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/TableRequiredIndicatorTest.java
index b94ddaee45..13cc7c082e 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/TableRequiredIndicatorTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/TableRequiredIndicatorTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Checks that Table that has required flag set to true is also indicated as
* such on the client side.
- *
+ *
* @author Vaadin Ltd
*/
public class TableRequiredIndicatorTest extends MultiBrowserTest {
@@ -32,8 +32,8 @@ public class TableRequiredIndicatorTest extends MultiBrowserTest {
@Test
public void testRequiredIndicatorIsVisible() {
openTestURL();
- Assert.assertTrue(isElementPresent(By
- .className("v-required-field-indicator")));
+ Assert.assertTrue(
+ isElementPresent(By.className("v-required-field-indicator")));
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/TableRowHeight2Test.java b/uitest/src/test/java/com/vaadin/tests/components/table/TableRowHeight2Test.java
index 7074225311..c076515c25 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/TableRowHeight2Test.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/TableRowHeight2Test.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests that rows are completely visible and clicking buttons doesn't change
* anything.
- *
+ *
* @author Vaadin Ltd
*/
public class TableRowHeight2Test extends MultiBrowserTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/TableRowScrolledBottomTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/TableRowScrolledBottomTest.java
index 0fad02b410..fbe07a9e24 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/TableRowScrolledBottomTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/TableRowScrolledBottomTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,7 +31,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests that adding long labels to a Table and scrolling to the bottom works as
* intended.
- *
+ *
* @author Vaadin Ltd
*/
public class TableRowScrolledBottomTest extends MultiBrowserTest {
@@ -60,8 +60,8 @@ public class TableRowScrolledBottomTest extends MultiBrowserTest {
button.click();
sleep(500);
- rows = table.findElement(By.className("v-table-body")).findElements(
- By.tagName("tr"));
+ rows = table.findElement(By.className("v-table-body"))
+ .findElements(By.tagName("tr"));
// check that the final row is the one intended
finalRow = rows.get(rows.size() - 1);
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/TableScrollAfterAddRowTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/TableScrollAfterAddRowTest.java
index d390b57823..c2b6b08345 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/TableScrollAfterAddRowTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/TableScrollAfterAddRowTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -65,8 +65,8 @@ public class TableScrollAfterAddRowTest extends MultiBrowserTest {
}
private void scrollUp() {
- WebElement actualElement = getDriver().findElement(
- By.className("v-table-body-wrapper"));
+ WebElement actualElement = getDriver()
+ .findElement(By.className("v-table-body-wrapper"));
JavascriptExecutor js = new TestBenchCommandExecutor(getDriver(),
new ImageComparison(), new ReferenceNameGenerator());
js.executeScript("arguments[0].scrollTop = " + 30, actualElement);
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/TableScrollUpOnSelectTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/TableScrollUpOnSelectTest.java
index b2fde31b93..5c5d2b1719 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/TableScrollUpOnSelectTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/TableScrollUpOnSelectTest.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -29,7 +29,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
* Test to see if Table appears to scroll up under an obscure set of conditions
* (Scrolled down, set to expand, selecting updates a TextField that precedes
* the Table in a VerticalLayout.) (#10106)
- *
+ *
* @author Vaadin Ltd
*/
public class TableScrollUpOnSelectTest extends MultiBrowserTest {
@@ -40,8 +40,8 @@ public class TableScrollUpOnSelectTest extends MultiBrowserTest {
// WebElement table = driver.findElement(By.vaadin("//Table"));
WebElement row = $(TableElement.class).first().getCell(49, 0);
- final WebElement scrollPositionDisplay = getDriver().findElement(
- By.className("v-table-scrollposition"));
+ final WebElement scrollPositionDisplay = getDriver()
+ .findElement(By.className("v-table-scrollposition"));
waitUntilNot(new ExpectedCondition<Boolean>() {
@Override
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/TableScrollingWithSQLContainerTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/TableScrollingWithSQLContainerTest.java
index 01f75f7875..6f8acb3e7c 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/TableScrollingWithSQLContainerTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/TableScrollingWithSQLContainerTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/TableSizeInTabsheetTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/TableSizeInTabsheetTest.java
index a984ed81e5..335be946e6 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/TableSizeInTabsheetTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/TableSizeInTabsheetTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -43,8 +43,8 @@ public class TableSizeInTabsheetTest extends MultiBrowserTest {
}
private int getTableSheetContentHeight() {
- WebElement tabsheetContent = vaadinElementById(TABSHEET).findElement(
- By.className(TABSHEET_CONTENT_STYLENAME));
+ WebElement tabsheetContent = vaadinElementById(TABSHEET)
+ .findElement(By.className(TABSHEET_CONTENT_STYLENAME));
return tabsheetContent.getSize().getHeight();
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/TableSortingIndicatorTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/TableSortingIndicatorTest.java
index 8453f5d67f..e587a37a71 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/TableSortingIndicatorTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/TableSortingIndicatorTest.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -25,7 +25,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests if the sort indicator is visible after the table has been sorted from
* the serverside.
- *
+ *
* @author Vaadin Ltd
*/
public class TableSortingIndicatorTest extends MultiBrowserTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/TableToggleColumnVisibilityTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/TableToggleColumnVisibilityTest.java
index 57ebfb7040..caeb6dbd32 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/TableToggleColumnVisibilityTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/TableToggleColumnVisibilityTest.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -27,7 +27,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests that column keeps its header, icon, alignment after toggling visibility
* (#6245, #12303).
- *
+ *
* @author Vaadin Ltd
*/
public class TableToggleColumnVisibilityTest extends MultiBrowserTest {
@@ -36,10 +36,10 @@ public class TableToggleColumnVisibilityTest extends MultiBrowserTest {
public void testColumnWidthRestoredAfterTogglingVisibility() {
openTestURL();
- ButtonElement toggleVisibilityButton = $(ButtonElement.class).id(
- "visib-toggler");
- ButtonElement changeOrderButton = $(ButtonElement.class).id(
- "order-toggler");
+ ButtonElement toggleVisibilityButton = $(ButtonElement.class)
+ .id("visib-toggler");
+ ButtonElement changeOrderButton = $(ButtonElement.class)
+ .id("order-toggler");
checkHeaderAttributes(1);
@@ -65,16 +65,16 @@ public class TableToggleColumnVisibilityTest extends MultiBrowserTest {
TableHeaderElement headerCell = $(TableElement.class).first()
.getHeaderCell(columnNumber);
- Assert.assertTrue("Column header text should be custom", headerCell
- .getText().equalsIgnoreCase("Hello World"));
+ Assert.assertTrue("Column header text should be custom",
+ headerCell.getText().equalsIgnoreCase("Hello World"));
- Assert.assertTrue("Column should have an icon", headerCell
- .findElements(By.className("v-icon")).size() > 0);
+ Assert.assertTrue("Column should have an icon",
+ headerCell.findElements(By.className("v-icon")).size() > 0);
- Assert.assertTrue(
- "Column should have alignment to the right",
- headerCell.findElements(
- By.className("v-table-caption-container-align-right"))
+ Assert.assertTrue("Column should have alignment to the right",
+ headerCell
+ .findElements(By.className(
+ "v-table-caption-container-align-right"))
.size() > 0);
}
} \ No newline at end of file
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/TableToggleColumnVisibilityWidthTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/TableToggleColumnVisibilityWidthTest.java
index c89678d846..511bce3b34 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/TableToggleColumnVisibilityWidthTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/TableToggleColumnVisibilityWidthTest.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -25,7 +25,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests that column keeps its width after it is made invisible and visible
* again (#12303).
- *
+ *
* @author Vaadin Ltd
*/
public class TableToggleColumnVisibilityWidthTest extends MultiBrowserTest {
@@ -36,7 +36,7 @@ public class TableToggleColumnVisibilityWidthTest extends MultiBrowserTest {
int secondColumnWidthInitial = findElements(
By.className("v-table-header-cell")).get(1).getSize()
- .getWidth();
+ .getWidth();
ButtonElement toggleButton = $(ButtonElement.class).id("toggler");
toggleButton.click();
@@ -48,7 +48,7 @@ public class TableToggleColumnVisibilityWidthTest extends MultiBrowserTest {
findElements(By.className("v-table-header-cell")).size(), 2);
int secondColumnWidthRestored = findElements(
By.className("v-table-header-cell")).get(1).getSize()
- .getWidth();
+ .getWidth();
Assert.assertEquals(
"Column width should be the same as it was before hiding",
secondColumnWidthInitial, secondColumnWidthRestored);
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/TableTooManyColumnsTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/TableTooManyColumnsTest.java
index 2244365e00..fb9f14f14c 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/TableTooManyColumnsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/TableTooManyColumnsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,8 +30,8 @@ public class TableTooManyColumnsTest extends MultiBrowserTest {
public void testDropdownTable() throws IOException {
openTestURL();
- WebElement element = findElement(By
- .className("v-table-column-selector"));
+ WebElement element = findElement(
+ By.className("v-table-column-selector"));
element.click();
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/TableVisibleColumnsUpdateTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/TableVisibleColumnsUpdateTest.java
index 060b79f65f..87cd1c1b47 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/TableVisibleColumnsUpdateTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/TableVisibleColumnsUpdateTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests Table Footer ClickListener
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/TableWidthItemRemoveTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/TableWidthItemRemoveTest.java
index f96641be4c..d80e3496d9 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/TableWidthItemRemoveTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/TableWidthItemRemoveTest.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -25,7 +25,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test whether adding the first item to a table calculates the table width
* correctly
- *
+ *
* @author Vaadin Ltd
*/
public class TableWidthItemRemoveTest extends MultiBrowserTest {
@@ -33,14 +33,14 @@ public class TableWidthItemRemoveTest extends MultiBrowserTest {
public void testWidthResizeOnItemAdd() {
openTestURL();
- WebElement populateButton = driver.findElement(By
- .vaadin("//Button[caption=\"Populate\"]"));
- WebElement table = driver.findElement(By
- .vaadin("//Table[caption=\"My table\"]"));
+ WebElement populateButton = driver
+ .findElement(By.vaadin("//Button[caption=\"Populate\"]"));
+ WebElement table = driver
+ .findElement(By.vaadin("//Table[caption=\"My table\"]"));
int original_width = table.getSize().getWidth();
populateButton.click();
- Assert.assertTrue("Width changed on item add.", original_width == table
- .getSize().getWidth());
+ Assert.assertTrue("Width changed on item add.",
+ original_width == table.getSize().getWidth());
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/TableWithContainerRequiringEqualsForItemIdTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/TableWithContainerRequiringEqualsForItemIdTest.java
index 1eb5cad821..1193bb538a 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/TableWithContainerRequiringEqualsForItemIdTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/TableWithContainerRequiringEqualsForItemIdTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,11 +28,11 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test for a Table with a customised BeanItemContainer.
- *
+ *
* @author Vaadin Ltd
*/
-public class TableWithContainerRequiringEqualsForItemIdTest extends
- MultiBrowserTest {
+public class TableWithContainerRequiringEqualsForItemIdTest
+ extends MultiBrowserTest {
@Test
public void testSorting() {
@@ -68,8 +68,8 @@ public class TableWithContainerRequiringEqualsForItemIdTest extends
}
private void checkFirstCell(TableElement table, String expected) {
- assertEquals("unexpected contents", expected, table.getCell(0, 0)
- .getText());
+ assertEquals("unexpected contents", expected,
+ table.getCell(0, 0).getText());
}
private void clickTableHeaderToSort(TableElement table) {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/TableWithPollingTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/TableWithPollingTest.java
index 14994f8b02..8c25918a9a 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/TableWithPollingTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/TableWithPollingTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -62,8 +62,8 @@ public class TableWithPollingTest extends MultiBrowserTest {
}
private WebElement getColumnResizer(int column) {
- return getHeaderCell(column).findElement(
- By.className("v-table-resizer"));
+ return getHeaderCell(column)
+ .findElement(By.className("v-table-resizer"));
}
private void resizeColumn(int column, int by) throws InterruptedException {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/TextFieldRelativeWidthTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/TextFieldRelativeWidthTest.java
index 520ffa1aec..04b7c79638 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/TextFieldRelativeWidthTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/TextFieldRelativeWidthTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests that a TextField with 100% width fills the expanded column.
- *
+ *
* @author Vaadin Ltd
*/
public class TextFieldRelativeWidthTest extends MultiBrowserTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/TextFieldValueGoesMissingTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/TextFieldValueGoesMissingTest.java
index 387882b6ca..81232d9e7c 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/TextFieldValueGoesMissingTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/TextFieldValueGoesMissingTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,7 +27,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests that a text field's value isn't cleared after a label in the same
* layout is changed.
- *
+ *
* @since 7.3
* @author Vaadin Ltd
*/
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/UnnecessaryScrollbarWhenZoomingTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/UnnecessaryScrollbarWhenZoomingTest.java
index f0325ed77b..5d545e3b97 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/UnnecessaryScrollbarWhenZoomingTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/UnnecessaryScrollbarWhenZoomingTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -56,9 +56,9 @@ public class UnnecessaryScrollbarWhenZoomingTest extends MultiBrowserTest {
zoomSetter.resetZoom();
openTestURL();
// IE sometimes has trouble waiting long enough.
- new WebDriverWait(getDriver(), 30).until(ExpectedConditions
- .presenceOfElementLocated(By
- .cssSelector(".v-table-body-wrapper")));
+ new WebDriverWait(getDriver(), 30)
+ .until(ExpectedConditions.presenceOfElementLocated(
+ By.cssSelector(".v-table-body-wrapper")));
}
@Test
@@ -94,8 +94,8 @@ public class UnnecessaryScrollbarWhenZoomingTest extends MultiBrowserTest {
} catch (InterruptedException e) {
Assert.fail();
}
- WebElement element = findElement(By
- .cssSelector(".v-table-body-wrapper"));
+ WebElement element = findElement(
+ By.cssSelector(".v-table-body-wrapper"));
assertNotNull("There must be a table", element);
String overflow = element.getCssValue("overflow");
// As long as the overflow is hidden, there will not be scroll bars.
@@ -110,7 +110,8 @@ public class UnnecessaryScrollbarWhenZoomingTest extends MultiBrowserTest {
String detectVerticalScroll = "return arguments[0].scrollHeight > arguments[0].clientHeight";
Boolean vertical = (Boolean) ((TestBenchCommandExecutor) getDriver())
.executeScript(detectVerticalScroll, element);
- assertEquals("there must be no vertical scrollbar", false, vertical);
+ assertEquals("there must be no vertical scrollbar", false,
+ vertical);
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/UpdateTableWhenUnfocusedTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/UpdateTableWhenUnfocusedTest.java
index fcd73f541d..ec998015af 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/table/UpdateTableWhenUnfocusedTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/table/UpdateTableWhenUnfocusedTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/tabsheet/EmptyTabSheetTest.java b/uitest/src/test/java/com/vaadin/tests/components/tabsheet/EmptyTabSheetTest.java
index 6d0b78debd..f8c9450ed1 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/tabsheet/EmptyTabSheetTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/tabsheet/EmptyTabSheetTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -34,8 +34,8 @@ public class EmptyTabSheetTest extends MultiBrowserTest {
public void emptyTabSheetValo() {
openTestURL("theme=valo");
- WebElement deco = getDriver().findElement(
- By.className("v-tabsheet-deco"));
+ WebElement deco = getDriver()
+ .findElement(By.className("v-tabsheet-deco"));
Assert.assertEquals("none", deco.getCssValue("display"));
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleInTabsheetTest.java b/uitest/src/test/java/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleInTabsheetTest.java
index 99c47b1703..a96806bf37 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleInTabsheetTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleInTabsheetTest.java
@@ -16,8 +16,8 @@ public class FirstTabNotVisibleInTabsheetTest extends MultiBrowserTest {
TabSheetElement tabSheet = $(TabSheetElement.class).first();
- Assert.assertTrue("TabSheet should have first tab visible", tabSheet
- .getTabCaptions().contains("first visible tab"));
+ Assert.assertTrue("TabSheet should have first tab visible",
+ tabSheet.getTabCaptions().contains("first visible tab"));
}
private void toggleFirstTabVisibility() {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleWhenTabsheetNotClippedTest.java b/uitest/src/test/java/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleWhenTabsheetNotClippedTest.java
index 4d72f3e6fb..139b9e0821 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleWhenTabsheetNotClippedTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleWhenTabsheetNotClippedTest.java
@@ -8,27 +8,27 @@ import org.junit.Assert;
import org.junit.Test;
import org.openqa.selenium.WebElement;
-public class FirstTabNotVisibleWhenTabsheetNotClippedTest extends
- MultiBrowserTest {
+public class FirstTabNotVisibleWhenTabsheetNotClippedTest
+ extends MultiBrowserTest {
@Test
public void testNotClippedTabIsVisible() throws InterruptedException {
openTestURL();
- ButtonElement toggleNotClipped = $(ButtonElement.class).caption(
- "Toggle first not clipped tab").first();
+ ButtonElement toggleNotClipped = $(ButtonElement.class)
+ .caption("Toggle first not clipped tab").first();
toggleNotClipped.click();
TabSheetElement notClippedTabSheet = $(TabSheetElement.class).get(0);
- WebElement firstTab = notClippedTabSheet.findElement(By
- .className("v-tabsheet-tabitemcell-first"));
+ WebElement firstTab = notClippedTabSheet
+ .findElement(By.className("v-tabsheet-tabitemcell-first"));
String caption = firstTab.findElement(By.className("v-captiontext"))
.getText();
Assert.assertEquals("Tab with -first style should be Tab 1", "Tab 1",
caption);
toggleNotClipped.click();
- firstTab = notClippedTabSheet.findElement(By
- .className("v-tabsheet-tabitemcell-first"));
+ firstTab = notClippedTabSheet
+ .findElement(By.className("v-tabsheet-tabitemcell-first"));
caption = firstTab.findElement(By.className("v-captiontext")).getText();
Assert.assertEquals("Tab with -first style should be Tab 0", "Tab 0",
caption);
@@ -41,20 +41,20 @@ public class FirstTabNotVisibleWhenTabsheetNotClippedTest extends
$(ButtonElement.class).caption("show tab D").get(0).click();
$(ButtonElement.class).caption("show tab C").get(0).click();
- WebElement firstTab = $(TabSheetElement.class).get(2).findElement(
- By.className("v-tabsheet-tabitemcell-first"));
- String firstCaption = firstTab.findElement(
- By.className("v-captiontext")).getText();
+ WebElement firstTab = $(TabSheetElement.class).get(2)
+ .findElement(By.className("v-tabsheet-tabitemcell-first"));
+ String firstCaption = firstTab
+ .findElement(By.className("v-captiontext")).getText();
org.junit.Assert.assertEquals("tab C", firstCaption);
$(ButtonElement.class).caption("show tab D").get(1).click();
$(ButtonElement.class).caption("show tab C").get(1).click();
- WebElement secondTab = $(TabSheetElement.class).get(3).findElement(
- By.className("v-tabsheet-tabitemcell-first"));
- String secondCaption = secondTab.findElement(
- By.className("v-captiontext")).getText();
+ WebElement secondTab = $(TabSheetElement.class).get(3)
+ .findElement(By.className("v-tabsheet-tabitemcell-first"));
+ String secondCaption = secondTab
+ .findElement(By.className("v-captiontext")).getText();
org.junit.Assert.assertEquals("tab C", secondCaption);
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/tabsheet/HtmlInTabCaptionTest.java b/uitest/src/test/java/com/vaadin/tests/components/tabsheet/HtmlInTabCaptionTest.java
index 41b7037b09..889c1a13c7 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/tabsheet/HtmlInTabCaptionTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/tabsheet/HtmlInTabCaptionTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/tabsheet/NewSelectionAfterTabRemoveTest.java b/uitest/src/test/java/com/vaadin/tests/components/tabsheet/NewSelectionAfterTabRemoveTest.java
index bffbc3ecdf..50cb028d54 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/tabsheet/NewSelectionAfterTabRemoveTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/tabsheet/NewSelectionAfterTabRemoveTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Automatic test of the default TabSheet selection algorithm when removing a
* selected tab.
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -69,18 +69,18 @@ public class NewSelectionAfterTabRemoveTest extends MultiBrowserTest {
* Gets the selected state of the specified tab.
*/
private boolean isTabSelected(TestBenchElement tab) {
- return tab.getAttribute("class").contains(
- "v-tabsheet-tabitemcell-selected")
- && tab.getAttribute("class").contains(
- "v-tabsheet-tabitemcell-focus");
+ return tab.getAttribute("class")
+ .contains("v-tabsheet-tabitemcell-selected")
+ && tab.getAttribute("class")
+ .contains("v-tabsheet-tabitemcell-focus");
}
/*
* Scroll the tabsheet bar to the right.
*/
private boolean scrollRight() {
- List<WebElement> scrollElements = getDriver().findElements(
- By.className("v-tabsheet-scrollerNext"));
+ List<WebElement> scrollElements = getDriver()
+ .findElements(By.className("v-tabsheet-scrollerNext"));
if (!scrollElements.isEmpty()) {
TestBenchElement rightScrollElement = (TestBenchElement) scrollElements
.get(0);
@@ -95,8 +95,8 @@ public class NewSelectionAfterTabRemoveTest extends MultiBrowserTest {
* Provide the tab close button for the specified tab.
*/
private TestBenchElement tabClose(TestBenchElement tab) {
- return (TestBenchElement) tab.findElement(By
- .className("v-tabsheet-caption-close"));
+ return (TestBenchElement) tab
+ .findElement(By.className("v-tabsheet-caption-close"));
}
/*
diff --git a/uitest/src/test/java/com/vaadin/tests/components/tabsheet/PreventTabChangeTest.java b/uitest/src/test/java/com/vaadin/tests/components/tabsheet/PreventTabChangeTest.java
index dd0d8fb44f..4a515a01df 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/tabsheet/PreventTabChangeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/tabsheet/PreventTabChangeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,11 +32,13 @@ public class PreventTabChangeTest extends MultiBrowserTest {
clickTab(2);
Thread.sleep(2000);
assertTabSelected(2);
- Assert.assertEquals("Tab 3 contents", getSelectedTabContent().getText());
+ Assert.assertEquals("Tab 3 contents",
+ getSelectedTabContent().getText());
clickTab(0);
clickTab(2);
assertTabSelected(0);
- Assert.assertEquals("Tab 1 contents", getSelectedTabContent().getText());
+ Assert.assertEquals("Tab 1 contents",
+ getSelectedTabContent().getText());
}
private void assertTabSelected(int i) throws NoSuchElementException {
@@ -50,13 +52,13 @@ public class PreventTabChangeTest extends MultiBrowserTest {
}
private WebElement findTab(int i) {
- return driver.findElement(com.vaadin.testbench.By
- .vaadin("//TabSheet#tab[" + i + "]"));
+ return driver.findElement(
+ com.vaadin.testbench.By.vaadin("//TabSheet#tab[" + i + "]"));
}
private WebElement getSelectedTabContent() {
- return driver.findElement(com.vaadin.testbench.By
- .vaadin("//TabSheet#tabpanel"));
+ return driver.findElement(
+ com.vaadin.testbench.By.vaadin("//TabSheet#tabpanel"));
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabBarWidthTest.java b/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabBarWidthTest.java
index a30a155c01..d67b8d13b0 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabBarWidthTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabBarWidthTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabKeyboardNavigationTest.java b/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabKeyboardNavigationTest.java
index 65307f9492..33cb148228 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabKeyboardNavigationTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabKeyboardNavigationTest.java
@@ -175,8 +175,8 @@ public class TabKeyboardNavigationTest extends MultiBrowserTest {
private TestBenchElement tab(int index) {
By by = By.className("v-tabsheet-tabitemcell");
- TestBenchElement element = (TestBenchElement) getDriver().findElements(
- by).get(index - 1);
+ TestBenchElement element = (TestBenchElement) getDriver()
+ .findElements(by).get(index - 1);
String expected = "Tab " + index;
Assert.assertEquals(expected,
diff --git a/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSelectionRevertedByServerTest.java b/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSelectionRevertedByServerTest.java
index 64aee8768b..946a50b24a 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSelectionRevertedByServerTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSelectionRevertedByServerTest.java
@@ -64,8 +64,8 @@ public class TabSelectionRevertedByServerTest extends MultiBrowserTest {
TestBenchElement tabWrong = tab(wrongIndex);
String attributeClassWrong = tabWrong.getAttribute("class");
- Assert.assertTrue("Tab " + wrongIndex
- + " should be selected when click on Tab 4",
+ Assert.assertTrue(
+ "Tab " + wrongIndex + " should be selected when click on Tab 4",
!attributeClassWrong
.contains("v-tabsheet-tabitemcell-selected"));
}
@@ -99,8 +99,8 @@ public class TabSelectionRevertedByServerTest extends MultiBrowserTest {
private TestBenchElement tab(int index) {
By by = By.className("v-tabsheet-tabitemcell");
- TestBenchElement element = (TestBenchElement) getDriver().findElements(
- by).get(index - 1);
+ TestBenchElement element = (TestBenchElement) getDriver()
+ .findElements(by).get(index - 1);
String expected = "Tab " + index;
Assert.assertEquals(expected,
diff --git a/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSheetCloseTest.java b/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSheetCloseTest.java
index 5314038d72..9d83d82297 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSheetCloseTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSheetCloseTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
* Tests that when closing the last tab on a TabSheet, another tab gets selected
* with no error. Only the last tab should be visible, so the actual TabSheet
* width should be small.
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSheetErrorTooltipTest.java b/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSheetErrorTooltipTest.java
index 5462ed2532..2e15c5bfaa 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSheetErrorTooltipTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSheetErrorTooltipTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -73,18 +73,19 @@ public class TabSheetErrorTooltipTest extends MultiBrowserTest {
}
private WebElement getTab(int index) {
- return vaadinElement("/VTabsheet[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild["
- + index + "]/domChild[0]");
+ return vaadinElement(
+ "/VTabsheet[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild["
+ + index + "]/domChild[0]");
}
private WebElement getCurrentTooltip() {
- return getDriver().findElement(
- By.xpath("//div[@class='v-tooltip-text']"));
+ return getDriver()
+ .findElement(By.xpath("//div[@class='v-tooltip-text']"));
}
private WebElement getCurrentErrorMessage() {
- return getDriver().findElement(
- By.xpath("//div[@class='v-errormessage']"));
+ return getDriver()
+ .findElement(By.xpath("//div[@class='v-errormessage']"));
}
private void assertTooltip(String tooltip) {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSheetFocusedTabTest.java b/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSheetFocusedTabTest.java
index 52003bbac9..fc9b9ef437 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSheetFocusedTabTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSheetFocusedTabTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -68,10 +68,9 @@ public class TabSheetFocusedTabTest extends MultiBrowserTest {
}
private WebElement getTab(int index) {
- return getDriver()
- .findElement(
- By.xpath("(//table[contains(@class, 'v-tabsheet-tabs')])[1]/tbody/tr/td["
- + (index + 1) + "]/div"));
+ return getDriver().findElement(By
+ .xpath("(//table[contains(@class, 'v-tabsheet-tabs')])[1]/tbody/tr/td["
+ + (index + 1) + "]/div"));
}
private boolean isFocused(WebElement tab) {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSheetFocusingTest.java b/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSheetFocusingTest.java
index 62948bed06..ce07386ae9 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSheetFocusingTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSheetFocusingTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -37,8 +37,7 @@ public class TabSheetFocusingTest extends MultiBrowserTest {
}
private WebElement getButton(String caption) {
- return driver.findElement(By
- .xpath("//span[@class='v-button-caption'][text()='" + caption
- + "']"));
+ return driver.findElement(By.xpath(
+ "//span[@class='v-button-caption'][text()='" + caption + "']"));
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSheetInDisabledParentTest.java b/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSheetInDisabledParentTest.java
index 5070fd069c..b3b4e5dc1f 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSheetInDisabledParentTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSheetInDisabledParentTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test to check that TabsheetBaseConnector reacts on disabling its parent.
- *
+ *
* @author Vaadin Ltd
*/
public class TabSheetInDisabledParentTest extends MultiBrowserTest {
@@ -39,8 +39,8 @@ public class TabSheetInDisabledParentTest extends MultiBrowserTest {
// disable parent
button.click();
- List<WebElement> tabHeaders = getDriver().findElements(
- By.className("v-tabsheet-tabitemcell"));
+ List<WebElement> tabHeaders = getDriver()
+ .findElements(By.className("v-tabsheet-tabitemcell"));
tabHeaders.get(1).findElement(By.className("v-captiontext")).click();
Assert.assertFalse(
@@ -52,8 +52,8 @@ public class TabSheetInDisabledParentTest extends MultiBrowserTest {
button.click();
// selected tab is still the same
- tabHeaders = getDriver().findElements(
- By.className("v-tabsheet-tabitemcell"));
+ tabHeaders = getDriver()
+ .findElements(By.className("v-tabsheet-tabitemcell"));
Assert.assertTrue(
"Tabsheet has wrong selected tab after enabling its parent",
tabHeaders.get(0).getAttribute("class")
diff --git a/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSheetInSplitPanelTest.java b/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSheetInSplitPanelTest.java
index 8070133bde..0c644c1f11 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSheetInSplitPanelTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSheetInSplitPanelTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,8 +30,8 @@ public class TabSheetInSplitPanelTest extends MultiBrowserTest {
public void ensureNoScrollbars() {
openTestURL();
TabSheetElement ts = $(TabSheetElement.class).first();
- List<WebElement> scrollables = ts.findElements(By
- .xpath("//*[contains(@class,'v-scrollable')]"));
+ List<WebElement> scrollables = ts
+ .findElements(By.xpath("//*[contains(@class,'v-scrollable')]"));
for (WebElement scrollable : scrollables) {
assertNoHorizontalScrollbar(scrollable,
"Element should not have a horizontal scrollbar");
diff --git a/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSheetScrollOnTabCloseTest.java b/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSheetScrollOnTabCloseTest.java
index 8247b436d0..0482a5073b 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSheetScrollOnTabCloseTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSheetScrollOnTabCloseTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,7 +32,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests removing tabs that have been scrolled out of view. This should cause no
* change to the scroll position.
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -42,8 +42,8 @@ public class TabSheetScrollOnTabCloseTest extends MultiBrowserTest {
public void testScrollPositionAfterClosing() throws Exception {
openTestURL();
TabSheetElement ts = $(TabSheetElement.class).first();
- WebElement tabSheetScroller = ts.findElement(By
- .className("v-tabsheet-scrollerNext"));
+ WebElement tabSheetScroller = ts
+ .findElement(By.className("v-tabsheet-scrollerNext"));
// scroll to the right
for (int i = 0; i < 4; i++) {
tabSheetScroller.click();
@@ -73,7 +73,7 @@ public class TabSheetScrollOnTabCloseTest extends MultiBrowserTest {
* and only if shouldBeVisible is true. Used for checking that the leftmost
* visible tab is the expected one when there should be tabs (hidden because
* of scroll position) to the left of tabId.
- *
+ *
* If there is no tab with the specified id, the tab is considered not to be
* visible.
*/
@@ -102,7 +102,7 @@ public class TabSheetScrollOnTabCloseTest extends MultiBrowserTest {
* element is correct. If the element does not exist in the DOM, it is
* considered not to be visible. If several elements match the locator, only
* the visibility of the first matching element is considered.
- *
+ *
* @param locator
* used to find the element
* @param expectedVisibility
@@ -140,7 +140,7 @@ public class TabSheetScrollOnTabCloseTest extends MultiBrowserTest {
/**
* An expectation for checking that the leftmost tab has id equal to tabId.
- *
+ *
* @param tabSheet
* the tab sheet containing the tab
* @param tabId
@@ -152,8 +152,8 @@ public class TabSheetScrollOnTabCloseTest extends MultiBrowserTest {
@Override
public Boolean apply(WebDriver driver) {
try {
- WebElement leftElement = tabSheet.findElement(By
- .cssSelector(".v-tabsheet-tabitemcell"));
+ WebElement leftElement = tabSheet.findElement(
+ By.cssSelector(".v-tabsheet-tabitemcell"));
String leftId = leftElement.getAttribute("id");
return leftId.equals(tabId);
} catch (NoSuchElementException e) {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSpaceNotScrollTest.java b/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSpaceNotScrollTest.java
index c35248c1f4..fbd030105c 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSpaceNotScrollTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabSpaceNotScrollTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test if the page scroll when press space on a tabsheet's tab.
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -38,8 +38,8 @@ public class TabSpaceNotScrollTest extends MultiBrowserTest {
public void testScroll() throws InterruptedException, IOException {
openTestURL();
- TestBenchElement tab = (TestBenchElement) getDriver().findElement(
- By.className("v-tabsheet-tabitemcell"));
+ TestBenchElement tab = (TestBenchElement) getDriver()
+ .findElement(By.className("v-tabsheet-tabitemcell"));
tab.click(10, 10);
Point oldLocation = tab.getLocation();
diff --git a/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabsheetNotEnoughHorizontalSpaceTest.java b/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabsheetNotEnoughHorizontalSpaceTest.java
index 990f545697..387306ff87 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabsheetNotEnoughHorizontalSpaceTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabsheetNotEnoughHorizontalSpaceTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,9 +25,9 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests that tabsheet's scroll button are rendered correctly in Chameleon
* theme.
- *
+ *
* Ticket #12154
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabsheetScrollIntoViewTest.java b/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabsheetScrollIntoViewTest.java
index 8f70b2b704..157c423d85 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabsheetScrollIntoViewTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabsheetScrollIntoViewTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabsheetScrollingTest.java b/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabsheetScrollingTest.java
index 42c384dd78..b230e4a4f7 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabsheetScrollingTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/tabsheet/TabsheetScrollingTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -41,7 +41,8 @@ public class TabsheetScrollingTest extends MultiBrowserTest {
}
private WebElement getTab(int index) {
- return getDriver().findElement(By.vaadin("//TabSheet#tab["+index+"]"));
+ return getDriver()
+ .findElement(By.vaadin("//TabSheet#tab[" + index + "]"));
}
private String getHideButtonText() {
@@ -55,7 +56,9 @@ public class TabsheetScrollingTest extends MultiBrowserTest {
private WebElement getTabByCaption(TabSheetElement ts, String caption) {
WebElement tabBar = ts.findElement(By.className("v-tabsheet-tabs"));
- return tabBar.findElement(By.xpath("./tbody/tr/td[./div/div/div[contains(., normalize-space('"+caption+"'))]]"));
+ return tabBar.findElement(By
+ .xpath("./tbody/tr/td[./div/div/div[contains(., normalize-space('"
+ + caption + "'))]]"));
}
private boolean isTabVisible(TabSheetElement ts, String tabCaption) {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/tabsheet/VetoTabChangeTest.java b/uitest/src/test/java/com/vaadin/tests/components/tabsheet/VetoTabChangeTest.java
index a30299f683..305d5f1658 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/tabsheet/VetoTabChangeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/tabsheet/VetoTabChangeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/textarea/TextAreaSizeResettedTest.java b/uitest/src/test/java/com/vaadin/tests/components/textarea/TextAreaSizeResettedTest.java
index 6365d00735..2850b3cf26 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/textarea/TextAreaSizeResettedTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/textarea/TextAreaSizeResettedTest.java
@@ -75,8 +75,9 @@ public class TextAreaSizeResettedTest extends MultiBrowserTest {
new Actions(getDriver())
.moveToElement(getTextArea(),
TEXTAREAWIDTH - resizeHandlerOffset,
- TEXTAREAHEIGHT - resizeHandlerOffset).clickAndHold()
- .moveByOffset(offset, offset).release().build().perform();
+ TEXTAREAHEIGHT - resizeHandlerOffset)
+ .clickAndHold().moveByOffset(offset, offset).release().build()
+ .perform();
}
@Test
diff --git a/uitest/src/test/java/com/vaadin/tests/components/textfield/AutomaticImmediateTest.java b/uitest/src/test/java/com/vaadin/tests/components/textfield/AutomaticImmediateTest.java
index 4d750d183f..cd8cbef71f 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/textfield/AutomaticImmediateTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/textfield/AutomaticImmediateTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ public class AutomaticImmediateTest extends MultiBrowserTest {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.tb3.AbstractTB3Test#getUIClass()
*/
@Override
@@ -40,17 +40,17 @@ public class AutomaticImmediateTest extends MultiBrowserTest {
public void test() {
openTestURL();
- WebElement field = getDriver().findElement(
- By.id(AutomaticImmediate.FIELD));
+ WebElement field = getDriver()
+ .findElement(By.id(AutomaticImmediate.FIELD));
- WebElement toggle = getDriver().findElement(
- By.xpath("//input[@type = 'checkbox']"));
+ WebElement toggle = getDriver()
+ .findElement(By.xpath("//input[@type = 'checkbox']"));
- WebElement explicitFalseButton = getDriver().findElement(
- By.id(AutomaticImmediate.EXPLICIT_FALSE));
+ WebElement explicitFalseButton = getDriver()
+ .findElement(By.id(AutomaticImmediate.EXPLICIT_FALSE));
- WebElement hitServerButton = getDriver().findElement(
- By.id(AutomaticImmediate.BUTTON));
+ WebElement hitServerButton = getDriver()
+ .findElement(By.id(AutomaticImmediate.BUTTON));
String string = getRandomString();
field.sendKeys(string + Keys.ENTER);
diff --git a/uitest/src/test/java/com/vaadin/tests/components/textfield/EnumTextFieldTest.java b/uitest/src/test/java/com/vaadin/tests/components/textfield/EnumTextFieldTest.java
index fe26fb7aad..0aca3a2011 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/textfield/EnumTextFieldTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/textfield/EnumTextFieldTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/textfield/InputPromptGetTextTest.java b/uitest/src/test/java/com/vaadin/tests/components/textfield/InputPromptGetTextTest.java
index 3128ae3917..ab213d5ca3 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/textfield/InputPromptGetTextTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/textfield/InputPromptGetTextTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,11 +30,11 @@ public class InputPromptGetTextTest extends MultiBrowserTest {
public void test() {
openTestURL();
- WebElement field = getDriver().findElement(
- By.id(InputPromptGetText.FIELD));
+ WebElement field = getDriver()
+ .findElement(By.id(InputPromptGetText.FIELD));
- WebElement button = getDriver().findElement(
- By.id(InputPromptGetText.BUTTON));
+ WebElement button = getDriver()
+ .findElement(By.id(InputPromptGetText.BUTTON));
String string = getRandomString();
field.sendKeys(string + "\n");
@@ -45,8 +45,8 @@ public class InputPromptGetTextTest extends MultiBrowserTest {
button.click();
- WebElement label = getDriver().findElement(
- By.id(InputPromptGetText.LABEL2));
+ WebElement label = getDriver()
+ .findElement(By.id(InputPromptGetText.LABEL2));
Assert.assertEquals("Your input was:", label.getText().trim());
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/textfield/RequiredTextFieldTest.java b/uitest/src/test/java/com/vaadin/tests/components/textfield/RequiredTextFieldTest.java
index c6ed6c1a58..0580922f86 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/textfield/RequiredTextFieldTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/textfield/RequiredTextFieldTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test for .v-required style
- *
+ *
* @author Vaadin Ltd
*/
public class RequiredTextFieldTest extends MultiBrowserTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/textfield/TextFieldEmptyingPromptTest.java b/uitest/src/test/java/com/vaadin/tests/components/textfield/TextFieldEmptyingPromptTest.java
index f4fa5d0dc5..cdc92e6be7 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/textfield/TextFieldEmptyingPromptTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/textfield/TextFieldEmptyingPromptTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/textfield/TextFieldTruncatesUnderscoresInModalDialogsTest.java b/uitest/src/test/java/com/vaadin/tests/components/textfield/TextFieldTruncatesUnderscoresInModalDialogsTest.java
index 66b0df5ff4..39da91b071 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/textfield/TextFieldTruncatesUnderscoresInModalDialogsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/textfield/TextFieldTruncatesUnderscoresInModalDialogsTest.java
@@ -4,8 +4,8 @@ import org.junit.Test;
import com.vaadin.tests.tb3.MultiBrowserTest;
-public class TextFieldTruncatesUnderscoresInModalDialogsTest extends
- MultiBrowserTest {
+public class TextFieldTruncatesUnderscoresInModalDialogsTest
+ extends MultiBrowserTest {
@Test
public void testWindowRepositioning() throws Exception {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/tree/DndTreeTargetDetailsTest.java b/uitest/src/test/java/com/vaadin/tests/components/tree/DndTreeTargetDetailsTest.java
index c1b77df5e9..e82701f3a5 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/tree/DndTreeTargetDetailsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/tree/DndTreeTargetDetailsTest.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -23,7 +23,7 @@ import com.vaadin.tests.components.table.DndTableTargetDetailsTest;
/**
* Test for mouse details in AbstractSelectTargetDetails class when DnD target
* is a tree.
- *
+ *
* @author Vaadin Ltd
*/
public class DndTreeTargetDetailsTest extends DndTableTargetDetailsTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/tree/TreeContextMenuAndIconsTest.java b/uitest/src/test/java/com/vaadin/tests/components/tree/TreeContextMenuAndIconsTest.java
index 81d906bec3..ca483f8f07 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/tree/TreeContextMenuAndIconsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/tree/TreeContextMenuAndIconsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -123,8 +123,8 @@ public class TreeContextMenuAndIconsTest extends MultiBrowserTest {
}
private WebElement getTreeNodeByCaption(String caption) {
- return getDriver().findElement(
- By.xpath("//span[text() = '" + caption + "']"));
+ return getDriver()
+ .findElement(By.xpath("//span[text() = '" + caption + "']"));
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/tree/TreeHtmlContentAllowedTest.java b/uitest/src/test/java/com/vaadin/tests/components/tree/TreeHtmlContentAllowedTest.java
index 351eda6c90..fd5c0a730c 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/tree/TreeHtmlContentAllowedTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/tree/TreeHtmlContentAllowedTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -54,8 +54,8 @@ public class TreeHtmlContentAllowedTest extends SingleBrowserTest {
private void assertTreeCaptionTexts(String... captions) {
TreeElement tree = $(TreeElement.class).first();
- List<WebElement> nodes = tree.findElements(By
- .className("v-tree-node-caption"));
+ List<WebElement> nodes = tree
+ .findElements(By.className("v-tree-node-caption"));
Assert.assertEquals(captions.length, nodes.size());
for (int i = 0; i < captions.length; i++) {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/tree/TreeItemClickListeningTest.java b/uitest/src/test/java/com/vaadin/tests/components/tree/TreeItemClickListeningTest.java
index 2567fdb16d..6bb8248223 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/tree/TreeItemClickListeningTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/tree/TreeItemClickListeningTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,8 +27,8 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
public class TreeItemClickListeningTest extends MultiBrowserTest {
private WebElement getTreeNode(String caption) {
- return getDriver().findElement(
- By.xpath("//span[text() = '" + caption + "']"));
+ return getDriver()
+ .findElement(By.xpath("//span[text() = '" + caption + "']"));
}
@Test
@@ -43,8 +43,7 @@ public class TreeItemClickListeningTest extends MultiBrowserTest {
}
private void assertEventFired(String text) {
- assertThat(
- String.format("Couldn't find text '%s' from the log.", text),
+ assertThat(String.format("Couldn't find text '%s' from the log.", text),
logContainsText(text));
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/tree/TreeItemDoubleClickTest.java b/uitest/src/test/java/com/vaadin/tests/components/tree/TreeItemDoubleClickTest.java
index 95a3f02d60..0e30e8402c 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/tree/TreeItemDoubleClickTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/tree/TreeItemDoubleClickTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -47,8 +47,8 @@ public class TreeItemDoubleClickTest extends MultiBrowserTest {
}
private WebElement getTreeNodeByCaption(String caption) {
- return getDriver().findElement(
- By.xpath("//span[text() = '" + caption + "']"));
+ return getDriver()
+ .findElement(By.xpath("//span[text() = '" + caption + "']"));
}
private void doubleClick(WebElement element) {
@@ -57,8 +57,7 @@ public class TreeItemDoubleClickTest extends MultiBrowserTest {
}
private void assertLogText(String text) {
- assertThat(
- String.format("Couldn't find text '%s' from the log.", text),
+ assertThat(String.format("Couldn't find text '%s' from the log.", text),
logContainsText(text));
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/tree/TreeItemSelectionWithoutImmediateTest.java b/uitest/src/test/java/com/vaadin/tests/components/tree/TreeItemSelectionWithoutImmediateTest.java
index 2fb35b1680..6ea21bc31d 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/tree/TreeItemSelectionWithoutImmediateTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/tree/TreeItemSelectionWithoutImmediateTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -43,19 +43,20 @@ public class TreeItemSelectionWithoutImmediateTest extends MultiBrowserTest {
new Actions(getDriver()).moveToElement(treeItem).click().perform();
Thread.sleep(100);
- WebElement selectedElement = driver.findElement(By
- .className("v-tree-node-selected"));
+ WebElement selectedElement = driver
+ .findElement(By.className("v-tree-node-selected"));
treeItem = getTreeNode(String.format(
TreeItemSelectionWithoutImmediate.MENU_ITEM_TEMPLATE, i));
- assertThat("Clicked element should be selected", selectedElement
- .getText().equals(treeItem.getText()), is(true));
+ assertThat("Clicked element should be selected",
+ selectedElement.getText().equals(treeItem.getText()),
+ is(true));
}
}
private WebElement getTreeNode(String caption) {
- return getDriver().findElement(
- By.xpath("//span[text() = '" + caption + "']"));
+ return getDriver()
+ .findElement(By.xpath("//span[text() = '" + caption + "']"));
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/tree/TreeKeyboardNavigationToNoneTest.java b/uitest/src/test/java/com/vaadin/tests/components/tree/TreeKeyboardNavigationToNoneTest.java
index 98f1896b82..9ed019c2a3 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/tree/TreeKeyboardNavigationToNoneTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/tree/TreeKeyboardNavigationToNoneTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test for keyboard navigation in tree in case when there are no items to
* navigate.
- *
+ *
* @author Vaadin Ltd
*/
public class TreeKeyboardNavigationToNoneTest extends MultiBrowserTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/tree/TreeScrollingOnRightClickTest.java b/uitest/src/test/java/com/vaadin/tests/components/tree/TreeScrollingOnRightClickTest.java
index b8715ed505..4c26c1f376 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/tree/TreeScrollingOnRightClickTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/tree/TreeScrollingOnRightClickTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,7 +27,7 @@ import org.openqa.selenium.interactions.Actions;
import com.vaadin.tests.tb3.MultiBrowserTest;
/**
- *
+ *
* @since 7.1.9
* @author Vaadin Ltd
*/
@@ -38,8 +38,8 @@ public class TreeScrollingOnRightClickTest extends MultiBrowserTest {
openTestURL();
// Focus tree
- WebElement tree = getDriver().findElement(
- By.id(TreeScrollingOnRightClick.TREE_ID));
+ WebElement tree = getDriver()
+ .findElement(By.id(TreeScrollingOnRightClick.TREE_ID));
tree.click();
// Move selection down 50 items
@@ -63,7 +63,7 @@ public class TreeScrollingOnRightClickTest extends MultiBrowserTest {
}
private WebElement getTreeNode(String caption) {
- return getDriver().findElement(
- By.xpath("//span[text() = '" + caption + "']"));
+ return getDriver()
+ .findElement(By.xpath("//span[text() = '" + caption + "']"));
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/treetable/DisappearingComponentsTest.java b/uitest/src/test/java/com/vaadin/tests/components/treetable/DisappearingComponentsTest.java
index e4d97b9de1..5b37751891 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/treetable/DisappearingComponentsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/treetable/DisappearingComponentsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests that expanded cells with component contents aren't empty.
- *
+ *
* @author Vaadin Ltd
*/
public class DisappearingComponentsTest extends MultiBrowserTest {
@@ -40,8 +40,8 @@ public class DisappearingComponentsTest extends MultiBrowserTest {
.findElement(By.className("v-treetable-treespacer")).click();
sleep(100);
- WebElement link = treeTable.getCell(2, 1).findElement(
- By.className("v-link"));
+ WebElement link = treeTable.getCell(2, 1)
+ .findElement(By.className("v-link"));
assertEquals("3", link.getText());
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/treetable/MinimalWidthColumnsTest.java b/uitest/src/test/java/com/vaadin/tests/components/treetable/MinimalWidthColumnsTest.java
index 46c2f397b6..9b3323dc6e 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/treetable/MinimalWidthColumnsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/treetable/MinimalWidthColumnsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTableContainerHierarchicalWrapperTest.java b/uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTableContainerHierarchicalWrapperTest.java
index f767e5fd52..80585ae84f 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTableContainerHierarchicalWrapperTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTableContainerHierarchicalWrapperTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,23 +28,24 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests that TreeTable with ContainerHierarchicalWrapper is updated correctly
* when the setParent() is called for the item just added
- *
+ *
* @author Vaadin Ltd
*/
-public class TreeTableContainerHierarchicalWrapperTest extends MultiBrowserTest {
+public class TreeTableContainerHierarchicalWrapperTest
+ extends MultiBrowserTest {
@Test
public void testStructure() throws InterruptedException {
openTestURL();
TreeTableElement treeTable = $(TreeTableElement.class).first();
- WebElement findElement = treeTable.getCell(0, 0).findElement(
- By.className("v-treetable-treespacer"));
+ WebElement findElement = treeTable.getCell(0, 0)
+ .findElement(By.className("v-treetable-treespacer"));
findElement.click();
TestBenchElement cell = treeTable.getCell(5, 0);
- WebElement findElement2 = cell.findElement(By
- .className("v-treetable-treespacer"));
+ WebElement findElement2 = cell
+ .findElement(By.className("v-treetable-treespacer"));
assertEquals("Item 0-5", cell.getText());
findElement2.click();
diff --git a/uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTableItemDescriptionGeneratorUITest.java b/uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTableItemDescriptionGeneratorUITest.java
index 849d19cafa..6365ae8fab 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTableItemDescriptionGeneratorUITest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTableItemDescriptionGeneratorUITest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ import com.vaadin.tests.tb3.TooltipTest;
/**
* Tests TreeTable tooltips with various settings.
- *
+ *
* @author Vaadin Ltd
*/
public class TreeTableItemDescriptionGeneratorUITest extends TooltipTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTableOutOfSyncTest.java b/uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTableOutOfSyncTest.java
index 0831232df7..72816a44b6 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTableOutOfSyncTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTableOutOfSyncTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests that opening the root node and clicking a generated component doesn't
* cause out of sync (or any other system notifications).
- *
+ *
* @author Vaadin Ltd
*/
public class TreeTableOutOfSyncTest extends MultiBrowserTest {
@@ -39,11 +39,12 @@ public class TreeTableOutOfSyncTest extends MultiBrowserTest {
openTestURL();
TreeTableElement treeTable = $(TreeTableElement.class).first();
- List<WebElement> rows = treeTable.findElement(
- By.className("v-table-body")).findElements(By.tagName("tr"));
+ List<WebElement> rows = treeTable
+ .findElement(By.className("v-table-body"))
+ .findElements(By.tagName("tr"));
- WebElement treeSpacer = rows.get(0).findElement(
- By.className("v-treetable-treespacer"));
+ WebElement treeSpacer = rows.get(0)
+ .findElement(By.className("v-treetable-treespacer"));
treeSpacer.click();
sleep(100);
@@ -53,8 +54,8 @@ public class TreeTableOutOfSyncTest extends MultiBrowserTest {
WebElement button = rows.get(2).findElement(By.className("v-button"));
button.click();
- List<WebElement> notifications = findElements(By
- .className("v-Notification-system"));
+ List<WebElement> notifications = findElements(
+ By.className("v-Notification-system"));
assertTrue(notifications.isEmpty());
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTablePartialUpdatesPageLength0Test.java b/uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTablePartialUpdatesPageLength0Test.java
index d88c6ba7ca..04d6f5e511 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTablePartialUpdatesPageLength0Test.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTablePartialUpdatesPageLength0Test.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests expanding TreeTable rows when page length is zero.
- *
+ *
* @author Vaadin Ltd
*/
public class TreeTablePartialUpdatesPageLength0Test extends MultiBrowserTest {
@@ -39,17 +39,18 @@ public class TreeTablePartialUpdatesPageLength0Test extends MultiBrowserTest {
openTestURL();
TreeTableElement treeTable = $(TreeTableElement.class).first();
- List<WebElement> rows = treeTable.findElement(
- By.className("v-table-body")).findElements(By.tagName("tr"));
+ List<WebElement> rows = treeTable
+ .findElement(By.className("v-table-body"))
+ .findElements(By.tagName("tr"));
assertEquals("unexpected row count", 4, rows.size());
- assertEquals("unexpected contents", "root1", treeTable.getCell(0, 0)
- .getText());
- assertEquals("unexpected contents", "root2", treeTable.getCell(1, 0)
- .getText());
- assertEquals("unexpected contents", "root3", treeTable.getCell(2, 0)
- .getText());
- assertEquals("unexpected contents", "END", treeTable.getCell(3, 0)
- .getText());
+ assertEquals("unexpected contents", "root1",
+ treeTable.getCell(0, 0).getText());
+ assertEquals("unexpected contents", "root2",
+ treeTable.getCell(1, 0).getText());
+ assertEquals("unexpected contents", "root3",
+ treeTable.getCell(2, 0).getText());
+ assertEquals("unexpected contents", "END",
+ treeTable.getCell(3, 0).getText());
// expand first row, should have 10 children
treeTable.getCell(0, 0)
@@ -61,14 +62,14 @@ public class TreeTablePartialUpdatesPageLength0Test extends MultiBrowserTest {
assertEquals("unexpected row count", 14, rows.size());
// expand root3, should have 200 children
- assertEquals("unexpected contents", "root3", treeTable.getCell(12, 0)
- .getText());
+ assertEquals("unexpected contents", "root3",
+ treeTable.getCell(12, 0).getText());
treeTable.getCell(12, 0)
.findElement(By.className("v-treetable-treespacer")).click();
// expand root2, should have 200 children
- assertEquals("unexpected contents", "root2", treeTable.getCell(11, 0)
- .getText());
+ assertEquals("unexpected contents", "root2",
+ treeTable.getCell(11, 0).getText());
treeTable.getCell(11, 0)
.findElement(By.className("v-treetable-treespacer")).click();
diff --git a/uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTablePartialUpdatesTest.java b/uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTablePartialUpdatesTest.java
index 5a55df581c..d3eae2e653 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTablePartialUpdatesTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTablePartialUpdatesTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,7 +32,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests partial updates of a TreeTable.
- *
+ *
* @author Vaadin Ltd
*/
public class TreeTablePartialUpdatesTest extends MultiBrowserTest {
@@ -42,8 +42,9 @@ public class TreeTablePartialUpdatesTest extends MultiBrowserTest {
openTestURL();
TreeTableElement treeTable = $(TreeTableElement.class).first();
- List<WebElement> rows = treeTable.findElement(
- By.className("v-table-body")).findElements(By.tagName("tr"));
+ List<WebElement> rows = treeTable
+ .findElement(By.className("v-table-body"))
+ .findElements(By.tagName("tr"));
assertEquals("unexpected row count", 4, rows.size());
// expand the first root element
@@ -52,8 +53,8 @@ public class TreeTablePartialUpdatesTest extends MultiBrowserTest {
treeTable = $(TreeTableElement.class).first();
// wait for the scrollposition element to disappear
- waitUntilNot(ExpectedConditions.visibilityOfElementLocated(By
- .className("v-table-scrollposition")));
+ waitUntilNot(ExpectedConditions.visibilityOfElementLocated(
+ By.className("v-table-scrollposition")));
rows = treeTable.findElement(By.className("v-table-body"))
.findElements(By.tagName("tr"));
@@ -61,28 +62,28 @@ public class TreeTablePartialUpdatesTest extends MultiBrowserTest {
// TODO: replace these with just treeTable.scroll(int) when #13826 has
// been fixed
- TestBenchElementCommands scrollable = testBenchElement(treeTable
- .findElement(By.className("v-scrollable")));
+ TestBenchElementCommands scrollable = testBenchElement(
+ treeTable.findElement(By.className("v-scrollable")));
// scroll far enough down to drop the first row from the cache
// but not far enough to reach the last row
scrollable.scroll(1692);
// wait for the scrollposition element to disappear
- waitUntilNot(ExpectedConditions.visibilityOfElementLocated(By
- .className("v-table-scrollposition")));
+ waitUntilNot(ExpectedConditions.visibilityOfElementLocated(
+ By.className("v-table-scrollposition")));
- assertEquals("elements found where there should be none", 0, treeTable
- .findElements(By.vaadin("#row[0]/col[0]")).size());
- assertEquals("elements found where there should be none", 0, treeTable
- .findElements(By.vaadin("#row[203]/col[0]")).size());
+ assertEquals("elements found where there should be none", 0,
+ treeTable.findElements(By.vaadin("#row[0]/col[0]")).size());
+ assertEquals("elements found where there should be none", 0,
+ treeTable.findElements(By.vaadin("#row[203]/col[0]")).size());
// scroll 6000 to make sure to actually hit bottom
scrollable.scroll(6000);
// wait for the scrollposition element to disappear
- waitUntilNot(ExpectedConditions.visibilityOfElementLocated(By
- .className("v-table-scrollposition")));
+ waitUntilNot(ExpectedConditions.visibilityOfElementLocated(
+ By.className("v-table-scrollposition")));
// check the contents
treeTable = $(TreeTableElement.class).first();
@@ -96,23 +97,24 @@ public class TreeTablePartialUpdatesTest extends MultiBrowserTest {
assertEquals("unexpected cell contents (first cached row expected)",
"158", treeTable.getCell(159, 0).getText());
- assertEquals("elements found where there should be none", 0, treeTable
- .findElements(By.vaadin("#row[158]/col[0]")).size());
- assertEquals("elements found where there should be none", 0, treeTable
- .findElements(By.vaadin("#row[204]/col[0]")).size());
+ assertEquals("elements found where there should be none", 0,
+ treeTable.findElements(By.vaadin("#row[158]/col[0]")).size());
+ assertEquals("elements found where there should be none", 0,
+ treeTable.findElements(By.vaadin("#row[204]/col[0]")).size());
// check the actual visibility
compareScreen("bottom");
}
@Test
- public void testNegativeArraySize() throws IOException,
- InterruptedException {
+ public void testNegativeArraySize()
+ throws IOException, InterruptedException {
openTestURL();
TreeTableElement treeTable = $(TreeTableElement.class).first();
- List<WebElement> rows = treeTable.findElement(
- By.className("v-table-body")).findElements(By.tagName("tr"));
+ List<WebElement> rows = treeTable
+ .findElement(By.className("v-table-body"))
+ .findElements(By.tagName("tr"));
assertEquals("unexpected row count", 4, rows.size());
// expand the first root element
@@ -120,8 +122,8 @@ public class TreeTablePartialUpdatesTest extends MultiBrowserTest {
.findElement(By.className("v-treetable-treespacer")).click();
// wait for the scrollposition element to disappear
- waitUntilNot(ExpectedConditions.visibilityOfElementLocated(By
- .className("v-table-scrollposition")));
+ waitUntilNot(ExpectedConditions.visibilityOfElementLocated(
+ By.className("v-table-scrollposition")));
treeTable = $(TreeTableElement.class).first();
rows = treeTable.findElement(By.className("v-table-body"))
@@ -130,18 +132,18 @@ public class TreeTablePartialUpdatesTest extends MultiBrowserTest {
// TODO: replace these with just treeTable.scroll(int) when #13826 has
// been fixed
- TestBenchElementCommands scrollable = testBenchElement(treeTable
- .findElement(By.className("v-scrollable")));
+ TestBenchElementCommands scrollable = testBenchElement(
+ treeTable.findElement(By.className("v-scrollable")));
// scroll far enough down to reach the second root item again
scrollable.scroll(3969);
// wait for the scrollposition element to disappear
- waitUntilNot(ExpectedConditions.visibilityOfElementLocated(By
- .className("v-table-scrollposition")));
+ waitUntilNot(ExpectedConditions.visibilityOfElementLocated(
+ By.className("v-table-scrollposition")));
- assertEquals("elements found where there should be none", 0, treeTable
- .findElements(By.vaadin("#row[0]/col[0]")).size());
+ assertEquals("elements found where there should be none", 0,
+ treeTable.findElements(By.vaadin("#row[0]/col[0]")).size());
assertEquals("unexpected cell contents", "root2",
treeTable.getCell(201, 0).getText());
assertEquals("unexpected cell contents", "END",
@@ -152,8 +154,8 @@ public class TreeTablePartialUpdatesTest extends MultiBrowserTest {
.findElement(By.className("v-treetable-treespacer")).click();
// wait for the scrollposition element to disappear
- waitUntilNot(ExpectedConditions.visibilityOfElementLocated(By
- .className("v-table-scrollposition")));
+ waitUntilNot(ExpectedConditions.visibilityOfElementLocated(
+ By.className("v-table-scrollposition")));
// ensure the last cached row isn't the final row
treeTable = $(TreeTableElement.class).first();
@@ -169,8 +171,8 @@ public class TreeTablePartialUpdatesTest extends MultiBrowserTest {
.findElement(By.className("v-treetable-treespacer")).click();
// wait for the scrollposition element to disappear
- waitUntilNot(ExpectedConditions.visibilityOfElementLocated(By
- .className("v-table-scrollposition")));
+ waitUntilNot(ExpectedConditions.visibilityOfElementLocated(
+ By.className("v-table-scrollposition")));
// check the contents
treeTable = $(TreeTableElement.class).first();
@@ -184,10 +186,10 @@ public class TreeTablePartialUpdatesTest extends MultiBrowserTest {
assertEquals("unexpected cell contents (first cached row expected)",
"158", treeTable.getCell(159, 0).getText());
- assertEquals("elements found where there should be none", 0, treeTable
- .findElements(By.vaadin("#row[158]/col[0]")).size());
- assertEquals("elements found where there should be none", 0, treeTable
- .findElements(By.vaadin("#row[204]/col[0]")).size());
+ assertEquals("elements found where there should be none", 0,
+ treeTable.findElements(By.vaadin("#row[158]/col[0]")).size());
+ assertEquals("elements found where there should be none", 0,
+ treeTable.findElements(By.vaadin("#row[204]/col[0]")).size());
// check the actual visibility
compareScreen("bottom");
diff --git a/uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTableRowGeneratorTest.java b/uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTableRowGeneratorTest.java
index 84a2f7bbb3..b12e4b78c2 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTableRowGeneratorTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTableRowGeneratorTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTableRowHeaderModeTest.java b/uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTableRowHeaderModeTest.java
index 0215c14aef..0bc98c39b9 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTableRowHeaderModeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTableRowHeaderModeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test for absence of empty row header for RowHeaderMode.ICON_ONLY
- *
+ *
* @author Vaadin Ltd
*/
public class TreeTableRowHeaderModeTest extends MultiBrowserTest {
@@ -34,6 +34,7 @@ public class TreeTableRowHeaderModeTest extends MultiBrowserTest {
Assert.assertFalse(
"Unexpected row header for icons is found in TreeTable",
- isElementPresent(By.className("v-table-header-cell-rowheader")));
+ isElementPresent(
+ By.className("v-table-header-cell-rowheader")));
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTableRowIconsTest.java b/uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTableRowIconsTest.java
index 2e299d62ea..f70883ad96 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTableRowIconsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTableRowIconsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTableScrollOnExpandTest.java b/uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTableScrollOnExpandTest.java
index a17559cc81..047a8940c6 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTableScrollOnExpandTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/treetable/TreeTableScrollOnExpandTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -39,8 +39,8 @@ public class TreeTableScrollOnExpandTest extends MultiBrowserTest {
// Need to wait a bit to avoid accepting the case where the TreeTable is
// in the desired state only for a short while.
sleep(1000);
- WebElement focusedRow = getDriver().findElement(
- By.className("v-table-focus"));
+ WebElement focusedRow = getDriver()
+ .findElement(By.className("v-table-focus"));
assertEquals("Item 21", focusedRow.getText());
}
} \ No newline at end of file
diff --git a/uitest/src/test/java/com/vaadin/tests/components/ui/ComboboxSelectedItemTextTest.java b/uitest/src/test/java/com/vaadin/tests/components/ui/ComboboxSelectedItemTextTest.java
index 760d2f39ea..a1f812d0f4 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/ui/ComboboxSelectedItemTextTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/ui/ComboboxSelectedItemTextTest.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -32,7 +32,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
* Test class for issue #13477, where selecting a combobox item that is too long
* would render the ending of an item instead of the beginning, which was
* considered less than informative.
- *
+ *
* @author Vaadin Ltd
*/
@@ -66,17 +66,20 @@ public class ComboboxSelectedItemTextTest extends MultiBrowserTest {
String screenshotIdentifier) throws IOException {
openTestURL();
- WebElement comboBox = vaadinElement("/VVerticalLayout[0]/Slot[2]/VVerticalLayout[0]/Slot["
- + indexToTest + "]/VFilterSelect[0]");
- WebElement comboBoxFocus = vaadinElement("/VVerticalLayout[0]/Slot[2]/VVerticalLayout[0]/Slot["
- + indexToFocus + "]/VFilterSelect[0]");
+ WebElement comboBox = vaadinElement(
+ "/VVerticalLayout[0]/Slot[2]/VVerticalLayout[0]/Slot["
+ + indexToTest + "]/VFilterSelect[0]");
+ WebElement comboBoxFocus = vaadinElement(
+ "/VVerticalLayout[0]/Slot[2]/VVerticalLayout[0]/Slot["
+ + indexToFocus + "]/VFilterSelect[0]");
// Select an element from the first (to test) combobox.
comboBox.findElement(By.className("v-filterselect-button")).click();
waitForPopup(comboBox);
- WebElement comboBoxPopup = vaadinElement("/VVerticalLayout[0]/Slot[2]/VVerticalLayout[0]/Slot["
- + indexToTest + "]/VFilterSelect[0]#popup");
+ WebElement comboBoxPopup = vaadinElement(
+ "/VVerticalLayout[0]/Slot[2]/VVerticalLayout[0]/Slot["
+ + indexToTest + "]/VFilterSelect[0]#popup");
comboBoxPopup.findElements(By.tagName("td")).get(2).click();
// Select an element from the second (to focus) combobox to remove
@@ -85,8 +88,9 @@ public class ComboboxSelectedItemTextTest extends MultiBrowserTest {
comboBoxFocus.findElement(By.className("v-filterselect-button"))
.click();
waitForPopup(comboBoxFocus);
- comboBoxPopup = vaadinElement("/VVerticalLayout[0]/Slot[2]/VVerticalLayout[0]/Slot["
- + indexToFocus + "]/VFilterSelect[0]#popup");
+ comboBoxPopup = vaadinElement(
+ "/VVerticalLayout[0]/Slot[2]/VVerticalLayout[0]/Slot["
+ + indexToFocus + "]/VFilterSelect[0]#popup");
comboBoxPopup.findElements(By.tagName("td")).get(2).click();
// click the button of the first combobox. This would reveal the
diff --git a/uitest/src/test/java/com/vaadin/tests/components/ui/ComponentIncludedInCustomWidgetsetTest.java b/uitest/src/test/java/com/vaadin/tests/components/ui/ComponentIncludedInCustomWidgetsetTest.java
index 4bab0e5237..e6e063fbd9 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/ui/ComponentIncludedInCustomWidgetsetTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/ui/ComponentIncludedInCustomWidgetsetTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests if a component is included in a custom widgetset
* (com.vaadin.tests.widgetset.TestingWidgetSet)
- *
+ *
* @author Vaadin Ltd
*/
public class ComponentIncludedInCustomWidgetsetTest extends MultiBrowserTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/ui/ComponentMissingFromDefaultWidgetsetTest.java b/uitest/src/test/java/com/vaadin/tests/components/ui/ComponentMissingFromDefaultWidgetsetTest.java
index 429bcc0afc..3a2600df6f 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/ui/ComponentMissingFromDefaultWidgetsetTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/ui/ComponentMissingFromDefaultWidgetsetTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test for testing if a component is missing from a widgetset.
- *
+ *
* @author Vaadin Ltd
*/
public class ComponentMissingFromDefaultWidgetsetTest extends MultiBrowserTest {
@@ -33,10 +33,8 @@ public class ComponentMissingFromDefaultWidgetsetTest extends MultiBrowserTest {
public void testComponentInTestingWidgetset() {
openTestURL();
WebElement component = vaadinElementById("missing-component");
- assertTrue(component
- .getText()
- .startsWith(
- "Widgetset 'com.vaadin.DefaultWidgetSet' does not contain implementation for com.vaadin.tests.widgetset.server.MissingFromDefaultWidgetsetComponent."));
+ assertTrue(component.getText().startsWith(
+ "Widgetset 'com.vaadin.DefaultWidgetSet' does not contain implementation for com.vaadin.tests.widgetset.server.MissingFromDefaultWidgetsetComponent."));
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/ui/DynamicViewportEmptyTest.java b/uitest/src/test/java/com/vaadin/tests/components/ui/DynamicViewportEmptyTest.java
index 55466130ad..73209cb6f8 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/ui/DynamicViewportEmptyTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/ui/DynamicViewportEmptyTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -42,8 +42,8 @@ public class DynamicViewportEmptyTest extends MultiBrowserTest {
public void testGeneratedEmptyViewport() {
openTestURL();
- List<WebElement> viewportElements = findElements(By
- .cssSelector("meta[name=viewport]"));
+ List<WebElement> viewportElements = findElements(
+ By.cssSelector("meta[name=viewport]"));
Assert.assertTrue("There should be no viewport tags",
viewportElements.isEmpty());
diff --git a/uitest/src/test/java/com/vaadin/tests/components/ui/DynamicViewportTest.java b/uitest/src/test/java/com/vaadin/tests/components/ui/DynamicViewportTest.java
index f1d9efdbd1..8d5af3bb88 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/ui/DynamicViewportTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/ui/DynamicViewportTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,10 +28,10 @@ public class DynamicViewportTest extends SingleBrowserTest {
public void testGeneratedViewport() {
openTestURL();
- WebElement viewportElement = findElement(By
- .cssSelector("meta[name=viewport]"));
+ WebElement viewportElement = findElement(
+ By.cssSelector("meta[name=viewport]"));
- Assert.assertTrue(viewportElement.getAttribute("content").contains(
- "PhantomJS"));
+ Assert.assertTrue(
+ viewportElement.getAttribute("content").contains("PhantomJS"));
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/ui/InitialFragmentEventTest.java b/uitest/src/test/java/com/vaadin/tests/components/ui/InitialFragmentEventTest.java
index f52797dd63..69f677a977 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/ui/InitialFragmentEventTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/ui/InitialFragmentEventTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/ui/InvalidViewportTest.java b/uitest/src/test/java/com/vaadin/tests/components/ui/InvalidViewportTest.java
index 9d0aac49f7..6119a7dbd1 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/ui/InvalidViewportTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/ui/InvalidViewportTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/ui/RpcInvocationHandlerToStringTest.java b/uitest/src/test/java/com/vaadin/tests/components/ui/RpcInvocationHandlerToStringTest.java
index 10a297d47b..5470a8c229 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/ui/RpcInvocationHandlerToStringTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/ui/RpcInvocationHandlerToStringTest.java
@@ -20,8 +20,8 @@ public class RpcInvocationHandlerToStringTest extends MultiBrowserTest {
$(ButtonElement.class)
.caption("Exec " + method + " for an invocation proxy").first()
.click();
- Assert.assertFalse(method
- + " for invocation proxy caused a notification",
+ Assert.assertFalse(
+ method + " for invocation proxy caused a notification",
$(NotificationElement.class).exists());
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/ui/StaticViewportTest.java b/uitest/src/test/java/com/vaadin/tests/components/ui/StaticViewportTest.java
index 61b3c944c9..17e286a2c6 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/ui/StaticViewportTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/ui/StaticViewportTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,8 +28,8 @@ public class StaticViewportTest extends SingleBrowserTest {
public void testStaticViewport() {
openTestURL();
- WebElement viewportElement = findElement(By
- .cssSelector("meta[name=viewport]"));
+ WebElement viewportElement = findElement(
+ By.cssSelector("meta[name=viewport]"));
Assert.assertEquals("myViewport",
viewportElement.getAttribute("content"));
diff --git a/uitest/src/test/java/com/vaadin/tests/components/ui/TextAreaEventPropagationModifierKeysTest.java b/uitest/src/test/java/com/vaadin/tests/components/ui/TextAreaEventPropagationModifierKeysTest.java
index 43422feb58..2121bdfd73 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/ui/TextAreaEventPropagationModifierKeysTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/ui/TextAreaEventPropagationModifierKeysTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -49,7 +49,8 @@ public class TextAreaEventPropagationModifierKeysTest extends MultiBrowserTest {
}
@Test
- public void textAreaCtrlEnterEventPropagation() throws InterruptedException {
+ public void textAreaCtrlEnterEventPropagation()
+ throws InterruptedException {
openTestURL();
WebElement textArea = $(TextAreaElement.class).first();
diff --git a/uitest/src/test/java/com/vaadin/tests/components/ui/TextAreaEventPropagationTest.java b/uitest/src/test/java/com/vaadin/tests/components/ui/TextAreaEventPropagationTest.java
index 5de903e8d4..a21c31e3ed 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/ui/TextAreaEventPropagationTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/ui/TextAreaEventPropagationTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests that the TextArea widget correctly stops ENTER events from propagating.
- *
+ *
* @author Vaadin Ltd
*/
public class TextAreaEventPropagationTest extends MultiBrowserTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/ui/TimeoutRedirectResetsOnActivityTest.java b/uitest/src/test/java/com/vaadin/tests/components/ui/TimeoutRedirectResetsOnActivityTest.java
index b5440b8f76..dd1bbc9fc0 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/ui/TimeoutRedirectResetsOnActivityTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/ui/TimeoutRedirectResetsOnActivityTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -60,8 +60,8 @@ public class TimeoutRedirectResetsOnActivityTest extends MultiBrowserTest {
assertThat(driver.getCurrentUrl(), is(getTestUrl()));
testBench().disableWaitForVaadin();
- Thread.sleep(actualExpireTime - originalExpireTime
- + communicationOverhead);
+ Thread.sleep(
+ actualExpireTime - originalExpireTime + communicationOverhead);
assertThat(driver.getCurrentUrl(), is(not(getTestUrl())));
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/ui/UIAccessTest.java b/uitest/src/test/java/com/vaadin/tests/components/ui/UIAccessTest.java
index 0e37aa36fb..acb043ae50 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/ui/UIAccessTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/ui/UIAccessTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -40,17 +40,21 @@ public class UIAccessTest extends MultiBrowserTest {
$(ButtonElement.class).get(7).click();
- waitForLogToContainText("0. Current UI matches in beforeResponse? true");
- waitForLogToContainText("1. Current session matches in beforeResponse? true");
+ waitForLogToContainText(
+ "0. Current UI matches in beforeResponse? true");
+ waitForLogToContainText(
+ "1. Current session matches in beforeResponse? true");
}
@Test
public void canBeAccessedFromUIThread() {
$(ButtonElement.class).first().click();
- assertTrue(logContainsText("0. Access from UI thread future is done? false"));
+ assertTrue(logContainsText(
+ "0. Access from UI thread future is done? false"));
assertTrue(logContainsText("1. Access from UI thread is run"));
- assertTrue(logContainsText("2. beforeClientResponse future is done? true"));
+ assertTrue(logContainsText(
+ "2. beforeClientResponse future is done? true"));
}
@Test
@@ -78,14 +82,16 @@ public class UIAccessTest extends MultiBrowserTest {
assertTrue(logContainsText("0. Throwing exception in access"));
assertTrue(logContainsText("1. firstFuture is done? true"));
- assertTrue(logContainsText("2. Got exception from firstFuture: java.lang.RuntimeException: Catch me if you can"));
+ assertTrue(logContainsText(
+ "2. Got exception from firstFuture: java.lang.RuntimeException: Catch me if you can"));
}
@Test
public void futureIsCancelledBeforeStarted() {
$(ButtonElement.class).get(3).click();
- assertTrue(logContainsText("0. future was cancelled, should not start"));
+ assertTrue(
+ logContainsText("0. future was cancelled, should not start"));
}
@Test
@@ -102,9 +108,12 @@ public class UIAccessTest extends MultiBrowserTest {
$(ButtonElement.class).get(5).click();
assertTrue(logContainsText("0. accessSynchronously has request? true"));
- assertTrue(logContainsText("1. Test value in accessSynchronously: Set before accessSynchronosly"));
- assertTrue(logContainsText("2. has request after accessSynchronously? true"));
- assertTrue(logContainsText("3. Test value after accessSynchornously: Set in accessSynchronosly"));
+ assertTrue(logContainsText(
+ "1. Test value in accessSynchronously: Set before accessSynchronosly"));
+ assertTrue(logContainsText(
+ "2. has request after accessSynchronously? true"));
+ assertTrue(logContainsText(
+ "3. Test value after accessSynchornously: Set in accessSynchronosly"));
}
@Test
@@ -112,9 +121,11 @@ public class UIAccessTest extends MultiBrowserTest {
$(ButtonElement.class).get(6).click();
assertTrue(logContainsText("0. access has request? false"));
- assertTrue(logContainsText("1. Test value in access: Set before access"));
+ assertTrue(
+ logContainsText("1. Test value in access: Set before access"));
assertTrue(logContainsText("2. has request after access? true"));
- assertTrue(logContainsText("3. Test value after access: Set before run pending"));
+ assertTrue(logContainsText(
+ "3. Test value after access: Set before run pending"));
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/ui/UIAutoGeneratedStyleNameTest.java b/uitest/src/test/java/com/vaadin/tests/components/ui/UIAutoGeneratedStyleNameTest.java
index 73e0a7f6b9..2d0a55a4e6 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/ui/UIAutoGeneratedStyleNameTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/ui/UIAutoGeneratedStyleNameTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import java.util.Locale;
/**
* Test to check auto-generated style name for UI div and overlays div.
- *
+ *
* @author Vaadin Ltd
*/
public class UIAutoGeneratedStyleNameTest extends MultiBrowserTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/ui/UIInitBrowserDetailsTest.java b/uitest/src/test/java/com/vaadin/tests/components/ui/UIInitBrowserDetailsTest.java
index 1e69662935..641ac6d82a 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/ui/UIInitBrowserDetailsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/ui/UIInitBrowserDetailsTest.java
@@ -37,8 +37,9 @@ public class UIInitBrowserDetailsTest extends MultiBrowserTest {
private void compareRequestAndBrowserValue(String paramName,
String browserName, String errorValue) {
assertTextNotEquals(browserName, errorValue);
- Assert.assertEquals(String.format(
- "Browser and request values differ in '%s',", browserName),
+ Assert.assertEquals(
+ String.format("Browser and request values differ in '%s',",
+ browserName),
getLabelText(paramName), getLabelText(browserName));
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/ui/UIInitExceptionTest.java b/uitest/src/test/java/com/vaadin/tests/components/ui/UIInitExceptionTest.java
index d002642a74..c1d6aaa55b 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/ui/UIInitExceptionTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/ui/UIInitExceptionTest.java
@@ -9,7 +9,7 @@ public class UIInitExceptionTest extends MultiBrowserTest {
@Test
public void testExceptionOnUIInit() throws Exception {
openTestURL();
- Assert.assertTrue("Page does not contain the given text", driver
- .getPageSource().contains("Catch me if you can"));
+ Assert.assertTrue("Page does not contain the given text",
+ driver.getPageSource().contains("Catch me if you can"));
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/ui/UIPollingTest.java b/uitest/src/test/java/com/vaadin/tests/components/ui/UIPollingTest.java
index c4a41d135a..0be0efae2b 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/ui/UIPollingTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/ui/UIPollingTest.java
@@ -24,13 +24,13 @@ public class UIPollingTest extends MultiBrowserTest {
getTextField().setValue("500");
sleep(2000);
/* Ensure polling has taken place */
- Assert.assertTrue("Page does not contain the given text", driver
- .getPageSource().contains("2. 1000ms has passed"));
+ Assert.assertTrue("Page does not contain the given text",
+ driver.getPageSource().contains("2. 1000ms has passed"));
getTextField().setValue("-1");
sleep(2000);
/* Ensure polling has stopped */
- Assert.assertFalse("Page contains the given text", driver
- .getPageSource().contains("20. 10000ms has passed"));
+ Assert.assertFalse("Page contains the given text",
+ driver.getPageSource().contains("20. 10000ms has passed"));
}
public TextFieldElement getTextField() {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/ui/UIRefreshTest.java b/uitest/src/test/java/com/vaadin/tests/components/ui/UIRefreshTest.java
index 7d701f4ae0..4dcb26647c 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/ui/UIRefreshTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/ui/UIRefreshTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/ui/UISerializationTest.java b/uitest/src/test/java/com/vaadin/tests/components/ui/UISerializationTest.java
index 649f48c9ce..d4eb11aff5 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/ui/UISerializationTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/ui/UISerializationTest.java
@@ -21,10 +21,8 @@ public class UISerializationTest extends SingleBrowserTest {
assertThat(getLogRow(0), startsWith("3. Diff states match, size: "));
assertThat(getLogRow(1), startsWith("2. Deserialized UI in "));
- assertThat(
- getLogRow(2),
- allOf(startsWith("1. Serialized UI in"),
- containsString(" into "), endsWith(" bytes")));
+ assertThat(getLogRow(2), allOf(startsWith("1. Serialized UI in"),
+ containsString(" into "), endsWith(" bytes")));
}
private void serialize() {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/ui/UiDependenciesInHtmlTest.java b/uitest/src/test/java/com/vaadin/tests/components/ui/UiDependenciesInHtmlTest.java
index 188a0aea3e..99894d40a8 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/ui/UiDependenciesInHtmlTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/ui/UiDependenciesInHtmlTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/ui/UnnecessaryPaddingInResponsiveUITest.java b/uitest/src/test/java/com/vaadin/tests/components/ui/UnnecessaryPaddingInResponsiveUITest.java
index 661db179e7..13f3b52655 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/ui/UnnecessaryPaddingInResponsiveUITest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/ui/UnnecessaryPaddingInResponsiveUITest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import org.openqa.selenium.WebElement;
import com.vaadin.tests.tb3.SingleBrowserTest;
/**
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -38,8 +38,8 @@ public class UnnecessaryPaddingInResponsiveUITest extends SingleBrowserTest {
String paddingTop = ui.getCssValue("padding-top");
- Integer paddingHeight = Integer.parseInt(paddingTop.substring(0,
- paddingTop.length() - 2));
+ Integer paddingHeight = Integer
+ .parseInt(paddingTop.substring(0, paddingTop.length() - 2));
assertThat(paddingHeight, equalTo(0));
diff --git a/uitest/src/test/java/com/vaadin/tests/components/ui/VaadinFinderLocatorUISearchTest.java b/uitest/src/test/java/com/vaadin/tests/components/ui/VaadinFinderLocatorUISearchTest.java
index 37766dd060..72108c5912 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/ui/VaadinFinderLocatorUISearchTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/ui/VaadinFinderLocatorUISearchTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.tests.components.button.ButtonClick;
import com.vaadin.tests.tb3.MultiBrowserTest;
/**
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/uitest/src/test/java/com/vaadin/tests/components/ui/WindowAndUIShortcutsTest.java b/uitest/src/test/java/com/vaadin/tests/components/ui/WindowAndUIShortcutsTest.java
index 93324f0792..ba82806cac 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/ui/WindowAndUIShortcutsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/ui/WindowAndUIShortcutsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -38,6 +38,7 @@ public class WindowAndUIShortcutsTest extends SingleBrowserTest {
// Window should have been closed
Assert.assertTrue($(WindowElement.class).all().isEmpty());
// "Close page" should not have been clicked
- Assert.assertTrue($(ButtonElement.class).caption("Close page").exists());
+ Assert.assertTrue(
+ $(ButtonElement.class).caption("Close page").exists());
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/uitest/BaseThemeTest.java b/uitest/src/test/java/com/vaadin/tests/components/uitest/BaseThemeTest.java
index 6a7174bf99..e638abfcdd 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/uitest/BaseThemeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/uitest/BaseThemeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/uitest/ChameleonThemeTest.java b/uitest/src/test/java/com/vaadin/tests/components/uitest/ChameleonThemeTest.java
index 8c4349ad5f..b7da733cc4 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/uitest/ChameleonThemeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/uitest/ChameleonThemeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/uitest/LiferayThemeTest.java b/uitest/src/test/java/com/vaadin/tests/components/uitest/LiferayThemeTest.java
index 47c4c1baae..abaadb1475 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/uitest/LiferayThemeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/uitest/LiferayThemeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/uitest/ReindeerThemeTest.java b/uitest/src/test/java/com/vaadin/tests/components/uitest/ReindeerThemeTest.java
index cdeb4b0606..4e94e98b21 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/uitest/ReindeerThemeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/uitest/ReindeerThemeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/uitest/RunoThemeTest.java b/uitest/src/test/java/com/vaadin/tests/components/uitest/RunoThemeTest.java
index 073ab27566..8a71a6ad99 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/uitest/RunoThemeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/uitest/RunoThemeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/uitest/ThemeTest.java b/uitest/src/test/java/com/vaadin/tests/components/uitest/ThemeTest.java
index 86847fc28e..b299332324 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/uitest/ThemeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/uitest/ThemeTest.java
@@ -20,16 +20,16 @@ import com.vaadin.tests.tb3.newelements.WindowElement;
public abstract class ThemeTest extends MultiBrowserTest {
@ServerClass("com.vaadin.ui.DateField")
- public static class DateFieldElement extends
- com.vaadin.testbench.elements.DateFieldElement {
+ public static class DateFieldElement
+ extends com.vaadin.testbench.elements.DateFieldElement {
public void openPopup() {
findElement(By.tagName("button")).click();
}
}
@ServerClass("com.vaadin.ui.TabSheet")
- public static class TabSheetElement extends
- com.vaadin.testbench.elements.TabSheetElement {
+ public static class TabSheetElement
+ extends com.vaadin.testbench.elements.TabSheetElement {
@Override
public void openTab(String tabCaption) {
super.openTab(tabCaption);
@@ -137,7 +137,8 @@ public abstract class ThemeTest extends MultiBrowserTest {
testNotification(3, "notification-tray");
}
- private void testNotification(int id, String identifier) throws IOException {
+ private void testNotification(int id, String identifier)
+ throws IOException {
$(ButtonElement.class).id("notifButt" + id).click();
compareScreen(identifier);
$(FixedNotificationElement.class).first().close();
@@ -184,8 +185,8 @@ public abstract class ThemeTest extends MultiBrowserTest {
if (searchComboBox.findElement(By.tagName("div")).isDisplayed()) {
searchComboBox.openPopup();
} else {
- WebElement textBox = searchComboBox.findElement(By
- .vaadin("#textbox"));
+ WebElement textBox = searchComboBox
+ .findElement(By.vaadin("#textbox"));
textBox.click();
textBox.sendKeys(Keys.ARROW_DOWN);
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/uitest/UIScrollingTest.java b/uitest/src/test/java/com/vaadin/tests/components/uitest/UIScrollingTest.java
index cf6a6ac821..6bee95f160 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/uitest/UIScrollingTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/uitest/UIScrollingTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,7 +30,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests UI scrolling.
- *
+ *
* @author Vaadin Ltd
*/
public class UIScrollingTest extends MultiBrowserTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/upload/TestFileUploadTest.java b/uitest/src/test/java/com/vaadin/tests/components/upload/TestFileUploadTest.java
index f1d5432344..f57e407416 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/upload/TestFileUploadTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/upload/TestFileUploadTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -64,8 +64,8 @@ public class TestFileUploadTest extends MultiBrowserTest {
}
private String md5(String string) throws NoSuchAlgorithmException {
- byte[] digest = MessageDigest.getInstance("MD5").digest(
- string.getBytes());
+ byte[] digest = MessageDigest.getInstance("MD5")
+ .digest(string.getBytes());
BigInteger bigInt = new BigInteger(1, digest);
String hashtext = bigInt.toString(16);
return hashtext;
diff --git a/uitest/src/test/java/com/vaadin/tests/components/upload/UploadImmediateButtonWidthChameleonTest.java b/uitest/src/test/java/com/vaadin/tests/components/upload/UploadImmediateButtonWidthChameleonTest.java
index a0d6d471fb..18ef76caa3 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/upload/UploadImmediateButtonWidthChameleonTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/upload/UploadImmediateButtonWidthChameleonTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,8 +21,8 @@ import static org.hamcrest.Matchers.closeTo;
import com.vaadin.ui.themes.*;
import org.junit.Test;
-public class UploadImmediateButtonWidthChameleonTest extends
- UploadImmediateButtonWidthTest {
+public class UploadImmediateButtonWidthChameleonTest
+ extends UploadImmediateButtonWidthTest {
@Override
protected String getTheme() {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/upload/UploadImmediateButtonWidthReindeerTest.java b/uitest/src/test/java/com/vaadin/tests/components/upload/UploadImmediateButtonWidthReindeerTest.java
index c22e416a25..ab2a15e181 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/upload/UploadImmediateButtonWidthReindeerTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/upload/UploadImmediateButtonWidthReindeerTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,8 +21,8 @@ import static org.hamcrest.Matchers.closeTo;
import com.vaadin.ui.themes.*;
import org.junit.Test;
-public class UploadImmediateButtonWidthReindeerTest extends
- UploadImmediateButtonWidthTest {
+public class UploadImmediateButtonWidthReindeerTest
+ extends UploadImmediateButtonWidthTest {
@Override
protected String getTheme() {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/upload/UploadImmediateButtonWidthRunoTest.java b/uitest/src/test/java/com/vaadin/tests/components/upload/UploadImmediateButtonWidthRunoTest.java
index 0ab4fbbc7e..ff5860ce33 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/upload/UploadImmediateButtonWidthRunoTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/upload/UploadImmediateButtonWidthRunoTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,8 +21,8 @@ import static org.hamcrest.Matchers.closeTo;
import com.vaadin.ui.themes.*;
import org.junit.Test;
-public class UploadImmediateButtonWidthRunoTest extends
- UploadImmediateButtonWidthTest {
+public class UploadImmediateButtonWidthRunoTest
+ extends UploadImmediateButtonWidthTest {
@Override
protected String getTheme() {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/upload/UploadImmediateButtonWidthTest.java b/uitest/src/test/java/com/vaadin/tests/components/upload/UploadImmediateButtonWidthTest.java
index b2a29c92e3..348bda822e 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/upload/UploadImmediateButtonWidthTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/upload/UploadImmediateButtonWidthTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/upload/UploadImmediateButtonWidthValoTest.java b/uitest/src/test/java/com/vaadin/tests/components/upload/UploadImmediateButtonWidthValoTest.java
index 9d8fe6ba9e..467acbffc5 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/upload/UploadImmediateButtonWidthValoTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/upload/UploadImmediateButtonWidthValoTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,8 +21,8 @@ import static org.hamcrest.Matchers.closeTo;
import com.vaadin.ui.themes.*;
import org.junit.Test;
-public class UploadImmediateButtonWidthValoTest extends
- UploadImmediateButtonWidthTest {
+public class UploadImmediateButtonWidthValoTest
+ extends UploadImmediateButtonWidthTest {
@Override
protected String getTheme() {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/upload/UploadNoSelectionTest.java b/uitest/src/test/java/com/vaadin/tests/components/upload/UploadNoSelectionTest.java
index 30dbefc06b..6ad90c3a74 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/upload/UploadNoSelectionTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/upload/UploadNoSelectionTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -42,8 +42,8 @@ public class UploadNoSelectionTest extends MultiBrowserTest {
}
private WebElement getSubmitButton() {
- WebElement element = getDriver().findElement(
- By.id(UploadNoSelection.UPLOAD_ID));
+ WebElement element = getDriver()
+ .findElement(By.id(UploadNoSelection.UPLOAD_ID));
WebElement submitButton = element.findElement(By.className("v-button"));
return submitButton;
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/upload/UploadTitleWithTooltipTest.java b/uitest/src/test/java/com/vaadin/tests/components/upload/UploadTitleWithTooltipTest.java
index 54ccf993ff..03ec474b46 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/upload/UploadTitleWithTooltipTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/upload/UploadTitleWithTooltipTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ import com.vaadin.tests.tb3.TooltipTest;
/**
* Test for check visibility of browser-dependent tootlip for Upload component.
- *
+ *
* @author Vaadin Ltd
*/
public class UploadTitleWithTooltipTest extends TooltipTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/window/BackspaceKeyWithModalOpenedTest.java b/uitest/src/test/java/com/vaadin/tests/components/window/BackspaceKeyWithModalOpenedTest.java
index e18b5b043a..e561d21c71 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/window/BackspaceKeyWithModalOpenedTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/window/BackspaceKeyWithModalOpenedTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -85,8 +85,8 @@ public class BackspaceKeyWithModalOpenedTest extends MultiBrowserTest {
WebElement nextButton = driver.findElement(By.id(BTN_NEXT_ID));
nextButton.click();
- WebElement openModalButton = driver.findElement(By
- .id(BTN_OPEN_MODAL_ID));
+ WebElement openModalButton = driver
+ .findElement(By.id(BTN_OPEN_MODAL_ID));
openModalButton.click();
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/window/BottomComponentScrollsUpTest.java b/uitest/src/test/java/com/vaadin/tests/components/window/BottomComponentScrollsUpTest.java
index 3d0da2677b..5ed08363d8 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/window/BottomComponentScrollsUpTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/window/BottomComponentScrollsUpTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,9 +28,9 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Automatic test for fix for #12943.
- *
+ *
* While testing without the fix, the test failed on both Chrome and PhantomJS.
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -49,8 +49,8 @@ public class BottomComponentScrollsUpTest extends MultiBrowserTest {
.findElement(By.className("v-panel-content"));
Dimension panelScrollableSize = panelScrollable.getSize();
- WebElement verticalLayout = panelScrollable.findElement(By
- .className("v-verticallayout"));
+ WebElement verticalLayout = panelScrollable
+ .findElement(By.className("v-verticallayout"));
Dimension verticalLayoutSize = verticalLayout.getSize();
panelScrollable.scroll(verticalLayoutSize.height);
@@ -63,8 +63,8 @@ public class BottomComponentScrollsUpTest extends MultiBrowserTest {
// Loose the focus from the button.
new Actions(getDriver())
.moveToElement(panelScrollable, panelScrollableSize.width / 2,
- panelScrollableSize.height / 2).click().build()
- .perform();
+ panelScrollableSize.height / 2)
+ .click().build().perform();
compareScreen("window");
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/window/CloseModalSubWindowTest.java b/uitest/src/test/java/com/vaadin/tests/components/window/CloseModalSubWindowTest.java
index aec0a7c9df..42d84a728e 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/window/CloseModalSubWindowTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/window/CloseModalSubWindowTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,44 +32,44 @@ public class CloseModalSubWindowTest extends MultiBrowserTest {
openTestURL();
// assert that there's a button with a 'del-btn0' id
- List<WebElement> buttons = getDriver().findElements(
- By.id(CloseModalSubWindow.DELETE_BUTTON + "0"));
+ List<WebElement> buttons = getDriver()
+ .findElements(By.id(CloseModalSubWindow.DELETE_BUTTON + "0"));
int deleteButtonCount = buttons.size();
Assert.assertEquals(1, deleteButtonCount);
// assert that there's no sub-windows open
- List<WebElement> subWindows = getDriver().findElements(
- By.id(CloseModalSubWindow.SUB_WINDOW));
+ List<WebElement> subWindows = getDriver()
+ .findElements(By.id(CloseModalSubWindow.SUB_WINDOW));
Assert.assertEquals(0, subWindows.size());
// click the first delete button
getFirstDeteleButton(0).click();
// assert that there's ONE sub-window open
- subWindows = getDriver().findElements(
- By.id(CloseModalSubWindow.SUB_WINDOW));
+ subWindows = getDriver()
+ .findElements(By.id(CloseModalSubWindow.SUB_WINDOW));
Assert.assertEquals(1, subWindows.size());
- WebElement confirm = getDriver().findElement(
- By.id(CloseModalSubWindow.CONFIRM_BUTTON));
+ WebElement confirm = getDriver()
+ .findElement(By.id(CloseModalSubWindow.CONFIRM_BUTTON));
// click the confirm button in the sub-window
confirm.click();
// assert that there's no sub-windows open
- subWindows = getDriver().findElements(
- By.id(CloseModalSubWindow.SUB_WINDOW));
+ subWindows = getDriver()
+ .findElements(By.id(CloseModalSubWindow.SUB_WINDOW));
Assert.assertEquals(0, subWindows.size());
// assert that there's no button with 'del-btn0' id anymore
- buttons = getDriver().findElements(
- By.id(CloseModalSubWindow.DELETE_BUTTON + "0"));
+ buttons = getDriver()
+ .findElements(By.id(CloseModalSubWindow.DELETE_BUTTON + "0"));
Assert.assertEquals(0, buttons.size());
}
private WebElement getFirstDeteleButton(int index) {
- WebElement button = getDriver().findElement(
- By.id(CloseModalSubWindow.DELETE_BUTTON + index));
+ WebElement button = getDriver()
+ .findElement(By.id(CloseModalSubWindow.DELETE_BUTTON + index));
return button;
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/window/ComboboxScrollableWindowTest.java b/uitest/src/test/java/com/vaadin/tests/components/window/ComboboxScrollableWindowTest.java
index a80938ba32..8400d4ad0d 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/window/ComboboxScrollableWindowTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/window/ComboboxScrollableWindowTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ import com.vaadin.tests.tb3.newelements.WindowElement;
/**
* Tests that a ComboBox at the bottom of a Window remains visible when clicked.
- *
+ *
* @author Vaadin Ltd
*/
public class ComboboxScrollableWindowTest extends MultiBrowserTest {
@@ -39,9 +39,10 @@ public class ComboboxScrollableWindowTest extends MultiBrowserTest {
openTestURL();
WindowElement window = $(WindowElement.class).id(WINDOW_ID);
- WebElement scrollableElement = window.findElement(By
- .className("v-scrollable"));
- TestBenchElementCommands scrollable = testBenchElement(scrollableElement);
+ WebElement scrollableElement = window
+ .findElement(By.className("v-scrollable"));
+ TestBenchElementCommands scrollable = testBenchElement(
+ scrollableElement);
scrollable.scroll(1000);
ComboBoxElement comboBox = $(ComboBoxElement.class).id(COMBOBOX_ID);
comboBox.openPopup();
diff --git a/uitest/src/test/java/com/vaadin/tests/components/window/ExtraWindowShownWaiAriaTest.java b/uitest/src/test/java/com/vaadin/tests/components/window/ExtraWindowShownWaiAriaTest.java
index 4ec1dc5c98..4b0415d381 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/window/ExtraWindowShownWaiAriaTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/window/ExtraWindowShownWaiAriaTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -33,7 +33,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests dialogs with WAI-ARIA.
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -65,8 +65,8 @@ public class ExtraWindowShownWaiAriaTest extends MultiBrowserTest {
assertEquals(label.getAttribute("id"),
window.getAttribute("aria-describedby"));
- List<WebElement> wButtons = window.findElements(By
- .className("v-button"));
+ List<WebElement> wButtons = window
+ .findElements(By.className("v-button"));
assertEquals("button", wButtons.get(0).getAttribute("role"));
assertEquals("button", wButtons.get(1).getAttribute("role"));
@@ -95,8 +95,9 @@ public class ExtraWindowShownWaiAriaTest extends MultiBrowserTest {
// ensure correct attributes
window = $(WindowElement.class).first();
List<WebElement> labels = window.findElements(By.className("v-label"));
- assertEquals(labels.get(0).getAttribute("id") + " "
- + labels.get(1).getAttribute("id"),
+ assertEquals(
+ labels.get(0).getAttribute("id") + " "
+ + labels.get(1).getAttribute("id"),
window.getAttribute("aria-describedby"));
// close dialog
@@ -121,8 +122,8 @@ public class ExtraWindowShownWaiAriaTest extends MultiBrowserTest {
// ensure the assistive spans have been added to the header
window = $(WindowElement.class).first();
header = window.findElement(By.className("v-window-header"));
- List<WebElement> assistiveElements = header.findElements(By
- .className("v-assistive-device-only"));
+ List<WebElement> assistiveElements = header
+ .findElements(By.className("v-assistive-device-only"));
assertEquals("Important",
assistiveElements.get(0).getAttribute("innerHTML"));
assertEquals(" - do ASAP",
diff --git a/uitest/src/test/java/com/vaadin/tests/components/window/GridInWindowTest.java b/uitest/src/test/java/com/vaadin/tests/components/window/GridInWindowTest.java
index 301a7c60e4..b0844b225f 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/window/GridInWindowTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/window/GridInWindowTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/window/MaximizeRestoreWindowWithManagedLayoutTest.java b/uitest/src/test/java/com/vaadin/tests/components/window/MaximizeRestoreWindowWithManagedLayoutTest.java
index 17d4cf80e7..dec4aaff45 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/window/MaximizeRestoreWindowWithManagedLayoutTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/window/MaximizeRestoreWindowWithManagedLayoutTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,8 +23,8 @@ import com.vaadin.testbench.elements.TextFieldElement;
import com.vaadin.tests.tb3.MultiBrowserTest;
import com.vaadin.tests.tb3.newelements.WindowElement;
-public class MaximizeRestoreWindowWithManagedLayoutTest extends
- MultiBrowserTest {
+public class MaximizeRestoreWindowWithManagedLayoutTest
+ extends MultiBrowserTest {
// This tests a timing issue so if this test fails randomly, it is
// likely that something is broken
diff --git a/uitest/src/test/java/com/vaadin/tests/components/window/ModalWindowFocusTest.java b/uitest/src/test/java/com/vaadin/tests/components/window/ModalWindowFocusTest.java
index 75b6eaa15c..ebb0c5e05e 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/window/ModalWindowFocusTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/window/ModalWindowFocusTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,7 +30,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests that a modal window is focused on creation and that on closing a window
* focus is given to underlying modal window
- *
+ *
* @author Vaadin Ltd
*/
public class ModalWindowFocusTest extends MultiBrowserTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/window/MoveToTopTest.java b/uitest/src/test/java/com/vaadin/tests/components/window/MoveToTopTest.java
index 1700100ae7..9e7c63e509 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/window/MoveToTopTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/window/MoveToTopTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.testbench.By;
import com.vaadin.tests.tb3.MultiBrowserTest;
/**
- *
+ *
* @author Vaadin Ltd
*/
public class MoveToTopTest extends MultiBrowserTest {
@@ -33,18 +33,18 @@ public class MoveToTopTest extends MultiBrowserTest {
public void testBringToFrontViaHeader() throws IOException {
openTestURL();
- WebElement firstWindow = driver.findElement(By
- .className("first-window"));
+ WebElement firstWindow = driver
+ .findElement(By.className("first-window"));
- WebElement secondWindow = driver.findElement(By
- .className("second-window"));
+ WebElement secondWindow = driver
+ .findElement(By.className("second-window"));
secondWindow.click();
compareScreen("second-window-over-first");
- WebElement headerFirst = firstWindow.findElement(By
- .className("v-window-outerheader"));
+ WebElement headerFirst = firstWindow
+ .findElement(By.className("v-window-outerheader"));
headerFirst.click();
compareScreen("first-window-over-second");
diff --git a/uitest/src/test/java/com/vaadin/tests/components/window/OpenModalWindowAndFocusFieldTest.java b/uitest/src/test/java/com/vaadin/tests/components/window/OpenModalWindowAndFocusFieldTest.java
index 5dba1c3285..2f1d67f8fa 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/window/OpenModalWindowAndFocusFieldTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/window/OpenModalWindowAndFocusFieldTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -39,8 +39,8 @@ public class OpenModalWindowAndFocusFieldTest extends MultiBrowserTest {
openTestURL();
$(ButtonElement.class).id("open").click();
// WindowElement window = $(WindowElement.class).first();
- WebElement windowFocusElement = findElement(By
- .xpath("//div[@class='v-window-contents']/div[@class='v-scrollable']"));
+ WebElement windowFocusElement = findElement(By.xpath(
+ "//div[@class='v-window-contents']/div[@class='v-scrollable']"));
assertElementsEquals(windowFocusElement, getActiveElement());
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/window/ScrollingBodyElementWithModalOpenedTest.java b/uitest/src/test/java/com/vaadin/tests/components/window/ScrollingBodyElementWithModalOpenedTest.java
index 9a3ccb3b31..5e64e4e21c 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/window/ScrollingBodyElementWithModalOpenedTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/window/ScrollingBodyElementWithModalOpenedTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.testbench.commands.TestBenchElementCommands;
import com.vaadin.tests.tb3.MultiBrowserTest;
/**
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -33,8 +33,8 @@ public class ScrollingBodyElementWithModalOpenedTest extends MultiBrowserTest {
public void testWindowScrollbars() throws Exception {
openTestURL();
- WebElement bodyElement = driver.findElement(By
- .className("v-modal-window-open"));
+ WebElement bodyElement = driver
+ .findElement(By.className("v-modal-window-open"));
TestBenchElementCommands scrollable = testBenchElement(bodyElement);
scrollable.scroll(1000);
diff --git a/uitest/src/test/java/com/vaadin/tests/components/window/SubWindowWithUndefinedHeightTest.java b/uitest/src/test/java/com/vaadin/tests/components/window/SubWindowWithUndefinedHeightTest.java
index ec86f62a7c..e1a45b0781 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/window/SubWindowWithUndefinedHeightTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/window/SubWindowWithUndefinedHeightTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/window/SubWindowsTextSelectionTest.java b/uitest/src/test/java/com/vaadin/tests/components/window/SubWindowsTextSelectionTest.java
index e0cc240d6d..fac7953d17 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/window/SubWindowsTextSelectionTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/window/SubWindowsTextSelectionTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,7 +32,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test for issue #12726, IE's make text selection when sub windows are
* dragged(moved).
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -40,7 +40,7 @@ public class SubWindowsTextSelectionTest extends MultiBrowserTest {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.tb3.AbstractTB3Test#getUIClass()
*/
@Override
@@ -58,8 +58,8 @@ public class SubWindowsTextSelectionTest extends MultiBrowserTest {
openTestURL();
- WebElement element = driver.findElement(By
- .className("v-window-outerheader"));
+ WebElement element = driver
+ .findElement(By.className("v-window-outerheader"));
Point location = element.getLocation();
@@ -72,8 +72,9 @@ public class SubWindowsTextSelectionTest extends MultiBrowserTest {
.moveByOffset(10, 2).moveByOffset(10, 0).moveByOffset(10, 0)
.moveByOffset(10, 0).release().perform();
- String selection = ((JavascriptExecutor) getDriver()).executeScript(
- "return document.getSelection().toString();").toString();
+ String selection = ((JavascriptExecutor) getDriver())
+ .executeScript("return document.getSelection().toString();")
+ .toString();
Assert.assertTrue("Text selection was not empty:" + selection,
selection.isEmpty());
diff --git a/uitest/src/test/java/com/vaadin/tests/components/window/TestTooSmallSubwindowSizeTest.java b/uitest/src/test/java/com/vaadin/tests/components/window/TestTooSmallSubwindowSizeTest.java
index cb7c0bd504..88d85c3c56 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/window/TestTooSmallSubwindowSizeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/window/TestTooSmallSubwindowSizeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests that the styles work correctly in tiny subwindows that have more
* content than can fit.
- *
+ *
* @author Vaadin Ltd
*/
public class TestTooSmallSubwindowSizeTest extends MultiBrowserTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/components/window/ToolTipInWindowTest.java b/uitest/src/test/java/com/vaadin/tests/components/window/ToolTipInWindowTest.java
index abe2bcbe36..1431e2b647 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/window/ToolTipInWindowTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/window/ToolTipInWindowTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2015 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -35,10 +35,11 @@ public class ToolTipInWindowTest extends MultiBrowserTest {
openTestURL();
- WebElement header = driver.findElement(By
- .className("v-window-outerheader"));
- new Actions(driver).moveToElement(
- driver.findElement(By.className("v-ui")), 0, 0).perform();
+ WebElement header = driver
+ .findElement(By.className("v-window-outerheader"));
+ new Actions(driver)
+ .moveToElement(driver.findElement(By.className("v-ui")), 0, 0)
+ .perform();
sleep(500);
new Actions(driver).moveToElement(header).perform();
sleep(1100);
@@ -54,10 +55,11 @@ public class ToolTipInWindowTest extends MultiBrowserTest {
openTestURL();
- WebElement header = driver.findElement(By
- .className("v-window-contents"));
- new Actions(driver).moveToElement(
- driver.findElement(By.className("v-ui")), 0, 300).perform();
+ WebElement header = driver
+ .findElement(By.className("v-window-contents"));
+ new Actions(driver)
+ .moveToElement(driver.findElement(By.className("v-ui")), 0, 300)
+ .perform();
sleep(500);
new Actions(driver).moveToElement(header).perform();
sleep(1000);
diff --git a/uitest/src/test/java/com/vaadin/tests/components/window/UncloseableWindowCloseShortcutTest.java b/uitest/src/test/java/com/vaadin/tests/components/window/UncloseableWindowCloseShortcutTest.java
index 4574e7b3eb..ee462eecf9 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/window/UncloseableWindowCloseShortcutTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/window/UncloseableWindowCloseShortcutTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/window/WindowBGColorChameleonIE8Test.java b/uitest/src/test/java/com/vaadin/tests/components/window/WindowBGColorChameleonIE8Test.java
index 4e9bffe3e8..60a865040f 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/window/WindowBGColorChameleonIE8Test.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/window/WindowBGColorChameleonIE8Test.java
@@ -14,7 +14,7 @@ public class WindowBGColorChameleonIE8Test extends SingleBrowserTest {
/*
* We care about IE8 here only (Or any very very old browsers)
- *
+ *
* @see com.vaadin.tests.tb3.SingleBrowserTest#getBrowsersToTest()
*/
@Override
diff --git a/uitest/src/test/java/com/vaadin/tests/components/window/WindowCaptionTest.java b/uitest/src/test/java/com/vaadin/tests/components/window/WindowCaptionTest.java
index f580d7c501..244e027601 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/window/WindowCaptionTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/window/WindowCaptionTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/window/WindowInUiWithNoContentTest.java b/uitest/src/test/java/com/vaadin/tests/components/window/WindowInUiWithNoContentTest.java
index ab247be25b..82aa182dc1 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/window/WindowInUiWithNoContentTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/window/WindowInUiWithNoContentTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test for Window attached to the UI with not content.
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
diff --git a/uitest/src/test/java/com/vaadin/tests/components/window/WindowMaxHeightTest.java b/uitest/src/test/java/com/vaadin/tests/components/window/WindowMaxHeightTest.java
index dabc070d77..20ce899f48 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/window/WindowMaxHeightTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/window/WindowMaxHeightTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/components/window/WindowMoveListenerTest.java b/uitest/src/test/java/com/vaadin/tests/components/window/WindowMoveListenerTest.java
index 8d74e3a259..713d4e6ca3 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/window/WindowMoveListenerTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/window/WindowMoveListenerTest.java
@@ -23,8 +23,8 @@ public class WindowMoveListenerTest extends MultiBrowserTest {
// I'd loved to use the header, but that doesn't work. Footer works
// fine, though :)
- WebElement windowFooter = getDriver().findElement(
- By.className("v-window-footer"));
+ WebElement windowFooter = getDriver()
+ .findElement(By.className("v-window-footer"));
final Point winPos = window.getLocation();
diff --git a/uitest/src/test/java/com/vaadin/tests/components/window/WindowShadowTest.java b/uitest/src/test/java/com/vaadin/tests/components/window/WindowShadowTest.java
index 3cc310eeb4..f0dcf9a50b 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/window/WindowShadowTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/window/WindowShadowTest.java
@@ -34,8 +34,8 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
public class WindowShadowTest extends MultiBrowserTest {
@Test
- public void dragBackgroundWindow() throws AWTException, IOException,
- InterruptedException {
+ public void dragBackgroundWindow()
+ throws AWTException, IOException, InterruptedException {
openTestURL();
WebElement wnd = getDriver().findElement(By.id("topwindow"));
// There is some bug in Selenium. Can't move window using header
diff --git a/uitest/src/test/java/com/vaadin/tests/components/window/WindowShouldRemoveActionHandlerTest.java b/uitest/src/test/java/com/vaadin/tests/components/window/WindowShouldRemoveActionHandlerTest.java
index 755a4242ed..179e904d0e 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/window/WindowShouldRemoveActionHandlerTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/window/WindowShouldRemoveActionHandlerTest.java
@@ -23,7 +23,8 @@ public class WindowShouldRemoveActionHandlerTest extends MultiBrowserTest {
removeActionHandler();
removeActionHandler();
- assertState("An UI with 3 action handlers - Removed handler - Removed handler");
+ assertState(
+ "An UI with 3 action handlers - Removed handler - Removed handler");
addActionHandler();
assertState("An UI with 2 action handlers");
diff --git a/uitest/src/test/java/com/vaadin/tests/components/window/WindowZIndexTest.java b/uitest/src/test/java/com/vaadin/tests/components/window/WindowZIndexTest.java
index dc2dfca4f0..f58e4fa3b7 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/window/WindowZIndexTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/window/WindowZIndexTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,10 +30,10 @@ public class WindowZIndexTest extends MultiBrowserTest {
public void removingUpdatesZIndices() throws IOException {
openTestURL();
- WebElement addButton = driver.findElement(By
- .xpath("//span[contains(text(),'Add window')]"));
- WebElement closeButton = driver.findElement(By
- .xpath("//span[contains(text(),'Close window')]"));
+ WebElement addButton = driver
+ .findElement(By.xpath("//span[contains(text(),'Add window')]"));
+ WebElement closeButton = driver.findElement(
+ By.xpath("//span[contains(text(),'Close window')]"));
addButton.click();
addButton.click();
@@ -52,8 +52,8 @@ public class WindowZIndexTest extends MultiBrowserTest {
compareScreen("stacked");
- WebElement window4 = driver.findElement(By
- .xpath("//*[contains(text(), 'Window 4')]"));
+ WebElement window4 = driver
+ .findElement(By.xpath("//*[contains(text(), 'Window 4')]"));
new Actions(driver).moveToElement(window4, 1, 9).click().perform();
compareScreen("win4-on-top");
diff --git a/uitest/src/test/java/com/vaadin/tests/containers/sqlcontainer/TableQueryWithNonUniqueFirstPrimaryKeyTest.java b/uitest/src/test/java/com/vaadin/tests/containers/sqlcontainer/TableQueryWithNonUniqueFirstPrimaryKeyTest.java
index 172d83e645..c6f1409f9b 100644
--- a/uitest/src/test/java/com/vaadin/tests/containers/sqlcontainer/TableQueryWithNonUniqueFirstPrimaryKeyTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/containers/sqlcontainer/TableQueryWithNonUniqueFirstPrimaryKeyTest.java
@@ -12,8 +12,8 @@ import com.vaadin.testbench.By;
import com.vaadin.testbench.elements.ComboBoxElement;
import com.vaadin.tests.tb3.MultiBrowserTest;
-public class TableQueryWithNonUniqueFirstPrimaryKeyTest extends
- MultiBrowserTest {
+public class TableQueryWithNonUniqueFirstPrimaryKeyTest
+ extends MultiBrowserTest {
private static final String[] DATA = { "TARUSCIO GIOVANNI",
"RUSSO GAETANO AUTORICAMBI", "AMORUSO LUIGI SRL", "CARUSO ROCCO",
@@ -29,8 +29,8 @@ public class TableQueryWithNonUniqueFirstPrimaryKeyTest extends
List<String> result = new ArrayList<String>();
// pick list items that are shown in suggestion popup
- List<WebElement> elems = findElements(By
- .cssSelector("td[role=\"listitem\"]"));
+ List<WebElement> elems = findElements(
+ By.cssSelector("td[role=\"listitem\"]"));
Assert.assertEquals("not enough suggestions shown", DATA.length,
elems.size());
diff --git a/uitest/src/test/java/com/vaadin/tests/contextclick/AbstractContextClickTest.java b/uitest/src/test/java/com/vaadin/tests/contextclick/AbstractContextClickTest.java
index 7544caaf0a..96598d537a 100644
--- a/uitest/src/test/java/com/vaadin/tests/contextclick/AbstractContextClickTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/contextclick/AbstractContextClickTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -88,7 +88,8 @@ public abstract class AbstractContextClickTest extends MultiBrowserTest {
Matcher matcher = defaultLog.matcher(getLogRow(0));
Assert.assertTrue(
"Log row content did not match default listener output: "
- + getLogRow(0), matcher.find());
+ + getLogRow(0),
+ matcher.find());
int xCoord = Integer.parseInt(matcher.group(1));
int yCoord = Integer.parseInt(matcher.group(2));
@@ -120,7 +121,7 @@ public abstract class AbstractContextClickTest extends MultiBrowserTest {
* Performs a context click on given element at coordinates 10, 10 followed
* by a regular click. This prevents browser context menu from blocking
* future operations.
- *
+ *
* @param e
* web element
*/
@@ -132,7 +133,7 @@ public abstract class AbstractContextClickTest extends MultiBrowserTest {
* Performs a context click on given element at given coordinates followed
* by a regular click. This prevents browser context menu from blocking
* future operations.
- *
+ *
* @param e
* web element
* @param xCoord
@@ -141,8 +142,8 @@ public abstract class AbstractContextClickTest extends MultiBrowserTest {
* y coordinate
*/
protected void contextClick(WebElement e, int xCoord, int yCoord) {
- new Actions(getDriver()).moveToElement(e, xCoord, yCoord)
- .contextClick().moveByOffset(-5, -5).click().perform();
+ new Actions(getDriver()).moveToElement(e, xCoord, yCoord).contextClick()
+ .moveByOffset(-5, -5).click().perform();
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/contextclick/GridContextClickTest.java b/uitest/src/test/java/com/vaadin/tests/contextclick/GridContextClickTest.java
index 6ee7a89178..b0d22b2406 100644
--- a/uitest/src/test/java/com/vaadin/tests/contextclick/GridContextClickTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/contextclick/GridContextClickTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -94,10 +94,10 @@ public class GridContextClickTest extends AbstractContextClickTest {
* Performs a context click on given element at coordinates 20, 10 followed
* by a regular click. This prevents browser context menu from blocking
* future operations.
- *
+ *
* A smaller X offset might hit the resize handle of the previous cell that
* overlaps with the next header cell.
- *
+ *
* @param e
* web element
*/
diff --git a/uitest/src/test/java/com/vaadin/tests/contextclick/ListenerAddAndRemoveTest.java b/uitest/src/test/java/com/vaadin/tests/contextclick/ListenerAddAndRemoveTest.java
index dd1d3ebd53..5395cfa4cb 100644
--- a/uitest/src/test/java/com/vaadin/tests/contextclick/ListenerAddAndRemoveTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/contextclick/ListenerAddAndRemoveTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/contextclick/TableContextClickTest.java b/uitest/src/test/java/com/vaadin/tests/contextclick/TableContextClickTest.java
index bfd8862440..af349f54ef 100644
--- a/uitest/src/test/java/com/vaadin/tests/contextclick/TableContextClickTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/contextclick/TableContextClickTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/contextclick/TableContextClickTestBase.java b/uitest/src/test/java/com/vaadin/tests/contextclick/TableContextClickTestBase.java
index e3f4647c33..e797aec881 100644
--- a/uitest/src/test/java/com/vaadin/tests/contextclick/TableContextClickTestBase.java
+++ b/uitest/src/test/java/com/vaadin/tests/contextclick/TableContextClickTestBase.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,8 +19,8 @@ import static org.junit.Assert.assertEquals;
import com.vaadin.testbench.elements.TableElement;
-public abstract class TableContextClickTestBase extends
- AbstractContextClickTest {
+public abstract class TableContextClickTestBase
+ extends AbstractContextClickTest {
@Override
protected Class<?> getUIClass() {
diff --git a/uitest/src/test/java/com/vaadin/tests/contextclick/TreeContextClickTest.java b/uitest/src/test/java/com/vaadin/tests/contextclick/TreeContextClickTest.java
index 180349af63..53a12c72af 100644
--- a/uitest/src/test/java/com/vaadin/tests/contextclick/TreeContextClickTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/contextclick/TreeContextClickTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -34,8 +34,8 @@ public class TreeContextClickTest extends AbstractContextClickTest {
addOrRemoveTypedListener();
- List<WebElement> nodes = $(TreeElement.class).first().findElements(
- By.className("v-tree-node"));
+ List<WebElement> nodes = $(TreeElement.class).first()
+ .findElements(By.className("v-tree-node"));
contextClick(nodes.get(1));
@@ -52,14 +52,14 @@ public class TreeContextClickTest extends AbstractContextClickTest {
addOrRemoveTypedListener();
- List<WebElement> nodes = $(TreeElement.class).first().findElements(
- By.className("v-tree-node"));
+ List<WebElement> nodes = $(TreeElement.class).first()
+ .findElements(By.className("v-tree-node"));
new Actions(getDriver()).moveToElement(nodes.get(1), 10, 10).click()
.perform();
- nodes = $(TreeElement.class).first().findElements(
- By.className("v-tree-node"));
+ nodes = $(TreeElement.class).first()
+ .findElements(By.className("v-tree-node"));
contextClick(nodes.get(2));
assertEquals("1. ContextClickEvent: Baz", getLogRow(0));
diff --git a/uitest/src/test/java/com/vaadin/tests/contextclick/TreeTableContextClickTest.java b/uitest/src/test/java/com/vaadin/tests/contextclick/TreeTableContextClickTest.java
index f91750ce91..9446dae727 100644
--- a/uitest/src/test/java/com/vaadin/tests/contextclick/TreeTableContextClickTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/contextclick/TreeTableContextClickTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -15,7 +15,6 @@
*/
package com.vaadin.tests.contextclick;
-
public class TreeTableContextClickTest extends TableContextClickTest {
@Override
diff --git a/uitest/src/test/java/com/vaadin/tests/converter/ConverterThatEnforcesAFormatTest.java b/uitest/src/test/java/com/vaadin/tests/converter/ConverterThatEnforcesAFormatTest.java
index 886e96700a..97c400c347 100644
--- a/uitest/src/test/java/com/vaadin/tests/converter/ConverterThatEnforcesAFormatTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/converter/ConverterThatEnforcesAFormatTest.java
@@ -64,9 +64,8 @@ public class ConverterThatEnforcesAFormatTest extends MultiBrowserTest {
@Override
public String toString() {
- return String.format(
- "the field to have value '%s' (was: '%s')", expected,
- actual);
+ return String.format("the field to have value '%s' (was: '%s')",
+ expected, actual);
}
});
}
diff --git a/uitest/src/test/java/com/vaadin/tests/customelements/CustomProgressBarElement.java b/uitest/src/test/java/com/vaadin/tests/customelements/CustomProgressBarElement.java
index a669d32f2e..6b0d6cf8b2 100644
--- a/uitest/src/test/java/com/vaadin/tests/customelements/CustomProgressBarElement.java
+++ b/uitest/src/test/java/com/vaadin/tests/customelements/CustomProgressBarElement.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,8 +25,8 @@ import com.vaadin.testbench.elementsbase.ServerClass;
public class CustomProgressBarElement extends ProgressBarElement {
public double getValue() {
- WebElement indicator = findElement(By
- .className("v-progressbar-indicator"));
+ WebElement indicator = findElement(
+ By.className("v-progressbar-indicator"));
String width = getStyleAttribute(indicator, "width");
if (!width.endsWith("%")) {
return 0;
diff --git a/uitest/src/test/java/com/vaadin/tests/dd/DDInterruptTest.java b/uitest/src/test/java/com/vaadin/tests/dd/DDInterruptTest.java
index e078bc4665..e9d7e510fe 100644
--- a/uitest/src/test/java/com/vaadin/tests/dd/DDInterruptTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/dd/DDInterruptTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test for interrupting drag-and-drop.
- *
+ *
* @author Vaadin Ltd
*/
public class DDInterruptTest extends MultiBrowserTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/debug/HierarchyAfterAnalyzeLayoutsTest.java b/uitest/src/test/java/com/vaadin/tests/debug/HierarchyAfterAnalyzeLayoutsTest.java
index d4f027a2c8..cbef7bc836 100644
--- a/uitest/src/test/java/com/vaadin/tests/debug/HierarchyAfterAnalyzeLayoutsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/debug/HierarchyAfterAnalyzeLayoutsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Check that analyze layouts does not find problems for a trivial application.
- *
+ *
* @since 7.2
* @author Vaadin Ltd
*/
@@ -37,13 +37,16 @@ public class HierarchyAfterAnalyzeLayoutsTest extends MultiBrowserTest {
openTestURL();
// select tab
- pressDebugWindowButton(findByXpath("//button[@title = 'Examine component hierarchy']"));
+ pressDebugWindowButton(findByXpath(
+ "//button[@title = 'Examine component hierarchy']"));
// click "analyze layouts"
- pressDebugWindowButton(findByXpath("//button[@title = 'Check layouts for potential problems']"));
+ pressDebugWindowButton(findByXpath(
+ "//button[@title = 'Check layouts for potential problems']"));
// check that no problems found
- findByXpath("//div[text() = 'Layouts analyzed, no top level problems']");
+ findByXpath(
+ "//div[text() = 'Layouts analyzed, no top level problems']");
// check that original label still there
findByXpath("//div[text() = 'This is a label']");
diff --git a/uitest/src/test/java/com/vaadin/tests/debug/PreserveCustomDebugSectionOpenTest.java b/uitest/src/test/java/com/vaadin/tests/debug/PreserveCustomDebugSectionOpenTest.java
index 01b73ded92..f51d38eb9e 100644
--- a/uitest/src/test/java/com/vaadin/tests/debug/PreserveCustomDebugSectionOpenTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/debug/PreserveCustomDebugSectionOpenTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,12 +28,12 @@ public class PreserveCustomDebugSectionOpenTest extends SingleBrowserTest {
setDebug(true);
openTestURL();
- findElement(
- By.cssSelector(".v-debugwindow-tabs button[title=\"Dummy debug window section\"]"))
- .click();
+ findElement(By.cssSelector(
+ ".v-debugwindow-tabs button[title=\"Dummy debug window section\"]"))
+ .click();
- WebElement content = findElement(By
- .cssSelector(".v-debugwindow-content"));
+ WebElement content = findElement(
+ By.cssSelector(".v-debugwindow-content"));
// Sanity check
Assert.assertEquals("Dummy debug window section", content.getText());
diff --git a/uitest/src/test/java/com/vaadin/tests/debug/ProfilerZeroOverheadTest.java b/uitest/src/test/java/com/vaadin/tests/debug/ProfilerZeroOverheadTest.java
index 659823e49a..29a0772e70 100644
--- a/uitest/src/test/java/com/vaadin/tests/debug/ProfilerZeroOverheadTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/debug/ProfilerZeroOverheadTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -40,8 +40,8 @@ public class ProfilerZeroOverheadTest extends SingleBrowserTest {
int bodyStart = canaryMethodString.indexOf('{');
int bodyEnd = canaryMethodString.lastIndexOf('}');
- String methodBody = canaryMethodString
- .substring(bodyStart + 1, bodyEnd);
+ String methodBody = canaryMethodString.substring(bodyStart + 1,
+ bodyEnd);
// Method body shouldn't contain anything else than whitespace
if (!methodBody.replaceAll("\\s", "").isEmpty()) {
diff --git a/uitest/src/test/java/com/vaadin/tests/debug/PushVersionInfoTest.java b/uitest/src/test/java/com/vaadin/tests/debug/PushVersionInfoTest.java
index 5fcda733ae..24780cc096 100644
--- a/uitest/src/test/java/com/vaadin/tests/debug/PushVersionInfoTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/debug/PushVersionInfoTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ import com.vaadin.tests.tb3.SingleBrowserTest;
/**
* Test for PUSH version string in debug window.
- *
+ *
* @author Vaadin Ltd
*/
@TestCategory("push")
@@ -59,8 +59,7 @@ public class PushVersionInfoTest extends SingleBrowserTest {
Assert.assertTrue("Push row doesn't contain Atmosphere version",
pushRow.getText().contains(atmVersion));
String jsString = getPushRowValue("Push client version").getText();
- Assert.assertTrue(
- "Push client version doesn't contain 'vaadin' string",
+ Assert.assertTrue("Push client version doesn't contain 'vaadin' string",
jsString.contains("vaadin"));
Assert.assertTrue(
"Push client version doesn't contain 'javascript' string",
@@ -72,8 +71,8 @@ public class PushVersionInfoTest extends SingleBrowserTest {
int size = findElements(By.className("v-debugwindow-tab")).size();
for (int i = 0; i < size; i++) {
- WebElement tab = findElement(By
- .className("v-debugwindow-tab-selected"));
+ WebElement tab = findElement(
+ By.className("v-debugwindow-tab-selected"));
String title = tab.getAttribute("title");
if (title != null && title.startsWith("General information")) {
break;
diff --git a/uitest/src/test/java/com/vaadin/tests/extensions/IframeIsOpenedInNonIOSTest.java b/uitest/src/test/java/com/vaadin/tests/extensions/IframeIsOpenedInNonIOSTest.java
index e5614b60a4..046e304506 100644
--- a/uitest/src/test/java/com/vaadin/tests/extensions/IframeIsOpenedInNonIOSTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/extensions/IframeIsOpenedInNonIOSTest.java
@@ -21,9 +21,8 @@ public class IframeIsOpenedInNonIOSTest extends MultiBrowserTest {
List<WebElement> iframes = driver.findElements(By.tagName("iframe"));
boolean containsFileIframe = false;
for (WebElement iframe : iframes) {
- containsFileIframe = containsFileIframe
- | iframe.getAttribute("src").contains(
- IframeIsOpenedInNonIOS.FILE_NAME);
+ containsFileIframe = containsFileIframe | iframe.getAttribute("src")
+ .contains(IframeIsOpenedInNonIOS.FILE_NAME);
}
Assert.assertTrue("page doesn't contain iframe with the file",
diff --git a/uitest/src/test/java/com/vaadin/tests/extensions/ResponsiveUITest.java b/uitest/src/test/java/com/vaadin/tests/extensions/ResponsiveUITest.java
index f7cbd9477c..d070c89b23 100644
--- a/uitest/src/test/java/com/vaadin/tests/extensions/ResponsiveUITest.java
+++ b/uitest/src/test/java/com/vaadin/tests/extensions/ResponsiveUITest.java
@@ -47,9 +47,9 @@ public class ResponsiveUITest extends MultiBrowserTest {
openTestURL();
// IE sometimes has trouble waiting long enough.
- new WebDriverWait(getDriver(), 30).until(ExpectedConditions
- .presenceOfElementLocated(By
- .cssSelector(".v-csslayout-grid.first")));
+ new WebDriverWait(getDriver(), 30)
+ .until(ExpectedConditions.presenceOfElementLocated(
+ By.cssSelector(".v-csslayout-grid.first")));
assertEquals("401px-600px",
$(".v-csslayout-grid.first").getAttribute("width-range"));
diff --git a/uitest/src/test/java/com/vaadin/tests/extensions/ResponsiveWidthAndHeightTest.java b/uitest/src/test/java/com/vaadin/tests/extensions/ResponsiveWidthAndHeightTest.java
index 8086457c24..1d80a5ecd4 100644
--- a/uitest/src/test/java/com/vaadin/tests/extensions/ResponsiveWidthAndHeightTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/extensions/ResponsiveWidthAndHeightTest.java
@@ -41,9 +41,9 @@ public class ResponsiveWidthAndHeightTest extends MultiBrowserTest {
openTestURL();
// IE sometimes has trouble waiting long enough.
- new WebDriverWait(getDriver(), 30).until(ExpectedConditions
- .presenceOfElementLocated(By
- .cssSelector(".v-csslayout-width-and-height")));
+ new WebDriverWait(getDriver(), 30)
+ .until(ExpectedConditions.presenceOfElementLocated(
+ By.cssSelector(".v-csslayout-width-and-height")));
// Verify both width-range and height-range.
assertEquals("600px-",
diff --git a/uitest/src/test/java/com/vaadin/tests/extensions/ResponsiveWithCrossDomainStylesTest.java b/uitest/src/test/java/com/vaadin/tests/extensions/ResponsiveWithCrossDomainStylesTest.java
index 4089618635..83ef328ce7 100644
--- a/uitest/src/test/java/com/vaadin/tests/extensions/ResponsiveWithCrossDomainStylesTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/extensions/ResponsiveWithCrossDomainStylesTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/extensions/SetThemeAndResponsiveLayoutTest.java b/uitest/src/test/java/com/vaadin/tests/extensions/SetThemeAndResponsiveLayoutTest.java
index 0d0b388541..d3591ecc5c 100644
--- a/uitest/src/test/java/com/vaadin/tests/extensions/SetThemeAndResponsiveLayoutTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/extensions/SetThemeAndResponsiveLayoutTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -50,9 +50,9 @@ public class SetThemeAndResponsiveLayoutTest extends MultiBrowserTest {
public void testWidthAndHeightRanges() throws Exception {
openTestURL();
// IE sometimes has trouble waiting long enough.
- new WebDriverWait(getDriver(), 30).until(ExpectedConditions
- .presenceOfElementLocated(By
- .cssSelector(".v-csslayout-width-and-height")));
+ new WebDriverWait(getDriver(), 30)
+ .until(ExpectedConditions.presenceOfElementLocated(
+ By.cssSelector(".v-csslayout-width-and-height")));
// set the theme programmatically
$(ButtonElement.class).caption("Set theme").first().click();
new WebDriverWait(getDriver(), 30).until(ExpectedConditions
diff --git a/uitest/src/test/java/com/vaadin/tests/fieldgroup/BasicCrudGridEditorRowTest.java b/uitest/src/test/java/com/vaadin/tests/fieldgroup/BasicCrudGridEditorRowTest.java
index df250357d8..fe853831a3 100644
--- a/uitest/src/test/java/com/vaadin/tests/fieldgroup/BasicCrudGridEditorRowTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/fieldgroup/BasicCrudGridEditorRowTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -107,7 +107,8 @@ public class BasicCrudGridEditorRowTest extends MultiBrowserTest {
new Actions(getDriver()).doubleClick(cell).perform();
String attribute = grid.getEditor().getAttribute("style").toLowerCase();
- assertFalse("Style should not contain top.", attribute.contains("top:"));
+ assertFalse("Style should not contain top.",
+ attribute.contains("top:"));
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/fieldgroup/BasicCrudGridTest.java b/uitest/src/test/java/com/vaadin/tests/fieldgroup/BasicCrudGridTest.java
index 12bccdd065..acc3ba6faa 100644
--- a/uitest/src/test/java/com/vaadin/tests/fieldgroup/BasicCrudGridTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/fieldgroup/BasicCrudGridTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,8 +31,8 @@ public class BasicCrudGridTest extends SingleBrowserTestPhantomJS2 {
@Test
public void fieldsInitiallyEmpty() {
openTestURL();
- List<TextFieldElement> textFields = getFieldsLayout().$(
- TextFieldElement.class).all();
+ List<TextFieldElement> textFields = getFieldsLayout()
+ .$(TextFieldElement.class).all();
for (TextFieldElement e : textFields) {
Assert.assertEquals("TextField should be empty", "", e.getValue());
@@ -50,8 +50,8 @@ public class BasicCrudGridTest extends SingleBrowserTestPhantomJS2 {
// Select row
$(GridElement.class).first().getCell(2, 2).click();
- List<TextFieldElement> textFields = getFieldsLayout().$(
- TextFieldElement.class).all();
+ List<TextFieldElement> textFields = getFieldsLayout()
+ .$(TextFieldElement.class).all();
for (TextFieldElement e : textFields) {
Assert.assertNotEquals("TextField should not be empty", "",
diff --git a/uitest/src/test/java/com/vaadin/tests/fieldgroup/BasicCrudTableTest.java b/uitest/src/test/java/com/vaadin/tests/fieldgroup/BasicCrudTableTest.java
index 86441b09f9..c17ba0466a 100644
--- a/uitest/src/test/java/com/vaadin/tests/fieldgroup/BasicCrudTableTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/fieldgroup/BasicCrudTableTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,8 +31,8 @@ public class BasicCrudTableTest extends SingleBrowserTest {
@Test
public void fieldsInitiallyEmpty() {
openTestURL();
- List<TextFieldElement> textFields = getFieldsLayout().$(
- TextFieldElement.class).all();
+ List<TextFieldElement> textFields = getFieldsLayout()
+ .$(TextFieldElement.class).all();
for (TextFieldElement e : textFields) {
Assert.assertEquals("TextField should be empty", "", e.getValue());
@@ -50,8 +50,8 @@ public class BasicCrudTableTest extends SingleBrowserTest {
// Select row
$(TableElement.class).first().getCell(2, 2).click();
- List<TextFieldElement> textFields = getFieldsLayout().$(
- TextFieldElement.class).all();
+ List<TextFieldElement> textFields = getFieldsLayout()
+ .$(TextFieldElement.class).all();
for (TextFieldElement e : textFields) {
Assert.assertNotEquals("TextField should not be empty", "",
diff --git a/uitest/src/test/java/com/vaadin/tests/fieldgroup/BasicPersonFormTest.java b/uitest/src/test/java/com/vaadin/tests/fieldgroup/BasicPersonFormTest.java
index 2562412480..973233ec24 100644
--- a/uitest/src/test/java/com/vaadin/tests/fieldgroup/BasicPersonFormTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/fieldgroup/BasicPersonFormTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -164,8 +164,8 @@ public abstract class BasicPersonFormTest extends MultiBrowserTest {
protected void assertLogText(String expected) {
++logCounter;
- Assert.assertEquals("Unexpected log contents,", logCounter + ". "
- + expected, getLogRow(0));
+ Assert.assertEquals("Unexpected log contents,",
+ logCounter + ". " + expected, getLogRow(0));
}
protected void assertDefaults() {
diff --git a/uitest/src/test/java/com/vaadin/tests/fieldgroup/CommitWithValidationOrConversionErrorTest.java b/uitest/src/test/java/com/vaadin/tests/fieldgroup/CommitWithValidationOrConversionErrorTest.java
index f5c751cd49..ed930f3a6c 100644
--- a/uitest/src/test/java/com/vaadin/tests/fieldgroup/CommitWithValidationOrConversionErrorTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/fieldgroup/CommitWithValidationOrConversionErrorTest.java
@@ -2,8 +2,8 @@ package com.vaadin.tests.fieldgroup;
import org.junit.Test;
-public class CommitWithValidationOrConversionErrorTest extends
- BasicPersonFormTest {
+public class CommitWithValidationOrConversionErrorTest
+ extends BasicPersonFormTest {
private static final String UPDATED_BEAN_VALUES = "Person [firstName=John, lastName=Doever, email=john@doe.com, age=123, sex=Male, address=Address [streetAddress=John street, postalCode=11223, city=John's town, country=USA], deceased=false, salary=null, salaryDouble=null, rent=null]";
private static final String UPDATED_NAME_BEAN_VALUES = "Person [firstName=John, lastName=Doever, email=john@doe.com, age=64, sex=Male, address=Address [streetAddress=John street, postalCode=11223, city=John's town, country=USA], deceased=false, salary=null, salaryDouble=null, rent=null]";
diff --git a/uitest/src/test/java/com/vaadin/tests/fieldgroup/DateFormTest.java b/uitest/src/test/java/com/vaadin/tests/fieldgroup/DateFormTest.java
index 32d8bcb603..56ec53724e 100644
--- a/uitest/src/test/java/com/vaadin/tests/fieldgroup/DateFormTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/fieldgroup/DateFormTest.java
@@ -20,15 +20,15 @@ public class DateFormTest extends MultiBrowserTest {
getDateFieldValue());
Assert.assertEquals("Unexpected PopupDateField value,", "1/20/84",
getPopupDateFieldValue());
- WebElement day20 = getInlineDateFieldCalendarPanel().findElement(
- By.vaadin("#day20"));
+ WebElement day20 = getInlineDateFieldCalendarPanel()
+ .findElement(By.vaadin("#day20"));
Assert.assertTrue(
"Unexpected InlineDateField state, 20th not selected.",
hasCssClass(day20,
"v-inline-datefield-calendarpanel-day-selected"));
Assert.assertEquals("Unexpected TextField contents,",
- "Jan 20, 1984 4:34:49 PM", $(TextFieldElement.class).first()
- .getValue());
+ "Jan 20, 1984 4:34:49 PM",
+ $(TextFieldElement.class).first().getValue());
}
protected String getDateFieldValue() {
@@ -40,8 +40,8 @@ public class DateFormTest extends MultiBrowserTest {
}
protected WebElement getInlineDateFieldCalendarPanel() {
- return $(InlineDateFieldElement.class).first().findElement(
- By.className("v-inline-datefield-calendarpanel"));
+ return $(InlineDateFieldElement.class).first()
+ .findElement(By.className("v-inline-datefield-calendarpanel"));
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/fieldgroup/MultipleValidationErrorsTest.java b/uitest/src/test/java/com/vaadin/tests/fieldgroup/MultipleValidationErrorsTest.java
index 14527cff04..de90237acc 100644
--- a/uitest/src/test/java/com/vaadin/tests/fieldgroup/MultipleValidationErrorsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/fieldgroup/MultipleValidationErrorsTest.java
@@ -33,11 +33,9 @@ public class MultipleValidationErrorsTest extends MultiBrowserTest {
String validationErrors = $(LabelElement.class).id("validationErrors")
.getText();
- assertThat(
- validationErrors,
- containsString(MultipleValidationErrors.FIRST_NAME_NOT_EMPTY_VALIDATION_MESSAGE));
- assertThat(
- validationErrors,
- containsString(MultipleValidationErrors.LAST_NAME_NOT_EMPTY_VALIDATION_MESSAGE));
+ assertThat(validationErrors, containsString(
+ MultipleValidationErrors.FIRST_NAME_NOT_EMPTY_VALIDATION_MESSAGE));
+ assertThat(validationErrors, containsString(
+ MultipleValidationErrors.LAST_NAME_NOT_EMPTY_VALIDATION_MESSAGE));
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/fonticon/FontIconsTest.java b/uitest/src/test/java/com/vaadin/tests/fonticon/FontIconsTest.java
index 4cfcd8fa59..66843ba7ef 100644
--- a/uitest/src/test/java/com/vaadin/tests/fonticon/FontIconsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/fonticon/FontIconsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/integration/AbstractIntegrationTest.java b/uitest/src/test/java/com/vaadin/tests/integration/AbstractIntegrationTest.java
index f035ef35f6..ec3227ecdc 100644
--- a/uitest/src/test/java/com/vaadin/tests/integration/AbstractIntegrationTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/integration/AbstractIntegrationTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.tests.tb3.PrivateTB3Configuration;
* Base class for integration tests. Integration tests use the
* {@literal deployment.url} parameter to determine the base deployment url
* (http://hostname:123)
- *
+ *
* @author Vaadin Ltd
*/
@TestNameSuffix(property = "server-name")
diff --git a/uitest/src/test/java/com/vaadin/tests/integration/AbstractServletIntegrationTest.java b/uitest/src/test/java/com/vaadin/tests/integration/AbstractServletIntegrationTest.java
index eb1b714776..20251879b8 100644
--- a/uitest/src/test/java/com/vaadin/tests/integration/AbstractServletIntegrationTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/integration/AbstractServletIntegrationTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,12 +29,12 @@ import com.vaadin.testbench.elements.TableElement;
/**
* Base class for servlet integration tests. Automatically prepends "/demo" to
* the deployment path
- *
+ *
* @author Vaadin Ltd
*/
@RunWith(ParameterizedTB3Runner.class)
-public abstract class AbstractServletIntegrationTest extends
- AbstractIntegrationTest {
+public abstract class AbstractServletIntegrationTest
+ extends AbstractIntegrationTest {
private String contextPath = "/demo";
diff --git a/uitest/src/test/java/com/vaadin/tests/integration/JSPIntegrationTest.java b/uitest/src/test/java/com/vaadin/tests/integration/JSPIntegrationTest.java
index 13503966ec..d474a8c698 100644
--- a/uitest/src/test/java/com/vaadin/tests/integration/JSPIntegrationTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/integration/JSPIntegrationTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -79,8 +79,8 @@ public class JSPIntegrationTest extends PrivateTB3Configuration {
List<UIData> uis = new ArrayList<UIData>();
getDriver().get(jspUrl);
- List<WebElement> rows = getDriver().findElements(
- By.xpath("//tr[@class='uirow']"));
+ List<WebElement> rows = getDriver()
+ .findElements(By.xpath("//tr[@class='uirow']"));
for (WebElement row : rows) {
UIData data = new UIData();
List<WebElement> tds = row.findElements(By.xpath("./td"));
diff --git a/uitest/src/test/java/com/vaadin/tests/integration/LongPollingProxyServerTest.java b/uitest/src/test/java/com/vaadin/tests/integration/LongPollingProxyServerTest.java
index 16c599641b..cfade0b5eb 100644
--- a/uitest/src/test/java/com/vaadin/tests/integration/LongPollingProxyServerTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/integration/LongPollingProxyServerTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -101,7 +101,7 @@ public class LongPollingProxyServerTest extends AbstractIntegrationTest {
@Override
public List<DesiredCapabilities> getBrowsersToTest() {
- return Collections.singletonList(Browser.PHANTOMJS
- .getDesiredCapabilities());
+ return Collections
+ .singletonList(Browser.PHANTOMJS.getDesiredCapabilities());
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/integration/ParameterizedTB3Runner.java b/uitest/src/test/java/com/vaadin/tests/integration/ParameterizedTB3Runner.java
index b051fb51db..5361a085b4 100644
--- a/uitest/src/test/java/com/vaadin/tests/integration/ParameterizedTB3Runner.java
+++ b/uitest/src/test/java/com/vaadin/tests/integration/ParameterizedTB3Runner.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -37,7 +37,7 @@ import com.vaadin.tests.tb3.TB3Runner;
* permutation for each value returned by {@code getThemes()}. The value is
* automatically assigned to the test instance using {@code setTheme(String)}
* before invoking the test method
- *
+ *
* @author Vaadin Ltd
*/
public class ParameterizedTB3Runner extends TB3Runner {
@@ -61,17 +61,13 @@ public class ParameterizedTB3Runner extends TB3Runner {
}
if (!m.getName().startsWith("get") || !m.getName().endsWith("s")) {
- throw new IllegalStateException(
- "Method "
- + m.getName()
- + " is annotated with @Parameter but is not named getSomeThings() as it should");
+ throw new IllegalStateException("Method " + m.getName()
+ + " is annotated with @Parameter but is not named getSomeThings() as it should");
}
if (m.getParameterTypes().length != 0) {
- throw new IllegalStateException(
- "Method "
- + m.getName()
- + " annotated with @Parameter should not have any arguments");
+ throw new IllegalStateException("Method " + m.getName()
+ + " annotated with @Parameter should not have any arguments");
}
if (!Modifier.isStatic(m.getModifiers())) {
@@ -90,9 +86,10 @@ public class ParameterizedTB3Runner extends TB3Runner {
setterMethod = getTestClass().getJavaClass().getMethod(setter,
String.class);
} catch (Exception e) {
- throw new IllegalStateException("No setter " + setter
- + " found in "
- + getTestClass().getJavaClass().getName(), e);
+ throw new IllegalStateException(
+ "No setter " + setter + " found in "
+ + getTestClass().getJavaClass().getName(),
+ e);
}
Collection<String> values;
@@ -105,8 +102,9 @@ public class ParameterizedTB3Runner extends TB3Runner {
parameters.put(setterMethod, values);
}
} catch (Exception e) {
- throw new IllegalStateException("The setter " + m.getName()
- + " could not be invoked", e);
+ throw new IllegalStateException(
+ "The setter " + m.getName() + " could not be invoked",
+ e);
}
}
@@ -116,8 +114,8 @@ public class ParameterizedTB3Runner extends TB3Runner {
for (FrameworkMethod m : methods) {
if (!(m instanceof TBMethod)) {
- System.err.println("Unknown method type: "
- + m.getClass().getName());
+ System.err.println(
+ "Unknown method type: " + m.getClass().getName());
newMethods.add(m);
continue;
}
diff --git a/uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationDefaultPushUITest.java b/uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationDefaultPushUITest.java
index 2afc33cf82..8376a66c21 100644
--- a/uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationDefaultPushUITest.java
+++ b/uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationDefaultPushUITest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -15,7 +15,7 @@
*/
package com.vaadin.tests.integration;
-public class ServletIntegrationDefaultPushUITest extends
- AbstractServletIntegrationTest {
+public class ServletIntegrationDefaultPushUITest
+ extends AbstractServletIntegrationTest {
// Uses the test method declared in the super class
}
diff --git a/uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationJSR356WebsocketUITest.java b/uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationJSR356WebsocketUITest.java
index f118d38158..6d1c857740 100644
--- a/uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationJSR356WebsocketUITest.java
+++ b/uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationJSR356WebsocketUITest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -15,14 +15,14 @@
*/
package com.vaadin.tests.integration;
-public class ServletIntegrationJSR356WebsocketUITest extends
- AbstractServletIntegrationTest {
+public class ServletIntegrationJSR356WebsocketUITest
+ extends AbstractServletIntegrationTest {
// Uses the test method declared in the super class
@Override
protected String getDeploymentPath(Class<?> uiClass) {
- return super.getDeploymentPath(uiClass)
- .replace("/run/", "/run-jsr356/");
+ return super.getDeploymentPath(uiClass).replace("/run/",
+ "/run-jsr356/");
}
@Override
diff --git a/uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationLongPollingUITest.java b/uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationLongPollingUITest.java
index 92307dbbaf..4f5abf7d8c 100644
--- a/uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationLongPollingUITest.java
+++ b/uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationLongPollingUITest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -15,7 +15,7 @@
*/
package com.vaadin.tests.integration;
-public class ServletIntegrationLongPollingUITest extends
- AbstractServletIntegrationTest {
+public class ServletIntegrationLongPollingUITest
+ extends AbstractServletIntegrationTest {
// Uses the test method declared in the super class
}
diff --git a/uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationStreamingUITest.java b/uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationStreamingUITest.java
index 1f42b10e66..9d3170235a 100644
--- a/uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationStreamingUITest.java
+++ b/uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationStreamingUITest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -15,7 +15,7 @@
*/
package com.vaadin.tests.integration;
-public class ServletIntegrationStreamingUITest extends
- AbstractServletIntegrationTest {
+public class ServletIntegrationStreamingUITest
+ extends AbstractServletIntegrationTest {
// Uses the test method declared in the super class
}
diff --git a/uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationUITest.java b/uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationUITest.java
index bebe01578a..e9c3b07472 100644
--- a/uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationUITest.java
+++ b/uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationUITest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationWebsocketUITest.java b/uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationWebsocketUITest.java
index d4fc3aef17..e32a90fe11 100644
--- a/uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationWebsocketUITest.java
+++ b/uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationWebsocketUITest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -15,7 +15,7 @@
*/
package com.vaadin.tests.integration;
-public class ServletIntegrationWebsocketUITest extends
- AbstractServletIntegrationTest {
+public class ServletIntegrationWebsocketUITest
+ extends AbstractServletIntegrationTest {
// Uses the test method declared in the super class
}
diff --git a/uitest/src/test/java/com/vaadin/tests/integration/WebSpherePortalIntegrationTest.java b/uitest/src/test/java/com/vaadin/tests/integration/WebSpherePortalIntegrationTest.java
index c8207efe9d..7975a5bdb7 100644
--- a/uitest/src/test/java/com/vaadin/tests/integration/WebSpherePortalIntegrationTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/integration/WebSpherePortalIntegrationTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -62,8 +62,8 @@ public class WebSpherePortalIntegrationTest extends PrivateTB3Configuration {
sftpChannel.disconnect();
} else {
sftpChannel.disconnect();
- throw new AssertionError("Demo application not found at "
- + applicationPath);
+ throw new AssertionError(
+ "Demo application not found at " + applicationPath);
}
}
@@ -73,8 +73,8 @@ public class WebSpherePortalIntegrationTest extends PrivateTB3Configuration {
channel.setCommand(command);
BufferedReader in;
try {
- in = new BufferedReader(new InputStreamReader(
- channel.getInputStream()));
+ in = new BufferedReader(
+ new InputStreamReader(channel.getInputStream()));
channel.connect();
@@ -130,8 +130,8 @@ public class WebSpherePortalIntegrationTest extends PrivateTB3Configuration {
private void waitUntilPortletIsLoaded() {
WebDriverWait wait = new WebDriverWait(driver, 15);
- wait.until(ExpectedConditions.visibilityOfElementLocated(By
- .className("v-app")));
+ wait.until(ExpectedConditions
+ .visibilityOfElementLocated(By.className("v-app")));
}
private boolean isLoggedIn() {
diff --git a/uitest/src/test/java/com/vaadin/tests/layoutmanager/LayoutDuringStateUpdateTest.java b/uitest/src/test/java/com/vaadin/tests/layoutmanager/LayoutDuringStateUpdateTest.java
index 8c71d460bb..8c0f9f1149 100644
--- a/uitest/src/test/java/com/vaadin/tests/layoutmanager/LayoutDuringStateUpdateTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/layoutmanager/LayoutDuringStateUpdateTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/layouts/CssLayoutAbsoluteUrlTest.java b/uitest/src/test/java/com/vaadin/tests/layouts/CssLayoutAbsoluteUrlTest.java
index 1821acdbfa..0df115ac0a 100644
--- a/uitest/src/test/java/com/vaadin/tests/layouts/CssLayoutAbsoluteUrlTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/layouts/CssLayoutAbsoluteUrlTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/layouts/HorizontalLayoutAndCaretPositionTest.java b/uitest/src/test/java/com/vaadin/tests/layouts/HorizontalLayoutAndCaretPositionTest.java
index df42e292e3..196577d303 100644
--- a/uitest/src/test/java/com/vaadin/tests/layouts/HorizontalLayoutAndCaretPositionTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/layouts/HorizontalLayoutAndCaretPositionTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/layouts/IE8MeasuredSizeMemoryLeakTest.java b/uitest/src/test/java/com/vaadin/tests/layouts/IE8MeasuredSizeMemoryLeakTest.java
index 33adb622c0..b1fb4e3f78 100644
--- a/uitest/src/test/java/com/vaadin/tests/layouts/IE8MeasuredSizeMemoryLeakTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/layouts/IE8MeasuredSizeMemoryLeakTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/layouts/RelativeSizeInUndefinedCssLayoutTest.java b/uitest/src/test/java/com/vaadin/tests/layouts/RelativeSizeInUndefinedCssLayoutTest.java
index 340c627dd4..ed56286146 100644
--- a/uitest/src/test/java/com/vaadin/tests/layouts/RelativeSizeInUndefinedCssLayoutTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/layouts/RelativeSizeInUndefinedCssLayoutTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,8 +22,8 @@ import com.vaadin.testbench.elements.FormLayoutElement;
import com.vaadin.testbench.elements.TextFieldElement;
import com.vaadin.tests.tb3.SingleBrowserTestPhantomJS2;
-public class RelativeSizeInUndefinedCssLayoutTest extends
- SingleBrowserTestPhantomJS2 {
+public class RelativeSizeInUndefinedCssLayoutTest
+ extends SingleBrowserTestPhantomJS2 {
@Test
public void relativeSizeInUndefinedCssLayout() {
diff --git a/uitest/src/test/java/com/vaadin/tests/layouts/TestLayoutClickListenersTest.java b/uitest/src/test/java/com/vaadin/tests/layouts/TestLayoutClickListenersTest.java
index ea47ab4620..4b2f5faa0f 100644
--- a/uitest/src/test/java/com/vaadin/tests/layouts/TestLayoutClickListenersTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/layouts/TestLayoutClickListenersTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,7 +31,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests LayoutClickListener on different layouts.
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/uitest/src/test/java/com/vaadin/tests/layouts/customlayout/DefaultLocationInCustomLayoutTest.java b/uitest/src/test/java/com/vaadin/tests/layouts/customlayout/DefaultLocationInCustomLayoutTest.java
index f4ac7419f7..b369dbdde5 100644
--- a/uitest/src/test/java/com/vaadin/tests/layouts/customlayout/DefaultLocationInCustomLayoutTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/layouts/customlayout/DefaultLocationInCustomLayoutTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/layouts/gridlayout/GridLayoutWidthChangeTest.java b/uitest/src/test/java/com/vaadin/tests/layouts/gridlayout/GridLayoutWidthChangeTest.java
index ba3d0f06f1..6f09923dff 100644
--- a/uitest/src/test/java/com/vaadin/tests/layouts/gridlayout/GridLayoutWidthChangeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/layouts/gridlayout/GridLayoutWidthChangeTest.java
@@ -17,8 +17,8 @@ public class GridLayoutWidthChangeTest extends MultiBrowserTest {
compareScreen("initial");
- $(ButtonElement.class).caption("Reduce GridLayout parent width")
- .first().click();
+ $(ButtonElement.class).caption("Reduce GridLayout parent width").first()
+ .click();
compareScreen("buttonMoved");
}
diff --git a/uitest/src/test/java/com/vaadin/tests/layouts/gridlayout/GridSpanEmptyColumnsTest.java b/uitest/src/test/java/com/vaadin/tests/layouts/gridlayout/GridSpanEmptyColumnsTest.java
index f2b86fb69b..430fbbc1b5 100644
--- a/uitest/src/test/java/com/vaadin/tests/layouts/gridlayout/GridSpanEmptyColumnsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/layouts/gridlayout/GridSpanEmptyColumnsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,7 +27,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Tests that GridLayout handles elements spanning otherwise empty columns
* correctly (#14335)
- *
+ *
* @since 7.2.5
* @author markus
*/
diff --git a/uitest/src/test/java/com/vaadin/tests/navigator/NavigationTest.java b/uitest/src/test/java/com/vaadin/tests/navigator/NavigationTest.java
index 59f71f3724..546d79e322 100644
--- a/uitest/src/test/java/com/vaadin/tests/navigator/NavigationTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/navigator/NavigationTest.java
@@ -24,8 +24,8 @@ public class NavigationTest extends SingleBrowserTest {
public void testNavigateToSameViewWithDifferentParameters() {
openTestURL();
- ButtonElement listButton = $(ButtonElement.class).caption(
- "Navigate to list").first();
+ ButtonElement listButton = $(ButtonElement.class)
+ .caption("Navigate to list").first();
listButton.click();
TableElement table = $(TableElement.class).first();
diff --git a/uitest/src/test/java/com/vaadin/tests/navigator/NavigatorListenerModifiesListenersTest.java b/uitest/src/test/java/com/vaadin/tests/navigator/NavigatorListenerModifiesListenersTest.java
index d11ab790a8..cfb378dc3d 100644
--- a/uitest/src/test/java/com/vaadin/tests/navigator/NavigatorListenerModifiesListenersTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/navigator/NavigatorListenerModifiesListenersTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -40,15 +40,13 @@ public class NavigatorListenerModifiesListenersTest extends SingleBrowserTest {
button.click();
// verify we are in another view and url is correct
- waitForElementPresent(By
- .id(NavigatorListenerModifiesListeners.LABEL_ANOTHERVIEW_ID));
+ waitForElementPresent(By.id(
+ NavigatorListenerModifiesListeners.LABEL_ANOTHERVIEW_ID));
String currentUrl = driver.getCurrentUrl();
- assertEquals(
- "Current URL should be equal to another view URL",
- initialUrl
- .replace(
- NavigatorListenerModifiesListeners.MainView.NAME,
- NavigatorListenerModifiesListeners.AnotherView.NAME),
+ assertEquals("Current URL should be equal to another view URL",
+ initialUrl.replace(
+ NavigatorListenerModifiesListeners.MainView.NAME,
+ NavigatorListenerModifiesListeners.AnotherView.NAME),
currentUrl);
// click back button
diff --git a/uitest/src/test/java/com/vaadin/tests/navigator/NavigatorViewBlocksBackButtonActionTest.java b/uitest/src/test/java/com/vaadin/tests/navigator/NavigatorViewBlocksBackButtonActionTest.java
index 84abdca24b..73f16f28b2 100644
--- a/uitest/src/test/java/com/vaadin/tests/navigator/NavigatorViewBlocksBackButtonActionTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/navigator/NavigatorViewBlocksBackButtonActionTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -50,8 +50,7 @@ public class NavigatorViewBlocksBackButtonActionTest extends MultiBrowserTest {
waitForElementPresent(By
.id(NavigatorViewBlocksBackButtonAction.LABEL_MAINVIEW_ID));
String currentUrl = driver.getCurrentUrl();
- assertEquals(
- "Current URL should be equal to initial main view URL",
+ assertEquals("Current URL should be equal to initial main view URL",
initialUrl, currentUrl);
}
}
@@ -74,12 +73,11 @@ public class NavigatorViewBlocksBackButtonActionTest extends MultiBrowserTest {
waitForElementPresent(By
.id(NavigatorViewBlocksBackButtonAction.LABEL_PROMPTEDVIEW_ID));
String currentUrl = driver.getCurrentUrl();
- assertEquals(
- "Current URL should be equal to initial prompted view URL",
+ assertEquals("Current URL should be equal to initial prompted view URL",
initialPromptedUrl, currentUrl);
- WebElement cancelButton = driver.findElement(By
- .className("v-window-closebox"));
+ WebElement cancelButton = driver
+ .findElement(By.className("v-window-closebox"));
// click cancel button
cancelButton.click();
@@ -88,8 +86,7 @@ public class NavigatorViewBlocksBackButtonActionTest extends MultiBrowserTest {
waitForElementPresent(By
.id(NavigatorViewBlocksBackButtonAction.LABEL_PROMPTEDVIEW_ID));
currentUrl = driver.getCurrentUrl();
- assertEquals(
- "Current URL should be equal to initial prompted view URL",
+ assertEquals("Current URL should be equal to initial prompted view URL",
initialPromptedUrl, currentUrl);
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/push/BarInUIDLTest.java b/uitest/src/test/java/com/vaadin/tests/push/BarInUIDLTest.java
index 7bd1de5803..f712f910ea 100644
--- a/uitest/src/test/java/com/vaadin/tests/push/BarInUIDLTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/push/BarInUIDLTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,20 +28,19 @@ public class BarInUIDLTest extends MultiBrowserTest {
public void sendBarInUIDL() {
openTestURL();
getButton().click();
- Assert.assertEquals(
- "Thank you for clicking | bar",
+ Assert.assertEquals("Thank you for clicking | bar",
vaadinElement(
"/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[1]/VLabel[0]")
- .getText());
+ .getText());
getButton().click();
- Assert.assertEquals(
- "Thank you for clicking | bar",
+ Assert.assertEquals("Thank you for clicking | bar",
vaadinElement(
"/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[2]/VLabel[0]")
- .getText());
+ .getText());
}
private WebElement getButton() {
- return vaadinElement("/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VButton[0]");
+ return vaadinElement(
+ "/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VButton[0]");
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/push/BasicPushLongPollingTest.java b/uitest/src/test/java/com/vaadin/tests/push/BasicPushLongPollingTest.java
index a060d5a57a..15cf4d6cc5 100644
--- a/uitest/src/test/java/com/vaadin/tests/push/BasicPushLongPollingTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/push/BasicPushLongPollingTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,9 +21,8 @@ public class BasicPushLongPollingTest extends BasicPushTest {
@Test
public void pushAfterServerTimeout() throws InterruptedException {
- getDriver().get(
- getTestUrl().replace("/run/", "/run-push-timeout/")
- + "?debug=push");
+ getDriver().get(getTestUrl().replace("/run/", "/run-push-timeout/")
+ + "?debug=push");
sleep(11000); // Wait for server timeout (10s)
getServerCounterStartButton().click();
diff --git a/uitest/src/test/java/com/vaadin/tests/push/BasicPushStreamingTest.java b/uitest/src/test/java/com/vaadin/tests/push/BasicPushStreamingTest.java
index ceb0b28c76..dfc832bfe4 100644
--- a/uitest/src/test/java/com/vaadin/tests/push/BasicPushStreamingTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/push/BasicPushStreamingTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/push/BasicPushTest.java b/uitest/src/test/java/com/vaadin/tests/push/BasicPushTest.java
index 157e3f74ae..7108fafc91 100644
--- a/uitest/src/test/java/com/vaadin/tests/push/BasicPushTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/push/BasicPushTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -53,8 +53,8 @@ public abstract class BasicPushTest extends MultiBrowserTest {
}
public static int getClientCounter(AbstractTB3Test t) {
- WebElement clientCounterElem = t.findElement(By
- .id(BasicPush.CLIENT_COUNTER_ID));
+ WebElement clientCounterElem = t
+ .findElement(By.id(BasicPush.CLIENT_COUNTER_ID));
return Integer.parseInt(clientCounterElem.getText());
}
@@ -67,8 +67,8 @@ public abstract class BasicPushTest extends MultiBrowserTest {
}
public static int getServerCounter(AbstractTB3Test t) {
- WebElement serverCounterElem = t.findElement(By
- .id(BasicPush.SERVER_COUNTER_ID));
+ WebElement serverCounterElem = t
+ .findElement(By.id(BasicPush.SERVER_COUNTER_ID));
return Integer.parseInt(serverCounterElem.getText());
}
@@ -89,7 +89,8 @@ public abstract class BasicPushTest extends MultiBrowserTest {
@Override
public Boolean apply(WebDriver input) {
- return BasicPushTest.getClientCounter(BasicPushTest.this) == expectedValue;
+ return BasicPushTest
+ .getClientCounter(BasicPushTest.this) == expectedValue;
}
}, 10);
}
@@ -100,7 +101,8 @@ public abstract class BasicPushTest extends MultiBrowserTest {
@Override
public Boolean apply(WebDriver input) {
- return BasicPushTest.getServerCounter(BasicPushTest.this) > counter;
+ return BasicPushTest
+ .getServerCounter(BasicPushTest.this) > counter;
}
}, 10);
}
diff --git a/uitest/src/test/java/com/vaadin/tests/push/BasicPushWebsocketTest.java b/uitest/src/test/java/com/vaadin/tests/push/BasicPushWebsocketTest.java
index cd779a7318..bbbb4e3c19 100644
--- a/uitest/src/test/java/com/vaadin/tests/push/BasicPushWebsocketTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/push/BasicPushWebsocketTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/push/BasicPushWebsocketXhrTest.java b/uitest/src/test/java/com/vaadin/tests/push/BasicPushWebsocketXhrTest.java
index 430246d66a..45dc9da89e 100644
--- a/uitest/src/test/java/com/vaadin/tests/push/BasicPushWebsocketXhrTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/push/BasicPushWebsocketXhrTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/push/EnableDisablePushTest.java b/uitest/src/test/java/com/vaadin/tests/push/EnableDisablePushTest.java
index 654108f8f9..2423269c96 100644
--- a/uitest/src/test/java/com/vaadin/tests/push/EnableDisablePushTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/push/EnableDisablePushTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -52,23 +52,28 @@ public class EnableDisablePushTest extends MultiBrowserTest {
}
private WebElement getDisablePushButton() {
- return vaadinElement("/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VButton[0]");
+ return vaadinElement(
+ "/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VButton[0]");
}
private WebElement getEnablePushButton() {
- return vaadinElement("/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[1]/VButton[0]");
+ return vaadinElement(
+ "/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[1]/VButton[0]");
}
private WebElement getDisablePollButton() {
- return vaadinElement("/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[2]/VButton[0]");
+ return vaadinElement(
+ "/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[2]/VButton[0]");
}
private WebElement getEnablePollButton() {
- return vaadinElement("/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[3]/VButton[0]");
+ return vaadinElement(
+ "/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[3]/VButton[0]");
}
private WebElement getDisablePushButtonAndReenableFromBackground() {
- return vaadinElement("/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[4]/VButton[0]");
+ return vaadinElement(
+ "/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[4]/VButton[0]");
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/push/ExtremelyLongPushTimeLongPollingTest.java b/uitest/src/test/java/com/vaadin/tests/push/ExtremelyLongPushTimeLongPollingTest.java
index 13f601da7a..d34646605c 100644
--- a/uitest/src/test/java/com/vaadin/tests/push/ExtremelyLongPushTimeLongPollingTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/push/ExtremelyLongPushTimeLongPollingTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -15,7 +15,7 @@
*/
package com.vaadin.tests.push;
-public class ExtremelyLongPushTimeLongPollingTest extends
- ExtremelyLongPushTimeTest {
+public class ExtremelyLongPushTimeLongPollingTest
+ extends ExtremelyLongPushTimeTest {
}
diff --git a/uitest/src/test/java/com/vaadin/tests/push/ExtremelyLongPushTimeStreamingTest.java b/uitest/src/test/java/com/vaadin/tests/push/ExtremelyLongPushTimeStreamingTest.java
index 4af6179e81..2c1012cd3d 100644
--- a/uitest/src/test/java/com/vaadin/tests/push/ExtremelyLongPushTimeStreamingTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/push/ExtremelyLongPushTimeStreamingTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -15,7 +15,7 @@
*/
package com.vaadin.tests.push;
-public class ExtremelyLongPushTimeStreamingTest extends
- ExtremelyLongPushTimeTest {
+public class ExtremelyLongPushTimeStreamingTest
+ extends ExtremelyLongPushTimeTest {
}
diff --git a/uitest/src/test/java/com/vaadin/tests/push/ExtremelyLongPushTimeTest.java b/uitest/src/test/java/com/vaadin/tests/push/ExtremelyLongPushTimeTest.java
index 5dc15f8fc6..00c56bca70 100644
--- a/uitest/src/test/java/com/vaadin/tests/push/ExtremelyLongPushTimeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/push/ExtremelyLongPushTimeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/push/ExtremelyLongPushTimeWebsocketTest.java b/uitest/src/test/java/com/vaadin/tests/push/ExtremelyLongPushTimeWebsocketTest.java
index 54775d572d..151b67eeae 100644
--- a/uitest/src/test/java/com/vaadin/tests/push/ExtremelyLongPushTimeWebsocketTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/push/ExtremelyLongPushTimeWebsocketTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -21,8 +21,8 @@ import org.openqa.selenium.remote.DesiredCapabilities;
import com.vaadin.tests.tb3.WebsocketTest;
-public class ExtremelyLongPushTimeWebsocketTest extends
- ExtremelyLongPushTimeTest {
+public class ExtremelyLongPushTimeWebsocketTest
+ extends ExtremelyLongPushTimeTest {
@Override
public List<DesiredCapabilities> getBrowsersToTest() {
diff --git a/uitest/src/test/java/com/vaadin/tests/push/IdlePushChannelLongPollingTest.java b/uitest/src/test/java/com/vaadin/tests/push/IdlePushChannelLongPollingTest.java
index 143960f1b2..4f6a8cca04 100644
--- a/uitest/src/test/java/com/vaadin/tests/push/IdlePushChannelLongPollingTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/push/IdlePushChannelLongPollingTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/push/IdlePushChannelStreamingTest.java b/uitest/src/test/java/com/vaadin/tests/push/IdlePushChannelStreamingTest.java
index c5a909385f..119ac5e97f 100644
--- a/uitest/src/test/java/com/vaadin/tests/push/IdlePushChannelStreamingTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/push/IdlePushChannelStreamingTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/push/IdlePushChannelTest.java b/uitest/src/test/java/com/vaadin/tests/push/IdlePushChannelTest.java
index 344f551f00..458af2871b 100644
--- a/uitest/src/test/java/com/vaadin/tests/push/IdlePushChannelTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/push/IdlePushChannelTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/push/IdlePushChannelWebsocketTest.java b/uitest/src/test/java/com/vaadin/tests/push/IdlePushChannelWebsocketTest.java
index 7559d22264..96e82c43a6 100644
--- a/uitest/src/test/java/com/vaadin/tests/push/IdlePushChannelWebsocketTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/push/IdlePushChannelWebsocketTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/push/ManualLongPollingPushUITest.java b/uitest/src/test/java/com/vaadin/tests/push/ManualLongPollingPushUITest.java
index 096204ff75..5fca06c252 100644
--- a/uitest/src/test/java/com/vaadin/tests/push/ManualLongPollingPushUITest.java
+++ b/uitest/src/test/java/com/vaadin/tests/push/ManualLongPollingPushUITest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,8 @@ public class ManualLongPollingPushUITest extends SingleBrowserTest {
openTestURL();
$(ButtonElement.class).caption("Double manual push after 1s").first()
.click();
- waitUntilLogText("2. Second message logged after 1s, followed by manual push");
+ waitUntilLogText(
+ "2. Second message logged after 1s, followed by manual push");
$(ButtonElement.class).caption("Manual push after 1s").first().click();
waitUntilLogText("3. Logged after 1s, followed by manual push");
}
diff --git a/uitest/src/test/java/com/vaadin/tests/push/PushConfigurationLongPollingTest.java b/uitest/src/test/java/com/vaadin/tests/push/PushConfigurationLongPollingTest.java
index 1d5ead7d98..15c8f48982 100644
--- a/uitest/src/test/java/com/vaadin/tests/push/PushConfigurationLongPollingTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/push/PushConfigurationLongPollingTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/push/PushConfigurationStreamingTest.java b/uitest/src/test/java/com/vaadin/tests/push/PushConfigurationStreamingTest.java
index 202db8d6b7..66c3ae3802 100644
--- a/uitest/src/test/java/com/vaadin/tests/push/PushConfigurationStreamingTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/push/PushConfigurationStreamingTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/push/PushConfigurationTest.java b/uitest/src/test/java/com/vaadin/tests/push/PushConfigurationTest.java
index 14ef9e1144..f50a37e6cb 100644
--- a/uitest/src/test/java/com/vaadin/tests/push/PushConfigurationTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/push/PushConfigurationTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -70,7 +70,8 @@ abstract class PushConfigurationTest extends MultiBrowserTest {
}
protected WebElement getServerCounterElement() {
- return vaadinElement("/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[5]/VLabel[0]");
+ return vaadinElement(
+ "/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[5]/VLabel[0]");
}
protected void waitForServerCounterToUpdate() {
diff --git a/uitest/src/test/java/com/vaadin/tests/push/PushConfigurationWebSocketTest.java b/uitest/src/test/java/com/vaadin/tests/push/PushConfigurationWebSocketTest.java
index 501d946fcc..bbde27dfa9 100644
--- a/uitest/src/test/java/com/vaadin/tests/push/PushConfigurationWebSocketTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/push/PushConfigurationWebSocketTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -45,8 +45,7 @@ public class PushConfigurationWebSocketTest extends PushConfigurationTest {
// Use debug console to verify we used the correct transport type
assertThat(driver.getPageSource(),
containsString("Push connection established using websocket"));
- assertThat(
- driver.getPageSource(),
- not(containsString("Push connection established using streaming")));
+ assertThat(driver.getPageSource(), not(
+ containsString("Push connection established using streaming")));
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/push/PushErrorHandlingTest.java b/uitest/src/test/java/com/vaadin/tests/push/PushErrorHandlingTest.java
index 2683868db5..678da91a0a 100644
--- a/uitest/src/test/java/com/vaadin/tests/push/PushErrorHandlingTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/push/PushErrorHandlingTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -44,8 +44,8 @@ public class PushErrorHandlingTest extends MultiBrowserTest {
$(LabelElement.class).get(idx).getText());
WebElement table = vaadinElementById("testtable");
- WebElement row = table.findElement(By
- .xpath("//div[text()='Click for NPE']"));
+ WebElement row = table
+ .findElement(By.xpath("//div[text()='Click for NPE']"));
row.click();
Assert.assertEquals("Internal error",
diff --git a/uitest/src/test/java/com/vaadin/tests/push/PushFromInitTest.java b/uitest/src/test/java/com/vaadin/tests/push/PushFromInitTest.java
index fe7ebebef1..f5326ed372 100644
--- a/uitest/src/test/java/com/vaadin/tests/push/PushFromInitTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/push/PushFromInitTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/push/PushLargeDataLongPollingTest.java b/uitest/src/test/java/com/vaadin/tests/push/PushLargeDataLongPollingTest.java
index 23255aadea..5592a70a24 100644
--- a/uitest/src/test/java/com/vaadin/tests/push/PushLargeDataLongPollingTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/push/PushLargeDataLongPollingTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/push/PushLargeDataStreamingTest.java b/uitest/src/test/java/com/vaadin/tests/push/PushLargeDataStreamingTest.java
index 0c00cf116f..fef0c7907c 100644
--- a/uitest/src/test/java/com/vaadin/tests/push/PushLargeDataStreamingTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/push/PushLargeDataStreamingTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/push/PushLargeDataWebsocketTest.java b/uitest/src/test/java/com/vaadin/tests/push/PushLargeDataWebsocketTest.java
index da4999799d..6c8d38ed1e 100644
--- a/uitest/src/test/java/com/vaadin/tests/push/PushLargeDataWebsocketTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/push/PushLargeDataWebsocketTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/push/PushRemoveConnectorsTest.java b/uitest/src/test/java/com/vaadin/tests/push/PushRemoveConnectorsTest.java
index bcf93b0aa9..3070d1efee 100644
--- a/uitest/src/test/java/com/vaadin/tests/push/PushRemoveConnectorsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/push/PushRemoveConnectorsTest.java
@@ -18,7 +18,7 @@ public class PushRemoveConnectorsTest extends SingleBrowserTest {
while (i++ < 10) {
Thread.sleep(5000);
int now = getMemoryUsage();
- System.out.println("Memory usage: "+now);
+ System.out.println("Memory usage: " + now);
if (last == now)
break;
@@ -30,7 +30,7 @@ public class PushRemoveConnectorsTest extends SingleBrowserTest {
}
private int getMemoryUsage() {
- return Integer.parseInt(getLogRow(0).replaceFirst(
- ".*Serialized session size: ", ""));
+ return Integer.parseInt(
+ getLogRow(0).replaceFirst(".*Serialized session size: ", ""));
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/push/PushWithRequireJSTest.java b/uitest/src/test/java/com/vaadin/tests/push/PushWithRequireJSTest.java
index 16bc753272..c3322a6466 100644
--- a/uitest/src/test/java/com/vaadin/tests/push/PushWithRequireJSTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/push/PushWithRequireJSTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/push/ReconnectLongPollingTest.java b/uitest/src/test/java/com/vaadin/tests/push/ReconnectLongPollingTest.java
index 22d020b631..ff5411650b 100644
--- a/uitest/src/test/java/com/vaadin/tests/push/ReconnectLongPollingTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/push/ReconnectLongPollingTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/push/ReconnectStreamingTest.java b/uitest/src/test/java/com/vaadin/tests/push/ReconnectStreamingTest.java
index 4a669e723c..541f9eb6d7 100755
--- a/uitest/src/test/java/com/vaadin/tests/push/ReconnectStreamingTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/push/ReconnectStreamingTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/push/ReconnectTest.java b/uitest/src/test/java/com/vaadin/tests/push/ReconnectTest.java
index 6a632f2667..15f891da60 100644
--- a/uitest/src/test/java/com/vaadin/tests/push/ReconnectTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/push/ReconnectTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -98,7 +98,8 @@ public abstract class ReconnectTest extends MultiBrowserTestWithProxy {
@Override
public Boolean apply(WebDriver input) {
- return BasicPushTest.getServerCounter(ReconnectTest.this) > counter;
+ return BasicPushTest
+ .getServerCounter(ReconnectTest.this) > counter;
}
}, 30);
}
@@ -108,7 +109,8 @@ public abstract class ReconnectTest extends MultiBrowserTestWithProxy {
@Override
public Boolean apply(WebDriver input) {
- return BasicPushTest.getClientCounter(ReconnectTest.this) == expectedValue;
+ return BasicPushTest
+ .getClientCounter(ReconnectTest.this) == expectedValue;
}
}, 5);
}
diff --git a/uitest/src/test/java/com/vaadin/tests/push/ReconnectWebsocketTest.java b/uitest/src/test/java/com/vaadin/tests/push/ReconnectWebsocketTest.java
index bad00eba47..5371b34412 100644
--- a/uitest/src/test/java/com/vaadin/tests/push/ReconnectWebsocketTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/push/ReconnectWebsocketTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/push/RefreshCloseConnectionTest.java b/uitest/src/test/java/com/vaadin/tests/push/RefreshCloseConnectionTest.java
index 47773b87b6..d33f824f02 100644
--- a/uitest/src/test/java/com/vaadin/tests/push/RefreshCloseConnectionTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/push/RefreshCloseConnectionTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/push/SendMultibyteCharactersLongPollingTest.java b/uitest/src/test/java/com/vaadin/tests/push/SendMultibyteCharactersLongPollingTest.java
index c00f95a950..907378684f 100644
--- a/uitest/src/test/java/com/vaadin/tests/push/SendMultibyteCharactersLongPollingTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/push/SendMultibyteCharactersLongPollingTest.java
@@ -1,7 +1,7 @@
package com.vaadin.tests.push;
-public class SendMultibyteCharactersLongPollingTest extends
- SendMultibyteCharactersTest {
+public class SendMultibyteCharactersLongPollingTest
+ extends SendMultibyteCharactersTest {
@Override
protected String getTransport() {
diff --git a/uitest/src/test/java/com/vaadin/tests/push/SendMultibyteCharactersStreamingTest.java b/uitest/src/test/java/com/vaadin/tests/push/SendMultibyteCharactersStreamingTest.java
index bc1debb9da..495791ff53 100644
--- a/uitest/src/test/java/com/vaadin/tests/push/SendMultibyteCharactersStreamingTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/push/SendMultibyteCharactersStreamingTest.java
@@ -1,7 +1,7 @@
package com.vaadin.tests.push;
-public class SendMultibyteCharactersStreamingTest extends
- SendMultibyteCharactersTest {
+public class SendMultibyteCharactersStreamingTest
+ extends SendMultibyteCharactersTest {
@Override
protected String getTransport() {
diff --git a/uitest/src/test/java/com/vaadin/tests/push/SendMultibyteCharactersWebSocketTest.java b/uitest/src/test/java/com/vaadin/tests/push/SendMultibyteCharactersWebSocketTest.java
index f9ae472b99..5cc2395e71 100644
--- a/uitest/src/test/java/com/vaadin/tests/push/SendMultibyteCharactersWebSocketTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/push/SendMultibyteCharactersWebSocketTest.java
@@ -4,8 +4,8 @@ import org.openqa.selenium.remote.DesiredCapabilities;
import java.util.List;
-public class SendMultibyteCharactersWebSocketTest extends
- SendMultibyteCharactersTest {
+public class SendMultibyteCharactersWebSocketTest
+ extends SendMultibyteCharactersTest {
@Override
public List<DesiredCapabilities> getBrowsersToTest() {
diff --git a/uitest/src/test/java/com/vaadin/tests/push/TogglePushTest.java b/uitest/src/test/java/com/vaadin/tests/push/TogglePushTest.java
index d93802125c..6ea1eb41b3 100644
--- a/uitest/src/test/java/com/vaadin/tests/push/TogglePushTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/push/TogglePushTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -94,21 +94,24 @@ public class TogglePushTest extends MultiBrowserTest {
}
private WebElement getDirectCounterUpdateButton() {
- return vaadinElement("/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[2]/VButton[0]/domChild[0]/domChild[0]");
+ return vaadinElement(
+ "/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[2]/VButton[0]/domChild[0]/domChild[0]");
}
private WebElement getPushToggle() {
- return vaadinElement("/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[1]/VCheckBox[0]/domChild[0]");
+ return vaadinElement(
+ "/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[1]/VCheckBox[0]/domChild[0]");
}
private WebElement getDelayedCounterUpdateButton() {
- return vaadinElement("/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[3]/VButton[0]/domChild[0]/domChild[0]");
+ return vaadinElement(
+ "/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[3]/VButton[0]/domChild[0]/domChild[0]");
}
private String getCounterText() {
return vaadinElement(
"/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VLabel[0]")
- .getText();
+ .getText();
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/push/TrackMessageSizeUITest.java b/uitest/src/test/java/com/vaadin/tests/push/TrackMessageSizeUITest.java
index 35d0f0ad5f..75083b006c 100644
--- a/uitest/src/test/java/com/vaadin/tests/push/TrackMessageSizeUITest.java
+++ b/uitest/src/test/java/com/vaadin/tests/push/TrackMessageSizeUITest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ public class TrackMessageSizeUITest extends MultiBrowserTest {
@Test
public void runTests() {
openTestURL();
- Assert.assertEquals("1. All tests run", vaadinElementById("Log_row_0")
- .getText());
+ Assert.assertEquals("1. All tests run",
+ vaadinElementById("Log_row_0").getText());
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/requesthandlers/AppResource404Test.java b/uitest/src/test/java/com/vaadin/tests/requesthandlers/AppResource404Test.java
index f762573a09..1b8d002236 100644
--- a/uitest/src/test/java/com/vaadin/tests/requesthandlers/AppResource404Test.java
+++ b/uitest/src/test/java/com/vaadin/tests/requesthandlers/AppResource404Test.java
@@ -12,8 +12,8 @@ public class AppResource404Test extends MultiBrowserTest {
openTestURL();
$(LinkElement.class).first().click(5, 5);
disableWaitingAndWait();
- Assert.assertFalse("Page contains the given text", driver
- .getPageSource().contains("404"));
+ Assert.assertFalse("Page contains the given text",
+ driver.getPageSource().contains("404"));
}
@Test
@@ -21,8 +21,7 @@ public class AppResource404Test extends MultiBrowserTest {
openTestURL();
$(LinkElement.class).get(1).click(5, 5);
disableWaitingAndWait();
- Assert.assertTrue(
- "Page does not contain the given text",
+ Assert.assertTrue("Page does not contain the given text",
driver.getPageSource().contains(
"/APP/connector/0/4/asdfasdf can not be found"));
}
@@ -32,10 +31,10 @@ public class AppResource404Test extends MultiBrowserTest {
openTestURL();
$(LinkElement.class).get(2).click(5, 5);
disableWaitingAndWait();
- Assert.assertTrue("Page does not contain the given text", driver
- .getPageSource().contains("HTTP ERROR 404"));
- Assert.assertTrue("Page does not contain the given text", driver
- .getPageSource().contains("Problem accessing /run/APP/"));
+ Assert.assertTrue("Page does not contain the given text",
+ driver.getPageSource().contains("HTTP ERROR 404"));
+ Assert.assertTrue("Page does not contain the given text",
+ driver.getPageSource().contains("Problem accessing /run/APP/"));
}
@Test
@@ -43,8 +42,8 @@ public class AppResource404Test extends MultiBrowserTest {
openTestURL();
$(LinkElement.class).get(3).click(5, 5);
disableWaitingAndWait();
- Assert.assertFalse("Page contains the given text", driver
- .getPageSource().contains("can not be found"));
+ Assert.assertFalse("Page contains the given text",
+ driver.getPageSource().contains("can not be found"));
}
protected void disableWaitingAndWait() {
diff --git a/uitest/src/test/java/com/vaadin/tests/requesthandlers/CommunicationErrorTest.java b/uitest/src/test/java/com/vaadin/tests/requesthandlers/CommunicationErrorTest.java
index f295ec5ba3..63ddea068c 100644
--- a/uitest/src/test/java/com/vaadin/tests/requesthandlers/CommunicationErrorTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/requesthandlers/CommunicationErrorTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test for null values in communication error json object .
- *
+ *
* @author Vaadin Ltd
*/
public class CommunicationErrorTest extends MultiBrowserTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/requesthandlers/UnsupportedBrowserHandlerUserAgents.java b/uitest/src/test/java/com/vaadin/tests/requesthandlers/UnsupportedBrowserHandlerUserAgents.java
index 1f2c4d37f2..b92610deab 100644
--- a/uitest/src/test/java/com/vaadin/tests/requesthandlers/UnsupportedBrowserHandlerUserAgents.java
+++ b/uitest/src/test/java/com/vaadin/tests/requesthandlers/UnsupportedBrowserHandlerUserAgents.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -32,21 +32,24 @@ public class UnsupportedBrowserHandlerUserAgents {
@Test
public void ie7NotSupported() {
- String response = requestWithUserAgent("Mozilla/5.0 (compatible; MSIE 7.0; Windows NT 5.2; WOW64; .NET CLR 2.0.50727)");
+ String response = requestWithUserAgent(
+ "Mozilla/5.0 (compatible; MSIE 7.0; Windows NT 5.2; WOW64; .NET CLR 2.0.50727)");
Assert.assertTrue("IE7 should not be supported",
response.contains("your browser is not supported"));
}
@Test
public void ie9Supported() {
- String response = requestWithUserAgent("Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 7.1; Trident/5.0)");
+ String response = requestWithUserAgent(
+ "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 7.1; Trident/5.0)");
Assert.assertFalse("IE9 should be supported",
response.contains("your browser is not supported"));
}
@Test
public void unknownSupported() {
- String response = requestWithUserAgent("Very strange user agent, like wat");
+ String response = requestWithUserAgent(
+ "Very strange user agent, like wat");
Assert.assertFalse("Unkonwn user agent should be supported",
response.contains("your browser is not supported"));
}
diff --git a/uitest/src/test/java/com/vaadin/tests/resources/SpecialCharsInThemeResources.java b/uitest/src/test/java/com/vaadin/tests/resources/SpecialCharsInThemeResources.java
index e584ec73cc..a5c0dd9f64 100644
--- a/uitest/src/test/java/com/vaadin/tests/resources/SpecialCharsInThemeResources.java
+++ b/uitest/src/test/java/com/vaadin/tests/resources/SpecialCharsInThemeResources.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -36,7 +36,8 @@ public class SpecialCharsInThemeResources extends SingleBrowserTest {
@Test
public void loadThemeResourceWithSpecialChars() {
- loadResource("/VAADIN/themes/tests-tickets/folder%20with%20space/resource%20with%20special%20$chars@.txt");
+ loadResource(
+ "/VAADIN/themes/tests-tickets/folder%20with%20space/resource%20with%20special%20$chars@.txt");
checkSource();
}
diff --git a/uitest/src/test/java/com/vaadin/tests/serialization/EncodeResultDisplayTest.java b/uitest/src/test/java/com/vaadin/tests/serialization/EncodeResultDisplayTest.java
index 662a033745..9be6b6d306 100644
--- a/uitest/src/test/java/com/vaadin/tests/serialization/EncodeResultDisplayTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/serialization/EncodeResultDisplayTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/serialization/GenericWidgetHandlingTest.java b/uitest/src/test/java/com/vaadin/tests/serialization/GenericWidgetHandlingTest.java
index 9c21ec1de4..183e87ac78 100644
--- a/uitest/src/test/java/com/vaadin/tests/serialization/GenericWidgetHandlingTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/serialization/GenericWidgetHandlingTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/serialization/LegacySerializerUITest.java b/uitest/src/test/java/com/vaadin/tests/serialization/LegacySerializerUITest.java
index f3a5561e40..e95aa6a6b9 100644
--- a/uitest/src/test/java/com/vaadin/tests/serialization/LegacySerializerUITest.java
+++ b/uitest/src/test/java/com/vaadin/tests/serialization/LegacySerializerUITest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/serialization/NoLayoutTest.java b/uitest/src/test/java/com/vaadin/tests/serialization/NoLayoutTest.java
index bb312e3f3f..9eba8cebe8 100644
--- a/uitest/src/test/java/com/vaadin/tests/serialization/NoLayoutTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/serialization/NoLayoutTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/serialization/SerializerTestTest.java b/uitest/src/test/java/com/vaadin/tests/serialization/SerializerTestTest.java
index b2eb0e6b01..80cbb446f5 100644
--- a/uitest/src/test/java/com/vaadin/tests/serialization/SerializerTestTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/serialization/SerializerTestTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -70,14 +70,14 @@ public class SerializerTestTest extends MultiBrowserTest {
Assert.assertEquals(
"sendDouble: 0.423310825130748, 5.859874482048838, [2.0, 1.7976931348623157E308, 4.9E-324]",
getLogRow(logRow++));
- Assert.assertEquals(
- "sendFloat: 1.0000001, 3.14159, [-12.0, 0.0, 57.0]",
+ Assert.assertEquals("sendFloat: 1.0000001, 3.14159, [-12.0, 0.0, 57.0]",
getLogRow(logRow++));
Assert.assertEquals("sendLong: -57841235865, 577431841358, [57, 0]",
getLogRow(logRow++));
Assert.assertEquals("sendInt: 2, 5, [2147483647, 0]",
getLogRow(logRow++));
- Assert.assertEquals("sendChar: Å, ∫, [a, b, c, d]", getLogRow(logRow++));
+ Assert.assertEquals("sendChar: Å, ∫, [a, b, c, d]",
+ getLogRow(logRow++));
Assert.assertEquals("sendByte: 5, -12, [3, 1, 2]", getLogRow(logRow++));
Assert.assertEquals(
"sendBoolean: false, false, [false, false, true, false, true, true]",
@@ -93,7 +93,8 @@ public class SerializerTestTest extends MultiBrowserTest {
Assert.assertEquals("state.jsonBoolean: false", getLogRow(logRow++));
Assert.assertEquals("state.jsonString: a string", getLogRow(logRow++));
Assert.assertEquals("state.jsonNull: NULL", getLogRow(logRow++));
- Assert.assertEquals("state.stringArray: [null, ‡]", getLogRow(logRow++));
+ Assert.assertEquals("state.stringArray: [null, ‡]",
+ getLogRow(logRow++));
Assert.assertEquals("state.string: This is a tesing string ‡",
getLogRow(logRow++));
Assert.assertEquals(
@@ -105,10 +106,10 @@ public class SerializerTestTest extends MultiBrowserTest {
getLogRow(logRow++));
Assert.assertEquals("state.floatArray: [57, 0, -12]",
getLogRow(logRow++));
- Assert.assertTrue(getLogRow(logRow++).startsWith(
- "state.floatObjectValue: 1.0000001"));
- Assert.assertTrue(getLogRow(logRow++).startsWith(
- "state.floatValue: 3.14159"));
+ Assert.assertTrue(getLogRow(logRow++)
+ .startsWith("state.floatObjectValue: 1.0000001"));
+ Assert.assertTrue(
+ getLogRow(logRow++).startsWith("state.floatValue: 3.14159"));
Assert.assertEquals("state.longArray: [-57841235865, 57]",
getLogRow(logRow++));
Assert.assertEquals("state.longObjectValue: 577431841360",
diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/AbstractTB3Test.java b/uitest/src/test/java/com/vaadin/tests/tb3/AbstractTB3Test.java
index 992a1376c8..3de3b517a6 100644
--- a/uitest/src/test/java/com/vaadin/tests/tb3/AbstractTB3Test.java
+++ b/uitest/src/test/java/com/vaadin/tests/tb3/AbstractTB3Test.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -81,17 +81,18 @@ import elemental.json.impl.JsonUtil;
/**
* Base class for TestBench 3+ tests. All TB3+ tests in the project should
* extend this class.
- *
+ *
* Provides:
* <ul>
* <li>Helpers for browser selection</li>
* <li>Hub connection setup and teardown</li>
* <li>Automatic generation of URL for a given test on the development server
* using {@link #getUIClass()} or by automatically finding an enclosing UI class
- * and based on requested features, e.g. {@link #isDebug()}, {@link #isPush()}</li>
+ * and based on requested features, e.g. {@link #isDebug()},
+ * {@link #isPush()}</li>
* <li>Generic helpers for creating TB3+ tests</li>
* </ul>
- *
+ *
* @author Vaadin Ltd
*/
@RunWith(TB3Runner.class)
@@ -119,11 +120,11 @@ public abstract class AbstractTB3Test extends ParallelTest {
private static final int BROWSER_TIMEOUT_IN_MS = 30 * 1000;
protected static DesiredCapabilities PHANTOMJS2() {
- DesiredCapabilities phantomjs2 = new VaadinBrowserFactory().create(
- Browser.PHANTOMJS, "2");
+ DesiredCapabilities phantomjs2 = new VaadinBrowserFactory()
+ .create(Browser.PHANTOMJS, "2");
// Hack for the test cluster
- phantomjs2
- .setCapability("phantomjs.binary.path", "/usr/bin/phantomjs2");
+ phantomjs2.setCapability("phantomjs.binary.path",
+ "/usr/bin/phantomjs2");
return phantomjs2;
}
@@ -139,7 +140,7 @@ public abstract class AbstractTB3Test extends ParallelTest {
/**
* Connect to the hub using a remote web driver, set the canvas size and
* opens the initial URL as specified by {@link #getTestUrl()}
- *
+ *
* @throws Exception
*/
@Override
@@ -175,8 +176,8 @@ public abstract class AbstractTB3Test extends ParallelTest {
}
protected WebElement getTooltipErrorElement() {
- WebElement tooltip = getDriver().findElement(
- com.vaadin.testbench.By.className("v-tooltip"));
+ WebElement tooltip = getDriver()
+ .findElement(com.vaadin.testbench.By.className("v-tooltip"));
return tooltip.findElement(By.className("v-errormessage"));
}
@@ -203,7 +204,8 @@ public abstract class AbstractTB3Test extends ParallelTest {
waitForDebugMessage(expectedMessage, 30);
}
- protected void waitForDebugMessage(final String expectedMessage, int timeout) {
+ protected void waitForDebugMessage(final String expectedMessage,
+ int timeout) {
waitUntil(new ExpectedCondition<Boolean>() {
@Override
@@ -214,12 +216,13 @@ public abstract class AbstractTB3Test extends ParallelTest {
}
protected void clearDebugMessages() {
- driver.findElement(
- By.xpath("//button[@class='v-debugwindow-button' and @title='Clear log']"))
+ driver.findElement(By
+ .xpath("//button[@class='v-debugwindow-button' and @title='Clear log']"))
.click();
}
- protected void waitUntilRowIsVisible(final TableElement table, final int row) {
+ protected void waitUntilRowIsVisible(final TableElement table,
+ final int row) {
waitUntil(new ExpectedCondition<Object>() {
@Override
public Object apply(WebDriver input) {
@@ -286,7 +289,7 @@ public abstract class AbstractTB3Test extends ParallelTest {
/**
* Returns the full URL to be used for the test
- *
+ *
* @return the full URL for the test
*/
protected String getTestUrl() {
@@ -295,7 +298,7 @@ public abstract class AbstractTB3Test extends ParallelTest {
/**
* Returns the full URL to be used for the test for the provided UI class.
- *
+ *
* @return the full URL for the test
*/
protected String getTestURL(Class<?> uiClass) {
@@ -305,14 +308,14 @@ public abstract class AbstractTB3Test extends ParallelTest {
/**
* Used to determine what URL to initially open for the test
- *
+ *
* @return the host name of development server
*/
protected abstract String getDeploymentHostname();
/**
* Used to determine what port the test is running on
- *
+ *
* @return The port teh test is running on, by default 8888
*/
protected abstract int getDeploymentPort();
@@ -324,23 +327,23 @@ public abstract class AbstractTB3Test extends ParallelTest {
* ran and before running that,
* {@link #setDesiredCapabilities(DesiredCapabilities)} is invoked with the
* value returned by this method.
- *
+ *
* This method is not static to allow overriding it in sub classes. By
* default runs the test only on Firefox
- *
+ *
* @return The browsers to run the test on
*/
@BrowserConfiguration
public List<DesiredCapabilities> getBrowsersToTest() {
- return Collections.singletonList(Browser.FIREFOX
- .getDesiredCapabilities());
+ return Collections
+ .singletonList(Browser.FIREFOX.getDesiredCapabilities());
}
/**
* Finds an element based on the part of a TB2 style locator following the
* :: (e.g. vaadin=runLabelModes::PID_Scheckboxaction-Enabled/domChild[0] ->
* PID_Scheckboxaction-Enabled/domChild[0]).
- *
+ *
* @param vaadinLocator
* The part following :: of the vaadin locator string
* @return
@@ -351,7 +354,7 @@ public abstract class AbstractTB3Test extends ParallelTest {
/**
* Uses JavaScript to determine the currently focused element.
- *
+ *
* @return Focused element or null
*/
protected WebElement getFocusedElement() {
@@ -365,7 +368,7 @@ public abstract class AbstractTB3Test extends ParallelTest {
/**
* Executes the given Javascript
- *
+ *
* @param script
* the script to execute
* @return whatever
@@ -378,7 +381,7 @@ public abstract class AbstractTB3Test extends ParallelTest {
/**
* Find a Vaadin element based on its id given using Component.setId
- *
+ *
* @param id
* The id to locate
* @return
@@ -392,7 +395,7 @@ public abstract class AbstractTB3Test extends ParallelTest {
* following the :: (e.g.
* vaadin=runLabelModes::PID_Scheckboxaction-Enabled/domChild[0] ->
* PID_Scheckboxaction-Enabled/domChild[0]).
- *
+ *
* @param vaadinLocator
* The part following :: of the vaadin locator string
* @return
@@ -406,7 +409,7 @@ public abstract class AbstractTB3Test extends ParallelTest {
/**
* Constructs a {@link By} locator for the id given using Component.setId
- *
+ *
* @param id
* The id to locate
* @return a locator for the given id
@@ -418,7 +421,7 @@ public abstract class AbstractTB3Test extends ParallelTest {
/**
* Waits up to 10s for the given condition to become true. Use e.g. as
* {@link #waitUntil(ExpectedConditions.textToBePresentInElement(by, text))}
- *
+ *
* @param condition
* the condition to wait for to become true
*/
@@ -428,9 +431,9 @@ public abstract class AbstractTB3Test extends ParallelTest {
/**
* Waits the given number of seconds for the given condition to become true.
- * Use e.g. as {@link
- * #waitUntil(ExpectedConditions.textToBePresentInElement(by, text))}
- *
+ * Use e.g. as
+ * {@link #waitUntil(ExpectedConditions.textToBePresentInElement(by, text))}
+ *
* @param condition
* the condition to wait for to become true
*/
@@ -443,7 +446,7 @@ public abstract class AbstractTB3Test extends ParallelTest {
* Waits up to 10s for the given condition to become false. Use e.g. as
* {@link #waitUntilNot(ExpectedConditions.textToBePresentInElement(by,
* text))}
- *
+ *
* @param condition
* the condition to wait for to become false
*/
@@ -453,9 +456,10 @@ public abstract class AbstractTB3Test extends ParallelTest {
/**
* Waits the given number of seconds for the given condition to become
- * false. Use e.g. as {@link
- * #waitUntilNot(ExpectedConditions.textToBePresentInElement(by, text))}
- *
+ * false. Use e.g. as
+ * {@link #waitUntilNot(ExpectedConditions.textToBePresentInElement(by,
+ * text))}
+ *
* @param condition
* the condition to wait for to become false
*/
@@ -483,10 +487,10 @@ public abstract class AbstractTB3Test extends ParallelTest {
/**
* Checks if the given element has the given class name.
- *
+ *
* Matches only full class names, i.e. has ("foo") does not match
* class="foobar"
- *
+ *
* @param element
* @param className
* @return
@@ -509,7 +513,7 @@ public abstract class AbstractTB3Test extends ParallelTest {
/**
* For tests extending {@link AbstractTestUIWithLog}, returns the element
* for the Nth log row
- *
+ *
* @param rowNr
* The log row to retrieve
* @return the Nth log row
@@ -521,7 +525,7 @@ public abstract class AbstractTB3Test extends ParallelTest {
/**
* For tests extending {@link AbstractTestUIWithLog}, returns the text in
* the Nth log row
- *
+ *
* @param rowNr
* The log row to retrieve text for
* @return the text in the log row
@@ -532,7 +536,7 @@ public abstract class AbstractTB3Test extends ParallelTest {
/**
* Asserts that {@literal a} is &gt;= {@literal b}
- *
+ *
* @param message
* The message to include in the {@link AssertionError}
* @param a
@@ -551,7 +555,7 @@ public abstract class AbstractTB3Test extends ParallelTest {
/**
* Asserts that {@literal a} is &gt; {@literal b}
- *
+ *
* @param message
* The message to include in the {@link AssertionError}
* @param a
@@ -569,7 +573,7 @@ public abstract class AbstractTB3Test extends ParallelTest {
/**
* Asserts that {@literal a} is &lt;= {@literal b}
- *
+ *
* @param message
* The message to include in the {@link AssertionError}
* @param a
@@ -588,7 +592,7 @@ public abstract class AbstractTB3Test extends ParallelTest {
/**
* Asserts that {@literal a} is &lt; {@literal b}
- *
+ *
* @param message
* The message to include in the {@link AssertionError}
* @param a
@@ -596,8 +600,8 @@ public abstract class AbstractTB3Test extends ParallelTest {
* @throws AssertionError
* If comparison fails
*/
- public static final <T> void assertLessThan(String message,
- Comparable<T> a, T b) throws AssertionError {
+ public static final <T> void assertLessThan(String message, Comparable<T> a,
+ T b) throws AssertionError {
if (a.compareTo(b) < 0) {
return;
}
@@ -613,12 +617,12 @@ public abstract class AbstractTB3Test extends ParallelTest {
/**
* Returns the path that should be used for the test. The path contains the
* full path (appended to hostname+port) and must start with a slash.
- *
+ *
* @param push
* true if "?debug" should be added
* @param debug
* true if /run-push should be used instead of /run
- *
+ *
* @return The URL path to the UI class to test
*/
protected String getDeploymentPath() {
@@ -635,13 +639,13 @@ public abstract class AbstractTB3Test extends ParallelTest {
* Returns the UI class the current test is connected to (or in special
* cases UIProvider or LegacyApplication). Uses the enclosing class if the
* test class is a static inner class to a UI class.
- *
+ *
* Test which are not enclosed by a UI class must implement this method and
* return the UI class they want to test.
- *
+ *
* Note that this method will update the test name to the enclosing class to
* be compatible with TB2 screenshot naming
- *
+ *
* @return the UI class the current test is connected to
*/
protected Class<?> getUIClass() {
@@ -679,7 +683,7 @@ public abstract class AbstractTB3Test extends ParallelTest {
/**
* Returns whether to run the test in debug mode (with the debug console
* open) or not
- *
+ *
* @return true to run with the debug window open, false by default
*/
protected final boolean isDebug() {
@@ -689,7 +693,7 @@ public abstract class AbstractTB3Test extends ParallelTest {
/**
* Sets whether to run the test in debug mode (with the debug console open)
* or not.
- *
+ *
* @param debug
* true to open debug window, false otherwise
*/
@@ -701,7 +705,7 @@ public abstract class AbstractTB3Test extends ParallelTest {
* Returns whether to run the test with push enabled (using /run-push) or
* not. Note that push tests can and should typically be created using @Push
* on the UI instead of overriding this method
- *
+ *
* @return true if /run-push is used, false otherwise
*/
protected final boolean isPush() {
@@ -712,7 +716,7 @@ public abstract class AbstractTB3Test extends ParallelTest {
* Sets whether to run the test with push enabled (using /run-push) or not.
* Note that push tests can and should typically be created using @Push on
* the UI instead of overriding this method
- *
+ *
* @param push
* true to use /run-push in the test, false otherwise
*/
@@ -724,10 +728,10 @@ public abstract class AbstractTB3Test extends ParallelTest {
* Returns the path for the given UI class when deployed on the test server.
* The path contains the full path (appended to hostname+port) and must
* start with a slash.
- *
+ *
* This method takes into account {@link #isPush()} and {@link #isDebug()}
* when the path is generated.
- *
+ *
* @param uiClass
* @param push
* true if "?debug" should be added
@@ -754,7 +758,7 @@ public abstract class AbstractTB3Test extends ParallelTest {
/**
* Used to determine what URL to initially open for the test
- *
+ *
* @return The base URL for the test. Does not include a trailing slash.
*/
protected String getBaseURL() {
@@ -764,7 +768,7 @@ public abstract class AbstractTB3Test extends ParallelTest {
/**
* Generates the application id based on the URL in a way compatible with
* VaadinServletService.
- *
+ *
* @param pathWithQueryParameters
* The path part of the URL, possibly still containing query
* parameters
@@ -772,8 +776,8 @@ public abstract class AbstractTB3Test extends ParallelTest {
*/
private String getApplicationId(String pathWithQueryParameters) {
// Remove any possible URL parameters
- String pathWithoutQueryParameters = pathWithQueryParameters.replaceAll(
- "\\?.*", "");
+ String pathWithoutQueryParameters = pathWithQueryParameters
+ .replaceAll("\\?.*", "");
if ("".equals(pathWithoutQueryParameters)) {
return "ROOT";
}
@@ -785,7 +789,7 @@ public abstract class AbstractTB3Test extends ParallelTest {
/**
* Sleeps for the given number of ms but ensures that the browser connection
* does not time out.
- *
+ *
* @param timeoutMillis
* Number of ms to wait
* @throws InterruptedException
@@ -804,7 +808,7 @@ public abstract class AbstractTB3Test extends ParallelTest {
/**
* Called by the test runner whenever there is an exception in the test that
* will cause termination of the test
- *
+ *
* @param t
* the throwable which caused the termination
*/
@@ -815,7 +819,7 @@ public abstract class AbstractTB3Test extends ParallelTest {
/**
* Returns the mouse object for doing mouse commands
- *
+ *
* @return Returns the mouse
*/
public Mouse getMouse() {
@@ -824,7 +828,7 @@ public abstract class AbstractTB3Test extends ParallelTest {
/**
* Returns the keyboard object for controlling keyboard events
- *
+ *
* @return Return the keyboard
*/
public Keyboard getKeyboard() {
@@ -860,10 +864,9 @@ public abstract class AbstractTB3Test extends ParallelTest {
protected void assertNoDebugMessage(Level level) {
// class="v-debugwindow-row Level.getName()"
- List<WebElement> logElements = driver
- .findElements(By.xpath(String
- .format("//div[@class='v-debugwindow-row %s']/span[@class='v-debugwindow-message']",
- level.getName())));
+ List<WebElement> logElements = driver.findElements(By.xpath(String
+ .format("//div[@class='v-debugwindow-row %s']/span[@class='v-debugwindow-message']",
+ level.getName())));
if (!logElements.isEmpty()) {
String logRows = "";
for (WebElement e : logElements) {
@@ -879,7 +882,7 @@ public abstract class AbstractTB3Test extends ParallelTest {
* RequireWindowFocus makes tests more stable but seems to be broken with
* certain commands such as sendKeys. Therefore it is not enabled by default
* for all tests
- *
+ *
* @return true, to use the "require window focus" feature, false otherwise
*/
protected boolean requireWindowFocusForIE() {
@@ -888,7 +891,7 @@ public abstract class AbstractTB3Test extends ParallelTest {
/**
* Should the "enable persistent hover" be enabled for Internet Explorer.
- *
+ *
* Persistent hovering causes continuous firing of mouse over events at the
* last location the mouse cursor has been moved to. This is to avoid
* problems where the real mouse cursor is inside the browser window and
@@ -896,7 +899,7 @@ public abstract class AbstractTB3Test extends ParallelTest {
* (http://
* jimevansmusic.blogspot.fi/2012/06/whats-wrong-with-internet-explorer
* .html)
- *
+ *
* @return true, to use the "persistent hover" feature, false otherwise
*/
protected boolean usePersistentHoverForIE() {
@@ -908,7 +911,7 @@ public abstract class AbstractTB3Test extends ParallelTest {
* <p>
* Native events sometimes cause failure in clicking on buttons/checkboxes
* but are possibly needed for some operations.
- *
+ *
* @return true, to use "native events", false to use generated Javascript
* events
*/
@@ -1009,8 +1012,8 @@ public abstract class AbstractTB3Test extends ParallelTest {
}
protected boolean isLoadingIndicatorVisible() {
- WebElement loadingIndicator = findElement(By
- .className("v-loading-indicator"));
+ WebElement loadingIndicator = findElement(
+ By.className("v-loading-indicator"));
return loadingIndicator.isDisplayed();
}
@@ -1035,7 +1038,7 @@ public abstract class AbstractTB3Test extends ParallelTest {
/**
* Selects a menu item. By default, this will click on the menu item.
- *
+ *
* @param menuCaption
* caption of the menu item
*/
@@ -1045,7 +1048,7 @@ public abstract class AbstractTB3Test extends ParallelTest {
/**
* Selects a menu item.
- *
+ *
* @param menuCaption
* caption of the menu item
* @param click
@@ -1055,8 +1058,9 @@ public abstract class AbstractTB3Test extends ParallelTest {
protected void selectMenu(String menuCaption, boolean click) {
WebElement menuElement = getMenuElement(menuCaption);
Dimension size = menuElement.getSize();
- new Actions(getDriver()).moveToElement(menuElement, size.width - 10,
- size.height / 2).perform();
+ new Actions(getDriver())
+ .moveToElement(menuElement, size.width - 10, size.height / 2)
+ .perform();
if (click) {
new Actions(getDriver()).click().perform();
}
@@ -1064,7 +1068,7 @@ public abstract class AbstractTB3Test extends ParallelTest {
/**
* Finds the menu item from the DOM based on menu item caption.
- *
+ *
* @param menuCaption
* caption of the menu item
* @return the found menu item
@@ -1080,7 +1084,7 @@ public abstract class AbstractTB3Test extends ParallelTest {
/**
* Selects a submenu described by a path of menus from the first MenuBar in
* the UI.
- *
+ *
* @param menuCaptions
* array of menu captions
*/
@@ -1088,8 +1092,9 @@ public abstract class AbstractTB3Test extends ParallelTest {
selectMenu(menuCaptions[0], true);
// Move to the menu item opened below the menu bar.
- new Actions(getDriver()).moveByOffset(0,
- getMenuElement(menuCaptions[0]).getSize().getHeight())
+ new Actions(getDriver())
+ .moveByOffset(0,
+ getMenuElement(menuCaptions[0]).getSize().getHeight())
.perform();
for (int i = 1; i < menuCaptions.length - 1; i++) {
@@ -1101,7 +1106,7 @@ public abstract class AbstractTB3Test extends ParallelTest {
/**
* Asserts that an element is present
- *
+ *
* @param by
* the locatore for the element
*/
@@ -1111,7 +1116,7 @@ public abstract class AbstractTB3Test extends ParallelTest {
/**
* Asserts that an element is not present
- *
+ *
* @param by
* the locatore for the element
*/
@@ -1172,7 +1177,8 @@ public abstract class AbstractTB3Test extends ParallelTest {
Assert.assertFalse(
"The element should not have a horizontal scrollbar (scrollWidth: "
+ scrollWidth + ", clientWidth: " + clientWidth + "): "
- + errorMessage, hasScrollbar);
+ + errorMessage,
+ hasScrollbar);
}
protected void assertNoVerticalScrollbar(WebElement element,
@@ -1187,7 +1193,8 @@ public abstract class AbstractTB3Test extends ParallelTest {
Assert.assertFalse(
"The element should not have a vertical scrollbar (scrollHeight: "
+ scrollHeight + ", clientHeight: " + clientHeight
- + "): " + errorMessage, hasScrollbar);
+ + "): " + errorMessage,
+ hasScrollbar);
}
protected int getScrollHeight(WebElement element) {
@@ -1252,8 +1259,8 @@ public abstract class AbstractTB3Test extends ParallelTest {
protected void waitForThemeToChange(final String theme) {
- final WebElement rootDiv = findElement(By
- .xpath("//div[contains(@class,'v-app')]"));
+ final WebElement rootDiv = findElement(
+ By.xpath("//div[contains(@class,'v-app')]"));
waitUntil(new ExpectedCondition<Boolean>() {
@Override
diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/AffectedTB3TestLocator.java b/uitest/src/test/java/com/vaadin/tests/tb3/AffectedTB3TestLocator.java
index 9dfae77ca5..d65eba278b 100644
--- a/uitest/src/test/java/com/vaadin/tests/tb3/AffectedTB3TestLocator.java
+++ b/uitest/src/test/java/com/vaadin/tests/tb3/AffectedTB3TestLocator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/AffectedTB3Tests.java b/uitest/src/test/java/com/vaadin/tests/tb3/AffectedTB3Tests.java
index 128214de1e..44370e6516 100644
--- a/uitest/src/test/java/com/vaadin/tests/tb3/AffectedTB3Tests.java
+++ b/uitest/src/test/java/com/vaadin/tests/tb3/AffectedTB3Tests.java
@@ -12,7 +12,7 @@ import com.vaadin.tests.tb3.AffectedTB3Tests.AffectedTB3TestSuite;
* similar package name compare the the changes files in the current workspace.
* If there are no changes in the workspace, it will run the changes to test
* classes introduced in the HEAD commit.
- *
+ *
* @author Vaadin Ltd
*/
@RunWith(AffectedTB3TestSuite.class)
@@ -20,8 +20,8 @@ public class AffectedTB3Tests {
public static class AffectedTB3TestSuite extends TB3TestSuite {
- public AffectedTB3TestSuite(Class<?> klass) throws InitializationError,
- IOException {
+ public AffectedTB3TestSuite(Class<?> klass)
+ throws InitializationError, IOException {
super(klass, AbstractTB3Test.class, "com.vaadin.tests",
new String[] { "com.vaadin.tests.integration" },
new AffectedTB3TestLocator());
diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/AllTB3Tests.java b/uitest/src/test/java/com/vaadin/tests/tb3/AllTB3Tests.java
index 338855ba1c..a705b02bc5 100644
--- a/uitest/src/test/java/com/vaadin/tests/tb3/AllTB3Tests.java
+++ b/uitest/src/test/java/com/vaadin/tests/tb3/AllTB3Tests.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,7 +26,7 @@ import com.vaadin.tests.tb3.AllTB3Tests.AllTB3TestsSuite;
/**
* Test consisting of all TB3 tests except integration tests (classes extending
* AbstractTB3Test, excludes package com.vaadin.test.integration).
- *
+ *
* @author Vaadin Ltd
*/
@RunWith(AllTB3TestsSuite.class)
@@ -34,8 +34,8 @@ public class AllTB3Tests {
public static class AllTB3TestsSuite extends TB3TestSuite {
- public AllTB3TestsSuite(Class<?> klass) throws InitializationError,
- IOException {
+ public AllTB3TestsSuite(Class<?> klass)
+ throws InitializationError, IOException {
super(klass, AbstractTB3Test.class, "com.vaadin.tests",
new String[] { "com.vaadin.tests.integration" });
}
diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/ChangedTB3TestLocator.java b/uitest/src/test/java/com/vaadin/tests/tb3/ChangedTB3TestLocator.java
index a6f2e5191a..2629d1dded 100644
--- a/uitest/src/test/java/com/vaadin/tests/tb3/ChangedTB3TestLocator.java
+++ b/uitest/src/test/java/com/vaadin/tests/tb3/ChangedTB3TestLocator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -40,7 +40,7 @@ import org.eclipse.jgit.storage.file.FileRepositoryBuilder;
import org.eclipse.jgit.util.io.DisabledOutputStream;
/**
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -74,7 +74,8 @@ public class ChangedTB3TestLocator extends TB3TestLocator {
.findGitDir() // scan up the file system tree
.build();
- List<DiffEntry> diffsInWorkingTree = getDiffsInWorkingTree(repository);
+ List<DiffEntry> diffsInWorkingTree = getDiffsInWorkingTree(
+ repository);
if (diffsInWorkingTree.isEmpty()) {
return getDiffsInHead(repository);
diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/ChangedTB3Tests.java b/uitest/src/test/java/com/vaadin/tests/tb3/ChangedTB3Tests.java
index 3c7030b1e9..98573d1544 100644
--- a/uitest/src/test/java/com/vaadin/tests/tb3/ChangedTB3Tests.java
+++ b/uitest/src/test/java/com/vaadin/tests/tb3/ChangedTB3Tests.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -26,15 +26,15 @@ import com.vaadin.tests.tb3.ChangedTB3Tests.ChangedTB3TestsSuite;
* Test suite that runs tests from test classes which have changes in the
* current workspace. If there are no changes in the workspace, it will run the
* changes to test classes introduced in the HEAD commit.
- *
+ *
* @since
* @author Vaadin Ltd
*/
@RunWith(ChangedTB3TestsSuite.class)
public class ChangedTB3Tests {
public static class ChangedTB3TestsSuite extends TB3TestSuite {
- public ChangedTB3TestsSuite(Class<?> klass) throws InitializationError,
- IOException {
+ public ChangedTB3TestsSuite(Class<?> klass)
+ throws InitializationError, IOException {
super(klass, AbstractTB3Test.class, "com.vaadin.tests",
new String[] { "com.vaadin.tests.integration" },
new ChangedTB3TestLocator());
diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/CustomTestBenchCommandExecutor.java b/uitest/src/test/java/com/vaadin/tests/tb3/CustomTestBenchCommandExecutor.java
index 00d7788f8b..291d0bbadc 100644
--- a/uitest/src/test/java/com/vaadin/tests/tb3/CustomTestBenchCommandExecutor.java
+++ b/uitest/src/test/java/com/vaadin/tests/tb3/CustomTestBenchCommandExecutor.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -37,10 +37,10 @@ import com.vaadin.testbench.screenshot.ImageFileUtil;
/**
* Internal hack to support capturing screenshots for elements.
- *
+ *
* Most parts are from TestBenchCommandExecutor and the feature should be
* integrated into TB4.
- *
+ *
* @author Vaadin Ltd
*/
public class CustomTestBenchCommandExecutor {
@@ -54,7 +54,7 @@ public class CustomTestBenchCommandExecutor {
/**
* Compares the screenshot of the given element with the reference.
- *
+ *
* Copied from TestBenchCommandExecutor
*/
public boolean compareScreen(WebElement element, File reference,
@@ -71,28 +71,27 @@ public class CustomTestBenchCommandExecutor {
/**
* Compares the screenshot of the given element with the reference.
- *
+ *
* Copied from TestBenchCommandExecutor and added cropToElement
*/
public boolean compareScreen(WebElement element, BufferedImage reference,
String referenceName, boolean isIE8) throws IOException {
- for (int times = 0; times < Parameters.getMaxScreenshotRetries(); times++) {
+ for (int times = 0; times < Parameters
+ .getMaxScreenshotRetries(); times++) {
BufferedImage screenshotImage = cropToElement(element,
ImageIO.read(new ByteArrayInputStream(
((TakesScreenshot) actualDriver)
- .getScreenshotAs(OutputType.BYTES))), isIE8);
+ .getScreenshotAs(OutputType.BYTES))),
+ isIE8);
if (reference == null) {
// Store the screenshot in the errors directory and fail the
// test
ImageFileUtil.createScreenshotDirectoriesIfNeeded();
ImageIO.write(screenshotImage, "png",
ImageFileUtil.getErrorScreenshotFile(referenceName));
- getLogger().severe(
- "No reference found for "
- + referenceName
- + " in "
- + ImageFileUtil
- .getScreenshotReferenceDirectory());
+ getLogger().severe("No reference found for " + referenceName
+ + " in "
+ + ImageFileUtil.getScreenshotReferenceDirectory());
return false;
}
if (imageComparison.imageEqualToReference(screenshotImage,
@@ -108,7 +107,7 @@ public class CustomTestBenchCommandExecutor {
/**
* Crops the image to show only the element. If the element is partly off
* screen, crops to show the part of the element which is in the screenshot
- *
+ *
* @param element
* the element to retain in the screenshot
* @param fullScreen
@@ -136,8 +135,8 @@ public class CustomTestBenchCommandExecutor {
// Get the part of the element which is on screen
w = Math.min(fullScreen.getWidth() - x, w);
} else {
- throw new IOException("Element x is outside the screenshot (x: "
- + x + ", y: " + y + ")");
+ throw new IOException("Element x is outside the screenshot (x: " + x
+ + ", y: " + y + ")");
}
if (y >= 0 && y < fullScreen.getHeight()) {
@@ -145,8 +144,8 @@ public class CustomTestBenchCommandExecutor {
// Get the part of the element which is on screen
h = Math.min(fullScreen.getHeight() - y, h);
} else {
- throw new IOException("Element y is outside the screenshot (x: "
- + x + ", y: " + y + ")");
+ throw new IOException("Element y is outside the screenshot (x: " + x
+ + ", y: " + y + ")");
}
return fullScreen.getSubimage(x, y, w, h);
diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/DndActionsTest.java b/uitest/src/test/java/com/vaadin/tests/tb3/DndActionsTest.java
index 71d6b6fab4..0bbaf60c3c 100644
--- a/uitest/src/test/java/com/vaadin/tests/tb3/DndActionsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/tb3/DndActionsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.testbench.parallel.BrowserUtil;
/**
* Base class for TestBench 3+ tests that use DnD. This class contains utility
* methods for DnD operations.
- *
+ *
* @author Vaadin Ltd
*/
@Ignore
diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/ExcludeFromSuite.java b/uitest/src/test/java/com/vaadin/tests/tb3/ExcludeFromSuite.java
index dd061646be..8b92496433 100644
--- a/uitest/src/test/java/com/vaadin/tests/tb3/ExcludeFromSuite.java
+++ b/uitest/src/test/java/com/vaadin/tests/tb3/ExcludeFromSuite.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import java.lang.annotation.Target;
* Marker interface for a TB3+ test class which will exclude the test from any
* test suite which automatically scans for test classes. Mostly useful for long
* tests which should not be run in every build.
- *
+ *
* @since 7.1.10
* @author Vaadin Ltd
*/
diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/IncludeIfProperty.java b/uitest/src/test/java/com/vaadin/tests/tb3/IncludeIfProperty.java
index 789422c0c6..f058fc2d61 100644
--- a/uitest/src/test/java/com/vaadin/tests/tb3/IncludeIfProperty.java
+++ b/uitest/src/test/java/com/vaadin/tests/tb3/IncludeIfProperty.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import java.lang.annotation.Target;
* {@code property} has the given {@code value}.
* <p>
* Used by {@link TB3TestLocator}
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserTest.java b/uitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserTest.java
index ec40510d96..daa5149084 100644
--- a/uitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,16 +27,16 @@ import com.vaadin.testbench.parallel.Browser;
* Base class for tests which should be run on all supported browsers. The test
* is automatically launched for multiple browsers in parallel by the test
* runner.
- *
+ *
* Sub classes can, but typically should not, restrict the browsers used by
* implementing a
- *
+ *
* <pre>
* &#064;Parameters
* public static Collection&lt;DesiredCapabilities&gt; getBrowsersForTest() {
* }
* </pre>
- *
+ *
* @author Vaadin Ltd
*/
public abstract class MultiBrowserTest extends PrivateTB3Configuration {
diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserTestWithProxy.java b/uitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserTestWithProxy.java
index 460006b7f8..64a8482895 100755
--- a/uitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserTestWithProxy.java
+++ b/uitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserTestWithProxy.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserThemeTest.java b/uitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserThemeTest.java
index 9a02b29bc2..e9df2284d7 100644
--- a/uitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserThemeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserThemeTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserThemeTestWithProxy.java b/uitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserThemeTestWithProxy.java
index 26ed8288d1..0fecc5cf81 100644
--- a/uitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserThemeTestWithProxy.java
+++ b/uitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserThemeTestWithProxy.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,8 +28,8 @@ import org.openqa.selenium.remote.DesiredCapabilities;
import com.vaadin.tests.integration.ParameterizedTB3Runner;
@RunWith(ParameterizedTB3Runner.class)
-public abstract class MultiBrowserThemeTestWithProxy extends
- MultiBrowserTestWithProxy {
+public abstract class MultiBrowserThemeTestWithProxy
+ extends MultiBrowserTestWithProxy {
private String theme;
diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/ParallelScheduler.java b/uitest/src/test/java/com/vaadin/tests/tb3/ParallelScheduler.java
index ef9ee382d0..daea6138f3 100644
--- a/uitest/src/test/java/com/vaadin/tests/tb3/ParallelScheduler.java
+++ b/uitest/src/test/java/com/vaadin/tests/tb3/ParallelScheduler.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,7 +27,7 @@ import org.junit.runners.model.RunnerScheduler;
/**
* JUnit scheduler capable of running multiple tets in parallel. Each test is
* run in its own thread. Uses an {@link ExecutorService} to manage the threads.
- *
+ *
* @author Vaadin Ltd
*/
public class ParallelScheduler implements RunnerScheduler {
@@ -37,7 +37,7 @@ public class ParallelScheduler implements RunnerScheduler {
/**
* Creates a parallel scheduler which will use the given executor service
* when submitting test jobs.
- *
+ *
* @param service
* The service to use for tests
*/
diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/PrivateTB3Configuration.java b/uitest/src/test/java/com/vaadin/tests/tb3/PrivateTB3Configuration.java
index 85104c784b..abee2c1c2c 100644
--- a/uitest/src/test/java/com/vaadin/tests/tb3/PrivateTB3Configuration.java
+++ b/uitest/src/test/java/com/vaadin/tests/tb3/PrivateTB3Configuration.java
@@ -40,14 +40,14 @@ import com.vaadin.testbench.parallel.BrowserUtil;
* Provides values for parameters which depend on where the test is run.
* Parameters should be configured in work/eclipse-run-selected-test.properties.
* A template is available in uitest/.
- *
+ *
* @author Vaadin Ltd
*/
@RunOnHub("tb3-hub.intra.itmill.com")
@BrowserFactory(VaadinBrowserFactory.class)
public abstract class PrivateTB3Configuration extends ScreenshotTB3Test {
/**
- *
+ *
*/
public static final String SCREENSHOT_DIRECTORY = "com.vaadin.testbench.screenshot.directory";
private static final String HOSTNAME_PROPERTY = "com.vaadin.testbench.deployment.hostname";
@@ -69,8 +69,7 @@ public abstract class PrivateTB3Configuration extends ScreenshotTB3Test {
if (properties.containsKey(RUN_LOCALLY_PROPERTY)) {
System.setProperty("useLocalWebDriver", "true");
DesiredCapabilities localBrowser = getRunLocallyCapabilities();
- System.setProperty(
- "browsers.include",
+ System.setProperty("browsers.include",
localBrowser.getBrowserName()
+ localBrowser.getVersion());
}
@@ -93,15 +92,17 @@ public abstract class PrivateTB3Configuration extends ScreenshotTB3Test {
String allowRunLocally = getProperty(ALLOW_RUN_LOCALLY_PROPERTY);
if ((allowRunLocally == null || !allowRunLocally.equals("" + true))
&& getClass().getAnnotation(RunLocally.class) != null) {
- Assert.fail("@RunLocally annotation is not allowed by default in framework tests. "
- + "See file uitest/eclipse-run-selected-test.properties for more information.");
+ Assert.fail(
+ "@RunLocally annotation is not allowed by default in framework tests. "
+ + "See file uitest/eclipse-run-selected-test.properties for more information.");
}
super.setup();
}
@Override
- public void setDesiredCapabilities(DesiredCapabilities desiredCapabilities) {
+ public void setDesiredCapabilities(
+ DesiredCapabilities desiredCapabilities) {
super.setDesiredCapabilities(desiredCapabilities);
if (BrowserUtil.isIE(desiredCapabilities)) {
@@ -123,17 +124,15 @@ public abstract class PrivateTB3Configuration extends ScreenshotTB3Test {
desiredCapabilities.setCapability("project", "Vaadin Framework");
desiredCapabilities.setCapability("build", String.format("%s / %s",
getDeploymentHostname(), Calendar.getInstance().getTime()));
- desiredCapabilities.setCapability(
- "name",
- String.format("%s.%s", getClass().getCanonicalName(),
- testName.getMethodName()));
+ desiredCapabilities.setCapability("name", String.format("%s.%s",
+ getClass().getCanonicalName(), testName.getMethodName()));
}
protected static DesiredCapabilities getRunLocallyCapabilities() {
VaadinBrowserFactory factory = new VaadinBrowserFactory();
try {
- return factory.create(Browser.valueOf(properties.getProperty(
- RUN_LOCALLY_PROPERTY).toUpperCase()));
+ return factory.create(Browser.valueOf(properties
+ .getProperty(RUN_LOCALLY_PROPERTY).toUpperCase()));
} catch (Exception e) {
System.err.println(e.getMessage());
System.err.println("Falling back to FireFox");
@@ -154,9 +153,8 @@ public abstract class PrivateTB3Configuration extends ScreenshotTB3Test {
protected String getScreenshotDirectory() {
String screenshotDirectory = getProperty(SCREENSHOT_DIRECTORY);
if (screenshotDirectory == null) {
- throw new RuntimeException(
- "No screenshot directory defined. Use -D"
- + SCREENSHOT_DIRECTORY + "=<path>");
+ throw new RuntimeException("No screenshot directory defined. Use -D"
+ + SCREENSHOT_DIRECTORY + "=<path>");
}
return screenshotDirectory;
}
@@ -207,7 +205,7 @@ public abstract class PrivateTB3Configuration extends ScreenshotTB3Test {
/**
* Gets the hostname that tests are configured to use.
- *
+ *
* @return the host name configuration value
*/
public static String getConfiguredDeploymentHostname() {
@@ -227,7 +225,7 @@ public abstract class PrivateTB3Configuration extends ScreenshotTB3Test {
/**
* Gets the port that tests are configured to use.
- *
+ *
* @return the port configuration value
*/
public static int getConfiguredDeploymentPort() {
@@ -244,7 +242,7 @@ public abstract class PrivateTB3Configuration extends ScreenshotTB3Test {
/**
* Tries to automatically determine the IP address of the machine the test
* is running on.
- *
+ *
* @return An IP address of one of the network interfaces in the machine.
* @throws RuntimeException
* if there was an error or no IP was found
diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/RetryOnFail.java b/uitest/src/test/java/com/vaadin/tests/tb3/RetryOnFail.java
index 7a1656a0d2..66a1b7d46f 100644
--- a/uitest/src/test/java/com/vaadin/tests/tb3/RetryOnFail.java
+++ b/uitest/src/test/java/com/vaadin/tests/tb3/RetryOnFail.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -39,10 +39,10 @@ public class RetryOnFail implements TestRule {
return;
} catch (Throwable t) {
caughtThrowable = t;
- System.err.println(String.format(
- "%s: run %s/%s failed.",
- description.getDisplayName(), i + 1,
- retryCount + 1));
+ System.err
+ .println(String.format("%s: run %s/%s failed.",
+ description.getDisplayName(), i + 1,
+ retryCount + 1));
System.err.println(t.getMessage());
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/ScreenshotTB3Test.java b/uitest/src/test/java/com/vaadin/tests/tb3/ScreenshotTB3Test.java
index d94e05efdb..285a9622a0 100644
--- a/uitest/src/test/java/com/vaadin/tests/tb3/ScreenshotTB3Test.java
+++ b/uitest/src/test/java/com/vaadin/tests/tb3/ScreenshotTB3Test.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -42,7 +42,7 @@ import com.vaadin.testbench.screenshot.ImageFileUtil;
/**
* Base class which provides functionality for tests which use the automatic
* screenshot comparison function.
- *
+ *
* @author Vaadin Ltd
*/
public abstract class ScreenshotTB3Test extends AbstractTB3Test {
@@ -102,21 +102,21 @@ public abstract class ScreenshotTB3Test extends AbstractTB3Test {
screenshotFailures = new ArrayList<String>();
Parameters.setScreenshotErrorDirectory(getScreenshotErrorDirectory());
- Parameters
- .setScreenshotReferenceDirectory(getScreenshotReferenceDirectory());
+ Parameters.setScreenshotReferenceDirectory(
+ getScreenshotReferenceDirectory());
}
/**
* Grabs a screenshot and compares with the reference image with the given
* identifier. Supports alternative references and will succeed if the
* screenshot matches at least one of the references.
- *
+ *
* In case of a failed comparison this method stores the grabbed screenshots
* in the error directory as defined by
* {@link #getScreenshotErrorDirectory()}. It will also generate a html file
* in the same directory, comparing the screenshot with the first found
* reference.
- *
+ *
* @param identifier
* @throws IOException
*/
@@ -127,7 +127,8 @@ public abstract class ScreenshotTB3Test extends AbstractTB3Test {
protected void compareScreen(WebElement element, String identifier)
throws IOException {
if (identifier == null || identifier.isEmpty()) {
- throw new IllegalArgumentException("Empty identifier not supported");
+ throw new IllegalArgumentException(
+ "Empty identifier not supported");
}
File mainReference = getScreenshotReferenceFile(identifier);
@@ -207,8 +208,8 @@ public abstract class ScreenshotTB3Test extends AbstractTB3Test {
return customTestBench;
}
- private void enableAutoswitch(File htmlFile) throws FileNotFoundException,
- IOException {
+ private void enableAutoswitch(File htmlFile)
+ throws FileNotFoundException, IOException {
if (htmlFile == null || !htmlFile.exists()) {
return;
}
@@ -233,17 +234,17 @@ public abstract class ScreenshotTB3Test extends AbstractTB3Test {
/**
* Returns a new File which points to a .html file instead of the given .png
* file
- *
+ *
* @param png
* @return
*/
private static File htmlFromPng(File png) {
- return new File(png.getParentFile(), png.getName().replaceAll(
- "\\.png$", ".png.html"));
+ return new File(png.getParentFile(),
+ png.getName().replaceAll("\\.png$", ".png.html"));
}
/**
- *
+ *
* @param referenceFile
* The reference image file (in the directory defined by
* {@link #getScreenshotReferenceDirectory()})
@@ -270,7 +271,7 @@ public abstract class ScreenshotTB3Test extends AbstractTB3Test {
/**
* Finds alternative references for the given files
- *
+ *
* @param reference
* @return all references which should be considered when comparing with the
* given files, including the given reference
@@ -365,7 +366,7 @@ public abstract class ScreenshotTB3Test extends AbstractTB3Test {
/**
* Checks if any screenshot comparisons failures occurred during the test
* and combines all comparison errors into one exception
- *
+ *
* @throws IOException
* If there were failures during the test
*/
@@ -399,7 +400,7 @@ public abstract class ScreenshotTB3Test extends AbstractTB3Test {
/**
* Returns the name of the reference file based on the given parameters.
- *
+ *
* @param testName
* @param capabilities
* @param identifier
@@ -413,7 +414,7 @@ public abstract class ScreenshotTB3Test extends AbstractTB3Test {
* Returns the name of the reference file based on the given parameters. The
* version given in {@literal capabilities} is used unless it is overridden
* by the {@literal versionOverride} parameter.
- *
+ *
* @param testName
* @param capabilities
* @param identifier
@@ -444,9 +445,9 @@ public abstract class ScreenshotTB3Test extends AbstractTB3Test {
if (versionOverride != null) {
// Windows_Firefox_17_bufferingdemo_valo
- parameters = parameters.replaceFirst("_"
- + getDesiredCapabilities().getVersion(), "_"
- + versionOverride);
+ parameters = parameters.replaceFirst(
+ "_" + getDesiredCapabilities().getVersion(),
+ "_" + versionOverride);
}
return parameters;
}
@@ -459,9 +460,10 @@ public abstract class ScreenshotTB3Test extends AbstractTB3Test {
* running this test.
*/
private String getScreenshotErrorBaseName() {
- return getScreenshotReferenceName("dummy", null).replace(
- getScreenshotReferenceDirectory(),
- getScreenshotErrorDirectory()).replace("_dummy.png", "");
+ return getScreenshotReferenceName("dummy", null)
+ .replace(getScreenshotReferenceDirectory(),
+ getScreenshotErrorDirectory())
+ .replace("_dummy.png", "");
}
/**
diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/ServletIntegrationTests.java b/uitest/src/test/java/com/vaadin/tests/tb3/ServletIntegrationTests.java
index b06044446e..7b41eb2a37 100644
--- a/uitest/src/test/java/com/vaadin/tests/tb3/ServletIntegrationTests.java
+++ b/uitest/src/test/java/com/vaadin/tests/tb3/ServletIntegrationTests.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/SingleBrowserTest.java b/uitest/src/test/java/com/vaadin/tests/tb3/SingleBrowserTest.java
index b5389d3eec..e8e8089edf 100644
--- a/uitest/src/test/java/com/vaadin/tests/tb3/SingleBrowserTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/tb3/SingleBrowserTest.java
@@ -28,7 +28,7 @@ public abstract class SingleBrowserTest extends PrivateTB3Configuration {
if (isRunLocally()) {
return Collections.singletonList(getRunLocallyCapabilities());
}
- return Collections.singletonList(Browser.PHANTOMJS
- .getDesiredCapabilities());
+ return Collections
+ .singletonList(Browser.PHANTOMJS.getDesiredCapabilities());
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/SingleBrowserTestPhantomJS2.java b/uitest/src/test/java/com/vaadin/tests/tb3/SingleBrowserTestPhantomJS2.java
index 7447a3c056..b785865790 100644
--- a/uitest/src/test/java/com/vaadin/tests/tb3/SingleBrowserTestPhantomJS2.java
+++ b/uitest/src/test/java/com/vaadin/tests/tb3/SingleBrowserTestPhantomJS2.java
@@ -20,8 +20,8 @@ import java.util.List;
import org.openqa.selenium.remote.DesiredCapabilities;
-public abstract class SingleBrowserTestPhantomJS2 extends
- PrivateTB3Configuration {
+public abstract class SingleBrowserTestPhantomJS2
+ extends PrivateTB3Configuration {
@Override
public List<DesiredCapabilities> getBrowsersToTest() {
return Collections.singletonList(PHANTOMJS2());
diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/TB3Runner.java b/uitest/src/test/java/com/vaadin/tests/tb3/TB3Runner.java
index 4917e398cf..d3d4397644 100644
--- a/uitest/src/test/java/com/vaadin/tests/tb3/TB3Runner.java
+++ b/uitest/src/test/java/com/vaadin/tests/tb3/TB3Runner.java
@@ -32,7 +32,7 @@ import com.vaadin.testbench.parallel.ParallelRunner;
* (http://tedyoung.me/2011/01/23/junit-runtime-tests-custom-runners/). The
* generated test names give information about the parameters used (unlike
* {@link Parameterized}).
- *
+ *
* @since 7.1
*/
public class TB3Runner extends ParallelRunner {
@@ -57,7 +57,8 @@ public class TB3Runner extends ParallelRunner {
public HttpClient getGridHttpClient(int connection_timeout,
int socket_timeout) {
- if (socket_timeout == 0 || socket_timeout > SOCKET_TIMEOUT) {
+ if (socket_timeout == 0
+ || socket_timeout > SOCKET_TIMEOUT) {
return super.getGridHttpClient(connection_timeout,
SOCKET_TIMEOUT);
}
diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/TB3TestLocator.java b/uitest/src/test/java/com/vaadin/tests/tb3/TB3TestLocator.java
index eb0861757e..c8e3ea9646 100644
--- a/uitest/src/test/java/com/vaadin/tests/tb3/TB3TestLocator.java
+++ b/uitest/src/test/java/com/vaadin/tests/tb3/TB3TestLocator.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -35,7 +35,7 @@ public class TB3TestLocator {
* specified by 'basePackage'. Collects all classes inside the location
* which can be assigned to 'baseClass' except for classes inside packages
* listed in 'ignoredPackages'.
- *
+ *
* @param baseClass
* @param basePackage
* @param ignorePackages
@@ -58,7 +58,7 @@ public class TB3TestLocator {
* specified by 'basePackage'. Collects all classes inside the location
* which can be assigned to 'baseClass' except for classes inside packages
* listed in 'ignoredPackages'.
- *
+ *
* @param baseClass
* @param basePackage
* @param ignoredPackages
@@ -74,8 +74,8 @@ public class TB3TestLocator {
try {
File f = new File(location.toURI());
if (!f.exists()) {
- throw new IOException("Directory " + f.toString()
- + " does not exist");
+ throw new IOException(
+ "Directory " + f.toString() + " does not exist");
}
findPackages(f, basePackage, baseClass, classes,
ignoredPackages);
@@ -103,7 +103,7 @@ public class TB3TestLocator {
* Traverses the given directory and collects all classes which are inside
* the given 'javaPackage' and can be assigned to the given 'baseClass'. The
* found classes are added to 'result'.
- *
+ *
* @param parent
* The directory to traverse
* @param javaPackage
@@ -141,7 +141,7 @@ public class TB3TestLocator {
* Traverses a Jar file using the given connection and collects all classes
* which are inside the given 'javaPackage' and can be assigned to the given
* 'baseClass'. The found classes are added to 'result'.
- *
+ *
* @param javaPackage
* The java package containing the classes (classes may be in a
* sub package)
@@ -171,7 +171,7 @@ public class TB3TestLocator {
* Verifies that the class represented by 'fullyQualifiedClassName' can be
* loaded, assigned to 'baseClass' and is not an abstract or anonymous
* class.
- *
+ *
* @param result
* The collection to add to
* @param fullyQualifiedClassName
@@ -193,7 +193,8 @@ public class TB3TestLocator {
return;
}
- if (!Modifier.isAbstract(c.getModifiers()) && !c.isAnonymousClass()) {
+ if (!Modifier.isAbstract(c.getModifiers())
+ && !c.isAnonymousClass()) {
result.add((Class<? extends T>) c);
}
} catch (Exception e) {
@@ -217,8 +218,8 @@ public class TB3TestLocator {
.getAnnotation(IncludeIfProperty.class);
if (includeIfProperty != null) {
String includeValue = includeIfProperty.value();
- String systemPropertyValue = System.getProperty(includeIfProperty
- .property());
+ String systemPropertyValue = System
+ .getProperty(includeIfProperty.property());
if (!includeValue.equals(systemPropertyValue)) {
return false;
}
diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/TB3TestSuite.java b/uitest/src/test/java/com/vaadin/tests/tb3/TB3TestSuite.java
index c68d59a4eb..d0a475528f 100644
--- a/uitest/src/test/java/com/vaadin/tests/tb3/TB3TestSuite.java
+++ b/uitest/src/test/java/com/vaadin/tests/tb3/TB3TestSuite.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.testbench.parallel.ParallelTestSuite;
/**
* Test suite which consists of all the TB3 tests passed in the constructor.
* Runs the tests in parallel using a {@link ParallelScheduler}
- *
+ *
* @author Vaadin Ltd
*/
public class TB3TestSuite extends ParallelTestSuite {
@@ -41,8 +41,7 @@ public class TB3TestSuite extends ParallelTestSuite {
Class<? extends AbstractTB3Test> baseClass, String basePackage,
String[] ignorePackages, TB3TestLocator locator)
throws InitializationError, IOException {
- super(klass, locator
- .findClasses(baseClass, basePackage, ignorePackages).toArray(
- new Class<?>[] {}));
+ super(klass, locator.findClasses(baseClass, basePackage, ignorePackages)
+ .toArray(new Class<?>[] {}));
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/TooltipTest.java b/uitest/src/test/java/com/vaadin/tests/tb3/TooltipTest.java
index e455abc9f0..d58eca573f 100644
--- a/uitest/src/test/java/com/vaadin/tests/tb3/TooltipTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/tb3/TooltipTest.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -29,7 +29,7 @@ import com.vaadin.testbench.By;
/**
* Base class for TestBench 3+ tests that use tooltips. This class contains
* utility methods for testing tooltip use.
- *
+ *
* @author Vaadin Ltd
*/
public abstract class TooltipTest extends MultiBrowserTest {
@@ -63,16 +63,18 @@ public abstract class TooltipTest extends MultiBrowserTest {
WebElement body = findElement(By.cssSelector("body"));
WebElement tooltip = getTooltip();
Assert.assertEquals(value, tooltip.getText());
- Assert.assertTrue("Tooltip overflowed to the left", tooltip
- .getLocation().getX() >= 0);
+ Assert.assertTrue("Tooltip overflowed to the left",
+ tooltip.getLocation().getX() >= 0);
Assert.assertTrue("Tooltip overflowed up",
tooltip.getLocation().getY() >= 0);
- Assert.assertTrue("Tooltip overflowed to the right", tooltip
- .getLocation().getX() + tooltip.getSize().getWidth() < body
- .getSize().getWidth());
- Assert.assertTrue("Tooltip overflowed down", tooltip.getLocation()
- .getY() + tooltip.getSize().getHeight() < body.getSize()
- .getHeight());
+ Assert.assertTrue("Tooltip overflowed to the right",
+ tooltip.getLocation().getX()
+ + tooltip.getSize().getWidth() < body.getSize()
+ .getWidth());
+ Assert.assertTrue("Tooltip overflowed down",
+ tooltip.getLocation().getY()
+ + tooltip.getSize().getHeight() < body.getSize()
+ .getHeight());
}
@@ -95,7 +97,8 @@ public abstract class TooltipTest extends MultiBrowserTest {
+ tooltip.getText() + " at " + tooltip.getLocation());
}
} catch (NoSuchElementException e) {
- Assert.fail("Tooltip element was removed completely, causing extra events to accessibility tools");
+ Assert.fail(
+ "Tooltip element was removed completely, causing extra events to accessibility tools");
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/VaadinBrowserFactory.java b/uitest/src/test/java/com/vaadin/tests/tb3/VaadinBrowserFactory.java
index 2389811ff0..fa35526f4d 100644
--- a/uitest/src/test/java/com/vaadin/tests/tb3/VaadinBrowserFactory.java
+++ b/uitest/src/test/java/com/vaadin/tests/tb3/VaadinBrowserFactory.java
@@ -42,9 +42,8 @@ public class VaadinBrowserFactory extends DefaultBrowserFactory {
.getClassLoader().loadClass(browserFactoryClass)
.newInstance();
} catch (Exception e) {
- getLogger().warning(
- "Failed to instantiate browser factory "
- + browserFactoryClass);
+ getLogger().warning("Failed to instantiate browser factory "
+ + browserFactoryClass);
throw new RuntimeException(e);
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/WebsocketTest.java b/uitest/src/test/java/com/vaadin/tests/tb3/WebsocketTest.java
index ee8cab22fd..4246799827 100644
--- a/uitest/src/test/java/com/vaadin/tests/tb3/WebsocketTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/tb3/WebsocketTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -15,7 +15,7 @@
*/
/**
- *
+ *
*/
package com.vaadin.tests.tb3;
@@ -28,7 +28,7 @@ import com.vaadin.testbench.parallel.TestCategory;
/**
* A {@link MultiBrowserTest} which restricts the tests to the browsers which
* support websocket
- *
+ *
* @author Vaadin Ltd
*/
@TestCategory("push")
diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/newelements/CalendarElement.java b/uitest/src/test/java/com/vaadin/tests/tb3/newelements/CalendarElement.java
index 40475afd3c..8e07b61e26 100644
--- a/uitest/src/test/java/com/vaadin/tests/tb3/newelements/CalendarElement.java
+++ b/uitest/src/test/java/com/vaadin/tests/tb3/newelements/CalendarElement.java
@@ -8,8 +8,8 @@ import com.vaadin.testbench.By;
import com.vaadin.testbench.elementsbase.ServerClass;
@ServerClass("com.vaadin.ui.Calendar")
-public class CalendarElement extends
- com.vaadin.testbench.elements.CalendarElement {
+public class CalendarElement
+ extends com.vaadin.testbench.elements.CalendarElement {
public List<WebElement> getWeekNumbers() {
return findElements(By.className("v-calendar-week-number"));
}
diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/newelements/ComboBoxElement.java b/uitest/src/test/java/com/vaadin/tests/tb3/newelements/ComboBoxElement.java
index 4a84c2bbc1..f1f16d3e00 100644
--- a/uitest/src/test/java/com/vaadin/tests/tb3/newelements/ComboBoxElement.java
+++ b/uitest/src/test/java/com/vaadin/tests/tb3/newelements/ComboBoxElement.java
@@ -7,8 +7,8 @@ import com.vaadin.testbench.By;
import com.vaadin.testbench.elementsbase.ServerClass;
@ServerClass("com.vaadin.ui.ComboBox")
-public class ComboBoxElement extends
- com.vaadin.testbench.elements.ComboBoxElement {
+public class ComboBoxElement
+ extends com.vaadin.testbench.elements.ComboBoxElement {
private static org.openqa.selenium.By bySuggestionPopup = By
.vaadin("#popup");
@@ -39,7 +39,7 @@ public class ComboBoxElement extends
/**
* Use this method to simulate typing into an element, which may set its
* value.
- *
+ *
* @param delay
* delay after sending each individual key (mainly needed for
* PhantomJS)
diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/newelements/FixedNotificationElement.java b/uitest/src/test/java/com/vaadin/tests/tb3/newelements/FixedNotificationElement.java
index 8f8dd82d9f..b10ea2bed8 100644
--- a/uitest/src/test/java/com/vaadin/tests/tb3/newelements/FixedNotificationElement.java
+++ b/uitest/src/test/java/com/vaadin/tests/tb3/newelements/FixedNotificationElement.java
@@ -21,7 +21,8 @@ public class FixedNotificationElement extends NotificationElement {
public void close() {
click(5, 5);
WebDriverWait wait = new WebDriverWait(getDriver(), 10);
- wait.until(ExpectedConditions.not(ExpectedConditions
- .presenceOfAllElementsLocatedBy(By.className("v-Notification"))));
+ wait.until(ExpectedConditions
+ .not(ExpectedConditions.presenceOfAllElementsLocatedBy(
+ By.className("v-Notification"))));
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/themes/LegacyComponentThemeChangeTest.java b/uitest/src/test/java/com/vaadin/tests/themes/LegacyComponentThemeChangeTest.java
index 1814aa99df..b10c51573f 100644
--- a/uitest/src/test/java/com/vaadin/tests/themes/LegacyComponentThemeChangeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/themes/LegacyComponentThemeChangeTest.java
@@ -78,8 +78,8 @@ public class LegacyComponentThemeChangeTest extends MultiBrowserTest {
return;
}
EmbeddedElement e = $(EmbeddedElement.class).first();
- WebElement movieParam = e.findElement(By
- .xpath(".//param[@name='movie']"));
+ WebElement movieParam = e
+ .findElement(By.xpath(".//param[@name='movie']"));
WebElement embed = e.findElement(By.xpath(".//embed"));
assertAttributePrefix(movieParam, "value", theme);
assertAttributePrefix(embed, "src", theme);
@@ -101,16 +101,16 @@ public class LegacyComponentThemeChangeTest extends MultiBrowserTest {
assertAttributePrefix(selectedImage, "src", theme);
cb.openPopup();
- WebElement popup = findElement(By
- .className("v-filterselect-suggestpopup"));
+ WebElement popup = findElement(
+ By.className("v-filterselect-suggestpopup"));
WebElement itemImage = popup.findElement(By.xpath(".//img"));
assertAttributePrefix(itemImage, "src", theme);
}
private void assertMenubarTheme(String theme) {
// The runoImage must always come from Runo
- WebElement runoImage = $(MenuBarElement.class).first().findElement(
- By.xpath(".//span[text()='runo']/img"));
+ WebElement runoImage = $(MenuBarElement.class).first()
+ .findElement(By.xpath(".//span[text()='runo']/img"));
String runoImageSrc = runoImage.getAttribute("src");
// Something in Selenium normalizes the image so it becomes
@@ -120,22 +120,22 @@ public class LegacyComponentThemeChangeTest extends MultiBrowserTest {
runoImageSrc);
// The other image should change with the theme
- WebElement themeImage = $(MenuBarElement.class).first().findElement(
- By.xpath(".//span[text()='selectedtheme']/img"));
+ WebElement themeImage = $(MenuBarElement.class).first()
+ .findElement(By.xpath(".//span[text()='selectedtheme']/img"));
assertAttributePrefix(themeImage, "src", theme);
- WebElement subMenuItem = $(MenuBarElement.class).first().findElement(
- By.xpath(".//span[text()='sub menu']"));
+ WebElement subMenuItem = $(MenuBarElement.class).first()
+ .findElement(By.xpath(".//span[text()='sub menu']"));
subMenuItem.click();
WebElement subMenu = findElement(By.className("v-menubar-popup"));
- WebElement subMenuRuno = subMenu.findElement(By
- .xpath(".//span[text()='runo']/img"));
+ WebElement subMenuRuno = subMenu
+ .findElement(By.xpath(".//span[text()='runo']/img"));
String subMenuRunoImageSrc = subMenuRuno.getAttribute("src");
Assert.assertEquals(getThemeURL("runo") + "icons/16/ok.png",
subMenuRunoImageSrc);
- WebElement subMenuThemeImage = subMenu.findElement(By
- .xpath(".//span[text()='selectedtheme']/img"));
+ WebElement subMenuThemeImage = subMenu
+ .findElement(By.xpath(".//span[text()='selectedtheme']/img"));
assertAttributePrefix(subMenuThemeImage, "src", theme);
}
@@ -143,8 +143,9 @@ public class LegacyComponentThemeChangeTest extends MultiBrowserTest {
String theme) {
String value = element.getAttribute(attribute);
String expectedPrefix = getThemeURL(theme);
- Assert.assertTrue("Attribute " + attribute + "='" + value
- + "' does not start with " + expectedPrefix,
+ Assert.assertTrue(
+ "Attribute " + attribute + "='" + value
+ + "' does not start with " + expectedPrefix,
value.startsWith(expectedPrefix));
}
diff --git a/uitest/src/test/java/com/vaadin/tests/themes/ThemeChangeFaviconTest.java b/uitest/src/test/java/com/vaadin/tests/themes/ThemeChangeFaviconTest.java
index cb5e9d07c7..166cc5440c 100644
--- a/uitest/src/test/java/com/vaadin/tests/themes/ThemeChangeFaviconTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/themes/ThemeChangeFaviconTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -34,8 +34,8 @@ public class ThemeChangeFaviconTest extends SingleBrowserTest {
public List<DesiredCapabilities> getBrowsersToTest() {
// Seems like stylesheet onload is not fired on PhantomJS
// https://github.com/ariya/phantomjs/issues/12332
- return Collections.singletonList(Browser.FIREFOX
- .getDesiredCapabilities());
+ return Collections
+ .singletonList(Browser.FIREFOX.getDesiredCapabilities());
}
@Test
@@ -59,14 +59,15 @@ public class ThemeChangeFaviconTest extends SingleBrowserTest {
private void assertFavicon(String theme) {
String faviconUrl = "/VAADIN/themes/" + theme + "/favicon.ico";
- List<WebElement> elements = findElements(By
- .cssSelector("link[rel~=\"icon\"]"));
+ List<WebElement> elements = findElements(
+ By.cssSelector("link[rel~=\"icon\"]"));
Assert.assertEquals(2, elements.size());
for (WebElement element : elements) {
- Assert.assertTrue(element.getAttribute("href")
- + " does not end with " + faviconUrl,
+ Assert.assertTrue(
+ element.getAttribute("href") + " does not end with "
+ + faviconUrl,
element.getAttribute("href").endsWith(faviconUrl));
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/themes/ThemeChangeOnTheFlyTest.java b/uitest/src/test/java/com/vaadin/tests/themes/ThemeChangeOnTheFlyTest.java
index caf264abf1..ba2fd41778 100644
--- a/uitest/src/test/java/com/vaadin/tests/themes/ThemeChangeOnTheFlyTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/themes/ThemeChangeOnTheFlyTest.java
@@ -90,8 +90,8 @@ public class ThemeChangeOnTheFlyTest extends MultiBrowserTest {
}
private void assertOverlayTheme(String theme) {
- final WebElement overlayContainerDiv = findElement(By
- .xpath("//div[contains(@class,'v-overlay-container')]"));
+ final WebElement overlayContainerDiv = findElement(
+ By.xpath("//div[contains(@class,'v-overlay-container')]"));
String overlayClass = overlayContainerDiv.getAttribute("class").trim();
assertThat(overlayClass, containsString(theme));
diff --git a/uitest/src/test/java/com/vaadin/tests/themes/base/DisabledMenuBarItemTest.java b/uitest/src/test/java/com/vaadin/tests/themes/base/DisabledMenuBarItemTest.java
index 3a5ddf5f3b..f261730930 100644
--- a/uitest/src/test/java/com/vaadin/tests/themes/base/DisabledMenuBarItemTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/themes/base/DisabledMenuBarItemTest.java
@@ -18,14 +18,14 @@ public class DisabledMenuBarItemTest extends MultiBrowserTest {
public void disabledMenuItemShouldHaveOpacity() throws IOException {
openTestURL();
- WebElement element = driver.findElement(By
- .className("v-menubar-menuitem-disabled"));
+ WebElement element = driver
+ .findElement(By.className("v-menubar-menuitem-disabled"));
- if (Browser.IE9.getDesiredCapabilities().equals(
- getDesiredCapabilities())) {
+ if (Browser.IE9.getDesiredCapabilities()
+ .equals(getDesiredCapabilities())) {
assertThat(element.getCssValue("filter"), is("alpha(opacity=50)"));
- } else if (Browser.IE8.getDesiredCapabilities().equals(
- getDesiredCapabilities())) {
+ } else if (Browser.IE8.getDesiredCapabilities()
+ .equals(getDesiredCapabilities())) {
WebElement icon = element.findElement(By.tagName("img"));
assertThat(icon.getCssValue("filter"), is("alpha(opacity=50)"));
} else {
diff --git a/uitest/src/test/java/com/vaadin/tests/themes/valo/AlignTopIconInButtonTest.java b/uitest/src/test/java/com/vaadin/tests/themes/valo/AlignTopIconInButtonTest.java
index 02ef886721..6c2b0b92aa 100644
--- a/uitest/src/test/java/com/vaadin/tests/themes/valo/AlignTopIconInButtonTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/themes/valo/AlignTopIconInButtonTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,7 +27,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test for centered image icon in button with 'icon-align-top' style.
- *
+ *
* @author Vaadin Ltd
*/
public class AlignTopIconInButtonTest extends MultiBrowserTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/themes/valo/CollapsibleTableColumnTest.java b/uitest/src/test/java/com/vaadin/tests/themes/valo/CollapsibleTableColumnTest.java
index 6e01e01996..f910354a39 100644
--- a/uitest/src/test/java/com/vaadin/tests/themes/valo/CollapsibleTableColumnTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/themes/valo/CollapsibleTableColumnTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test for non-collapsible column opacity for item in column configuration
* menu.
- *
+ *
* @author Vaadin Ltd
*/
public class CollapsibleTableColumnTest extends MultiBrowserTest {
@@ -48,8 +48,9 @@ public class CollapsibleTableColumnTest extends MultiBrowserTest {
String nonCollapsibleColumnOpacity = items.get(1)
.getCssValue("opacity");
- Assert.assertNotEquals("Opacity value is the same for collapsible "
- + "and non-collapsible column item", collapsibleColumnOpacity,
- nonCollapsibleColumnOpacity);
+ Assert.assertNotEquals(
+ "Opacity value is the same for collapsible "
+ + "and non-collapsible column item",
+ collapsibleColumnOpacity, nonCollapsibleColumnOpacity);
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/themes/valo/ContrastFontColorTest.java b/uitest/src/test/java/com/vaadin/tests/themes/valo/ContrastFontColorTest.java
index 38d93ab633..39271f8092 100644
--- a/uitest/src/test/java/com/vaadin/tests/themes/valo/ContrastFontColorTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/themes/valo/ContrastFontColorTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test for default contrast color variable in valo-font-color function.
- *
+ *
* @author Vaadin Ltd
*/
public class ContrastFontColorTest extends MultiBrowserTest {
@@ -35,6 +35,7 @@ public class ContrastFontColorTest extends MultiBrowserTest {
String color = $(TextFieldElement.class).first().getCssValue("color");
Assert.assertEquals(
"Unexpected text color value using 0.1 as defualt contrast value :"
- + color, "rgba(230, 230, 230, 1)", color);
+ + color,
+ "rgba(230, 230, 230, 1)", color);
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/themes/valo/DisabledLabelTest.java b/uitest/src/test/java/com/vaadin/tests/themes/valo/DisabledLabelTest.java
index dfbaaa5849..76fb0cec48 100644
--- a/uitest/src/test/java/com/vaadin/tests/themes/valo/DisabledLabelTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/themes/valo/DisabledLabelTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test for disabled label opacity.
- *
+ *
* @author Vaadin Ltd
*/
public class DisabledLabelTest extends MultiBrowserTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/themes/valo/FormLayoutInsideTableTest.java b/uitest/src/test/java/com/vaadin/tests/themes/valo/FormLayoutInsideTableTest.java
index 2a1664fbcf..a129550298 100644
--- a/uitest/src/test/java/com/vaadin/tests/themes/valo/FormLayoutInsideTableTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/themes/valo/FormLayoutInsideTableTest.java
@@ -16,7 +16,8 @@ public class FormLayoutInsideTableTest extends MultiBrowserTest {
public void nestedItemHasBorderTop() {
openTestURL();
- List<WebElement> formLayoutRows = findElements(By.cssSelector("tr.v-formlayout-row"));
+ List<WebElement> formLayoutRows = findElements(
+ By.cssSelector("tr.v-formlayout-row"));
WebElement secondNestedRow = formLayoutRows.get(1);
WebElement td = secondNestedRow.findElement(By.tagName("td"));
diff --git a/uitest/src/test/java/com/vaadin/tests/themes/valo/ImmediateUploadTest.java b/uitest/src/test/java/com/vaadin/tests/themes/valo/ImmediateUploadTest.java
index 137b845e52..7036e9991e 100644
--- a/uitest/src/test/java/com/vaadin/tests/themes/valo/ImmediateUploadTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/themes/valo/ImmediateUploadTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test to see if upload immediate mode hides the native file input.
- *
+ *
* @author Vaadin Ltd
*/
public class ImmediateUploadTest extends MultiBrowserTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/themes/valo/ModalWindowTest.java b/uitest/src/test/java/com/vaadin/tests/themes/valo/ModalWindowTest.java
index 0b21d4f34c..11b98174ba 100644
--- a/uitest/src/test/java/com/vaadin/tests/themes/valo/ModalWindowTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/themes/valo/ModalWindowTest.java
@@ -23,8 +23,8 @@ public class ModalWindowTest extends SingleBrowserTest {
openModalWindow();
- WebElement modalityCurtain = findElement(By
- .className("v-window-modalitycurtain"));
+ WebElement modalityCurtain = findElement(
+ By.className("v-window-modalitycurtain"));
assertThat(modalityCurtain.getCssValue("-webkit-animation-name"),
is("none"));
diff --git a/uitest/src/test/java/com/vaadin/tests/themes/valo/NotificationStyleTest.java b/uitest/src/test/java/com/vaadin/tests/themes/valo/NotificationStyleTest.java
index 5f9542b6f3..41b59f6f22 100644
--- a/uitest/src/test/java/com/vaadin/tests/themes/valo/NotificationStyleTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/themes/valo/NotificationStyleTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -31,7 +31,7 @@ import com.vaadin.ui.themes.ValoTheme;
/**
* Test for H1 and P elements styles in Notifications.
- *
+ *
* @author Vaadin Ltd
*/
public class NotificationStyleTest extends MultiBrowserTest {
@@ -46,13 +46,14 @@ public class NotificationStyleTest extends MultiBrowserTest {
waitUntil(notificationPresentCondition(), 2);
WebElement notification = findElement(By.className("v-Notification"));
- List<WebElement> headers = notification.findElements(By
- .tagName(ValoTheme.LABEL_H1));
+ List<WebElement> headers = notification
+ .findElements(By.tagName(ValoTheme.LABEL_H1));
String textAlign = headers.get(0).getCssValue("text-align");
String textAlignInnerHeader = headers.get(1).getCssValue("text-align");
- Assert.assertNotEquals("Styles for notification defined h1 tag "
- + "and custom HTML tag are the same", textAlign,
- textAlignInnerHeader);
+ Assert.assertNotEquals(
+ "Styles for notification defined h1 tag "
+ + "and custom HTML tag are the same",
+ textAlign, textAlignInnerHeader);
}
@Test
@@ -65,13 +66,15 @@ public class NotificationStyleTest extends MultiBrowserTest {
waitUntil(notificationPresentCondition(), 2);
WebElement notification = findElement(By.className("v-Notification"));
- WebElement description = notification.findElement(By
- .className("v-Notification-description"));
+ WebElement description = notification
+ .findElement(By.className("v-Notification-description"));
String display = description.getCssValue("display");
String displayP2 = notification.findElement(By.className("tested-p"))
.getCssValue("display");
- Assert.assertNotEquals("Styles for notification defined 'p' tag "
- + "and custom HTML tag are the same", display, displayP2);
+ Assert.assertNotEquals(
+ "Styles for notification defined 'p' tag "
+ + "and custom HTML tag are the same",
+ display, displayP2);
}
private ExpectedCondition<Boolean> notificationPresentCondition() {
diff --git a/uitest/src/test/java/com/vaadin/tests/themes/valo/ResponsiveStylesTest.java b/uitest/src/test/java/com/vaadin/tests/themes/valo/ResponsiveStylesTest.java
index 8f01de350e..5de3b5aaa7 100644
--- a/uitest/src/test/java/com/vaadin/tests/themes/valo/ResponsiveStylesTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/themes/valo/ResponsiveStylesTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -39,15 +39,15 @@ public class ResponsiveStylesTest extends MultiBrowserTest {
/**
* Tests that valo-menu-responsive can be used in any element on the page,
* not just as top-level component.
- *
+ *
* @throws Exception
*/
@Test
public void testValoMenuResponsiveParentSize() throws Exception {
openTestURL();
- List<WebElement> menus = findElements(com.vaadin.testbench.By
- .className(MENU_STYLENAME));
+ List<WebElement> menus = findElements(
+ com.vaadin.testbench.By.className(MENU_STYLENAME));
WebElement narrowMenu = menus.get(NARROW_ELEMENT_INDEX);
int narrowWidth = narrowMenu.getSize().width;
diff --git a/uitest/src/test/java/com/vaadin/tests/themes/valo/TableWithEmptyCaptionTest.java b/uitest/src/test/java/com/vaadin/tests/themes/valo/TableWithEmptyCaptionTest.java
index 04de8b498c..3e897c79b7 100644
--- a/uitest/src/test/java/com/vaadin/tests/themes/valo/TableWithEmptyCaptionTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/themes/valo/TableWithEmptyCaptionTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -30,8 +30,8 @@ public class TableWithEmptyCaptionTest extends MultiBrowserTest {
// Wait for the loading bar to disappear before taking the screenshot.
try {
- waitUntil(ExpectedConditions.invisibilityOfElementLocated(By
- .className("v-loading-indicator")), 5);
+ waitUntil(ExpectedConditions.invisibilityOfElementLocated(
+ By.className("v-loading-indicator")), 5);
} catch (TimeoutException e) {
// Just take the screenshot, PhantomJS always times out.
}
diff --git a/uitest/src/test/java/com/vaadin/tests/themes/valo/TextFieldBevelTest.java b/uitest/src/test/java/com/vaadin/tests/themes/valo/TextFieldBevelTest.java
index efe194d28a..5f52c53393 100644
--- a/uitest/src/test/java/com/vaadin/tests/themes/valo/TextFieldBevelTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/themes/valo/TextFieldBevelTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,7 +29,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test for $v-textfield-bevel value when $v-bevel is unset.
- *
+ *
* @author Vaadin Ltd
*/
public class TextFieldBevelTest extends MultiBrowserTest {
@@ -51,11 +51,9 @@ public class TextFieldBevelTest extends MultiBrowserTest {
}
private void openTestUrlWithoutBevel() {
- getDriver().get(
- getTestUrl()
- + "$"
- + TextFieldBevel.ValoDefaultTextFieldBevel.class
- .getSimpleName() + "?restartApplication");
+ getDriver().get(getTestUrl() + "$"
+ + TextFieldBevel.ValoDefaultTextFieldBevel.class.getSimpleName()
+ + "?restartApplication");
}
private String getBoxShadow() {
diff --git a/uitest/src/test/java/com/vaadin/tests/themes/valo/ValoDefaultCaptionWidthTest.java b/uitest/src/test/java/com/vaadin/tests/themes/valo/ValoDefaultCaptionWidthTest.java
index 7651b641de..5c22d1dbb0 100644
--- a/uitest/src/test/java/com/vaadin/tests/themes/valo/ValoDefaultCaptionWidthTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/themes/valo/ValoDefaultCaptionWidthTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -27,7 +27,7 @@ import com.vaadin.tests.components.colorpicker.DefaultCaptionWidthTest;
/**
* Test for default caption behavior in color picker using Valo theme.
- *
+ *
* @author Vaadin Ltd
*/
public class ValoDefaultCaptionWidthTest extends DefaultCaptionWidthTest {
@@ -50,7 +50,9 @@ public class ValoDefaultCaptionWidthTest extends DefaultCaptionWidthTest {
int width = $(ColorPickerElement.class).first().getSize().getWidth();
// Width should be 150px but let's just check that it's not which is
// used when default caption is used and at least >= 150-1
- assertThat("Width of color picker is overriden by "
- + "default caption feature", width, is(greaterThan(149)));
+ assertThat(
+ "Width of color picker is overriden by "
+ + "default caption feature",
+ width, is(greaterThan(149)));
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/themes/valo/ValoThemeUITest.java b/uitest/src/test/java/com/vaadin/tests/themes/valo/ValoThemeUITest.java
index 3c28b1f9eb..c5e0f446a1 100644
--- a/uitest/src/test/java/com/vaadin/tests/themes/valo/ValoThemeUITest.java
+++ b/uitest/src/test/java/com/vaadin/tests/themes/valo/ValoThemeUITest.java
@@ -285,9 +285,8 @@ public class ValoThemeUITest extends MultiBrowserTest {
LabelElement captionElem = content.$(LabelElement.class).first();
if (!captionElem.getText().equals(caption)) {
// IE ... why you fail clicks
- System.err.println("Extra click needed on '" + link
- + "' on remote " + getDesiredCapabilities() + " "
- + getRemoteControlName());
+ System.err.println("Extra click needed on '" + link + "' on remote "
+ + getDesiredCapabilities() + " " + getRemoteControlName());
open(link, caption, tries - 1);
} else {
diff --git a/uitest/src/test/java/com/vaadin/tests/tooltip/AdjacentElementsWithTooltipsTest.java b/uitest/src/test/java/com/vaadin/tests/tooltip/AdjacentElementsWithTooltipsTest.java
index 555168f155..788c420ce7 100644
--- a/uitest/src/test/java/com/vaadin/tests/tooltip/AdjacentElementsWithTooltipsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/tooltip/AdjacentElementsWithTooltipsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -33,7 +33,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test to see if tooltips obey quickOpenDelay when moving between directly
* adjacent elements.
- *
+ *
* @author Vaadin Ltd
*/
public class AdjacentElementsWithTooltipsTest extends MultiBrowserTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/tooltip/DragAndDropWrapperTooltipsTest.java b/uitest/src/test/java/com/vaadin/tests/tooltip/DragAndDropWrapperTooltipsTest.java
index d913c8cc12..b4d9ed57b2 100644
--- a/uitest/src/test/java/com/vaadin/tests/tooltip/DragAndDropWrapperTooltipsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/tooltip/DragAndDropWrapperTooltipsTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -22,8 +22,8 @@ import com.vaadin.testbench.elements.LabelElement;
import com.vaadin.tests.tb3.TooltipTest;
/**
- *
- *
+ *
+ *
* @author Vaadin Ltd
*/
public class DragAndDropWrapperTooltipsTest extends TooltipTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/tooltip/LongTooltipTest.java b/uitest/src/test/java/com/vaadin/tests/tooltip/LongTooltipTest.java
index 191ce6ffec..fed7b3940f 100644
--- a/uitest/src/test/java/com/vaadin/tests/tooltip/LongTooltipTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/tooltip/LongTooltipTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -25,7 +25,7 @@ import com.vaadin.tests.util.LoremIpsum;
/**
* Test to see if long tooltips behave appropriately
- *
+ *
* @author Vaadin Ltd
*/
public class LongTooltipTest extends TooltipTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/tooltip/MenuBarTooltipTest.java b/uitest/src/test/java/com/vaadin/tests/tooltip/MenuBarTooltipTest.java
index 9b2f7d13d6..8ae3b53f11 100644
--- a/uitest/src/test/java/com/vaadin/tests/tooltip/MenuBarTooltipTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/tooltip/MenuBarTooltipTest.java
@@ -17,15 +17,12 @@ public class MenuBarTooltipTest extends MultiBrowserTest {
@Test
public void toolTipShouldBeOnTopOfMenuItem() {
- String[] themes = new String[] {
- ValoTheme.THEME_NAME,
- Reindeer.THEME_NAME,
- Runo.THEME_NAME,
- ChameleonTheme.THEME_NAME
- };
-
- for(String theme : themes) {
- assertZIndices(theme);
+ String[] themes = new String[] { ValoTheme.THEME_NAME,
+ Reindeer.THEME_NAME, Runo.THEME_NAME,
+ ChameleonTheme.THEME_NAME };
+
+ for (String theme : themes) {
+ assertZIndices(theme);
}
}
@@ -35,7 +32,8 @@ public class MenuBarTooltipTest extends MultiBrowserTest {
$(MenuBarElement.class).first().clickItem("Menu item");
assertThat(String.format("Invalid z-index for theme %s.", theme),
- getZIndex("v-tooltip"), greaterThan(getZIndex("v-menubar-popup")));
+ getZIndex("v-tooltip"),
+ greaterThan(getZIndex("v-menubar-popup")));
}
private int getZIndex(String className) {
diff --git a/uitest/src/test/java/com/vaadin/tests/tooltip/SliderTooltipTest.java b/uitest/src/test/java/com/vaadin/tests/tooltip/SliderTooltipTest.java
index 743b7c2ab5..58c052a473 100644
--- a/uitest/src/test/java/com/vaadin/tests/tooltip/SliderTooltipTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/tooltip/SliderTooltipTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -23,7 +23,7 @@ import com.vaadin.tests.tb3.TooltipTest;
/**
* Test that sliders can have tooltips
- *
+ *
* @author Vaadin Ltd
*/
public class SliderTooltipTest extends TooltipTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/tooltip/TooltipAndJavascriptTest.java b/uitest/src/test/java/com/vaadin/tests/tooltip/TooltipAndJavascriptTest.java
index cc9309ac2c..4cd06f16b0 100644
--- a/uitest/src/test/java/com/vaadin/tests/tooltip/TooltipAndJavascriptTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/tooltip/TooltipAndJavascriptTest.java
@@ -30,8 +30,8 @@ public class TooltipAndJavascriptTest extends MultiBrowserTest {
public void ensureTooltipInOverlay() throws InterruptedException {
openTestURL();
$(ButtonElement.class).first().showTooltip();
- WebElement tooltip = findElement(By
- .cssSelector(".v-overlay-container .v-tooltip"));
+ WebElement tooltip = findElement(
+ By.cssSelector(".v-overlay-container .v-tooltip"));
WebElement overlayContainer = getParent(tooltip);
Assert.assertTrue("v-overlay-container did not receive theme",
hasClass(overlayContainer, "reindeer"));
@@ -48,7 +48,7 @@ public class TooltipAndJavascriptTest extends MultiBrowserTest {
}
private WebElement getParent(WebElement element) {
- return (WebElement) ((JavascriptExecutor) getDriver()).executeScript(
- "return arguments[0].parentNode;", element);
+ return (WebElement) ((JavascriptExecutor) getDriver())
+ .executeScript("return arguments[0].parentNode;", element);
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/tooltip/TooltipConfigurationTest.java b/uitest/src/test/java/com/vaadin/tests/tooltip/TooltipConfigurationTest.java
index 8f84444400..b69ee48b39 100644
--- a/uitest/src/test/java/com/vaadin/tests/tooltip/TooltipConfigurationTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/tooltip/TooltipConfigurationTest.java
@@ -1,12 +1,12 @@
/*
* 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
diff --git a/uitest/src/test/java/com/vaadin/tests/tooltip/TooltipInWindowTest.java b/uitest/src/test/java/com/vaadin/tests/tooltip/TooltipInWindowTest.java
index 1c50bf5486..dd1d5c03db 100644
--- a/uitest/src/test/java/com/vaadin/tests/tooltip/TooltipInWindowTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/tooltip/TooltipInWindowTest.java
@@ -61,6 +61,7 @@ public class TooltipInWindowTest extends TooltipTest {
int tooltipX = getTooltipContainerElement().getLocation().getX();
assertLessThanOrEqual(
"Tooltip should be positioned outside of viewport (was at "
- + tooltipX + ")", tooltipX, -1000);
+ + tooltipX + ")",
+ tooltipX, -1000);
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/tooltip/TooltipWidthUpdatingTest.java b/uitest/src/test/java/com/vaadin/tests/tooltip/TooltipWidthUpdatingTest.java
index 150d0e070e..26ea7fd338 100644
--- a/uitest/src/test/java/com/vaadin/tests/tooltip/TooltipWidthUpdatingTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/tooltip/TooltipWidthUpdatingTest.java
@@ -1,12 +1,12 @@
/*
* 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
@@ -40,7 +40,8 @@ public class TooltipWidthUpdatingTest extends TooltipTest {
testBenchElement(btnShortTooltip).showTooltip();
assertThat(getDriver().findElement(By.className("popupContent"))
- .getSize().getWidth(), lessThan(TooltipWidthUpdating.MAX_WIDTH));
+ .getSize().getWidth(),
+ lessThan(TooltipWidthUpdating.MAX_WIDTH));
}
} \ No newline at end of file
diff --git a/uitest/src/test/java/com/vaadin/tests/tooltip/ValidatorCaptionTooltipTest.java b/uitest/src/test/java/com/vaadin/tests/tooltip/ValidatorCaptionTooltipTest.java
index 9603b1df36..ecd5dbcadf 100644
--- a/uitest/src/test/java/com/vaadin/tests/tooltip/ValidatorCaptionTooltipTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/tooltip/ValidatorCaptionTooltipTest.java
@@ -22,7 +22,7 @@ import com.vaadin.tests.tb3.TooltipTest;
/**
* Test to see if validators create error tooltips correctly.
- *
+ *
* @author Vaadin Ltd
*/
public class ValidatorCaptionTooltipTest extends TooltipTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/urifragments/FragmentHandlingAndAsynchUIUpdateTest.java b/uitest/src/test/java/com/vaadin/tests/urifragments/FragmentHandlingAndAsynchUIUpdateTest.java
index 01ea890cec..942b13460e 100644
--- a/uitest/src/test/java/com/vaadin/tests/urifragments/FragmentHandlingAndAsynchUIUpdateTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/urifragments/FragmentHandlingAndAsynchUIUpdateTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,7 +28,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Back and Forward buttons in browser should work correctly during UI update
- *
+ *
* @author Vaadin Ltd
*/
public class FragmentHandlingAndAsynchUIUpdateTest extends MultiBrowserTest {
@@ -45,8 +45,10 @@ public class FragmentHandlingAndAsynchUIUpdateTest extends MultiBrowserTest {
for (int i = 0; i < 10; i++) {
// here we wait for setting fragment in URI. If not to do it -
// history will be "loss"
- getDriver().findElement(
- By.id(FragmentHandlingAndAsynchUIUpdate.BUTTON_ID)).click();
+ getDriver()
+ .findElement(
+ By.id(FragmentHandlingAndAsynchUIUpdate.BUTTON_ID))
+ .click();
assertFragment(String.format(FRAG_NAME_TPL, START_FRAG_ID + i));
}
@@ -97,8 +99,9 @@ public class FragmentHandlingAndAsynchUIUpdateTest extends MultiBrowserTest {
@Override
public void run() {
for (int i = 0; i < 10; i++) {
- getDriver().findElement(
- By.id(FragmentHandlingAndAsynchUIUpdate.BUTTON_ID))
+ getDriver()
+ .findElement(
+ By.id(FragmentHandlingAndAsynchUIUpdate.BUTTON_ID))
.click();
}
diff --git a/uitest/src/test/java/com/vaadin/tests/urifragments/SettingNullFragmentTest.java b/uitest/src/test/java/com/vaadin/tests/urifragments/SettingNullFragmentTest.java
index 4fed0b2602..1d570de3bf 100644
--- a/uitest/src/test/java/com/vaadin/tests/urifragments/SettingNullFragmentTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/urifragments/SettingNullFragmentTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -24,7 +24,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* UI test: setting null as URI fragment clear (remove) the fragment in the
* browser
- *
+ *
* @author Vaadin Ltd
*/
public class SettingNullFragmentTest extends MultiBrowserTest {
diff --git a/uitest/src/test/java/com/vaadin/tests/util/WidgetUtilTest.java b/uitest/src/test/java/com/vaadin/tests/util/WidgetUtilTest.java
index 2af015b406..b1d4faed7b 100644
--- a/uitest/src/test/java/com/vaadin/tests/util/WidgetUtilTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/util/WidgetUtilTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -41,8 +41,8 @@ public class WidgetUtilTest extends MultiBrowserTest {
@Test
public void testBlockElementRequiredSizeComputedStyle() {
openTestURL();
- WebElement testComponent = findElement(By
- .className("v-widget-util-test"));
+ WebElement testComponent = findElement(
+ By.className("v-widget-util-test"));
testComponent.click();
int padding = (int) Math.ceil(2.4 + 3.5);
@@ -60,14 +60,14 @@ public class WidgetUtilTest extends MultiBrowserTest {
border = 1 * 2;
}
- assertExpectedSize(testComponent, "noBorderPadding", baseWidth + "x"
- + baseHeight);
+ assertExpectedSize(testComponent, "noBorderPadding",
+ baseWidth + "x" + baseHeight);
- assertExpectedSize(testComponent, "border", (baseWidth + border) + "x"
- + (baseHeight + border));
+ assertExpectedSize(testComponent, "border",
+ (baseWidth + border) + "x" + (baseHeight + border));
- assertExpectedSize(testComponent, "padding", (baseWidth + padding)
- + "x" + (baseHeight + padding));
+ assertExpectedSize(testComponent, "padding",
+ (baseWidth + padding) + "x" + (baseHeight + padding));
assertExpectedSize(testComponent, "borderPadding",
(baseWidth + border + padding) + "x"
@@ -86,8 +86,8 @@ public class WidgetUtilTest extends MultiBrowserTest {
// Note that this is how the Windows browsers in the test cluster work.
// On Mac, Firefox works slightly differently (rounds border to 1.5px).
return (BrowserUtil.isChrome(capabilities)
- || BrowserUtil.isPhantomJS(capabilities) || BrowserUtil
- .isFirefox(capabilities));
+ || BrowserUtil.isPhantomJS(capabilities)
+ || BrowserUtil.isFirefox(capabilities));
}
@Override
diff --git a/uitest/src/test/java/com/vaadin/tests/widgetset/server/ClientRpcClassTest.java b/uitest/src/test/java/com/vaadin/tests/widgetset/server/ClientRpcClassTest.java
index 7ff8291494..7bf5a57b7b 100644
--- a/uitest/src/test/java/com/vaadin/tests/widgetset/server/ClientRpcClassTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/widgetset/server/ClientRpcClassTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -28,8 +28,8 @@ public class ClientRpcClassTest extends MultiBrowserTest {
public void pauseDisplayed() {
openTestURL();
- WebElement element = getDriver().findElement(
- By.id(ClientRpcClass.TEST_COMPONENT_ID));
+ WebElement element = getDriver()
+ .findElement(By.id(ClientRpcClass.TEST_COMPONENT_ID));
Assert.assertEquals("pause", element.getText());
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/widgetset/server/csrf/ui/AbstractCsrfTokenUITest.java b/uitest/src/test/java/com/vaadin/tests/widgetset/server/csrf/ui/AbstractCsrfTokenUITest.java
index 614eaa063e..ec0739966a 100644
--- a/uitest/src/test/java/com/vaadin/tests/widgetset/server/csrf/ui/AbstractCsrfTokenUITest.java
+++ b/uitest/src/test/java/com/vaadin/tests/widgetset/server/csrf/ui/AbstractCsrfTokenUITest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -29,8 +29,8 @@ import com.vaadin.tests.widgetset.client.csrf.CsrfButtonConnector;
public abstract class AbstractCsrfTokenUITest extends MultiBrowserTest {
- static final Logger LOGGER = Logger.getLogger(AbstractCsrfTokenUITest.class
- .getName());
+ static final Logger LOGGER = Logger
+ .getLogger(AbstractCsrfTokenUITest.class.getName());
@Test
public void testTokens() {
diff --git a/uitest/src/test/java/com/vaadin/tests/widgetset/server/csrf/ui/CsrfTokenDisabledTest.java b/uitest/src/test/java/com/vaadin/tests/widgetset/server/csrf/ui/CsrfTokenDisabledTest.java
index 504425fead..37b26c4833 100644
--- a/uitest/src/test/java/com/vaadin/tests/widgetset/server/csrf/ui/CsrfTokenDisabledTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/widgetset/server/csrf/ui/CsrfTokenDisabledTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -19,7 +19,7 @@ import com.vaadin.shared.ApplicationConstants;
/**
* Test the CSRF Token issue.
- *
+ *
* @since
* @author Vaadin Ltd
*/
diff --git a/uitest/src/test/java/com/vaadin/tests/widgetset/server/csrf/ui/CsrfTokenEnabledTest.java b/uitest/src/test/java/com/vaadin/tests/widgetset/server/csrf/ui/CsrfTokenEnabledTest.java
index 1d51f1c372..a6072c6919 100644
--- a/uitest/src/test/java/com/vaadin/tests/widgetset/server/csrf/ui/CsrfTokenEnabledTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/widgetset/server/csrf/ui/CsrfTokenEnabledTest.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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
@@ -17,7 +17,7 @@ package com.vaadin.tests.widgetset.server.csrf.ui;
/**
* Test the CSRF Token issue.
- *
+ *
* @since
* @author Vaadin Ltd
*/
@@ -34,8 +34,7 @@ public class CsrfTokenEnabledTest extends AbstractCsrfTokenUITest {
// No token sent yet to the server.
&& isUndefined(tokenGroup1.tokenSentToServer)
// Token is sent to the server.
- && tokenGroup2.clientToken
- .equals(tokenGroup2.tokenSentToServer)
+ && tokenGroup2.clientToken.equals(tokenGroup2.tokenSentToServer)
// And no more token received from the server.
&& isUndefined(tokenGroup2.tokenReceivedFromServer);
}
diff --git a/widgets/src/main/java/com/vaadin/themes/valoutil/BodyStyleName.java b/widgets/src/main/java/com/vaadin/themes/valoutil/BodyStyleName.java
index 7bffc73703..c913817519 100644
--- a/widgets/src/main/java/com/vaadin/themes/valoutil/BodyStyleName.java
+++ b/widgets/src/main/java/com/vaadin/themes/valoutil/BodyStyleName.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* Licensed under the Apache 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